@feedmepos/ui-library 1.1.0 → 1.1.1

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.
Files changed (82) hide show
  1. package/dist/components/dialog/FmDialog.vue.d.ts +2 -2
  2. package/dist/components/dialog/FmDialogContent.vue.d.ts +46 -0
  3. package/dist/components/dynamic-dialog/FmDynamicDialog.vue.d.ts +3 -3
  4. package/dist/components/form/radio/FmRadio.vue.d.ts +2 -2
  5. package/dist/components/popover/FmPopover.vue.d.ts +1 -1
  6. package/dist/components.d.ts +51 -51
  7. package/dist/federation/{FmCheckbox.vue_vue_type_style_index_0_lang-C42UPS6R.js → FmCheckbox.vue_vue_type_style_index_0_lang-TDD3_Xqr.js} +1 -1
  8. package/dist/federation/FmChip.vue_vue_type_script_setup_true_lang-DhfwSjHZ.js +1 -0
  9. package/dist/federation/{FmChipGroup.vue_vue_type_script_setup_true_lang-BMfOc5mB.js → FmChipGroup.vue_vue_type_script_setup_true_lang-cHuDp7EB.js} +1 -1
  10. package/dist/federation/{FmDateRangeYearMonthPicker.vue_vue_type_script_setup_true_lang-BpqD7YIY.js → FmDateRangeYearMonthPicker.vue_vue_type_script_setup_true_lang-BjqNXzL0.js} +1 -1
  11. package/dist/federation/FmDialogContent-56avUMvh.css +1 -0
  12. package/dist/federation/FmDialogContent.vue_vue_type_script_setup_true_lang-BDjSook0.js +1 -0
  13. package/dist/federation/{FmFormGroup.vue_vue_type_script_setup_true_lang-DdqXCBN4.js → FmFormGroup.vue_vue_type_script_setup_true_lang-BRpGahPB.js} +1 -1
  14. package/dist/federation/{FmHelperText.vue_vue_type_script_setup_true_lang-DXuVPe7_.js → FmHelperText.vue_vue_type_script_setup_true_lang-CDrRTQuS.js} +1 -1
  15. package/dist/federation/{FmLabel.vue_vue_type_script_setup_true_lang-Duf3cKfe.js → FmLabel.vue_vue_type_script_setup_true_lang-CipSkuOw.js} +1 -1
  16. package/dist/federation/{FmPopover-C-kkxoYY.css → FmPopover-Cb1GIPLz.css} +1 -1
  17. package/dist/federation/FmPopover-DpSU58bp.js +1 -0
  18. package/dist/federation/{FmSearch.vue_vue_type_script_setup_true_lang-B_3SS93T.js → FmSearch.vue_vue_type_script_setup_true_lang-D81dbxC3.js} +1 -1
  19. package/dist/federation/{FmTextField.vue_vue_type_style_index_0_lang-DgXFipwf.js → FmTextField.vue_vue_type_style_index_0_lang-DoYke8FO.js} +1 -1
  20. package/dist/federation/{FmTimeInput.vue_vue_type_style_index_0_lang-Cet_rm-M.js → FmTimeInput.vue_vue_type_style_index_0_lang-1sSY2gIi.js} +1 -1
  21. package/dist/federation/{__federation_expose_FmButton-DWI5-0NR.js → __federation_expose_FmButton-S-_dpwSp.js} +1 -1
  22. package/dist/federation/{__federation_expose_FmButtonGroup-mIGTKY0A.js → __federation_expose_FmButtonGroup-DXTOcrFC.js} +1 -1
  23. package/dist/federation/{__federation_expose_FmCheckbox-UPS4BZi7.js → __federation_expose_FmCheckbox-C_bqcvWe.js} +1 -1
  24. package/dist/federation/{__federation_expose_FmChip-C_p7uK03.js → __federation_expose_FmChip-CkktniIU.js} +1 -1
  25. package/dist/federation/{__federation_expose_FmChipGroup-Cybrw3ts.js → __federation_expose_FmChipGroup-C5x4Kmrc.js} +1 -1
  26. package/dist/federation/{__federation_expose_FmCollapsibleTabs-BO3HJK6K.js → __federation_expose_FmCollapsibleTabs-DYEp7ZJ3.js} +1 -1
  27. package/dist/federation/{__federation_expose_FmDatePicker-DQFEusX8.js → __federation_expose_FmDatePicker-Cpt-g8n6.js} +1 -1
  28. package/dist/federation/{__federation_expose_FmDatePickerMobile-5cyv0Pgw.js → __federation_expose_FmDatePickerMobile-Cdujwhjk.js} +1 -1
  29. package/dist/federation/{__federation_expose_FmDateRangePicker-C_MqFYkq.js → __federation_expose_FmDateRangePicker-1-T4l9lI.js} +1 -1
  30. package/dist/federation/{__federation_expose_FmDateRangePickerMobile-LVQ3mW2X.js → __federation_expose_FmDateRangePickerMobile-lCX_w6Od.js} +1 -1
  31. package/dist/federation/__federation_expose_FmDialog-Bk_tXTVr.js +1 -0
  32. package/dist/federation/{__federation_expose_FmDropField-6unh4Cen.js → __federation_expose_FmDropField-CV8IXPNA.js} +1 -1
  33. package/dist/federation/{__federation_expose_FmDynamicDialog-BMEv3D8N.js → __federation_expose_FmDynamicDialog-DHrUMI8X.js} +1 -1
  34. package/dist/federation/{__federation_expose_FmField-BW2s6y6I.js → __federation_expose_FmField-Dl5ip32K.js} +1 -1
  35. package/dist/federation/{__federation_expose_FmFormGroup-DJuPNkD6.js → __federation_expose_FmFormGroup-aEloHP68.js} +1 -1
  36. package/dist/federation/{__federation_expose_FmGlobalSearch-fXkVTW6a.js → __federation_expose_FmGlobalSearch-D5bMj2qK.js} +1 -1
  37. package/dist/federation/{__federation_expose_FmHelperText-DSXVYguh.js → __federation_expose_FmHelperText-D7wSV1lt.js} +1 -1
  38. package/dist/federation/{__federation_expose_FmIcon-BJpjvQbx.css → __federation_expose_FmIcon-Cz9Cq_lp.css} +1 -1
  39. package/dist/federation/{__federation_expose_FmIcon-CGxQARVu.js → __federation_expose_FmIcon-D3tVphOr.js} +1 -1
  40. package/dist/federation/{__federation_expose_FmLabel-Dp43VwJ5.js → __federation_expose_FmLabel-daPC0s8l.js} +1 -1
  41. package/dist/federation/{__federation_expose_FmMenuItem-B1kVPLUt.js → __federation_expose_FmMenuItem-CHCCDOnx.js} +1 -1
  42. package/dist/federation/{__federation_expose_FmPageHead-Bpy9UlCk.js → __federation_expose_FmPageHead-BFdjF728.js} +1 -1
  43. package/dist/federation/{__federation_expose_FmPhoneNumber-Ctwuvg66.js → __federation_expose_FmPhoneNumber-CS1e_O-N.js} +2 -2
  44. package/dist/federation/__federation_expose_FmRadio-CHIMarAU.js +1 -0
  45. package/dist/federation/__federation_expose_FmRadio-D_bffv1W.css +1 -0
  46. package/dist/federation/{__federation_expose_FmRadioGroup-DACYZbOd.js → __federation_expose_FmRadioGroup-BfeQw4qz.js} +1 -1
  47. package/dist/federation/{__federation_expose_FmSearch-BTKDPGFi.js → __federation_expose_FmSearch-BQLCi7gv.js} +1 -1
  48. package/dist/federation/{__federation_expose_FmSelect-cAOQpRkT.js → __federation_expose_FmSelect-w6oHtLTa.js} +1 -1
  49. package/dist/federation/{__federation_expose_FmSideSheet-C20XxAum.js → __federation_expose_FmSideSheet-K87YRGc-.js} +1 -1
  50. package/dist/federation/{__federation_expose_FmSnackbar-Dp-GFwOT.js → __federation_expose_FmSnackbar-DU-k2kbz.js} +1 -1
  51. package/dist/federation/{__federation_expose_FmStep-CVqUAy10.js → __federation_expose_FmStep-DLiCM8AA.js} +1 -1
  52. package/dist/federation/{__federation_expose_FmStepperField-BxtzoVGd.js → __federation_expose_FmStepperField-BKSrWZjN.js} +1 -1
  53. package/dist/federation/{__federation_expose_FmSwitch-6VkKoF02.js → __federation_expose_FmSwitch-8xT8wppU.js} +1 -1
  54. package/dist/federation/{__federation_expose_FmTab-CAP_N4MR.js → __federation_expose_FmTab-B-KbmW1y.js} +1 -1
  55. package/dist/federation/__federation_expose_FmTable-BJt5AOaK.js +4 -0
  56. package/dist/federation/{__federation_expose_FmTabs-ByumHofS.js → __federation_expose_FmTabs-CQrMZPoV.js} +1 -1
  57. package/dist/federation/{__federation_expose_FmTextField-Ca2uraWf.js → __federation_expose_FmTextField-D10vCppt.js} +1 -1
  58. package/dist/federation/{__federation_expose_FmTextarea-CrIXWXKd.js → __federation_expose_FmTextarea-CabADiYM.js} +1 -1
  59. package/dist/federation/{__federation_expose_FmThumbnail-Dw3Z1GJ5.js → __federation_expose_FmThumbnail-D5_7_lNo.js} +1 -1
  60. package/dist/federation/{__federation_expose_FmTimeInput-fX11RtNP.js → __federation_expose_FmTimeInput-DA83s1Jw.js} +1 -1
  61. package/dist/federation/{__federation_expose_FmTimePicker-BIHKXu5v.js → __federation_expose_FmTimePicker-BBBfHeaE.js} +1 -1
  62. package/dist/federation/{__federation_expose_FmTimeRangePicker-Cj7KNx2u.js → __federation_expose_FmTimeRangePicker-CpLcPMby.js} +1 -1
  63. package/dist/federation/dialog-plugin-Bo1Au4mw.js +1 -0
  64. package/dist/federation/feedmepos-ui-components.js +1 -1
  65. package/dist/federation/helpers-BzdYoDfi.js +1 -0
  66. package/dist/federation/{index-PS5b_oKI.js → index-BdJWM-SU.js} +1 -1
  67. package/dist/federation/index-C7qP2mLN.css +1 -0
  68. package/dist/feedmepos-ui-library.js +3549 -3497
  69. package/dist/feedmepos-ui-library.umd.cjs +17 -17
  70. package/dist/style.css +1 -1
  71. package/dist/utils/helpers.d.ts +1 -0
  72. package/package.json +1 -1
  73. package/dist/federation/FmChip.vue_vue_type_script_setup_true_lang-ZcLP2t-Q.js +0 -1
  74. package/dist/federation/FmPopover-ZMAeVtYA.js +0 -1
  75. package/dist/federation/__federation_expose_FmDialog-DZu9cQs_.js +0 -1
  76. package/dist/federation/__federation_expose_FmRadio-6Il0sFgw.js +0 -1
  77. package/dist/federation/__federation_expose_FmRadio-BliZl5lm.css +0 -1
  78. package/dist/federation/__federation_expose_FmTable-BC-lyalm.js +0 -4
  79. package/dist/federation/dialog-7UcrrkJ_.css +0 -1
  80. package/dist/federation/dialog-plugin-DXt1WYTe.js +0 -1
  81. package/dist/federation/helpers-JfpfGDYa.js +0 -1
  82. package/dist/federation/index-DYfsR-Pt.css +0 -1
@@ -1,4 +1,4 @@
1
- (function(ae,r){typeof exports=="object"&&typeof module<"u"?r(exports,require("vue"),require("vue-router")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router"],r):(ae=typeof globalThis<"u"?globalThis:ae||self,r(ae["feedmepos-ui-library"]={},ae.Vue,ae.VueRouter))})(this,function(ae,r,ut){"use strict";var K4=Object.defineProperty;var Z4=(ae,r,ut)=>r in ae?K4(ae,r,{enumerable:!0,configurable:!0,writable:!0,value:ut}):ae[r]=ut;var I=(ae,r,ut)=>(Z4(ae,typeof r!="symbol"?r+"":r,ut),ut);var fi;const us={directive:"wave",color:"currentColor",initialOpacity:.2,finalOpacity:.1,duration:.4,dissolveDuration:.15,easing:"ease-out",cancellationPeriod:75,trigger:"auto",tagName:"div"},Wc=t=>"config"in t&&"globalProperties"in t.config,Yc=t=>{let e;return t==="vue2"?e=!1:t==="vue3"?e=!0:e=Wc(t),e?{mounted:"mounted",updated:"updated"}:{mounted:"inserted",updated:"componentUpdated"}},fs=t=>typeof t=="string"&&t!=="auto",hs=(t,e)=>{t.dataset.vWaveBoundary=fs(e)?e:"true"},Uc=({borderTopLeftRadius:t,borderTopRightRadius:e,borderBottomLeftRadius:n,borderBottomRightRadius:o},i)=>{const s=document.createElement(i);return s.style.top="0",s.style.left="0",s.style.width="100%",s.style.height="100%",s.style.display="block",s.style.position="absolute",s.style.borderRadius=`${t} ${e} ${o} ${n}`,s.style.overflow="hidden",s.style.pointerEvents="none",s.style.webkitMaskImage="-webkit-radial-gradient(white, black)",s},Gc=(t,e,n,o)=>{const i=document.createElement("div");return i.style.position="absolute",i.style.width=`${n}px`,i.style.height=`${n}px`,i.style.top=`${e}px`,i.style.left=`${t}px`,i.style.background=o.color,i.style.borderRadius="50%",i.style.opacity=`${o.initialOpacity}`,i.style.transform="translate(-50%,-50%) scale(0)",i.style.transition=`transform ${o.duration}s ${o.easing}, opacity ${o.duration}s ${o.easing}`,i};function Kn(t,e,n,o){const i=t-n,s=e-o;return Math.sqrt(i*i+s*s)}function qc(t,e,{width:n,height:o}){const i=Kn(t,e,0,0),s=Kn(t,e,n,0),l=Kn(t,e,0,o),a=Kn(t,e,n,o);return Math.max(i,s,l,a)}const Xc=({x:t,y:e},{top:n,left:o})=>({x:t-o,y:e-n}),hi="vWaveCountInternal";function Kc(t){const e=pi(t);ps(t,e+1)}function Zc(t){const e=pi(t);ps(t,e-1)}function ps(t,e){t.dataset[hi]=e.toString()}function pi(t){var e;return parseInt((e=t.dataset[hi])!==null&&e!==void 0?e:"0",10)}function Jc(t){delete t.dataset[hi]}const mi=(t,e,n)=>{const o=e.getBoundingClientRect(),i=window.getComputedStyle(e),{x:s,y:l}=Xc(t,o),a=2.05*qc(s,l,o),d=Uc(i,n.tagName),c=Gc(s,l,a,n);Kc(e);let u="";i.position==="static"&&(e.style.position&&(u=e.style.position),e.style.position="relative"),d.appendChild(c),e.appendChild(d);let f=!1;const h=y=>{typeof y<"u"&&(document.removeEventListener("pointerup",h),document.removeEventListener("pointercancel",h)),f?p():f=!0},p=()=>{c.style.transition=`opacity ${n.dissolveDuration}s linear`,c.style.opacity="0",setTimeout(()=>{d.remove(),Zc(e),pi(e)===0&&(Jc(e),e.style.position=u)},n.dissolveDuration*1e3)};document.addEventListener("pointerup",h),document.addEventListener("pointercancel",h);const m=setTimeout(()=>{document.removeEventListener("pointercancel",g),requestAnimationFrame(()=>{c.style.transform="translate(-50%,-50%) scale(1)",c.style.opacity=`${n.finalOpacity}`,setTimeout(()=>h(),n.duration*1e3)})},n.cancellationPeriod),g=()=>{clearTimeout(m),d.remove(),document.removeEventListener("pointerup",h),document.removeEventListener("pointercancel",h),document.removeEventListener("pointercancel",g)};document.addEventListener("pointercancel",g)},on=new WeakMap,ms=(t={},e="vue3")=>{const n=Object.assign(Object.assign({},us),t),o=Yc(e),i=a=>{const d=a.currentTarget.dataset.vWaveTrigger;document.querySelectorAll(`[data-v-wave-boundary="${d}"]`).forEach(u=>mi(a,u,Object.assign(Object.assign({},n),on.get(u))))},s={[o.mounted](a,{value:d={}}){var c;on.set(a,d),hs(a,(c=d&&d.trigger)!==null&&c!==void 0?c:n.trigger),a.addEventListener("pointerdown",u=>{if(on.get(a)===!1)return;const f=Object.assign(Object.assign({},n),on.get(a));if(f.trigger===!1)return mi(u,a,f);if(fs(f.trigger))return;const h=a.querySelector('[data-v-wave-trigger="true"]');!h&&f.trigger===!0||h&&!u.composedPath().includes(h)||mi(u,a,f)})},[o.updated](a,{value:d={}}){var c;on.set(a,d),hs(a,(c=d&&d.trigger)!==null&&c!==void 0?c:n.trigger)}},l={[o.mounted](a,{arg:d="true"}){a.dataset.vWaveTrigger=d,d!=="true"&&a.addEventListener("pointerdown",i)},[o.updated](a,{arg:d="true"}){a.dataset.vWaveTrigger=d,d==="true"?a.removeEventListener("pointerdown",i):a.addEventListener("pointerdown",i)}};return{wave:s,vWave:s,waveTrigger:l,vWaveTrigger:l}},Qc={install(t,e={}){if(this.installed)return;this.installed=!0;const n=Object.assign(Object.assign({},us),e),{vWave:o,vWaveTrigger:i}=ms(n,t);t.directive(n.directive,o),t.directive(`${n.directive}-trigger`,i)},installed:!1,createLocalWaveDirective:ms},eu={class:"gap-8 inline-flex items-center relative select-none"},tu={key:0,class:"fm-typo-body-sm-400 justify-center"},nu=r.defineComponent({__name:"FmBadge",props:{inline:{type:Boolean,default:!1},value:{default:null},variant:{default:"neutral"},class:{default:void 0}},setup(t){const e=t,n=r.computed(()=>e.value&&e.value>99?"99+":e.value);return(o,i)=>(r.openBlock(),r.createElementBlock("div",eu,[r.renderSlot(o.$slots,"default",{},void 0,!0),r.createElementVNode("div",{class:r.normalizeClass(["fm-badge",e.class??`fm-badge--${o.variant}`,{absolute:!o.inline,"top-0 right-0 w-[6px] h-[6px]":e.value===null,"top-[-2px] right-[-4px] w-[16px] h-[16px]":e.value&&e.value<10,"top-[-2px] right-[-12px] px-4 h-[20px] min-w-[24px]":e.value&&e.value>10&&e.value<100,"top-[-2px] right-[-20px] px-4 h-[20px] min-w-[24px]":e.value&&e.value>99}])},[e.value!==null?(r.openBlock(),r.createElementBlock("span",tu,r.toDisplayString(n.value),1)):r.createCommentVNode("",!0)],2)]))}}),K=(t,e)=>{const n=t.__vccOpts||t;for(const[o,i]of e)n[o]=i;return n},Mt=K(nu,[["__scopeId","data-v-b401ca12"]]);function ou(){var t;return(t=r.getCurrentInstance())==null?void 0:t.emit}function Z(t,e){const n=ou(),o=r.ref(t[e]);return r.watch(()=>t[e],()=>{o.value=t[e]}),r.computed({get(){return o.value},set(s){o.value=s,n==null||n(`update:${String(e)}`,s)}})}const iu={class:"fm-bottom-sheet"},ru={class:"flex fm-typo-title-sm-700 items-center justify-between text-fm-color-typo-primary"},su={key:0},lu={class:"overflow-y-auto"},au={class:"flex gap-8 items-center"},gs=K(r.defineComponent({__name:"FmBottomSheet",props:{header:{default:""},modelValue:{type:Boolean,default:!1},dismissAway:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t){const e=t,n=r.ref(null),o=Z(e,"modelValue"),i=s=>{e.dismissAway&&n.value&&s.target===n.value&&(o.value=!1)};return(s,l)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{onClick:l[0]||(l[0]=a=>o.value=!0)},[r.renderSlot(s.$slots,"bottom-sheet-button",{},void 0,!0)]),(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(r.Transition,null,{default:r.withCtx(()=>[r.unref(o)?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"overlayRef",ref:n,class:"fm-bottom-sheet--container",onClick:l[1]||(l[1]=a=>i(a))},[r.createVNode(r.Transition,{name:"slide",appear:""},{default:r.withCtx(()=>[r.createElementVNode("div",iu,[r.createElementVNode("div",ru,[r.renderSlot(s.$slots,"bottom-sheet-header",{},()=>[s.header?(r.openBlock(),r.createElementBlock("div",su,r.toDisplayString(s.header),1)):r.createCommentVNode("",!0)],!0)]),r.createElementVNode("div",lu,[r.renderSlot(s.$slots,"default",{},void 0,!0)]),r.createElementVNode("div",au,[r.renderSlot(s.$slots,"bottom-sheet-footer",{},void 0,!0)])])]),_:3})],512)):r.createCommentVNode("",!0)]),_:3})]))]))}}),[["__scopeId","data-v-696a13ce"]]),du={class:"content-start flex flex-wrap gap-0 items-start max-w-full p-0"},cu=["onMouseenter"],uu={key:0},fu=r.defineComponent({__name:"FmBreadcrumb",props:{items:{}},setup(t){const e=ut.useRoute(),n=ut.useRouter();r.onMounted(async()=>{await n.isReady();const m=o.items.findIndex(g=>g.route==e.path);m!=-1&&!o.items[m].disabled&&(i.value=m)});const o=t,i=r.ref(-1),s=r.ref(-1),l=r.ref(" / "),a=r.ref("... /"),d=r.ref(!1),c=m=>i.value===m?"selected":s.value===m?"hovered":o.items[m].disabled?"disabled":"default",u=m=>{o.items[m].disabled||(i.value=m)},f=m=>m!=o.items.length-1,h=m=>!d.value&&o.items.length>5&&m>=2&&m<o.items.length-2,p=()=>{d.value=!d.value};return(m,g)=>{const y=r.resolveComponent("RouterLink");return r.openBlock(),r.createElementBlock("nav",null,[r.createElementVNode("ul",du,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(m.items,(b,$)=>(r.openBlock(),r.createElementBlock("li",{key:$,class:"empty:hidden flex gap-2 items-center justify-center pl-2 pr-0 py-1",onMouseenter:x=>s.value=$,onMouseleave:g[0]||(g[0]=x=>s.value=-1)},[h($)?$===3&&!d.value?(r.openBlock(),r.createElementBlock("a",{key:1,onClick:p},r.toDisplayString(a.value),1)):r.createCommentVNode("",!0):(r.openBlock(),r.createBlock(y,{key:0,class:r.normalizeClass(c($)),to:b.disabled?"":b.route,onClick:x=>u($)},{default:r.withCtx(()=>[r.createElementVNode("span",null,r.toDisplayString(b.label),1),f($)?(r.openBlock(),r.createElementBlock("span",uu,r.toDisplayString(l.value),1)):r.createCommentVNode("",!0)]),_:2},1032,["class","to","onClick"]))],40,cu))),128))])])}}}),hu=/^(#)((?:[A-Fa-f0-9]{3}){1,2})$/,pu=/^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}[)]$/,mu=/^^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*[)]$/,gu=/^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*[)]$/,yu=/^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 rn(t){return[hu,pu,mu,gu,yu].some(e=>e.test(t))}function gi(t,e){const n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);if(n)return`rgba(${parseInt(n[1],16)},${parseInt(n[2],16)},${parseInt(n[3],16)},${e})`;if(t.startsWith("rgb")){const o=t.split(",");if(o.length===3)return[...o.slice(0,2),o[2].replace(")",`,${e})`)].join(",");if(o.length===4)return[...o.slice(0,3),`${e})`].join(",")}return""}function sn(t){const e=getComputedStyle(document.documentElement).getPropertyValue(`--${t}`)||t;return e.startsWith("rgb")||e.startsWith("#")?e:null}const j=K(r.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(t){const e=t,n=r.computed(()=>{const s=[],l={};return s.push(o()),s.push(i()),rn(e.color)?l.color=e.color:s.push(`text-fm-color-${e.color}`),{class:s.join(" "),style:l}});function o(){return`fm-icon--${e.outline?"outlined":"rounded"}`}function i(){return`fm-icon--${e.size}`}return(s,l)=>(r.openBlock(),r.createElementBlock("span",r.mergeProps(n.value,{class:"fm-icon"}),r.toDisplayString(e.name),17))}}),[["__scopeId","data-v-fd802d37"]]);function Zn(t){return typeof t=="number"?t:typeof t=="string"&&isFinite(+t)?+t:null}const bu={class:"relative"},$u=["stroke-width"],_u=["stroke-width","stroke-dashoffset"],wu=["stroke-width","stroke-dashoffset"],Cu={key:0};var Jn=(t=>(t[t.md=2.5]="md",t[t.lg=2]="lg",t[t.xl=1.75]="xl",t[t.xxl=1.5]="xxl",t))(Jn||{});const ln=K(r.defineComponent({__name:"FmCircularProgress",props:{currentStep:{default:void 0},totalSteps:{default:void 0},indeterminate:{type:Boolean,default:void 0},size:{default:"xxl"},color:{default:"primary"}},setup(t){const e=t,n=r.computed(()=>{const s=Zn(e.currentStep),l=Zn(e.totalSteps),a=e.indeterminate??(s===null||l===null);return{currentStep:a?null:Math.min(s,l),totalSteps:l,indeterminate:a}}),o=r.computed(()=>{const s=Zn(e.currentStep),l=Zn(e.totalSteps);if(typeof s!="number"||typeof l!="number")return"10 200";const a=48,d=Math.min(1,s/l);return isNaN(d)?"0 200":`${d*a} 200`}),i=r.computed(()=>{const s=new Array,l={};return e.color?(rn(e.color)?l.color=e.color:s.push(`text-fm-color-${e.color}`),{class:s.join(" "),style:l}):{class:s.join(" "),style:l}});return(s,l)=>(r.openBlock(),r.createElementBlock("div",bu,[r.createElementVNode("div",{class:r.normalizeClass(["fm-progress fm-typo-body-sm-400 flex items-center justify-center",{"fm-progress--indeterminate":n.value.indeterminate,[`fm-progress--${s.size}`]:!0}])},[(r.openBlock(),r.createElementBlock("svg",{class:r.normalizeClass(["absolute h-full left-0 top-0 w-full",i.value.class]),style:r.normalizeStyle(i.value.style),viewBox:"0 0 18 18"},[n.value.indeterminate?(r.openBlock(),r.createElementBlock("circle",{key:0,class:"spinner","stroke-width":Jn[s.size],fill:"none",stroke:"currentColor",cx:"50%",cy:"50%",r:7.75,"stroke-linecap":"round","stroke-dasharray":"10 200","stroke-dashoffset":"0"},null,8,$u)):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createElementVNode("circle",{"stroke-width":Jn[s.size],fill:"none",stroke:"var(--fm-color-neutral-gray-100)",cx:"50%",cy:"50%",r:7.75,"stroke-linecap":"round","stroke-dashoffset":s.currentStep===0?"10px":"0",style:r.normalizeStyle({transform:"rotate(270deg)",strokeDasharray:"100 200",transformOrigin:"center",transition:"stroke-dasharray ease-out 250ms"})},null,12,_u),r.createElementVNode("circle",{"stroke-width":Jn[s.size],fill:"none",stroke:"currentColor",cx:"50%",cy:"50%",r:7.75,"stroke-linecap":"round","stroke-dashoffset":s.currentStep===0?"10px":"0",style:r.normalizeStyle({transform:"rotate(270deg)",strokeDasharray:o.value,transformOrigin:"center",transition:"stroke-dasharray ease-out 250ms"})},null,12,wu)],64))],6)),!n.value.indeterminate&&s.size==="xxl"?(r.openBlock(),r.createElementBlock("div",Cu,r.toDisplayString(n.value.currentStep)+" of "+r.toDisplayString(n.value.totalSteps),1)):r.createCommentVNode("",!0)],2)]))}}),[["__scopeId","data-v-c8665c2d"]]),xu=["disabled","type"],ku={class:"-translate-x-1/2 -translate-y-1/2 absolute left-1/2 top-1/2 transform"},J=K(r.defineComponent({__name:"FmButton",props:{variant:{default:"primary"},label:{default:""},icon:{default:""},size:{default:"lg"},disabled:{type:Boolean,default:!1},iconColor:{default:""},type:{default:"button"},iconPosition:{default:"prepend"},prependIcon:{default:""},appendIcon:{default:""},loading:{type:Boolean,default:!1}},setup(t){const e=t,n=r.ref(!1),o=r.computed(()=>`${i[e.variant]} ${e.disabled?"cursor-not-allowed":"cursor-pointer"}`),i={primary:"bg-fm-color-primary text-fm-color-typo-white rounded-lg",secondary:"bg-transparent rounded-lg border-1 border-fm-color-neutral-black",destructive:"bg-fm-color-system-error-300 text-fm-color-white text-fm-color-typo-white rounded-lg",tertiary:"bg-transparent text-fm-color-typo-primary rounded-lg",plain:"bg-transparent text-fm-color-primary",fab:"bg-fm-color-primary text-fm-color-white rounded-full text-fm-color-typo-white rounded-xxxl min-h-56 min-w-56 !p-16"};function s(l){n.value=l}return(l,a)=>{const d=r.resolveDirective("wave");return r.withDirectives((r.openBlock(),r.createElementBlock("button",{ref:"buttonEl",class:r.normalizeClass(`
1
+ (function(ae,s){typeof exports=="object"&&typeof module<"u"?s(exports,require("vue"),require("vue-router")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router"],s):(ae=typeof globalThis<"u"?globalThis:ae||self,s(ae["feedmepos-ui-library"]={},ae.Vue,ae.VueRouter))})(this,function(ae,s,ut){"use strict";var U_=Object.defineProperty;var G_=(ae,s,ut)=>s in ae?U_(ae,s,{enumerable:!0,configurable:!0,writable:!0,value:ut}):ae[s]=ut;var I=(ae,s,ut)=>(G_(ae,typeof s!="symbol"?s+"":s,ut),ut);var fi;const ur={directive:"wave",color:"currentColor",initialOpacity:.2,finalOpacity:.1,duration:.4,dissolveDuration:.15,easing:"ease-out",cancellationPeriod:75,trigger:"auto",tagName:"div"},Uc=t=>"config"in t&&"globalProperties"in t.config,Gc=t=>{let e;return t==="vue2"?e=!1:t==="vue3"?e=!0:e=Uc(t),e?{mounted:"mounted",updated:"updated"}:{mounted:"inserted",updated:"componentUpdated"}},fr=t=>typeof t=="string"&&t!=="auto",hr=(t,e)=>{t.dataset.vWaveBoundary=fr(e)?e:"true"},qc=({borderTopLeftRadius:t,borderTopRightRadius:e,borderBottomLeftRadius:n,borderBottomRightRadius:o},i)=>{const r=document.createElement(i);return r.style.top="0",r.style.left="0",r.style.width="100%",r.style.height="100%",r.style.display="block",r.style.position="absolute",r.style.borderRadius=`${t} ${e} ${o} ${n}`,r.style.overflow="hidden",r.style.pointerEvents="none",r.style.webkitMaskImage="-webkit-radial-gradient(white, black)",r},Xc=(t,e,n,o)=>{const i=document.createElement("div");return i.style.position="absolute",i.style.width=`${n}px`,i.style.height=`${n}px`,i.style.top=`${e}px`,i.style.left=`${t}px`,i.style.background=o.color,i.style.borderRadius="50%",i.style.opacity=`${o.initialOpacity}`,i.style.transform="translate(-50%,-50%) scale(0)",i.style.transition=`transform ${o.duration}s ${o.easing}, opacity ${o.duration}s ${o.easing}`,i};function Kn(t,e,n,o){const i=t-n,r=e-o;return Math.sqrt(i*i+r*r)}function Kc(t,e,{width:n,height:o}){const i=Kn(t,e,0,0),r=Kn(t,e,n,0),l=Kn(t,e,0,o),a=Kn(t,e,n,o);return Math.max(i,r,l,a)}const Zc=({x:t,y:e},{top:n,left:o})=>({x:t-o,y:e-n}),hi="vWaveCountInternal";function Jc(t){const e=pi(t);pr(t,e+1)}function Qc(t){const e=pi(t);pr(t,e-1)}function pr(t,e){t.dataset[hi]=e.toString()}function pi(t){var e;return parseInt((e=t.dataset[hi])!==null&&e!==void 0?e:"0",10)}function eu(t){delete t.dataset[hi]}const mi=(t,e,n)=>{const o=e.getBoundingClientRect(),i=window.getComputedStyle(e),{x:r,y:l}=Zc(t,o),a=2.05*Kc(r,l,o),d=qc(i,n.tagName),c=Xc(r,l,a,n);Jc(e);let u="";i.position==="static"&&(e.style.position&&(u=e.style.position),e.style.position="relative"),d.appendChild(c),e.appendChild(d);let f=!1;const h=y=>{typeof y<"u"&&(document.removeEventListener("pointerup",h),document.removeEventListener("pointercancel",h)),f?p():f=!0},p=()=>{c.style.transition=`opacity ${n.dissolveDuration}s linear`,c.style.opacity="0",setTimeout(()=>{d.remove(),Qc(e),pi(e)===0&&(eu(e),e.style.position=u)},n.dissolveDuration*1e3)};document.addEventListener("pointerup",h),document.addEventListener("pointercancel",h);const m=setTimeout(()=>{document.removeEventListener("pointercancel",g),requestAnimationFrame(()=>{c.style.transform="translate(-50%,-50%) scale(1)",c.style.opacity=`${n.finalOpacity}`,setTimeout(()=>h(),n.duration*1e3)})},n.cancellationPeriod),g=()=>{clearTimeout(m),d.remove(),document.removeEventListener("pointerup",h),document.removeEventListener("pointercancel",h),document.removeEventListener("pointercancel",g)};document.addEventListener("pointercancel",g)},on=new WeakMap,mr=(t={},e="vue3")=>{const n=Object.assign(Object.assign({},ur),t),o=Gc(e),i=a=>{const d=a.currentTarget.dataset.vWaveTrigger;document.querySelectorAll(`[data-v-wave-boundary="${d}"]`).forEach(u=>mi(a,u,Object.assign(Object.assign({},n),on.get(u))))},r={[o.mounted](a,{value:d={}}){var c;on.set(a,d),hr(a,(c=d&&d.trigger)!==null&&c!==void 0?c:n.trigger),a.addEventListener("pointerdown",u=>{if(on.get(a)===!1)return;const f=Object.assign(Object.assign({},n),on.get(a));if(f.trigger===!1)return mi(u,a,f);if(fr(f.trigger))return;const h=a.querySelector('[data-v-wave-trigger="true"]');!h&&f.trigger===!0||h&&!u.composedPath().includes(h)||mi(u,a,f)})},[o.updated](a,{value:d={}}){var c;on.set(a,d),hr(a,(c=d&&d.trigger)!==null&&c!==void 0?c:n.trigger)}},l={[o.mounted](a,{arg:d="true"}){a.dataset.vWaveTrigger=d,d!=="true"&&a.addEventListener("pointerdown",i)},[o.updated](a,{arg:d="true"}){a.dataset.vWaveTrigger=d,d==="true"?a.removeEventListener("pointerdown",i):a.addEventListener("pointerdown",i)}};return{wave:r,vWave:r,waveTrigger:l,vWaveTrigger:l}},tu={install(t,e={}){if(this.installed)return;this.installed=!0;const n=Object.assign(Object.assign({},ur),e),{vWave:o,vWaveTrigger:i}=mr(n,t);t.directive(n.directive,o),t.directive(`${n.directive}-trigger`,i)},installed:!1,createLocalWaveDirective:mr},nu={class:"gap-8 inline-flex items-center relative select-none"},ou={key:0,class:"fm-typo-body-sm-400 justify-center"},iu=s.defineComponent({__name:"FmBadge",props:{inline:{type:Boolean,default:!1},value:{default:null},variant:{default:"neutral"},class:{default:void 0}},setup(t){const e=t,n=s.computed(()=>e.value&&e.value>99?"99+":e.value);return(o,i)=>(s.openBlock(),s.createElementBlock("div",nu,[s.renderSlot(o.$slots,"default",{},void 0,!0),s.createElementVNode("div",{class:s.normalizeClass(["fm-badge",e.class??`fm-badge--${o.variant}`,{absolute:!o.inline,"top-0 right-0 w-[6px] h-[6px]":e.value===null,"top-[-2px] right-[-4px] w-[16px] h-[16px]":e.value&&e.value<10,"top-[-2px] right-[-12px] px-4 h-[20px] min-w-[24px]":e.value&&e.value>10&&e.value<100,"top-[-2px] right-[-20px] px-4 h-[20px] min-w-[24px]":e.value&&e.value>99}])},[e.value!==null?(s.openBlock(),s.createElementBlock("span",ou,s.toDisplayString(n.value),1)):s.createCommentVNode("",!0)],2)]))}}),K=(t,e)=>{const n=t.__vccOpts||t;for(const[o,i]of e)n[o]=i;return n},Mt=K(iu,[["__scopeId","data-v-b401ca12"]]);function su(){var t;return(t=s.getCurrentInstance())==null?void 0:t.emit}function Z(t,e){const n=su(),o=s.ref(t[e]);return s.watch(()=>t[e],()=>{o.value=t[e]}),s.computed({get(){return o.value},set(r){o.value=r,n==null||n(`update:${String(e)}`,r)}})}const ru={class:"fm-bottom-sheet"},lu={class:"flex fm-typo-title-sm-700 items-center justify-between text-fm-color-typo-primary"},au={key:0},du={class:"overflow-y-auto"},cu={class:"flex gap-8 items-center"},gr=K(s.defineComponent({__name:"FmBottomSheet",props:{header:{default:""},modelValue:{type:Boolean,default:!1},dismissAway:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t){const e=t,n=s.ref(null),o=Z(e,"modelValue"),i=r=>{e.dismissAway&&n.value&&r.target===n.value&&(o.value=!1)};return(r,l)=>(s.openBlock(),s.createElementBlock("div",null,[s.createElementVNode("div",{onClick:l[0]||(l[0]=a=>o.value=!0)},[s.renderSlot(r.$slots,"bottom-sheet-button",{},void 0,!0)]),(s.openBlock(),s.createBlock(s.Teleport,{to:"body"},[s.createVNode(s.Transition,null,{default:s.withCtx(()=>[s.unref(o)?(s.openBlock(),s.createElementBlock("div",{key:0,ref_key:"overlayRef",ref:n,class:"fm-bottom-sheet--container",onClick:l[1]||(l[1]=a=>i(a))},[s.createVNode(s.Transition,{name:"slide",appear:""},{default:s.withCtx(()=>[s.createElementVNode("div",ru,[s.createElementVNode("div",lu,[s.renderSlot(r.$slots,"bottom-sheet-header",{},()=>[r.header?(s.openBlock(),s.createElementBlock("div",au,s.toDisplayString(r.header),1)):s.createCommentVNode("",!0)],!0)]),s.createElementVNode("div",du,[s.renderSlot(r.$slots,"default",{},void 0,!0)]),s.createElementVNode("div",cu,[s.renderSlot(r.$slots,"bottom-sheet-footer",{},void 0,!0)])])]),_:3})],512)):s.createCommentVNode("",!0)]),_:3})]))]))}}),[["__scopeId","data-v-696a13ce"]]),uu={class:"content-start flex flex-wrap gap-0 items-start max-w-full p-0"},fu=["onMouseenter"],hu={key:0},pu=s.defineComponent({__name:"FmBreadcrumb",props:{items:{}},setup(t){const e=ut.useRoute(),n=ut.useRouter();s.onMounted(async()=>{await n.isReady();const m=o.items.findIndex(g=>g.route==e.path);m!=-1&&!o.items[m].disabled&&(i.value=m)});const o=t,i=s.ref(-1),r=s.ref(-1),l=s.ref(" / "),a=s.ref("... /"),d=s.ref(!1),c=m=>i.value===m?"selected":r.value===m?"hovered":o.items[m].disabled?"disabled":"default",u=m=>{o.items[m].disabled||(i.value=m)},f=m=>m!=o.items.length-1,h=m=>!d.value&&o.items.length>5&&m>=2&&m<o.items.length-2,p=()=>{d.value=!d.value};return(m,g)=>{const y=s.resolveComponent("RouterLink");return s.openBlock(),s.createElementBlock("nav",null,[s.createElementVNode("ul",uu,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(m.items,(b,$)=>(s.openBlock(),s.createElementBlock("li",{key:$,class:"empty:hidden flex gap-2 items-center justify-center pl-2 pr-0 py-1",onMouseenter:w=>r.value=$,onMouseleave:g[0]||(g[0]=w=>r.value=-1)},[h($)?$===3&&!d.value?(s.openBlock(),s.createElementBlock("a",{key:1,onClick:p},s.toDisplayString(a.value),1)):s.createCommentVNode("",!0):(s.openBlock(),s.createBlock(y,{key:0,class:s.normalizeClass(c($)),to:b.disabled?"":b.route,onClick:w=>u($)},{default:s.withCtx(()=>[s.createElementVNode("span",null,s.toDisplayString(b.label),1),f($)?(s.openBlock(),s.createElementBlock("span",hu,s.toDisplayString(l.value),1)):s.createCommentVNode("",!0)]),_:2},1032,["class","to","onClick"]))],40,fu))),128))])])}}}),mu=/^(#)((?:[A-Fa-f0-9]{3}){1,2})$/,gu=/^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}[)]$/,yu=/^^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*[)]$/,bu=/^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*[)]$/,$u=/^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 sn(t){return[mu,gu,yu,bu,$u].some(e=>e.test(t))}function gi(t,e){const n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);if(n)return`rgba(${parseInt(n[1],16)},${parseInt(n[2],16)},${parseInt(n[3],16)},${e})`;if(t.startsWith("rgb")){const o=t.split(",");if(o.length===3)return[...o.slice(0,2),o[2].replace(")",`,${e})`)].join(",");if(o.length===4)return[...o.slice(0,3),`${e})`].join(",")}return""}function rn(t){const e=getComputedStyle(document.documentElement).getPropertyValue(`--${t}`)||t;return e.startsWith("rgb")||e.startsWith("#")?e:null}const j=K(s.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(t){const e=t,n=s.computed(()=>{const r=[],l={};return r.push(o()),r.push(i()),sn(e.color)?l.color=e.color:r.push(`text-fm-color-${e.color}`),{class:r.join(" "),style:l}});function o(){return`fm-icon--${e.outline?"outlined":"rounded"}`}function i(){return`fm-icon--${e.size}`}return(r,l)=>(s.openBlock(),s.createElementBlock("span",s.mergeProps({class:"fm-icon"},n.value),s.toDisplayString(e.name),17))}}),[["__scopeId","data-v-475d423b"]]);function Zn(t){return typeof t=="number"?t:typeof t=="string"&&isFinite(+t)?+t:null}const _u={class:"relative"},wu=["stroke-width"],Cu=["stroke-width","stroke-dashoffset"],xu=["stroke-width","stroke-dashoffset"],ku={key:0};var Jn=(t=>(t[t.md=2.5]="md",t[t.lg=2]="lg",t[t.xl=1.75]="xl",t[t.xxl=1.5]="xxl",t))(Jn||{});const ln=K(s.defineComponent({__name:"FmCircularProgress",props:{currentStep:{default:void 0},totalSteps:{default:void 0},indeterminate:{type:Boolean,default:void 0},size:{default:"xxl"},color:{default:"primary"}},setup(t){const e=t,n=s.computed(()=>{const r=Zn(e.currentStep),l=Zn(e.totalSteps),a=e.indeterminate??(r===null||l===null);return{currentStep:a?null:Math.min(r,l),totalSteps:l,indeterminate:a}}),o=s.computed(()=>{const r=Zn(e.currentStep),l=Zn(e.totalSteps);if(typeof r!="number"||typeof l!="number")return"10 200";const a=48,d=Math.min(1,r/l);return isNaN(d)?"0 200":`${d*a} 200`}),i=s.computed(()=>{const r=new Array,l={};return e.color?(sn(e.color)?l.color=e.color:r.push(`text-fm-color-${e.color}`),{class:r.join(" "),style:l}):{class:r.join(" "),style:l}});return(r,l)=>(s.openBlock(),s.createElementBlock("div",_u,[s.createElementVNode("div",{class:s.normalizeClass(["fm-progress fm-typo-body-sm-400 flex items-center justify-center",{"fm-progress--indeterminate":n.value.indeterminate,[`fm-progress--${r.size}`]:!0}])},[(s.openBlock(),s.createElementBlock("svg",{class:s.normalizeClass(["absolute h-full left-0 top-0 w-full",i.value.class]),style:s.normalizeStyle(i.value.style),viewBox:"0 0 18 18"},[n.value.indeterminate?(s.openBlock(),s.createElementBlock("circle",{key:0,class:"spinner","stroke-width":Jn[r.size],fill:"none",stroke:"currentColor",cx:"50%",cy:"50%",r:7.75,"stroke-linecap":"round","stroke-dasharray":"10 200","stroke-dashoffset":"0"},null,8,wu)):(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[s.createElementVNode("circle",{"stroke-width":Jn[r.size],fill:"none",stroke:"var(--fm-color-neutral-gray-100)",cx:"50%",cy:"50%",r:7.75,"stroke-linecap":"round","stroke-dashoffset":r.currentStep===0?"10px":"0",style:s.normalizeStyle({transform:"rotate(270deg)",strokeDasharray:"100 200",transformOrigin:"center",transition:"stroke-dasharray ease-out 250ms"})},null,12,Cu),s.createElementVNode("circle",{"stroke-width":Jn[r.size],fill:"none",stroke:"currentColor",cx:"50%",cy:"50%",r:7.75,"stroke-linecap":"round","stroke-dashoffset":r.currentStep===0?"10px":"0",style:s.normalizeStyle({transform:"rotate(270deg)",strokeDasharray:o.value,transformOrigin:"center",transition:"stroke-dasharray ease-out 250ms"})},null,12,xu)],64))],6)),!n.value.indeterminate&&r.size==="xxl"?(s.openBlock(),s.createElementBlock("div",ku,s.toDisplayString(n.value.currentStep)+" of "+s.toDisplayString(n.value.totalSteps),1)):s.createCommentVNode("",!0)],2)]))}}),[["__scopeId","data-v-c8665c2d"]]),Su=["disabled","type"],vu={class:"-translate-x-1/2 -translate-y-1/2 absolute left-1/2 top-1/2 transform"},J=K(s.defineComponent({__name:"FmButton",props:{variant:{default:"primary"},label:{default:""},icon:{default:""},size:{default:"lg"},disabled:{type:Boolean,default:!1},iconColor:{default:""},type:{default:"button"},iconPosition:{default:"prepend"},prependIcon:{default:""},appendIcon:{default:""},loading:{type:Boolean,default:!1}},setup(t){const e=t,n=s.ref(!1),o=s.computed(()=>`${i[e.variant]} ${e.disabled?"cursor-not-allowed":"cursor-pointer"}`),i={primary:"bg-fm-color-primary text-fm-color-typo-white rounded-lg",secondary:"bg-transparent rounded-lg border-1 border-fm-color-neutral-black",destructive:"bg-fm-color-system-error-300 text-fm-color-white text-fm-color-typo-white rounded-lg",tertiary:"bg-transparent text-fm-color-typo-primary rounded-lg",plain:"bg-transparent text-fm-color-primary",fab:"bg-fm-color-primary text-fm-color-white rounded-full text-fm-color-typo-white rounded-xxxl min-h-56 min-w-56 !p-16"};function r(l){n.value=l}return(l,a)=>{const d=s.resolveDirective("wave");return s.withDirectives((s.openBlock(),s.createElementBlock("button",{ref:"buttonEl",class:s.normalizeClass(`
2
2
  fm-btn
3
3
  ${o.value}
4
4
  fm-btn--${l.size}
@@ -6,31 +6,31 @@
6
6
  fm-btn--${l.variant}
7
7
  ${l.disabled||l.loading?"fm-btn--disabled":""}
8
8
  ${n.value&&l.variant==="plain"?"!text-fm-color-system-warning-400":""}
9
- `),disabled:l.disabled,type:l.type,onMousedown:a[0]||(a[0]=()=>s(!0)),onMouseup:a[1]||(a[1]=()=>s(!1)),onMouseleave:a[2]||(a[2]=()=>s(!1))},[l.icon&&l.iconPosition==="prepend"||l.prependIcon?(r.openBlock(),r.createBlock(j,{key:0,class:r.normalizeClass({invisible:l.loading}),name:l.icon||l.prependIcon,outline:!n.value,color:l.disabled?"neutral-gray-200":l.iconColor??"",size:"md"},null,8,["class","name","outline","color"])):r.createCommentVNode("",!0),l.label?(r.openBlock(),r.createElementBlock("span",{key:1,class:r.normalizeClass(["fm-typo-body-lg-700 line-clamp-1",{invisible:l.loading}])},r.toDisplayString(l.label),3)):r.createCommentVNode("",!0),l.icon&&l.iconPosition==="append"||l.appendIcon?(r.openBlock(),r.createBlock(j,{key:2,class:r.normalizeClass({invisible:l.loading}),name:l.icon||l.appendIcon,outline:!n.value,color:l.disabled?"neutral-gray-200":l.iconColor??"",size:"md"},null,8,["class","name","outline","color"])):r.createCommentVNode("",!0),r.createElementVNode("div",ku,[l.loading?(r.openBlock(),r.createBlock(ln,{key:0,size:"md",color:"neutral-gray-300"})):r.createCommentVNode("",!0)])],42,xu)),[[d,!l.disabled&&!l.loading&&l.variant!=="plain"]])}}}),[["__scopeId","data-v-30ddf314"]]),Su={class:"bg-fm-color-neutral-white border-1 border-fm-color-neutral-gray-200 flex items-center overflow-hidden rounded-lg"},vu=["v-wave","disabled","onClick","onMousedown"],Mu=r.defineComponent({__name:"FmButtonGroup",props:{modelValue:{},disabled:{type:Boolean},items:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=e,i=c=>{o("update:modelValue",c)},s=r.ref(null),l=c=>{s.value=c},a=c=>c.disabled||n.disabled,d=c=>JSON.stringify(c)===JSON.stringify(n.modelValue);return(c,u)=>(r.openBlock(),r.createElementBlock("div",Su,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(c.items,(f,h)=>(r.openBlock(),r.createElementBlock("button",{key:h,type:"button","v-wave":a(f),class:r.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":d(f),"hover:bg-fm-color-neutral-white cursor-not-allowed":a(f)}]),disabled:a(f),onClick:p=>i(f),onMousedown:p=>l(f),onMouseup:u[0]||(u[0]=p=>l(null)),onMouseleave:u[1]||(u[1]=p=>l(null))},[f.icon?(r.openBlock(),r.createBlock(j,{key:0,name:f.icon,size:"md",color:a(f)?"neutral-gray-200":d(f)?"primary":"",outline:JSON.stringify(s.value)!==JSON.stringify(f)&&!d(f)},null,8,["name","color","outline"])):r.createCommentVNode("",!0),f.label?(r.openBlock(),r.createElementBlock("span",{key:1,class:r.normalizeClass(["fm-typo-body-lg-700",[a(f)?"text-fm-color-typo-disabled":"text-fm-color-typo-primary"]])},r.toDisplayString(f.label),3)):r.createCommentVNode("",!0)],42,vu))),128))]))}}),ys=Symbol.for("fm:form"),bs=Symbol.for("fm:radio-group"),$s=Symbol.for("fm:stepper"),_s=Symbol.for("fm:dialog"),ws=Symbol.for("fm:menu"),Cs=Symbol.for("fm:menu-to-item"),yi=Symbol.for("fm:snackbar"),ft=Symbol.for("fm:card"),Du=r.defineComponent({__name:"FmCard",props:{variant:{default:"elevated"},horizontal:{type:Boolean,default:!1},disabled:{type:Boolean}},setup(t){const e=t;return r.provide(ft,{disabled:e.disabled,horizontal:e.horizontal}),(n,o)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([`fm-card--${n.variant}`,{"fm-card--horizontal":n.horizontal}])},[r.renderSlot(n.$slots,"default",{disabled:e.disabled})],2))}}),Eu=r.defineComponent({__name:"FmCardActionArea",props:{disabled:{type:Boolean,default:!1}},setup(t){const e=r.inject(ft,null);return(n,o)=>{var s,l;const i=r.resolveDirective("wave");return r.withDirectives((r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass((s=r.unref(e))!=null&&s.disabled||n.disabled?"cursor-not-allowed":"cursor-pointer")},[r.renderSlot(n.$slots,"default")],2)),[[i,!((l=r.unref(e))!=null&&l.disabled)&&!n.disabled]])}}}),bi=r.defineComponent({__name:"FmCardSection",setup(t){const e=r.inject(ft,null);return(n,o)=>{var i;return r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["fm-card__section",{"fm-card__subtitle--disabled":(i=r.unref(e))==null?void 0:i.disabled}])},[r.renderSlot(n.$slots,"default")],2)}}}),Bu={class:"fm-card__actions"},Vu=r.defineComponent({__name:"FmCardActions",setup(t){const e=r.inject(ft,null);return(n,o)=>(r.openBlock(),r.createBlock(bi,null,{default:r.withCtx(()=>{var i;return[r.createElementVNode("div",Bu,[r.renderSlot(n.$slots,"default",{disabled:((i=r.unref(e))==null?void 0:i.disabled)??!1})])]}),_:3}))}}),xs=r.defineComponent({__name:"FmCardTitle",setup(t){const e=r.inject(ft,null);return(n,o)=>{var i;return r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["fm-card__title",{"fm-card__title--disabled":(i=r.unref(e))==null?void 0:i.disabled}])},[r.renderSlot(n.$slots,"default")],2)}}}),ks=r.defineComponent({__name:"FmCardSubtitle",setup(t){const e=r.inject(ft,null);return(n,o)=>{var i;return r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["fm-card__subtitle",{"fm-card__subtitle--disabled":(i=r.unref(e))==null?void 0:i.disabled}])},[r.renderSlot(n.$slots,"default")],2)}}}),Pu={class:"flex flex-col gap-4"},Ru=r.defineComponent({__name:"FmCardHeader",props:{title:{default:""},subtitle:{default:""}},setup(t){const e=r.inject(ft,null);return(n,o)=>(r.openBlock(),r.createBlock(bi,{class:"fm-card__header"},{default:r.withCtx(()=>{var i,s;return[r.createElementVNode("div",Pu,[n.title?(r.openBlock(),r.createBlock(xs,{key:0,disabled:(i=r.unref(e))==null?void 0:i.disabled},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(n.title),1)]),_:1},8,["disabled"])):r.createCommentVNode("",!0),n.subtitle?(r.openBlock(),r.createBlock(ks,{key:1,disabled:(s=r.unref(e))==null?void 0:s.disabled},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(n.subtitle),1)]),_:1},8,["disabled"])):r.createCommentVNode("",!0)])]}),_:1}))}}),Fu=["src","width"],Nu=r.defineComponent({__name:"FmCardMedia",props:{src:{},width:{default:"100%"}},setup(t){const e=r.inject(ft,null);return(n,o)=>{var i,s;return r.openBlock(),r.createElementBlock("img",{src:n.src,class:r.normalizeClass(["object-cover",[{"opacity-60":((i=r.unref(e))==null?void 0:i.disabled)??!1},(s=r.unref(e))!=null&&s.horizontal?"aspect-square":"aspect-4/3"]]),width:n.width},null,10,Fu)}}}),Ss=r.defineComponent({__name:"FmChip",props:{label:{default:""},icon:{default:""},selected:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},removable:{type:Boolean,default:!1},selectable:{type:Boolean,default:!1},compact:{type:Boolean,default:!1},variant:{default:"plain"}},emits:["chip-closed"],setup(t,{emit:e}){const n=t,o=e,i=r.ref(!1),s=r.ref(!1);function l(m){n.selectable&&(s.value=m)}const a=()=>{!n.selectable||n.disabled||(i.value=!i.value)},d=()=>{n.disabled||o("chip-closed")};r.onMounted(()=>{i.value=n.selected}),r.watch(()=>n.selected,()=>{i.value=n.selected});function c(m,g,y){if(m)return"text-fm-color-typo-disabled";switch(y){case"plain":return g?"text-fm-color-neutral-white":"";case"neutral":case"info":case"success":case"critical":return"text-fm-color-neutral-white";case"warning":return"text-fm-color-neutral-black"}}function u(m,g,y){if(m)return"bg-fm-color-neutral-gray-100 cursor-not-allowed";switch(y){case"plain":return g?"bg-fm-color-neutral-black":"bg-fm-color-neutral-gray-100";case"neutral":return"bg-fm-color-neutral-black";case"info":return"bg-fm-color-secondary-blueberry";case"success":return"bg-fm-color-secondary-mint";case"critical":return"bg-fm-color-secondary-salmon";case"warning":return"bg-fm-color-secondary-mustard"}}const f=r.ref(),h=r.ref(!1);function p(m=0){if(n.label&&!(!f.value&&m>500)){if(!f.value){r.nextTick(()=>p(m+1));return}h.value=f.value.offsetWidth<f.value.scrollWidth}}return r.onMounted(()=>{p()}),(m,g)=>{const y=r.resolveDirective("tooltip");return r.withDirectives((r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["inline-flex rounded-md items-center gap-4 justify-center max-w-[200px]",m.compact?"h-[22px] px-8":"h-[30px] px-8 py-4",u(m.disabled,i.value,m.variant),{"cursor-pointer":m.selectable&&!m.disabled,"hover:bg-fm-color-opacity-sm":!i.value&&!m.disabled&&m.selectable}]),onClick:a,onMousedown:g[0]||(g[0]=()=>l(!0)),onMouseup:g[1]||(g[1]=()=>l(!1)),onMouseleave:g[2]||(g[2]=()=>l(!1))},[r.renderSlot(m.$slots,"default",{},()=>[m.icon?(r.openBlock(),r.createBlock(j,{key:0,name:m.icon,size:"sm",outline:!s.value&&!i.value,color:m.disabled?"neutral-gray-200":i.value?"neutral-white":"neutral-black"},null,8,["name","outline","color"])):r.createCommentVNode("",!0),m.label?(r.openBlock(),r.createElementBlock("div",{key:1,ref_key:"labelRef",ref:f,class:r.normalizeClass(["fm-typo-body-md-700 select-none text-ellipsis overflow-hidden whitespace-nowrap",c(m.disabled,i.value,m.variant)])},r.toDisplayString(m.label),3)):r.createCommentVNode("",!0)]),m.removable?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["flex items-center justify-center rounded-xxxl",!i.value&&!m.disabled?"hover:bg-fm-color-opacity-sm":"",{"cursor-not-allowed":m.disabled,"cursor-pointer":m.selectable&&!m.disabled}]),onClick:d},[r.createVNode(j,{name:"close",size:"sm",color:m.disabled?"neutral-gray-200":i.value?"neutral-white":"neutral-black"},null,8,["color"])],2)):r.createCommentVNode("",!0)],34)),[[y,h.value?m.label:null]])}}}),vs=r.defineComponent({__name:"FmChipGroup",props:{items:{},selectable:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},compact:{type:Boolean,default:!1},removable:{type:Boolean,default:!1}},emits:["chip-closed"],setup(t,{emit:e}){const n=t,o=e,i=r.ref(null),s=r.ref(0),l=r.ref(null),a=r.ref(),d=()=>{var h,p;if(!i.value)return;const u=i.value.getBoundingClientRect();s.value>0&&l.value&&((h=a.value)==null||h.splice(l.value,1)),s.value=0;let f=0;Array.from(i.value.children).forEach((m,g)=>{const y=m.getBoundingClientRect(),b=y.y-u.y;f=Math.max(y.height*2+4,f),b>f&&(s.value+=1,l.value=l.value===null?g:g-s.value)}),s.value>0&&l.value&&((p=a.value)==null||p.splice(l.value,0,{label:`+${s.value}`,removable:!1,selectable:!1,compact:n.compact}))},c=u=>{o("chip-closed",u)};return r.onMounted(()=>{a.value=n.items,d(),new ResizeObserver(()=>{d()}).observe(i.value)}),r.watch(()=>n.items,()=>{a.value=n.items,d()}),(u,f)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"chipsContainer",ref:i,class:r.normalizeClass(["flex flex-wrap gap-4 items-center overflow-y-hidden",u.compact?"max-h-48":"max-h-64"])},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(a.value,(h,p)=>(r.openBlock(),r.createBlock(Ss,{key:p,label:h.label,icon:h.icon,selected:h.selected,removable:h.removable!==void 0?h.removable:u.removable,selectable:h.selectable!==void 0?h.selectable:u.selectable,disabled:h.disabled!==void 0?h.disabled:u.disabled,compact:u.compact,variant:h.variant,onChipClosed:m=>c(p)},null,8,["label","icon","selected","removable","selectable","disabled","compact","variant","onChipClosed"]))),128))],2))}}),Au={class:"flex fm-typo-title-sm-700 items-center justify-between text-fm-color-typo-primary"},Ou={key:0,class:"overflow-y-auto"},Iu={key:1,class:"flex gap-8 items-center sm:flex-col-reverse xs:flex-col-reverse"},Tu=r.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(t,{emit:e}){const n=t,o=e,i=r.ref(null),s=l=>{n.overlay&&i.value&&l.target===i.value&&o("update:modelValue",!1)};return(l,a)=>(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(r.Transition,{name:"fm-dialog"},{default:r.withCtx(()=>[l.modelValue?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"overlayRef",ref:i,class:r.normalizeClass({"fm-dialog--container":!0,"fm-dialog--overlay":l.overlay}),onClick:a[1]||(a[1]=d=>s(d))},[r.createElementVNode("div",{class:r.normalizeClass(`fm-dialog min-w-[${l.minWidth}px]`)},[r.createElementVNode("div",Au,[r.renderSlot(l.$slots,"dialog-header"),l.closeButton?(r.openBlock(),r.createBlock(j,{key:0,class:"cursor-pointer",name:"close",size:"md",onClick:a[0]||(a[0]=d=>o("update:modelValue",!1))})):r.createCommentVNode("",!0)]),l.$slots["dialog-content"]?(r.openBlock(),r.createElementBlock("div",Ou,[r.renderSlot(l.$slots,"dialog-content")])):r.createCommentVNode("",!0),l.$slots["dialog-footer"]?(r.openBlock(),r.createElementBlock("div",Iu,[r.renderSlot(l.$slots,"dialog-footer")])):r.createCommentVNode("",!0)],2)],2)):r.createCommentVNode("",!0)]),_:3})]))}}),Lu={class:"fm-drop-field"},zu=["accept","disabled"],Hu=K(r.defineComponent({__name:"FmDropField",props:{label:{default:""},disabled:{type:Boolean,default:!1},accept:{default:""},maxFileSize:{default:8e6}},emits:["file-upload","file-rejected"],setup(t,{emit:e}){const n=t,o=e,i=r.ref(!1),s=r.ref(),l=r.ref(),a=r.ref(),d=C=>{n.disabled||(C.stopPropagation(),C.preventDefault())},c=C=>{n.disabled||(C.stopPropagation(),C.preventDefault(),i.value=!0)},u=C=>{n.disabled||(C.stopPropagation(),C.preventDefault(),i.value=!1)},f=C=>{n.disabled||(C.stopPropagation(),C.preventDefault(),i.value=!1,h(C))},h=C=>{var E;a.value=((E=C.dataTransfer)==null?void 0:E.files)??C.target.files;const V=a.value;if(s.value=m(V[0]),l.value=g(V[0]),s.value&&l.value)o("file-upload",V[0]);else{const F=p();o("file-rejected",[{file:V[0],reason:F}])}},p=()=>{const C=[];return s.value||C.push("invalid-type"),l.value||C.push("invalid-size"),C},m=C=>{if(!n.accept)return!0;const V=n.accept.split(",").map(E=>E.trim());for(const E of V)if(y(E)){if($(E)===$(C.type))return!0}else if(b(C)===E||C.type===E)return!0;return!1},g=C=>C.size<=n.maxFileSize,y=C=>C.indexOf("*")!==-1,b=C=>"."+C.name.split(".").pop(),$=C=>C.substring(0,C.indexOf("/")),x=r.computed(()=>{if(i.value)return"Drop file to upload";if(s.value){if(!l.value)return`File size exceeds ${n.maxFileSize*1e-6}mb`}else return"File type is not valid";return""}),S=r.computed(()=>a.value?!s.value||!l.value:!1);return(C,V)=>(r.openBlock(),r.createElementBlock("label",Lu,[r.renderSlot(C.$slots,"label",{},()=>[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-body-lg-400",[C.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-primary"]])},r.toDisplayString(C.label),3)],!0),r.createElementVNode("div",{class:r.normalizeClass(["fm-drop-field__container",{"fm-drop-field__container--dragging":i.value,"fm-drop-field__container--invalid":S.value&&!C.disabled,"fm-drop-field__container--disabled":C.disabled}]),onDragenter:d,onDragover:c,onDragleave:u,onDrop:f},[(i.value||S.value)&&!C.disabled?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass({"fm-typo-body-lg-700":!0,"text-fm-color-primary":i.value,"text-fm-color-typo-error":S.value})},r.toDisplayString(x.value),3)):(r.openBlock(),r.createBlock(J,{key:1,label:"Add files",size:"md",variant:"secondary",disabled:C.disabled},null,8,["disabled"])),r.renderSlot(C.$slots,"accept-text",{},()=>[n.accept?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["fm-typo-body-md-400",[C.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-secondary"]])},r.toDisplayString(`Accepts ${n.accept}`),3)):r.createCommentVNode("",!0)],!0),r.createElementVNode("input",{type:"file",class:"fm-drop-field__input",accept:C.accept,disabled:C.disabled,onChange:h},null,40,zu)],34),r.renderSlot(C.$slots,"helper-text",{},()=>[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-body-sm-400",[C.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-secondary"]])},r.toDisplayString(`Max size ${n.maxFileSize*1e-6}mb`),3)],!0)]))}}),[["__scopeId","data-v-c914dc32"]]),ju={},Wu={class:"flex-grow"};function Yu(t,e){return r.openBlock(),r.createElementBlock("div",Wu)}const Wt=K(ju,[["render",Yu]]),Uu={install:t=>{const e={currentDialog:{vNode:null,container:null},open:n=>{const o={primary:[],secondary:[],tertiary:[]},i={onPrimary:c=>(o.primary.push(c),i),onSecondary:c=>(o.secondary.push(c),i),onTertiary:c=>(o.tertiary.push(c),i)};function s(){e.close()}const l=document.createElement("div");document.body.appendChild(l);const a=r.markRaw(Ms),d=r.createVNode(a,{...n,unmount:s,storedFunctions:o});return d.appContext=t._context,r.render(d,l),e.currentDialog.vNode=d,e.currentDialog.container=l,i},close:()=>{const{vNode:n,container:o}=e.currentDialog;n===null&&o===null||(o&&r.render(null,o),e.currentDialog={vNode:null,container:null})}};t.config.globalProperties.$dialog=e,t.provide(_s,e)}},Gu={key:0,class:"block relative"},qu={class:"flex fm-typo-title-sm-700 items-center justify-between text-fm-color-typo-primary"},Xu={key:0,class:"overflow-y-auto"},Ku={key:1,class:"fm-typo-body-md-400 overflow-y-auto text-fm-color-neutral-black"},Zu={key:2,class:"flex gap-8 items-center justify-end sm:flex-col-reverse xs:flex-col-reverse"},Ms=r.defineComponent({__name:"FmDynamicDialog",props:{title:{},message:{default:""},primaryActions:{default:null},secondaryActions:{default:null},tertiaryActions:{default:null},overlay:{type:Boolean,default:!0},closeButton:{type:Boolean,default:!0},minWidth:{default:280},dialogComponent:{default:null},contentComponent:{default:null},dialogComponentProps:{default:null},contentComponentProps:{default:null},unmount:{type:Function,default:()=>{}},storedFunctions:{default:null}},emits:["dialog-opened","dialog-closed"],setup(t,{emit:e}){const n=r.ref(!1),o=r.ref(),i=r.computed(()=>s.primaryActions||s.secondaryActions||s.tertiaryActions),s=t,l=e,a=r.ref(null),d=()=>{s.overlay&&(n.value=!1,setTimeout(()=>{s.unmount()},500))},c=f=>{a.value&&f.target===a.value&&d()},u=(f,h)=>{s.storedFunctions[h].forEach(p=>p(o.value)),f.close&&d()};return r.onMounted(()=>{l("dialog-opened"),n.value=!0}),r.onUnmounted(()=>{l("dialog-closed")}),(f,h)=>(r.openBlock(),r.createBlock(r.Transition,{name:"fm-dialog"},{default:r.withCtx(()=>[n.value?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"overlayRef",ref:a,class:r.normalizeClass({"fm-dialog--container":!0,"fm-dialog--overlay":f.overlay,"pointer-events-none":!n.value}),onClick:c},[f.dialogComponent?(r.openBlock(),r.createElementBlock("div",Gu,[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(f.dialogComponent),r.normalizeProps(r.guardReactiveProps(f.dialogComponentProps)),null,16)),f.closeButton?(r.openBlock(),r.createBlock(j,{key:0,class:"absolute cursor-pointer right-[12px] top-[18px]",name:"close",size:"md",onClick:d})):r.createCommentVNode("",!0)])):(r.openBlock(),r.createElementBlock("div",{key:1,class:"fm-dialog",style:r.normalizeStyle({"min-width":`${s.minWidth}px`})},[r.createElementVNode("div",qu,[r.createElementVNode("div",null,r.toDisplayString(f.title??"Notification"),1),f.closeButton?(r.openBlock(),r.createBlock(j,{key:0,class:"cursor-pointer",name:"close",size:"md",onClick:d})):r.createCommentVNode("",!0)]),f.contentComponent?(r.openBlock(),r.createElementBlock("div",Xu,[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(f.contentComponent),r.mergeProps(f.contentComponentProps,{"onDialog:emitData":h[0]||(h[0]=p=>o.value=p)}),null,16))])):f.message?(r.openBlock(),r.createElementBlock("div",Ku,r.toDisplayString(f.message),1)):r.createCommentVNode("",!0),i.value?(r.openBlock(),r.createElementBlock("div",Zu,[f.tertiaryActions?(r.openBlock(),r.createBlock(J,{key:0,class:"sm:w-full xs:w-full",variant:f.tertiaryActions.variant??"tertiary",label:f.tertiaryActions.text,size:"md",onClick:h[1]||(h[1]=p=>u(f.tertiaryActions,"tertiary"))},null,8,["variant","label"])):r.createCommentVNode("",!0),r.createVNode(Wt,{class:"sm:hidden xs:hidden"}),f.secondaryActions?(r.openBlock(),r.createBlock(J,{key:1,class:"sm:w-full xs:w-full",variant:f.secondaryActions.variant??"secondary",label:f.secondaryActions.text,size:"md",onClick:h[2]||(h[2]=p=>u(f.secondaryActions,"secondary"))},null,8,["variant","label"])):r.createCommentVNode("",!0),f.primaryActions?(r.openBlock(),r.createBlock(J,{key:2,class:"sm:w-full xs:w-full",variant:f.primaryActions.variant??"primary",label:f.primaryActions.text,size:"md",onClick:h[3]||(h[3]=p=>u(f.primaryActions,"primary"))},null,8,["variant","label"])):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0)],4))],2)):r.createCommentVNode("",!0)]),_:1}))}});/*!
9
+ `),disabled:l.disabled,type:l.type,onMousedown:a[0]||(a[0]=()=>r(!0)),onMouseup:a[1]||(a[1]=()=>r(!1)),onMouseleave:a[2]||(a[2]=()=>r(!1))},[l.icon&&l.iconPosition==="prepend"||l.prependIcon?(s.openBlock(),s.createBlock(j,{key:0,class:s.normalizeClass({invisible:l.loading}),name:l.icon||l.prependIcon,outline:!n.value,color:l.disabled?"neutral-gray-200":l.iconColor??"",size:"md"},null,8,["class","name","outline","color"])):s.createCommentVNode("",!0),l.label?(s.openBlock(),s.createElementBlock("span",{key:1,class:s.normalizeClass(["fm-typo-body-lg-700 line-clamp-1",{invisible:l.loading}])},s.toDisplayString(l.label),3)):s.createCommentVNode("",!0),l.icon&&l.iconPosition==="append"||l.appendIcon?(s.openBlock(),s.createBlock(j,{key:2,class:s.normalizeClass({invisible:l.loading}),name:l.icon||l.appendIcon,outline:!n.value,color:l.disabled?"neutral-gray-200":l.iconColor??"",size:"md"},null,8,["class","name","outline","color"])):s.createCommentVNode("",!0),s.createElementVNode("div",vu,[l.loading?(s.openBlock(),s.createBlock(ln,{key:0,size:"md",color:"neutral-gray-300"})):s.createCommentVNode("",!0)])],42,Su)),[[d,!l.disabled&&!l.loading&&l.variant!=="plain"]])}}}),[["__scopeId","data-v-30ddf314"]]),Mu={class:"bg-fm-color-neutral-white border-1 border-fm-color-neutral-gray-200 flex items-center overflow-hidden rounded-lg"},Du=["v-wave","disabled","onClick","onMousedown"],Eu=s.defineComponent({__name:"FmButtonGroup",props:{modelValue:{},disabled:{type:Boolean},items:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=e,i=c=>{o("update:modelValue",c)},r=s.ref(null),l=c=>{r.value=c},a=c=>c.disabled||n.disabled,d=c=>JSON.stringify(c)===JSON.stringify(n.modelValue);return(c,u)=>(s.openBlock(),s.createElementBlock("div",Mu,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(c.items,(f,h)=>(s.openBlock(),s.createElementBlock("button",{key:h,type:"button","v-wave":a(f),class:s.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":d(f),"hover:bg-fm-color-neutral-white cursor-not-allowed":a(f)}]),disabled:a(f),onClick:p=>i(f),onMousedown:p=>l(f),onMouseup:u[0]||(u[0]=p=>l(null)),onMouseleave:u[1]||(u[1]=p=>l(null))},[f.icon?(s.openBlock(),s.createBlock(j,{key:0,name:f.icon,size:"md",color:a(f)?"neutral-gray-200":d(f)?"primary":"",outline:JSON.stringify(r.value)!==JSON.stringify(f)&&!d(f)},null,8,["name","color","outline"])):s.createCommentVNode("",!0),f.label?(s.openBlock(),s.createElementBlock("span",{key:1,class:s.normalizeClass(["fm-typo-body-lg-700",[a(f)?"text-fm-color-typo-disabled":"text-fm-color-typo-primary"]])},s.toDisplayString(f.label),3)):s.createCommentVNode("",!0)],42,Du))),128))]))}}),yr=Symbol.for("fm:form"),br=Symbol.for("fm:radio-group"),$r=Symbol.for("fm:stepper"),_r=Symbol.for("fm:dialog"),wr=Symbol.for("fm:menu"),Cr=Symbol.for("fm:menu-to-item"),yi=Symbol.for("fm:snackbar"),ft=Symbol.for("fm:card"),Bu=s.defineComponent({__name:"FmCard",props:{variant:{default:"elevated"},horizontal:{type:Boolean,default:!1},disabled:{type:Boolean}},setup(t){const e=t;return s.provide(ft,{disabled:e.disabled,horizontal:e.horizontal}),(n,o)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass([`fm-card--${n.variant}`,{"fm-card--horizontal":n.horizontal}])},[s.renderSlot(n.$slots,"default",{disabled:e.disabled})],2))}}),Vu=s.defineComponent({__name:"FmCardActionArea",props:{disabled:{type:Boolean,default:!1}},setup(t){const e=s.inject(ft,null);return(n,o)=>{var r,l;const i=s.resolveDirective("wave");return s.withDirectives((s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass((r=s.unref(e))!=null&&r.disabled||n.disabled?"cursor-not-allowed":"cursor-pointer")},[s.renderSlot(n.$slots,"default")],2)),[[i,!((l=s.unref(e))!=null&&l.disabled)&&!n.disabled]])}}}),bi=s.defineComponent({__name:"FmCardSection",setup(t){const e=s.inject(ft,null);return(n,o)=>{var i;return s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["fm-card__section",{"fm-card__subtitle--disabled":(i=s.unref(e))==null?void 0:i.disabled}])},[s.renderSlot(n.$slots,"default")],2)}}}),Pu={class:"fm-card__actions"},Ru=s.defineComponent({__name:"FmCardActions",setup(t){const e=s.inject(ft,null);return(n,o)=>(s.openBlock(),s.createBlock(bi,null,{default:s.withCtx(()=>{var i;return[s.createElementVNode("div",Pu,[s.renderSlot(n.$slots,"default",{disabled:((i=s.unref(e))==null?void 0:i.disabled)??!1})])]}),_:3}))}}),xr=s.defineComponent({__name:"FmCardTitle",setup(t){const e=s.inject(ft,null);return(n,o)=>{var i;return s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["fm-card__title",{"fm-card__title--disabled":(i=s.unref(e))==null?void 0:i.disabled}])},[s.renderSlot(n.$slots,"default")],2)}}}),kr=s.defineComponent({__name:"FmCardSubtitle",setup(t){const e=s.inject(ft,null);return(n,o)=>{var i;return s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["fm-card__subtitle",{"fm-card__subtitle--disabled":(i=s.unref(e))==null?void 0:i.disabled}])},[s.renderSlot(n.$slots,"default")],2)}}}),Fu={class:"flex flex-col gap-4"},Nu=s.defineComponent({__name:"FmCardHeader",props:{title:{default:""},subtitle:{default:""}},setup(t){const e=s.inject(ft,null);return(n,o)=>(s.openBlock(),s.createBlock(bi,{class:"fm-card__header"},{default:s.withCtx(()=>{var i,r;return[s.createElementVNode("div",Fu,[n.title?(s.openBlock(),s.createBlock(xr,{key:0,disabled:(i=s.unref(e))==null?void 0:i.disabled},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(n.title),1)]),_:1},8,["disabled"])):s.createCommentVNode("",!0),n.subtitle?(s.openBlock(),s.createBlock(kr,{key:1,disabled:(r=s.unref(e))==null?void 0:r.disabled},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(n.subtitle),1)]),_:1},8,["disabled"])):s.createCommentVNode("",!0)])]}),_:1}))}}),Au=["src","width"],Ou=s.defineComponent({__name:"FmCardMedia",props:{src:{},width:{default:"100%"}},setup(t){const e=s.inject(ft,null);return(n,o)=>{var i,r;return s.openBlock(),s.createElementBlock("img",{src:n.src,class:s.normalizeClass(["object-cover",[{"opacity-60":((i=s.unref(e))==null?void 0:i.disabled)??!1},(r=s.unref(e))!=null&&r.horizontal?"aspect-square":"aspect-4/3"]]),width:n.width},null,10,Au)}}}),Sr=s.defineComponent({__name:"FmChip",props:{label:{default:""},icon:{default:""},selected:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},removable:{type:Boolean,default:!1},selectable:{type:Boolean,default:!1},compact:{type:Boolean,default:!1},variant:{default:"plain"}},emits:["chip-closed"],setup(t,{emit:e}){const n=t,o=e,i=s.ref(!1),r=s.ref(!1);function l(m){n.selectable&&(r.value=m)}const a=()=>{!n.selectable||n.disabled||(i.value=!i.value)},d=m=>{m.stopPropagation(),!n.disabled&&o("chip-closed")};s.onMounted(()=>{i.value=n.selected}),s.watch(()=>n.selected,()=>{i.value=n.selected});function c(m,g,y){if(m)return"text-fm-color-typo-disabled";switch(y){case"plain":return g?"text-fm-color-neutral-white":"";case"neutral":case"info":case"success":case"critical":return"text-fm-color-neutral-white";case"warning":return"text-fm-color-neutral-black"}}function u(m,g,y){if(m)return"bg-fm-color-neutral-gray-100 cursor-not-allowed";switch(y){case"plain":return g?"bg-fm-color-neutral-black":"bg-fm-color-neutral-gray-100";case"neutral":return"bg-fm-color-neutral-black";case"info":return"bg-fm-color-secondary-blueberry";case"success":return"bg-fm-color-secondary-mint";case"critical":return"bg-fm-color-secondary-salmon";case"warning":return"bg-fm-color-secondary-mustard"}}const f=s.ref(),h=s.ref(!1);function p(m=0){if(n.label&&!(!f.value&&m>500)){if(!f.value){s.nextTick(()=>p(m+1));return}h.value=f.value.offsetWidth<f.value.scrollWidth}}return s.onMounted(()=>{p()}),(m,g)=>{const y=s.resolveDirective("tooltip");return s.withDirectives((s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["inline-flex rounded-md items-center gap-4 justify-center max-w-[200px]",m.compact?"h-[22px] px-8":"h-[30px] px-8 py-4",u(m.disabled,i.value,m.variant),{"cursor-pointer":m.selectable&&!m.disabled,"hover:bg-fm-color-opacity-sm":!i.value&&!m.disabled&&m.selectable}]),onClick:a,onMousedown:g[0]||(g[0]=()=>l(!0)),onMouseleave:g[1]||(g[1]=()=>l(!1)),onMouseup:g[2]||(g[2]=()=>l(!1))},[s.renderSlot(m.$slots,"default",{},()=>[m.icon?(s.openBlock(),s.createBlock(j,{key:0,color:m.disabled?"neutral-gray-200":i.value?"neutral-white":"neutral-black",name:m.icon,outline:!r.value&&!i.value,size:"sm"},null,8,["color","name","outline"])):s.createCommentVNode("",!0),m.label?(s.openBlock(),s.createElementBlock("div",{key:1,ref_key:"labelRef",ref:f,class:s.normalizeClass(["fm-typo-body-md-700 select-none text-ellipsis overflow-hidden whitespace-nowrap",c(m.disabled,i.value,m.variant)])},s.toDisplayString(m.label),3)):s.createCommentVNode("",!0)]),m.removable?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(["flex items-center justify-center rounded-xxxl",!i.value&&!m.disabled?"hover:bg-fm-color-opacity-sm":"",{"cursor-not-allowed":m.disabled,"cursor-pointer":m.selectable&&!m.disabled}]),onClick:d},[s.createVNode(j,{color:m.disabled?"neutral-gray-200":i.value?"neutral-white":"neutral-black",name:"close",size:"sm"},null,8,["color"])],2)):s.createCommentVNode("",!0)],34)),[[y,h.value?m.label:null]])}}}),vr=s.defineComponent({__name:"FmChipGroup",props:{items:{},selectable:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},compact:{type:Boolean,default:!1},removable:{type:Boolean,default:!1}},emits:["chip-closed"],setup(t,{emit:e}){const n=t,o=e,i=s.ref(null),r=s.ref(0),l=s.ref(null),a=s.ref(),d=()=>{var h,p;if(!i.value)return;const u=i.value.getBoundingClientRect();r.value>0&&l.value&&((h=a.value)==null||h.splice(l.value,1)),r.value=0;let f=0;Array.from(i.value.children).forEach((m,g)=>{const y=m.getBoundingClientRect(),b=y.y-u.y;f=Math.max(y.height*2+4,f),b>f&&(r.value+=1,l.value=l.value===null?g:g-r.value)}),r.value>0&&l.value&&((p=a.value)==null||p.splice(l.value,0,{label:`+${r.value}`,removable:!1,selectable:!1,compact:n.compact}))},c=u=>{o("chip-closed",u)};return s.onMounted(()=>{a.value=n.items,d(),new ResizeObserver(()=>{d()}).observe(i.value)}),s.watch(()=>n.items,()=>{a.value=n.items,d()}),(u,f)=>(s.openBlock(),s.createElementBlock("div",{ref_key:"chipsContainer",ref:i,class:s.normalizeClass(["flex flex-wrap gap-4 items-center overflow-y-hidden",u.compact?"max-h-48":"max-h-64"])},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(a.value,(h,p)=>(s.openBlock(),s.createBlock(Sr,{key:p,label:h.label,icon:h.icon,selected:h.selected,removable:h.removable!==void 0?h.removable:u.removable,selectable:h.selectable!==void 0?h.selectable:u.selectable,disabled:h.disabled!==void 0?h.disabled:u.disabled,compact:u.compact,variant:h.variant,onChipClosed:m=>c(p)},null,8,["label","icon","selected","removable","selectable","disabled","compact","variant","onChipClosed"]))),128))],2))}}),Iu={class:"flex h-48 items-center justify-center w-48"},Mr=s.defineComponent({__name:"FmDialogContent",props:{modelValue:{type:Boolean,default:!1},minWidth:{default:280},closeButton:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(t,{emit:e}){const n=e,o=s.ref(null),i=s.ref(!1),r=s.ref(!1),l=d=>{const c=d.scrollHeight,u=d.scrollTop+d.clientHeight;r.value=c===u,i.value=d.scrollTop===0},a=d=>{d.stopPropagation();const c=d.target;l(c)};return s.watchEffect(()=>{o.value&&l(o.value)}),(d,c)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["fm-dialog",`min-w-[${d.minWidth}px] max-w-[560px] max-h-[600px]`])},[s.createElementVNode("div",{class:s.normalizeClass(["fm-dialog--header","flex items-center justify-between","fm-typo-title-sm-700 text-fm-color-typo-primary",!i.value&&"fm-shadow-light-300"])},[s.renderSlot(d.$slots,"dialog-header"),s.createElementVNode("div",Iu,[d.closeButton?(s.openBlock(),s.createBlock(j,{key:0,class:"cursor-pointer",name:"close",size:"md",onClick:c[0]||(c[0]=u=>n("update:modelValue",!1))})):s.createCommentVNode("",!0)])],2),s.createElementVNode("div",{ref_key:"contentRef",ref:o,class:"fm-dialog--content overflow-y-auto",onScrollPassive:a},[s.renderSlot(d.$slots,"default")],544),d.$slots["dialog-footer"]?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(["fm-dialog--footer","flex gap-8 items-center sm:flex-col-reverse xs:flex-col-reverse",!r.value&&"shadow-[0_-8px_16px_0px_rgba(199,199,204,0.24)]"])},[s.renderSlot(d.$slots,"dialog-footer")],2)):s.createCommentVNode("",!0)],2))}}),Tu=s.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(t,{emit:e}){const n=t,o=e,i=s.ref(null),r=a=>{n.overlay&&i.value&&a.target===i.value&&o("update:modelValue",!1)},l=document.body.style.overflow;return s.watch(()=>n.modelValue,a=>{a?document.body.style.overflow="hidden":document.body.style.overflow=l}),(a,d)=>(s.openBlock(),s.createBlock(s.Teleport,{to:"body"},[s.createVNode(s.Transition,{name:"fm-dialog"},{default:s.withCtx(()=>[a.modelValue?(s.openBlock(),s.createElementBlock("div",{key:0,ref_key:"overlayRef",ref:i,class:s.normalizeClass({"fm-dialog--container":!0,"fm-dialog--overlay":a.overlay}),onClick:d[1]||(d[1]=c=>r(c))},[s.createVNode(Mr,{"close-button":a.closeButton,"min-width":a.minWidth,"model-value":a.modelValue,"onUpdate:modelValue":d[0]||(d[0]=c=>o("update:modelValue",c))},{"dialog-header":s.withCtx(()=>[s.renderSlot(a.$slots,"dialog-header")]),"dialog-footer":s.withCtx(()=>[s.renderSlot(a.$slots,"dialog-footer")]),default:s.withCtx(()=>[s.renderSlot(a.$slots,"default")]),_:3},8,["close-button","min-width","model-value"])],2)):s.createCommentVNode("",!0)]),_:3})]))}}),Lu={class:"fm-drop-field"},zu=["accept","disabled"],Hu=K(s.defineComponent({__name:"FmDropField",props:{label:{default:""},disabled:{type:Boolean,default:!1},accept:{default:""},maxFileSize:{default:8e6}},emits:["file-upload","file-rejected"],setup(t,{emit:e}){const n=t,o=e,i=s.ref(!1),r=s.ref(),l=s.ref(),a=s.ref(),d=x=>{n.disabled||(x.stopPropagation(),x.preventDefault())},c=x=>{n.disabled||(x.stopPropagation(),x.preventDefault(),i.value=!0)},u=x=>{n.disabled||(x.stopPropagation(),x.preventDefault(),i.value=!1)},f=x=>{n.disabled||(x.stopPropagation(),x.preventDefault(),i.value=!1,h(x))},h=x=>{var D;a.value=((D=x.dataTransfer)==null?void 0:D.files)??x.target.files;const V=a.value;if(r.value=m(V[0]),l.value=g(V[0]),r.value&&l.value)o("file-upload",V[0]);else{const F=p();o("file-rejected",[{file:V[0],reason:F}])}},p=()=>{const x=[];return r.value||x.push("invalid-type"),l.value||x.push("invalid-size"),x},m=x=>{if(!n.accept)return!0;const V=n.accept.split(",").map(D=>D.trim());for(const D of V)if(y(D)){if($(D)===$(x.type))return!0}else if(b(x)===D||x.type===D)return!0;return!1},g=x=>x.size<=n.maxFileSize,y=x=>x.indexOf("*")!==-1,b=x=>"."+x.name.split(".").pop(),$=x=>x.substring(0,x.indexOf("/")),w=s.computed(()=>{if(i.value)return"Drop file to upload";if(r.value){if(!l.value)return`File size exceeds ${n.maxFileSize*1e-6}mb`}else return"File type is not valid";return""}),S=s.computed(()=>a.value?!r.value||!l.value:!1);return(x,V)=>(s.openBlock(),s.createElementBlock("label",Lu,[s.renderSlot(x.$slots,"label",{},()=>[s.createElementVNode("div",{class:s.normalizeClass(["fm-typo-body-lg-400",[x.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-primary"]])},s.toDisplayString(x.label),3)],!0),s.createElementVNode("div",{class:s.normalizeClass(["fm-drop-field__container",{"fm-drop-field__container--dragging":i.value,"fm-drop-field__container--invalid":S.value&&!x.disabled,"fm-drop-field__container--disabled":x.disabled}]),onDragenter:d,onDragover:c,onDragleave:u,onDrop:f},[(i.value||S.value)&&!x.disabled?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass({"fm-typo-body-lg-700":!0,"text-fm-color-primary":i.value,"text-fm-color-typo-error":S.value})},s.toDisplayString(w.value),3)):(s.openBlock(),s.createBlock(J,{key:1,label:"Add files",size:"md",variant:"secondary",disabled:x.disabled},null,8,["disabled"])),s.renderSlot(x.$slots,"accept-text",{},()=>[n.accept?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(["fm-typo-body-md-400",[x.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-secondary"]])},s.toDisplayString(`Accepts ${n.accept}`),3)):s.createCommentVNode("",!0)],!0),s.createElementVNode("input",{type:"file",class:"fm-drop-field__input",accept:x.accept,disabled:x.disabled,onChange:h},null,40,zu)],34),s.renderSlot(x.$slots,"helper-text",{},()=>[s.createElementVNode("div",{class:s.normalizeClass(["fm-typo-body-sm-400",[x.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-secondary"]])},s.toDisplayString(`Max size ${n.maxFileSize*1e-6}mb`),3)],!0)]))}}),[["__scopeId","data-v-c914dc32"]]),ju={},Wu={class:"flex-grow"};function Yu(t,e){return s.openBlock(),s.createElementBlock("div",Wu)}const Wt=K(ju,[["render",Yu]]),Uu={install:t=>{const e={currentDialog:{vNode:null,container:null},open:n=>{const o={primary:[],secondary:[],tertiary:[]},i={onPrimary:c=>(o.primary.push(c),i),onSecondary:c=>(o.secondary.push(c),i),onTertiary:c=>(o.tertiary.push(c),i)};function r(){e.close()}const l=document.createElement("div");document.body.appendChild(l);const a=s.markRaw(Dr),d=s.createVNode(a,{...n,unmount:r,storedFunctions:o});return d.appContext=t._context,s.render(d,l),e.currentDialog.vNode=d,e.currentDialog.container=l,i},close:()=>{const{vNode:n,container:o}=e.currentDialog;n===null&&o===null||(o&&s.render(null,o),e.currentDialog={vNode:null,container:null})}};t.config.globalProperties.$dialog=e,t.provide(_r,e)}},Gu={key:0,class:"block relative"},qu={key:1,class:"fm-typo-body-md-400 text-fm-color-neutral-black"},Dr=s.defineComponent({__name:"FmDynamicDialog",props:{title:{},message:{default:""},primaryActions:{default:null},secondaryActions:{default:null},tertiaryActions:{default:null},overlay:{type:Boolean,default:!0},closeButton:{type:Boolean,default:!0},minWidth:{default:280},dialogComponent:{default:null},contentComponent:{default:null},dialogComponentProps:{default:null},contentComponentProps:{default:null},unmount:{type:Function,default:()=>{}},storedFunctions:{default:null}},emits:["dialog-opened","dialog-closed"],setup(t,{emit:e}){const n=s.ref(!1),o=s.ref(),i=s.computed(()=>r.primaryActions||r.secondaryActions||r.tertiaryActions),r=t,l=e,a=s.ref(null),d=()=>{r.overlay&&(n.value=!1,setTimeout(()=>{r.unmount()},500))},c=f=>{a.value&&f.target===a.value&&d()},u=(f,h)=>{r.storedFunctions[h].forEach(p=>p(o.value)),f.close&&d()};return s.onMounted(()=>{l("dialog-opened"),n.value=!0}),s.onUnmounted(()=>{l("dialog-closed")}),(f,h)=>(s.openBlock(),s.createBlock(s.Transition,{name:"fm-dialog"},{default:s.withCtx(()=>[n.value?(s.openBlock(),s.createElementBlock("div",{key:0,ref_key:"overlayRef",ref:a,class:s.normalizeClass({"fm-dialog--container":!0,"fm-dialog--overlay":f.overlay,"pointer-events-none":!n.value}),onClick:c},[f.dialogComponent?(s.openBlock(),s.createElementBlock("div",Gu,[(s.openBlock(),s.createBlock(s.resolveDynamicComponent(f.dialogComponent),s.normalizeProps(s.guardReactiveProps(f.dialogComponentProps)),null,16)),f.closeButton?(s.openBlock(),s.createBlock(j,{key:0,class:"absolute cursor-pointer right-[12px] top-[18px]",name:"close",size:"md",onClick:d})):s.createCommentVNode("",!0)])):(s.openBlock(),s.createBlock(Mr,{key:1,modelValue:n.value,"onUpdate:modelValue":h[4]||(h[4]=p=>n.value=p),"close-button":f.closeButton,"min-width":f.minWidth},s.createSlots({"dialog-header":s.withCtx(()=>[s.createElementVNode("div",null,s.toDisplayString(f.title??"Notification"),1)]),default:s.withCtx(()=>[f.contentComponent?(s.openBlock(),s.createBlock(s.resolveDynamicComponent(f.contentComponent),s.mergeProps({key:0},f.contentComponentProps,{"onDialog:emitData":h[0]||(h[0]=p=>o.value=p)}),null,16)):(s.openBlock(),s.createElementBlock("div",qu,s.toDisplayString(f.message),1))]),_:2},[i.value?{name:"dialog-footer",fn:s.withCtx(()=>[f.tertiaryActions?(s.openBlock(),s.createBlock(J,{key:0,label:f.tertiaryActions.text,variant:f.tertiaryActions.variant??"tertiary",class:"sm:w-full xs:w-full",size:"md",onClick:h[1]||(h[1]=p=>u(f.tertiaryActions,"tertiary"))},null,8,["label","variant"])):s.createCommentVNode("",!0),s.createVNode(Wt,{class:"sm:hidden xs:hidden"}),f.secondaryActions?(s.openBlock(),s.createBlock(J,{key:1,label:f.secondaryActions.text,variant:f.secondaryActions.variant??"secondary",class:"sm:w-full xs:w-full",size:"md",onClick:h[2]||(h[2]=p=>u(f.secondaryActions,"secondary"))},null,8,["label","variant"])):s.createCommentVNode("",!0),f.primaryActions?(s.openBlock(),s.createBlock(J,{key:2,label:f.primaryActions.text,variant:f.primaryActions.variant??"primary",class:"sm:w-full xs:w-full",size:"md",onClick:h[3]||(h[3]=p=>u(f.primaryActions,"primary"))},null,8,["label","variant"])):s.createCommentVNode("",!0)]),key:"0"}:void 0]),1032,["modelValue","close-button","min-width"]))],2)):s.createCommentVNode("",!0)]),_:1}))}});/*!
10
10
  * @kurkle/color v0.3.2
11
11
  * https://github.com/kurkle/color#readme
12
12
  * (c) 2023 Jukka Kurkela
13
13
  * Released under the MIT License
14
- */function an(t){return t+.5|0}const ht=(t,e,n)=>Math.max(Math.min(t,n),e);function dn(t){return ht(an(t*2.55),0,255)}function pt(t){return ht(an(t*255),0,255)}function Ze(t){return ht(an(t/2.55)/100,0,1)}function Ds(t){return ht(an(t*100),0,100)}const Ae={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},$i=[..."0123456789ABCDEF"],Ju=t=>$i[t&15],Qu=t=>$i[(t&240)>>4]+$i[t&15],Qn=t=>(t&240)>>4===(t&15),ef=t=>Qn(t.r)&&Qn(t.g)&&Qn(t.b)&&Qn(t.a);function tf(t){var e=t.length,n;return t[0]==="#"&&(e===4||e===5?n={r:255&Ae[t[1]]*17,g:255&Ae[t[2]]*17,b:255&Ae[t[3]]*17,a:e===5?Ae[t[4]]*17:255}:(e===7||e===9)&&(n={r:Ae[t[1]]<<4|Ae[t[2]],g:Ae[t[3]]<<4|Ae[t[4]],b:Ae[t[5]]<<4|Ae[t[6]],a:e===9?Ae[t[7]]<<4|Ae[t[8]]:255})),n}const nf=(t,e)=>t<255?e(t):"";function of(t){var e=ef(t)?Ju:Qu;return t?"#"+e(t.r)+e(t.g)+e(t.b)+nf(t.a,e):void 0}const rf=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Es(t,e,n){const o=e*Math.min(n,1-n),i=(s,l=(s+t/30)%12)=>n-o*Math.max(Math.min(l-3,9-l,1),-1);return[i(0),i(8),i(4)]}function sf(t,e,n){const o=(i,s=(i+t/60)%6)=>n-n*e*Math.max(Math.min(s,4-s,1),0);return[o(5),o(3),o(1)]}function lf(t,e,n){const o=Es(t,1,.5);let i;for(e+n>1&&(i=1/(e+n),e*=i,n*=i),i=0;i<3;i++)o[i]*=1-e-n,o[i]+=e;return o}function af(t,e,n,o,i){return t===i?(e-n)/o+(e<n?6:0):e===i?(n-t)/o+2:(t-e)/o+4}function _i(t){const n=t.r/255,o=t.g/255,i=t.b/255,s=Math.max(n,o,i),l=Math.min(n,o,i),a=(s+l)/2;let d,c,u;return s!==l&&(u=s-l,c=a>.5?u/(2-s-l):u/(s+l),d=af(n,o,i,u,s),d=d*60+.5),[d|0,c||0,a]}function wi(t,e,n,o){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,n,o)).map(pt)}function Ci(t,e,n){return wi(Es,t,e,n)}function df(t,e,n){return wi(lf,t,e,n)}function cf(t,e,n){return wi(sf,t,e,n)}function Bs(t){return(t%360+360)%360}function uf(t){const e=rf.exec(t);let n=255,o;if(!e)return;e[5]!==o&&(n=e[6]?dn(+e[5]):pt(+e[5]));const i=Bs(+e[2]),s=+e[3]/100,l=+e[4]/100;return e[1]==="hwb"?o=df(i,s,l):e[1]==="hsv"?o=cf(i,s,l):o=Ci(i,s,l),{r:o[0],g:o[1],b:o[2],a:n}}function ff(t,e){var n=_i(t);n[0]=Bs(n[0]+e),n=Ci(n),t.r=n[0],t.g=n[1],t.b=n[2]}function hf(t){if(!t)return;const e=_i(t),n=e[0],o=Ds(e[1]),i=Ds(e[2]);return t.a<255?`hsla(${n}, ${o}%, ${i}%, ${Ze(t.a)})`:`hsl(${n}, ${o}%, ${i}%)`}const Vs={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"},Ps={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 pf(){const t={},e=Object.keys(Ps),n=Object.keys(Vs);let o,i,s,l,a;for(o=0;o<e.length;o++){for(l=a=e[o],i=0;i<n.length;i++)s=n[i],a=a.replace(s,Vs[s]);s=parseInt(Ps[l],16),t[a]=[s>>16&255,s>>8&255,s&255]}return t}let eo;function mf(t){eo||(eo=pf(),eo.transparent=[0,0,0,0]);const e=eo[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const gf=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function yf(t){const e=gf.exec(t);let n=255,o,i,s;if(e){if(e[7]!==o){const l=+e[7];n=e[8]?dn(l):ht(l*255,0,255)}return o=+e[1],i=+e[3],s=+e[5],o=255&(e[2]?dn(o):ht(o,0,255)),i=255&(e[4]?dn(i):ht(i,0,255)),s=255&(e[6]?dn(s):ht(s,0,255)),{r:o,g:i,b:s,a:n}}}function bf(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${Ze(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}const xi=t=>t<=.0031308?t*12.92:Math.pow(t,1/2.4)*1.055-.055,Yt=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function $f(t,e,n){const o=Yt(Ze(t.r)),i=Yt(Ze(t.g)),s=Yt(Ze(t.b));return{r:pt(xi(o+n*(Yt(Ze(e.r))-o))),g:pt(xi(i+n*(Yt(Ze(e.g))-i))),b:pt(xi(s+n*(Yt(Ze(e.b))-s))),a:t.a+n*(e.a-t.a)}}function to(t,e,n){if(t){let o=_i(t);o[e]=Math.max(0,Math.min(o[e]+o[e]*n,e===0?360:1)),o=Ci(o),t.r=o[0],t.g=o[1],t.b=o[2]}}function Rs(t,e){return t&&Object.assign(e||{},t)}function Fs(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=pt(t[3]))):(e=Rs(t,{r:0,g:0,b:0,a:1}),e.a=pt(e.a)),e}function _f(t){return t.charAt(0)==="r"?yf(t):uf(t)}class cn{constructor(e){if(e instanceof cn)return e;const n=typeof e;let o;n==="object"?o=Fs(e):n==="string"&&(o=tf(e)||mf(e)||_f(e)),this._rgb=o,this._valid=!!o}get valid(){return this._valid}get rgb(){var e=Rs(this._rgb);return e&&(e.a=Ze(e.a)),e}set rgb(e){this._rgb=Fs(e)}rgbString(){return this._valid?bf(this._rgb):void 0}hexString(){return this._valid?of(this._rgb):void 0}hslString(){return this._valid?hf(this._rgb):void 0}mix(e,n){if(e){const o=this.rgb,i=e.rgb;let s;const l=n===s?.5:n,a=2*l-1,d=o.a-i.a,c=((a*d===-1?a:(a+d)/(1+a*d))+1)/2;s=1-c,o.r=255&c*o.r+s*i.r+.5,o.g=255&c*o.g+s*i.g+.5,o.b=255&c*o.b+s*i.b+.5,o.a=l*o.a+(1-l)*i.a,this.rgb=o}return this}interpolate(e,n){return e&&(this._rgb=$f(this._rgb,e._rgb,n)),this}clone(){return new cn(this.rgb)}alpha(e){return this._rgb.a=pt(e),this}clearer(e){const n=this._rgb;return n.a*=1-e,this}greyscale(){const e=this._rgb,n=an(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=n,this}opaquer(e){const n=this._rgb;return n.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return to(this._rgb,2,e),this}darken(e){return to(this._rgb,2,-e),this}saturate(e){return to(this._rgb,1,e),this}desaturate(e){return to(this._rgb,1,-e),this}rotate(e){return ff(this._rgb,e),this}}/*!
14
+ */function an(t){return t+.5|0}const ht=(t,e,n)=>Math.max(Math.min(t,n),e);function dn(t){return ht(an(t*2.55),0,255)}function pt(t){return ht(an(t*255),0,255)}function Ze(t){return ht(an(t/2.55)/100,0,1)}function Er(t){return ht(an(t*100),0,100)}const Ae={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},$i=[..."0123456789ABCDEF"],Xu=t=>$i[t&15],Ku=t=>$i[(t&240)>>4]+$i[t&15],Qn=t=>(t&240)>>4===(t&15),Zu=t=>Qn(t.r)&&Qn(t.g)&&Qn(t.b)&&Qn(t.a);function Ju(t){var e=t.length,n;return t[0]==="#"&&(e===4||e===5?n={r:255&Ae[t[1]]*17,g:255&Ae[t[2]]*17,b:255&Ae[t[3]]*17,a:e===5?Ae[t[4]]*17:255}:(e===7||e===9)&&(n={r:Ae[t[1]]<<4|Ae[t[2]],g:Ae[t[3]]<<4|Ae[t[4]],b:Ae[t[5]]<<4|Ae[t[6]],a:e===9?Ae[t[7]]<<4|Ae[t[8]]:255})),n}const Qu=(t,e)=>t<255?e(t):"";function ef(t){var e=Zu(t)?Xu:Ku;return t?"#"+e(t.r)+e(t.g)+e(t.b)+Qu(t.a,e):void 0}const tf=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Br(t,e,n){const o=e*Math.min(n,1-n),i=(r,l=(r+t/30)%12)=>n-o*Math.max(Math.min(l-3,9-l,1),-1);return[i(0),i(8),i(4)]}function nf(t,e,n){const o=(i,r=(i+t/60)%6)=>n-n*e*Math.max(Math.min(r,4-r,1),0);return[o(5),o(3),o(1)]}function of(t,e,n){const o=Br(t,1,.5);let i;for(e+n>1&&(i=1/(e+n),e*=i,n*=i),i=0;i<3;i++)o[i]*=1-e-n,o[i]+=e;return o}function sf(t,e,n,o,i){return t===i?(e-n)/o+(e<n?6:0):e===i?(n-t)/o+2:(t-e)/o+4}function _i(t){const n=t.r/255,o=t.g/255,i=t.b/255,r=Math.max(n,o,i),l=Math.min(n,o,i),a=(r+l)/2;let d,c,u;return r!==l&&(u=r-l,c=a>.5?u/(2-r-l):u/(r+l),d=sf(n,o,i,u,r),d=d*60+.5),[d|0,c||0,a]}function wi(t,e,n,o){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,n,o)).map(pt)}function Ci(t,e,n){return wi(Br,t,e,n)}function rf(t,e,n){return wi(of,t,e,n)}function lf(t,e,n){return wi(nf,t,e,n)}function Vr(t){return(t%360+360)%360}function af(t){const e=tf.exec(t);let n=255,o;if(!e)return;e[5]!==o&&(n=e[6]?dn(+e[5]):pt(+e[5]));const i=Vr(+e[2]),r=+e[3]/100,l=+e[4]/100;return e[1]==="hwb"?o=rf(i,r,l):e[1]==="hsv"?o=lf(i,r,l):o=Ci(i,r,l),{r:o[0],g:o[1],b:o[2],a:n}}function df(t,e){var n=_i(t);n[0]=Vr(n[0]+e),n=Ci(n),t.r=n[0],t.g=n[1],t.b=n[2]}function cf(t){if(!t)return;const e=_i(t),n=e[0],o=Er(e[1]),i=Er(e[2]);return t.a<255?`hsla(${n}, ${o}%, ${i}%, ${Ze(t.a)})`:`hsl(${n}, ${o}%, ${i}%)`}const Pr={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"},Rr={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 uf(){const t={},e=Object.keys(Rr),n=Object.keys(Pr);let o,i,r,l,a;for(o=0;o<e.length;o++){for(l=a=e[o],i=0;i<n.length;i++)r=n[i],a=a.replace(r,Pr[r]);r=parseInt(Rr[l],16),t[a]=[r>>16&255,r>>8&255,r&255]}return t}let eo;function ff(t){eo||(eo=uf(),eo.transparent=[0,0,0,0]);const e=eo[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const hf=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function pf(t){const e=hf.exec(t);let n=255,o,i,r;if(e){if(e[7]!==o){const l=+e[7];n=e[8]?dn(l):ht(l*255,0,255)}return o=+e[1],i=+e[3],r=+e[5],o=255&(e[2]?dn(o):ht(o,0,255)),i=255&(e[4]?dn(i):ht(i,0,255)),r=255&(e[6]?dn(r):ht(r,0,255)),{r:o,g:i,b:r,a:n}}}function mf(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${Ze(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}const xi=t=>t<=.0031308?t*12.92:Math.pow(t,1/2.4)*1.055-.055,Yt=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function gf(t,e,n){const o=Yt(Ze(t.r)),i=Yt(Ze(t.g)),r=Yt(Ze(t.b));return{r:pt(xi(o+n*(Yt(Ze(e.r))-o))),g:pt(xi(i+n*(Yt(Ze(e.g))-i))),b:pt(xi(r+n*(Yt(Ze(e.b))-r))),a:t.a+n*(e.a-t.a)}}function to(t,e,n){if(t){let o=_i(t);o[e]=Math.max(0,Math.min(o[e]+o[e]*n,e===0?360:1)),o=Ci(o),t.r=o[0],t.g=o[1],t.b=o[2]}}function Fr(t,e){return t&&Object.assign(e||{},t)}function Nr(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=pt(t[3]))):(e=Fr(t,{r:0,g:0,b:0,a:1}),e.a=pt(e.a)),e}function yf(t){return t.charAt(0)==="r"?pf(t):af(t)}class cn{constructor(e){if(e instanceof cn)return e;const n=typeof e;let o;n==="object"?o=Nr(e):n==="string"&&(o=Ju(e)||ff(e)||yf(e)),this._rgb=o,this._valid=!!o}get valid(){return this._valid}get rgb(){var e=Fr(this._rgb);return e&&(e.a=Ze(e.a)),e}set rgb(e){this._rgb=Nr(e)}rgbString(){return this._valid?mf(this._rgb):void 0}hexString(){return this._valid?ef(this._rgb):void 0}hslString(){return this._valid?cf(this._rgb):void 0}mix(e,n){if(e){const o=this.rgb,i=e.rgb;let r;const l=n===r?.5:n,a=2*l-1,d=o.a-i.a,c=((a*d===-1?a:(a+d)/(1+a*d))+1)/2;r=1-c,o.r=255&c*o.r+r*i.r+.5,o.g=255&c*o.g+r*i.g+.5,o.b=255&c*o.b+r*i.b+.5,o.a=l*o.a+(1-l)*i.a,this.rgb=o}return this}interpolate(e,n){return e&&(this._rgb=gf(this._rgb,e._rgb,n)),this}clone(){return new cn(this.rgb)}alpha(e){return this._rgb.a=pt(e),this}clearer(e){const n=this._rgb;return n.a*=1-e,this}greyscale(){const e=this._rgb,n=an(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=n,this}opaquer(e){const n=this._rgb;return n.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return to(this._rgb,2,e),this}darken(e){return to(this._rgb,2,-e),this}saturate(e){return to(this._rgb,1,e),this}desaturate(e){return to(this._rgb,1,-e),this}rotate(e){return df(this._rgb,e),this}}/*!
15
15
  * Chart.js v4.4.2
16
16
  * https://www.chartjs.org
17
17
  * (c) 2024 Chart.js Contributors
18
18
  * Released under the MIT License
19
- */function Je(){}const wf=(()=>{let t=0;return()=>t++})();function X(t){return t===null||typeof t>"u"}function oe(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function q(t){return t!==null&&Object.prototype.toString.call(t)==="[object Object]"}function de(t){return(typeof t=="number"||t instanceof Number)&&isFinite(+t)}function De(t,e){return de(t)?t:e}function Y(t,e){return typeof t>"u"?e:t}const Cf=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100:+t/e,Ns=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100*e:+t;function ne(t,e,n){if(t&&typeof t.call=="function")return t.apply(n,e)}function ee(t,e,n,o){let i,s,l;if(oe(t))if(s=t.length,o)for(i=s-1;i>=0;i--)e.call(n,t[i],i);else for(i=0;i<s;i++)e.call(n,t[i],i);else if(q(t))for(l=Object.keys(t),s=l.length,i=0;i<s;i++)e.call(n,t[l[i]],l[i])}function no(t,e){let n,o,i,s;if(!t||!e||t.length!==e.length)return!1;for(n=0,o=t.length;n<o;++n)if(i=t[n],s=e[n],i.datasetIndex!==s.datasetIndex||i.index!==s.index)return!1;return!0}function oo(t){if(oe(t))return t.map(oo);if(q(t)){const e=Object.create(null),n=Object.keys(t),o=n.length;let i=0;for(;i<o;++i)e[n[i]]=oo(t[n[i]]);return e}return t}function As(t){return["__proto__","prototype","constructor"].indexOf(t)===-1}function xf(t,e,n,o){if(!As(t))return;const i=e[t],s=n[t];q(i)&&q(s)?un(i,s,o):e[t]=oo(s)}function un(t,e,n){const o=oe(e)?e:[e],i=o.length;if(!q(t))return t;n=n||{};const s=n.merger||xf;let l;for(let a=0;a<i;++a){if(l=o[a],!q(l))continue;const d=Object.keys(l);for(let c=0,u=d.length;c<u;++c)s(d[c],t,l,n)}return t}function fn(t,e){return un(t,e,{merger:kf})}function kf(t,e,n){if(!As(t))return;const o=e[t],i=n[t];q(o)&&q(i)?fn(o,i):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=oo(i))}const Os={"":t=>t,x:t=>t.x,y:t=>t.y};function Sf(t){const e=t.split("."),n=[];let o="";for(const i of e)o+=i,o.endsWith("\\")?o=o.slice(0,-1)+".":(n.push(o),o="");return n}function vf(t){const e=Sf(t);return n=>{for(const o of e){if(o==="")break;n=n&&n[o]}return n}}function mt(t,e){return(Os[e]||(Os[e]=vf(e)))(t)}function ki(t){return t.charAt(0).toUpperCase()+t.slice(1)}const hn=t=>typeof t<"u",gt=t=>typeof t=="function",Is=(t,e)=>{if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0};function Mf(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}const ie=Math.PI,re=2*ie,Df=re+ie,io=Number.POSITIVE_INFINITY,Ef=ie/180,ue=ie/2,Dt=ie/4,Ts=ie*2/3,yt=Math.log10,Ye=Math.sign;function pn(t,e,n){return Math.abs(t-e)<n}function Ls(t){const e=Math.round(t);t=pn(t,e,t/1e3)?e:t;const n=Math.pow(10,Math.floor(yt(t))),o=t/n;return(o<=1?1:o<=2?2:o<=5?5:10)*n}function Bf(t){const e=[],n=Math.sqrt(t);let o;for(o=1;o<n;o++)t%o===0&&(e.push(o),e.push(t/o));return n===(n|0)&&e.push(n),e.sort((i,s)=>i-s).pop(),e}function Ut(t){return!isNaN(parseFloat(t))&&isFinite(t)}function Vf(t,e){const n=Math.round(t);return n-e<=t&&n+e>=t}function zs(t,e,n){let o,i,s;for(o=0,i=t.length;o<i;o++)s=t[o][n],isNaN(s)||(e.min=Math.min(e.min,s),e.max=Math.max(e.max,s))}function Ie(t){return t*(ie/180)}function Si(t){return t*(180/ie)}function Hs(t){if(!de(t))return;let e=1,n=0;for(;Math.round(t*e)/e!==t;)e*=10,n++;return n}function js(t,e){const n=e.x-t.x,o=e.y-t.y,i=Math.sqrt(n*n+o*o);let s=Math.atan2(o,n);return s<-.5*ie&&(s+=re),{angle:s,distance:i}}function vi(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Pf(t,e){return(t-e+Df)%re-ie}function Ee(t){return(t%re+re)%re}function mn(t,e,n,o){const i=Ee(t),s=Ee(e),l=Ee(n),a=Ee(s-i),d=Ee(l-i),c=Ee(i-s),u=Ee(i-l);return i===s||i===l||o&&s===l||a>d&&c<u}function me(t,e,n){return Math.max(e,Math.min(n,t))}function Rf(t){return me(t,-32768,32767)}function Qe(t,e,n,o=1e-6){return t>=Math.min(e,n)-o&&t<=Math.max(e,n)+o}function Mi(t,e,n){n=n||(l=>t[l]<e);let o=t.length-1,i=0,s;for(;o-i>1;)s=i+o>>1,n(s)?i=s:o=s;return{lo:i,hi:o}}const et=(t,e,n,o)=>Mi(t,n,o?i=>{const s=t[i][e];return s<n||s===n&&t[i+1][e]===n}:i=>t[i][e]<n),Ff=(t,e,n)=>Mi(t,n,o=>t[o][e]>=n);function Nf(t,e,n){let o=0,i=t.length;for(;o<i&&t[o]<e;)o++;for(;i>o&&t[i-1]>n;)i--;return o>0||i<t.length?t.slice(o,i):t}const Ws=["push","pop","shift","splice","unshift"];function Af(t,e){if(t._chartjs){t._chartjs.listeners.push(e);return}Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),Ws.forEach(n=>{const o="_onData"+ki(n),i=t[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!1,value(...s){const l=i.apply(this,s);return t._chartjs.listeners.forEach(a=>{typeof a[o]=="function"&&a[o](...s)}),l}})})}function Ys(t,e){const n=t._chartjs;if(!n)return;const o=n.listeners,i=o.indexOf(e);i!==-1&&o.splice(i,1),!(o.length>0)&&(Ws.forEach(s=>{delete t[s]}),delete t._chartjs)}function Us(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const Gs=function(){return typeof window>"u"?function(t){return t()}:window.requestAnimationFrame}();function qs(t,e){let n=[],o=!1;return function(...i){n=i,o||(o=!0,Gs.call(window,()=>{o=!1,t.apply(e,n)}))}}function Of(t,e){let n;return function(...o){return e?(clearTimeout(n),n=setTimeout(t,e,o)):t.apply(this,o),e}}const Di=t=>t==="start"?"left":t==="end"?"right":"center",ye=(t,e,n)=>t==="start"?e:t==="end"?n:(e+n)/2,If=(t,e,n,o)=>t===(o?"left":"right")?n:t==="center"?(e+n)/2:e;function Xs(t,e,n){const o=e.length;let i=0,s=o;if(t._sorted){const{iScale:l,_parsed:a}=t,d=l.axis,{min:c,max:u,minDefined:f,maxDefined:h}=l.getUserBounds();f&&(i=me(Math.min(et(a,d,c).lo,n?o:et(e,d,l.getPixelForValue(c)).lo),0,o-1)),h?s=me(Math.max(et(a,l.axis,u,!0).hi+1,n?0:et(e,d,l.getPixelForValue(u),!0).hi+1),i,o)-i:s=o-i}return{start:i,count:s}}function Ks(t){const{xScale:e,yScale:n,_scaleRanges:o}=t,i={xmin:e.min,xmax:e.max,ymin:n.min,ymax:n.max};if(!o)return t._scaleRanges=i,!0;const s=o.xmin!==e.min||o.xmax!==e.max||o.ymin!==n.min||o.ymax!==n.max;return Object.assign(o,i),s}const ro=t=>t===0||t===1,Zs=(t,e,n)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-e)*re/n)),Js=(t,e,n)=>Math.pow(2,-10*t)*Math.sin((t-e)*re/n)+1,gn={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>-Math.cos(t*ue)+1,easeOutSine:t=>Math.sin(t*ue),easeInOutSine:t=>-.5*(Math.cos(ie*t)-1),easeInExpo:t=>t===0?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>t===1?1:-Math.pow(2,-10*t)+1,easeInOutExpo:t=>ro(t)?t:t<.5?.5*Math.pow(2,10*(t*2-1)):.5*(-Math.pow(2,-10*(t*2-1))+2),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>ro(t)?t:Zs(t,.075,.3),easeOutElastic:t=>ro(t)?t:Js(t,.075,.3),easeInOutElastic(t){return ro(t)?t:t<.5?.5*Zs(t*2,.1125,.45):.5+.5*Js(t*2-1,.1125,.45)},easeInBack(t){return t*t*((1.70158+1)*t-1.70158)},easeOutBack(t){return(t-=1)*t*((1.70158+1)*t+1.70158)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?.5*(t*t*(((e*=1.525)+1)*t-e)):.5*((t-=2)*t*(((e*=1.525)+1)*t+e)+2)},easeInBounce:t=>1-gn.easeOutBounce(1-t),easeOutBounce(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:t=>t<.5?gn.easeInBounce(t*2)*.5:gn.easeOutBounce(t*2-1)*.5+.5};function Ei(t){if(t&&typeof t=="object"){const e=t.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function Qs(t){return Ei(t)?t:new cn(t)}function Bi(t){return Ei(t)?t:new cn(t).saturate(.5).darken(.1).hexString()}const Tf=["x","y","borderWidth","radius","tension"],Lf=["color","borderColor","backgroundColor"];function zf(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>e!=="onProgress"&&e!=="onComplete"&&e!=="fn"}),t.set("animations",{colors:{type:"color",properties:Lf},numbers:{type:"number",properties:Tf}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:e=>e|0}}}})}function Hf(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const el=new Map;function jf(t,e){e=e||{};const n=t+JSON.stringify(e);let o=el.get(n);return o||(o=new Intl.NumberFormat(t,e),el.set(n,o)),o}function yn(t,e,n){return jf(e,n).format(t)}const tl={values(t){return oe(t)?t:""+t},numeric(t,e,n){if(t===0)return"0";const o=this.chart.options.locale;let i,s=t;if(n.length>1){const c=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(c<1e-4||c>1e15)&&(i="scientific"),s=Wf(t,n)}const l=yt(Math.abs(s)),a=isNaN(l)?1:Math.max(Math.min(-1*Math.floor(l),20),0),d={notation:i,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(d,this.options.ticks.format),yn(t,o,d)},logarithmic(t,e,n){if(t===0)return"0";const o=n[e].significand||t/Math.pow(10,Math.floor(yt(t)));return[1,2,3,5,10,15].includes(o)||e>.8*n.length?tl.numeric.call(this,t,e,n):""}};function Wf(t,e){let n=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(n)>=1&&t!==Math.floor(t)&&(n=t-Math.floor(t)),n}var so={formatters:tl};function Yf(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(e,n)=>n.lineWidth,tickColor:(e,n)=>n.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:so.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&e!=="callback"&&e!=="parser",_indexable:e=>e!=="borderDash"&&e!=="tickBorderDash"&&e!=="dash"}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:e=>e!=="backdropPadding"&&e!=="callback",_indexable:e=>e!=="backdropPadding"})}const Et=Object.create(null),Vi=Object.create(null);function bn(t,e){if(!e)return t;const n=e.split(".");for(let o=0,i=n.length;o<i;++o){const s=n[o];t=t[s]||(t[s]=Object.create(null))}return t}function Pi(t,e,n){return typeof e=="string"?un(bn(t,e),n):un(bn(t,""),e)}class Uf{constructor(e,n){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=o=>o.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=(o,i)=>Bi(i.backgroundColor),this.hoverBorderColor=(o,i)=>Bi(i.borderColor),this.hoverColor=(o,i)=>Bi(i.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(e),this.apply(n)}set(e,n){return Pi(this,e,n)}get(e){return bn(this,e)}describe(e,n){return Pi(Vi,e,n)}override(e,n){return Pi(Et,e,n)}route(e,n,o,i){const s=bn(this,e),l=bn(this,o),a="_"+n;Object.defineProperties(s,{[a]:{value:s[n],writable:!0},[n]:{enumerable:!0,get(){const d=this[a],c=l[i];return q(d)?Object.assign({},c,d):Y(d,c)},set(d){this[a]=d}}})}apply(e){e.forEach(n=>n(this))}}var ce=new Uf({_scriptable:t=>!t.startsWith("on"),_indexable:t=>t!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[zf,Hf,Yf]);function Gf(t){return!t||X(t.size)||X(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function lo(t,e,n,o,i){let s=e[i];return s||(s=e[i]=t.measureText(i).width,n.push(i)),s>o&&(o=s),o}function qf(t,e,n,o){o=o||{};let i=o.data=o.data||{},s=o.garbageCollect=o.garbageCollect||[];o.font!==e&&(i=o.data={},s=o.garbageCollect=[],o.font=e),t.save(),t.font=e;let l=0;const a=n.length;let d,c,u,f,h;for(d=0;d<a;d++)if(f=n[d],f!=null&&!oe(f))l=lo(t,i,s,l,f);else if(oe(f))for(c=0,u=f.length;c<u;c++)h=f[c],h!=null&&!oe(h)&&(l=lo(t,i,s,l,h));t.restore();const p=s.length/2;if(p>n.length){for(d=0;d<p;d++)delete i[s[d]];s.splice(0,p)}return l}function Bt(t,e,n){const o=t.currentDevicePixelRatio,i=n!==0?Math.max(n/2,.5):0;return Math.round((e-i)*o)/o+i}function nl(t,e){e=e||t.getContext("2d"),e.save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore()}function Ri(t,e,n,o){ol(t,e,n,o,null)}function ol(t,e,n,o,i){let s,l,a,d,c,u,f,h;const p=e.pointStyle,m=e.rotation,g=e.radius;let y=(m||0)*Ef;if(p&&typeof p=="object"&&(s=p.toString(),s==="[object HTMLImageElement]"||s==="[object HTMLCanvasElement]")){t.save(),t.translate(n,o),t.rotate(y),t.drawImage(p,-p.width/2,-p.height/2,p.width,p.height),t.restore();return}if(!(isNaN(g)||g<=0)){switch(t.beginPath(),p){default:i?t.ellipse(n,o,i/2,g,0,0,re):t.arc(n,o,g,0,re),t.closePath();break;case"triangle":u=i?i/2:g,t.moveTo(n+Math.sin(y)*u,o-Math.cos(y)*g),y+=Ts,t.lineTo(n+Math.sin(y)*u,o-Math.cos(y)*g),y+=Ts,t.lineTo(n+Math.sin(y)*u,o-Math.cos(y)*g),t.closePath();break;case"rectRounded":c=g*.516,d=g-c,l=Math.cos(y+Dt)*d,f=Math.cos(y+Dt)*(i?i/2-c:d),a=Math.sin(y+Dt)*d,h=Math.sin(y+Dt)*(i?i/2-c:d),t.arc(n-f,o-a,c,y-ie,y-ue),t.arc(n+h,o-l,c,y-ue,y),t.arc(n+f,o+a,c,y,y+ue),t.arc(n-h,o+l,c,y+ue,y+ie),t.closePath();break;case"rect":if(!m){d=Math.SQRT1_2*g,u=i?i/2:d,t.rect(n-u,o-d,2*u,2*d);break}y+=Dt;case"rectRot":f=Math.cos(y)*(i?i/2:g),l=Math.cos(y)*g,a=Math.sin(y)*g,h=Math.sin(y)*(i?i/2:g),t.moveTo(n-f,o-a),t.lineTo(n+h,o-l),t.lineTo(n+f,o+a),t.lineTo(n-h,o+l),t.closePath();break;case"crossRot":y+=Dt;case"cross":f=Math.cos(y)*(i?i/2:g),l=Math.cos(y)*g,a=Math.sin(y)*g,h=Math.sin(y)*(i?i/2:g),t.moveTo(n-f,o-a),t.lineTo(n+f,o+a),t.moveTo(n+h,o-l),t.lineTo(n-h,o+l);break;case"star":f=Math.cos(y)*(i?i/2:g),l=Math.cos(y)*g,a=Math.sin(y)*g,h=Math.sin(y)*(i?i/2:g),t.moveTo(n-f,o-a),t.lineTo(n+f,o+a),t.moveTo(n+h,o-l),t.lineTo(n-h,o+l),y+=Dt,f=Math.cos(y)*(i?i/2:g),l=Math.cos(y)*g,a=Math.sin(y)*g,h=Math.sin(y)*(i?i/2:g),t.moveTo(n-f,o-a),t.lineTo(n+f,o+a),t.moveTo(n+h,o-l),t.lineTo(n-h,o+l);break;case"line":l=i?i/2:Math.cos(y)*g,a=Math.sin(y)*g,t.moveTo(n-l,o-a),t.lineTo(n+l,o+a);break;case"dash":t.moveTo(n,o),t.lineTo(n+Math.cos(y)*(i?i/2:g),o+Math.sin(y)*g);break;case!1:t.closePath();break}t.fill(),e.borderWidth>0&&t.stroke()}}function tt(t,e,n){return n=n||.5,!e||t&&t.x>e.left-n&&t.x<e.right+n&&t.y>e.top-n&&t.y<e.bottom+n}function ao(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function co(t){t.restore()}function Xf(t,e,n,o,i){if(!e)return t.lineTo(n.x,n.y);if(i==="middle"){const s=(e.x+n.x)/2;t.lineTo(s,e.y),t.lineTo(s,n.y)}else i==="after"!=!!o?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y);t.lineTo(n.x,n.y)}function Kf(t,e,n,o){if(!e)return t.lineTo(n.x,n.y);t.bezierCurveTo(o?e.cp1x:e.cp2x,o?e.cp1y:e.cp2y,o?n.cp2x:n.cp1x,o?n.cp2y:n.cp1y,n.x,n.y)}function Zf(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),X(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}function Jf(t,e,n,o,i){if(i.strikethrough||i.underline){const s=t.measureText(o),l=e-s.actualBoundingBoxLeft,a=e+s.actualBoundingBoxRight,d=n-s.actualBoundingBoxAscent,c=n+s.actualBoundingBoxDescent,u=i.strikethrough?(d+c)/2:c;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=i.decorationWidth||2,t.moveTo(l,u),t.lineTo(a,u),t.stroke()}}function Qf(t,e){const n=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=n}function Vt(t,e,n,o,i,s={}){const l=oe(e)?e:[e],a=s.strokeWidth>0&&s.strokeColor!=="";let d,c;for(t.save(),t.font=i.string,Zf(t,s),d=0;d<l.length;++d)c=l[d],s.backdrop&&Qf(t,s.backdrop),a&&(s.strokeColor&&(t.strokeStyle=s.strokeColor),X(s.strokeWidth)||(t.lineWidth=s.strokeWidth),t.strokeText(c,n,o,s.maxWidth)),t.fillText(c,n,o,s.maxWidth),Jf(t,n,o,c,s),o+=Number(i.lineHeight);t.restore()}function $n(t,e){const{x:n,y:o,w:i,h:s,radius:l}=e;t.arc(n+l.topLeft,o+l.topLeft,l.topLeft,1.5*ie,ie,!0),t.lineTo(n,o+s-l.bottomLeft),t.arc(n+l.bottomLeft,o+s-l.bottomLeft,l.bottomLeft,ie,ue,!0),t.lineTo(n+i-l.bottomRight,o+s),t.arc(n+i-l.bottomRight,o+s-l.bottomRight,l.bottomRight,ue,0,!0),t.lineTo(n+i,o+l.topRight),t.arc(n+i-l.topRight,o+l.topRight,l.topRight,0,-ue,!0),t.lineTo(n+l.topLeft,o)}const eh=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,th=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function nh(t,e){const n=(""+t).match(eh);if(!n||n[1]==="normal")return e*1.2;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100;break}return e*t}const oh=t=>+t||0;function Fi(t,e){const n={},o=q(e),i=o?Object.keys(e):e,s=q(t)?o?l=>Y(t[l],t[e[l]]):l=>t[l]:()=>t;for(const l of i)n[l]=oh(s(l));return n}function il(t){return Fi(t,{top:"y",right:"x",bottom:"y",left:"x"})}function Pt(t){return Fi(t,["topLeft","topRight","bottomLeft","bottomRight"])}function be(t){const e=il(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function he(t,e){t=t||{},e=e||ce.font;let n=Y(t.size,e.size);typeof n=="string"&&(n=parseInt(n,10));let o=Y(t.style,e.style);o&&!(""+o).match(th)&&(console.warn('Invalid font style specified: "'+o+'"'),o=void 0);const i={family:Y(t.family,e.family),lineHeight:nh(Y(t.lineHeight,e.lineHeight),n),size:n,style:o,weight:Y(t.weight,e.weight),string:""};return i.string=Gf(i),i}function _n(t,e,n,o){let i=!0,s,l,a;for(s=0,l=t.length;s<l;++s)if(a=t[s],a!==void 0&&(e!==void 0&&typeof a=="function"&&(a=a(e),i=!1),n!==void 0&&oe(a)&&(a=a[n%a.length],i=!1),a!==void 0))return o&&!i&&(o.cacheable=!1),a}function ih(t,e,n){const{min:o,max:i}=t,s=Ns(e,(i-o)/2),l=(a,d)=>n&&a===0?0:a+d;return{min:l(o,-Math.abs(s)),max:l(i,s)}}function bt(t,e){return Object.assign(Object.create(t),e)}function Ni(t,e=[""],n,o,i=()=>t[0]){const s=n||t;typeof o>"u"&&(o=dl("_fallback",t));const l={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:s,_fallback:o,_getTarget:i,override:a=>Ni([a,...t],e,s,o)};return new Proxy(l,{deleteProperty(a,d){return delete a[d],delete a._keys,delete t[0][d],!0},get(a,d){return sl(a,d,()=>fh(d,e,t,a))},getOwnPropertyDescriptor(a,d){return Reflect.getOwnPropertyDescriptor(a._scopes[0],d)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(a,d){return cl(a).includes(d)},ownKeys(a){return cl(a)},set(a,d,c){const u=a._storage||(a._storage=i());return a[d]=u[d]=c,delete a._keys,!0}})}function Gt(t,e,n,o){const i={_cacheable:!1,_proxy:t,_context:e,_subProxy:n,_stack:new Set,_descriptors:rl(t,o),setContext:s=>Gt(t,s,n,o),override:s=>Gt(t.override(s),e,n,o)};return new Proxy(i,{deleteProperty(s,l){return delete s[l],delete t[l],!0},get(s,l,a){return sl(s,l,()=>sh(s,l,a))},getOwnPropertyDescriptor(s,l){return s._descriptors.allKeys?Reflect.has(t,l)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,l)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(s,l){return Reflect.has(t,l)},ownKeys(){return Reflect.ownKeys(t)},set(s,l,a){return t[l]=a,delete s[l],!0}})}function rl(t,e={scriptable:!0,indexable:!0}){const{_scriptable:n=e.scriptable,_indexable:o=e.indexable,_allKeys:i=e.allKeys}=t;return{allKeys:i,scriptable:n,indexable:o,isScriptable:gt(n)?n:()=>n,isIndexable:gt(o)?o:()=>o}}const rh=(t,e)=>t?t+ki(e):e,Ai=(t,e)=>q(e)&&t!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function sl(t,e,n){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];const o=n();return t[e]=o,o}function sh(t,e,n){const{_proxy:o,_context:i,_subProxy:s,_descriptors:l}=t;let a=o[e];return gt(a)&&l.isScriptable(e)&&(a=lh(e,a,t,n)),oe(a)&&a.length&&(a=ah(e,a,t,l.isIndexable)),Ai(e,a)&&(a=Gt(a,i,s&&s[e],l)),a}function lh(t,e,n,o){const{_proxy:i,_context:s,_subProxy:l,_stack:a}=n;if(a.has(t))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+t);a.add(t);let d=e(s,l||o);return a.delete(t),Ai(t,d)&&(d=Oi(i._scopes,i,t,d)),d}function ah(t,e,n,o){const{_proxy:i,_context:s,_subProxy:l,_descriptors:a}=n;if(typeof s.index<"u"&&o(t))return e[s.index%e.length];if(q(e[0])){const d=e,c=i._scopes.filter(u=>u!==d);e=[];for(const u of d){const f=Oi(c,i,t,u);e.push(Gt(f,s,l&&l[t],a))}}return e}function ll(t,e,n){return gt(t)?t(e,n):t}const dh=(t,e)=>t===!0?e:typeof t=="string"?mt(e,t):void 0;function ch(t,e,n,o,i){for(const s of e){const l=dh(n,s);if(l){t.add(l);const a=ll(l._fallback,n,i);if(typeof a<"u"&&a!==n&&a!==o)return a}else if(l===!1&&typeof o<"u"&&n!==o)return null}return!1}function Oi(t,e,n,o){const i=e._rootScopes,s=ll(e._fallback,n,o),l=[...t,...i],a=new Set;a.add(o);let d=al(a,l,n,s||n,o);return d===null||typeof s<"u"&&s!==n&&(d=al(a,l,s,d,o),d===null)?!1:Ni(Array.from(a),[""],i,s,()=>uh(e,n,o))}function al(t,e,n,o,i){for(;n;)n=ch(t,e,n,o,i);return n}function uh(t,e,n){const o=t._getTarget();e in o||(o[e]={});const i=o[e];return oe(i)&&q(n)?n:i||{}}function fh(t,e,n,o){let i;for(const s of e)if(i=dl(rh(s,t),n),typeof i<"u")return Ai(t,i)?Oi(n,o,t,i):i}function dl(t,e){for(const n of e){if(!n)continue;const o=n[t];if(typeof o<"u")return o}}function cl(t){let e=t._keys;return e||(e=t._keys=hh(t._scopes)),e}function hh(t){const e=new Set;for(const n of t)for(const o of Object.keys(n).filter(i=>!i.startsWith("_")))e.add(o);return Array.from(e)}function ul(t,e,n,o){const{iScale:i}=t,{key:s="r"}=this._parsing,l=new Array(o);let a,d,c,u;for(a=0,d=o;a<d;++a)c=a+n,u=e[c],l[a]={r:i.parse(mt(u,s),c)};return l}const ph=Number.EPSILON||1e-14,qt=(t,e)=>e<t.length&&!t[e].skip&&t[e],fl=t=>t==="x"?"y":"x";function mh(t,e,n,o){const i=t.skip?e:t,s=e,l=n.skip?e:n,a=vi(s,i),d=vi(l,s);let c=a/(a+d),u=d/(a+d);c=isNaN(c)?0:c,u=isNaN(u)?0:u;const f=o*c,h=o*u;return{previous:{x:s.x-f*(l.x-i.x),y:s.y-f*(l.y-i.y)},next:{x:s.x+h*(l.x-i.x),y:s.y+h*(l.y-i.y)}}}function gh(t,e,n){const o=t.length;let i,s,l,a,d,c=qt(t,0);for(let u=0;u<o-1;++u)if(d=c,c=qt(t,u+1),!(!d||!c)){if(pn(e[u],0,ph)){n[u]=n[u+1]=0;continue}i=n[u]/e[u],s=n[u+1]/e[u],a=Math.pow(i,2)+Math.pow(s,2),!(a<=9)&&(l=3/Math.sqrt(a),n[u]=i*l*e[u],n[u+1]=s*l*e[u])}}function yh(t,e,n="x"){const o=fl(n),i=t.length;let s,l,a,d=qt(t,0);for(let c=0;c<i;++c){if(l=a,a=d,d=qt(t,c+1),!a)continue;const u=a[n],f=a[o];l&&(s=(u-l[n])/3,a[`cp1${n}`]=u-s,a[`cp1${o}`]=f-s*e[c]),d&&(s=(d[n]-u)/3,a[`cp2${n}`]=u+s,a[`cp2${o}`]=f+s*e[c])}}function bh(t,e="x"){const n=fl(e),o=t.length,i=Array(o).fill(0),s=Array(o);let l,a,d,c=qt(t,0);for(l=0;l<o;++l)if(a=d,d=c,c=qt(t,l+1),!!d){if(c){const u=c[e]-d[e];i[l]=u!==0?(c[n]-d[n])/u:0}s[l]=a?c?Ye(i[l-1])!==Ye(i[l])?0:(i[l-1]+i[l])/2:i[l-1]:i[l]}gh(t,i,s),yh(t,s,e)}function uo(t,e,n){return Math.max(Math.min(t,n),e)}function $h(t,e){let n,o,i,s,l,a=tt(t[0],e);for(n=0,o=t.length;n<o;++n)l=s,s=a,a=n<o-1&&tt(t[n+1],e),s&&(i=t[n],l&&(i.cp1x=uo(i.cp1x,e.left,e.right),i.cp1y=uo(i.cp1y,e.top,e.bottom)),a&&(i.cp2x=uo(i.cp2x,e.left,e.right),i.cp2y=uo(i.cp2y,e.top,e.bottom)))}function _h(t,e,n,o,i){let s,l,a,d;if(e.spanGaps&&(t=t.filter(c=>!c.skip)),e.cubicInterpolationMode==="monotone")bh(t,i);else{let c=o?t[t.length-1]:t[0];for(s=0,l=t.length;s<l;++s)a=t[s],d=mh(c,a,t[Math.min(s+1,l-(o?0:1))%l],e.tension),a.cp1x=d.previous.x,a.cp1y=d.previous.y,a.cp2x=d.next.x,a.cp2y=d.next.y,c=a}e.capBezierPoints&&$h(t,n)}function Ii(){return typeof window<"u"&&typeof document<"u"}function Ti(t){let e=t.parentNode;return e&&e.toString()==="[object ShadowRoot]"&&(e=e.host),e}function fo(t,e,n){let o;return typeof t=="string"?(o=parseInt(t,10),t.indexOf("%")!==-1&&(o=o/100*e.parentNode[n])):o=t,o}const ho=t=>t.ownerDocument.defaultView.getComputedStyle(t,null);function wh(t,e){return ho(t).getPropertyValue(e)}const Ch=["top","right","bottom","left"];function Rt(t,e,n){const o={};n=n?"-"+n:"";for(let i=0;i<4;i++){const s=Ch[i];o[s]=parseFloat(t[e+"-"+s+n])||0}return o.width=o.left+o.right,o.height=o.top+o.bottom,o}const xh=(t,e,n)=>(t>0||e>0)&&(!n||!n.shadowRoot);function kh(t,e){const n=t.touches,o=n&&n.length?n[0]:t,{offsetX:i,offsetY:s}=o;let l=!1,a,d;if(xh(i,s,t.target))a=i,d=s;else{const c=e.getBoundingClientRect();a=o.clientX-c.left,d=o.clientY-c.top,l=!0}return{x:a,y:d,box:l}}function Ft(t,e){if("native"in t)return t;const{canvas:n,currentDevicePixelRatio:o}=e,i=ho(n),s=i.boxSizing==="border-box",l=Rt(i,"padding"),a=Rt(i,"border","width"),{x:d,y:c,box:u}=kh(t,n),f=l.left+(u&&a.left),h=l.top+(u&&a.top);let{width:p,height:m}=e;return s&&(p-=l.width+a.width,m-=l.height+a.height),{x:Math.round((d-f)/p*n.width/o),y:Math.round((c-h)/m*n.height/o)}}function Sh(t,e,n){let o,i;if(e===void 0||n===void 0){const s=Ti(t);if(!s)e=t.clientWidth,n=t.clientHeight;else{const l=s.getBoundingClientRect(),a=ho(s),d=Rt(a,"border","width"),c=Rt(a,"padding");e=l.width-c.width-d.width,n=l.height-c.height-d.height,o=fo(a.maxWidth,s,"clientWidth"),i=fo(a.maxHeight,s,"clientHeight")}}return{width:e,height:n,maxWidth:o||io,maxHeight:i||io}}const po=t=>Math.round(t*10)/10;function vh(t,e,n,o){const i=ho(t),s=Rt(i,"margin"),l=fo(i.maxWidth,t,"clientWidth")||io,a=fo(i.maxHeight,t,"clientHeight")||io,d=Sh(t,e,n);let{width:c,height:u}=d;if(i.boxSizing==="content-box"){const h=Rt(i,"border","width"),p=Rt(i,"padding");c-=p.width+h.width,u-=p.height+h.height}return c=Math.max(0,c-s.width),u=Math.max(0,o?c/o:u-s.height),c=po(Math.min(c,l,d.maxWidth)),u=po(Math.min(u,a,d.maxHeight)),c&&!u&&(u=po(c/2)),(e!==void 0||n!==void 0)&&o&&d.height&&u>d.height&&(u=d.height,c=po(Math.floor(u*o))),{width:c,height:u}}function hl(t,e,n){const o=e||1,i=Math.floor(t.height*o),s=Math.floor(t.width*o);t.height=Math.floor(t.height),t.width=Math.floor(t.width);const l=t.canvas;return l.style&&(n||!l.style.height&&!l.style.width)&&(l.style.height=`${t.height}px`,l.style.width=`${t.width}px`),t.currentDevicePixelRatio!==o||l.height!==i||l.width!==s?(t.currentDevicePixelRatio=o,l.height=i,l.width=s,t.ctx.setTransform(o,0,0,o,0,0),!0):!1}const Mh=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};Ii()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch{}return t}();function pl(t,e){const n=wh(t,e),o=n&&n.match(/^(\d+)(\.\d+)?px$/);return o?+o[1]:void 0}function Nt(t,e,n,o){return{x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}}function Dh(t,e,n,o){return{x:t.x+n*(e.x-t.x),y:o==="middle"?n<.5?t.y:e.y:o==="after"?n<1?t.y:e.y:n>0?e.y:t.y}}function Eh(t,e,n,o){const i={x:t.cp2x,y:t.cp2y},s={x:e.cp1x,y:e.cp1y},l=Nt(t,i,n),a=Nt(i,s,n),d=Nt(s,e,n),c=Nt(l,a,n),u=Nt(a,d,n);return Nt(c,u,n)}const Bh=function(t,e){return{x(n){return t+t+e-n},setWidth(n){e=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,o){return n-o},leftForLtr(n,o){return n-o}}},Vh=function(){return{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,e){return t+e},leftForLtr(t,e){return t}}};function Xt(t,e,n){return t?Bh(e,n):Vh()}function ml(t,e){let n,o;(e==="ltr"||e==="rtl")&&(n=t.canvas.style,o=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=o)}function gl(t,e){e!==void 0&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function yl(t){return t==="angle"?{between:mn,compare:Pf,normalize:Ee}:{between:Qe,compare:(e,n)=>e-n,normalize:e=>e}}function bl({start:t,end:e,count:n,loop:o,style:i}){return{start:t%n,end:e%n,loop:o&&(e-t+1)%n===0,style:i}}function Ph(t,e,n){const{property:o,start:i,end:s}=n,{between:l,normalize:a}=yl(o),d=e.length;let{start:c,end:u,loop:f}=t,h,p;if(f){for(c+=d,u+=d,h=0,p=d;h<p&&l(a(e[c%d][o]),i,s);++h)c--,u--;c%=d,u%=d}return u<c&&(u+=d),{start:c,end:u,loop:f,style:t.style}}function $l(t,e,n){if(!n)return[t];const{property:o,start:i,end:s}=n,l=e.length,{compare:a,between:d,normalize:c}=yl(o),{start:u,end:f,loop:h,style:p}=Ph(t,e,n),m=[];let g=!1,y=null,b,$,x;const S=()=>d(i,x,b)&&a(i,x)!==0,C=()=>a(s,b)===0||d(s,x,b),V=()=>g||S(),E=()=>!g||C();for(let F=u,N=u;F<=f;++F)$=e[F%l],!$.skip&&(b=c($[o]),b!==x&&(g=d(b,i,s),y===null&&V()&&(y=a(b,i)===0?F:N),y!==null&&E()&&(m.push(bl({start:y,end:F,loop:h,count:l,style:p})),y=null),N=F,x=b));return y!==null&&m.push(bl({start:y,end:f,loop:h,count:l,style:p})),m}function _l(t,e){const n=[],o=t.segments;for(let i=0;i<o.length;i++){const s=$l(o[i],t.points,e);s.length&&n.push(...s)}return n}function Rh(t,e,n,o){let i=0,s=e-1;if(n&&!o)for(;i<e&&!t[i].skip;)i++;for(;i<e&&t[i].skip;)i++;for(i%=e,n&&(s+=i);s>i&&t[s%e].skip;)s--;return s%=e,{start:i,end:s}}function Fh(t,e,n,o){const i=t.length,s=[];let l=e,a=t[e],d;for(d=e+1;d<=n;++d){const c=t[d%i];c.skip||c.stop?a.skip||(o=!1,s.push({start:e%i,end:(d-1)%i,loop:o}),e=l=c.stop?d:null):(l=d,a.skip&&(e=d)),a=c}return l!==null&&s.push({start:e%i,end:l%i,loop:o}),s}function Nh(t,e){const n=t.points,o=t.options.spanGaps,i=n.length;if(!i)return[];const s=!!t._loop,{start:l,end:a}=Rh(n,i,s,o);if(o===!0)return wl(t,[{start:l,end:a,loop:s}],n,e);const d=a<l?a+i:a,c=!!t._fullLoop&&l===0&&a===i-1;return wl(t,Fh(n,l,d,c),n,e)}function wl(t,e,n,o){return!o||!o.setContext||!n?e:Ah(t,e,n,o)}function Ah(t,e,n,o){const i=t._chart.getContext(),s=Cl(t.options),{_datasetIndex:l,options:{spanGaps:a}}=t,d=n.length,c=[];let u=s,f=e[0].start,h=f;function p(m,g,y,b){const $=a?-1:1;if(m!==g){for(m+=d;n[m%d].skip;)m-=$;for(;n[g%d].skip;)g+=$;m%d!==g%d&&(c.push({start:m%d,end:g%d,loop:y,style:b}),u=b,f=g%d)}}for(const m of e){f=a?f:m.start;let g=n[f%d],y;for(h=f+1;h<=m.end;h++){const b=n[h%d];y=Cl(o.setContext(bt(i,{type:"segment",p0:g,p1:b,p0DataIndex:(h-1)%d,p1DataIndex:h%d,datasetIndex:l}))),Oh(y,u)&&p(f,h-1,m.loop,u),g=b,u=y}f<h-1&&p(f,h-1,m.loop,u)}return c}function Cl(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function Oh(t,e){if(!e)return!1;const n=[],o=function(i,s){return Ei(s)?(n.includes(s)||n.push(s),n.indexOf(s)):s};return JSON.stringify(t,o)!==JSON.stringify(e,o)}/*!
19
+ */function Je(){}const bf=(()=>{let t=0;return()=>t++})();function X(t){return t===null||typeof t>"u"}function oe(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function q(t){return t!==null&&Object.prototype.toString.call(t)==="[object Object]"}function de(t){return(typeof t=="number"||t instanceof Number)&&isFinite(+t)}function De(t,e){return de(t)?t:e}function Y(t,e){return typeof t>"u"?e:t}const $f=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100:+t/e,Ar=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100*e:+t;function ne(t,e,n){if(t&&typeof t.call=="function")return t.apply(n,e)}function ee(t,e,n,o){let i,r,l;if(oe(t))if(r=t.length,o)for(i=r-1;i>=0;i--)e.call(n,t[i],i);else for(i=0;i<r;i++)e.call(n,t[i],i);else if(q(t))for(l=Object.keys(t),r=l.length,i=0;i<r;i++)e.call(n,t[l[i]],l[i])}function no(t,e){let n,o,i,r;if(!t||!e||t.length!==e.length)return!1;for(n=0,o=t.length;n<o;++n)if(i=t[n],r=e[n],i.datasetIndex!==r.datasetIndex||i.index!==r.index)return!1;return!0}function oo(t){if(oe(t))return t.map(oo);if(q(t)){const e=Object.create(null),n=Object.keys(t),o=n.length;let i=0;for(;i<o;++i)e[n[i]]=oo(t[n[i]]);return e}return t}function Or(t){return["__proto__","prototype","constructor"].indexOf(t)===-1}function _f(t,e,n,o){if(!Or(t))return;const i=e[t],r=n[t];q(i)&&q(r)?un(i,r,o):e[t]=oo(r)}function un(t,e,n){const o=oe(e)?e:[e],i=o.length;if(!q(t))return t;n=n||{};const r=n.merger||_f;let l;for(let a=0;a<i;++a){if(l=o[a],!q(l))continue;const d=Object.keys(l);for(let c=0,u=d.length;c<u;++c)r(d[c],t,l,n)}return t}function fn(t,e){return un(t,e,{merger:wf})}function wf(t,e,n){if(!Or(t))return;const o=e[t],i=n[t];q(o)&&q(i)?fn(o,i):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=oo(i))}const Ir={"":t=>t,x:t=>t.x,y:t=>t.y};function Cf(t){const e=t.split("."),n=[];let o="";for(const i of e)o+=i,o.endsWith("\\")?o=o.slice(0,-1)+".":(n.push(o),o="");return n}function xf(t){const e=Cf(t);return n=>{for(const o of e){if(o==="")break;n=n&&n[o]}return n}}function mt(t,e){return(Ir[e]||(Ir[e]=xf(e)))(t)}function ki(t){return t.charAt(0).toUpperCase()+t.slice(1)}const hn=t=>typeof t<"u",gt=t=>typeof t=="function",Tr=(t,e)=>{if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0};function kf(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}const ie=Math.PI,se=2*ie,Sf=se+ie,io=Number.POSITIVE_INFINITY,vf=ie/180,ue=ie/2,Dt=ie/4,Lr=ie*2/3,yt=Math.log10,Ye=Math.sign;function pn(t,e,n){return Math.abs(t-e)<n}function zr(t){const e=Math.round(t);t=pn(t,e,t/1e3)?e:t;const n=Math.pow(10,Math.floor(yt(t))),o=t/n;return(o<=1?1:o<=2?2:o<=5?5:10)*n}function Mf(t){const e=[],n=Math.sqrt(t);let o;for(o=1;o<n;o++)t%o===0&&(e.push(o),e.push(t/o));return n===(n|0)&&e.push(n),e.sort((i,r)=>i-r).pop(),e}function Ut(t){return!isNaN(parseFloat(t))&&isFinite(t)}function Df(t,e){const n=Math.round(t);return n-e<=t&&n+e>=t}function Hr(t,e,n){let o,i,r;for(o=0,i=t.length;o<i;o++)r=t[o][n],isNaN(r)||(e.min=Math.min(e.min,r),e.max=Math.max(e.max,r))}function Ie(t){return t*(ie/180)}function Si(t){return t*(180/ie)}function jr(t){if(!de(t))return;let e=1,n=0;for(;Math.round(t*e)/e!==t;)e*=10,n++;return n}function Wr(t,e){const n=e.x-t.x,o=e.y-t.y,i=Math.sqrt(n*n+o*o);let r=Math.atan2(o,n);return r<-.5*ie&&(r+=se),{angle:r,distance:i}}function vi(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Ef(t,e){return(t-e+Sf)%se-ie}function Ee(t){return(t%se+se)%se}function mn(t,e,n,o){const i=Ee(t),r=Ee(e),l=Ee(n),a=Ee(r-i),d=Ee(l-i),c=Ee(i-r),u=Ee(i-l);return i===r||i===l||o&&r===l||a>d&&c<u}function me(t,e,n){return Math.max(e,Math.min(n,t))}function Bf(t){return me(t,-32768,32767)}function Qe(t,e,n,o=1e-6){return t>=Math.min(e,n)-o&&t<=Math.max(e,n)+o}function Mi(t,e,n){n=n||(l=>t[l]<e);let o=t.length-1,i=0,r;for(;o-i>1;)r=i+o>>1,n(r)?i=r:o=r;return{lo:i,hi:o}}const et=(t,e,n,o)=>Mi(t,n,o?i=>{const r=t[i][e];return r<n||r===n&&t[i+1][e]===n}:i=>t[i][e]<n),Vf=(t,e,n)=>Mi(t,n,o=>t[o][e]>=n);function Pf(t,e,n){let o=0,i=t.length;for(;o<i&&t[o]<e;)o++;for(;i>o&&t[i-1]>n;)i--;return o>0||i<t.length?t.slice(o,i):t}const Yr=["push","pop","shift","splice","unshift"];function Rf(t,e){if(t._chartjs){t._chartjs.listeners.push(e);return}Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),Yr.forEach(n=>{const o="_onData"+ki(n),i=t[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!1,value(...r){const l=i.apply(this,r);return t._chartjs.listeners.forEach(a=>{typeof a[o]=="function"&&a[o](...r)}),l}})})}function Ur(t,e){const n=t._chartjs;if(!n)return;const o=n.listeners,i=o.indexOf(e);i!==-1&&o.splice(i,1),!(o.length>0)&&(Yr.forEach(r=>{delete t[r]}),delete t._chartjs)}function Gr(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const qr=function(){return typeof window>"u"?function(t){return t()}:window.requestAnimationFrame}();function Xr(t,e){let n=[],o=!1;return function(...i){n=i,o||(o=!0,qr.call(window,()=>{o=!1,t.apply(e,n)}))}}function Ff(t,e){let n;return function(...o){return e?(clearTimeout(n),n=setTimeout(t,e,o)):t.apply(this,o),e}}const Di=t=>t==="start"?"left":t==="end"?"right":"center",ye=(t,e,n)=>t==="start"?e:t==="end"?n:(e+n)/2,Nf=(t,e,n,o)=>t===(o?"left":"right")?n:t==="center"?(e+n)/2:e;function Kr(t,e,n){const o=e.length;let i=0,r=o;if(t._sorted){const{iScale:l,_parsed:a}=t,d=l.axis,{min:c,max:u,minDefined:f,maxDefined:h}=l.getUserBounds();f&&(i=me(Math.min(et(a,d,c).lo,n?o:et(e,d,l.getPixelForValue(c)).lo),0,o-1)),h?r=me(Math.max(et(a,l.axis,u,!0).hi+1,n?0:et(e,d,l.getPixelForValue(u),!0).hi+1),i,o)-i:r=o-i}return{start:i,count:r}}function Zr(t){const{xScale:e,yScale:n,_scaleRanges:o}=t,i={xmin:e.min,xmax:e.max,ymin:n.min,ymax:n.max};if(!o)return t._scaleRanges=i,!0;const r=o.xmin!==e.min||o.xmax!==e.max||o.ymin!==n.min||o.ymax!==n.max;return Object.assign(o,i),r}const so=t=>t===0||t===1,Jr=(t,e,n)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-e)*se/n)),Qr=(t,e,n)=>Math.pow(2,-10*t)*Math.sin((t-e)*se/n)+1,gn={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>-Math.cos(t*ue)+1,easeOutSine:t=>Math.sin(t*ue),easeInOutSine:t=>-.5*(Math.cos(ie*t)-1),easeInExpo:t=>t===0?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>t===1?1:-Math.pow(2,-10*t)+1,easeInOutExpo:t=>so(t)?t:t<.5?.5*Math.pow(2,10*(t*2-1)):.5*(-Math.pow(2,-10*(t*2-1))+2),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>so(t)?t:Jr(t,.075,.3),easeOutElastic:t=>so(t)?t:Qr(t,.075,.3),easeInOutElastic(t){return so(t)?t:t<.5?.5*Jr(t*2,.1125,.45):.5+.5*Qr(t*2-1,.1125,.45)},easeInBack(t){return t*t*((1.70158+1)*t-1.70158)},easeOutBack(t){return(t-=1)*t*((1.70158+1)*t+1.70158)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?.5*(t*t*(((e*=1.525)+1)*t-e)):.5*((t-=2)*t*(((e*=1.525)+1)*t+e)+2)},easeInBounce:t=>1-gn.easeOutBounce(1-t),easeOutBounce(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:t=>t<.5?gn.easeInBounce(t*2)*.5:gn.easeOutBounce(t*2-1)*.5+.5};function Ei(t){if(t&&typeof t=="object"){const e=t.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function el(t){return Ei(t)?t:new cn(t)}function Bi(t){return Ei(t)?t:new cn(t).saturate(.5).darken(.1).hexString()}const Af=["x","y","borderWidth","radius","tension"],Of=["color","borderColor","backgroundColor"];function If(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>e!=="onProgress"&&e!=="onComplete"&&e!=="fn"}),t.set("animations",{colors:{type:"color",properties:Of},numbers:{type:"number",properties:Af}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:e=>e|0}}}})}function Tf(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const tl=new Map;function Lf(t,e){e=e||{};const n=t+JSON.stringify(e);let o=tl.get(n);return o||(o=new Intl.NumberFormat(t,e),tl.set(n,o)),o}function yn(t,e,n){return Lf(e,n).format(t)}const nl={values(t){return oe(t)?t:""+t},numeric(t,e,n){if(t===0)return"0";const o=this.chart.options.locale;let i,r=t;if(n.length>1){const c=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(c<1e-4||c>1e15)&&(i="scientific"),r=zf(t,n)}const l=yt(Math.abs(r)),a=isNaN(l)?1:Math.max(Math.min(-1*Math.floor(l),20),0),d={notation:i,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(d,this.options.ticks.format),yn(t,o,d)},logarithmic(t,e,n){if(t===0)return"0";const o=n[e].significand||t/Math.pow(10,Math.floor(yt(t)));return[1,2,3,5,10,15].includes(o)||e>.8*n.length?nl.numeric.call(this,t,e,n):""}};function zf(t,e){let n=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(n)>=1&&t!==Math.floor(t)&&(n=t-Math.floor(t)),n}var ro={formatters:nl};function Hf(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(e,n)=>n.lineWidth,tickColor:(e,n)=>n.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:ro.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&e!=="callback"&&e!=="parser",_indexable:e=>e!=="borderDash"&&e!=="tickBorderDash"&&e!=="dash"}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:e=>e!=="backdropPadding"&&e!=="callback",_indexable:e=>e!=="backdropPadding"})}const Et=Object.create(null),Vi=Object.create(null);function bn(t,e){if(!e)return t;const n=e.split(".");for(let o=0,i=n.length;o<i;++o){const r=n[o];t=t[r]||(t[r]=Object.create(null))}return t}function Pi(t,e,n){return typeof e=="string"?un(bn(t,e),n):un(bn(t,""),e)}class jf{constructor(e,n){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=o=>o.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=(o,i)=>Bi(i.backgroundColor),this.hoverBorderColor=(o,i)=>Bi(i.borderColor),this.hoverColor=(o,i)=>Bi(i.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(e),this.apply(n)}set(e,n){return Pi(this,e,n)}get(e){return bn(this,e)}describe(e,n){return Pi(Vi,e,n)}override(e,n){return Pi(Et,e,n)}route(e,n,o,i){const r=bn(this,e),l=bn(this,o),a="_"+n;Object.defineProperties(r,{[a]:{value:r[n],writable:!0},[n]:{enumerable:!0,get(){const d=this[a],c=l[i];return q(d)?Object.assign({},c,d):Y(d,c)},set(d){this[a]=d}}})}apply(e){e.forEach(n=>n(this))}}var ce=new jf({_scriptable:t=>!t.startsWith("on"),_indexable:t=>t!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[If,Tf,Hf]);function Wf(t){return!t||X(t.size)||X(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function lo(t,e,n,o,i){let r=e[i];return r||(r=e[i]=t.measureText(i).width,n.push(i)),r>o&&(o=r),o}function Yf(t,e,n,o){o=o||{};let i=o.data=o.data||{},r=o.garbageCollect=o.garbageCollect||[];o.font!==e&&(i=o.data={},r=o.garbageCollect=[],o.font=e),t.save(),t.font=e;let l=0;const a=n.length;let d,c,u,f,h;for(d=0;d<a;d++)if(f=n[d],f!=null&&!oe(f))l=lo(t,i,r,l,f);else if(oe(f))for(c=0,u=f.length;c<u;c++)h=f[c],h!=null&&!oe(h)&&(l=lo(t,i,r,l,h));t.restore();const p=r.length/2;if(p>n.length){for(d=0;d<p;d++)delete i[r[d]];r.splice(0,p)}return l}function Bt(t,e,n){const o=t.currentDevicePixelRatio,i=n!==0?Math.max(n/2,.5):0;return Math.round((e-i)*o)/o+i}function ol(t,e){e=e||t.getContext("2d"),e.save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore()}function Ri(t,e,n,o){il(t,e,n,o,null)}function il(t,e,n,o,i){let r,l,a,d,c,u,f,h;const p=e.pointStyle,m=e.rotation,g=e.radius;let y=(m||0)*vf;if(p&&typeof p=="object"&&(r=p.toString(),r==="[object HTMLImageElement]"||r==="[object HTMLCanvasElement]")){t.save(),t.translate(n,o),t.rotate(y),t.drawImage(p,-p.width/2,-p.height/2,p.width,p.height),t.restore();return}if(!(isNaN(g)||g<=0)){switch(t.beginPath(),p){default:i?t.ellipse(n,o,i/2,g,0,0,se):t.arc(n,o,g,0,se),t.closePath();break;case"triangle":u=i?i/2:g,t.moveTo(n+Math.sin(y)*u,o-Math.cos(y)*g),y+=Lr,t.lineTo(n+Math.sin(y)*u,o-Math.cos(y)*g),y+=Lr,t.lineTo(n+Math.sin(y)*u,o-Math.cos(y)*g),t.closePath();break;case"rectRounded":c=g*.516,d=g-c,l=Math.cos(y+Dt)*d,f=Math.cos(y+Dt)*(i?i/2-c:d),a=Math.sin(y+Dt)*d,h=Math.sin(y+Dt)*(i?i/2-c:d),t.arc(n-f,o-a,c,y-ie,y-ue),t.arc(n+h,o-l,c,y-ue,y),t.arc(n+f,o+a,c,y,y+ue),t.arc(n-h,o+l,c,y+ue,y+ie),t.closePath();break;case"rect":if(!m){d=Math.SQRT1_2*g,u=i?i/2:d,t.rect(n-u,o-d,2*u,2*d);break}y+=Dt;case"rectRot":f=Math.cos(y)*(i?i/2:g),l=Math.cos(y)*g,a=Math.sin(y)*g,h=Math.sin(y)*(i?i/2:g),t.moveTo(n-f,o-a),t.lineTo(n+h,o-l),t.lineTo(n+f,o+a),t.lineTo(n-h,o+l),t.closePath();break;case"crossRot":y+=Dt;case"cross":f=Math.cos(y)*(i?i/2:g),l=Math.cos(y)*g,a=Math.sin(y)*g,h=Math.sin(y)*(i?i/2:g),t.moveTo(n-f,o-a),t.lineTo(n+f,o+a),t.moveTo(n+h,o-l),t.lineTo(n-h,o+l);break;case"star":f=Math.cos(y)*(i?i/2:g),l=Math.cos(y)*g,a=Math.sin(y)*g,h=Math.sin(y)*(i?i/2:g),t.moveTo(n-f,o-a),t.lineTo(n+f,o+a),t.moveTo(n+h,o-l),t.lineTo(n-h,o+l),y+=Dt,f=Math.cos(y)*(i?i/2:g),l=Math.cos(y)*g,a=Math.sin(y)*g,h=Math.sin(y)*(i?i/2:g),t.moveTo(n-f,o-a),t.lineTo(n+f,o+a),t.moveTo(n+h,o-l),t.lineTo(n-h,o+l);break;case"line":l=i?i/2:Math.cos(y)*g,a=Math.sin(y)*g,t.moveTo(n-l,o-a),t.lineTo(n+l,o+a);break;case"dash":t.moveTo(n,o),t.lineTo(n+Math.cos(y)*(i?i/2:g),o+Math.sin(y)*g);break;case!1:t.closePath();break}t.fill(),e.borderWidth>0&&t.stroke()}}function tt(t,e,n){return n=n||.5,!e||t&&t.x>e.left-n&&t.x<e.right+n&&t.y>e.top-n&&t.y<e.bottom+n}function ao(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function co(t){t.restore()}function Uf(t,e,n,o,i){if(!e)return t.lineTo(n.x,n.y);if(i==="middle"){const r=(e.x+n.x)/2;t.lineTo(r,e.y),t.lineTo(r,n.y)}else i==="after"!=!!o?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y);t.lineTo(n.x,n.y)}function Gf(t,e,n,o){if(!e)return t.lineTo(n.x,n.y);t.bezierCurveTo(o?e.cp1x:e.cp2x,o?e.cp1y:e.cp2y,o?n.cp2x:n.cp1x,o?n.cp2y:n.cp1y,n.x,n.y)}function qf(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),X(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}function Xf(t,e,n,o,i){if(i.strikethrough||i.underline){const r=t.measureText(o),l=e-r.actualBoundingBoxLeft,a=e+r.actualBoundingBoxRight,d=n-r.actualBoundingBoxAscent,c=n+r.actualBoundingBoxDescent,u=i.strikethrough?(d+c)/2:c;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=i.decorationWidth||2,t.moveTo(l,u),t.lineTo(a,u),t.stroke()}}function Kf(t,e){const n=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=n}function Vt(t,e,n,o,i,r={}){const l=oe(e)?e:[e],a=r.strokeWidth>0&&r.strokeColor!=="";let d,c;for(t.save(),t.font=i.string,qf(t,r),d=0;d<l.length;++d)c=l[d],r.backdrop&&Kf(t,r.backdrop),a&&(r.strokeColor&&(t.strokeStyle=r.strokeColor),X(r.strokeWidth)||(t.lineWidth=r.strokeWidth),t.strokeText(c,n,o,r.maxWidth)),t.fillText(c,n,o,r.maxWidth),Xf(t,n,o,c,r),o+=Number(i.lineHeight);t.restore()}function $n(t,e){const{x:n,y:o,w:i,h:r,radius:l}=e;t.arc(n+l.topLeft,o+l.topLeft,l.topLeft,1.5*ie,ie,!0),t.lineTo(n,o+r-l.bottomLeft),t.arc(n+l.bottomLeft,o+r-l.bottomLeft,l.bottomLeft,ie,ue,!0),t.lineTo(n+i-l.bottomRight,o+r),t.arc(n+i-l.bottomRight,o+r-l.bottomRight,l.bottomRight,ue,0,!0),t.lineTo(n+i,o+l.topRight),t.arc(n+i-l.topRight,o+l.topRight,l.topRight,0,-ue,!0),t.lineTo(n+l.topLeft,o)}const Zf=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,Jf=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function Qf(t,e){const n=(""+t).match(Zf);if(!n||n[1]==="normal")return e*1.2;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100;break}return e*t}const eh=t=>+t||0;function Fi(t,e){const n={},o=q(e),i=o?Object.keys(e):e,r=q(t)?o?l=>Y(t[l],t[e[l]]):l=>t[l]:()=>t;for(const l of i)n[l]=eh(r(l));return n}function sl(t){return Fi(t,{top:"y",right:"x",bottom:"y",left:"x"})}function Pt(t){return Fi(t,["topLeft","topRight","bottomLeft","bottomRight"])}function be(t){const e=sl(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function he(t,e){t=t||{},e=e||ce.font;let n=Y(t.size,e.size);typeof n=="string"&&(n=parseInt(n,10));let o=Y(t.style,e.style);o&&!(""+o).match(Jf)&&(console.warn('Invalid font style specified: "'+o+'"'),o=void 0);const i={family:Y(t.family,e.family),lineHeight:Qf(Y(t.lineHeight,e.lineHeight),n),size:n,style:o,weight:Y(t.weight,e.weight),string:""};return i.string=Wf(i),i}function _n(t,e,n,o){let i=!0,r,l,a;for(r=0,l=t.length;r<l;++r)if(a=t[r],a!==void 0&&(e!==void 0&&typeof a=="function"&&(a=a(e),i=!1),n!==void 0&&oe(a)&&(a=a[n%a.length],i=!1),a!==void 0))return o&&!i&&(o.cacheable=!1),a}function th(t,e,n){const{min:o,max:i}=t,r=Ar(e,(i-o)/2),l=(a,d)=>n&&a===0?0:a+d;return{min:l(o,-Math.abs(r)),max:l(i,r)}}function bt(t,e){return Object.assign(Object.create(t),e)}function Ni(t,e=[""],n,o,i=()=>t[0]){const r=n||t;typeof o>"u"&&(o=cl("_fallback",t));const l={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:r,_fallback:o,_getTarget:i,override:a=>Ni([a,...t],e,r,o)};return new Proxy(l,{deleteProperty(a,d){return delete a[d],delete a._keys,delete t[0][d],!0},get(a,d){return ll(a,d,()=>dh(d,e,t,a))},getOwnPropertyDescriptor(a,d){return Reflect.getOwnPropertyDescriptor(a._scopes[0],d)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(a,d){return ul(a).includes(d)},ownKeys(a){return ul(a)},set(a,d,c){const u=a._storage||(a._storage=i());return a[d]=u[d]=c,delete a._keys,!0}})}function Gt(t,e,n,o){const i={_cacheable:!1,_proxy:t,_context:e,_subProxy:n,_stack:new Set,_descriptors:rl(t,o),setContext:r=>Gt(t,r,n,o),override:r=>Gt(t.override(r),e,n,o)};return new Proxy(i,{deleteProperty(r,l){return delete r[l],delete t[l],!0},get(r,l,a){return ll(r,l,()=>oh(r,l,a))},getOwnPropertyDescriptor(r,l){return r._descriptors.allKeys?Reflect.has(t,l)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,l)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(r,l){return Reflect.has(t,l)},ownKeys(){return Reflect.ownKeys(t)},set(r,l,a){return t[l]=a,delete r[l],!0}})}function rl(t,e={scriptable:!0,indexable:!0}){const{_scriptable:n=e.scriptable,_indexable:o=e.indexable,_allKeys:i=e.allKeys}=t;return{allKeys:i,scriptable:n,indexable:o,isScriptable:gt(n)?n:()=>n,isIndexable:gt(o)?o:()=>o}}const nh=(t,e)=>t?t+ki(e):e,Ai=(t,e)=>q(e)&&t!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function ll(t,e,n){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];const o=n();return t[e]=o,o}function oh(t,e,n){const{_proxy:o,_context:i,_subProxy:r,_descriptors:l}=t;let a=o[e];return gt(a)&&l.isScriptable(e)&&(a=ih(e,a,t,n)),oe(a)&&a.length&&(a=sh(e,a,t,l.isIndexable)),Ai(e,a)&&(a=Gt(a,i,r&&r[e],l)),a}function ih(t,e,n,o){const{_proxy:i,_context:r,_subProxy:l,_stack:a}=n;if(a.has(t))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+t);a.add(t);let d=e(r,l||o);return a.delete(t),Ai(t,d)&&(d=Oi(i._scopes,i,t,d)),d}function sh(t,e,n,o){const{_proxy:i,_context:r,_subProxy:l,_descriptors:a}=n;if(typeof r.index<"u"&&o(t))return e[r.index%e.length];if(q(e[0])){const d=e,c=i._scopes.filter(u=>u!==d);e=[];for(const u of d){const f=Oi(c,i,t,u);e.push(Gt(f,r,l&&l[t],a))}}return e}function al(t,e,n){return gt(t)?t(e,n):t}const rh=(t,e)=>t===!0?e:typeof t=="string"?mt(e,t):void 0;function lh(t,e,n,o,i){for(const r of e){const l=rh(n,r);if(l){t.add(l);const a=al(l._fallback,n,i);if(typeof a<"u"&&a!==n&&a!==o)return a}else if(l===!1&&typeof o<"u"&&n!==o)return null}return!1}function Oi(t,e,n,o){const i=e._rootScopes,r=al(e._fallback,n,o),l=[...t,...i],a=new Set;a.add(o);let d=dl(a,l,n,r||n,o);return d===null||typeof r<"u"&&r!==n&&(d=dl(a,l,r,d,o),d===null)?!1:Ni(Array.from(a),[""],i,r,()=>ah(e,n,o))}function dl(t,e,n,o,i){for(;n;)n=lh(t,e,n,o,i);return n}function ah(t,e,n){const o=t._getTarget();e in o||(o[e]={});const i=o[e];return oe(i)&&q(n)?n:i||{}}function dh(t,e,n,o){let i;for(const r of e)if(i=cl(nh(r,t),n),typeof i<"u")return Ai(t,i)?Oi(n,o,t,i):i}function cl(t,e){for(const n of e){if(!n)continue;const o=n[t];if(typeof o<"u")return o}}function ul(t){let e=t._keys;return e||(e=t._keys=ch(t._scopes)),e}function ch(t){const e=new Set;for(const n of t)for(const o of Object.keys(n).filter(i=>!i.startsWith("_")))e.add(o);return Array.from(e)}function fl(t,e,n,o){const{iScale:i}=t,{key:r="r"}=this._parsing,l=new Array(o);let a,d,c,u;for(a=0,d=o;a<d;++a)c=a+n,u=e[c],l[a]={r:i.parse(mt(u,r),c)};return l}const uh=Number.EPSILON||1e-14,qt=(t,e)=>e<t.length&&!t[e].skip&&t[e],hl=t=>t==="x"?"y":"x";function fh(t,e,n,o){const i=t.skip?e:t,r=e,l=n.skip?e:n,a=vi(r,i),d=vi(l,r);let c=a/(a+d),u=d/(a+d);c=isNaN(c)?0:c,u=isNaN(u)?0:u;const f=o*c,h=o*u;return{previous:{x:r.x-f*(l.x-i.x),y:r.y-f*(l.y-i.y)},next:{x:r.x+h*(l.x-i.x),y:r.y+h*(l.y-i.y)}}}function hh(t,e,n){const o=t.length;let i,r,l,a,d,c=qt(t,0);for(let u=0;u<o-1;++u)if(d=c,c=qt(t,u+1),!(!d||!c)){if(pn(e[u],0,uh)){n[u]=n[u+1]=0;continue}i=n[u]/e[u],r=n[u+1]/e[u],a=Math.pow(i,2)+Math.pow(r,2),!(a<=9)&&(l=3/Math.sqrt(a),n[u]=i*l*e[u],n[u+1]=r*l*e[u])}}function ph(t,e,n="x"){const o=hl(n),i=t.length;let r,l,a,d=qt(t,0);for(let c=0;c<i;++c){if(l=a,a=d,d=qt(t,c+1),!a)continue;const u=a[n],f=a[o];l&&(r=(u-l[n])/3,a[`cp1${n}`]=u-r,a[`cp1${o}`]=f-r*e[c]),d&&(r=(d[n]-u)/3,a[`cp2${n}`]=u+r,a[`cp2${o}`]=f+r*e[c])}}function mh(t,e="x"){const n=hl(e),o=t.length,i=Array(o).fill(0),r=Array(o);let l,a,d,c=qt(t,0);for(l=0;l<o;++l)if(a=d,d=c,c=qt(t,l+1),!!d){if(c){const u=c[e]-d[e];i[l]=u!==0?(c[n]-d[n])/u:0}r[l]=a?c?Ye(i[l-1])!==Ye(i[l])?0:(i[l-1]+i[l])/2:i[l-1]:i[l]}hh(t,i,r),ph(t,r,e)}function uo(t,e,n){return Math.max(Math.min(t,n),e)}function gh(t,e){let n,o,i,r,l,a=tt(t[0],e);for(n=0,o=t.length;n<o;++n)l=r,r=a,a=n<o-1&&tt(t[n+1],e),r&&(i=t[n],l&&(i.cp1x=uo(i.cp1x,e.left,e.right),i.cp1y=uo(i.cp1y,e.top,e.bottom)),a&&(i.cp2x=uo(i.cp2x,e.left,e.right),i.cp2y=uo(i.cp2y,e.top,e.bottom)))}function yh(t,e,n,o,i){let r,l,a,d;if(e.spanGaps&&(t=t.filter(c=>!c.skip)),e.cubicInterpolationMode==="monotone")mh(t,i);else{let c=o?t[t.length-1]:t[0];for(r=0,l=t.length;r<l;++r)a=t[r],d=fh(c,a,t[Math.min(r+1,l-(o?0:1))%l],e.tension),a.cp1x=d.previous.x,a.cp1y=d.previous.y,a.cp2x=d.next.x,a.cp2y=d.next.y,c=a}e.capBezierPoints&&gh(t,n)}function Ii(){return typeof window<"u"&&typeof document<"u"}function Ti(t){let e=t.parentNode;return e&&e.toString()==="[object ShadowRoot]"&&(e=e.host),e}function fo(t,e,n){let o;return typeof t=="string"?(o=parseInt(t,10),t.indexOf("%")!==-1&&(o=o/100*e.parentNode[n])):o=t,o}const ho=t=>t.ownerDocument.defaultView.getComputedStyle(t,null);function bh(t,e){return ho(t).getPropertyValue(e)}const $h=["top","right","bottom","left"];function Rt(t,e,n){const o={};n=n?"-"+n:"";for(let i=0;i<4;i++){const r=$h[i];o[r]=parseFloat(t[e+"-"+r+n])||0}return o.width=o.left+o.right,o.height=o.top+o.bottom,o}const _h=(t,e,n)=>(t>0||e>0)&&(!n||!n.shadowRoot);function wh(t,e){const n=t.touches,o=n&&n.length?n[0]:t,{offsetX:i,offsetY:r}=o;let l=!1,a,d;if(_h(i,r,t.target))a=i,d=r;else{const c=e.getBoundingClientRect();a=o.clientX-c.left,d=o.clientY-c.top,l=!0}return{x:a,y:d,box:l}}function Ft(t,e){if("native"in t)return t;const{canvas:n,currentDevicePixelRatio:o}=e,i=ho(n),r=i.boxSizing==="border-box",l=Rt(i,"padding"),a=Rt(i,"border","width"),{x:d,y:c,box:u}=wh(t,n),f=l.left+(u&&a.left),h=l.top+(u&&a.top);let{width:p,height:m}=e;return r&&(p-=l.width+a.width,m-=l.height+a.height),{x:Math.round((d-f)/p*n.width/o),y:Math.round((c-h)/m*n.height/o)}}function Ch(t,e,n){let o,i;if(e===void 0||n===void 0){const r=Ti(t);if(!r)e=t.clientWidth,n=t.clientHeight;else{const l=r.getBoundingClientRect(),a=ho(r),d=Rt(a,"border","width"),c=Rt(a,"padding");e=l.width-c.width-d.width,n=l.height-c.height-d.height,o=fo(a.maxWidth,r,"clientWidth"),i=fo(a.maxHeight,r,"clientHeight")}}return{width:e,height:n,maxWidth:o||io,maxHeight:i||io}}const po=t=>Math.round(t*10)/10;function xh(t,e,n,o){const i=ho(t),r=Rt(i,"margin"),l=fo(i.maxWidth,t,"clientWidth")||io,a=fo(i.maxHeight,t,"clientHeight")||io,d=Ch(t,e,n);let{width:c,height:u}=d;if(i.boxSizing==="content-box"){const h=Rt(i,"border","width"),p=Rt(i,"padding");c-=p.width+h.width,u-=p.height+h.height}return c=Math.max(0,c-r.width),u=Math.max(0,o?c/o:u-r.height),c=po(Math.min(c,l,d.maxWidth)),u=po(Math.min(u,a,d.maxHeight)),c&&!u&&(u=po(c/2)),(e!==void 0||n!==void 0)&&o&&d.height&&u>d.height&&(u=d.height,c=po(Math.floor(u*o))),{width:c,height:u}}function pl(t,e,n){const o=e||1,i=Math.floor(t.height*o),r=Math.floor(t.width*o);t.height=Math.floor(t.height),t.width=Math.floor(t.width);const l=t.canvas;return l.style&&(n||!l.style.height&&!l.style.width)&&(l.style.height=`${t.height}px`,l.style.width=`${t.width}px`),t.currentDevicePixelRatio!==o||l.height!==i||l.width!==r?(t.currentDevicePixelRatio=o,l.height=i,l.width=r,t.ctx.setTransform(o,0,0,o,0,0),!0):!1}const kh=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};Ii()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch{}return t}();function ml(t,e){const n=bh(t,e),o=n&&n.match(/^(\d+)(\.\d+)?px$/);return o?+o[1]:void 0}function Nt(t,e,n,o){return{x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}}function Sh(t,e,n,o){return{x:t.x+n*(e.x-t.x),y:o==="middle"?n<.5?t.y:e.y:o==="after"?n<1?t.y:e.y:n>0?e.y:t.y}}function vh(t,e,n,o){const i={x:t.cp2x,y:t.cp2y},r={x:e.cp1x,y:e.cp1y},l=Nt(t,i,n),a=Nt(i,r,n),d=Nt(r,e,n),c=Nt(l,a,n),u=Nt(a,d,n);return Nt(c,u,n)}const Mh=function(t,e){return{x(n){return t+t+e-n},setWidth(n){e=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,o){return n-o},leftForLtr(n,o){return n-o}}},Dh=function(){return{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,e){return t+e},leftForLtr(t,e){return t}}};function Xt(t,e,n){return t?Mh(e,n):Dh()}function gl(t,e){let n,o;(e==="ltr"||e==="rtl")&&(n=t.canvas.style,o=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=o)}function yl(t,e){e!==void 0&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function bl(t){return t==="angle"?{between:mn,compare:Ef,normalize:Ee}:{between:Qe,compare:(e,n)=>e-n,normalize:e=>e}}function $l({start:t,end:e,count:n,loop:o,style:i}){return{start:t%n,end:e%n,loop:o&&(e-t+1)%n===0,style:i}}function Eh(t,e,n){const{property:o,start:i,end:r}=n,{between:l,normalize:a}=bl(o),d=e.length;let{start:c,end:u,loop:f}=t,h,p;if(f){for(c+=d,u+=d,h=0,p=d;h<p&&l(a(e[c%d][o]),i,r);++h)c--,u--;c%=d,u%=d}return u<c&&(u+=d),{start:c,end:u,loop:f,style:t.style}}function _l(t,e,n){if(!n)return[t];const{property:o,start:i,end:r}=n,l=e.length,{compare:a,between:d,normalize:c}=bl(o),{start:u,end:f,loop:h,style:p}=Eh(t,e,n),m=[];let g=!1,y=null,b,$,w;const S=()=>d(i,w,b)&&a(i,w)!==0,x=()=>a(r,b)===0||d(r,w,b),V=()=>g||S(),D=()=>!g||x();for(let F=u,N=u;F<=f;++F)$=e[F%l],!$.skip&&(b=c($[o]),b!==w&&(g=d(b,i,r),y===null&&V()&&(y=a(b,i)===0?F:N),y!==null&&D()&&(m.push($l({start:y,end:F,loop:h,count:l,style:p})),y=null),N=F,w=b));return y!==null&&m.push($l({start:y,end:f,loop:h,count:l,style:p})),m}function wl(t,e){const n=[],o=t.segments;for(let i=0;i<o.length;i++){const r=_l(o[i],t.points,e);r.length&&n.push(...r)}return n}function Bh(t,e,n,o){let i=0,r=e-1;if(n&&!o)for(;i<e&&!t[i].skip;)i++;for(;i<e&&t[i].skip;)i++;for(i%=e,n&&(r+=i);r>i&&t[r%e].skip;)r--;return r%=e,{start:i,end:r}}function Vh(t,e,n,o){const i=t.length,r=[];let l=e,a=t[e],d;for(d=e+1;d<=n;++d){const c=t[d%i];c.skip||c.stop?a.skip||(o=!1,r.push({start:e%i,end:(d-1)%i,loop:o}),e=l=c.stop?d:null):(l=d,a.skip&&(e=d)),a=c}return l!==null&&r.push({start:e%i,end:l%i,loop:o}),r}function Ph(t,e){const n=t.points,o=t.options.spanGaps,i=n.length;if(!i)return[];const r=!!t._loop,{start:l,end:a}=Bh(n,i,r,o);if(o===!0)return Cl(t,[{start:l,end:a,loop:r}],n,e);const d=a<l?a+i:a,c=!!t._fullLoop&&l===0&&a===i-1;return Cl(t,Vh(n,l,d,c),n,e)}function Cl(t,e,n,o){return!o||!o.setContext||!n?e:Rh(t,e,n,o)}function Rh(t,e,n,o){const i=t._chart.getContext(),r=xl(t.options),{_datasetIndex:l,options:{spanGaps:a}}=t,d=n.length,c=[];let u=r,f=e[0].start,h=f;function p(m,g,y,b){const $=a?-1:1;if(m!==g){for(m+=d;n[m%d].skip;)m-=$;for(;n[g%d].skip;)g+=$;m%d!==g%d&&(c.push({start:m%d,end:g%d,loop:y,style:b}),u=b,f=g%d)}}for(const m of e){f=a?f:m.start;let g=n[f%d],y;for(h=f+1;h<=m.end;h++){const b=n[h%d];y=xl(o.setContext(bt(i,{type:"segment",p0:g,p1:b,p0DataIndex:(h-1)%d,p1DataIndex:h%d,datasetIndex:l}))),Fh(y,u)&&p(f,h-1,m.loop,u),g=b,u=y}f<h-1&&p(f,h-1,m.loop,u)}return c}function xl(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function Fh(t,e){if(!e)return!1;const n=[],o=function(i,r){return Ei(r)?(n.includes(r)||n.push(r),n.indexOf(r)):r};return JSON.stringify(t,o)!==JSON.stringify(e,o)}/*!
20
20
  * Chart.js v4.4.2
21
21
  * https://www.chartjs.org
22
22
  * (c) 2024 Chart.js Contributors
23
23
  * Released under the MIT License
24
- */class Ih{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,n,o,i){const s=n.listeners[i],l=n.duration;s.forEach(a=>a({chart:e,initial:n.initial,numSteps:l,currentStep:Math.min(o-n.start,l)}))}_refresh(){this._request||(this._running=!0,this._request=Gs.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let n=0;this._charts.forEach((o,i)=>{if(!o.running||!o.items.length)return;const s=o.items;let l=s.length-1,a=!1,d;for(;l>=0;--l)d=s[l],d._active?(d._total>o.duration&&(o.duration=d._total),d.tick(e),a=!0):(s[l]=s[s.length-1],s.pop());a&&(i.draw(),this._notify(i,o,e,"progress")),s.length||(o.running=!1,this._notify(i,o,e,"complete"),o.initial=!1),n+=s.length}),this._lastDate=e,n===0&&(this._running=!1)}_getAnims(e){const n=this._charts;let o=n.get(e);return o||(o={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(e,o)),o}listen(e,n,o){this._getAnims(e).listeners[n].push(o)}add(e,n){!n||!n.length||this._getAnims(e).items.push(...n)}has(e){return this._getAnims(e).items.length>0}start(e){const n=this._charts.get(e);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((o,i)=>Math.max(o,i._duration),0),this._refresh())}running(e){if(!this._running)return!1;const n=this._charts.get(e);return!(!n||!n.running||!n.items.length)}stop(e){const n=this._charts.get(e);if(!n||!n.items.length)return;const o=n.items;let i=o.length-1;for(;i>=0;--i)o[i].cancel();n.items=[],this._notify(e,n,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var nt=new Ih;const xl="transparent",Th={boolean(t,e,n){return n>.5?e:t},color(t,e,n){const o=Qs(t||xl),i=o.valid&&Qs(e||xl);return i&&i.valid?i.mix(o,n).hexString():e},number(t,e,n){return t+(e-t)*n}};class Lh{constructor(e,n,o,i){const s=n[o];i=_n([e.to,i,s,e.from]);const l=_n([e.from,s,i]);this._active=!0,this._fn=e.fn||Th[e.type||typeof l],this._easing=gn[e.easing]||gn.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=n,this._prop=o,this._from=l,this._to=i,this._promises=void 0}active(){return this._active}update(e,n,o){if(this._active){this._notify(!1);const i=this._target[this._prop],s=o-this._start,l=this._duration-s;this._start=o,this._duration=Math.floor(Math.max(l,e.duration)),this._total+=s,this._loop=!!e.loop,this._to=_n([e.to,n,i,e.from]),this._from=_n([e.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const n=e-this._start,o=this._duration,i=this._prop,s=this._from,l=this._loop,a=this._to;let d;if(this._active=s!==a&&(l||n<o),!this._active){this._target[i]=a,this._notify(!0);return}if(n<0){this._target[i]=s;return}d=n/o%2,d=l&&d>1?2-d:d,d=this._easing(Math.min(1,Math.max(0,d))),this._target[i]=this._fn(s,a,d)}wait(){const e=this._promises||(this._promises=[]);return new Promise((n,o)=>{e.push({res:n,rej:o})})}_notify(e){const n=e?"res":"rej",o=this._promises||[];for(let i=0;i<o.length;i++)o[i][n]()}}class kl{constructor(e,n){this._chart=e,this._properties=new Map,this.configure(n)}configure(e){if(!q(e))return;const n=Object.keys(ce.animation),o=this._properties;Object.getOwnPropertyNames(e).forEach(i=>{const s=e[i];if(!q(s))return;const l={};for(const a of n)l[a]=s[a];(oe(s.properties)&&s.properties||[i]).forEach(a=>{(a===i||!o.has(a))&&o.set(a,l)})})}_animateOptions(e,n){const o=n.options,i=Hh(e,o);if(!i)return[];const s=this._createAnimations(i,o);return o.$shared&&zh(e.options.$animations,o).then(()=>{e.options=o},()=>{}),s}_createAnimations(e,n){const o=this._properties,i=[],s=e.$animations||(e.$animations={}),l=Object.keys(n),a=Date.now();let d;for(d=l.length-1;d>=0;--d){const c=l[d];if(c.charAt(0)==="$")continue;if(c==="options"){i.push(...this._animateOptions(e,n));continue}const u=n[c];let f=s[c];const h=o.get(c);if(f)if(h&&f.active()){f.update(h,u,a);continue}else f.cancel();if(!h||!h.duration){e[c]=u;continue}s[c]=f=new Lh(h,e,c,u),i.push(f)}return i}update(e,n){if(this._properties.size===0){Object.assign(e,n);return}const o=this._createAnimations(e,n);if(o.length)return nt.add(this._chart,o),!0}}function zh(t,e){const n=[],o=Object.keys(e);for(let i=0;i<o.length;i++){const s=t[o[i]];s&&s.active()&&n.push(s.wait())}return Promise.all(n)}function Hh(t,e){if(!e)return;let n=t.options;if(!n){t.options=e;return}return n.$shared&&(t.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function Sl(t,e){const n=t&&t.options||{},o=n.reverse,i=n.min===void 0?e:0,s=n.max===void 0?e:0;return{start:o?s:i,end:o?i:s}}function jh(t,e,n){if(n===!1)return!1;const o=Sl(t,n),i=Sl(e,n);return{top:i.end,right:o.end,bottom:i.start,left:o.start}}function Wh(t){let e,n,o,i;return q(t)?(e=t.top,n=t.right,o=t.bottom,i=t.left):e=n=o=i=t,{top:e,right:n,bottom:o,left:i,disabled:t===!1}}function vl(t,e){const n=[],o=t._getSortedDatasetMetas(e);let i,s;for(i=0,s=o.length;i<s;++i)n.push(o[i].index);return n}function Ml(t,e,n,o={}){const i=t.keys,s=o.mode==="single";let l,a,d,c;if(e!==null){for(l=0,a=i.length;l<a;++l){if(d=+i[l],d===n){if(o.all)continue;break}c=t.values[d],de(c)&&(s||e===0||Ye(e)===Ye(c))&&(e+=c)}return e}}function Yh(t){const e=Object.keys(t),n=new Array(e.length);let o,i,s;for(o=0,i=e.length;o<i;++o)s=e[o],n[o]={x:s,y:t[s]};return n}function Dl(t,e){const n=t&&t.options.stacked;return n||n===void 0&&e.stack!==void 0}function Uh(t,e,n){return`${t.id}.${e.id}.${n.stack||n.type}`}function Gh(t){const{min:e,max:n,minDefined:o,maxDefined:i}=t.getUserBounds();return{min:o?e:Number.NEGATIVE_INFINITY,max:i?n:Number.POSITIVE_INFINITY}}function qh(t,e,n){const o=t[e]||(t[e]={});return o[n]||(o[n]={})}function El(t,e,n,o){for(const i of e.getMatchingVisibleMetas(o).reverse()){const s=t[i.index];if(n&&s>0||!n&&s<0)return i.index}return null}function Bl(t,e){const{chart:n,_cachedMeta:o}=t,i=n._stacks||(n._stacks={}),{iScale:s,vScale:l,index:a}=o,d=s.axis,c=l.axis,u=Uh(s,l,o),f=e.length;let h;for(let p=0;p<f;++p){const m=e[p],{[d]:g,[c]:y}=m,b=m._stacks||(m._stacks={});h=b[c]=qh(i,u,g),h[a]=y,h._top=El(h,l,!0,o.type),h._bottom=El(h,l,!1,o.type);const $=h._visualValues||(h._visualValues={});$[a]=y}}function Li(t,e){const n=t.scales;return Object.keys(n).filter(o=>n[o].axis===e).shift()}function Xh(t,e){return bt(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function Kh(t,e,n){return bt(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}function wn(t,e){const n=t.controller.index,o=t.vScale&&t.vScale.axis;if(o){e=e||t._parsed;for(const i of e){const s=i._stacks;if(!s||s[o]===void 0||s[o][n]===void 0)return;delete s[o][n],s[o]._visualValues!==void 0&&s[o]._visualValues[n]!==void 0&&delete s[o]._visualValues[n]}}}const zi=t=>t==="reset"||t==="none",Vl=(t,e)=>e?t:Object.assign({},t),Zh=(t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:vl(n,!0),values:null};class Te{constructor(e,n){this.chart=e,this._ctx=e.ctx,this.index=n,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 e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=Dl(e.vScale,e),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(e){this.index!==e&&wn(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,n=this._cachedMeta,o=this.getDataset(),i=(f,h,p,m)=>f==="x"?h:f==="r"?m:p,s=n.xAxisID=Y(o.xAxisID,Li(e,"x")),l=n.yAxisID=Y(o.yAxisID,Li(e,"y")),a=n.rAxisID=Y(o.rAxisID,Li(e,"r")),d=n.indexAxis,c=n.iAxisID=i(d,s,l,a),u=n.vAxisID=i(d,l,s,a);n.xScale=this.getScaleForId(s),n.yScale=this.getScaleForId(l),n.rScale=this.getScaleForId(a),n.iScale=this.getScaleForId(c),n.vScale=this.getScaleForId(u)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const n=this._cachedMeta;return e===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&Ys(this._data,this),e._stacked&&wn(e)}_dataCheck(){const e=this.getDataset(),n=e.data||(e.data=[]),o=this._data;if(q(n))this._data=Yh(n);else if(o!==n){if(o){Ys(o,this);const i=this._cachedMeta;wn(i),i._parsed=[]}n&&Object.isExtensible(n)&&Af(n,this),this._syncList=[],this._data=n}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const n=this._cachedMeta,o=this.getDataset();let i=!1;this._dataCheck();const s=n._stacked;n._stacked=Dl(n.vScale,n),n.stack!==o.stack&&(i=!0,wn(n),n.stack=o.stack),this._resyncElements(e),(i||s!==n._stacked)&&Bl(this,n._parsed)}configure(){const e=this.chart.config,n=e.datasetScopeKeys(this._type),o=e.getOptionScopes(this.getDataset(),n,!0);this.options=e.createResolver(o,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,n){const{_cachedMeta:o,_data:i}=this,{iScale:s,_stacked:l}=o,a=s.axis;let d=e===0&&n===i.length?!0:o._sorted,c=e>0&&o._parsed[e-1],u,f,h;if(this._parsing===!1)o._parsed=i,o._sorted=!0,h=i;else{oe(i[e])?h=this.parseArrayData(o,i,e,n):q(i[e])?h=this.parseObjectData(o,i,e,n):h=this.parsePrimitiveData(o,i,e,n);const p=()=>f[a]===null||c&&f[a]<c[a];for(u=0;u<n;++u)o._parsed[u+e]=f=h[u],d&&(p()&&(d=!1),c=f);o._sorted=d}l&&Bl(this,h)}parsePrimitiveData(e,n,o,i){const{iScale:s,vScale:l}=e,a=s.axis,d=l.axis,c=s.getLabels(),u=s===l,f=new Array(i);let h,p,m;for(h=0,p=i;h<p;++h)m=h+o,f[h]={[a]:u||s.parse(c[m],m),[d]:l.parse(n[m],m)};return f}parseArrayData(e,n,o,i){const{xScale:s,yScale:l}=e,a=new Array(i);let d,c,u,f;for(d=0,c=i;d<c;++d)u=d+o,f=n[u],a[d]={x:s.parse(f[0],u),y:l.parse(f[1],u)};return a}parseObjectData(e,n,o,i){const{xScale:s,yScale:l}=e,{xAxisKey:a="x",yAxisKey:d="y"}=this._parsing,c=new Array(i);let u,f,h,p;for(u=0,f=i;u<f;++u)h=u+o,p=n[h],c[u]={x:s.parse(mt(p,a),h),y:l.parse(mt(p,d),h)};return c}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,n,o){const i=this.chart,s=this._cachedMeta,l=n[e.axis],a={keys:vl(i,!0),values:n._stacks[e.axis]._visualValues};return Ml(a,l,s.index,{mode:o})}updateRangeFromParsed(e,n,o,i){const s=o[n.axis];let l=s===null?NaN:s;const a=i&&o._stacks[n.axis];i&&a&&(i.values=a,l=Ml(i,s,this._cachedMeta.index)),e.min=Math.min(e.min,l),e.max=Math.max(e.max,l)}getMinMax(e,n){const o=this._cachedMeta,i=o._parsed,s=o._sorted&&e===o.iScale,l=i.length,a=this._getOtherScale(e),d=Zh(n,o,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:f}=Gh(a);let h,p;function m(){p=i[h];const g=p[a.axis];return!de(p[e.axis])||u>g||f<g}for(h=0;h<l&&!(!m()&&(this.updateRangeFromParsed(c,e,p,d),s));++h);if(s){for(h=l-1;h>=0;--h)if(!m()){this.updateRangeFromParsed(c,e,p,d);break}}return c}getAllParsedValues(e){const n=this._cachedMeta._parsed,o=[];let i,s,l;for(i=0,s=n.length;i<s;++i)l=n[i][e.axis],de(l)&&o.push(l);return o}getMaxOverflow(){return!1}getLabelAndValue(e){const n=this._cachedMeta,o=n.iScale,i=n.vScale,s=this.getParsed(e);return{label:o?""+o.getLabelForValue(s[o.axis]):"",value:i?""+i.getLabelForValue(s[i.axis]):""}}_update(e){const n=this._cachedMeta;this.update(e||"default"),n._clip=Wh(Y(this.options.clip,jh(n.xScale,n.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,n=this.chart,o=this._cachedMeta,i=o.data||[],s=n.chartArea,l=[],a=this._drawStart||0,d=this._drawCount||i.length-a,c=this.options.drawActiveElementsOnTop;let u;for(o.dataset&&o.dataset.draw(e,s,a,d),u=a;u<a+d;++u){const f=i[u];f.hidden||(f.active&&c?l.push(f):f.draw(e,s))}for(u=0;u<l.length;++u)l[u].draw(e,s)}getStyle(e,n){const o=n?"active":"default";return e===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(o):this.resolveDataElementOptions(e||0,o)}getContext(e,n,o){const i=this.getDataset();let s;if(e>=0&&e<this._cachedMeta.data.length){const l=this._cachedMeta.data[e];s=l.$context||(l.$context=Kh(this.getContext(),e,l)),s.parsed=this.getParsed(e),s.raw=i.data[e],s.index=s.dataIndex=e}else s=this.$context||(this.$context=Xh(this.chart.getContext(),this.index)),s.dataset=i,s.index=s.datasetIndex=this.index;return s.active=!!n,s.mode=o,s}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,n){return this._resolveElementOptions(this.dataElementType.id,n,e)}_resolveElementOptions(e,n="default",o){const i=n==="active",s=this._cachedDataOpts,l=e+"-"+n,a=s[l],d=this.enableOptionSharing&&hn(o);if(a)return Vl(a,d);const c=this.chart.config,u=c.datasetElementScopeKeys(this._type,e),f=i?[`${e}Hover`,"hover",e,""]:[e,""],h=c.getOptionScopes(this.getDataset(),u),p=Object.keys(ce.elements[e]),m=()=>this.getContext(o,i,n),g=c.resolveNamedOptions(h,p,m,f);return g.$shared&&(g.$shared=d,s[l]=Object.freeze(Vl(g,d))),g}_resolveAnimations(e,n,o){const i=this.chart,s=this._cachedDataOpts,l=`animation-${n}`,a=s[l];if(a)return a;let d;if(i.options.animation!==!1){const u=this.chart.config,f=u.datasetAnimationScopeKeys(this._type,n),h=u.getOptionScopes(this.getDataset(),f);d=u.createResolver(h,this.getContext(e,o,n))}const c=new kl(i,d&&d.animations);return d&&d._cacheable&&(s[l]=Object.freeze(c)),c}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,n){return!n||zi(e)||this.chart._animationsDisabled}_getSharedOptions(e,n){const o=this.resolveDataElementOptions(e,n),i=this._sharedOptions,s=this.getSharedOptions(o),l=this.includeOptions(n,s)||s!==i;return this.updateSharedOptions(s,n,o),{sharedOptions:s,includeOptions:l}}updateElement(e,n,o,i){zi(i)?Object.assign(e,o):this._resolveAnimations(n,i).update(e,o)}updateSharedOptions(e,n,o){e&&!zi(n)&&this._resolveAnimations(void 0,n).update(e,o)}_setStyle(e,n,o,i){e.active=i;const s=this.getStyle(n,i);this._resolveAnimations(n,o,i).update(e,{options:!i&&this.getSharedOptions(s)||s})}removeHoverStyle(e,n,o){this._setStyle(e,o,"active",!1)}setHoverStyle(e,n,o){this._setStyle(e,o,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const n=this._data,o=this._cachedMeta.data;for(const[a,d,c]of this._syncList)this[a](d,c);this._syncList=[];const i=o.length,s=n.length,l=Math.min(s,i);l&&this.parse(0,l),s>i?this._insertElements(i,s-i,e):s<i&&this._removeElements(s,i-s)}_insertElements(e,n,o=!0){const i=this._cachedMeta,s=i.data,l=e+n;let a;const d=c=>{for(c.length+=n,a=c.length-1;a>=l;a--)c[a]=c[a-n]};for(d(s),a=e;a<l;++a)s[a]=new this.dataElementType;this._parsing&&d(i._parsed),this.parse(e,n),o&&this.updateElements(s,e,n,"reset")}updateElements(e,n,o,i){}_removeElements(e,n){const o=this._cachedMeta;if(this._parsing){const i=o._parsed.splice(e,n);o._stacked&&wn(o,i)}o.data.splice(e,n)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[n,o,i]=e;this[n](o,i)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){const e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(e,n){n&&this._sync(["_removeElements",e,n]);const o=arguments.length-2;o&&this._sync(["_insertElements",e,o])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}I(Te,"defaults",{}),I(Te,"datasetElementType",null),I(Te,"dataElementType",null);function Jh(t,e){if(!t._cache.$bar){const n=t.getMatchingVisibleMetas(e);let o=[];for(let i=0,s=n.length;i<s;i++)o=o.concat(n[i].controller.getAllParsedValues(t));t._cache.$bar=Us(o.sort((i,s)=>i-s))}return t._cache.$bar}function Qh(t){const e=t.iScale,n=Jh(e,t.type);let o=e._length,i,s,l,a;const d=()=>{l===32767||l===-32768||(hn(a)&&(o=Math.min(o,Math.abs(l-a)||o)),a=l)};for(i=0,s=n.length;i<s;++i)l=e.getPixelForValue(n[i]),d();for(a=void 0,i=0,s=e.ticks.length;i<s;++i)l=e.getPixelForTick(i),d();return o}function ep(t,e,n,o){const i=n.barThickness;let s,l;return X(i)?(s=e.min*n.categoryPercentage,l=n.barPercentage):(s=i*o,l=1),{chunk:s/o,ratio:l,start:e.pixels[t]-s/2}}function tp(t,e,n,o){const i=e.pixels,s=i[t];let l=t>0?i[t-1]:null,a=t<i.length-1?i[t+1]:null;const d=n.categoryPercentage;l===null&&(l=s-(a===null?e.end-e.start:a-s)),a===null&&(a=s+s-l);const c=s-(s-Math.min(l,a))/2*d;return{chunk:Math.abs(a-l)/2*d/o,ratio:n.barPercentage,start:c}}function np(t,e,n,o){const i=n.parse(t[0],o),s=n.parse(t[1],o),l=Math.min(i,s),a=Math.max(i,s);let d=l,c=a;Math.abs(l)>Math.abs(a)&&(d=a,c=l),e[n.axis]=c,e._custom={barStart:d,barEnd:c,start:i,end:s,min:l,max:a}}function Pl(t,e,n,o){return oe(t)?np(t,e,n,o):e[n.axis]=n.parse(t,o),e}function Rl(t,e,n,o){const i=t.iScale,s=t.vScale,l=i.getLabels(),a=i===s,d=[];let c,u,f,h;for(c=n,u=n+o;c<u;++c)h=e[c],f={},f[i.axis]=a||i.parse(l[c],c),d.push(Pl(h,f,s,c));return d}function Hi(t){return t&&t.barStart!==void 0&&t.barEnd!==void 0}function op(t,e,n){return t!==0?Ye(t):(e.isHorizontal()?1:-1)*(e.min>=n?1:-1)}function ip(t){let e,n,o,i,s;return t.horizontal?(e=t.base>t.x,n="left",o="right"):(e=t.base<t.y,n="bottom",o="top"),e?(i="end",s="start"):(i="start",s="end"),{start:n,end:o,reverse:e,top:i,bottom:s}}function rp(t,e,n,o){let i=e.borderSkipped;const s={};if(!i){t.borderSkipped=s;return}if(i===!0){t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:l,end:a,reverse:d,top:c,bottom:u}=ip(t);i==="middle"&&n&&(t.enableBorderRadius=!0,(n._top||0)===o?i=c:(n._bottom||0)===o?i=u:(s[Fl(u,l,a,d)]=!0,i=c)),s[Fl(i,l,a,d)]=!0,t.borderSkipped=s}function Fl(t,e,n,o){return o?(t=sp(t,e,n),t=Nl(t,n,e)):t=Nl(t,e,n),t}function sp(t,e,n){return t===e?n:t===n?e:t}function Nl(t,e,n){return t==="start"?e:t==="end"?n:t}function lp(t,{inflateAmount:e},n){t.inflateAmount=e==="auto"?n===1?.33:0:e}class mo extends Te{parsePrimitiveData(e,n,o,i){return Rl(e,n,o,i)}parseArrayData(e,n,o,i){return Rl(e,n,o,i)}parseObjectData(e,n,o,i){const{iScale:s,vScale:l}=e,{xAxisKey:a="x",yAxisKey:d="y"}=this._parsing,c=s.axis==="x"?a:d,u=l.axis==="x"?a:d,f=[];let h,p,m,g;for(h=o,p=o+i;h<p;++h)g=n[h],m={},m[s.axis]=s.parse(mt(g,c),h),f.push(Pl(mt(g,u),m,l,h));return f}updateRangeFromParsed(e,n,o,i){super.updateRangeFromParsed(e,n,o,i);const s=o._custom;s&&n===this._cachedMeta.vScale&&(e.min=Math.min(e.min,s.min),e.max=Math.max(e.max,s.max))}getMaxOverflow(){return 0}getLabelAndValue(e){const n=this._cachedMeta,{iScale:o,vScale:i}=n,s=this.getParsed(e),l=s._custom,a=Hi(l)?"["+l.start+", "+l.end+"]":""+i.getLabelForValue(s[i.axis]);return{label:""+o.getLabelForValue(s[o.axis]),value:a}}initialize(){this.enableOptionSharing=!0,super.initialize();const e=this._cachedMeta;e.stack=this.getDataset().stack}update(e){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,e)}updateElements(e,n,o,i){const s=i==="reset",{index:l,_cachedMeta:{vScale:a}}=this,d=a.getBasePixel(),c=a.isHorizontal(),u=this._getRuler(),{sharedOptions:f,includeOptions:h}=this._getSharedOptions(n,i);for(let p=n;p<n+o;p++){const m=this.getParsed(p),g=s||X(m[a.axis])?{base:d,head:d}:this._calculateBarValuePixels(p),y=this._calculateBarIndexPixels(p,u),b=(m._stacks||{})[a.axis],$={horizontal:c,base:g.base,enableBorderRadius:!b||Hi(m._custom)||l===b._top||l===b._bottom,x:c?g.head:y.center,y:c?y.center:g.head,height:c?y.size:Math.abs(g.size),width:c?Math.abs(g.size):y.size};h&&($.options=f||this.resolveDataElementOptions(p,e[p].active?"active":i));const x=$.options||e[p].options;rp($,x,b,l),lp($,x,u.ratio),this.updateElement(e[p],p,$,i)}}_getStacks(e,n){const{iScale:o}=this._cachedMeta,i=o.getMatchingVisibleMetas(this._type).filter(d=>d.controller.options.grouped),s=o.options.stacked,l=[],a=d=>{const c=d.controller.getParsed(n),u=c&&c[d.vScale.axis];if(X(u)||isNaN(u))return!0};for(const d of i)if(!(n!==void 0&&a(d))&&((s===!1||l.indexOf(d.stack)===-1||s===void 0&&d.stack===void 0)&&l.push(d.stack),d.index===e))break;return l.length||l.push(void 0),l}_getStackCount(e){return this._getStacks(void 0,e).length}_getStackIndex(e,n,o){const i=this._getStacks(e,o),s=n!==void 0?i.indexOf(n):-1;return s===-1?i.length-1:s}_getRuler(){const e=this.options,n=this._cachedMeta,o=n.iScale,i=[];let s,l;for(s=0,l=n.data.length;s<l;++s)i.push(o.getPixelForValue(this.getParsed(s)[o.axis],s));const a=e.barThickness;return{min:a||Qh(n),pixels:i,start:o._startPixel,end:o._endPixel,stackCount:this._getStackCount(),scale:o,grouped:e.grouped,ratio:a?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(e){const{_cachedMeta:{vScale:n,_stacked:o,index:i},options:{base:s,minBarLength:l}}=this,a=s||0,d=this.getParsed(e),c=d._custom,u=Hi(c);let f=d[n.axis],h=0,p=o?this.applyStack(n,d,o):f,m,g;p!==f&&(h=p-f,p=f),u&&(f=c.barStart,p=c.barEnd-c.barStart,f!==0&&Ye(f)!==Ye(c.barEnd)&&(h=0),h+=f);const y=!X(s)&&!u?s:h;let b=n.getPixelForValue(y);if(this.chart.getDataVisibility(e)?m=n.getPixelForValue(h+p):m=b,g=m-b,Math.abs(g)<l){g=op(g,n,a)*l,f===a&&(b-=g/2);const $=n.getPixelForDecimal(0),x=n.getPixelForDecimal(1),S=Math.min($,x),C=Math.max($,x);b=Math.max(Math.min(b,C),S),m=b+g,o&&!u&&(d._stacks[n.axis]._visualValues[i]=n.getValueForPixel(m)-n.getValueForPixel(b))}if(b===n.getPixelForValue(a)){const $=Ye(g)*n.getLineWidthForValue(a)/2;b+=$,g-=$}return{size:g,base:b,head:m,center:m+g/2}}_calculateBarIndexPixels(e,n){const o=n.scale,i=this.options,s=i.skipNull,l=Y(i.maxBarThickness,1/0);let a,d;if(n.grouped){const c=s?this._getStackCount(e):n.stackCount,u=i.barThickness==="flex"?tp(e,n,i,c):ep(e,n,i,c),f=this._getStackIndex(this.index,this._cachedMeta.stack,s?e:void 0);a=u.start+u.chunk*f+u.chunk/2,d=Math.min(l,u.chunk*u.ratio)}else a=o.getPixelForValue(this.getParsed(e)[o.axis],e),d=Math.min(l,n.min*n.ratio);return{base:a-d/2,head:a+d/2,center:a,size:d}}draw(){const e=this._cachedMeta,n=e.vScale,o=e.data,i=o.length;let s=0;for(;s<i;++s)this.getParsed(s)[n.axis]!==null&&o[s].draw(this._ctx)}}I(mo,"id","bar"),I(mo,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),I(mo,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class go extends Te{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(e,n,o,i){const s=super.parsePrimitiveData(e,n,o,i);for(let l=0;l<s.length;l++)s[l]._custom=this.resolveDataElementOptions(l+o).radius;return s}parseArrayData(e,n,o,i){const s=super.parseArrayData(e,n,o,i);for(let l=0;l<s.length;l++){const a=n[o+l];s[l]._custom=Y(a[2],this.resolveDataElementOptions(l+o).radius)}return s}parseObjectData(e,n,o,i){const s=super.parseObjectData(e,n,o,i);for(let l=0;l<s.length;l++){const a=n[o+l];s[l]._custom=Y(a&&a.r&&+a.r,this.resolveDataElementOptions(l+o).radius)}return s}getMaxOverflow(){const e=this._cachedMeta.data;let n=0;for(let o=e.length-1;o>=0;--o)n=Math.max(n,e[o].size(this.resolveDataElementOptions(o))/2);return n>0&&n}getLabelAndValue(e){const n=this._cachedMeta,o=this.chart.data.labels||[],{xScale:i,yScale:s}=n,l=this.getParsed(e),a=i.getLabelForValue(l.x),d=s.getLabelForValue(l.y),c=l._custom;return{label:o[e]||"",value:"("+a+", "+d+(c?", "+c:"")+")"}}update(e){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,e)}updateElements(e,n,o,i){const s=i==="reset",{iScale:l,vScale:a}=this._cachedMeta,{sharedOptions:d,includeOptions:c}=this._getSharedOptions(n,i),u=l.axis,f=a.axis;for(let h=n;h<n+o;h++){const p=e[h],m=!s&&this.getParsed(h),g={},y=g[u]=s?l.getPixelForDecimal(.5):l.getPixelForValue(m[u]),b=g[f]=s?a.getBasePixel():a.getPixelForValue(m[f]);g.skip=isNaN(y)||isNaN(b),c&&(g.options=d||this.resolveDataElementOptions(h,p.active?"active":i),s&&(g.options.radius=0)),this.updateElement(p,h,g,i)}}resolveDataElementOptions(e,n){const o=this.getParsed(e);let i=super.resolveDataElementOptions(e,n);i.$shared&&(i=Object.assign({},i,{$shared:!1}));const s=i.radius;return n!=="active"&&(i.radius=0),i.radius+=Y(o&&o._custom,s),i}}I(go,"id","bubble"),I(go,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),I(go,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function ap(t,e,n){let o=1,i=1,s=0,l=0;if(e<re){const a=t,d=a+e,c=Math.cos(a),u=Math.sin(a),f=Math.cos(d),h=Math.sin(d),p=(x,S,C)=>mn(x,a,d,!0)?1:Math.max(S,S*n,C,C*n),m=(x,S,C)=>mn(x,a,d,!0)?-1:Math.min(S,S*n,C,C*n),g=p(0,c,f),y=p(ue,u,h),b=m(ie,c,f),$=m(ie+ue,u,h);o=(g-b)/2,i=(y-$)/2,s=-(g+b)/2,l=-(y+$)/2}return{ratioX:o,ratioY:i,offsetX:s,offsetY:l}}class At extends Te{constructor(e,n){super(e,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,n){const o=this.getDataset().data,i=this._cachedMeta;if(this._parsing===!1)i._parsed=o;else{let s=d=>+o[d];if(q(o[e])){const{key:d="value"}=this._parsing;s=c=>+mt(o[c],d)}let l,a;for(l=e,a=e+n;l<a;++l)i._parsed[l]=s(l)}}_getRotation(){return Ie(this.options.rotation-90)}_getCircumference(){return Ie(this.options.circumference)}_getRotationExtents(){let e=re,n=-re;for(let o=0;o<this.chart.data.datasets.length;++o)if(this.chart.isDatasetVisible(o)&&this.chart.getDatasetMeta(o).type===this._type){const i=this.chart.getDatasetMeta(o).controller,s=i._getRotation(),l=i._getCircumference();e=Math.min(e,s),n=Math.max(n,s+l)}return{rotation:e,circumference:n-e}}update(e){const n=this.chart,{chartArea:o}=n,i=this._cachedMeta,s=i.data,l=this.getMaxBorderWidth()+this.getMaxOffset(s)+this.options.spacing,a=Math.max((Math.min(o.width,o.height)-l)/2,0),d=Math.min(Cf(this.options.cutout,a),1),c=this._getRingWeight(this.index),{circumference:u,rotation:f}=this._getRotationExtents(),{ratioX:h,ratioY:p,offsetX:m,offsetY:g}=ap(f,u,d),y=(o.width-l)/h,b=(o.height-l)/p,$=Math.max(Math.min(y,b)/2,0),x=Ns(this.options.radius,$),S=Math.max(x*d,0),C=(x-S)/this._getVisibleDatasetWeightTotal();this.offsetX=m*x,this.offsetY=g*x,i.total=this.calculateTotal(),this.outerRadius=x-C*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-C*c,0),this.updateElements(s,0,s.length,e)}_circumference(e,n){const o=this.options,i=this._cachedMeta,s=this._getCircumference();return n&&o.animation.animateRotate||!this.chart.getDataVisibility(e)||i._parsed[e]===null||i.data[e].hidden?0:this.calculateCircumference(i._parsed[e]*s/re)}updateElements(e,n,o,i){const s=i==="reset",l=this.chart,a=l.chartArea,c=l.options.animation,u=(a.left+a.right)/2,f=(a.top+a.bottom)/2,h=s&&c.animateScale,p=h?0:this.innerRadius,m=h?0:this.outerRadius,{sharedOptions:g,includeOptions:y}=this._getSharedOptions(n,i);let b=this._getRotation(),$;for($=0;$<n;++$)b+=this._circumference($,s);for($=n;$<n+o;++$){const x=this._circumference($,s),S=e[$],C={x:u+this.offsetX,y:f+this.offsetY,startAngle:b,endAngle:b+x,circumference:x,outerRadius:m,innerRadius:p};y&&(C.options=g||this.resolveDataElementOptions($,S.active?"active":i)),b+=x,this.updateElement(S,$,C,i)}}calculateTotal(){const e=this._cachedMeta,n=e.data;let o=0,i;for(i=0;i<n.length;i++){const s=e._parsed[i];s!==null&&!isNaN(s)&&this.chart.getDataVisibility(i)&&!n[i].hidden&&(o+=Math.abs(s))}return o}calculateCircumference(e){const n=this._cachedMeta.total;return n>0&&!isNaN(e)?re*(Math.abs(e)/n):0}getLabelAndValue(e){const n=this._cachedMeta,o=this.chart,i=o.data.labels||[],s=yn(n._parsed[e],o.options.locale);return{label:i[e]||"",value:s}}getMaxBorderWidth(e){let n=0;const o=this.chart;let i,s,l,a,d;if(!e){for(i=0,s=o.data.datasets.length;i<s;++i)if(o.isDatasetVisible(i)){l=o.getDatasetMeta(i),e=l.data,a=l.controller;break}}if(!e)return 0;for(i=0,s=e.length;i<s;++i)d=a.resolveDataElementOptions(i),d.borderAlign!=="inner"&&(n=Math.max(n,d.borderWidth||0,d.hoverBorderWidth||0));return n}getMaxOffset(e){let n=0;for(let o=0,i=e.length;o<i;++o){const s=this.resolveDataElementOptions(o);n=Math.max(n,s.offset||0,s.hoverOffset||0)}return n}_getRingWeightOffset(e){let n=0;for(let o=0;o<e;++o)this.chart.isDatasetVisible(o)&&(n+=this._getRingWeight(o));return n}_getRingWeight(e){return Math.max(Y(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}I(At,"id","doughnut"),I(At,"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"}),I(At,"descriptors",{_scriptable:e=>e!=="spacing",_indexable:e=>e!=="spacing"&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")}),I(At,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const n=e.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:o,color:i}}=e.legend.options;return n.labels.map((s,l)=>{const d=e.getDatasetMeta(0).controller.getStyle(l);return{text:s,fillStyle:d.backgroundColor,strokeStyle:d.borderColor,fontColor:i,lineWidth:d.borderWidth,pointStyle:o,hidden:!e.getDataVisibility(l),index:l}})}return[]}},onClick(e,n,o){o.chart.toggleDataVisibility(n.index),o.chart.update()}}}});class yo extends Te{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const n=this._cachedMeta,{dataset:o,data:i=[],_dataset:s}=n,l=this.chart._animationsDisabled;let{start:a,count:d}=Xs(n,i,l);this._drawStart=a,this._drawCount=d,Ks(n)&&(a=0,d=i.length),o._chart=this.chart,o._datasetIndex=this.index,o._decimated=!!s._decimated,o.points=i;const c=this.resolveDatasetElementOptions(e);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(o,void 0,{animated:!l,options:c},e),this.updateElements(i,a,d,e)}updateElements(e,n,o,i){const s=i==="reset",{iScale:l,vScale:a,_stacked:d,_dataset:c}=this._cachedMeta,{sharedOptions:u,includeOptions:f}=this._getSharedOptions(n,i),h=l.axis,p=a.axis,{spanGaps:m,segment:g}=this.options,y=Ut(m)?m:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||s||i==="none",$=n+o,x=e.length;let S=n>0&&this.getParsed(n-1);for(let C=0;C<x;++C){const V=e[C],E=b?V:{};if(C<n||C>=$){E.skip=!0;continue}const F=this.getParsed(C),N=X(F[p]),P=E[h]=l.getPixelForValue(F[h],C),w=E[p]=s||N?a.getBasePixel():a.getPixelForValue(d?this.applyStack(a,F,d):F[p],C);E.skip=isNaN(P)||isNaN(w)||N,E.stop=C>0&&Math.abs(F[h]-S[h])>y,g&&(E.parsed=F,E.raw=c.data[C]),f&&(E.options=u||this.resolveDataElementOptions(C,V.active?"active":i)),b||this.updateElement(V,C,E,i),S=F}}getMaxOverflow(){const e=this._cachedMeta,n=e.dataset,o=n.options&&n.options.borderWidth||0,i=e.data||[];if(!i.length)return o;const s=i[0].size(this.resolveDataElementOptions(0)),l=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(o,s,l)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}I(yo,"id","line"),I(yo,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),I(yo,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class Cn extends Te{constructor(e,n){super(e,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(e){const n=this._cachedMeta,o=this.chart,i=o.data.labels||[],s=yn(n._parsed[e].r,o.options.locale);return{label:i[e]||"",value:s}}parseObjectData(e,n,o,i){return ul.bind(this)(e,n,o,i)}update(e){const n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,e)}getMinMax(){const e=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return e.data.forEach((o,i)=>{const s=this.getParsed(i).r;!isNaN(s)&&this.chart.getDataVisibility(i)&&(s<n.min&&(n.min=s),s>n.max&&(n.max=s))}),n}_updateRadius(){const e=this.chart,n=e.chartArea,o=e.options,i=Math.min(n.right-n.left,n.bottom-n.top),s=Math.max(i/2,0),l=Math.max(o.cutoutPercentage?s/100*o.cutoutPercentage:1,0),a=(s-l)/e.getVisibleDatasetCount();this.outerRadius=s-a*this.index,this.innerRadius=this.outerRadius-a}updateElements(e,n,o,i){const s=i==="reset",l=this.chart,d=l.options.animation,c=this._cachedMeta.rScale,u=c.xCenter,f=c.yCenter,h=c.getIndexAngle(0)-.5*ie;let p=h,m;const g=360/this.countVisibleElements();for(m=0;m<n;++m)p+=this._computeAngle(m,i,g);for(m=n;m<n+o;m++){const y=e[m];let b=p,$=p+this._computeAngle(m,i,g),x=l.getDataVisibility(m)?c.getDistanceFromCenterForValue(this.getParsed(m).r):0;p=$,s&&(d.animateScale&&(x=0),d.animateRotate&&(b=$=h));const S={x:u,y:f,innerRadius:0,outerRadius:x,startAngle:b,endAngle:$,options:this.resolveDataElementOptions(m,y.active?"active":i)};this.updateElement(y,m,S,i)}}countVisibleElements(){const e=this._cachedMeta;let n=0;return e.data.forEach((o,i)=>{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&n++}),n}_computeAngle(e,n,o){return this.chart.getDataVisibility(e)?Ie(this.resolveDataElementOptions(e,n).angle||o):0}}I(Cn,"id","polarArea"),I(Cn,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),I(Cn,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const n=e.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:o,color:i}}=e.legend.options;return n.labels.map((s,l)=>{const d=e.getDatasetMeta(0).controller.getStyle(l);return{text:s,fillStyle:d.backgroundColor,strokeStyle:d.borderColor,fontColor:i,lineWidth:d.borderWidth,pointStyle:o,hidden:!e.getDataVisibility(l),index:l}})}return[]}},onClick(e,n,o){o.chart.toggleDataVisibility(n.index),o.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class ji extends At{}I(ji,"id","pie"),I(ji,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class bo extends Te{getLabelAndValue(e){const n=this._cachedMeta.vScale,o=this.getParsed(e);return{label:n.getLabels()[e],value:""+n.getLabelForValue(o[n.axis])}}parseObjectData(e,n,o,i){return ul.bind(this)(e,n,o,i)}update(e){const n=this._cachedMeta,o=n.dataset,i=n.data||[],s=n.iScale.getLabels();if(o.points=i,e!=="resize"){const l=this.resolveDatasetElementOptions(e);this.options.showLine||(l.borderWidth=0);const a={_loop:!0,_fullLoop:s.length===i.length,options:l};this.updateElement(o,void 0,a,e)}this.updateElements(i,0,i.length,e)}updateElements(e,n,o,i){const s=this._cachedMeta.rScale,l=i==="reset";for(let a=n;a<n+o;a++){const d=e[a],c=this.resolveDataElementOptions(a,d.active?"active":i),u=s.getPointPositionForValue(a,this.getParsed(a).r),f=l?s.xCenter:u.x,h=l?s.yCenter:u.y,p={x:f,y:h,angle:u.angle,skip:isNaN(f)||isNaN(h),options:c};this.updateElement(d,a,p,i)}}}I(bo,"id","radar"),I(bo,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),I(bo,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class $o extends Te{getLabelAndValue(e){const n=this._cachedMeta,o=this.chart.data.labels||[],{xScale:i,yScale:s}=n,l=this.getParsed(e),a=i.getLabelForValue(l.x),d=s.getLabelForValue(l.y);return{label:o[e]||"",value:"("+a+", "+d+")"}}update(e){const n=this._cachedMeta,{data:o=[]}=n,i=this.chart._animationsDisabled;let{start:s,count:l}=Xs(n,o,i);if(this._drawStart=s,this._drawCount=l,Ks(n)&&(s=0,l=o.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:a,_dataset:d}=n;a._chart=this.chart,a._datasetIndex=this.index,a._decimated=!!d._decimated,a.points=o;const c=this.resolveDatasetElementOptions(e);c.segment=this.options.segment,this.updateElement(a,void 0,{animated:!i,options:c},e)}else this.datasetElementType&&(delete n.dataset,this.datasetElementType=!1);this.updateElements(o,s,l,e)}addElements(){const{showLine:e}=this.options;!this.datasetElementType&&e&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(e,n,o,i){const s=i==="reset",{iScale:l,vScale:a,_stacked:d,_dataset:c}=this._cachedMeta,u=this.resolveDataElementOptions(n,i),f=this.getSharedOptions(u),h=this.includeOptions(i,f),p=l.axis,m=a.axis,{spanGaps:g,segment:y}=this.options,b=Ut(g)?g:Number.POSITIVE_INFINITY,$=this.chart._animationsDisabled||s||i==="none";let x=n>0&&this.getParsed(n-1);for(let S=n;S<n+o;++S){const C=e[S],V=this.getParsed(S),E=$?C:{},F=X(V[m]),N=E[p]=l.getPixelForValue(V[p],S),P=E[m]=s||F?a.getBasePixel():a.getPixelForValue(d?this.applyStack(a,V,d):V[m],S);E.skip=isNaN(N)||isNaN(P)||F,E.stop=S>0&&Math.abs(V[p]-x[p])>b,y&&(E.parsed=V,E.raw=c.data[S]),h&&(E.options=f||this.resolveDataElementOptions(S,C.active?"active":i)),$||this.updateElement(C,S,E,i),x=V}this.updateSharedOptions(f,i,u)}getMaxOverflow(){const e=this._cachedMeta,n=e.data||[];if(!this.options.showLine){let a=0;for(let d=n.length-1;d>=0;--d)a=Math.max(a,n[d].size(this.resolveDataElementOptions(d))/2);return a>0&&a}const o=e.dataset,i=o.options&&o.options.borderWidth||0;if(!n.length)return i;const s=n[0].size(this.resolveDataElementOptions(0)),l=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,s,l)/2}}I($o,"id","scatter"),I($o,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),I($o,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var dp=Object.freeze({__proto__:null,BarController:mo,BubbleController:go,DoughnutController:At,LineController:yo,PieController:ji,PolarAreaController:Cn,RadarController:bo,ScatterController:$o});function Ot(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Wi{constructor(e){I(this,"options");this.options=e||{}}static override(e){Object.assign(Wi.prototype,e)}init(){}formats(){return Ot()}parse(){return Ot()}format(){return Ot()}add(){return Ot()}diff(){return Ot()}startOf(){return Ot()}endOf(){return Ot()}}var cp={_date:Wi};function up(t,e,n,o){const{controller:i,data:s,_sorted:l}=t,a=i._cachedMeta.iScale;if(a&&e===a.axis&&e!=="r"&&l&&s.length){const d=a._reversePixels?Ff:et;if(o){if(i._sharedOptions){const c=s[0],u=typeof c.getRange=="function"&&c.getRange(e);if(u){const f=d(s,e,n-u),h=d(s,e,n+u);return{lo:f.lo,hi:h.hi}}}}else return d(s,e,n)}return{lo:0,hi:s.length-1}}function xn(t,e,n,o,i){const s=t.getSortedVisibleDatasetMetas(),l=n[e];for(let a=0,d=s.length;a<d;++a){const{index:c,data:u}=s[a],{lo:f,hi:h}=up(s[a],e,l,i);for(let p=f;p<=h;++p){const m=u[p];m.skip||o(m,c,p)}}}function fp(t){const e=t.indexOf("x")!==-1,n=t.indexOf("y")!==-1;return function(o,i){const s=e?Math.abs(o.x-i.x):0,l=n?Math.abs(o.y-i.y):0;return Math.sqrt(Math.pow(s,2)+Math.pow(l,2))}}function Yi(t,e,n,o,i){const s=[];return!i&&!t.isPointInArea(e)||xn(t,n,e,function(a,d,c){!i&&!tt(a,t.chartArea,0)||a.inRange(e.x,e.y,o)&&s.push({element:a,datasetIndex:d,index:c})},!0),s}function hp(t,e,n,o){let i=[];function s(l,a,d){const{startAngle:c,endAngle:u}=l.getProps(["startAngle","endAngle"],o),{angle:f}=js(l,{x:e.x,y:e.y});mn(f,c,u)&&i.push({element:l,datasetIndex:a,index:d})}return xn(t,n,e,s),i}function pp(t,e,n,o,i,s){let l=[];const a=fp(n);let d=Number.POSITIVE_INFINITY;function c(u,f,h){const p=u.inRange(e.x,e.y,i);if(o&&!p)return;const m=u.getCenterPoint(i);if(!(!!s||t.isPointInArea(m))&&!p)return;const y=a(e,m);y<d?(l=[{element:u,datasetIndex:f,index:h}],d=y):y===d&&l.push({element:u,datasetIndex:f,index:h})}return xn(t,n,e,c),l}function Ui(t,e,n,o,i,s){return!s&&!t.isPointInArea(e)?[]:n==="r"&&!o?hp(t,e,n,i):pp(t,e,n,o,i,s)}function Al(t,e,n,o,i){const s=[],l=n==="x"?"inXRange":"inYRange";let a=!1;return xn(t,n,e,(d,c,u)=>{d[l](e[n],i)&&(s.push({element:d,datasetIndex:c,index:u}),a=a||d.inRange(e.x,e.y,i))}),o&&!a?[]:s}var mp={evaluateInteractionItems:xn,modes:{index(t,e,n,o){const i=Ft(e,t),s=n.axis||"x",l=n.includeInvisible||!1,a=n.intersect?Yi(t,i,s,o,l):Ui(t,i,s,!1,o,l),d=[];return a.length?(t.getSortedVisibleDatasetMetas().forEach(c=>{const u=a[0].index,f=c.data[u];f&&!f.skip&&d.push({element:f,datasetIndex:c.index,index:u})}),d):[]},dataset(t,e,n,o){const i=Ft(e,t),s=n.axis||"xy",l=n.includeInvisible||!1;let a=n.intersect?Yi(t,i,s,o,l):Ui(t,i,s,!1,o,l);if(a.length>0){const d=a[0].datasetIndex,c=t.getDatasetMeta(d).data;a=[];for(let u=0;u<c.length;++u)a.push({element:c[u],datasetIndex:d,index:u})}return a},point(t,e,n,o){const i=Ft(e,t),s=n.axis||"xy",l=n.includeInvisible||!1;return Yi(t,i,s,o,l)},nearest(t,e,n,o){const i=Ft(e,t),s=n.axis||"xy",l=n.includeInvisible||!1;return Ui(t,i,s,n.intersect,o,l)},x(t,e,n,o){const i=Ft(e,t);return Al(t,i,"x",n.intersect,o)},y(t,e,n,o){const i=Ft(e,t);return Al(t,i,"y",n.intersect,o)}}};const Ol=["left","top","right","bottom"];function kn(t,e){return t.filter(n=>n.pos===e)}function Il(t,e){return t.filter(n=>Ol.indexOf(n.pos)===-1&&n.box.axis===e)}function Sn(t,e){return t.sort((n,o)=>{const i=e?o:n,s=e?n:o;return i.weight===s.weight?i.index-s.index:i.weight-s.weight})}function gp(t){const e=[];let n,o,i,s,l,a;for(n=0,o=(t||[]).length;n<o;++n)i=t[n],{position:s,options:{stack:l,stackWeight:a=1}}=i,e.push({index:n,box:i,pos:s,horizontal:i.isHorizontal(),weight:i.weight,stack:l&&s+l,stackWeight:a});return e}function yp(t){const e={};for(const n of t){const{stack:o,pos:i,stackWeight:s}=n;if(!o||!Ol.includes(i))continue;const l=e[o]||(e[o]={count:0,placed:0,weight:0,size:0});l.count++,l.weight+=s}return e}function bp(t,e){const n=yp(t),{vBoxMaxWidth:o,hBoxMaxHeight:i}=e;let s,l,a;for(s=0,l=t.length;s<l;++s){a=t[s];const{fullSize:d}=a.box,c=n[a.stack],u=c&&a.stackWeight/c.weight;a.horizontal?(a.width=u?u*o:d&&e.availableWidth,a.height=i):(a.width=o,a.height=u?u*i:d&&e.availableHeight)}return n}function $p(t){const e=gp(t),n=Sn(e.filter(c=>c.box.fullSize),!0),o=Sn(kn(e,"left"),!0),i=Sn(kn(e,"right")),s=Sn(kn(e,"top"),!0),l=Sn(kn(e,"bottom")),a=Il(e,"x"),d=Il(e,"y");return{fullSize:n,leftAndTop:o.concat(s),rightAndBottom:i.concat(d).concat(l).concat(a),chartArea:kn(e,"chartArea"),vertical:o.concat(i).concat(d),horizontal:s.concat(l).concat(a)}}function Tl(t,e,n,o){return Math.max(t[n],e[n])+Math.max(t[o],e[o])}function Ll(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function _p(t,e,n,o){const{pos:i,box:s}=n,l=t.maxPadding;if(!q(i)){n.size&&(t[i]-=n.size);const f=o[n.stack]||{size:0,count:1};f.size=Math.max(f.size,n.horizontal?s.height:s.width),n.size=f.size/f.count,t[i]+=n.size}s.getPadding&&Ll(l,s.getPadding());const a=Math.max(0,e.outerWidth-Tl(l,t,"left","right")),d=Math.max(0,e.outerHeight-Tl(l,t,"top","bottom")),c=a!==t.w,u=d!==t.h;return t.w=a,t.h=d,n.horizontal?{same:c,other:u}:{same:u,other:c}}function wp(t){const e=t.maxPadding;function n(o){const i=Math.max(e[o]-t[o],0);return t[o]+=i,i}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}function Cp(t,e){const n=e.maxPadding;function o(i){const s={left:0,top:0,right:0,bottom:0};return i.forEach(l=>{s[l]=Math.max(e[l],n[l])}),s}return o(t?["left","right"]:["top","bottom"])}function vn(t,e,n,o){const i=[];let s,l,a,d,c,u;for(s=0,l=t.length,c=0;s<l;++s){a=t[s],d=a.box,d.update(a.width||e.w,a.height||e.h,Cp(a.horizontal,e));const{same:f,other:h}=_p(e,n,a,o);c|=f&&i.length,u=u||h,d.fullSize||i.push(a)}return c&&vn(i,e,n,o)||u}function _o(t,e,n,o,i){t.top=n,t.left=e,t.right=e+o,t.bottom=n+i,t.width=o,t.height=i}function zl(t,e,n,o){const i=n.padding;let{x:s,y:l}=e;for(const a of t){const d=a.box,c=o[a.stack]||{count:1,placed:0,weight:1},u=a.stackWeight/c.weight||1;if(a.horizontal){const f=e.w*u,h=c.size||d.height;hn(c.start)&&(l=c.start),d.fullSize?_o(d,i.left,l,n.outerWidth-i.right-i.left,h):_o(d,e.left+c.placed,l,f,h),c.start=l,c.placed+=f,l=d.bottom}else{const f=e.h*u,h=c.size||d.width;hn(c.start)&&(s=c.start),d.fullSize?_o(d,s,i.top,h,n.outerHeight-i.bottom-i.top):_o(d,s,e.top+c.placed,h,f),c.start=s,c.placed+=f,s=d.right}}e.x=s,e.y=l}var $e={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(n){e.draw(n)}}]},t.boxes.push(e)},removeBox(t,e){const n=t.boxes?t.boxes.indexOf(e):-1;n!==-1&&t.boxes.splice(n,1)},configure(t,e,n){e.fullSize=n.fullSize,e.position=n.position,e.weight=n.weight},update(t,e,n,o){if(!t)return;const i=be(t.options.layout.padding),s=Math.max(e-i.width,0),l=Math.max(n-i.height,0),a=$p(t.boxes),d=a.vertical,c=a.horizontal;ee(t.boxes,g=>{typeof g.beforeLayout=="function"&&g.beforeLayout()});const u=d.reduce((g,y)=>y.box.options&&y.box.options.display===!1?g:g+1,0)||1,f=Object.freeze({outerWidth:e,outerHeight:n,padding:i,availableWidth:s,availableHeight:l,vBoxMaxWidth:s/2/u,hBoxMaxHeight:l/2}),h=Object.assign({},i);Ll(h,be(o));const p=Object.assign({maxPadding:h,w:s,h:l,x:i.left,y:i.top},i),m=bp(d.concat(c),f);vn(a.fullSize,p,f,m),vn(d,p,f,m),vn(c,p,f,m)&&vn(d,p,f,m),wp(p),zl(a.leftAndTop,p,f,m),p.x+=p.w,p.y+=p.h,zl(a.rightAndBottom,p,f,m),t.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},ee(a.chartArea,g=>{const y=g.box;Object.assign(y,t.chartArea),y.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})})}};class Hl{acquireContext(e,n){}releaseContext(e){return!1}addEventListener(e,n,o){}removeEventListener(e,n,o){}getDevicePixelRatio(){return 1}getMaximumSize(e,n,o,i){return n=Math.max(0,n||e.width),o=o||e.height,{width:n,height:Math.max(0,i?Math.floor(n/i):o)}}isAttached(e){return!0}updateConfig(e){}}class xp extends Hl{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const wo="$chartjs",kp={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},jl=t=>t===null||t==="";function Sp(t,e){const n=t.style,o=t.getAttribute("height"),i=t.getAttribute("width");if(t[wo]={initial:{height:o,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",jl(i)){const s=pl(t,"width");s!==void 0&&(t.width=s)}if(jl(o))if(t.style.height==="")t.height=t.width/(e||2);else{const s=pl(t,"height");s!==void 0&&(t.height=s)}return t}const Wl=Mh?{passive:!0}:!1;function vp(t,e,n){t&&t.addEventListener(e,n,Wl)}function Mp(t,e,n){t&&t.canvas&&t.canvas.removeEventListener(e,n,Wl)}function Dp(t,e){const n=kp[t.type]||t.type,{x:o,y:i}=Ft(t,e);return{type:n,chart:e,native:t,x:o!==void 0?o:null,y:i!==void 0?i:null}}function Co(t,e){for(const n of t)if(n===e||n.contains(e))return!0}function Ep(t,e,n){const o=t.canvas,i=new MutationObserver(s=>{let l=!1;for(const a of s)l=l||Co(a.addedNodes,o),l=l&&!Co(a.removedNodes,o);l&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function Bp(t,e,n){const o=t.canvas,i=new MutationObserver(s=>{let l=!1;for(const a of s)l=l||Co(a.removedNodes,o),l=l&&!Co(a.addedNodes,o);l&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const Mn=new Map;let Yl=0;function Ul(){const t=window.devicePixelRatio;t!==Yl&&(Yl=t,Mn.forEach((e,n)=>{n.currentDevicePixelRatio!==t&&e()}))}function Vp(t,e){Mn.size||window.addEventListener("resize",Ul),Mn.set(t,e)}function Pp(t){Mn.delete(t),Mn.size||window.removeEventListener("resize",Ul)}function Rp(t,e,n){const o=t.canvas,i=o&&Ti(o);if(!i)return;const s=qs((a,d)=>{const c=i.clientWidth;n(a,d),c<i.clientWidth&&n()},window),l=new ResizeObserver(a=>{const d=a[0],c=d.contentRect.width,u=d.contentRect.height;c===0&&u===0||s(c,u)});return l.observe(i),Vp(t,s),l}function Gi(t,e,n){n&&n.disconnect(),e==="resize"&&Pp(t)}function Fp(t,e,n){const o=t.canvas,i=qs(s=>{t.ctx!==null&&n(Dp(s,t))},t);return vp(o,e,i),i}class Np extends Hl{acquireContext(e,n){const o=e&&e.getContext&&e.getContext("2d");return o&&o.canvas===e?(Sp(e,n),o):null}releaseContext(e){const n=e.canvas;if(!n[wo])return!1;const o=n[wo].initial;["height","width"].forEach(s=>{const l=o[s];X(l)?n.removeAttribute(s):n.setAttribute(s,l)});const i=o.style||{};return Object.keys(i).forEach(s=>{n.style[s]=i[s]}),n.width=n.width,delete n[wo],!0}addEventListener(e,n,o){this.removeEventListener(e,n);const i=e.$proxies||(e.$proxies={}),l={attach:Ep,detach:Bp,resize:Rp}[n]||Fp;i[n]=l(e,n,o)}removeEventListener(e,n){const o=e.$proxies||(e.$proxies={}),i=o[n];if(!i)return;({attach:Gi,detach:Gi,resize:Gi}[n]||Mp)(e,n,i),o[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,n,o,i){return vh(e,n,o,i)}isAttached(e){const n=Ti(e);return!!(n&&n.isConnected)}}function Ap(t){return!Ii()||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas?xp:Np}let ot=(fi=class{constructor(){I(this,"x");I(this,"y");I(this,"active",!1);I(this,"options");I(this,"$animations")}tooltipPosition(e){const{x:n,y:o}=this.getProps(["x","y"],e);return{x:n,y:o}}hasValue(){return Ut(this.x)&&Ut(this.y)}getProps(e,n){const o=this.$animations;if(!n||!o)return this;const i={};return e.forEach(s=>{i[s]=o[s]&&o[s].active()?o[s]._to:this[s]}),i}},I(fi,"defaults",{}),I(fi,"defaultRoutes"),fi);function Op(t,e){const n=t.options.ticks,o=Ip(t),i=Math.min(n.maxTicksLimit||o,o),s=n.major.enabled?Lp(e):[],l=s.length,a=s[0],d=s[l-1],c=[];if(l>i)return zp(e,c,s,l/i),c;const u=Tp(s,e,i);if(l>0){let f,h;const p=l>1?Math.round((d-a)/(l-1)):null;for(xo(e,c,u,X(p)?0:a-p,a),f=0,h=l-1;f<h;f++)xo(e,c,u,s[f],s[f+1]);return xo(e,c,u,d,X(p)?e.length:d+p),c}return xo(e,c,u),c}function Ip(t){const e=t.options.offset,n=t._tickSize(),o=t._length/n+(e?0:1),i=t._maxLength/n;return Math.floor(Math.min(o,i))}function Tp(t,e,n){const o=Hp(t),i=e.length/n;if(!o)return Math.max(i,1);const s=Bf(o);for(let l=0,a=s.length-1;l<a;l++){const d=s[l];if(d>i)return d}return Math.max(i,1)}function Lp(t){const e=[];let n,o;for(n=0,o=t.length;n<o;n++)t[n].major&&e.push(n);return e}function zp(t,e,n,o){let i=0,s=n[0],l;for(o=Math.ceil(o),l=0;l<t.length;l++)l===s&&(e.push(t[l]),i++,s=n[i*o])}function xo(t,e,n,o,i){const s=Y(o,0),l=Math.min(Y(i,t.length),t.length);let a=0,d,c,u;for(n=Math.ceil(n),i&&(d=i-o,n=d/Math.floor(d/n)),u=s;u<0;)a++,u=Math.round(s+a*n);for(c=Math.max(s,0);c<l;c++)c===u&&(e.push(t[c]),a++,u=Math.round(s+a*n))}function Hp(t){const e=t.length;let n,o;if(e<2)return!1;for(o=t[0],n=1;n<e;++n)if(t[n]-t[n-1]!==o)return!1;return o}const jp=t=>t==="left"?"right":t==="right"?"left":t,Gl=(t,e,n)=>e==="top"||e==="left"?t[e]+n:t[e]-n,ql=(t,e)=>Math.min(e||t,t);function Xl(t,e){const n=[],o=t.length/e,i=t.length;let s=0;for(;s<i;s+=o)n.push(t[Math.floor(s)]);return n}function Wp(t,e,n){const o=t.ticks.length,i=Math.min(e,o-1),s=t._startPixel,l=t._endPixel,a=1e-6;let d=t.getPixelForTick(i),c;if(!(n&&(o===1?c=Math.max(d-s,l-d):e===0?c=(t.getPixelForTick(1)-d)/2:c=(d-t.getPixelForTick(i-1))/2,d+=i<e?c:-c,d<s-a||d>l+a)))return d}function Yp(t,e){ee(t,n=>{const o=n.gc,i=o.length/2;let s;if(i>e){for(s=0;s<i;++s)delete n.data[o[s]];o.splice(0,i)}})}function Dn(t){return t.drawTicks?t.tickLength:0}function Kl(t,e){if(!t.display)return 0;const n=he(t.font,e),o=be(t.padding);return(oe(t.text)?t.text.length:1)*n.lineHeight+o.height}function Up(t,e){return bt(t,{scale:e,type:"scale"})}function Gp(t,e,n){return bt(t,{tick:n,index:e,type:"tick"})}function qp(t,e,n){let o=Di(t);return(n&&e!=="right"||!n&&e==="right")&&(o=jp(o)),o}function Xp(t,e,n,o){const{top:i,left:s,bottom:l,right:a,chart:d}=t,{chartArea:c,scales:u}=d;let f=0,h,p,m;const g=l-i,y=a-s;if(t.isHorizontal()){if(p=ye(o,s,a),q(n)){const b=Object.keys(n)[0],$=n[b];m=u[b].getPixelForValue($)+g-e}else n==="center"?m=(c.bottom+c.top)/2+g-e:m=Gl(t,n,e);h=a-s}else{if(q(n)){const b=Object.keys(n)[0],$=n[b];p=u[b].getPixelForValue($)-y+e}else n==="center"?p=(c.left+c.right)/2-y+e:p=Gl(t,n,e);m=ye(o,l,i),f=n==="left"?-ue:ue}return{titleX:p,titleY:m,maxWidth:h,rotation:f}}class It extends ot{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.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(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,n){return e}getUserBounds(){let{_userMin:e,_userMax:n,_suggestedMin:o,_suggestedMax:i}=this;return e=De(e,Number.POSITIVE_INFINITY),n=De(n,Number.NEGATIVE_INFINITY),o=De(o,Number.POSITIVE_INFINITY),i=De(i,Number.NEGATIVE_INFINITY),{min:De(e,o),max:De(n,i),minDefined:de(e),maxDefined:de(n)}}getMinMax(e){let{min:n,max:o,minDefined:i,maxDefined:s}=this.getUserBounds(),l;if(i&&s)return{min:n,max:o};const a=this.getMatchingVisibleMetas();for(let d=0,c=a.length;d<c;++d)l=a[d].controller.getMinMax(this,e),i||(n=Math.min(n,l.min)),s||(o=Math.max(o,l.max));return n=s&&n>o?o:n,o=i&&n>o?n:o,{min:De(n,De(o,n)),max:De(o,De(n,o))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){ne(this.options.beforeUpdate,[this])}update(e,n,o){const{beginAtZero:i,grace:s,ticks:l}=this.options,a=l.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=n,this._margins=o=Object.assign({left:0,right:0,top:0,bottom:0},o),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+o.left+o.right:this.height+o.top+o.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=ih(this,s,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const d=a<this.ticks.length;this._convertTicksToLabels(d?Xl(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),l.display&&(l.autoSkip||l.source==="auto")&&(this.ticks=Op(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),d&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e=this.options.reverse,n,o;this.isHorizontal()?(n=this.left,o=this.right):(n=this.top,o=this.bottom,e=!e),this._startPixel=n,this._endPixel=o,this._reversePixels=e,this._length=o-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){ne(this.options.afterUpdate,[this])}beforeSetDimensions(){ne(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(){ne(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),ne(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){ne(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const n=this.options.ticks;let o,i,s;for(o=0,i=e.length;o<i;o++)s=e[o],s.label=ne(n.callback,[s.value,o,e],this)}afterTickToLabelConversion(){ne(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){ne(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,n=e.ticks,o=ql(this.ticks.length,e.ticks.maxTicksLimit),i=n.minRotation||0,s=n.maxRotation;let l=i,a,d,c;if(!this._isVisible()||!n.display||i>=s||o<=1||!this.isHorizontal()){this.labelRotation=i;return}const u=this._getLabelSizes(),f=u.widest.width,h=u.highest.height,p=me(this.chart.width-f,0,this.maxWidth);a=e.offset?this.maxWidth/o:p/(o-1),f+6>a&&(a=p/(o-(e.offset?.5:1)),d=this.maxHeight-Dn(e.grid)-n.padding-Kl(e.title,this.chart.options.font),c=Math.sqrt(f*f+h*h),l=Si(Math.min(Math.asin(me((u.highest.height+6)/a,-1,1)),Math.asin(me(d/c,-1,1))-Math.asin(me(h/c,-1,1)))),l=Math.max(i,Math.min(s,l))),this.labelRotation=l}afterCalculateLabelRotation(){ne(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){ne(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:n,options:{ticks:o,title:i,grid:s}}=this,l=this._isVisible(),a=this.isHorizontal();if(l){const d=Kl(i,n.options.font);if(a?(e.width=this.maxWidth,e.height=Dn(s)+d):(e.height=this.maxHeight,e.width=Dn(s)+d),o.display&&this.ticks.length){const{first:c,last:u,widest:f,highest:h}=this._getLabelSizes(),p=o.padding*2,m=Ie(this.labelRotation),g=Math.cos(m),y=Math.sin(m);if(a){const b=o.mirror?0:y*f.width+g*h.height;e.height=Math.min(this.maxHeight,e.height+b+p)}else{const b=o.mirror?0:g*f.width+y*h.height;e.width=Math.min(this.maxWidth,e.width+b+p)}this._calculatePadding(c,u,y,g)}}this._handleMargins(),a?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,n,o,i){const{ticks:{align:s,padding:l},position:a}=this.options,d=this.labelRotation!==0,c=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,f=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,p=0;d?c?(h=i*e.width,p=o*n.height):(h=o*e.height,p=i*n.width):s==="start"?p=n.width:s==="end"?h=e.width:s!=="inner"&&(h=e.width/2,p=n.width/2),this.paddingLeft=Math.max((h-u+l)*this.width/(this.width-u),0),this.paddingRight=Math.max((p-f+l)*this.width/(this.width-f),0)}else{let u=n.height/2,f=e.height/2;s==="start"?(u=0,f=e.height):s==="end"&&(u=n.height,f=0),this.paddingTop=u+l,this.paddingBottom=f+l}}_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(){ne(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:n}=this.options;return n==="top"||n==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let n,o;for(n=0,o=e.length;n<o;n++)X(e[n].label)&&(e.splice(n,1),o--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const n=this.options.ticks.sampleSize;let o=this.ticks;n<o.length&&(o=Xl(o,n)),this._labelSizes=e=this._computeLabelSizes(o,o.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,n,o){const{ctx:i,_longestTextCache:s}=this,l=[],a=[],d=Math.floor(n/ql(n,o));let c=0,u=0,f,h,p,m,g,y,b,$,x,S,C;for(f=0;f<n;f+=d){if(m=e[f].label,g=this._resolveTickFontOptions(f),i.font=y=g.string,b=s[y]=s[y]||{data:{},gc:[]},$=g.lineHeight,x=S=0,!X(m)&&!oe(m))x=lo(i,b.data,b.gc,x,m),S=$;else if(oe(m))for(h=0,p=m.length;h<p;++h)C=m[h],!X(C)&&!oe(C)&&(x=lo(i,b.data,b.gc,x,C),S+=$);l.push(x),a.push(S),c=Math.max(x,c),u=Math.max(S,u)}Yp(s,n);const V=l.indexOf(c),E=a.indexOf(u),F=N=>({width:l[N]||0,height:a[N]||0});return{first:F(0),last:F(n-1),widest:F(V),highest:F(E),widths:l,heights:a}}getLabelForValue(e){return e}getPixelForValue(e,n){return NaN}getValueForPixel(e){}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const n=this._startPixel+e*this._length;return Rf(this._alignToPixels?Bt(this.chart,n,0):n)}getDecimalForPixel(e){const n=(e-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:n}=this;return e<0&&n<0?n:e>0&&n>0?e:0}getContext(e){const n=this.ticks||[];if(e>=0&&e<n.length){const o=n[e];return o.$context||(o.$context=Gp(this.getContext(),e,o))}return this.$context||(this.$context=Up(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,n=Ie(this.labelRotation),o=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),s=this._getLabelSizes(),l=e.autoSkipPadding||0,a=s?s.widest.width+l:0,d=s?s.highest.height+l:0;return this.isHorizontal()?d*o>a*i?a/o:d/i:d*i<a*o?d/o:a/i}_isVisible(){const e=this.options.display;return e!=="auto"?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const n=this.axis,o=this.chart,i=this.options,{grid:s,position:l,border:a}=i,d=s.offset,c=this.isHorizontal(),f=this.ticks.length+(d?1:0),h=Dn(s),p=[],m=a.setContext(this.getContext()),g=m.display?m.width:0,y=g/2,b=function(k){return Bt(o,k,g)};let $,x,S,C,V,E,F,N,P,w,_,D;if(l==="top")$=b(this.bottom),E=this.bottom-h,N=$-y,w=b(e.top)+y,D=e.bottom;else if(l==="bottom")$=b(this.top),w=e.top,D=b(e.bottom)-y,E=$+y,N=this.top+h;else if(l==="left")$=b(this.right),V=this.right-h,F=$-y,P=b(e.left)+y,_=e.right;else if(l==="right")$=b(this.left),P=e.left,_=b(e.right)-y,V=$+y,F=this.left+h;else if(n==="x"){if(l==="center")$=b((e.top+e.bottom)/2+.5);else if(q(l)){const k=Object.keys(l)[0],B=l[k];$=b(this.chart.scales[k].getPixelForValue(B))}w=e.top,D=e.bottom,E=$+y,N=E+h}else if(n==="y"){if(l==="center")$=b((e.left+e.right)/2);else if(q(l)){const k=Object.keys(l)[0],B=l[k];$=b(this.chart.scales[k].getPixelForValue(B))}V=$-y,F=V-h,P=e.left,_=e.right}const v=Y(i.ticks.maxTicksLimit,f),M=Math.max(1,Math.ceil(f/v));for(x=0;x<f;x+=M){const k=this.getContext(x),B=s.setContext(k),O=a.setContext(k),L=B.lineWidth,T=B.color,W=O.dash||[],U=O.dashOffset,G=B.tickWidth,Q=B.tickColor,le=B.tickBorderDash||[],fe=B.tickBorderDashOffset;S=Wp(this,x,d),S!==void 0&&(C=Bt(o,S,L),c?V=F=P=_=C:E=N=w=D=C,p.push({tx1:V,ty1:E,tx2:F,ty2:N,x1:P,y1:w,x2:_,y2:D,width:L,color:T,borderDash:W,borderDashOffset:U,tickWidth:G,tickColor:Q,tickBorderDash:le,tickBorderDashOffset:fe}))}return this._ticksLength=f,this._borderValue=$,p}_computeLabelItems(e){const n=this.axis,o=this.options,{position:i,ticks:s}=o,l=this.isHorizontal(),a=this.ticks,{align:d,crossAlign:c,padding:u,mirror:f}=s,h=Dn(o.grid),p=h+u,m=f?-u:p,g=-Ie(this.labelRotation),y=[];let b,$,x,S,C,V,E,F,N,P,w,_,D="middle";if(i==="top")V=this.bottom-m,E=this._getXAxisLabelAlignment();else if(i==="bottom")V=this.top+m,E=this._getXAxisLabelAlignment();else if(i==="left"){const M=this._getYAxisLabelAlignment(h);E=M.textAlign,C=M.x}else if(i==="right"){const M=this._getYAxisLabelAlignment(h);E=M.textAlign,C=M.x}else if(n==="x"){if(i==="center")V=(e.top+e.bottom)/2+p;else if(q(i)){const M=Object.keys(i)[0],k=i[M];V=this.chart.scales[M].getPixelForValue(k)+p}E=this._getXAxisLabelAlignment()}else if(n==="y"){if(i==="center")C=(e.left+e.right)/2-p;else if(q(i)){const M=Object.keys(i)[0],k=i[M];C=this.chart.scales[M].getPixelForValue(k)}E=this._getYAxisLabelAlignment(h).textAlign}n==="y"&&(d==="start"?D="top":d==="end"&&(D="bottom"));const v=this._getLabelSizes();for(b=0,$=a.length;b<$;++b){x=a[b],S=x.label;const M=s.setContext(this.getContext(b));F=this.getPixelForTick(b)+s.labelOffset,N=this._resolveTickFontOptions(b),P=N.lineHeight,w=oe(S)?S.length:1;const k=w/2,B=M.color,O=M.textStrokeColor,L=M.textStrokeWidth;let T=E;l?(C=F,E==="inner"&&(b===$-1?T=this.options.reverse?"left":"right":b===0?T=this.options.reverse?"right":"left":T="center"),i==="top"?c==="near"||g!==0?_=-w*P+P/2:c==="center"?_=-v.highest.height/2-k*P+P:_=-v.highest.height+P/2:c==="near"||g!==0?_=P/2:c==="center"?_=v.highest.height/2-k*P:_=v.highest.height-w*P,f&&(_*=-1),g!==0&&!M.showLabelBackdrop&&(C+=P/2*Math.sin(g))):(V=F,_=(1-w)*P/2);let W;if(M.showLabelBackdrop){const U=be(M.backdropPadding),G=v.heights[b],Q=v.widths[b];let le=_-U.top,fe=0-U.left;switch(D){case"middle":le-=G/2;break;case"bottom":le-=G;break}switch(E){case"center":fe-=Q/2;break;case"right":fe-=Q;break;case"inner":b===$-1?fe-=Q:b>0&&(fe-=Q/2);break}W={left:fe,top:le,width:Q+U.width,height:G+U.height,color:M.backdropColor}}y.push({label:S,font:N,textOffset:_,options:{rotation:g,color:B,strokeColor:O,strokeWidth:L,textAlign:T,textBaseline:D,translation:[C,V],backdrop:W}})}return y}_getXAxisLabelAlignment(){const{position:e,ticks:n}=this.options;if(-Ie(this.labelRotation))return e==="top"?"left":"right";let i="center";return n.align==="start"?i="left":n.align==="end"?i="right":n.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(e){const{position:n,ticks:{crossAlign:o,mirror:i,padding:s}}=this.options,l=this._getLabelSizes(),a=e+s,d=l.widest.width;let c,u;return n==="left"?i?(u=this.right+s,o==="near"?c="left":o==="center"?(c="center",u+=d/2):(c="right",u+=d)):(u=this.right-a,o==="near"?c="right":o==="center"?(c="center",u-=d/2):(c="left",u=this.left)):n==="right"?i?(u=this.left+s,o==="near"?c="right":o==="center"?(c="center",u-=d/2):(c="left",u-=d)):(u=this.left+a,o==="near"?c="left":o==="center"?(c="center",u+=d/2):(c="right",u=this.right)):c="right",{textAlign:c,x:u}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:e.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){const{ctx:e,options:{backgroundColor:n},left:o,top:i,width:s,height:l}=this;n&&(e.save(),e.fillStyle=n,e.fillRect(o,i,s,l),e.restore())}getLineWidthForValue(e){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const i=this.ticks.findIndex(s=>s.value===e);return i>=0?n.setContext(this.getContext(i)).lineWidth:0}drawGrid(e){const n=this.options.grid,o=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let s,l;const a=(d,c,u)=>{!u.width||!u.color||(o.save(),o.lineWidth=u.width,o.strokeStyle=u.color,o.setLineDash(u.borderDash||[]),o.lineDashOffset=u.borderDashOffset,o.beginPath(),o.moveTo(d.x,d.y),o.lineTo(c.x,c.y),o.stroke(),o.restore())};if(n.display)for(s=0,l=i.length;s<l;++s){const d=i[s];n.drawOnChartArea&&a({x:d.x1,y:d.y1},{x:d.x2,y:d.y2},d),n.drawTicks&&a({x:d.tx1,y:d.ty1},{x:d.tx2,y:d.ty2},{color:d.tickColor,width:d.tickWidth,borderDash:d.tickBorderDash,borderDashOffset:d.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:n,options:{border:o,grid:i}}=this,s=o.setContext(this.getContext()),l=o.display?s.width:0;if(!l)return;const a=i.setContext(this.getContext(0)).lineWidth,d=this._borderValue;let c,u,f,h;this.isHorizontal()?(c=Bt(e,this.left,l)-l/2,u=Bt(e,this.right,a)+a/2,f=h=d):(f=Bt(e,this.top,l)-l/2,h=Bt(e,this.bottom,a)+a/2,c=u=d),n.save(),n.lineWidth=s.width,n.strokeStyle=s.color,n.beginPath(),n.moveTo(c,f),n.lineTo(u,h),n.stroke(),n.restore()}drawLabels(e){if(!this.options.ticks.display)return;const o=this.ctx,i=this._computeLabelArea();i&&ao(o,i);const s=this.getLabelItems(e);for(const l of s){const a=l.options,d=l.font,c=l.label,u=l.textOffset;Vt(o,c,0,u,d,a)}i&&co(o)}drawTitle(){const{ctx:e,options:{position:n,title:o,reverse:i}}=this;if(!o.display)return;const s=he(o.font),l=be(o.padding),a=o.align;let d=s.lineHeight/2;n==="bottom"||n==="center"||q(n)?(d+=l.bottom,oe(o.text)&&(d+=s.lineHeight*(o.text.length-1))):d+=l.top;const{titleX:c,titleY:u,maxWidth:f,rotation:h}=Xp(this,d,n,a);Vt(e,o.text,0,0,s,{color:o.color,maxWidth:f,rotation:h,textAlign:qp(a,n,i),textBaseline:"middle",translation:[c,u]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){const e=this.options,n=e.ticks&&e.ticks.z||0,o=Y(e.grid&&e.grid.z,-1),i=Y(e.border&&e.border.z,0);return!this._isVisible()||this.draw!==It.prototype.draw?[{z:n,draw:s=>{this.draw(s)}}]:[{z:o,draw:s=>{this.drawBackground(),this.drawGrid(s),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:s=>{this.drawLabels(s)}}]}getMatchingVisibleMetas(e){const n=this.chart.getSortedVisibleDatasetMetas(),o=this.axis+"AxisID",i=[];let s,l;for(s=0,l=n.length;s<l;++s){const a=n[s];a[o]===this.id&&(!e||a.type===e)&&i.push(a)}return i}_resolveTickFontOptions(e){const n=this.options.ticks.setContext(this.getContext(e));return he(n.font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class ko{constructor(e,n,o){this.type=e,this.scope=n,this.override=o,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const n=Object.getPrototypeOf(e);let o;Jp(n)&&(o=this.register(n));const i=this.items,s=e.id,l=this.scope+"."+s;if(!s)throw new Error("class does not have id: "+e);return s in i||(i[s]=e,Kp(e,l,o),this.override&&ce.override(e.id,e.overrides)),l}get(e){return this.items[e]}unregister(e){const n=this.items,o=e.id,i=this.scope;o in n&&delete n[o],i&&o in ce[i]&&(delete ce[i][o],this.override&&delete Et[o])}}function Kp(t,e,n){const o=un(Object.create(null),[n?ce.get(n):{},ce.get(e),t.defaults]);ce.set(e,o),t.defaultRoutes&&Zp(e,t.defaultRoutes),t.descriptors&&ce.describe(e,t.descriptors)}function Zp(t,e){Object.keys(e).forEach(n=>{const o=n.split("."),i=o.pop(),s=[t].concat(o).join("."),l=e[n].split("."),a=l.pop(),d=l.join(".");ce.route(s,i,d,a)})}function Jp(t){return"id"in t&&"defaults"in t}class Qp{constructor(){this.controllers=new ko(Te,"datasets",!0),this.elements=new ko(ot,"elements"),this.plugins=new ko(Object,"plugins"),this.scales=new ko(It,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,n,o){[...n].forEach(i=>{const s=o||this._getRegistryForType(i);o||s.isForType(i)||s===this.plugins&&i.id?this._exec(e,s,i):ee(i,l=>{const a=o||this._getRegistryForType(l);this._exec(e,a,l)})})}_exec(e,n,o){const i=ki(e);ne(o["before"+i],[],o),n[e](o),ne(o["after"+i],[],o)}_getRegistryForType(e){for(let n=0;n<this._typedRegistries.length;n++){const o=this._typedRegistries[n];if(o.isForType(e))return o}return this.plugins}_get(e,n,o){const i=n.get(e);if(i===void 0)throw new Error('"'+e+'" is not a registered '+o+".");return i}}var Ue=new Qp;class em{constructor(){this._init=[]}notify(e,n,o,i){n==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));const s=i?this._descriptors(e).filter(i):this._descriptors(e),l=this._notify(s,e,n,o);return n==="afterDestroy"&&(this._notify(s,e,"stop"),this._notify(this._init,e,"uninstall")),l}_notify(e,n,o,i){i=i||{};for(const s of e){const l=s.plugin,a=l[o],d=[n,i,s.options];if(ne(a,d,l)===!1&&i.cancelable)return!1}return!0}invalidate(){X(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),n}_createDescriptors(e,n){const o=e&&e.config,i=Y(o.options&&o.options.plugins,{}),s=tm(o);return i===!1&&!n?[]:om(e,s,i,n)}_notifyStateChanges(e){const n=this._oldCache||[],o=this._cache,i=(s,l)=>s.filter(a=>!l.some(d=>a.plugin.id===d.plugin.id));this._notify(i(n,o),e,"stop"),this._notify(i(o,n),e,"start")}}function tm(t){const e={},n=[],o=Object.keys(Ue.plugins.items);for(let s=0;s<o.length;s++)n.push(Ue.getPlugin(o[s]));const i=t.plugins||[];for(let s=0;s<i.length;s++){const l=i[s];n.indexOf(l)===-1&&(n.push(l),e[l.id]=!0)}return{plugins:n,localIds:e}}function nm(t,e){return!e&&t===!1?null:t===!0?{}:t}function om(t,{plugins:e,localIds:n},o,i){const s=[],l=t.getContext();for(const a of e){const d=a.id,c=nm(o[d],i);c!==null&&s.push({plugin:a,options:im(t.config,{plugin:a,local:n[d]},c,l)})}return s}function im(t,{plugin:e,local:n},o,i){const s=t.pluginScopeKeys(e),l=t.getOptionScopes(o,s);return n&&e.defaults&&l.push(e.defaults),t.createResolver(l,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function qi(t,e){const n=ce.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||n.indexAxis||"x"}function rm(t,e){let n=t;return t==="_index_"?n=e:t==="_value_"&&(n=e==="x"?"y":"x"),n}function sm(t,e){return t===e?"_index_":"_value_"}function Zl(t){if(t==="x"||t==="y"||t==="r")return t}function lm(t){if(t==="top"||t==="bottom")return"x";if(t==="left"||t==="right")return"y"}function Xi(t,...e){if(Zl(t))return t;for(const n of e){const o=n.axis||lm(n.position)||t.length>1&&Zl(t[0].toLowerCase());if(o)return o}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function Jl(t,e,n){if(n[e+"AxisID"]===t)return{axis:e}}function am(t,e){if(e.data&&e.data.datasets){const n=e.data.datasets.filter(o=>o.xAxisID===t||o.yAxisID===t);if(n.length)return Jl(t,"x",n[0])||Jl(t,"y",n[0])}return{}}function dm(t,e){const n=Et[t.type]||{scales:{}},o=e.scales||{},i=qi(t.type,e),s=Object.create(null);return Object.keys(o).forEach(l=>{const a=o[l];if(!q(a))return console.error(`Invalid scale configuration for scale: ${l}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${l}`);const d=Xi(l,a,am(l,t),ce.scales[a.type]),c=sm(d,i),u=n.scales||{};s[l]=fn(Object.create(null),[{axis:d},a,u[d],u[c]])}),t.data.datasets.forEach(l=>{const a=l.type||t.type,d=l.indexAxis||qi(a,e),u=(Et[a]||{}).scales||{};Object.keys(u).forEach(f=>{const h=rm(f,d),p=l[h+"AxisID"]||h;s[p]=s[p]||Object.create(null),fn(s[p],[{axis:h},o[p],u[f]])})}),Object.keys(s).forEach(l=>{const a=s[l];fn(a,[ce.scales[a.type],ce.scale])}),s}function Ql(t){const e=t.options||(t.options={});e.plugins=Y(e.plugins,{}),e.scales=dm(t,e)}function ea(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function cm(t){return t=t||{},t.data=ea(t.data),Ql(t),t}const ta=new Map,na=new Set;function So(t,e){let n=ta.get(t);return n||(n=e(),ta.set(t,n),na.add(n)),n}const En=(t,e,n)=>{const o=mt(e,n);o!==void 0&&t.add(o)};class um{constructor(e){this._config=cm(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=ea(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),Ql(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return So(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,n){return So(`${e}.transition.${n}`,()=>[[`datasets.${e}.transitions.${n}`,`transitions.${n}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,n){return So(`${e}-${n}`,()=>[[`datasets.${e}.elements.${n}`,`datasets.${e}`,`elements.${n}`,""]])}pluginScopeKeys(e){const n=e.id,o=this.type;return So(`${o}-plugin-${n}`,()=>[[`plugins.${n}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,n){const o=this._scopeCache;let i=o.get(e);return(!i||n)&&(i=new Map,o.set(e,i)),i}getOptionScopes(e,n,o){const{options:i,type:s}=this,l=this._cachedScopes(e,o),a=l.get(n);if(a)return a;const d=new Set;n.forEach(u=>{e&&(d.add(e),u.forEach(f=>En(d,e,f))),u.forEach(f=>En(d,i,f)),u.forEach(f=>En(d,Et[s]||{},f)),u.forEach(f=>En(d,ce,f)),u.forEach(f=>En(d,Vi,f))});const c=Array.from(d);return c.length===0&&c.push(Object.create(null)),na.has(n)&&l.set(n,c),c}chartOptionScopes(){const{options:e,type:n}=this;return[e,Et[n]||{},ce.datasets[n]||{},{type:n},ce,Vi]}resolveNamedOptions(e,n,o,i=[""]){const s={$shared:!0},{resolver:l,subPrefixes:a}=oa(this._resolverCache,e,i);let d=l;if(hm(l,n)){s.$shared=!1,o=gt(o)?o():o;const c=this.createResolver(e,o,a);d=Gt(l,o,c)}for(const c of n)s[c]=d[c];return s}createResolver(e,n,o=[""],i){const{resolver:s}=oa(this._resolverCache,e,o);return q(n)?Gt(s,n,void 0,i):s}}function oa(t,e,n){let o=t.get(e);o||(o=new Map,t.set(e,o));const i=n.join();let s=o.get(i);return s||(s={resolver:Ni(e,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},o.set(i,s)),s}const fm=t=>q(t)&&Object.getOwnPropertyNames(t).some(e=>gt(t[e]));function hm(t,e){const{isScriptable:n,isIndexable:o}=rl(t);for(const i of e){const s=n(i),l=o(i),a=(l||s)&&t[i];if(s&&(gt(a)||fm(a))||l&&oe(a))return!0}return!1}var pm="4.4.2";const mm=["top","bottom","left","right","chartArea"];function ia(t,e){return t==="top"||t==="bottom"||mm.indexOf(t)===-1&&e==="x"}function ra(t,e){return function(n,o){return n[t]===o[t]?n[e]-o[e]:n[t]-o[t]}}function sa(t){const e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),ne(n&&n.onComplete,[t],e)}function gm(t){const e=t.chart,n=e.options.animation;ne(n&&n.onProgress,[t],e)}function la(t){return Ii()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const vo={},aa=t=>{const e=la(t);return Object.values(vo).filter(n=>n.canvas===e).pop()};function ym(t,e,n){const o=Object.keys(t);for(const i of o){const s=+i;if(s>=e){const l=t[i];delete t[i],(n>0||s>e)&&(t[s+n]=l)}}}function bm(t,e,n,o){return!n||t.type==="mouseout"?null:o?e:t}function Mo(t,e,n){return t.options.clip?t[n]:e[n]}function $m(t,e){const{xScale:n,yScale:o}=t;return n&&o?{left:Mo(n,e,"left"),right:Mo(n,e,"right"),top:Mo(o,e,"top"),bottom:Mo(o,e,"bottom")}:e}class Le{static register(...e){Ue.add(...e),da()}static unregister(...e){Ue.remove(...e),da()}constructor(e,n){const o=this.config=new um(n),i=la(e),s=aa(i);if(s)throw new Error("Canvas is already in use. Chart with ID '"+s.id+"' must be destroyed before the canvas with ID '"+s.canvas.id+"' can be reused.");const l=o.createResolver(o.chartOptionScopes(),this.getContext());this.platform=new(o.platform||Ap(i)),this.platform.updateConfig(o);const a=this.platform.acquireContext(i,l.aspectRatio),d=a&&a.canvas,c=d&&d.height,u=d&&d.width;if(this.id=wf(),this.ctx=a,this.canvas=d,this.width=u,this.height=c,this._options=l,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 em,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Of(f=>this.update(f),l.resizeDelay||0),this._dataChanges=[],vo[this.id]=this,!a||!d){console.error("Failed to create chart: can't acquire context from the given item");return}nt.listen(this,"complete",sa),nt.listen(this,"progress",gm),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:n},width:o,height:i,_aspectRatio:s}=this;return X(e)?n&&s?s:i?o/i:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return Ue}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():hl(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return nl(this.canvas,this.ctx),this}stop(){return nt.stop(this),this}resize(e,n){nt.running(this)?this._resizeBeforeDraw={width:e,height:n}:this._resize(e,n)}_resize(e,n){const o=this.options,i=this.canvas,s=o.maintainAspectRatio&&this.aspectRatio,l=this.platform.getMaximumSize(i,e,n,s),a=o.devicePixelRatio||this.platform.getDevicePixelRatio(),d=this.width?"resize":"attach";this.width=l.width,this.height=l.height,this._aspectRatio=this.aspectRatio,hl(this,a,!0)&&(this.notifyPlugins("resize",{size:l}),ne(o.onResize,[this,l],this),this.attached&&this._doResize(d)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};ee(n,(o,i)=>{o.id=i})}buildOrUpdateScales(){const e=this.options,n=e.scales,o=this.scales,i=Object.keys(o).reduce((l,a)=>(l[a]=!1,l),{});let s=[];n&&(s=s.concat(Object.keys(n).map(l=>{const a=n[l],d=Xi(l,a),c=d==="r",u=d==="x";return{options:a,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),ee(s,l=>{const a=l.options,d=a.id,c=Xi(d,a),u=Y(a.type,l.dtype);(a.position===void 0||ia(a.position,c)!==ia(l.dposition))&&(a.position=l.dposition),i[d]=!0;let f=null;if(d in o&&o[d].type===u)f=o[d];else{const h=Ue.getScale(u);f=new h({id:d,type:u,ctx:this.ctx,chart:this}),o[f.id]=f}f.init(a,e)}),ee(i,(l,a)=>{l||delete o[a]}),ee(o,l=>{$e.configure(this,l,l.options),$e.addBox(this,l)})}_updateMetasets(){const e=this._metasets,n=this.data.datasets.length,o=e.length;if(e.sort((i,s)=>i.index-s.index),o>n){for(let i=n;i<o;++i)this._destroyDatasetMeta(i);e.splice(n,o-n)}this._sortedMetasets=e.slice(0).sort(ra("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:n}}=this;e.length>n.length&&delete this._stacks,e.forEach((o,i)=>{n.filter(s=>s===o._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const e=[],n=this.data.datasets;let o,i;for(this._removeUnreferencedMetasets(),o=0,i=n.length;o<i;o++){const s=n[o];let l=this.getDatasetMeta(o);const a=s.type||this.config.type;if(l.type&&l.type!==a&&(this._destroyDatasetMeta(o),l=this.getDatasetMeta(o)),l.type=a,l.indexAxis=s.indexAxis||qi(a,this.options),l.order=s.order||0,l.index=o,l.label=""+s.label,l.visible=this.isDatasetVisible(o),l.controller)l.controller.updateIndex(o),l.controller.linkScales();else{const d=Ue.getController(a),{datasetElementType:c,dataElementType:u}=ce.datasets[a];Object.assign(d,{dataElementType:Ue.getElement(u),datasetElementType:c&&Ue.getElement(c)}),l.controller=new d(this,o),e.push(l.controller)}}return this._updateMetasets(),e}_resetElements(){ee(this.data.datasets,(e,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const n=this.config;n.update();const o=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!o.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const s=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let l=0;for(let c=0,u=this.data.datasets.length;c<u;c++){const{controller:f}=this.getDatasetMeta(c),h=!i&&s.indexOf(f)===-1;f.buildOrUpdateElements(h),l=Math.max(+f.getMaxOverflow(),l)}l=this._minPadding=o.layout.autoPadding?l:0,this._updateLayout(l),i||ee(s,c=>{c.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(ra("z","_idx"));const{_active:a,_lastEvent:d}=this;d?this._eventHandler(d,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){ee(this.scales,e=>{$e.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,n=new Set(Object.keys(this._listeners)),o=new Set(e.events);(!Is(n,o)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,n=this._getUniformDataChanges()||[];for(const{method:o,start:i,count:s}of n){const l=o==="_removeElements"?-s:s;ym(e,i,l)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const n=this.data.datasets.length,o=s=>new Set(e.filter(l=>l[0]===s).map((l,a)=>a+","+l.splice(1).join(","))),i=o(0);for(let s=1;s<n;s++)if(!Is(i,o(s)))return;return Array.from(i).map(s=>s.split(",")).map(s=>({method:s[1],start:+s[2],count:+s[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;$e.update(this,this.width,this.height,e);const n=this.chartArea,o=n.width<=0||n.height<=0;this._layers=[],ee(this.boxes,i=>{o&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,s)=>{i._idx=s}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let n=0,o=this.data.datasets.length;n<o;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,o=this.data.datasets.length;n<o;++n)this._updateDataset(n,gt(e)?e({datasetIndex:n}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,n){const o=this.getDatasetMeta(e),i={meta:o,index:e,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",i)!==!1&&(o.controller._update(n),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(nt.has(this)?this.attached&&!nt.running(this)&&nt.start(this):(this.draw(),sa({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:o,height:i}=this._resizeBeforeDraw;this._resize(o,i),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(e=0;e<n.length&&n[e].z<=0;++e)n[e].draw(this.chartArea);for(this._drawDatasets();e<n.length;++e)n[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const n=this._sortedMetasets,o=[];let i,s;for(i=0,s=n.length;i<s;++i){const l=n[i];(!e||l.visible)&&o.push(l)}return o}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const e=this.getSortedVisibleDatasetMetas();for(let n=e.length-1;n>=0;--n)this._drawDataset(e[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const n=this.ctx,o=e._clip,i=!o.disabled,s=$m(e,this.chartArea),l={meta:e,index:e.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",l)!==!1&&(i&&ao(n,{left:o.left===!1?0:s.left-o.left,right:o.right===!1?this.width:s.right+o.right,top:o.top===!1?0:s.top-o.top,bottom:o.bottom===!1?this.height:s.bottom+o.bottom}),e.controller.draw(),i&&co(n),l.cancelable=!1,this.notifyPlugins("afterDatasetDraw",l))}isPointInArea(e){return tt(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,n,o,i){const s=mp.modes[n];return typeof s=="function"?s(this,e,o,i):[]}getDatasetMeta(e){const n=this.data.datasets[e],o=this._metasets;let i=o.filter(s=>s&&s._dataset===n).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:e,_dataset:n,_parsed:[],_sorted:!1},o.push(i)),i}getContext(){return this.$context||(this.$context=bt(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const n=this.data.datasets[e];if(!n)return!1;const o=this.getDatasetMeta(e);return typeof o.hidden=="boolean"?!o.hidden:!n.hidden}setDatasetVisibility(e,n){const o=this.getDatasetMeta(e);o.hidden=!n}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,n,o){const i=o?"show":"hide",s=this.getDatasetMeta(e),l=s.controller._resolveAnimations(void 0,i);hn(n)?(s.data[n].hidden=!o,this.update()):(this.setDatasetVisibility(e,o),l.update(s,{visible:o}),this.update(a=>a.datasetIndex===e?i:void 0))}hide(e,n){this._updateVisibility(e,n,!1)}show(e,n){this._updateVisibility(e,n,!0)}_destroyDatasetMeta(e){const n=this._metasets[e];n&&n.controller&&n.controller._destroy(),delete this._metasets[e]}_stop(){let e,n;for(this.stop(),nt.remove(this),e=0,n=this.data.datasets.length;e<n;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:n}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),nl(e,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete vo[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const e=this._listeners,n=this.platform,o=(s,l)=>{n.addEventListener(this,s,l),e[s]=l},i=(s,l,a)=>{s.offsetX=l,s.offsetY=a,this._eventHandler(s)};ee(this.options.events,s=>o(s,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,n=this.platform,o=(d,c)=>{n.addEventListener(this,d,c),e[d]=c},i=(d,c)=>{e[d]&&(n.removeEventListener(this,d,c),delete e[d])},s=(d,c)=>{this.canvas&&this.resize(d,c)};let l;const a=()=>{i("attach",a),this.attached=!0,this.resize(),o("resize",s),o("detach",l)};l=()=>{this.attached=!1,i("resize",s),this._stop(),this._resize(0,0),o("attach",a)},n.isAttached(this.canvas)?a():l()}unbindEvents(){ee(this._listeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._listeners={},ee(this._responsiveListeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,n,o){const i=o?"set":"remove";let s,l,a,d;for(n==="dataset"&&(s=this.getDatasetMeta(e[0].datasetIndex),s.controller["_"+i+"DatasetHoverStyle"]()),a=0,d=e.length;a<d;++a){l=e[a];const c=l&&this.getDatasetMeta(l.datasetIndex).controller;c&&c[i+"HoverStyle"](l.element,l.datasetIndex,l.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const n=this._active||[],o=e.map(({datasetIndex:s,index:l})=>{const a=this.getDatasetMeta(s);if(!a)throw new Error("No dataset found at index "+s);return{datasetIndex:s,element:a.data[l],index:l}});!no(o,n)&&(this._active=o,this._lastEvent=null,this._updateHoverStyles(o,n))}notifyPlugins(e,n,o){return this._plugins.notify(this,e,n,o)}isPluginEnabled(e){return this._plugins._cache.filter(n=>n.plugin.id===e).length===1}_updateHoverStyles(e,n,o){const i=this.options.hover,s=(d,c)=>d.filter(u=>!c.some(f=>u.datasetIndex===f.datasetIndex&&u.index===f.index)),l=s(n,e),a=o?e:s(e,n);l.length&&this.updateHoverStyle(l,i.mode,!1),a.length&&i.mode&&this.updateHoverStyle(a,i.mode,!0)}_eventHandler(e,n){const o={event:e,replay:n,cancelable:!0,inChartArea:this.isPointInArea(e)},i=l=>(l.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",o,i)===!1)return;const s=this._handleEvent(e,n,o.inChartArea);return o.cancelable=!1,this.notifyPlugins("afterEvent",o,i),(s||o.changed)&&this.render(),this}_handleEvent(e,n,o){const{_active:i=[],options:s}=this,l=n,a=this._getActiveElements(e,i,o,l),d=Mf(e),c=bm(e,this._lastEvent,o,d);o&&(this._lastEvent=null,ne(s.onHover,[e,a,this],this),d&&ne(s.onClick,[e,a,this],this));const u=!no(a,i);return(u||n)&&(this._active=a,this._updateHoverStyles(a,i,n)),this._lastEvent=c,u}_getActiveElements(e,n,o,i){if(e.type==="mouseout")return[];if(!o)return n;const s=this.options.hover;return this.getElementsAtEventForMode(e,s.mode,s,i)}}I(Le,"defaults",ce),I(Le,"instances",vo),I(Le,"overrides",Et),I(Le,"registry",Ue),I(Le,"version",pm),I(Le,"getChart",aa);function da(){return ee(Le.instances,t=>t._plugins.invalidate())}function _m(t,e,n){const{startAngle:o,pixelMargin:i,x:s,y:l,outerRadius:a,innerRadius:d}=e;let c=i/a;t.beginPath(),t.arc(s,l,a,o-c,n+c),d>i?(c=i/d,t.arc(s,l,d,n+c,o-c,!0)):t.arc(s,l,i,n+ue,o-ue),t.closePath(),t.clip()}function wm(t){return Fi(t,["outerStart","outerEnd","innerStart","innerEnd"])}function Cm(t,e,n,o){const i=wm(t.options.borderRadius),s=(n-e)/2,l=Math.min(s,o*e/2),a=d=>{const c=(n-Math.min(s,d))*o/2;return me(d,0,Math.min(s,c))};return{outerStart:a(i.outerStart),outerEnd:a(i.outerEnd),innerStart:me(i.innerStart,0,l),innerEnd:me(i.innerEnd,0,l)}}function Kt(t,e,n,o){return{x:n+t*Math.cos(e),y:o+t*Math.sin(e)}}function Do(t,e,n,o,i,s){const{x:l,y:a,startAngle:d,pixelMargin:c,innerRadius:u}=e,f=Math.max(e.outerRadius+o+n-c,0),h=u>0?u+o+n+c:0;let p=0;const m=i-d;if(o){const M=u>0?u-o:0,k=f>0?f-o:0,B=(M+k)/2,O=B!==0?m*B/(B+o):m;p=(m-O)/2}const g=Math.max(.001,m*f-n/ie)/f,y=(m-g)/2,b=d+y+p,$=i-y-p,{outerStart:x,outerEnd:S,innerStart:C,innerEnd:V}=Cm(e,h,f,$-b),E=f-x,F=f-S,N=b+x/E,P=$-S/F,w=h+C,_=h+V,D=b+C/w,v=$-V/_;if(t.beginPath(),s){const M=(N+P)/2;if(t.arc(l,a,f,N,M),t.arc(l,a,f,M,P),S>0){const L=Kt(F,P,l,a);t.arc(L.x,L.y,S,P,$+ue)}const k=Kt(_,$,l,a);if(t.lineTo(k.x,k.y),V>0){const L=Kt(_,v,l,a);t.arc(L.x,L.y,V,$+ue,v+Math.PI)}const B=($-V/h+(b+C/h))/2;if(t.arc(l,a,h,$-V/h,B,!0),t.arc(l,a,h,B,b+C/h,!0),C>0){const L=Kt(w,D,l,a);t.arc(L.x,L.y,C,D+Math.PI,b-ue)}const O=Kt(E,b,l,a);if(t.lineTo(O.x,O.y),x>0){const L=Kt(E,N,l,a);t.arc(L.x,L.y,x,b-ue,N)}}else{t.moveTo(l,a);const M=Math.cos(N)*f+l,k=Math.sin(N)*f+a;t.lineTo(M,k);const B=Math.cos(P)*f+l,O=Math.sin(P)*f+a;t.lineTo(B,O)}t.closePath()}function xm(t,e,n,o,i){const{fullCircles:s,startAngle:l,circumference:a}=e;let d=e.endAngle;if(s){Do(t,e,n,o,d,i);for(let c=0;c<s;++c)t.fill();isNaN(a)||(d=l+(a%re||re))}return Do(t,e,n,o,d,i),t.fill(),d}function km(t,e,n,o,i){const{fullCircles:s,startAngle:l,circumference:a,options:d}=e,{borderWidth:c,borderJoinStyle:u,borderDash:f,borderDashOffset:h}=d,p=d.borderAlign==="inner";if(!c)return;t.setLineDash(f||[]),t.lineDashOffset=h,p?(t.lineWidth=c*2,t.lineJoin=u||"round"):(t.lineWidth=c,t.lineJoin=u||"bevel");let m=e.endAngle;if(s){Do(t,e,n,o,m,i);for(let g=0;g<s;++g)t.stroke();isNaN(a)||(m=l+(a%re||re))}p&&_m(t,e,m),s||(Do(t,e,n,o,m,i),t.stroke())}class Bn extends ot{constructor(n){super();I(this,"circumference");I(this,"endAngle");I(this,"fullCircles");I(this,"innerRadius");I(this,"outerRadius");I(this,"pixelMargin");I(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,n&&Object.assign(this,n)}inRange(n,o,i){const s=this.getProps(["x","y"],i),{angle:l,distance:a}=js(s,{x:n,y:o}),{startAngle:d,endAngle:c,innerRadius:u,outerRadius:f,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),p=(this.options.spacing+this.options.borderWidth)/2,g=Y(h,c-d)>=re||mn(l,d,c),y=Qe(a,u+p,f+p);return g&&y}getCenterPoint(n){const{x:o,y:i,startAngle:s,endAngle:l,innerRadius:a,outerRadius:d}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],n),{offset:c,spacing:u}=this.options,f=(s+l)/2,h=(a+d+u+c)/2;return{x:o+Math.cos(f)*h,y:i+Math.sin(f)*h}}tooltipPosition(n){return this.getCenterPoint(n)}draw(n){const{options:o,circumference:i}=this,s=(o.offset||0)/4,l=(o.spacing||0)/2,a=o.circular;if(this.pixelMargin=o.borderAlign==="inner"?.33:0,this.fullCircles=i>re?Math.floor(i/re):0,i===0||this.innerRadius<0||this.outerRadius<0)return;n.save();const d=(this.startAngle+this.endAngle)/2;n.translate(Math.cos(d)*s,Math.sin(d)*s);const c=1-Math.sin(Math.min(ie,i||0)),u=s*c;n.fillStyle=o.backgroundColor,n.strokeStyle=o.borderColor,xm(n,this,u,l,a),km(n,this,u,l,a),n.restore()}}I(Bn,"id","arc"),I(Bn,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),I(Bn,"defaultRoutes",{backgroundColor:"backgroundColor"}),I(Bn,"descriptors",{_scriptable:!0,_indexable:n=>n!=="borderDash"});function ca(t,e,n=e){t.lineCap=Y(n.borderCapStyle,e.borderCapStyle),t.setLineDash(Y(n.borderDash,e.borderDash)),t.lineDashOffset=Y(n.borderDashOffset,e.borderDashOffset),t.lineJoin=Y(n.borderJoinStyle,e.borderJoinStyle),t.lineWidth=Y(n.borderWidth,e.borderWidth),t.strokeStyle=Y(n.borderColor,e.borderColor)}function Sm(t,e,n){t.lineTo(n.x,n.y)}function vm(t){return t.stepped?Xf:t.tension||t.cubicInterpolationMode==="monotone"?Kf:Sm}function ua(t,e,n={}){const o=t.length,{start:i=0,end:s=o-1}=n,{start:l,end:a}=e,d=Math.max(i,l),c=Math.min(s,a),u=i<l&&s<l||i>a&&s>a;return{count:o,start:d,loop:e.loop,ilen:c<d&&!u?o+c-d:c-d}}function Mm(t,e,n,o){const{points:i,options:s}=e,{count:l,start:a,loop:d,ilen:c}=ua(i,n,o),u=vm(s);let{move:f=!0,reverse:h}=o||{},p,m,g;for(p=0;p<=c;++p)m=i[(a+(h?c-p:p))%l],!m.skip&&(f?(t.moveTo(m.x,m.y),f=!1):u(t,g,m,h,s.stepped),g=m);return d&&(m=i[(a+(h?c:0))%l],u(t,g,m,h,s.stepped)),!!d}function Dm(t,e,n,o){const i=e.points,{count:s,start:l,ilen:a}=ua(i,n,o),{move:d=!0,reverse:c}=o||{};let u=0,f=0,h,p,m,g,y,b;const $=S=>(l+(c?a-S:S))%s,x=()=>{g!==y&&(t.lineTo(u,y),t.lineTo(u,g),t.lineTo(u,b))};for(d&&(p=i[$(0)],t.moveTo(p.x,p.y)),h=0;h<=a;++h){if(p=i[$(h)],p.skip)continue;const S=p.x,C=p.y,V=S|0;V===m?(C<g?g=C:C>y&&(y=C),u=(f*u+S)/++f):(x(),t.lineTo(S,C),m=V,f=0,g=y=C),b=C}x()}function Ki(t){const e=t.options,n=e.borderDash&&e.borderDash.length;return!t._decimated&&!t._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!n?Dm:Mm}function Em(t){return t.stepped?Dh:t.tension||t.cubicInterpolationMode==="monotone"?Eh:Nt}function Bm(t,e,n,o){let i=e._path;i||(i=e._path=new Path2D,e.path(i,n,o)&&i.closePath()),ca(t,e.options),t.stroke(i)}function Vm(t,e,n,o){const{segments:i,options:s}=e,l=Ki(e);for(const a of i)ca(t,s,a.style),t.beginPath(),l(t,e,a,{start:n,end:n+o-1})&&t.closePath(),t.stroke()}const Pm=typeof Path2D=="function";function Rm(t,e,n,o){Pm&&!e.options.segment?Bm(t,e,n,o):Vm(t,e,n,o)}class $t extends ot{constructor(e){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,e&&Object.assign(this,e)}updateControlPoints(e,n){const o=this.options;if((o.tension||o.cubicInterpolationMode==="monotone")&&!o.stepped&&!this._pointsUpdated){const i=o.spanGaps?this._loop:this._fullLoop;_h(this._points,o,e,i,n),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=Nh(this,this.options.segment))}first(){const e=this.segments,n=this.points;return e.length&&n[e[0].start]}last(){const e=this.segments,n=this.points,o=e.length;return o&&n[e[o-1].end]}interpolate(e,n){const o=this.options,i=e[n],s=this.points,l=_l(this,{property:n,start:i,end:i});if(!l.length)return;const a=[],d=Em(o);let c,u;for(c=0,u=l.length;c<u;++c){const{start:f,end:h}=l[c],p=s[f],m=s[h];if(p===m){a.push(p);continue}const g=Math.abs((i-p[n])/(m[n]-p[n])),y=d(p,m,g,o.stepped);y[n]=e[n],a.push(y)}return a.length===1?a[0]:a}pathSegment(e,n,o){return Ki(this)(e,this,n,o)}path(e,n,o){const i=this.segments,s=Ki(this);let l=this._loop;n=n||0,o=o||this.points.length-n;for(const a of i)l&=s(e,this,a,{start:n,end:n+o-1});return!!l}draw(e,n,o,i){const s=this.options||{};(this.points||[]).length&&s.borderWidth&&(e.save(),Rm(e,this,o,i),e.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}I($t,"id","line"),I($t,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),I($t,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),I($t,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"&&e!=="fill"});function fa(t,e,n,o){const i=t.options,{[n]:s}=t.getProps([n],o);return Math.abs(e-s)<i.radius+i.hitRadius}class Eo extends ot{constructor(n){super();I(this,"parsed");I(this,"skip");I(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,n&&Object.assign(this,n)}inRange(n,o,i){const s=this.options,{x:l,y:a}=this.getProps(["x","y"],i);return Math.pow(n-l,2)+Math.pow(o-a,2)<Math.pow(s.hitRadius+s.radius,2)}inXRange(n,o){return fa(this,n,"x",o)}inYRange(n,o){return fa(this,n,"y",o)}getCenterPoint(n){const{x:o,y:i}=this.getProps(["x","y"],n);return{x:o,y:i}}size(n){n=n||this.options||{};let o=n.radius||0;o=Math.max(o,o&&n.hoverRadius||0);const i=o&&n.borderWidth||0;return(o+i)*2}draw(n,o){const i=this.options;this.skip||i.radius<.1||!tt(this,o,this.size(i)/2)||(n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.fillStyle=i.backgroundColor,Ri(n,i,this.x,this.y))}getRange(){const n=this.options||{};return n.radius+n.hitRadius}}I(Eo,"id","point"),I(Eo,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),I(Eo,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function ha(t,e){const{x:n,y:o,base:i,width:s,height:l}=t.getProps(["x","y","base","width","height"],e);let a,d,c,u,f;return t.horizontal?(f=l/2,a=Math.min(n,i),d=Math.max(n,i),c=o-f,u=o+f):(f=s/2,a=n-f,d=n+f,c=Math.min(o,i),u=Math.max(o,i)),{left:a,top:c,right:d,bottom:u}}function _t(t,e,n,o){return t?0:me(e,n,o)}function Fm(t,e,n){const o=t.options.borderWidth,i=t.borderSkipped,s=il(o);return{t:_t(i.top,s.top,0,n),r:_t(i.right,s.right,0,e),b:_t(i.bottom,s.bottom,0,n),l:_t(i.left,s.left,0,e)}}function Nm(t,e,n){const{enableBorderRadius:o}=t.getProps(["enableBorderRadius"]),i=t.options.borderRadius,s=Pt(i),l=Math.min(e,n),a=t.borderSkipped,d=o||q(i);return{topLeft:_t(!d||a.top||a.left,s.topLeft,0,l),topRight:_t(!d||a.top||a.right,s.topRight,0,l),bottomLeft:_t(!d||a.bottom||a.left,s.bottomLeft,0,l),bottomRight:_t(!d||a.bottom||a.right,s.bottomRight,0,l)}}function Am(t){const e=ha(t),n=e.right-e.left,o=e.bottom-e.top,i=Fm(t,n/2,o/2),s=Nm(t,n/2,o/2);return{outer:{x:e.left,y:e.top,w:n,h:o,radius:s},inner:{x:e.left+i.l,y:e.top+i.t,w:n-i.l-i.r,h:o-i.t-i.b,radius:{topLeft:Math.max(0,s.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,s.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,s.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,s.bottomRight-Math.max(i.b,i.r))}}}}function Zi(t,e,n,o){const i=e===null,s=n===null,a=t&&!(i&&s)&&ha(t,o);return a&&(i||Qe(e,a.left,a.right))&&(s||Qe(n,a.top,a.bottom))}function Om(t){return t.topLeft||t.topRight||t.bottomLeft||t.bottomRight}function Im(t,e){t.rect(e.x,e.y,e.w,e.h)}function Ji(t,e,n={}){const o=t.x!==n.x?-e:0,i=t.y!==n.y?-e:0,s=(t.x+t.w!==n.x+n.w?e:0)-o,l=(t.y+t.h!==n.y+n.h?e:0)-i;return{x:t.x+o,y:t.y+i,w:t.w+s,h:t.h+l,radius:t.radius}}class Bo extends ot{constructor(e){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,e&&Object.assign(this,e)}draw(e){const{inflateAmount:n,options:{borderColor:o,backgroundColor:i}}=this,{inner:s,outer:l}=Am(this),a=Om(l.radius)?$n:Im;e.save(),(l.w!==s.w||l.h!==s.h)&&(e.beginPath(),a(e,Ji(l,n,s)),e.clip(),a(e,Ji(s,-n,l)),e.fillStyle=o,e.fill("evenodd")),e.beginPath(),a(e,Ji(s,n)),e.fillStyle=i,e.fill(),e.restore()}inRange(e,n,o){return Zi(this,e,n,o)}inXRange(e,n){return Zi(this,e,null,n)}inYRange(e,n){return Zi(this,null,e,n)}getCenterPoint(e){const{x:n,y:o,base:i,horizontal:s}=this.getProps(["x","y","base","horizontal"],e);return{x:s?(n+i)/2:n,y:s?o:(o+i)/2}}getRange(e){return e==="x"?this.width/2:this.height/2}}I(Bo,"id","bar"),I(Bo,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),I(Bo,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var Tm=Object.freeze({__proto__:null,ArcElement:Bn,BarElement:Bo,LineElement:$t,PointElement:Eo});const Qi=["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)"],pa=Qi.map(t=>t.replace("rgb(","rgba(").replace(")",", 0.5)"));function ma(t){return Qi[t%Qi.length]}function ga(t){return pa[t%pa.length]}function Lm(t,e){return t.borderColor=ma(e),t.backgroundColor=ga(e),++e}function zm(t,e){return t.backgroundColor=t.data.map(()=>ma(e++)),e}function Hm(t,e){return t.backgroundColor=t.data.map(()=>ga(e++)),e}function jm(t){let e=0;return(n,o)=>{const i=t.getDatasetMeta(o).controller;i instanceof At?e=zm(n,e):i instanceof Cn?e=Hm(n,e):i&&(e=Lm(n,e))}}function ya(t){let e;for(e in t)if(t[e].borderColor||t[e].backgroundColor)return!0;return!1}function Wm(t){return t&&(t.borderColor||t.backgroundColor)}var Ym={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(t,e,n){if(!n.enabled)return;const{data:{datasets:o},options:i}=t.config,{elements:s}=i;if(!n.forceOverride&&(ya(o)||Wm(i)||s&&ya(s)))return;const l=jm(t);o.forEach(l)}};function Um(t,e,n,o,i){const s=i.samples||o;if(s>=n)return t.slice(e,e+n);const l=[],a=(n-2)/(s-2);let d=0;const c=e+n-1;let u=e,f,h,p,m,g;for(l[d++]=t[u],f=0;f<s-2;f++){let y=0,b=0,$;const x=Math.floor((f+1)*a)+1+e,S=Math.min(Math.floor((f+2)*a)+1,n)+e,C=S-x;for($=x;$<S;$++)y+=t[$].x,b+=t[$].y;y/=C,b/=C;const V=Math.floor(f*a)+1+e,E=Math.min(Math.floor((f+1)*a)+1,n)+e,{x:F,y:N}=t[u];for(p=m=-1,$=V;$<E;$++)m=.5*Math.abs((F-y)*(t[$].y-N)-(F-t[$].x)*(b-N)),m>p&&(p=m,h=t[$],g=$);l[d++]=h,u=g}return l[d++]=t[c],l}function Gm(t,e,n,o){let i=0,s=0,l,a,d,c,u,f,h,p,m,g;const y=[],b=e+n-1,$=t[e].x,S=t[b].x-$;for(l=e;l<e+n;++l){a=t[l],d=(a.x-$)/S*o,c=a.y;const C=d|0;if(C===u)c<m?(m=c,f=l):c>g&&(g=c,h=l),i=(s*i+a.x)/++s;else{const V=l-1;if(!X(f)&&!X(h)){const E=Math.min(f,h),F=Math.max(f,h);E!==p&&E!==V&&y.push({...t[E],x:i}),F!==p&&F!==V&&y.push({...t[F],x:i})}l>0&&V!==p&&y.push(t[V]),y.push(a),u=C,s=0,m=g=c,f=h=p=l}}return y}function ba(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{configurable:!0,enumerable:!0,writable:!0,value:e})}}function $a(t){t.data.datasets.forEach(e=>{ba(e)})}function qm(t,e){const n=e.length;let o=0,i;const{iScale:s}=t,{min:l,max:a,minDefined:d,maxDefined:c}=s.getUserBounds();return d&&(o=me(et(e,s.axis,l).lo,0,n-1)),c?i=me(et(e,s.axis,a).hi+1,o,n)-o:i=n-o,{start:o,count:i}}var Xm={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,n)=>{if(!n.enabled){$a(t);return}const o=t.width;t.data.datasets.forEach((i,s)=>{const{_data:l,indexAxis:a}=i,d=t.getDatasetMeta(s),c=l||i.data;if(_n([a,t.options.indexAxis])==="y"||!d.controller.supportsDecimation)return;const u=t.scales[d.xAxisID];if(u.type!=="linear"&&u.type!=="time"||t.options.parsing)return;let{start:f,count:h}=qm(d,c);const p=n.threshold||4*o;if(h<=p){ba(i);return}X(l)&&(i._data=c,delete i.data,Object.defineProperty(i,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(g){this._data=g}}));let m;switch(n.algorithm){case"lttb":m=Um(c,f,h,o,n);break;case"min-max":m=Gm(c,f,h,o);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}i._decimated=m})},destroy(t){$a(t)}};function Km(t,e,n){const o=t.segments,i=t.points,s=e.points,l=[];for(const a of o){let{start:d,end:c}=a;c=tr(d,c,i);const u=er(n,i[d],i[c],a.loop);if(!e.segments){l.push({source:a,target:u,start:i[d],end:i[c]});continue}const f=_l(e,u);for(const h of f){const p=er(n,s[h.start],s[h.end],h.loop),m=$l(a,i,p);for(const g of m)l.push({source:g,target:h,start:{[n]:_a(u,p,"start",Math.max)},end:{[n]:_a(u,p,"end",Math.min)}})}}return l}function er(t,e,n,o){if(o)return;let i=e[t],s=n[t];return t==="angle"&&(i=Ee(i),s=Ee(s)),{property:t,start:i,end:s}}function Zm(t,e){const{x:n=null,y:o=null}=t||{},i=e.points,s=[];return e.segments.forEach(({start:l,end:a})=>{a=tr(l,a,i);const d=i[l],c=i[a];o!==null?(s.push({x:d.x,y:o}),s.push({x:c.x,y:o})):n!==null&&(s.push({x:n,y:d.y}),s.push({x:n,y:c.y}))}),s}function tr(t,e,n){for(;e>t;e--){const o=n[e];if(!isNaN(o.x)&&!isNaN(o.y))break}return e}function _a(t,e,n,o){return t&&e?o(t[n],e[n]):t?t[n]:e?e[n]:0}function wa(t,e){let n=[],o=!1;return oe(t)?(o=!0,n=t):n=Zm(t,e),n.length?new $t({points:n,options:{tension:0},_loop:o,_fullLoop:o}):null}function Ca(t){return t&&t.fill!==!1}function Jm(t,e,n){let i=t[e].fill;const s=[e];let l;if(!n)return i;for(;i!==!1&&s.indexOf(i)===-1;){if(!de(i))return i;if(l=t[i],!l)return!1;if(l.visible)return i;s.push(i),i=l.fill}return!1}function Qm(t,e,n){const o=o0(t);if(q(o))return isNaN(o.value)?!1:o;let i=parseFloat(o);return de(i)&&Math.floor(i)===i?e0(o[0],e,i,n):["origin","start","end","stack","shape"].indexOf(o)>=0&&o}function e0(t,e,n,o){return(t==="-"||t==="+")&&(n=e+n),n===e||n<0||n>=o?!1:n}function t0(t,e){let n=null;return t==="start"?n=e.bottom:t==="end"?n=e.top:q(t)?n=e.getPixelForValue(t.value):e.getBasePixel&&(n=e.getBasePixel()),n}function n0(t,e,n){let o;return t==="start"?o=n:t==="end"?o=e.options.reverse?e.min:e.max:q(t)?o=t.value:o=e.getBaseValue(),o}function o0(t){const e=t.options,n=e.fill;let o=Y(n&&n.target,n);return o===void 0&&(o=!!e.backgroundColor),o===!1||o===null?!1:o===!0?"origin":o}function i0(t){const{scale:e,index:n,line:o}=t,i=[],s=o.segments,l=o.points,a=r0(e,n);a.push(wa({x:null,y:e.bottom},o));for(let d=0;d<s.length;d++){const c=s[d];for(let u=c.start;u<=c.end;u++)s0(i,l[u],a)}return new $t({points:i,options:{}})}function r0(t,e){const n=[],o=t.getMatchingVisibleMetas("line");for(let i=0;i<o.length;i++){const s=o[i];if(s.index===e)break;s.hidden||n.unshift(s.dataset)}return n}function s0(t,e,n){const o=[];for(let i=0;i<n.length;i++){const s=n[i],{first:l,last:a,point:d}=l0(s,e,"x");if(!(!d||l&&a)){if(l)o.unshift(d);else if(t.push(d),!a)break}}t.push(...o)}function l0(t,e,n){const o=t.interpolate(e,n);if(!o)return{};const i=o[n],s=t.segments,l=t.points;let a=!1,d=!1;for(let c=0;c<s.length;c++){const u=s[c],f=l[u.start][n],h=l[u.end][n];if(Qe(i,f,h)){a=i===f,d=i===h;break}}return{first:a,last:d,point:o}}class xa{constructor(e){this.x=e.x,this.y=e.y,this.radius=e.radius}pathSegment(e,n,o){const{x:i,y:s,radius:l}=this;return n=n||{start:0,end:re},e.arc(i,s,l,n.end,n.start,!0),!o.bounds}interpolate(e){const{x:n,y:o,radius:i}=this,s=e.angle;return{x:n+Math.cos(s)*i,y:o+Math.sin(s)*i,angle:s}}}function a0(t){const{chart:e,fill:n,line:o}=t;if(de(n))return d0(e,n);if(n==="stack")return i0(t);if(n==="shape")return!0;const i=c0(t);return i instanceof xa?i:wa(i,o)}function d0(t,e){const n=t.getDatasetMeta(e);return n&&t.isDatasetVisible(e)?n.dataset:null}function c0(t){return(t.scale||{}).getPointPositionForValue?f0(t):u0(t)}function u0(t){const{scale:e={},fill:n}=t,o=t0(n,e);if(de(o)){const i=e.isHorizontal();return{x:i?o:null,y:i?null:o}}return null}function f0(t){const{scale:e,fill:n}=t,o=e.options,i=e.getLabels().length,s=o.reverse?e.max:e.min,l=n0(n,e,s),a=[];if(o.grid.circular){const d=e.getPointPositionForValue(0,s);return new xa({x:d.x,y:d.y,radius:e.getDistanceFromCenterForValue(l)})}for(let d=0;d<i;++d)a.push(e.getPointPositionForValue(d,l));return a}function nr(t,e,n){const o=a0(e),{line:i,scale:s,axis:l}=e,a=i.options,d=a.fill,c=a.backgroundColor,{above:u=c,below:f=c}=d||{};o&&i.points.length&&(ao(t,n),h0(t,{line:i,target:o,above:u,below:f,area:n,scale:s,axis:l}),co(t))}function h0(t,e){const{line:n,target:o,above:i,below:s,area:l,scale:a}=e,d=n._loop?"angle":e.axis;t.save(),d==="x"&&s!==i&&(ka(t,o,l.top),Sa(t,{line:n,target:o,color:i,scale:a,property:d}),t.restore(),t.save(),ka(t,o,l.bottom)),Sa(t,{line:n,target:o,color:s,scale:a,property:d}),t.restore()}function ka(t,e,n){const{segments:o,points:i}=e;let s=!0,l=!1;t.beginPath();for(const a of o){const{start:d,end:c}=a,u=i[d],f=i[tr(d,c,i)];s?(t.moveTo(u.x,u.y),s=!1):(t.lineTo(u.x,n),t.lineTo(u.x,u.y)),l=!!e.pathSegment(t,a,{move:l}),l?t.closePath():t.lineTo(f.x,n)}t.lineTo(e.first().x,n),t.closePath(),t.clip()}function Sa(t,e){const{line:n,target:o,property:i,color:s,scale:l}=e,a=Km(n,o,i);for(const{source:d,target:c,start:u,end:f}of a){const{style:{backgroundColor:h=s}={}}=d,p=o!==!0;t.save(),t.fillStyle=h,p0(t,l,p&&er(i,u,f)),t.beginPath();const m=!!n.pathSegment(t,d);let g;if(p){m?t.closePath():va(t,o,f,i);const y=!!o.pathSegment(t,c,{move:m,reverse:!0});g=m&&y,g||va(t,o,u,i)}t.closePath(),t.fill(g?"evenodd":"nonzero"),t.restore()}}function p0(t,e,n){const{top:o,bottom:i}=e.chart.chartArea,{property:s,start:l,end:a}=n||{};s==="x"&&(t.beginPath(),t.rect(l,o,a-l,i-o),t.clip())}function va(t,e,n,o){const i=e.interpolate(n,o);i&&t.lineTo(i.x,i.y)}var m0={id:"filler",afterDatasetsUpdate(t,e,n){const o=(t.data.datasets||[]).length,i=[];let s,l,a,d;for(l=0;l<o;++l)s=t.getDatasetMeta(l),a=s.dataset,d=null,a&&a.options&&a instanceof $t&&(d={visible:t.isDatasetVisible(l),index:l,fill:Qm(a,l,o),chart:t,axis:s.controller.options.indexAxis,scale:s.vScale,line:a}),s.$filler=d,i.push(d);for(l=0;l<o;++l)d=i[l],!(!d||d.fill===!1)&&(d.fill=Jm(i,l,n.propagate))},beforeDraw(t,e,n){const o=n.drawTime==="beforeDraw",i=t.getSortedVisibleDatasetMetas(),s=t.chartArea;for(let l=i.length-1;l>=0;--l){const a=i[l].$filler;a&&(a.line.updateControlPoints(s,a.axis),o&&a.fill&&nr(t.ctx,a,s))}},beforeDatasetsDraw(t,e,n){if(n.drawTime!=="beforeDatasetsDraw")return;const o=t.getSortedVisibleDatasetMetas();for(let i=o.length-1;i>=0;--i){const s=o[i].$filler;Ca(s)&&nr(t.ctx,s,t.chartArea)}},beforeDatasetDraw(t,e,n){const o=e.meta.$filler;!Ca(o)||n.drawTime!=="beforeDatasetDraw"||nr(t.ctx,o,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const Ma=(t,e)=>{let{boxHeight:n=e,boxWidth:o=e}=t;return t.usePointStyle&&(n=Math.min(n,e),o=t.pointStyleWidth||Math.min(o,e)),{boxWidth:o,boxHeight:n,itemHeight:Math.max(e,n)}},g0=(t,e)=>t!==null&&e!==null&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class Da extends ot{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.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(e,n,o){this.maxWidth=e,this.maxHeight=n,this._margins=o,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 e=this.options.labels||{};let n=ne(e.generateLabels,[this.chart],this)||[];e.filter&&(n=n.filter(o=>e.filter(o,this.chart.data))),e.sort&&(n=n.sort((o,i)=>e.sort(o,i,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:e,ctx:n}=this;if(!e.display){this.width=this.height=0;return}const o=e.labels,i=he(o.font),s=i.size,l=this._computeTitleHeight(),{boxWidth:a,itemHeight:d}=Ma(o,s);let c,u;n.font=i.string,this.isHorizontal()?(c=this.maxWidth,u=this._fitRows(l,s,a,d)+10):(u=this.maxHeight,c=this._fitCols(l,i,a,d)+10),this.width=Math.min(c,e.maxWidth||this.maxWidth),this.height=Math.min(u,e.maxHeight||this.maxHeight)}_fitRows(e,n,o,i){const{ctx:s,maxWidth:l,options:{labels:{padding:a}}}=this,d=this.legendHitBoxes=[],c=this.lineWidths=[0],u=i+a;let f=e;s.textAlign="left",s.textBaseline="middle";let h=-1,p=-u;return this.legendItems.forEach((m,g)=>{const y=o+n/2+s.measureText(m.text).width;(g===0||c[c.length-1]+y+2*a>l)&&(f+=u,c[c.length-(g>0?0:1)]=0,p+=u,h++),d[g]={left:0,top:p,row:h,width:y,height:i},c[c.length-1]+=y+a}),f}_fitCols(e,n,o,i){const{ctx:s,maxHeight:l,options:{labels:{padding:a}}}=this,d=this.legendHitBoxes=[],c=this.columnSizes=[],u=l-e;let f=a,h=0,p=0,m=0,g=0;return this.legendItems.forEach((y,b)=>{const{itemWidth:$,itemHeight:x}=y0(o,n,s,y,i);b>0&&p+x+2*a>u&&(f+=h+a,c.push({width:h,height:p}),m+=h+a,g++,h=p=0),d[b]={left:m,top:p,col:g,width:$,height:x},h=Math.max(h,$),p+=x+a}),f+=h,c.push({width:h,height:p}),f}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:o,labels:{padding:i},rtl:s}}=this,l=Xt(s,this.left,this.width);if(this.isHorizontal()){let a=0,d=ye(o,this.left+i,this.right-this.lineWidths[a]);for(const c of n)a!==c.row&&(a=c.row,d=ye(o,this.left+i,this.right-this.lineWidths[a])),c.top+=this.top+e+i,c.left=l.leftForLtr(l.x(d),c.width),d+=c.width+i}else{let a=0,d=ye(o,this.top+e+i,this.bottom-this.columnSizes[a].height);for(const c of n)c.col!==a&&(a=c.col,d=ye(o,this.top+e+i,this.bottom-this.columnSizes[a].height)),c.top=d,c.left+=this.left+i,c.left=l.leftForLtr(l.x(c.left),c.width),d+=c.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const e=this.ctx;ao(e,this),this._draw(),co(e)}}_draw(){const{options:e,columnSizes:n,lineWidths:o,ctx:i}=this,{align:s,labels:l}=e,a=ce.color,d=Xt(e.rtl,this.left,this.width),c=he(l.font),{padding:u}=l,f=c.size,h=f/2;let p;this.drawTitle(),i.textAlign=d.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=c.string;const{boxWidth:m,boxHeight:g,itemHeight:y}=Ma(l,f),b=function(V,E,F){if(isNaN(m)||m<=0||isNaN(g)||g<0)return;i.save();const N=Y(F.lineWidth,1);if(i.fillStyle=Y(F.fillStyle,a),i.lineCap=Y(F.lineCap,"butt"),i.lineDashOffset=Y(F.lineDashOffset,0),i.lineJoin=Y(F.lineJoin,"miter"),i.lineWidth=N,i.strokeStyle=Y(F.strokeStyle,a),i.setLineDash(Y(F.lineDash,[])),l.usePointStyle){const P={radius:g*Math.SQRT2/2,pointStyle:F.pointStyle,rotation:F.rotation,borderWidth:N},w=d.xPlus(V,m/2),_=E+h;ol(i,P,w,_,l.pointStyleWidth&&m)}else{const P=E+Math.max((f-g)/2,0),w=d.leftForLtr(V,m),_=Pt(F.borderRadius);i.beginPath(),Object.values(_).some(D=>D!==0)?$n(i,{x:w,y:P,w:m,h:g,radius:_}):i.rect(w,P,m,g),i.fill(),N!==0&&i.stroke()}i.restore()},$=function(V,E,F){Vt(i,F.text,V,E+y/2,c,{strikethrough:F.hidden,textAlign:d.textAlign(F.textAlign)})},x=this.isHorizontal(),S=this._computeTitleHeight();x?p={x:ye(s,this.left+u,this.right-o[0]),y:this.top+u+S,line:0}:p={x:this.left+u,y:ye(s,this.top+S+u,this.bottom-n[0].height),line:0},ml(this.ctx,e.textDirection);const C=y+u;this.legendItems.forEach((V,E)=>{i.strokeStyle=V.fontColor,i.fillStyle=V.fontColor;const F=i.measureText(V.text).width,N=d.textAlign(V.textAlign||(V.textAlign=l.textAlign)),P=m+h+F;let w=p.x,_=p.y;d.setWidth(this.width),x?E>0&&w+P+u>this.right&&(_=p.y+=C,p.line++,w=p.x=ye(s,this.left+u,this.right-o[p.line])):E>0&&_+C>this.bottom&&(w=p.x=w+n[p.line].width+u,p.line++,_=p.y=ye(s,this.top+S+u,this.bottom-n[p.line].height));const D=d.x(w);if(b(D,_,V),w=If(N,w+m+h,x?w+P:this.right,e.rtl),$(d.x(w),_,V),x)p.x+=P+u;else if(typeof V.text!="string"){const v=c.lineHeight;p.y+=Ea(V,v)+u}else p.y+=C}),gl(this.ctx,e.textDirection)}drawTitle(){const e=this.options,n=e.title,o=he(n.font),i=be(n.padding);if(!n.display)return;const s=Xt(e.rtl,this.left,this.width),l=this.ctx,a=n.position,d=o.size/2,c=i.top+d;let u,f=this.left,h=this.width;if(this.isHorizontal())h=Math.max(...this.lineWidths),u=this.top+c,f=ye(e.align,f,this.right-h);else{const m=this.columnSizes.reduce((g,y)=>Math.max(g,y.height),0);u=c+ye(e.align,this.top,this.bottom-m-e.labels.padding-this._computeTitleHeight())}const p=ye(a,f,f+h);l.textAlign=s.textAlign(Di(a)),l.textBaseline="middle",l.strokeStyle=n.color,l.fillStyle=n.color,l.font=o.string,Vt(l,n.text,p,u,o)}_computeTitleHeight(){const e=this.options.title,n=he(e.font),o=be(e.padding);return e.display?n.lineHeight+o.height:0}_getLegendItemAt(e,n){let o,i,s;if(Qe(e,this.left,this.right)&&Qe(n,this.top,this.bottom)){for(s=this.legendHitBoxes,o=0;o<s.length;++o)if(i=s[o],Qe(e,i.left,i.left+i.width)&&Qe(n,i.top,i.top+i.height))return this.legendItems[o]}return null}handleEvent(e){const n=this.options;if(!_0(e.type,n))return;const o=this._getLegendItemAt(e.x,e.y);if(e.type==="mousemove"||e.type==="mouseout"){const i=this._hoveredItem,s=g0(i,o);i&&!s&&ne(n.onLeave,[e,i,this],this),this._hoveredItem=o,o&&!s&&ne(n.onHover,[e,o,this],this)}else o&&ne(n.onClick,[e,o,this],this)}}function y0(t,e,n,o,i){const s=b0(o,t,e,n),l=$0(i,o,e.lineHeight);return{itemWidth:s,itemHeight:l}}function b0(t,e,n,o){let i=t.text;return i&&typeof i!="string"&&(i=i.reduce((s,l)=>s.length>l.length?s:l)),e+n.size/2+o.measureText(i).width}function $0(t,e,n){let o=t;return typeof e.text!="string"&&(o=Ea(e,n)),o}function Ea(t,e){const n=t.text?t.text.length:0;return e*n}function _0(t,e){return!!((t==="mousemove"||t==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(t==="click"||t==="mouseup"))}var w0={id:"legend",_element:Da,start(t,e,n){const o=t.legend=new Da({ctx:t.ctx,options:n,chart:t});$e.configure(t,o,n),$e.addBox(t,o)},stop(t){$e.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,n){const o=t.legend;$e.configure(t,o,n),o.options=n},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,n){const o=e.datasetIndex,i=n.chart;i.isDatasetVisible(o)?(i.hide(o),e.hidden=!0):(i.show(o),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:n,pointStyle:o,textAlign:i,color:s,useBorderRadius:l,borderRadius:a}}=t.legend.options;return t._getSortedDatasetMetas().map(d=>{const c=d.controller.getStyle(n?0:void 0),u=be(c.borderWidth);return{text:e[d.index].label,fillStyle:c.backgroundColor,fontColor:s,hidden:!d.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:c.borderColor,pointStyle:o||c.pointStyle,rotation:c.rotation,textAlign:i||c.textAlign,borderRadius:l&&(a||c.borderRadius),datasetIndex:d.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class or extends ot{constructor(e){super(),this.chart=e.chart,this.options=e.options,this.ctx=e.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(e,n){const o=this.options;if(this.left=0,this.top=0,!o.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=e,this.height=this.bottom=n;const i=oe(o.text)?o.text.length:1;this._padding=be(o.padding);const s=i*he(o.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=s:this.width=s}isHorizontal(){const e=this.options.position;return e==="top"||e==="bottom"}_drawArgs(e){const{top:n,left:o,bottom:i,right:s,options:l}=this,a=l.align;let d=0,c,u,f;return this.isHorizontal()?(u=ye(a,o,s),f=n+e,c=s-o):(l.position==="left"?(u=o+e,f=ye(a,i,n),d=ie*-.5):(u=s-e,f=ye(a,n,i),d=ie*.5),c=i-n),{titleX:u,titleY:f,maxWidth:c,rotation:d}}draw(){const e=this.ctx,n=this.options;if(!n.display)return;const o=he(n.font),s=o.lineHeight/2+this._padding.top,{titleX:l,titleY:a,maxWidth:d,rotation:c}=this._drawArgs(s);Vt(e,n.text,0,0,o,{color:n.color,maxWidth:d,rotation:c,textAlign:Di(n.align),textBaseline:"middle",translation:[l,a]})}}function C0(t,e){const n=new or({ctx:t.ctx,options:e,chart:t});$e.configure(t,n,e),$e.addBox(t,n),t.titleBlock=n}var x0={id:"title",_element:or,start(t,e,n){C0(t,n)},stop(t){const e=t.titleBlock;$e.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,n){const o=t.titleBlock;$e.configure(t,o,n),o.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Vo=new WeakMap;var k0={id:"subtitle",start(t,e,n){const o=new or({ctx:t.ctx,options:n,chart:t});$e.configure(t,o,n),$e.addBox(t,o),Vo.set(t,o)},stop(t){$e.removeBox(t,Vo.get(t)),Vo.delete(t)},beforeUpdate(t,e,n){const o=Vo.get(t);$e.configure(t,o,n),o.options=n},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Vn={average(t){if(!t.length)return!1;let e,n,o=new Set,i=0,s=0;for(e=0,n=t.length;e<n;++e){const a=t[e].element;if(a&&a.hasValue()){const d=a.tooltipPosition();o.add(d.x),i+=d.y,++s}}return{x:[...o].reduce((a,d)=>a+d)/o.size,y:i/s}},nearest(t,e){if(!t.length)return!1;let n=e.x,o=e.y,i=Number.POSITIVE_INFINITY,s,l,a;for(s=0,l=t.length;s<l;++s){const d=t[s].element;if(d&&d.hasValue()){const c=d.getCenterPoint(),u=vi(e,c);u<i&&(i=u,a=d)}}if(a){const d=a.tooltipPosition();n=d.x,o=d.y}return{x:n,y:o}}};function Ge(t,e){return e&&(oe(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function it(t){return(typeof t=="string"||t instanceof String)&&t.indexOf(`
24
+ */class Nh{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,n,o,i){const r=n.listeners[i],l=n.duration;r.forEach(a=>a({chart:e,initial:n.initial,numSteps:l,currentStep:Math.min(o-n.start,l)}))}_refresh(){this._request||(this._running=!0,this._request=qr.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let n=0;this._charts.forEach((o,i)=>{if(!o.running||!o.items.length)return;const r=o.items;let l=r.length-1,a=!1,d;for(;l>=0;--l)d=r[l],d._active?(d._total>o.duration&&(o.duration=d._total),d.tick(e),a=!0):(r[l]=r[r.length-1],r.pop());a&&(i.draw(),this._notify(i,o,e,"progress")),r.length||(o.running=!1,this._notify(i,o,e,"complete"),o.initial=!1),n+=r.length}),this._lastDate=e,n===0&&(this._running=!1)}_getAnims(e){const n=this._charts;let o=n.get(e);return o||(o={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(e,o)),o}listen(e,n,o){this._getAnims(e).listeners[n].push(o)}add(e,n){!n||!n.length||this._getAnims(e).items.push(...n)}has(e){return this._getAnims(e).items.length>0}start(e){const n=this._charts.get(e);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((o,i)=>Math.max(o,i._duration),0),this._refresh())}running(e){if(!this._running)return!1;const n=this._charts.get(e);return!(!n||!n.running||!n.items.length)}stop(e){const n=this._charts.get(e);if(!n||!n.items.length)return;const o=n.items;let i=o.length-1;for(;i>=0;--i)o[i].cancel();n.items=[],this._notify(e,n,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var nt=new Nh;const kl="transparent",Ah={boolean(t,e,n){return n>.5?e:t},color(t,e,n){const o=el(t||kl),i=o.valid&&el(e||kl);return i&&i.valid?i.mix(o,n).hexString():e},number(t,e,n){return t+(e-t)*n}};class Oh{constructor(e,n,o,i){const r=n[o];i=_n([e.to,i,r,e.from]);const l=_n([e.from,r,i]);this._active=!0,this._fn=e.fn||Ah[e.type||typeof l],this._easing=gn[e.easing]||gn.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=n,this._prop=o,this._from=l,this._to=i,this._promises=void 0}active(){return this._active}update(e,n,o){if(this._active){this._notify(!1);const i=this._target[this._prop],r=o-this._start,l=this._duration-r;this._start=o,this._duration=Math.floor(Math.max(l,e.duration)),this._total+=r,this._loop=!!e.loop,this._to=_n([e.to,n,i,e.from]),this._from=_n([e.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const n=e-this._start,o=this._duration,i=this._prop,r=this._from,l=this._loop,a=this._to;let d;if(this._active=r!==a&&(l||n<o),!this._active){this._target[i]=a,this._notify(!0);return}if(n<0){this._target[i]=r;return}d=n/o%2,d=l&&d>1?2-d:d,d=this._easing(Math.min(1,Math.max(0,d))),this._target[i]=this._fn(r,a,d)}wait(){const e=this._promises||(this._promises=[]);return new Promise((n,o)=>{e.push({res:n,rej:o})})}_notify(e){const n=e?"res":"rej",o=this._promises||[];for(let i=0;i<o.length;i++)o[i][n]()}}class Sl{constructor(e,n){this._chart=e,this._properties=new Map,this.configure(n)}configure(e){if(!q(e))return;const n=Object.keys(ce.animation),o=this._properties;Object.getOwnPropertyNames(e).forEach(i=>{const r=e[i];if(!q(r))return;const l={};for(const a of n)l[a]=r[a];(oe(r.properties)&&r.properties||[i]).forEach(a=>{(a===i||!o.has(a))&&o.set(a,l)})})}_animateOptions(e,n){const o=n.options,i=Th(e,o);if(!i)return[];const r=this._createAnimations(i,o);return o.$shared&&Ih(e.options.$animations,o).then(()=>{e.options=o},()=>{}),r}_createAnimations(e,n){const o=this._properties,i=[],r=e.$animations||(e.$animations={}),l=Object.keys(n),a=Date.now();let d;for(d=l.length-1;d>=0;--d){const c=l[d];if(c.charAt(0)==="$")continue;if(c==="options"){i.push(...this._animateOptions(e,n));continue}const u=n[c];let f=r[c];const h=o.get(c);if(f)if(h&&f.active()){f.update(h,u,a);continue}else f.cancel();if(!h||!h.duration){e[c]=u;continue}r[c]=f=new Oh(h,e,c,u),i.push(f)}return i}update(e,n){if(this._properties.size===0){Object.assign(e,n);return}const o=this._createAnimations(e,n);if(o.length)return nt.add(this._chart,o),!0}}function Ih(t,e){const n=[],o=Object.keys(e);for(let i=0;i<o.length;i++){const r=t[o[i]];r&&r.active()&&n.push(r.wait())}return Promise.all(n)}function Th(t,e){if(!e)return;let n=t.options;if(!n){t.options=e;return}return n.$shared&&(t.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function vl(t,e){const n=t&&t.options||{},o=n.reverse,i=n.min===void 0?e:0,r=n.max===void 0?e:0;return{start:o?r:i,end:o?i:r}}function Lh(t,e,n){if(n===!1)return!1;const o=vl(t,n),i=vl(e,n);return{top:i.end,right:o.end,bottom:i.start,left:o.start}}function zh(t){let e,n,o,i;return q(t)?(e=t.top,n=t.right,o=t.bottom,i=t.left):e=n=o=i=t,{top:e,right:n,bottom:o,left:i,disabled:t===!1}}function Ml(t,e){const n=[],o=t._getSortedDatasetMetas(e);let i,r;for(i=0,r=o.length;i<r;++i)n.push(o[i].index);return n}function Dl(t,e,n,o={}){const i=t.keys,r=o.mode==="single";let l,a,d,c;if(e!==null){for(l=0,a=i.length;l<a;++l){if(d=+i[l],d===n){if(o.all)continue;break}c=t.values[d],de(c)&&(r||e===0||Ye(e)===Ye(c))&&(e+=c)}return e}}function Hh(t){const e=Object.keys(t),n=new Array(e.length);let o,i,r;for(o=0,i=e.length;o<i;++o)r=e[o],n[o]={x:r,y:t[r]};return n}function El(t,e){const n=t&&t.options.stacked;return n||n===void 0&&e.stack!==void 0}function jh(t,e,n){return`${t.id}.${e.id}.${n.stack||n.type}`}function Wh(t){const{min:e,max:n,minDefined:o,maxDefined:i}=t.getUserBounds();return{min:o?e:Number.NEGATIVE_INFINITY,max:i?n:Number.POSITIVE_INFINITY}}function Yh(t,e,n){const o=t[e]||(t[e]={});return o[n]||(o[n]={})}function Bl(t,e,n,o){for(const i of e.getMatchingVisibleMetas(o).reverse()){const r=t[i.index];if(n&&r>0||!n&&r<0)return i.index}return null}function Vl(t,e){const{chart:n,_cachedMeta:o}=t,i=n._stacks||(n._stacks={}),{iScale:r,vScale:l,index:a}=o,d=r.axis,c=l.axis,u=jh(r,l,o),f=e.length;let h;for(let p=0;p<f;++p){const m=e[p],{[d]:g,[c]:y}=m,b=m._stacks||(m._stacks={});h=b[c]=Yh(i,u,g),h[a]=y,h._top=Bl(h,l,!0,o.type),h._bottom=Bl(h,l,!1,o.type);const $=h._visualValues||(h._visualValues={});$[a]=y}}function Li(t,e){const n=t.scales;return Object.keys(n).filter(o=>n[o].axis===e).shift()}function Uh(t,e){return bt(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function Gh(t,e,n){return bt(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}function wn(t,e){const n=t.controller.index,o=t.vScale&&t.vScale.axis;if(o){e=e||t._parsed;for(const i of e){const r=i._stacks;if(!r||r[o]===void 0||r[o][n]===void 0)return;delete r[o][n],r[o]._visualValues!==void 0&&r[o]._visualValues[n]!==void 0&&delete r[o]._visualValues[n]}}}const zi=t=>t==="reset"||t==="none",Pl=(t,e)=>e?t:Object.assign({},t),qh=(t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:Ml(n,!0),values:null};class Te{constructor(e,n){this.chart=e,this._ctx=e.ctx,this.index=n,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 e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=El(e.vScale,e),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(e){this.index!==e&&wn(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,n=this._cachedMeta,o=this.getDataset(),i=(f,h,p,m)=>f==="x"?h:f==="r"?m:p,r=n.xAxisID=Y(o.xAxisID,Li(e,"x")),l=n.yAxisID=Y(o.yAxisID,Li(e,"y")),a=n.rAxisID=Y(o.rAxisID,Li(e,"r")),d=n.indexAxis,c=n.iAxisID=i(d,r,l,a),u=n.vAxisID=i(d,l,r,a);n.xScale=this.getScaleForId(r),n.yScale=this.getScaleForId(l),n.rScale=this.getScaleForId(a),n.iScale=this.getScaleForId(c),n.vScale=this.getScaleForId(u)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const n=this._cachedMeta;return e===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&Ur(this._data,this),e._stacked&&wn(e)}_dataCheck(){const e=this.getDataset(),n=e.data||(e.data=[]),o=this._data;if(q(n))this._data=Hh(n);else if(o!==n){if(o){Ur(o,this);const i=this._cachedMeta;wn(i),i._parsed=[]}n&&Object.isExtensible(n)&&Rf(n,this),this._syncList=[],this._data=n}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const n=this._cachedMeta,o=this.getDataset();let i=!1;this._dataCheck();const r=n._stacked;n._stacked=El(n.vScale,n),n.stack!==o.stack&&(i=!0,wn(n),n.stack=o.stack),this._resyncElements(e),(i||r!==n._stacked)&&Vl(this,n._parsed)}configure(){const e=this.chart.config,n=e.datasetScopeKeys(this._type),o=e.getOptionScopes(this.getDataset(),n,!0);this.options=e.createResolver(o,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,n){const{_cachedMeta:o,_data:i}=this,{iScale:r,_stacked:l}=o,a=r.axis;let d=e===0&&n===i.length?!0:o._sorted,c=e>0&&o._parsed[e-1],u,f,h;if(this._parsing===!1)o._parsed=i,o._sorted=!0,h=i;else{oe(i[e])?h=this.parseArrayData(o,i,e,n):q(i[e])?h=this.parseObjectData(o,i,e,n):h=this.parsePrimitiveData(o,i,e,n);const p=()=>f[a]===null||c&&f[a]<c[a];for(u=0;u<n;++u)o._parsed[u+e]=f=h[u],d&&(p()&&(d=!1),c=f);o._sorted=d}l&&Vl(this,h)}parsePrimitiveData(e,n,o,i){const{iScale:r,vScale:l}=e,a=r.axis,d=l.axis,c=r.getLabels(),u=r===l,f=new Array(i);let h,p,m;for(h=0,p=i;h<p;++h)m=h+o,f[h]={[a]:u||r.parse(c[m],m),[d]:l.parse(n[m],m)};return f}parseArrayData(e,n,o,i){const{xScale:r,yScale:l}=e,a=new Array(i);let d,c,u,f;for(d=0,c=i;d<c;++d)u=d+o,f=n[u],a[d]={x:r.parse(f[0],u),y:l.parse(f[1],u)};return a}parseObjectData(e,n,o,i){const{xScale:r,yScale:l}=e,{xAxisKey:a="x",yAxisKey:d="y"}=this._parsing,c=new Array(i);let u,f,h,p;for(u=0,f=i;u<f;++u)h=u+o,p=n[h],c[u]={x:r.parse(mt(p,a),h),y:l.parse(mt(p,d),h)};return c}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,n,o){const i=this.chart,r=this._cachedMeta,l=n[e.axis],a={keys:Ml(i,!0),values:n._stacks[e.axis]._visualValues};return Dl(a,l,r.index,{mode:o})}updateRangeFromParsed(e,n,o,i){const r=o[n.axis];let l=r===null?NaN:r;const a=i&&o._stacks[n.axis];i&&a&&(i.values=a,l=Dl(i,r,this._cachedMeta.index)),e.min=Math.min(e.min,l),e.max=Math.max(e.max,l)}getMinMax(e,n){const o=this._cachedMeta,i=o._parsed,r=o._sorted&&e===o.iScale,l=i.length,a=this._getOtherScale(e),d=qh(n,o,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:f}=Wh(a);let h,p;function m(){p=i[h];const g=p[a.axis];return!de(p[e.axis])||u>g||f<g}for(h=0;h<l&&!(!m()&&(this.updateRangeFromParsed(c,e,p,d),r));++h);if(r){for(h=l-1;h>=0;--h)if(!m()){this.updateRangeFromParsed(c,e,p,d);break}}return c}getAllParsedValues(e){const n=this._cachedMeta._parsed,o=[];let i,r,l;for(i=0,r=n.length;i<r;++i)l=n[i][e.axis],de(l)&&o.push(l);return o}getMaxOverflow(){return!1}getLabelAndValue(e){const n=this._cachedMeta,o=n.iScale,i=n.vScale,r=this.getParsed(e);return{label:o?""+o.getLabelForValue(r[o.axis]):"",value:i?""+i.getLabelForValue(r[i.axis]):""}}_update(e){const n=this._cachedMeta;this.update(e||"default"),n._clip=zh(Y(this.options.clip,Lh(n.xScale,n.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,n=this.chart,o=this._cachedMeta,i=o.data||[],r=n.chartArea,l=[],a=this._drawStart||0,d=this._drawCount||i.length-a,c=this.options.drawActiveElementsOnTop;let u;for(o.dataset&&o.dataset.draw(e,r,a,d),u=a;u<a+d;++u){const f=i[u];f.hidden||(f.active&&c?l.push(f):f.draw(e,r))}for(u=0;u<l.length;++u)l[u].draw(e,r)}getStyle(e,n){const o=n?"active":"default";return e===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(o):this.resolveDataElementOptions(e||0,o)}getContext(e,n,o){const i=this.getDataset();let r;if(e>=0&&e<this._cachedMeta.data.length){const l=this._cachedMeta.data[e];r=l.$context||(l.$context=Gh(this.getContext(),e,l)),r.parsed=this.getParsed(e),r.raw=i.data[e],r.index=r.dataIndex=e}else r=this.$context||(this.$context=Uh(this.chart.getContext(),this.index)),r.dataset=i,r.index=r.datasetIndex=this.index;return r.active=!!n,r.mode=o,r}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,n){return this._resolveElementOptions(this.dataElementType.id,n,e)}_resolveElementOptions(e,n="default",o){const i=n==="active",r=this._cachedDataOpts,l=e+"-"+n,a=r[l],d=this.enableOptionSharing&&hn(o);if(a)return Pl(a,d);const c=this.chart.config,u=c.datasetElementScopeKeys(this._type,e),f=i?[`${e}Hover`,"hover",e,""]:[e,""],h=c.getOptionScopes(this.getDataset(),u),p=Object.keys(ce.elements[e]),m=()=>this.getContext(o,i,n),g=c.resolveNamedOptions(h,p,m,f);return g.$shared&&(g.$shared=d,r[l]=Object.freeze(Pl(g,d))),g}_resolveAnimations(e,n,o){const i=this.chart,r=this._cachedDataOpts,l=`animation-${n}`,a=r[l];if(a)return a;let d;if(i.options.animation!==!1){const u=this.chart.config,f=u.datasetAnimationScopeKeys(this._type,n),h=u.getOptionScopes(this.getDataset(),f);d=u.createResolver(h,this.getContext(e,o,n))}const c=new Sl(i,d&&d.animations);return d&&d._cacheable&&(r[l]=Object.freeze(c)),c}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,n){return!n||zi(e)||this.chart._animationsDisabled}_getSharedOptions(e,n){const o=this.resolveDataElementOptions(e,n),i=this._sharedOptions,r=this.getSharedOptions(o),l=this.includeOptions(n,r)||r!==i;return this.updateSharedOptions(r,n,o),{sharedOptions:r,includeOptions:l}}updateElement(e,n,o,i){zi(i)?Object.assign(e,o):this._resolveAnimations(n,i).update(e,o)}updateSharedOptions(e,n,o){e&&!zi(n)&&this._resolveAnimations(void 0,n).update(e,o)}_setStyle(e,n,o,i){e.active=i;const r=this.getStyle(n,i);this._resolveAnimations(n,o,i).update(e,{options:!i&&this.getSharedOptions(r)||r})}removeHoverStyle(e,n,o){this._setStyle(e,o,"active",!1)}setHoverStyle(e,n,o){this._setStyle(e,o,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const n=this._data,o=this._cachedMeta.data;for(const[a,d,c]of this._syncList)this[a](d,c);this._syncList=[];const i=o.length,r=n.length,l=Math.min(r,i);l&&this.parse(0,l),r>i?this._insertElements(i,r-i,e):r<i&&this._removeElements(r,i-r)}_insertElements(e,n,o=!0){const i=this._cachedMeta,r=i.data,l=e+n;let a;const d=c=>{for(c.length+=n,a=c.length-1;a>=l;a--)c[a]=c[a-n]};for(d(r),a=e;a<l;++a)r[a]=new this.dataElementType;this._parsing&&d(i._parsed),this.parse(e,n),o&&this.updateElements(r,e,n,"reset")}updateElements(e,n,o,i){}_removeElements(e,n){const o=this._cachedMeta;if(this._parsing){const i=o._parsed.splice(e,n);o._stacked&&wn(o,i)}o.data.splice(e,n)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[n,o,i]=e;this[n](o,i)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){const e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(e,n){n&&this._sync(["_removeElements",e,n]);const o=arguments.length-2;o&&this._sync(["_insertElements",e,o])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}I(Te,"defaults",{}),I(Te,"datasetElementType",null),I(Te,"dataElementType",null);function Xh(t,e){if(!t._cache.$bar){const n=t.getMatchingVisibleMetas(e);let o=[];for(let i=0,r=n.length;i<r;i++)o=o.concat(n[i].controller.getAllParsedValues(t));t._cache.$bar=Gr(o.sort((i,r)=>i-r))}return t._cache.$bar}function Kh(t){const e=t.iScale,n=Xh(e,t.type);let o=e._length,i,r,l,a;const d=()=>{l===32767||l===-32768||(hn(a)&&(o=Math.min(o,Math.abs(l-a)||o)),a=l)};for(i=0,r=n.length;i<r;++i)l=e.getPixelForValue(n[i]),d();for(a=void 0,i=0,r=e.ticks.length;i<r;++i)l=e.getPixelForTick(i),d();return o}function Zh(t,e,n,o){const i=n.barThickness;let r,l;return X(i)?(r=e.min*n.categoryPercentage,l=n.barPercentage):(r=i*o,l=1),{chunk:r/o,ratio:l,start:e.pixels[t]-r/2}}function Jh(t,e,n,o){const i=e.pixels,r=i[t];let l=t>0?i[t-1]:null,a=t<i.length-1?i[t+1]:null;const d=n.categoryPercentage;l===null&&(l=r-(a===null?e.end-e.start:a-r)),a===null&&(a=r+r-l);const c=r-(r-Math.min(l,a))/2*d;return{chunk:Math.abs(a-l)/2*d/o,ratio:n.barPercentage,start:c}}function Qh(t,e,n,o){const i=n.parse(t[0],o),r=n.parse(t[1],o),l=Math.min(i,r),a=Math.max(i,r);let d=l,c=a;Math.abs(l)>Math.abs(a)&&(d=a,c=l),e[n.axis]=c,e._custom={barStart:d,barEnd:c,start:i,end:r,min:l,max:a}}function Rl(t,e,n,o){return oe(t)?Qh(t,e,n,o):e[n.axis]=n.parse(t,o),e}function Fl(t,e,n,o){const i=t.iScale,r=t.vScale,l=i.getLabels(),a=i===r,d=[];let c,u,f,h;for(c=n,u=n+o;c<u;++c)h=e[c],f={},f[i.axis]=a||i.parse(l[c],c),d.push(Rl(h,f,r,c));return d}function Hi(t){return t&&t.barStart!==void 0&&t.barEnd!==void 0}function ep(t,e,n){return t!==0?Ye(t):(e.isHorizontal()?1:-1)*(e.min>=n?1:-1)}function tp(t){let e,n,o,i,r;return t.horizontal?(e=t.base>t.x,n="left",o="right"):(e=t.base<t.y,n="bottom",o="top"),e?(i="end",r="start"):(i="start",r="end"),{start:n,end:o,reverse:e,top:i,bottom:r}}function np(t,e,n,o){let i=e.borderSkipped;const r={};if(!i){t.borderSkipped=r;return}if(i===!0){t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:l,end:a,reverse:d,top:c,bottom:u}=tp(t);i==="middle"&&n&&(t.enableBorderRadius=!0,(n._top||0)===o?i=c:(n._bottom||0)===o?i=u:(r[Nl(u,l,a,d)]=!0,i=c)),r[Nl(i,l,a,d)]=!0,t.borderSkipped=r}function Nl(t,e,n,o){return o?(t=op(t,e,n),t=Al(t,n,e)):t=Al(t,e,n),t}function op(t,e,n){return t===e?n:t===n?e:t}function Al(t,e,n){return t==="start"?e:t==="end"?n:t}function ip(t,{inflateAmount:e},n){t.inflateAmount=e==="auto"?n===1?.33:0:e}class mo extends Te{parsePrimitiveData(e,n,o,i){return Fl(e,n,o,i)}parseArrayData(e,n,o,i){return Fl(e,n,o,i)}parseObjectData(e,n,o,i){const{iScale:r,vScale:l}=e,{xAxisKey:a="x",yAxisKey:d="y"}=this._parsing,c=r.axis==="x"?a:d,u=l.axis==="x"?a:d,f=[];let h,p,m,g;for(h=o,p=o+i;h<p;++h)g=n[h],m={},m[r.axis]=r.parse(mt(g,c),h),f.push(Rl(mt(g,u),m,l,h));return f}updateRangeFromParsed(e,n,o,i){super.updateRangeFromParsed(e,n,o,i);const r=o._custom;r&&n===this._cachedMeta.vScale&&(e.min=Math.min(e.min,r.min),e.max=Math.max(e.max,r.max))}getMaxOverflow(){return 0}getLabelAndValue(e){const n=this._cachedMeta,{iScale:o,vScale:i}=n,r=this.getParsed(e),l=r._custom,a=Hi(l)?"["+l.start+", "+l.end+"]":""+i.getLabelForValue(r[i.axis]);return{label:""+o.getLabelForValue(r[o.axis]),value:a}}initialize(){this.enableOptionSharing=!0,super.initialize();const e=this._cachedMeta;e.stack=this.getDataset().stack}update(e){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,e)}updateElements(e,n,o,i){const r=i==="reset",{index:l,_cachedMeta:{vScale:a}}=this,d=a.getBasePixel(),c=a.isHorizontal(),u=this._getRuler(),{sharedOptions:f,includeOptions:h}=this._getSharedOptions(n,i);for(let p=n;p<n+o;p++){const m=this.getParsed(p),g=r||X(m[a.axis])?{base:d,head:d}:this._calculateBarValuePixels(p),y=this._calculateBarIndexPixels(p,u),b=(m._stacks||{})[a.axis],$={horizontal:c,base:g.base,enableBorderRadius:!b||Hi(m._custom)||l===b._top||l===b._bottom,x:c?g.head:y.center,y:c?y.center:g.head,height:c?y.size:Math.abs(g.size),width:c?Math.abs(g.size):y.size};h&&($.options=f||this.resolveDataElementOptions(p,e[p].active?"active":i));const w=$.options||e[p].options;np($,w,b,l),ip($,w,u.ratio),this.updateElement(e[p],p,$,i)}}_getStacks(e,n){const{iScale:o}=this._cachedMeta,i=o.getMatchingVisibleMetas(this._type).filter(d=>d.controller.options.grouped),r=o.options.stacked,l=[],a=d=>{const c=d.controller.getParsed(n),u=c&&c[d.vScale.axis];if(X(u)||isNaN(u))return!0};for(const d of i)if(!(n!==void 0&&a(d))&&((r===!1||l.indexOf(d.stack)===-1||r===void 0&&d.stack===void 0)&&l.push(d.stack),d.index===e))break;return l.length||l.push(void 0),l}_getStackCount(e){return this._getStacks(void 0,e).length}_getStackIndex(e,n,o){const i=this._getStacks(e,o),r=n!==void 0?i.indexOf(n):-1;return r===-1?i.length-1:r}_getRuler(){const e=this.options,n=this._cachedMeta,o=n.iScale,i=[];let r,l;for(r=0,l=n.data.length;r<l;++r)i.push(o.getPixelForValue(this.getParsed(r)[o.axis],r));const a=e.barThickness;return{min:a||Kh(n),pixels:i,start:o._startPixel,end:o._endPixel,stackCount:this._getStackCount(),scale:o,grouped:e.grouped,ratio:a?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(e){const{_cachedMeta:{vScale:n,_stacked:o,index:i},options:{base:r,minBarLength:l}}=this,a=r||0,d=this.getParsed(e),c=d._custom,u=Hi(c);let f=d[n.axis],h=0,p=o?this.applyStack(n,d,o):f,m,g;p!==f&&(h=p-f,p=f),u&&(f=c.barStart,p=c.barEnd-c.barStart,f!==0&&Ye(f)!==Ye(c.barEnd)&&(h=0),h+=f);const y=!X(r)&&!u?r:h;let b=n.getPixelForValue(y);if(this.chart.getDataVisibility(e)?m=n.getPixelForValue(h+p):m=b,g=m-b,Math.abs(g)<l){g=ep(g,n,a)*l,f===a&&(b-=g/2);const $=n.getPixelForDecimal(0),w=n.getPixelForDecimal(1),S=Math.min($,w),x=Math.max($,w);b=Math.max(Math.min(b,x),S),m=b+g,o&&!u&&(d._stacks[n.axis]._visualValues[i]=n.getValueForPixel(m)-n.getValueForPixel(b))}if(b===n.getPixelForValue(a)){const $=Ye(g)*n.getLineWidthForValue(a)/2;b+=$,g-=$}return{size:g,base:b,head:m,center:m+g/2}}_calculateBarIndexPixels(e,n){const o=n.scale,i=this.options,r=i.skipNull,l=Y(i.maxBarThickness,1/0);let a,d;if(n.grouped){const c=r?this._getStackCount(e):n.stackCount,u=i.barThickness==="flex"?Jh(e,n,i,c):Zh(e,n,i,c),f=this._getStackIndex(this.index,this._cachedMeta.stack,r?e:void 0);a=u.start+u.chunk*f+u.chunk/2,d=Math.min(l,u.chunk*u.ratio)}else a=o.getPixelForValue(this.getParsed(e)[o.axis],e),d=Math.min(l,n.min*n.ratio);return{base:a-d/2,head:a+d/2,center:a,size:d}}draw(){const e=this._cachedMeta,n=e.vScale,o=e.data,i=o.length;let r=0;for(;r<i;++r)this.getParsed(r)[n.axis]!==null&&o[r].draw(this._ctx)}}I(mo,"id","bar"),I(mo,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),I(mo,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class go extends Te{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(e,n,o,i){const r=super.parsePrimitiveData(e,n,o,i);for(let l=0;l<r.length;l++)r[l]._custom=this.resolveDataElementOptions(l+o).radius;return r}parseArrayData(e,n,o,i){const r=super.parseArrayData(e,n,o,i);for(let l=0;l<r.length;l++){const a=n[o+l];r[l]._custom=Y(a[2],this.resolveDataElementOptions(l+o).radius)}return r}parseObjectData(e,n,o,i){const r=super.parseObjectData(e,n,o,i);for(let l=0;l<r.length;l++){const a=n[o+l];r[l]._custom=Y(a&&a.r&&+a.r,this.resolveDataElementOptions(l+o).radius)}return r}getMaxOverflow(){const e=this._cachedMeta.data;let n=0;for(let o=e.length-1;o>=0;--o)n=Math.max(n,e[o].size(this.resolveDataElementOptions(o))/2);return n>0&&n}getLabelAndValue(e){const n=this._cachedMeta,o=this.chart.data.labels||[],{xScale:i,yScale:r}=n,l=this.getParsed(e),a=i.getLabelForValue(l.x),d=r.getLabelForValue(l.y),c=l._custom;return{label:o[e]||"",value:"("+a+", "+d+(c?", "+c:"")+")"}}update(e){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,e)}updateElements(e,n,o,i){const r=i==="reset",{iScale:l,vScale:a}=this._cachedMeta,{sharedOptions:d,includeOptions:c}=this._getSharedOptions(n,i),u=l.axis,f=a.axis;for(let h=n;h<n+o;h++){const p=e[h],m=!r&&this.getParsed(h),g={},y=g[u]=r?l.getPixelForDecimal(.5):l.getPixelForValue(m[u]),b=g[f]=r?a.getBasePixel():a.getPixelForValue(m[f]);g.skip=isNaN(y)||isNaN(b),c&&(g.options=d||this.resolveDataElementOptions(h,p.active?"active":i),r&&(g.options.radius=0)),this.updateElement(p,h,g,i)}}resolveDataElementOptions(e,n){const o=this.getParsed(e);let i=super.resolveDataElementOptions(e,n);i.$shared&&(i=Object.assign({},i,{$shared:!1}));const r=i.radius;return n!=="active"&&(i.radius=0),i.radius+=Y(o&&o._custom,r),i}}I(go,"id","bubble"),I(go,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),I(go,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function sp(t,e,n){let o=1,i=1,r=0,l=0;if(e<se){const a=t,d=a+e,c=Math.cos(a),u=Math.sin(a),f=Math.cos(d),h=Math.sin(d),p=(w,S,x)=>mn(w,a,d,!0)?1:Math.max(S,S*n,x,x*n),m=(w,S,x)=>mn(w,a,d,!0)?-1:Math.min(S,S*n,x,x*n),g=p(0,c,f),y=p(ue,u,h),b=m(ie,c,f),$=m(ie+ue,u,h);o=(g-b)/2,i=(y-$)/2,r=-(g+b)/2,l=-(y+$)/2}return{ratioX:o,ratioY:i,offsetX:r,offsetY:l}}class At extends Te{constructor(e,n){super(e,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,n){const o=this.getDataset().data,i=this._cachedMeta;if(this._parsing===!1)i._parsed=o;else{let r=d=>+o[d];if(q(o[e])){const{key:d="value"}=this._parsing;r=c=>+mt(o[c],d)}let l,a;for(l=e,a=e+n;l<a;++l)i._parsed[l]=r(l)}}_getRotation(){return Ie(this.options.rotation-90)}_getCircumference(){return Ie(this.options.circumference)}_getRotationExtents(){let e=se,n=-se;for(let o=0;o<this.chart.data.datasets.length;++o)if(this.chart.isDatasetVisible(o)&&this.chart.getDatasetMeta(o).type===this._type){const i=this.chart.getDatasetMeta(o).controller,r=i._getRotation(),l=i._getCircumference();e=Math.min(e,r),n=Math.max(n,r+l)}return{rotation:e,circumference:n-e}}update(e){const n=this.chart,{chartArea:o}=n,i=this._cachedMeta,r=i.data,l=this.getMaxBorderWidth()+this.getMaxOffset(r)+this.options.spacing,a=Math.max((Math.min(o.width,o.height)-l)/2,0),d=Math.min($f(this.options.cutout,a),1),c=this._getRingWeight(this.index),{circumference:u,rotation:f}=this._getRotationExtents(),{ratioX:h,ratioY:p,offsetX:m,offsetY:g}=sp(f,u,d),y=(o.width-l)/h,b=(o.height-l)/p,$=Math.max(Math.min(y,b)/2,0),w=Ar(this.options.radius,$),S=Math.max(w*d,0),x=(w-S)/this._getVisibleDatasetWeightTotal();this.offsetX=m*w,this.offsetY=g*w,i.total=this.calculateTotal(),this.outerRadius=w-x*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-x*c,0),this.updateElements(r,0,r.length,e)}_circumference(e,n){const o=this.options,i=this._cachedMeta,r=this._getCircumference();return n&&o.animation.animateRotate||!this.chart.getDataVisibility(e)||i._parsed[e]===null||i.data[e].hidden?0:this.calculateCircumference(i._parsed[e]*r/se)}updateElements(e,n,o,i){const r=i==="reset",l=this.chart,a=l.chartArea,c=l.options.animation,u=(a.left+a.right)/2,f=(a.top+a.bottom)/2,h=r&&c.animateScale,p=h?0:this.innerRadius,m=h?0:this.outerRadius,{sharedOptions:g,includeOptions:y}=this._getSharedOptions(n,i);let b=this._getRotation(),$;for($=0;$<n;++$)b+=this._circumference($,r);for($=n;$<n+o;++$){const w=this._circumference($,r),S=e[$],x={x:u+this.offsetX,y:f+this.offsetY,startAngle:b,endAngle:b+w,circumference:w,outerRadius:m,innerRadius:p};y&&(x.options=g||this.resolveDataElementOptions($,S.active?"active":i)),b+=w,this.updateElement(S,$,x,i)}}calculateTotal(){const e=this._cachedMeta,n=e.data;let o=0,i;for(i=0;i<n.length;i++){const r=e._parsed[i];r!==null&&!isNaN(r)&&this.chart.getDataVisibility(i)&&!n[i].hidden&&(o+=Math.abs(r))}return o}calculateCircumference(e){const n=this._cachedMeta.total;return n>0&&!isNaN(e)?se*(Math.abs(e)/n):0}getLabelAndValue(e){const n=this._cachedMeta,o=this.chart,i=o.data.labels||[],r=yn(n._parsed[e],o.options.locale);return{label:i[e]||"",value:r}}getMaxBorderWidth(e){let n=0;const o=this.chart;let i,r,l,a,d;if(!e){for(i=0,r=o.data.datasets.length;i<r;++i)if(o.isDatasetVisible(i)){l=o.getDatasetMeta(i),e=l.data,a=l.controller;break}}if(!e)return 0;for(i=0,r=e.length;i<r;++i)d=a.resolveDataElementOptions(i),d.borderAlign!=="inner"&&(n=Math.max(n,d.borderWidth||0,d.hoverBorderWidth||0));return n}getMaxOffset(e){let n=0;for(let o=0,i=e.length;o<i;++o){const r=this.resolveDataElementOptions(o);n=Math.max(n,r.offset||0,r.hoverOffset||0)}return n}_getRingWeightOffset(e){let n=0;for(let o=0;o<e;++o)this.chart.isDatasetVisible(o)&&(n+=this._getRingWeight(o));return n}_getRingWeight(e){return Math.max(Y(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}I(At,"id","doughnut"),I(At,"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"}),I(At,"descriptors",{_scriptable:e=>e!=="spacing",_indexable:e=>e!=="spacing"&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")}),I(At,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const n=e.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:o,color:i}}=e.legend.options;return n.labels.map((r,l)=>{const d=e.getDatasetMeta(0).controller.getStyle(l);return{text:r,fillStyle:d.backgroundColor,strokeStyle:d.borderColor,fontColor:i,lineWidth:d.borderWidth,pointStyle:o,hidden:!e.getDataVisibility(l),index:l}})}return[]}},onClick(e,n,o){o.chart.toggleDataVisibility(n.index),o.chart.update()}}}});class yo extends Te{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const n=this._cachedMeta,{dataset:o,data:i=[],_dataset:r}=n,l=this.chart._animationsDisabled;let{start:a,count:d}=Kr(n,i,l);this._drawStart=a,this._drawCount=d,Zr(n)&&(a=0,d=i.length),o._chart=this.chart,o._datasetIndex=this.index,o._decimated=!!r._decimated,o.points=i;const c=this.resolveDatasetElementOptions(e);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(o,void 0,{animated:!l,options:c},e),this.updateElements(i,a,d,e)}updateElements(e,n,o,i){const r=i==="reset",{iScale:l,vScale:a,_stacked:d,_dataset:c}=this._cachedMeta,{sharedOptions:u,includeOptions:f}=this._getSharedOptions(n,i),h=l.axis,p=a.axis,{spanGaps:m,segment:g}=this.options,y=Ut(m)?m:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||r||i==="none",$=n+o,w=e.length;let S=n>0&&this.getParsed(n-1);for(let x=0;x<w;++x){const V=e[x],D=b?V:{};if(x<n||x>=$){D.skip=!0;continue}const F=this.getParsed(x),N=X(F[p]),P=D[h]=l.getPixelForValue(F[h],x),C=D[p]=r||N?a.getBasePixel():a.getPixelForValue(d?this.applyStack(a,F,d):F[p],x);D.skip=isNaN(P)||isNaN(C)||N,D.stop=x>0&&Math.abs(F[h]-S[h])>y,g&&(D.parsed=F,D.raw=c.data[x]),f&&(D.options=u||this.resolveDataElementOptions(x,V.active?"active":i)),b||this.updateElement(V,x,D,i),S=F}}getMaxOverflow(){const e=this._cachedMeta,n=e.dataset,o=n.options&&n.options.borderWidth||0,i=e.data||[];if(!i.length)return o;const r=i[0].size(this.resolveDataElementOptions(0)),l=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(o,r,l)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}I(yo,"id","line"),I(yo,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),I(yo,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class Cn extends Te{constructor(e,n){super(e,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(e){const n=this._cachedMeta,o=this.chart,i=o.data.labels||[],r=yn(n._parsed[e].r,o.options.locale);return{label:i[e]||"",value:r}}parseObjectData(e,n,o,i){return fl.bind(this)(e,n,o,i)}update(e){const n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,e)}getMinMax(){const e=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return e.data.forEach((o,i)=>{const r=this.getParsed(i).r;!isNaN(r)&&this.chart.getDataVisibility(i)&&(r<n.min&&(n.min=r),r>n.max&&(n.max=r))}),n}_updateRadius(){const e=this.chart,n=e.chartArea,o=e.options,i=Math.min(n.right-n.left,n.bottom-n.top),r=Math.max(i/2,0),l=Math.max(o.cutoutPercentage?r/100*o.cutoutPercentage:1,0),a=(r-l)/e.getVisibleDatasetCount();this.outerRadius=r-a*this.index,this.innerRadius=this.outerRadius-a}updateElements(e,n,o,i){const r=i==="reset",l=this.chart,d=l.options.animation,c=this._cachedMeta.rScale,u=c.xCenter,f=c.yCenter,h=c.getIndexAngle(0)-.5*ie;let p=h,m;const g=360/this.countVisibleElements();for(m=0;m<n;++m)p+=this._computeAngle(m,i,g);for(m=n;m<n+o;m++){const y=e[m];let b=p,$=p+this._computeAngle(m,i,g),w=l.getDataVisibility(m)?c.getDistanceFromCenterForValue(this.getParsed(m).r):0;p=$,r&&(d.animateScale&&(w=0),d.animateRotate&&(b=$=h));const S={x:u,y:f,innerRadius:0,outerRadius:w,startAngle:b,endAngle:$,options:this.resolveDataElementOptions(m,y.active?"active":i)};this.updateElement(y,m,S,i)}}countVisibleElements(){const e=this._cachedMeta;let n=0;return e.data.forEach((o,i)=>{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&n++}),n}_computeAngle(e,n,o){return this.chart.getDataVisibility(e)?Ie(this.resolveDataElementOptions(e,n).angle||o):0}}I(Cn,"id","polarArea"),I(Cn,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),I(Cn,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const n=e.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:o,color:i}}=e.legend.options;return n.labels.map((r,l)=>{const d=e.getDatasetMeta(0).controller.getStyle(l);return{text:r,fillStyle:d.backgroundColor,strokeStyle:d.borderColor,fontColor:i,lineWidth:d.borderWidth,pointStyle:o,hidden:!e.getDataVisibility(l),index:l}})}return[]}},onClick(e,n,o){o.chart.toggleDataVisibility(n.index),o.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class ji extends At{}I(ji,"id","pie"),I(ji,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class bo extends Te{getLabelAndValue(e){const n=this._cachedMeta.vScale,o=this.getParsed(e);return{label:n.getLabels()[e],value:""+n.getLabelForValue(o[n.axis])}}parseObjectData(e,n,o,i){return fl.bind(this)(e,n,o,i)}update(e){const n=this._cachedMeta,o=n.dataset,i=n.data||[],r=n.iScale.getLabels();if(o.points=i,e!=="resize"){const l=this.resolveDatasetElementOptions(e);this.options.showLine||(l.borderWidth=0);const a={_loop:!0,_fullLoop:r.length===i.length,options:l};this.updateElement(o,void 0,a,e)}this.updateElements(i,0,i.length,e)}updateElements(e,n,o,i){const r=this._cachedMeta.rScale,l=i==="reset";for(let a=n;a<n+o;a++){const d=e[a],c=this.resolveDataElementOptions(a,d.active?"active":i),u=r.getPointPositionForValue(a,this.getParsed(a).r),f=l?r.xCenter:u.x,h=l?r.yCenter:u.y,p={x:f,y:h,angle:u.angle,skip:isNaN(f)||isNaN(h),options:c};this.updateElement(d,a,p,i)}}}I(bo,"id","radar"),I(bo,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),I(bo,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class $o extends Te{getLabelAndValue(e){const n=this._cachedMeta,o=this.chart.data.labels||[],{xScale:i,yScale:r}=n,l=this.getParsed(e),a=i.getLabelForValue(l.x),d=r.getLabelForValue(l.y);return{label:o[e]||"",value:"("+a+", "+d+")"}}update(e){const n=this._cachedMeta,{data:o=[]}=n,i=this.chart._animationsDisabled;let{start:r,count:l}=Kr(n,o,i);if(this._drawStart=r,this._drawCount=l,Zr(n)&&(r=0,l=o.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:a,_dataset:d}=n;a._chart=this.chart,a._datasetIndex=this.index,a._decimated=!!d._decimated,a.points=o;const c=this.resolveDatasetElementOptions(e);c.segment=this.options.segment,this.updateElement(a,void 0,{animated:!i,options:c},e)}else this.datasetElementType&&(delete n.dataset,this.datasetElementType=!1);this.updateElements(o,r,l,e)}addElements(){const{showLine:e}=this.options;!this.datasetElementType&&e&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(e,n,o,i){const r=i==="reset",{iScale:l,vScale:a,_stacked:d,_dataset:c}=this._cachedMeta,u=this.resolveDataElementOptions(n,i),f=this.getSharedOptions(u),h=this.includeOptions(i,f),p=l.axis,m=a.axis,{spanGaps:g,segment:y}=this.options,b=Ut(g)?g:Number.POSITIVE_INFINITY,$=this.chart._animationsDisabled||r||i==="none";let w=n>0&&this.getParsed(n-1);for(let S=n;S<n+o;++S){const x=e[S],V=this.getParsed(S),D=$?x:{},F=X(V[m]),N=D[p]=l.getPixelForValue(V[p],S),P=D[m]=r||F?a.getBasePixel():a.getPixelForValue(d?this.applyStack(a,V,d):V[m],S);D.skip=isNaN(N)||isNaN(P)||F,D.stop=S>0&&Math.abs(V[p]-w[p])>b,y&&(D.parsed=V,D.raw=c.data[S]),h&&(D.options=f||this.resolveDataElementOptions(S,x.active?"active":i)),$||this.updateElement(x,S,D,i),w=V}this.updateSharedOptions(f,i,u)}getMaxOverflow(){const e=this._cachedMeta,n=e.data||[];if(!this.options.showLine){let a=0;for(let d=n.length-1;d>=0;--d)a=Math.max(a,n[d].size(this.resolveDataElementOptions(d))/2);return a>0&&a}const o=e.dataset,i=o.options&&o.options.borderWidth||0;if(!n.length)return i;const r=n[0].size(this.resolveDataElementOptions(0)),l=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,r,l)/2}}I($o,"id","scatter"),I($o,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),I($o,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var rp=Object.freeze({__proto__:null,BarController:mo,BubbleController:go,DoughnutController:At,LineController:yo,PieController:ji,PolarAreaController:Cn,RadarController:bo,ScatterController:$o});function Ot(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Wi{constructor(e){I(this,"options");this.options=e||{}}static override(e){Object.assign(Wi.prototype,e)}init(){}formats(){return Ot()}parse(){return Ot()}format(){return Ot()}add(){return Ot()}diff(){return Ot()}startOf(){return Ot()}endOf(){return Ot()}}var lp={_date:Wi};function ap(t,e,n,o){const{controller:i,data:r,_sorted:l}=t,a=i._cachedMeta.iScale;if(a&&e===a.axis&&e!=="r"&&l&&r.length){const d=a._reversePixels?Vf:et;if(o){if(i._sharedOptions){const c=r[0],u=typeof c.getRange=="function"&&c.getRange(e);if(u){const f=d(r,e,n-u),h=d(r,e,n+u);return{lo:f.lo,hi:h.hi}}}}else return d(r,e,n)}return{lo:0,hi:r.length-1}}function xn(t,e,n,o,i){const r=t.getSortedVisibleDatasetMetas(),l=n[e];for(let a=0,d=r.length;a<d;++a){const{index:c,data:u}=r[a],{lo:f,hi:h}=ap(r[a],e,l,i);for(let p=f;p<=h;++p){const m=u[p];m.skip||o(m,c,p)}}}function dp(t){const e=t.indexOf("x")!==-1,n=t.indexOf("y")!==-1;return function(o,i){const r=e?Math.abs(o.x-i.x):0,l=n?Math.abs(o.y-i.y):0;return Math.sqrt(Math.pow(r,2)+Math.pow(l,2))}}function Yi(t,e,n,o,i){const r=[];return!i&&!t.isPointInArea(e)||xn(t,n,e,function(a,d,c){!i&&!tt(a,t.chartArea,0)||a.inRange(e.x,e.y,o)&&r.push({element:a,datasetIndex:d,index:c})},!0),r}function cp(t,e,n,o){let i=[];function r(l,a,d){const{startAngle:c,endAngle:u}=l.getProps(["startAngle","endAngle"],o),{angle:f}=Wr(l,{x:e.x,y:e.y});mn(f,c,u)&&i.push({element:l,datasetIndex:a,index:d})}return xn(t,n,e,r),i}function up(t,e,n,o,i,r){let l=[];const a=dp(n);let d=Number.POSITIVE_INFINITY;function c(u,f,h){const p=u.inRange(e.x,e.y,i);if(o&&!p)return;const m=u.getCenterPoint(i);if(!(!!r||t.isPointInArea(m))&&!p)return;const y=a(e,m);y<d?(l=[{element:u,datasetIndex:f,index:h}],d=y):y===d&&l.push({element:u,datasetIndex:f,index:h})}return xn(t,n,e,c),l}function Ui(t,e,n,o,i,r){return!r&&!t.isPointInArea(e)?[]:n==="r"&&!o?cp(t,e,n,i):up(t,e,n,o,i,r)}function Ol(t,e,n,o,i){const r=[],l=n==="x"?"inXRange":"inYRange";let a=!1;return xn(t,n,e,(d,c,u)=>{d[l](e[n],i)&&(r.push({element:d,datasetIndex:c,index:u}),a=a||d.inRange(e.x,e.y,i))}),o&&!a?[]:r}var fp={evaluateInteractionItems:xn,modes:{index(t,e,n,o){const i=Ft(e,t),r=n.axis||"x",l=n.includeInvisible||!1,a=n.intersect?Yi(t,i,r,o,l):Ui(t,i,r,!1,o,l),d=[];return a.length?(t.getSortedVisibleDatasetMetas().forEach(c=>{const u=a[0].index,f=c.data[u];f&&!f.skip&&d.push({element:f,datasetIndex:c.index,index:u})}),d):[]},dataset(t,e,n,o){const i=Ft(e,t),r=n.axis||"xy",l=n.includeInvisible||!1;let a=n.intersect?Yi(t,i,r,o,l):Ui(t,i,r,!1,o,l);if(a.length>0){const d=a[0].datasetIndex,c=t.getDatasetMeta(d).data;a=[];for(let u=0;u<c.length;++u)a.push({element:c[u],datasetIndex:d,index:u})}return a},point(t,e,n,o){const i=Ft(e,t),r=n.axis||"xy",l=n.includeInvisible||!1;return Yi(t,i,r,o,l)},nearest(t,e,n,o){const i=Ft(e,t),r=n.axis||"xy",l=n.includeInvisible||!1;return Ui(t,i,r,n.intersect,o,l)},x(t,e,n,o){const i=Ft(e,t);return Ol(t,i,"x",n.intersect,o)},y(t,e,n,o){const i=Ft(e,t);return Ol(t,i,"y",n.intersect,o)}}};const Il=["left","top","right","bottom"];function kn(t,e){return t.filter(n=>n.pos===e)}function Tl(t,e){return t.filter(n=>Il.indexOf(n.pos)===-1&&n.box.axis===e)}function Sn(t,e){return t.sort((n,o)=>{const i=e?o:n,r=e?n:o;return i.weight===r.weight?i.index-r.index:i.weight-r.weight})}function hp(t){const e=[];let n,o,i,r,l,a;for(n=0,o=(t||[]).length;n<o;++n)i=t[n],{position:r,options:{stack:l,stackWeight:a=1}}=i,e.push({index:n,box:i,pos:r,horizontal:i.isHorizontal(),weight:i.weight,stack:l&&r+l,stackWeight:a});return e}function pp(t){const e={};for(const n of t){const{stack:o,pos:i,stackWeight:r}=n;if(!o||!Il.includes(i))continue;const l=e[o]||(e[o]={count:0,placed:0,weight:0,size:0});l.count++,l.weight+=r}return e}function mp(t,e){const n=pp(t),{vBoxMaxWidth:o,hBoxMaxHeight:i}=e;let r,l,a;for(r=0,l=t.length;r<l;++r){a=t[r];const{fullSize:d}=a.box,c=n[a.stack],u=c&&a.stackWeight/c.weight;a.horizontal?(a.width=u?u*o:d&&e.availableWidth,a.height=i):(a.width=o,a.height=u?u*i:d&&e.availableHeight)}return n}function gp(t){const e=hp(t),n=Sn(e.filter(c=>c.box.fullSize),!0),o=Sn(kn(e,"left"),!0),i=Sn(kn(e,"right")),r=Sn(kn(e,"top"),!0),l=Sn(kn(e,"bottom")),a=Tl(e,"x"),d=Tl(e,"y");return{fullSize:n,leftAndTop:o.concat(r),rightAndBottom:i.concat(d).concat(l).concat(a),chartArea:kn(e,"chartArea"),vertical:o.concat(i).concat(d),horizontal:r.concat(l).concat(a)}}function Ll(t,e,n,o){return Math.max(t[n],e[n])+Math.max(t[o],e[o])}function zl(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function yp(t,e,n,o){const{pos:i,box:r}=n,l=t.maxPadding;if(!q(i)){n.size&&(t[i]-=n.size);const f=o[n.stack]||{size:0,count:1};f.size=Math.max(f.size,n.horizontal?r.height:r.width),n.size=f.size/f.count,t[i]+=n.size}r.getPadding&&zl(l,r.getPadding());const a=Math.max(0,e.outerWidth-Ll(l,t,"left","right")),d=Math.max(0,e.outerHeight-Ll(l,t,"top","bottom")),c=a!==t.w,u=d!==t.h;return t.w=a,t.h=d,n.horizontal?{same:c,other:u}:{same:u,other:c}}function bp(t){const e=t.maxPadding;function n(o){const i=Math.max(e[o]-t[o],0);return t[o]+=i,i}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}function $p(t,e){const n=e.maxPadding;function o(i){const r={left:0,top:0,right:0,bottom:0};return i.forEach(l=>{r[l]=Math.max(e[l],n[l])}),r}return o(t?["left","right"]:["top","bottom"])}function vn(t,e,n,o){const i=[];let r,l,a,d,c,u;for(r=0,l=t.length,c=0;r<l;++r){a=t[r],d=a.box,d.update(a.width||e.w,a.height||e.h,$p(a.horizontal,e));const{same:f,other:h}=yp(e,n,a,o);c|=f&&i.length,u=u||h,d.fullSize||i.push(a)}return c&&vn(i,e,n,o)||u}function _o(t,e,n,o,i){t.top=n,t.left=e,t.right=e+o,t.bottom=n+i,t.width=o,t.height=i}function Hl(t,e,n,o){const i=n.padding;let{x:r,y:l}=e;for(const a of t){const d=a.box,c=o[a.stack]||{count:1,placed:0,weight:1},u=a.stackWeight/c.weight||1;if(a.horizontal){const f=e.w*u,h=c.size||d.height;hn(c.start)&&(l=c.start),d.fullSize?_o(d,i.left,l,n.outerWidth-i.right-i.left,h):_o(d,e.left+c.placed,l,f,h),c.start=l,c.placed+=f,l=d.bottom}else{const f=e.h*u,h=c.size||d.width;hn(c.start)&&(r=c.start),d.fullSize?_o(d,r,i.top,h,n.outerHeight-i.bottom-i.top):_o(d,r,e.top+c.placed,h,f),c.start=r,c.placed+=f,r=d.right}}e.x=r,e.y=l}var $e={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(n){e.draw(n)}}]},t.boxes.push(e)},removeBox(t,e){const n=t.boxes?t.boxes.indexOf(e):-1;n!==-1&&t.boxes.splice(n,1)},configure(t,e,n){e.fullSize=n.fullSize,e.position=n.position,e.weight=n.weight},update(t,e,n,o){if(!t)return;const i=be(t.options.layout.padding),r=Math.max(e-i.width,0),l=Math.max(n-i.height,0),a=gp(t.boxes),d=a.vertical,c=a.horizontal;ee(t.boxes,g=>{typeof g.beforeLayout=="function"&&g.beforeLayout()});const u=d.reduce((g,y)=>y.box.options&&y.box.options.display===!1?g:g+1,0)||1,f=Object.freeze({outerWidth:e,outerHeight:n,padding:i,availableWidth:r,availableHeight:l,vBoxMaxWidth:r/2/u,hBoxMaxHeight:l/2}),h=Object.assign({},i);zl(h,be(o));const p=Object.assign({maxPadding:h,w:r,h:l,x:i.left,y:i.top},i),m=mp(d.concat(c),f);vn(a.fullSize,p,f,m),vn(d,p,f,m),vn(c,p,f,m)&&vn(d,p,f,m),bp(p),Hl(a.leftAndTop,p,f,m),p.x+=p.w,p.y+=p.h,Hl(a.rightAndBottom,p,f,m),t.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},ee(a.chartArea,g=>{const y=g.box;Object.assign(y,t.chartArea),y.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})})}};class jl{acquireContext(e,n){}releaseContext(e){return!1}addEventListener(e,n,o){}removeEventListener(e,n,o){}getDevicePixelRatio(){return 1}getMaximumSize(e,n,o,i){return n=Math.max(0,n||e.width),o=o||e.height,{width:n,height:Math.max(0,i?Math.floor(n/i):o)}}isAttached(e){return!0}updateConfig(e){}}class _p extends jl{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const wo="$chartjs",wp={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Wl=t=>t===null||t==="";function Cp(t,e){const n=t.style,o=t.getAttribute("height"),i=t.getAttribute("width");if(t[wo]={initial:{height:o,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",Wl(i)){const r=ml(t,"width");r!==void 0&&(t.width=r)}if(Wl(o))if(t.style.height==="")t.height=t.width/(e||2);else{const r=ml(t,"height");r!==void 0&&(t.height=r)}return t}const Yl=kh?{passive:!0}:!1;function xp(t,e,n){t&&t.addEventListener(e,n,Yl)}function kp(t,e,n){t&&t.canvas&&t.canvas.removeEventListener(e,n,Yl)}function Sp(t,e){const n=wp[t.type]||t.type,{x:o,y:i}=Ft(t,e);return{type:n,chart:e,native:t,x:o!==void 0?o:null,y:i!==void 0?i:null}}function Co(t,e){for(const n of t)if(n===e||n.contains(e))return!0}function vp(t,e,n){const o=t.canvas,i=new MutationObserver(r=>{let l=!1;for(const a of r)l=l||Co(a.addedNodes,o),l=l&&!Co(a.removedNodes,o);l&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function Mp(t,e,n){const o=t.canvas,i=new MutationObserver(r=>{let l=!1;for(const a of r)l=l||Co(a.removedNodes,o),l=l&&!Co(a.addedNodes,o);l&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const Mn=new Map;let Ul=0;function Gl(){const t=window.devicePixelRatio;t!==Ul&&(Ul=t,Mn.forEach((e,n)=>{n.currentDevicePixelRatio!==t&&e()}))}function Dp(t,e){Mn.size||window.addEventListener("resize",Gl),Mn.set(t,e)}function Ep(t){Mn.delete(t),Mn.size||window.removeEventListener("resize",Gl)}function Bp(t,e,n){const o=t.canvas,i=o&&Ti(o);if(!i)return;const r=Xr((a,d)=>{const c=i.clientWidth;n(a,d),c<i.clientWidth&&n()},window),l=new ResizeObserver(a=>{const d=a[0],c=d.contentRect.width,u=d.contentRect.height;c===0&&u===0||r(c,u)});return l.observe(i),Dp(t,r),l}function Gi(t,e,n){n&&n.disconnect(),e==="resize"&&Ep(t)}function Vp(t,e,n){const o=t.canvas,i=Xr(r=>{t.ctx!==null&&n(Sp(r,t))},t);return xp(o,e,i),i}class Pp extends jl{acquireContext(e,n){const o=e&&e.getContext&&e.getContext("2d");return o&&o.canvas===e?(Cp(e,n),o):null}releaseContext(e){const n=e.canvas;if(!n[wo])return!1;const o=n[wo].initial;["height","width"].forEach(r=>{const l=o[r];X(l)?n.removeAttribute(r):n.setAttribute(r,l)});const i=o.style||{};return Object.keys(i).forEach(r=>{n.style[r]=i[r]}),n.width=n.width,delete n[wo],!0}addEventListener(e,n,o){this.removeEventListener(e,n);const i=e.$proxies||(e.$proxies={}),l={attach:vp,detach:Mp,resize:Bp}[n]||Vp;i[n]=l(e,n,o)}removeEventListener(e,n){const o=e.$proxies||(e.$proxies={}),i=o[n];if(!i)return;({attach:Gi,detach:Gi,resize:Gi}[n]||kp)(e,n,i),o[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,n,o,i){return xh(e,n,o,i)}isAttached(e){const n=Ti(e);return!!(n&&n.isConnected)}}function Rp(t){return!Ii()||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas?_p:Pp}let ot=(fi=class{constructor(){I(this,"x");I(this,"y");I(this,"active",!1);I(this,"options");I(this,"$animations")}tooltipPosition(e){const{x:n,y:o}=this.getProps(["x","y"],e);return{x:n,y:o}}hasValue(){return Ut(this.x)&&Ut(this.y)}getProps(e,n){const o=this.$animations;if(!n||!o)return this;const i={};return e.forEach(r=>{i[r]=o[r]&&o[r].active()?o[r]._to:this[r]}),i}},I(fi,"defaults",{}),I(fi,"defaultRoutes"),fi);function Fp(t,e){const n=t.options.ticks,o=Np(t),i=Math.min(n.maxTicksLimit||o,o),r=n.major.enabled?Op(e):[],l=r.length,a=r[0],d=r[l-1],c=[];if(l>i)return Ip(e,c,r,l/i),c;const u=Ap(r,e,i);if(l>0){let f,h;const p=l>1?Math.round((d-a)/(l-1)):null;for(xo(e,c,u,X(p)?0:a-p,a),f=0,h=l-1;f<h;f++)xo(e,c,u,r[f],r[f+1]);return xo(e,c,u,d,X(p)?e.length:d+p),c}return xo(e,c,u),c}function Np(t){const e=t.options.offset,n=t._tickSize(),o=t._length/n+(e?0:1),i=t._maxLength/n;return Math.floor(Math.min(o,i))}function Ap(t,e,n){const o=Tp(t),i=e.length/n;if(!o)return Math.max(i,1);const r=Mf(o);for(let l=0,a=r.length-1;l<a;l++){const d=r[l];if(d>i)return d}return Math.max(i,1)}function Op(t){const e=[];let n,o;for(n=0,o=t.length;n<o;n++)t[n].major&&e.push(n);return e}function Ip(t,e,n,o){let i=0,r=n[0],l;for(o=Math.ceil(o),l=0;l<t.length;l++)l===r&&(e.push(t[l]),i++,r=n[i*o])}function xo(t,e,n,o,i){const r=Y(o,0),l=Math.min(Y(i,t.length),t.length);let a=0,d,c,u;for(n=Math.ceil(n),i&&(d=i-o,n=d/Math.floor(d/n)),u=r;u<0;)a++,u=Math.round(r+a*n);for(c=Math.max(r,0);c<l;c++)c===u&&(e.push(t[c]),a++,u=Math.round(r+a*n))}function Tp(t){const e=t.length;let n,o;if(e<2)return!1;for(o=t[0],n=1;n<e;++n)if(t[n]-t[n-1]!==o)return!1;return o}const Lp=t=>t==="left"?"right":t==="right"?"left":t,ql=(t,e,n)=>e==="top"||e==="left"?t[e]+n:t[e]-n,Xl=(t,e)=>Math.min(e||t,t);function Kl(t,e){const n=[],o=t.length/e,i=t.length;let r=0;for(;r<i;r+=o)n.push(t[Math.floor(r)]);return n}function zp(t,e,n){const o=t.ticks.length,i=Math.min(e,o-1),r=t._startPixel,l=t._endPixel,a=1e-6;let d=t.getPixelForTick(i),c;if(!(n&&(o===1?c=Math.max(d-r,l-d):e===0?c=(t.getPixelForTick(1)-d)/2:c=(d-t.getPixelForTick(i-1))/2,d+=i<e?c:-c,d<r-a||d>l+a)))return d}function Hp(t,e){ee(t,n=>{const o=n.gc,i=o.length/2;let r;if(i>e){for(r=0;r<i;++r)delete n.data[o[r]];o.splice(0,i)}})}function Dn(t){return t.drawTicks?t.tickLength:0}function Zl(t,e){if(!t.display)return 0;const n=he(t.font,e),o=be(t.padding);return(oe(t.text)?t.text.length:1)*n.lineHeight+o.height}function jp(t,e){return bt(t,{scale:e,type:"scale"})}function Wp(t,e,n){return bt(t,{tick:n,index:e,type:"tick"})}function Yp(t,e,n){let o=Di(t);return(n&&e!=="right"||!n&&e==="right")&&(o=Lp(o)),o}function Up(t,e,n,o){const{top:i,left:r,bottom:l,right:a,chart:d}=t,{chartArea:c,scales:u}=d;let f=0,h,p,m;const g=l-i,y=a-r;if(t.isHorizontal()){if(p=ye(o,r,a),q(n)){const b=Object.keys(n)[0],$=n[b];m=u[b].getPixelForValue($)+g-e}else n==="center"?m=(c.bottom+c.top)/2+g-e:m=ql(t,n,e);h=a-r}else{if(q(n)){const b=Object.keys(n)[0],$=n[b];p=u[b].getPixelForValue($)-y+e}else n==="center"?p=(c.left+c.right)/2-y+e:p=ql(t,n,e);m=ye(o,l,i),f=n==="left"?-ue:ue}return{titleX:p,titleY:m,maxWidth:h,rotation:f}}class It extends ot{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.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(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,n){return e}getUserBounds(){let{_userMin:e,_userMax:n,_suggestedMin:o,_suggestedMax:i}=this;return e=De(e,Number.POSITIVE_INFINITY),n=De(n,Number.NEGATIVE_INFINITY),o=De(o,Number.POSITIVE_INFINITY),i=De(i,Number.NEGATIVE_INFINITY),{min:De(e,o),max:De(n,i),minDefined:de(e),maxDefined:de(n)}}getMinMax(e){let{min:n,max:o,minDefined:i,maxDefined:r}=this.getUserBounds(),l;if(i&&r)return{min:n,max:o};const a=this.getMatchingVisibleMetas();for(let d=0,c=a.length;d<c;++d)l=a[d].controller.getMinMax(this,e),i||(n=Math.min(n,l.min)),r||(o=Math.max(o,l.max));return n=r&&n>o?o:n,o=i&&n>o?n:o,{min:De(n,De(o,n)),max:De(o,De(n,o))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){ne(this.options.beforeUpdate,[this])}update(e,n,o){const{beginAtZero:i,grace:r,ticks:l}=this.options,a=l.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=n,this._margins=o=Object.assign({left:0,right:0,top:0,bottom:0},o),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+o.left+o.right:this.height+o.top+o.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=th(this,r,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const d=a<this.ticks.length;this._convertTicksToLabels(d?Kl(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),l.display&&(l.autoSkip||l.source==="auto")&&(this.ticks=Fp(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),d&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e=this.options.reverse,n,o;this.isHorizontal()?(n=this.left,o=this.right):(n=this.top,o=this.bottom,e=!e),this._startPixel=n,this._endPixel=o,this._reversePixels=e,this._length=o-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){ne(this.options.afterUpdate,[this])}beforeSetDimensions(){ne(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(){ne(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),ne(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){ne(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const n=this.options.ticks;let o,i,r;for(o=0,i=e.length;o<i;o++)r=e[o],r.label=ne(n.callback,[r.value,o,e],this)}afterTickToLabelConversion(){ne(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){ne(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,n=e.ticks,o=Xl(this.ticks.length,e.ticks.maxTicksLimit),i=n.minRotation||0,r=n.maxRotation;let l=i,a,d,c;if(!this._isVisible()||!n.display||i>=r||o<=1||!this.isHorizontal()){this.labelRotation=i;return}const u=this._getLabelSizes(),f=u.widest.width,h=u.highest.height,p=me(this.chart.width-f,0,this.maxWidth);a=e.offset?this.maxWidth/o:p/(o-1),f+6>a&&(a=p/(o-(e.offset?.5:1)),d=this.maxHeight-Dn(e.grid)-n.padding-Zl(e.title,this.chart.options.font),c=Math.sqrt(f*f+h*h),l=Si(Math.min(Math.asin(me((u.highest.height+6)/a,-1,1)),Math.asin(me(d/c,-1,1))-Math.asin(me(h/c,-1,1)))),l=Math.max(i,Math.min(r,l))),this.labelRotation=l}afterCalculateLabelRotation(){ne(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){ne(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:n,options:{ticks:o,title:i,grid:r}}=this,l=this._isVisible(),a=this.isHorizontal();if(l){const d=Zl(i,n.options.font);if(a?(e.width=this.maxWidth,e.height=Dn(r)+d):(e.height=this.maxHeight,e.width=Dn(r)+d),o.display&&this.ticks.length){const{first:c,last:u,widest:f,highest:h}=this._getLabelSizes(),p=o.padding*2,m=Ie(this.labelRotation),g=Math.cos(m),y=Math.sin(m);if(a){const b=o.mirror?0:y*f.width+g*h.height;e.height=Math.min(this.maxHeight,e.height+b+p)}else{const b=o.mirror?0:g*f.width+y*h.height;e.width=Math.min(this.maxWidth,e.width+b+p)}this._calculatePadding(c,u,y,g)}}this._handleMargins(),a?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,n,o,i){const{ticks:{align:r,padding:l},position:a}=this.options,d=this.labelRotation!==0,c=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,f=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,p=0;d?c?(h=i*e.width,p=o*n.height):(h=o*e.height,p=i*n.width):r==="start"?p=n.width:r==="end"?h=e.width:r!=="inner"&&(h=e.width/2,p=n.width/2),this.paddingLeft=Math.max((h-u+l)*this.width/(this.width-u),0),this.paddingRight=Math.max((p-f+l)*this.width/(this.width-f),0)}else{let u=n.height/2,f=e.height/2;r==="start"?(u=0,f=e.height):r==="end"&&(u=n.height,f=0),this.paddingTop=u+l,this.paddingBottom=f+l}}_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(){ne(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:n}=this.options;return n==="top"||n==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let n,o;for(n=0,o=e.length;n<o;n++)X(e[n].label)&&(e.splice(n,1),o--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const n=this.options.ticks.sampleSize;let o=this.ticks;n<o.length&&(o=Kl(o,n)),this._labelSizes=e=this._computeLabelSizes(o,o.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,n,o){const{ctx:i,_longestTextCache:r}=this,l=[],a=[],d=Math.floor(n/Xl(n,o));let c=0,u=0,f,h,p,m,g,y,b,$,w,S,x;for(f=0;f<n;f+=d){if(m=e[f].label,g=this._resolveTickFontOptions(f),i.font=y=g.string,b=r[y]=r[y]||{data:{},gc:[]},$=g.lineHeight,w=S=0,!X(m)&&!oe(m))w=lo(i,b.data,b.gc,w,m),S=$;else if(oe(m))for(h=0,p=m.length;h<p;++h)x=m[h],!X(x)&&!oe(x)&&(w=lo(i,b.data,b.gc,w,x),S+=$);l.push(w),a.push(S),c=Math.max(w,c),u=Math.max(S,u)}Hp(r,n);const V=l.indexOf(c),D=a.indexOf(u),F=N=>({width:l[N]||0,height:a[N]||0});return{first:F(0),last:F(n-1),widest:F(V),highest:F(D),widths:l,heights:a}}getLabelForValue(e){return e}getPixelForValue(e,n){return NaN}getValueForPixel(e){}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const n=this._startPixel+e*this._length;return Bf(this._alignToPixels?Bt(this.chart,n,0):n)}getDecimalForPixel(e){const n=(e-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:n}=this;return e<0&&n<0?n:e>0&&n>0?e:0}getContext(e){const n=this.ticks||[];if(e>=0&&e<n.length){const o=n[e];return o.$context||(o.$context=Wp(this.getContext(),e,o))}return this.$context||(this.$context=jp(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,n=Ie(this.labelRotation),o=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),r=this._getLabelSizes(),l=e.autoSkipPadding||0,a=r?r.widest.width+l:0,d=r?r.highest.height+l:0;return this.isHorizontal()?d*o>a*i?a/o:d/i:d*i<a*o?d/o:a/i}_isVisible(){const e=this.options.display;return e!=="auto"?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const n=this.axis,o=this.chart,i=this.options,{grid:r,position:l,border:a}=i,d=r.offset,c=this.isHorizontal(),f=this.ticks.length+(d?1:0),h=Dn(r),p=[],m=a.setContext(this.getContext()),g=m.display?m.width:0,y=g/2,b=function(k){return Bt(o,k,g)};let $,w,S,x,V,D,F,N,P,C,_,E;if(l==="top")$=b(this.bottom),D=this.bottom-h,N=$-y,C=b(e.top)+y,E=e.bottom;else if(l==="bottom")$=b(this.top),C=e.top,E=b(e.bottom)-y,D=$+y,N=this.top+h;else if(l==="left")$=b(this.right),V=this.right-h,F=$-y,P=b(e.left)+y,_=e.right;else if(l==="right")$=b(this.left),P=e.left,_=b(e.right)-y,V=$+y,F=this.left+h;else if(n==="x"){if(l==="center")$=b((e.top+e.bottom)/2+.5);else if(q(l)){const k=Object.keys(l)[0],B=l[k];$=b(this.chart.scales[k].getPixelForValue(B))}C=e.top,E=e.bottom,D=$+y,N=D+h}else if(n==="y"){if(l==="center")$=b((e.left+e.right)/2);else if(q(l)){const k=Object.keys(l)[0],B=l[k];$=b(this.chart.scales[k].getPixelForValue(B))}V=$-y,F=V-h,P=e.left,_=e.right}const v=Y(i.ticks.maxTicksLimit,f),M=Math.max(1,Math.ceil(f/v));for(w=0;w<f;w+=M){const k=this.getContext(w),B=r.setContext(k),O=a.setContext(k),L=B.lineWidth,T=B.color,W=O.dash||[],U=O.dashOffset,G=B.tickWidth,Q=B.tickColor,le=B.tickBorderDash||[],fe=B.tickBorderDashOffset;S=zp(this,w,d),S!==void 0&&(x=Bt(o,S,L),c?V=F=P=_=x:D=N=C=E=x,p.push({tx1:V,ty1:D,tx2:F,ty2:N,x1:P,y1:C,x2:_,y2:E,width:L,color:T,borderDash:W,borderDashOffset:U,tickWidth:G,tickColor:Q,tickBorderDash:le,tickBorderDashOffset:fe}))}return this._ticksLength=f,this._borderValue=$,p}_computeLabelItems(e){const n=this.axis,o=this.options,{position:i,ticks:r}=o,l=this.isHorizontal(),a=this.ticks,{align:d,crossAlign:c,padding:u,mirror:f}=r,h=Dn(o.grid),p=h+u,m=f?-u:p,g=-Ie(this.labelRotation),y=[];let b,$,w,S,x,V,D,F,N,P,C,_,E="middle";if(i==="top")V=this.bottom-m,D=this._getXAxisLabelAlignment();else if(i==="bottom")V=this.top+m,D=this._getXAxisLabelAlignment();else if(i==="left"){const M=this._getYAxisLabelAlignment(h);D=M.textAlign,x=M.x}else if(i==="right"){const M=this._getYAxisLabelAlignment(h);D=M.textAlign,x=M.x}else if(n==="x"){if(i==="center")V=(e.top+e.bottom)/2+p;else if(q(i)){const M=Object.keys(i)[0],k=i[M];V=this.chart.scales[M].getPixelForValue(k)+p}D=this._getXAxisLabelAlignment()}else if(n==="y"){if(i==="center")x=(e.left+e.right)/2-p;else if(q(i)){const M=Object.keys(i)[0],k=i[M];x=this.chart.scales[M].getPixelForValue(k)}D=this._getYAxisLabelAlignment(h).textAlign}n==="y"&&(d==="start"?E="top":d==="end"&&(E="bottom"));const v=this._getLabelSizes();for(b=0,$=a.length;b<$;++b){w=a[b],S=w.label;const M=r.setContext(this.getContext(b));F=this.getPixelForTick(b)+r.labelOffset,N=this._resolveTickFontOptions(b),P=N.lineHeight,C=oe(S)?S.length:1;const k=C/2,B=M.color,O=M.textStrokeColor,L=M.textStrokeWidth;let T=D;l?(x=F,D==="inner"&&(b===$-1?T=this.options.reverse?"left":"right":b===0?T=this.options.reverse?"right":"left":T="center"),i==="top"?c==="near"||g!==0?_=-C*P+P/2:c==="center"?_=-v.highest.height/2-k*P+P:_=-v.highest.height+P/2:c==="near"||g!==0?_=P/2:c==="center"?_=v.highest.height/2-k*P:_=v.highest.height-C*P,f&&(_*=-1),g!==0&&!M.showLabelBackdrop&&(x+=P/2*Math.sin(g))):(V=F,_=(1-C)*P/2);let W;if(M.showLabelBackdrop){const U=be(M.backdropPadding),G=v.heights[b],Q=v.widths[b];let le=_-U.top,fe=0-U.left;switch(E){case"middle":le-=G/2;break;case"bottom":le-=G;break}switch(D){case"center":fe-=Q/2;break;case"right":fe-=Q;break;case"inner":b===$-1?fe-=Q:b>0&&(fe-=Q/2);break}W={left:fe,top:le,width:Q+U.width,height:G+U.height,color:M.backdropColor}}y.push({label:S,font:N,textOffset:_,options:{rotation:g,color:B,strokeColor:O,strokeWidth:L,textAlign:T,textBaseline:E,translation:[x,V],backdrop:W}})}return y}_getXAxisLabelAlignment(){const{position:e,ticks:n}=this.options;if(-Ie(this.labelRotation))return e==="top"?"left":"right";let i="center";return n.align==="start"?i="left":n.align==="end"?i="right":n.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(e){const{position:n,ticks:{crossAlign:o,mirror:i,padding:r}}=this.options,l=this._getLabelSizes(),a=e+r,d=l.widest.width;let c,u;return n==="left"?i?(u=this.right+r,o==="near"?c="left":o==="center"?(c="center",u+=d/2):(c="right",u+=d)):(u=this.right-a,o==="near"?c="right":o==="center"?(c="center",u-=d/2):(c="left",u=this.left)):n==="right"?i?(u=this.left+r,o==="near"?c="right":o==="center"?(c="center",u-=d/2):(c="left",u-=d)):(u=this.left+a,o==="near"?c="left":o==="center"?(c="center",u+=d/2):(c="right",u=this.right)):c="right",{textAlign:c,x:u}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:e.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){const{ctx:e,options:{backgroundColor:n},left:o,top:i,width:r,height:l}=this;n&&(e.save(),e.fillStyle=n,e.fillRect(o,i,r,l),e.restore())}getLineWidthForValue(e){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const i=this.ticks.findIndex(r=>r.value===e);return i>=0?n.setContext(this.getContext(i)).lineWidth:0}drawGrid(e){const n=this.options.grid,o=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let r,l;const a=(d,c,u)=>{!u.width||!u.color||(o.save(),o.lineWidth=u.width,o.strokeStyle=u.color,o.setLineDash(u.borderDash||[]),o.lineDashOffset=u.borderDashOffset,o.beginPath(),o.moveTo(d.x,d.y),o.lineTo(c.x,c.y),o.stroke(),o.restore())};if(n.display)for(r=0,l=i.length;r<l;++r){const d=i[r];n.drawOnChartArea&&a({x:d.x1,y:d.y1},{x:d.x2,y:d.y2},d),n.drawTicks&&a({x:d.tx1,y:d.ty1},{x:d.tx2,y:d.ty2},{color:d.tickColor,width:d.tickWidth,borderDash:d.tickBorderDash,borderDashOffset:d.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:n,options:{border:o,grid:i}}=this,r=o.setContext(this.getContext()),l=o.display?r.width:0;if(!l)return;const a=i.setContext(this.getContext(0)).lineWidth,d=this._borderValue;let c,u,f,h;this.isHorizontal()?(c=Bt(e,this.left,l)-l/2,u=Bt(e,this.right,a)+a/2,f=h=d):(f=Bt(e,this.top,l)-l/2,h=Bt(e,this.bottom,a)+a/2,c=u=d),n.save(),n.lineWidth=r.width,n.strokeStyle=r.color,n.beginPath(),n.moveTo(c,f),n.lineTo(u,h),n.stroke(),n.restore()}drawLabels(e){if(!this.options.ticks.display)return;const o=this.ctx,i=this._computeLabelArea();i&&ao(o,i);const r=this.getLabelItems(e);for(const l of r){const a=l.options,d=l.font,c=l.label,u=l.textOffset;Vt(o,c,0,u,d,a)}i&&co(o)}drawTitle(){const{ctx:e,options:{position:n,title:o,reverse:i}}=this;if(!o.display)return;const r=he(o.font),l=be(o.padding),a=o.align;let d=r.lineHeight/2;n==="bottom"||n==="center"||q(n)?(d+=l.bottom,oe(o.text)&&(d+=r.lineHeight*(o.text.length-1))):d+=l.top;const{titleX:c,titleY:u,maxWidth:f,rotation:h}=Up(this,d,n,a);Vt(e,o.text,0,0,r,{color:o.color,maxWidth:f,rotation:h,textAlign:Yp(a,n,i),textBaseline:"middle",translation:[c,u]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){const e=this.options,n=e.ticks&&e.ticks.z||0,o=Y(e.grid&&e.grid.z,-1),i=Y(e.border&&e.border.z,0);return!this._isVisible()||this.draw!==It.prototype.draw?[{z:n,draw:r=>{this.draw(r)}}]:[{z:o,draw:r=>{this.drawBackground(),this.drawGrid(r),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:r=>{this.drawLabels(r)}}]}getMatchingVisibleMetas(e){const n=this.chart.getSortedVisibleDatasetMetas(),o=this.axis+"AxisID",i=[];let r,l;for(r=0,l=n.length;r<l;++r){const a=n[r];a[o]===this.id&&(!e||a.type===e)&&i.push(a)}return i}_resolveTickFontOptions(e){const n=this.options.ticks.setContext(this.getContext(e));return he(n.font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class ko{constructor(e,n,o){this.type=e,this.scope=n,this.override=o,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const n=Object.getPrototypeOf(e);let o;Xp(n)&&(o=this.register(n));const i=this.items,r=e.id,l=this.scope+"."+r;if(!r)throw new Error("class does not have id: "+e);return r in i||(i[r]=e,Gp(e,l,o),this.override&&ce.override(e.id,e.overrides)),l}get(e){return this.items[e]}unregister(e){const n=this.items,o=e.id,i=this.scope;o in n&&delete n[o],i&&o in ce[i]&&(delete ce[i][o],this.override&&delete Et[o])}}function Gp(t,e,n){const o=un(Object.create(null),[n?ce.get(n):{},ce.get(e),t.defaults]);ce.set(e,o),t.defaultRoutes&&qp(e,t.defaultRoutes),t.descriptors&&ce.describe(e,t.descriptors)}function qp(t,e){Object.keys(e).forEach(n=>{const o=n.split("."),i=o.pop(),r=[t].concat(o).join("."),l=e[n].split("."),a=l.pop(),d=l.join(".");ce.route(r,i,d,a)})}function Xp(t){return"id"in t&&"defaults"in t}class Kp{constructor(){this.controllers=new ko(Te,"datasets",!0),this.elements=new ko(ot,"elements"),this.plugins=new ko(Object,"plugins"),this.scales=new ko(It,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,n,o){[...n].forEach(i=>{const r=o||this._getRegistryForType(i);o||r.isForType(i)||r===this.plugins&&i.id?this._exec(e,r,i):ee(i,l=>{const a=o||this._getRegistryForType(l);this._exec(e,a,l)})})}_exec(e,n,o){const i=ki(e);ne(o["before"+i],[],o),n[e](o),ne(o["after"+i],[],o)}_getRegistryForType(e){for(let n=0;n<this._typedRegistries.length;n++){const o=this._typedRegistries[n];if(o.isForType(e))return o}return this.plugins}_get(e,n,o){const i=n.get(e);if(i===void 0)throw new Error('"'+e+'" is not a registered '+o+".");return i}}var Ue=new Kp;class Zp{constructor(){this._init=[]}notify(e,n,o,i){n==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));const r=i?this._descriptors(e).filter(i):this._descriptors(e),l=this._notify(r,e,n,o);return n==="afterDestroy"&&(this._notify(r,e,"stop"),this._notify(this._init,e,"uninstall")),l}_notify(e,n,o,i){i=i||{};for(const r of e){const l=r.plugin,a=l[o],d=[n,i,r.options];if(ne(a,d,l)===!1&&i.cancelable)return!1}return!0}invalidate(){X(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),n}_createDescriptors(e,n){const o=e&&e.config,i=Y(o.options&&o.options.plugins,{}),r=Jp(o);return i===!1&&!n?[]:em(e,r,i,n)}_notifyStateChanges(e){const n=this._oldCache||[],o=this._cache,i=(r,l)=>r.filter(a=>!l.some(d=>a.plugin.id===d.plugin.id));this._notify(i(n,o),e,"stop"),this._notify(i(o,n),e,"start")}}function Jp(t){const e={},n=[],o=Object.keys(Ue.plugins.items);for(let r=0;r<o.length;r++)n.push(Ue.getPlugin(o[r]));const i=t.plugins||[];for(let r=0;r<i.length;r++){const l=i[r];n.indexOf(l)===-1&&(n.push(l),e[l.id]=!0)}return{plugins:n,localIds:e}}function Qp(t,e){return!e&&t===!1?null:t===!0?{}:t}function em(t,{plugins:e,localIds:n},o,i){const r=[],l=t.getContext();for(const a of e){const d=a.id,c=Qp(o[d],i);c!==null&&r.push({plugin:a,options:tm(t.config,{plugin:a,local:n[d]},c,l)})}return r}function tm(t,{plugin:e,local:n},o,i){const r=t.pluginScopeKeys(e),l=t.getOptionScopes(o,r);return n&&e.defaults&&l.push(e.defaults),t.createResolver(l,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function qi(t,e){const n=ce.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||n.indexAxis||"x"}function nm(t,e){let n=t;return t==="_index_"?n=e:t==="_value_"&&(n=e==="x"?"y":"x"),n}function om(t,e){return t===e?"_index_":"_value_"}function Jl(t){if(t==="x"||t==="y"||t==="r")return t}function im(t){if(t==="top"||t==="bottom")return"x";if(t==="left"||t==="right")return"y"}function Xi(t,...e){if(Jl(t))return t;for(const n of e){const o=n.axis||im(n.position)||t.length>1&&Jl(t[0].toLowerCase());if(o)return o}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function Ql(t,e,n){if(n[e+"AxisID"]===t)return{axis:e}}function sm(t,e){if(e.data&&e.data.datasets){const n=e.data.datasets.filter(o=>o.xAxisID===t||o.yAxisID===t);if(n.length)return Ql(t,"x",n[0])||Ql(t,"y",n[0])}return{}}function rm(t,e){const n=Et[t.type]||{scales:{}},o=e.scales||{},i=qi(t.type,e),r=Object.create(null);return Object.keys(o).forEach(l=>{const a=o[l];if(!q(a))return console.error(`Invalid scale configuration for scale: ${l}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${l}`);const d=Xi(l,a,sm(l,t),ce.scales[a.type]),c=om(d,i),u=n.scales||{};r[l]=fn(Object.create(null),[{axis:d},a,u[d],u[c]])}),t.data.datasets.forEach(l=>{const a=l.type||t.type,d=l.indexAxis||qi(a,e),u=(Et[a]||{}).scales||{};Object.keys(u).forEach(f=>{const h=nm(f,d),p=l[h+"AxisID"]||h;r[p]=r[p]||Object.create(null),fn(r[p],[{axis:h},o[p],u[f]])})}),Object.keys(r).forEach(l=>{const a=r[l];fn(a,[ce.scales[a.type],ce.scale])}),r}function ea(t){const e=t.options||(t.options={});e.plugins=Y(e.plugins,{}),e.scales=rm(t,e)}function ta(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function lm(t){return t=t||{},t.data=ta(t.data),ea(t),t}const na=new Map,oa=new Set;function So(t,e){let n=na.get(t);return n||(n=e(),na.set(t,n),oa.add(n)),n}const En=(t,e,n)=>{const o=mt(e,n);o!==void 0&&t.add(o)};class am{constructor(e){this._config=lm(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=ta(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),ea(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return So(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,n){return So(`${e}.transition.${n}`,()=>[[`datasets.${e}.transitions.${n}`,`transitions.${n}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,n){return So(`${e}-${n}`,()=>[[`datasets.${e}.elements.${n}`,`datasets.${e}`,`elements.${n}`,""]])}pluginScopeKeys(e){const n=e.id,o=this.type;return So(`${o}-plugin-${n}`,()=>[[`plugins.${n}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,n){const o=this._scopeCache;let i=o.get(e);return(!i||n)&&(i=new Map,o.set(e,i)),i}getOptionScopes(e,n,o){const{options:i,type:r}=this,l=this._cachedScopes(e,o),a=l.get(n);if(a)return a;const d=new Set;n.forEach(u=>{e&&(d.add(e),u.forEach(f=>En(d,e,f))),u.forEach(f=>En(d,i,f)),u.forEach(f=>En(d,Et[r]||{},f)),u.forEach(f=>En(d,ce,f)),u.forEach(f=>En(d,Vi,f))});const c=Array.from(d);return c.length===0&&c.push(Object.create(null)),oa.has(n)&&l.set(n,c),c}chartOptionScopes(){const{options:e,type:n}=this;return[e,Et[n]||{},ce.datasets[n]||{},{type:n},ce,Vi]}resolveNamedOptions(e,n,o,i=[""]){const r={$shared:!0},{resolver:l,subPrefixes:a}=ia(this._resolverCache,e,i);let d=l;if(cm(l,n)){r.$shared=!1,o=gt(o)?o():o;const c=this.createResolver(e,o,a);d=Gt(l,o,c)}for(const c of n)r[c]=d[c];return r}createResolver(e,n,o=[""],i){const{resolver:r}=ia(this._resolverCache,e,o);return q(n)?Gt(r,n,void 0,i):r}}function ia(t,e,n){let o=t.get(e);o||(o=new Map,t.set(e,o));const i=n.join();let r=o.get(i);return r||(r={resolver:Ni(e,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},o.set(i,r)),r}const dm=t=>q(t)&&Object.getOwnPropertyNames(t).some(e=>gt(t[e]));function cm(t,e){const{isScriptable:n,isIndexable:o}=rl(t);for(const i of e){const r=n(i),l=o(i),a=(l||r)&&t[i];if(r&&(gt(a)||dm(a))||l&&oe(a))return!0}return!1}var um="4.4.2";const fm=["top","bottom","left","right","chartArea"];function sa(t,e){return t==="top"||t==="bottom"||fm.indexOf(t)===-1&&e==="x"}function ra(t,e){return function(n,o){return n[t]===o[t]?n[e]-o[e]:n[t]-o[t]}}function la(t){const e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),ne(n&&n.onComplete,[t],e)}function hm(t){const e=t.chart,n=e.options.animation;ne(n&&n.onProgress,[t],e)}function aa(t){return Ii()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const vo={},da=t=>{const e=aa(t);return Object.values(vo).filter(n=>n.canvas===e).pop()};function pm(t,e,n){const o=Object.keys(t);for(const i of o){const r=+i;if(r>=e){const l=t[i];delete t[i],(n>0||r>e)&&(t[r+n]=l)}}}function mm(t,e,n,o){return!n||t.type==="mouseout"?null:o?e:t}function Mo(t,e,n){return t.options.clip?t[n]:e[n]}function gm(t,e){const{xScale:n,yScale:o}=t;return n&&o?{left:Mo(n,e,"left"),right:Mo(n,e,"right"),top:Mo(o,e,"top"),bottom:Mo(o,e,"bottom")}:e}class Le{static register(...e){Ue.add(...e),ca()}static unregister(...e){Ue.remove(...e),ca()}constructor(e,n){const o=this.config=new am(n),i=aa(e),r=da(i);if(r)throw new Error("Canvas is already in use. Chart with ID '"+r.id+"' must be destroyed before the canvas with ID '"+r.canvas.id+"' can be reused.");const l=o.createResolver(o.chartOptionScopes(),this.getContext());this.platform=new(o.platform||Rp(i)),this.platform.updateConfig(o);const a=this.platform.acquireContext(i,l.aspectRatio),d=a&&a.canvas,c=d&&d.height,u=d&&d.width;if(this.id=bf(),this.ctx=a,this.canvas=d,this.width=u,this.height=c,this._options=l,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 Zp,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Ff(f=>this.update(f),l.resizeDelay||0),this._dataChanges=[],vo[this.id]=this,!a||!d){console.error("Failed to create chart: can't acquire context from the given item");return}nt.listen(this,"complete",la),nt.listen(this,"progress",hm),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:n},width:o,height:i,_aspectRatio:r}=this;return X(e)?n&&r?r:i?o/i:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return Ue}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():pl(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return ol(this.canvas,this.ctx),this}stop(){return nt.stop(this),this}resize(e,n){nt.running(this)?this._resizeBeforeDraw={width:e,height:n}:this._resize(e,n)}_resize(e,n){const o=this.options,i=this.canvas,r=o.maintainAspectRatio&&this.aspectRatio,l=this.platform.getMaximumSize(i,e,n,r),a=o.devicePixelRatio||this.platform.getDevicePixelRatio(),d=this.width?"resize":"attach";this.width=l.width,this.height=l.height,this._aspectRatio=this.aspectRatio,pl(this,a,!0)&&(this.notifyPlugins("resize",{size:l}),ne(o.onResize,[this,l],this),this.attached&&this._doResize(d)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};ee(n,(o,i)=>{o.id=i})}buildOrUpdateScales(){const e=this.options,n=e.scales,o=this.scales,i=Object.keys(o).reduce((l,a)=>(l[a]=!1,l),{});let r=[];n&&(r=r.concat(Object.keys(n).map(l=>{const a=n[l],d=Xi(l,a),c=d==="r",u=d==="x";return{options:a,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),ee(r,l=>{const a=l.options,d=a.id,c=Xi(d,a),u=Y(a.type,l.dtype);(a.position===void 0||sa(a.position,c)!==sa(l.dposition))&&(a.position=l.dposition),i[d]=!0;let f=null;if(d in o&&o[d].type===u)f=o[d];else{const h=Ue.getScale(u);f=new h({id:d,type:u,ctx:this.ctx,chart:this}),o[f.id]=f}f.init(a,e)}),ee(i,(l,a)=>{l||delete o[a]}),ee(o,l=>{$e.configure(this,l,l.options),$e.addBox(this,l)})}_updateMetasets(){const e=this._metasets,n=this.data.datasets.length,o=e.length;if(e.sort((i,r)=>i.index-r.index),o>n){for(let i=n;i<o;++i)this._destroyDatasetMeta(i);e.splice(n,o-n)}this._sortedMetasets=e.slice(0).sort(ra("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:n}}=this;e.length>n.length&&delete this._stacks,e.forEach((o,i)=>{n.filter(r=>r===o._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const e=[],n=this.data.datasets;let o,i;for(this._removeUnreferencedMetasets(),o=0,i=n.length;o<i;o++){const r=n[o];let l=this.getDatasetMeta(o);const a=r.type||this.config.type;if(l.type&&l.type!==a&&(this._destroyDatasetMeta(o),l=this.getDatasetMeta(o)),l.type=a,l.indexAxis=r.indexAxis||qi(a,this.options),l.order=r.order||0,l.index=o,l.label=""+r.label,l.visible=this.isDatasetVisible(o),l.controller)l.controller.updateIndex(o),l.controller.linkScales();else{const d=Ue.getController(a),{datasetElementType:c,dataElementType:u}=ce.datasets[a];Object.assign(d,{dataElementType:Ue.getElement(u),datasetElementType:c&&Ue.getElement(c)}),l.controller=new d(this,o),e.push(l.controller)}}return this._updateMetasets(),e}_resetElements(){ee(this.data.datasets,(e,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const n=this.config;n.update();const o=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!o.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const r=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let l=0;for(let c=0,u=this.data.datasets.length;c<u;c++){const{controller:f}=this.getDatasetMeta(c),h=!i&&r.indexOf(f)===-1;f.buildOrUpdateElements(h),l=Math.max(+f.getMaxOverflow(),l)}l=this._minPadding=o.layout.autoPadding?l:0,this._updateLayout(l),i||ee(r,c=>{c.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(ra("z","_idx"));const{_active:a,_lastEvent:d}=this;d?this._eventHandler(d,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){ee(this.scales,e=>{$e.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,n=new Set(Object.keys(this._listeners)),o=new Set(e.events);(!Tr(n,o)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,n=this._getUniformDataChanges()||[];for(const{method:o,start:i,count:r}of n){const l=o==="_removeElements"?-r:r;pm(e,i,l)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const n=this.data.datasets.length,o=r=>new Set(e.filter(l=>l[0]===r).map((l,a)=>a+","+l.splice(1).join(","))),i=o(0);for(let r=1;r<n;r++)if(!Tr(i,o(r)))return;return Array.from(i).map(r=>r.split(",")).map(r=>({method:r[1],start:+r[2],count:+r[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;$e.update(this,this.width,this.height,e);const n=this.chartArea,o=n.width<=0||n.height<=0;this._layers=[],ee(this.boxes,i=>{o&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,r)=>{i._idx=r}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let n=0,o=this.data.datasets.length;n<o;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,o=this.data.datasets.length;n<o;++n)this._updateDataset(n,gt(e)?e({datasetIndex:n}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,n){const o=this.getDatasetMeta(e),i={meta:o,index:e,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",i)!==!1&&(o.controller._update(n),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(nt.has(this)?this.attached&&!nt.running(this)&&nt.start(this):(this.draw(),la({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:o,height:i}=this._resizeBeforeDraw;this._resize(o,i),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(e=0;e<n.length&&n[e].z<=0;++e)n[e].draw(this.chartArea);for(this._drawDatasets();e<n.length;++e)n[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const n=this._sortedMetasets,o=[];let i,r;for(i=0,r=n.length;i<r;++i){const l=n[i];(!e||l.visible)&&o.push(l)}return o}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const e=this.getSortedVisibleDatasetMetas();for(let n=e.length-1;n>=0;--n)this._drawDataset(e[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const n=this.ctx,o=e._clip,i=!o.disabled,r=gm(e,this.chartArea),l={meta:e,index:e.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",l)!==!1&&(i&&ao(n,{left:o.left===!1?0:r.left-o.left,right:o.right===!1?this.width:r.right+o.right,top:o.top===!1?0:r.top-o.top,bottom:o.bottom===!1?this.height:r.bottom+o.bottom}),e.controller.draw(),i&&co(n),l.cancelable=!1,this.notifyPlugins("afterDatasetDraw",l))}isPointInArea(e){return tt(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,n,o,i){const r=fp.modes[n];return typeof r=="function"?r(this,e,o,i):[]}getDatasetMeta(e){const n=this.data.datasets[e],o=this._metasets;let i=o.filter(r=>r&&r._dataset===n).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:e,_dataset:n,_parsed:[],_sorted:!1},o.push(i)),i}getContext(){return this.$context||(this.$context=bt(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const n=this.data.datasets[e];if(!n)return!1;const o=this.getDatasetMeta(e);return typeof o.hidden=="boolean"?!o.hidden:!n.hidden}setDatasetVisibility(e,n){const o=this.getDatasetMeta(e);o.hidden=!n}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,n,o){const i=o?"show":"hide",r=this.getDatasetMeta(e),l=r.controller._resolveAnimations(void 0,i);hn(n)?(r.data[n].hidden=!o,this.update()):(this.setDatasetVisibility(e,o),l.update(r,{visible:o}),this.update(a=>a.datasetIndex===e?i:void 0))}hide(e,n){this._updateVisibility(e,n,!1)}show(e,n){this._updateVisibility(e,n,!0)}_destroyDatasetMeta(e){const n=this._metasets[e];n&&n.controller&&n.controller._destroy(),delete this._metasets[e]}_stop(){let e,n;for(this.stop(),nt.remove(this),e=0,n=this.data.datasets.length;e<n;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:n}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),ol(e,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete vo[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const e=this._listeners,n=this.platform,o=(r,l)=>{n.addEventListener(this,r,l),e[r]=l},i=(r,l,a)=>{r.offsetX=l,r.offsetY=a,this._eventHandler(r)};ee(this.options.events,r=>o(r,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,n=this.platform,o=(d,c)=>{n.addEventListener(this,d,c),e[d]=c},i=(d,c)=>{e[d]&&(n.removeEventListener(this,d,c),delete e[d])},r=(d,c)=>{this.canvas&&this.resize(d,c)};let l;const a=()=>{i("attach",a),this.attached=!0,this.resize(),o("resize",r),o("detach",l)};l=()=>{this.attached=!1,i("resize",r),this._stop(),this._resize(0,0),o("attach",a)},n.isAttached(this.canvas)?a():l()}unbindEvents(){ee(this._listeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._listeners={},ee(this._responsiveListeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,n,o){const i=o?"set":"remove";let r,l,a,d;for(n==="dataset"&&(r=this.getDatasetMeta(e[0].datasetIndex),r.controller["_"+i+"DatasetHoverStyle"]()),a=0,d=e.length;a<d;++a){l=e[a];const c=l&&this.getDatasetMeta(l.datasetIndex).controller;c&&c[i+"HoverStyle"](l.element,l.datasetIndex,l.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const n=this._active||[],o=e.map(({datasetIndex:r,index:l})=>{const a=this.getDatasetMeta(r);if(!a)throw new Error("No dataset found at index "+r);return{datasetIndex:r,element:a.data[l],index:l}});!no(o,n)&&(this._active=o,this._lastEvent=null,this._updateHoverStyles(o,n))}notifyPlugins(e,n,o){return this._plugins.notify(this,e,n,o)}isPluginEnabled(e){return this._plugins._cache.filter(n=>n.plugin.id===e).length===1}_updateHoverStyles(e,n,o){const i=this.options.hover,r=(d,c)=>d.filter(u=>!c.some(f=>u.datasetIndex===f.datasetIndex&&u.index===f.index)),l=r(n,e),a=o?e:r(e,n);l.length&&this.updateHoverStyle(l,i.mode,!1),a.length&&i.mode&&this.updateHoverStyle(a,i.mode,!0)}_eventHandler(e,n){const o={event:e,replay:n,cancelable:!0,inChartArea:this.isPointInArea(e)},i=l=>(l.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",o,i)===!1)return;const r=this._handleEvent(e,n,o.inChartArea);return o.cancelable=!1,this.notifyPlugins("afterEvent",o,i),(r||o.changed)&&this.render(),this}_handleEvent(e,n,o){const{_active:i=[],options:r}=this,l=n,a=this._getActiveElements(e,i,o,l),d=kf(e),c=mm(e,this._lastEvent,o,d);o&&(this._lastEvent=null,ne(r.onHover,[e,a,this],this),d&&ne(r.onClick,[e,a,this],this));const u=!no(a,i);return(u||n)&&(this._active=a,this._updateHoverStyles(a,i,n)),this._lastEvent=c,u}_getActiveElements(e,n,o,i){if(e.type==="mouseout")return[];if(!o)return n;const r=this.options.hover;return this.getElementsAtEventForMode(e,r.mode,r,i)}}I(Le,"defaults",ce),I(Le,"instances",vo),I(Le,"overrides",Et),I(Le,"registry",Ue),I(Le,"version",um),I(Le,"getChart",da);function ca(){return ee(Le.instances,t=>t._plugins.invalidate())}function ym(t,e,n){const{startAngle:o,pixelMargin:i,x:r,y:l,outerRadius:a,innerRadius:d}=e;let c=i/a;t.beginPath(),t.arc(r,l,a,o-c,n+c),d>i?(c=i/d,t.arc(r,l,d,n+c,o-c,!0)):t.arc(r,l,i,n+ue,o-ue),t.closePath(),t.clip()}function bm(t){return Fi(t,["outerStart","outerEnd","innerStart","innerEnd"])}function $m(t,e,n,o){const i=bm(t.options.borderRadius),r=(n-e)/2,l=Math.min(r,o*e/2),a=d=>{const c=(n-Math.min(r,d))*o/2;return me(d,0,Math.min(r,c))};return{outerStart:a(i.outerStart),outerEnd:a(i.outerEnd),innerStart:me(i.innerStart,0,l),innerEnd:me(i.innerEnd,0,l)}}function Kt(t,e,n,o){return{x:n+t*Math.cos(e),y:o+t*Math.sin(e)}}function Do(t,e,n,o,i,r){const{x:l,y:a,startAngle:d,pixelMargin:c,innerRadius:u}=e,f=Math.max(e.outerRadius+o+n-c,0),h=u>0?u+o+n+c:0;let p=0;const m=i-d;if(o){const M=u>0?u-o:0,k=f>0?f-o:0,B=(M+k)/2,O=B!==0?m*B/(B+o):m;p=(m-O)/2}const g=Math.max(.001,m*f-n/ie)/f,y=(m-g)/2,b=d+y+p,$=i-y-p,{outerStart:w,outerEnd:S,innerStart:x,innerEnd:V}=$m(e,h,f,$-b),D=f-w,F=f-S,N=b+w/D,P=$-S/F,C=h+x,_=h+V,E=b+x/C,v=$-V/_;if(t.beginPath(),r){const M=(N+P)/2;if(t.arc(l,a,f,N,M),t.arc(l,a,f,M,P),S>0){const L=Kt(F,P,l,a);t.arc(L.x,L.y,S,P,$+ue)}const k=Kt(_,$,l,a);if(t.lineTo(k.x,k.y),V>0){const L=Kt(_,v,l,a);t.arc(L.x,L.y,V,$+ue,v+Math.PI)}const B=($-V/h+(b+x/h))/2;if(t.arc(l,a,h,$-V/h,B,!0),t.arc(l,a,h,B,b+x/h,!0),x>0){const L=Kt(C,E,l,a);t.arc(L.x,L.y,x,E+Math.PI,b-ue)}const O=Kt(D,b,l,a);if(t.lineTo(O.x,O.y),w>0){const L=Kt(D,N,l,a);t.arc(L.x,L.y,w,b-ue,N)}}else{t.moveTo(l,a);const M=Math.cos(N)*f+l,k=Math.sin(N)*f+a;t.lineTo(M,k);const B=Math.cos(P)*f+l,O=Math.sin(P)*f+a;t.lineTo(B,O)}t.closePath()}function _m(t,e,n,o,i){const{fullCircles:r,startAngle:l,circumference:a}=e;let d=e.endAngle;if(r){Do(t,e,n,o,d,i);for(let c=0;c<r;++c)t.fill();isNaN(a)||(d=l+(a%se||se))}return Do(t,e,n,o,d,i),t.fill(),d}function wm(t,e,n,o,i){const{fullCircles:r,startAngle:l,circumference:a,options:d}=e,{borderWidth:c,borderJoinStyle:u,borderDash:f,borderDashOffset:h}=d,p=d.borderAlign==="inner";if(!c)return;t.setLineDash(f||[]),t.lineDashOffset=h,p?(t.lineWidth=c*2,t.lineJoin=u||"round"):(t.lineWidth=c,t.lineJoin=u||"bevel");let m=e.endAngle;if(r){Do(t,e,n,o,m,i);for(let g=0;g<r;++g)t.stroke();isNaN(a)||(m=l+(a%se||se))}p&&ym(t,e,m),r||(Do(t,e,n,o,m,i),t.stroke())}class Bn extends ot{constructor(n){super();I(this,"circumference");I(this,"endAngle");I(this,"fullCircles");I(this,"innerRadius");I(this,"outerRadius");I(this,"pixelMargin");I(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,n&&Object.assign(this,n)}inRange(n,o,i){const r=this.getProps(["x","y"],i),{angle:l,distance:a}=Wr(r,{x:n,y:o}),{startAngle:d,endAngle:c,innerRadius:u,outerRadius:f,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),p=(this.options.spacing+this.options.borderWidth)/2,g=Y(h,c-d)>=se||mn(l,d,c),y=Qe(a,u+p,f+p);return g&&y}getCenterPoint(n){const{x:o,y:i,startAngle:r,endAngle:l,innerRadius:a,outerRadius:d}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],n),{offset:c,spacing:u}=this.options,f=(r+l)/2,h=(a+d+u+c)/2;return{x:o+Math.cos(f)*h,y:i+Math.sin(f)*h}}tooltipPosition(n){return this.getCenterPoint(n)}draw(n){const{options:o,circumference:i}=this,r=(o.offset||0)/4,l=(o.spacing||0)/2,a=o.circular;if(this.pixelMargin=o.borderAlign==="inner"?.33:0,this.fullCircles=i>se?Math.floor(i/se):0,i===0||this.innerRadius<0||this.outerRadius<0)return;n.save();const d=(this.startAngle+this.endAngle)/2;n.translate(Math.cos(d)*r,Math.sin(d)*r);const c=1-Math.sin(Math.min(ie,i||0)),u=r*c;n.fillStyle=o.backgroundColor,n.strokeStyle=o.borderColor,_m(n,this,u,l,a),wm(n,this,u,l,a),n.restore()}}I(Bn,"id","arc"),I(Bn,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),I(Bn,"defaultRoutes",{backgroundColor:"backgroundColor"}),I(Bn,"descriptors",{_scriptable:!0,_indexable:n=>n!=="borderDash"});function ua(t,e,n=e){t.lineCap=Y(n.borderCapStyle,e.borderCapStyle),t.setLineDash(Y(n.borderDash,e.borderDash)),t.lineDashOffset=Y(n.borderDashOffset,e.borderDashOffset),t.lineJoin=Y(n.borderJoinStyle,e.borderJoinStyle),t.lineWidth=Y(n.borderWidth,e.borderWidth),t.strokeStyle=Y(n.borderColor,e.borderColor)}function Cm(t,e,n){t.lineTo(n.x,n.y)}function xm(t){return t.stepped?Uf:t.tension||t.cubicInterpolationMode==="monotone"?Gf:Cm}function fa(t,e,n={}){const o=t.length,{start:i=0,end:r=o-1}=n,{start:l,end:a}=e,d=Math.max(i,l),c=Math.min(r,a),u=i<l&&r<l||i>a&&r>a;return{count:o,start:d,loop:e.loop,ilen:c<d&&!u?o+c-d:c-d}}function km(t,e,n,o){const{points:i,options:r}=e,{count:l,start:a,loop:d,ilen:c}=fa(i,n,o),u=xm(r);let{move:f=!0,reverse:h}=o||{},p,m,g;for(p=0;p<=c;++p)m=i[(a+(h?c-p:p))%l],!m.skip&&(f?(t.moveTo(m.x,m.y),f=!1):u(t,g,m,h,r.stepped),g=m);return d&&(m=i[(a+(h?c:0))%l],u(t,g,m,h,r.stepped)),!!d}function Sm(t,e,n,o){const i=e.points,{count:r,start:l,ilen:a}=fa(i,n,o),{move:d=!0,reverse:c}=o||{};let u=0,f=0,h,p,m,g,y,b;const $=S=>(l+(c?a-S:S))%r,w=()=>{g!==y&&(t.lineTo(u,y),t.lineTo(u,g),t.lineTo(u,b))};for(d&&(p=i[$(0)],t.moveTo(p.x,p.y)),h=0;h<=a;++h){if(p=i[$(h)],p.skip)continue;const S=p.x,x=p.y,V=S|0;V===m?(x<g?g=x:x>y&&(y=x),u=(f*u+S)/++f):(w(),t.lineTo(S,x),m=V,f=0,g=y=x),b=x}w()}function Ki(t){const e=t.options,n=e.borderDash&&e.borderDash.length;return!t._decimated&&!t._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!n?Sm:km}function vm(t){return t.stepped?Sh:t.tension||t.cubicInterpolationMode==="monotone"?vh:Nt}function Mm(t,e,n,o){let i=e._path;i||(i=e._path=new Path2D,e.path(i,n,o)&&i.closePath()),ua(t,e.options),t.stroke(i)}function Dm(t,e,n,o){const{segments:i,options:r}=e,l=Ki(e);for(const a of i)ua(t,r,a.style),t.beginPath(),l(t,e,a,{start:n,end:n+o-1})&&t.closePath(),t.stroke()}const Em=typeof Path2D=="function";function Bm(t,e,n,o){Em&&!e.options.segment?Mm(t,e,n,o):Dm(t,e,n,o)}class $t extends ot{constructor(e){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,e&&Object.assign(this,e)}updateControlPoints(e,n){const o=this.options;if((o.tension||o.cubicInterpolationMode==="monotone")&&!o.stepped&&!this._pointsUpdated){const i=o.spanGaps?this._loop:this._fullLoop;yh(this._points,o,e,i,n),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=Ph(this,this.options.segment))}first(){const e=this.segments,n=this.points;return e.length&&n[e[0].start]}last(){const e=this.segments,n=this.points,o=e.length;return o&&n[e[o-1].end]}interpolate(e,n){const o=this.options,i=e[n],r=this.points,l=wl(this,{property:n,start:i,end:i});if(!l.length)return;const a=[],d=vm(o);let c,u;for(c=0,u=l.length;c<u;++c){const{start:f,end:h}=l[c],p=r[f],m=r[h];if(p===m){a.push(p);continue}const g=Math.abs((i-p[n])/(m[n]-p[n])),y=d(p,m,g,o.stepped);y[n]=e[n],a.push(y)}return a.length===1?a[0]:a}pathSegment(e,n,o){return Ki(this)(e,this,n,o)}path(e,n,o){const i=this.segments,r=Ki(this);let l=this._loop;n=n||0,o=o||this.points.length-n;for(const a of i)l&=r(e,this,a,{start:n,end:n+o-1});return!!l}draw(e,n,o,i){const r=this.options||{};(this.points||[]).length&&r.borderWidth&&(e.save(),Bm(e,this,o,i),e.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}I($t,"id","line"),I($t,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),I($t,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),I($t,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"&&e!=="fill"});function ha(t,e,n,o){const i=t.options,{[n]:r}=t.getProps([n],o);return Math.abs(e-r)<i.radius+i.hitRadius}class Eo extends ot{constructor(n){super();I(this,"parsed");I(this,"skip");I(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,n&&Object.assign(this,n)}inRange(n,o,i){const r=this.options,{x:l,y:a}=this.getProps(["x","y"],i);return Math.pow(n-l,2)+Math.pow(o-a,2)<Math.pow(r.hitRadius+r.radius,2)}inXRange(n,o){return ha(this,n,"x",o)}inYRange(n,o){return ha(this,n,"y",o)}getCenterPoint(n){const{x:o,y:i}=this.getProps(["x","y"],n);return{x:o,y:i}}size(n){n=n||this.options||{};let o=n.radius||0;o=Math.max(o,o&&n.hoverRadius||0);const i=o&&n.borderWidth||0;return(o+i)*2}draw(n,o){const i=this.options;this.skip||i.radius<.1||!tt(this,o,this.size(i)/2)||(n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.fillStyle=i.backgroundColor,Ri(n,i,this.x,this.y))}getRange(){const n=this.options||{};return n.radius+n.hitRadius}}I(Eo,"id","point"),I(Eo,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),I(Eo,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function pa(t,e){const{x:n,y:o,base:i,width:r,height:l}=t.getProps(["x","y","base","width","height"],e);let a,d,c,u,f;return t.horizontal?(f=l/2,a=Math.min(n,i),d=Math.max(n,i),c=o-f,u=o+f):(f=r/2,a=n-f,d=n+f,c=Math.min(o,i),u=Math.max(o,i)),{left:a,top:c,right:d,bottom:u}}function _t(t,e,n,o){return t?0:me(e,n,o)}function Vm(t,e,n){const o=t.options.borderWidth,i=t.borderSkipped,r=sl(o);return{t:_t(i.top,r.top,0,n),r:_t(i.right,r.right,0,e),b:_t(i.bottom,r.bottom,0,n),l:_t(i.left,r.left,0,e)}}function Pm(t,e,n){const{enableBorderRadius:o}=t.getProps(["enableBorderRadius"]),i=t.options.borderRadius,r=Pt(i),l=Math.min(e,n),a=t.borderSkipped,d=o||q(i);return{topLeft:_t(!d||a.top||a.left,r.topLeft,0,l),topRight:_t(!d||a.top||a.right,r.topRight,0,l),bottomLeft:_t(!d||a.bottom||a.left,r.bottomLeft,0,l),bottomRight:_t(!d||a.bottom||a.right,r.bottomRight,0,l)}}function Rm(t){const e=pa(t),n=e.right-e.left,o=e.bottom-e.top,i=Vm(t,n/2,o/2),r=Pm(t,n/2,o/2);return{outer:{x:e.left,y:e.top,w:n,h:o,radius:r},inner:{x:e.left+i.l,y:e.top+i.t,w:n-i.l-i.r,h:o-i.t-i.b,radius:{topLeft:Math.max(0,r.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,r.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,r.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,r.bottomRight-Math.max(i.b,i.r))}}}}function Zi(t,e,n,o){const i=e===null,r=n===null,a=t&&!(i&&r)&&pa(t,o);return a&&(i||Qe(e,a.left,a.right))&&(r||Qe(n,a.top,a.bottom))}function Fm(t){return t.topLeft||t.topRight||t.bottomLeft||t.bottomRight}function Nm(t,e){t.rect(e.x,e.y,e.w,e.h)}function Ji(t,e,n={}){const o=t.x!==n.x?-e:0,i=t.y!==n.y?-e:0,r=(t.x+t.w!==n.x+n.w?e:0)-o,l=(t.y+t.h!==n.y+n.h?e:0)-i;return{x:t.x+o,y:t.y+i,w:t.w+r,h:t.h+l,radius:t.radius}}class Bo extends ot{constructor(e){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,e&&Object.assign(this,e)}draw(e){const{inflateAmount:n,options:{borderColor:o,backgroundColor:i}}=this,{inner:r,outer:l}=Rm(this),a=Fm(l.radius)?$n:Nm;e.save(),(l.w!==r.w||l.h!==r.h)&&(e.beginPath(),a(e,Ji(l,n,r)),e.clip(),a(e,Ji(r,-n,l)),e.fillStyle=o,e.fill("evenodd")),e.beginPath(),a(e,Ji(r,n)),e.fillStyle=i,e.fill(),e.restore()}inRange(e,n,o){return Zi(this,e,n,o)}inXRange(e,n){return Zi(this,e,null,n)}inYRange(e,n){return Zi(this,null,e,n)}getCenterPoint(e){const{x:n,y:o,base:i,horizontal:r}=this.getProps(["x","y","base","horizontal"],e);return{x:r?(n+i)/2:n,y:r?o:(o+i)/2}}getRange(e){return e==="x"?this.width/2:this.height/2}}I(Bo,"id","bar"),I(Bo,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),I(Bo,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var Am=Object.freeze({__proto__:null,ArcElement:Bn,BarElement:Bo,LineElement:$t,PointElement:Eo});const Qi=["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)"],ma=Qi.map(t=>t.replace("rgb(","rgba(").replace(")",", 0.5)"));function ga(t){return Qi[t%Qi.length]}function ya(t){return ma[t%ma.length]}function Om(t,e){return t.borderColor=ga(e),t.backgroundColor=ya(e),++e}function Im(t,e){return t.backgroundColor=t.data.map(()=>ga(e++)),e}function Tm(t,e){return t.backgroundColor=t.data.map(()=>ya(e++)),e}function Lm(t){let e=0;return(n,o)=>{const i=t.getDatasetMeta(o).controller;i instanceof At?e=Im(n,e):i instanceof Cn?e=Tm(n,e):i&&(e=Om(n,e))}}function ba(t){let e;for(e in t)if(t[e].borderColor||t[e].backgroundColor)return!0;return!1}function zm(t){return t&&(t.borderColor||t.backgroundColor)}var Hm={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(t,e,n){if(!n.enabled)return;const{data:{datasets:o},options:i}=t.config,{elements:r}=i;if(!n.forceOverride&&(ba(o)||zm(i)||r&&ba(r)))return;const l=Lm(t);o.forEach(l)}};function jm(t,e,n,o,i){const r=i.samples||o;if(r>=n)return t.slice(e,e+n);const l=[],a=(n-2)/(r-2);let d=0;const c=e+n-1;let u=e,f,h,p,m,g;for(l[d++]=t[u],f=0;f<r-2;f++){let y=0,b=0,$;const w=Math.floor((f+1)*a)+1+e,S=Math.min(Math.floor((f+2)*a)+1,n)+e,x=S-w;for($=w;$<S;$++)y+=t[$].x,b+=t[$].y;y/=x,b/=x;const V=Math.floor(f*a)+1+e,D=Math.min(Math.floor((f+1)*a)+1,n)+e,{x:F,y:N}=t[u];for(p=m=-1,$=V;$<D;$++)m=.5*Math.abs((F-y)*(t[$].y-N)-(F-t[$].x)*(b-N)),m>p&&(p=m,h=t[$],g=$);l[d++]=h,u=g}return l[d++]=t[c],l}function Wm(t,e,n,o){let i=0,r=0,l,a,d,c,u,f,h,p,m,g;const y=[],b=e+n-1,$=t[e].x,S=t[b].x-$;for(l=e;l<e+n;++l){a=t[l],d=(a.x-$)/S*o,c=a.y;const x=d|0;if(x===u)c<m?(m=c,f=l):c>g&&(g=c,h=l),i=(r*i+a.x)/++r;else{const V=l-1;if(!X(f)&&!X(h)){const D=Math.min(f,h),F=Math.max(f,h);D!==p&&D!==V&&y.push({...t[D],x:i}),F!==p&&F!==V&&y.push({...t[F],x:i})}l>0&&V!==p&&y.push(t[V]),y.push(a),u=x,r=0,m=g=c,f=h=p=l}}return y}function $a(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{configurable:!0,enumerable:!0,writable:!0,value:e})}}function _a(t){t.data.datasets.forEach(e=>{$a(e)})}function Ym(t,e){const n=e.length;let o=0,i;const{iScale:r}=t,{min:l,max:a,minDefined:d,maxDefined:c}=r.getUserBounds();return d&&(o=me(et(e,r.axis,l).lo,0,n-1)),c?i=me(et(e,r.axis,a).hi+1,o,n)-o:i=n-o,{start:o,count:i}}var Um={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,n)=>{if(!n.enabled){_a(t);return}const o=t.width;t.data.datasets.forEach((i,r)=>{const{_data:l,indexAxis:a}=i,d=t.getDatasetMeta(r),c=l||i.data;if(_n([a,t.options.indexAxis])==="y"||!d.controller.supportsDecimation)return;const u=t.scales[d.xAxisID];if(u.type!=="linear"&&u.type!=="time"||t.options.parsing)return;let{start:f,count:h}=Ym(d,c);const p=n.threshold||4*o;if(h<=p){$a(i);return}X(l)&&(i._data=c,delete i.data,Object.defineProperty(i,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(g){this._data=g}}));let m;switch(n.algorithm){case"lttb":m=jm(c,f,h,o,n);break;case"min-max":m=Wm(c,f,h,o);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}i._decimated=m})},destroy(t){_a(t)}};function Gm(t,e,n){const o=t.segments,i=t.points,r=e.points,l=[];for(const a of o){let{start:d,end:c}=a;c=ts(d,c,i);const u=es(n,i[d],i[c],a.loop);if(!e.segments){l.push({source:a,target:u,start:i[d],end:i[c]});continue}const f=wl(e,u);for(const h of f){const p=es(n,r[h.start],r[h.end],h.loop),m=_l(a,i,p);for(const g of m)l.push({source:g,target:h,start:{[n]:wa(u,p,"start",Math.max)},end:{[n]:wa(u,p,"end",Math.min)}})}}return l}function es(t,e,n,o){if(o)return;let i=e[t],r=n[t];return t==="angle"&&(i=Ee(i),r=Ee(r)),{property:t,start:i,end:r}}function qm(t,e){const{x:n=null,y:o=null}=t||{},i=e.points,r=[];return e.segments.forEach(({start:l,end:a})=>{a=ts(l,a,i);const d=i[l],c=i[a];o!==null?(r.push({x:d.x,y:o}),r.push({x:c.x,y:o})):n!==null&&(r.push({x:n,y:d.y}),r.push({x:n,y:c.y}))}),r}function ts(t,e,n){for(;e>t;e--){const o=n[e];if(!isNaN(o.x)&&!isNaN(o.y))break}return e}function wa(t,e,n,o){return t&&e?o(t[n],e[n]):t?t[n]:e?e[n]:0}function Ca(t,e){let n=[],o=!1;return oe(t)?(o=!0,n=t):n=qm(t,e),n.length?new $t({points:n,options:{tension:0},_loop:o,_fullLoop:o}):null}function xa(t){return t&&t.fill!==!1}function Xm(t,e,n){let i=t[e].fill;const r=[e];let l;if(!n)return i;for(;i!==!1&&r.indexOf(i)===-1;){if(!de(i))return i;if(l=t[i],!l)return!1;if(l.visible)return i;r.push(i),i=l.fill}return!1}function Km(t,e,n){const o=e0(t);if(q(o))return isNaN(o.value)?!1:o;let i=parseFloat(o);return de(i)&&Math.floor(i)===i?Zm(o[0],e,i,n):["origin","start","end","stack","shape"].indexOf(o)>=0&&o}function Zm(t,e,n,o){return(t==="-"||t==="+")&&(n=e+n),n===e||n<0||n>=o?!1:n}function Jm(t,e){let n=null;return t==="start"?n=e.bottom:t==="end"?n=e.top:q(t)?n=e.getPixelForValue(t.value):e.getBasePixel&&(n=e.getBasePixel()),n}function Qm(t,e,n){let o;return t==="start"?o=n:t==="end"?o=e.options.reverse?e.min:e.max:q(t)?o=t.value:o=e.getBaseValue(),o}function e0(t){const e=t.options,n=e.fill;let o=Y(n&&n.target,n);return o===void 0&&(o=!!e.backgroundColor),o===!1||o===null?!1:o===!0?"origin":o}function t0(t){const{scale:e,index:n,line:o}=t,i=[],r=o.segments,l=o.points,a=n0(e,n);a.push(Ca({x:null,y:e.bottom},o));for(let d=0;d<r.length;d++){const c=r[d];for(let u=c.start;u<=c.end;u++)o0(i,l[u],a)}return new $t({points:i,options:{}})}function n0(t,e){const n=[],o=t.getMatchingVisibleMetas("line");for(let i=0;i<o.length;i++){const r=o[i];if(r.index===e)break;r.hidden||n.unshift(r.dataset)}return n}function o0(t,e,n){const o=[];for(let i=0;i<n.length;i++){const r=n[i],{first:l,last:a,point:d}=i0(r,e,"x");if(!(!d||l&&a)){if(l)o.unshift(d);else if(t.push(d),!a)break}}t.push(...o)}function i0(t,e,n){const o=t.interpolate(e,n);if(!o)return{};const i=o[n],r=t.segments,l=t.points;let a=!1,d=!1;for(let c=0;c<r.length;c++){const u=r[c],f=l[u.start][n],h=l[u.end][n];if(Qe(i,f,h)){a=i===f,d=i===h;break}}return{first:a,last:d,point:o}}class ka{constructor(e){this.x=e.x,this.y=e.y,this.radius=e.radius}pathSegment(e,n,o){const{x:i,y:r,radius:l}=this;return n=n||{start:0,end:se},e.arc(i,r,l,n.end,n.start,!0),!o.bounds}interpolate(e){const{x:n,y:o,radius:i}=this,r=e.angle;return{x:n+Math.cos(r)*i,y:o+Math.sin(r)*i,angle:r}}}function s0(t){const{chart:e,fill:n,line:o}=t;if(de(n))return r0(e,n);if(n==="stack")return t0(t);if(n==="shape")return!0;const i=l0(t);return i instanceof ka?i:Ca(i,o)}function r0(t,e){const n=t.getDatasetMeta(e);return n&&t.isDatasetVisible(e)?n.dataset:null}function l0(t){return(t.scale||{}).getPointPositionForValue?d0(t):a0(t)}function a0(t){const{scale:e={},fill:n}=t,o=Jm(n,e);if(de(o)){const i=e.isHorizontal();return{x:i?o:null,y:i?null:o}}return null}function d0(t){const{scale:e,fill:n}=t,o=e.options,i=e.getLabels().length,r=o.reverse?e.max:e.min,l=Qm(n,e,r),a=[];if(o.grid.circular){const d=e.getPointPositionForValue(0,r);return new ka({x:d.x,y:d.y,radius:e.getDistanceFromCenterForValue(l)})}for(let d=0;d<i;++d)a.push(e.getPointPositionForValue(d,l));return a}function ns(t,e,n){const o=s0(e),{line:i,scale:r,axis:l}=e,a=i.options,d=a.fill,c=a.backgroundColor,{above:u=c,below:f=c}=d||{};o&&i.points.length&&(ao(t,n),c0(t,{line:i,target:o,above:u,below:f,area:n,scale:r,axis:l}),co(t))}function c0(t,e){const{line:n,target:o,above:i,below:r,area:l,scale:a}=e,d=n._loop?"angle":e.axis;t.save(),d==="x"&&r!==i&&(Sa(t,o,l.top),va(t,{line:n,target:o,color:i,scale:a,property:d}),t.restore(),t.save(),Sa(t,o,l.bottom)),va(t,{line:n,target:o,color:r,scale:a,property:d}),t.restore()}function Sa(t,e,n){const{segments:o,points:i}=e;let r=!0,l=!1;t.beginPath();for(const a of o){const{start:d,end:c}=a,u=i[d],f=i[ts(d,c,i)];r?(t.moveTo(u.x,u.y),r=!1):(t.lineTo(u.x,n),t.lineTo(u.x,u.y)),l=!!e.pathSegment(t,a,{move:l}),l?t.closePath():t.lineTo(f.x,n)}t.lineTo(e.first().x,n),t.closePath(),t.clip()}function va(t,e){const{line:n,target:o,property:i,color:r,scale:l}=e,a=Gm(n,o,i);for(const{source:d,target:c,start:u,end:f}of a){const{style:{backgroundColor:h=r}={}}=d,p=o!==!0;t.save(),t.fillStyle=h,u0(t,l,p&&es(i,u,f)),t.beginPath();const m=!!n.pathSegment(t,d);let g;if(p){m?t.closePath():Ma(t,o,f,i);const y=!!o.pathSegment(t,c,{move:m,reverse:!0});g=m&&y,g||Ma(t,o,u,i)}t.closePath(),t.fill(g?"evenodd":"nonzero"),t.restore()}}function u0(t,e,n){const{top:o,bottom:i}=e.chart.chartArea,{property:r,start:l,end:a}=n||{};r==="x"&&(t.beginPath(),t.rect(l,o,a-l,i-o),t.clip())}function Ma(t,e,n,o){const i=e.interpolate(n,o);i&&t.lineTo(i.x,i.y)}var f0={id:"filler",afterDatasetsUpdate(t,e,n){const o=(t.data.datasets||[]).length,i=[];let r,l,a,d;for(l=0;l<o;++l)r=t.getDatasetMeta(l),a=r.dataset,d=null,a&&a.options&&a instanceof $t&&(d={visible:t.isDatasetVisible(l),index:l,fill:Km(a,l,o),chart:t,axis:r.controller.options.indexAxis,scale:r.vScale,line:a}),r.$filler=d,i.push(d);for(l=0;l<o;++l)d=i[l],!(!d||d.fill===!1)&&(d.fill=Xm(i,l,n.propagate))},beforeDraw(t,e,n){const o=n.drawTime==="beforeDraw",i=t.getSortedVisibleDatasetMetas(),r=t.chartArea;for(let l=i.length-1;l>=0;--l){const a=i[l].$filler;a&&(a.line.updateControlPoints(r,a.axis),o&&a.fill&&ns(t.ctx,a,r))}},beforeDatasetsDraw(t,e,n){if(n.drawTime!=="beforeDatasetsDraw")return;const o=t.getSortedVisibleDatasetMetas();for(let i=o.length-1;i>=0;--i){const r=o[i].$filler;xa(r)&&ns(t.ctx,r,t.chartArea)}},beforeDatasetDraw(t,e,n){const o=e.meta.$filler;!xa(o)||n.drawTime!=="beforeDatasetDraw"||ns(t.ctx,o,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const Da=(t,e)=>{let{boxHeight:n=e,boxWidth:o=e}=t;return t.usePointStyle&&(n=Math.min(n,e),o=t.pointStyleWidth||Math.min(o,e)),{boxWidth:o,boxHeight:n,itemHeight:Math.max(e,n)}},h0=(t,e)=>t!==null&&e!==null&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class Ea extends ot{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.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(e,n,o){this.maxWidth=e,this.maxHeight=n,this._margins=o,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 e=this.options.labels||{};let n=ne(e.generateLabels,[this.chart],this)||[];e.filter&&(n=n.filter(o=>e.filter(o,this.chart.data))),e.sort&&(n=n.sort((o,i)=>e.sort(o,i,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:e,ctx:n}=this;if(!e.display){this.width=this.height=0;return}const o=e.labels,i=he(o.font),r=i.size,l=this._computeTitleHeight(),{boxWidth:a,itemHeight:d}=Da(o,r);let c,u;n.font=i.string,this.isHorizontal()?(c=this.maxWidth,u=this._fitRows(l,r,a,d)+10):(u=this.maxHeight,c=this._fitCols(l,i,a,d)+10),this.width=Math.min(c,e.maxWidth||this.maxWidth),this.height=Math.min(u,e.maxHeight||this.maxHeight)}_fitRows(e,n,o,i){const{ctx:r,maxWidth:l,options:{labels:{padding:a}}}=this,d=this.legendHitBoxes=[],c=this.lineWidths=[0],u=i+a;let f=e;r.textAlign="left",r.textBaseline="middle";let h=-1,p=-u;return this.legendItems.forEach((m,g)=>{const y=o+n/2+r.measureText(m.text).width;(g===0||c[c.length-1]+y+2*a>l)&&(f+=u,c[c.length-(g>0?0:1)]=0,p+=u,h++),d[g]={left:0,top:p,row:h,width:y,height:i},c[c.length-1]+=y+a}),f}_fitCols(e,n,o,i){const{ctx:r,maxHeight:l,options:{labels:{padding:a}}}=this,d=this.legendHitBoxes=[],c=this.columnSizes=[],u=l-e;let f=a,h=0,p=0,m=0,g=0;return this.legendItems.forEach((y,b)=>{const{itemWidth:$,itemHeight:w}=p0(o,n,r,y,i);b>0&&p+w+2*a>u&&(f+=h+a,c.push({width:h,height:p}),m+=h+a,g++,h=p=0),d[b]={left:m,top:p,col:g,width:$,height:w},h=Math.max(h,$),p+=w+a}),f+=h,c.push({width:h,height:p}),f}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:o,labels:{padding:i},rtl:r}}=this,l=Xt(r,this.left,this.width);if(this.isHorizontal()){let a=0,d=ye(o,this.left+i,this.right-this.lineWidths[a]);for(const c of n)a!==c.row&&(a=c.row,d=ye(o,this.left+i,this.right-this.lineWidths[a])),c.top+=this.top+e+i,c.left=l.leftForLtr(l.x(d),c.width),d+=c.width+i}else{let a=0,d=ye(o,this.top+e+i,this.bottom-this.columnSizes[a].height);for(const c of n)c.col!==a&&(a=c.col,d=ye(o,this.top+e+i,this.bottom-this.columnSizes[a].height)),c.top=d,c.left+=this.left+i,c.left=l.leftForLtr(l.x(c.left),c.width),d+=c.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const e=this.ctx;ao(e,this),this._draw(),co(e)}}_draw(){const{options:e,columnSizes:n,lineWidths:o,ctx:i}=this,{align:r,labels:l}=e,a=ce.color,d=Xt(e.rtl,this.left,this.width),c=he(l.font),{padding:u}=l,f=c.size,h=f/2;let p;this.drawTitle(),i.textAlign=d.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=c.string;const{boxWidth:m,boxHeight:g,itemHeight:y}=Da(l,f),b=function(V,D,F){if(isNaN(m)||m<=0||isNaN(g)||g<0)return;i.save();const N=Y(F.lineWidth,1);if(i.fillStyle=Y(F.fillStyle,a),i.lineCap=Y(F.lineCap,"butt"),i.lineDashOffset=Y(F.lineDashOffset,0),i.lineJoin=Y(F.lineJoin,"miter"),i.lineWidth=N,i.strokeStyle=Y(F.strokeStyle,a),i.setLineDash(Y(F.lineDash,[])),l.usePointStyle){const P={radius:g*Math.SQRT2/2,pointStyle:F.pointStyle,rotation:F.rotation,borderWidth:N},C=d.xPlus(V,m/2),_=D+h;il(i,P,C,_,l.pointStyleWidth&&m)}else{const P=D+Math.max((f-g)/2,0),C=d.leftForLtr(V,m),_=Pt(F.borderRadius);i.beginPath(),Object.values(_).some(E=>E!==0)?$n(i,{x:C,y:P,w:m,h:g,radius:_}):i.rect(C,P,m,g),i.fill(),N!==0&&i.stroke()}i.restore()},$=function(V,D,F){Vt(i,F.text,V,D+y/2,c,{strikethrough:F.hidden,textAlign:d.textAlign(F.textAlign)})},w=this.isHorizontal(),S=this._computeTitleHeight();w?p={x:ye(r,this.left+u,this.right-o[0]),y:this.top+u+S,line:0}:p={x:this.left+u,y:ye(r,this.top+S+u,this.bottom-n[0].height),line:0},gl(this.ctx,e.textDirection);const x=y+u;this.legendItems.forEach((V,D)=>{i.strokeStyle=V.fontColor,i.fillStyle=V.fontColor;const F=i.measureText(V.text).width,N=d.textAlign(V.textAlign||(V.textAlign=l.textAlign)),P=m+h+F;let C=p.x,_=p.y;d.setWidth(this.width),w?D>0&&C+P+u>this.right&&(_=p.y+=x,p.line++,C=p.x=ye(r,this.left+u,this.right-o[p.line])):D>0&&_+x>this.bottom&&(C=p.x=C+n[p.line].width+u,p.line++,_=p.y=ye(r,this.top+S+u,this.bottom-n[p.line].height));const E=d.x(C);if(b(E,_,V),C=Nf(N,C+m+h,w?C+P:this.right,e.rtl),$(d.x(C),_,V),w)p.x+=P+u;else if(typeof V.text!="string"){const v=c.lineHeight;p.y+=Ba(V,v)+u}else p.y+=x}),yl(this.ctx,e.textDirection)}drawTitle(){const e=this.options,n=e.title,o=he(n.font),i=be(n.padding);if(!n.display)return;const r=Xt(e.rtl,this.left,this.width),l=this.ctx,a=n.position,d=o.size/2,c=i.top+d;let u,f=this.left,h=this.width;if(this.isHorizontal())h=Math.max(...this.lineWidths),u=this.top+c,f=ye(e.align,f,this.right-h);else{const m=this.columnSizes.reduce((g,y)=>Math.max(g,y.height),0);u=c+ye(e.align,this.top,this.bottom-m-e.labels.padding-this._computeTitleHeight())}const p=ye(a,f,f+h);l.textAlign=r.textAlign(Di(a)),l.textBaseline="middle",l.strokeStyle=n.color,l.fillStyle=n.color,l.font=o.string,Vt(l,n.text,p,u,o)}_computeTitleHeight(){const e=this.options.title,n=he(e.font),o=be(e.padding);return e.display?n.lineHeight+o.height:0}_getLegendItemAt(e,n){let o,i,r;if(Qe(e,this.left,this.right)&&Qe(n,this.top,this.bottom)){for(r=this.legendHitBoxes,o=0;o<r.length;++o)if(i=r[o],Qe(e,i.left,i.left+i.width)&&Qe(n,i.top,i.top+i.height))return this.legendItems[o]}return null}handleEvent(e){const n=this.options;if(!y0(e.type,n))return;const o=this._getLegendItemAt(e.x,e.y);if(e.type==="mousemove"||e.type==="mouseout"){const i=this._hoveredItem,r=h0(i,o);i&&!r&&ne(n.onLeave,[e,i,this],this),this._hoveredItem=o,o&&!r&&ne(n.onHover,[e,o,this],this)}else o&&ne(n.onClick,[e,o,this],this)}}function p0(t,e,n,o,i){const r=m0(o,t,e,n),l=g0(i,o,e.lineHeight);return{itemWidth:r,itemHeight:l}}function m0(t,e,n,o){let i=t.text;return i&&typeof i!="string"&&(i=i.reduce((r,l)=>r.length>l.length?r:l)),e+n.size/2+o.measureText(i).width}function g0(t,e,n){let o=t;return typeof e.text!="string"&&(o=Ba(e,n)),o}function Ba(t,e){const n=t.text?t.text.length:0;return e*n}function y0(t,e){return!!((t==="mousemove"||t==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(t==="click"||t==="mouseup"))}var b0={id:"legend",_element:Ea,start(t,e,n){const o=t.legend=new Ea({ctx:t.ctx,options:n,chart:t});$e.configure(t,o,n),$e.addBox(t,o)},stop(t){$e.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,n){const o=t.legend;$e.configure(t,o,n),o.options=n},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,n){const o=e.datasetIndex,i=n.chart;i.isDatasetVisible(o)?(i.hide(o),e.hidden=!0):(i.show(o),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:n,pointStyle:o,textAlign:i,color:r,useBorderRadius:l,borderRadius:a}}=t.legend.options;return t._getSortedDatasetMetas().map(d=>{const c=d.controller.getStyle(n?0:void 0),u=be(c.borderWidth);return{text:e[d.index].label,fillStyle:c.backgroundColor,fontColor:r,hidden:!d.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:c.borderColor,pointStyle:o||c.pointStyle,rotation:c.rotation,textAlign:i||c.textAlign,borderRadius:l&&(a||c.borderRadius),datasetIndex:d.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class os extends ot{constructor(e){super(),this.chart=e.chart,this.options=e.options,this.ctx=e.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(e,n){const o=this.options;if(this.left=0,this.top=0,!o.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=e,this.height=this.bottom=n;const i=oe(o.text)?o.text.length:1;this._padding=be(o.padding);const r=i*he(o.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=r:this.width=r}isHorizontal(){const e=this.options.position;return e==="top"||e==="bottom"}_drawArgs(e){const{top:n,left:o,bottom:i,right:r,options:l}=this,a=l.align;let d=0,c,u,f;return this.isHorizontal()?(u=ye(a,o,r),f=n+e,c=r-o):(l.position==="left"?(u=o+e,f=ye(a,i,n),d=ie*-.5):(u=r-e,f=ye(a,n,i),d=ie*.5),c=i-n),{titleX:u,titleY:f,maxWidth:c,rotation:d}}draw(){const e=this.ctx,n=this.options;if(!n.display)return;const o=he(n.font),r=o.lineHeight/2+this._padding.top,{titleX:l,titleY:a,maxWidth:d,rotation:c}=this._drawArgs(r);Vt(e,n.text,0,0,o,{color:n.color,maxWidth:d,rotation:c,textAlign:Di(n.align),textBaseline:"middle",translation:[l,a]})}}function $0(t,e){const n=new os({ctx:t.ctx,options:e,chart:t});$e.configure(t,n,e),$e.addBox(t,n),t.titleBlock=n}var _0={id:"title",_element:os,start(t,e,n){$0(t,n)},stop(t){const e=t.titleBlock;$e.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,n){const o=t.titleBlock;$e.configure(t,o,n),o.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Vo=new WeakMap;var w0={id:"subtitle",start(t,e,n){const o=new os({ctx:t.ctx,options:n,chart:t});$e.configure(t,o,n),$e.addBox(t,o),Vo.set(t,o)},stop(t){$e.removeBox(t,Vo.get(t)),Vo.delete(t)},beforeUpdate(t,e,n){const o=Vo.get(t);$e.configure(t,o,n),o.options=n},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Vn={average(t){if(!t.length)return!1;let e,n,o=new Set,i=0,r=0;for(e=0,n=t.length;e<n;++e){const a=t[e].element;if(a&&a.hasValue()){const d=a.tooltipPosition();o.add(d.x),i+=d.y,++r}}return{x:[...o].reduce((a,d)=>a+d)/o.size,y:i/r}},nearest(t,e){if(!t.length)return!1;let n=e.x,o=e.y,i=Number.POSITIVE_INFINITY,r,l,a;for(r=0,l=t.length;r<l;++r){const d=t[r].element;if(d&&d.hasValue()){const c=d.getCenterPoint(),u=vi(e,c);u<i&&(i=u,a=d)}}if(a){const d=a.tooltipPosition();n=d.x,o=d.y}return{x:n,y:o}}};function Ge(t,e){return e&&(oe(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function it(t){return(typeof t=="string"||t instanceof String)&&t.indexOf(`
25
25
  `)>-1?t.split(`
26
- `):t}function S0(t,e){const{element:n,datasetIndex:o,index:i}=e,s=t.getDatasetMeta(o).controller,{label:l,value:a}=s.getLabelAndValue(i);return{chart:t,label:l,parsed:s.getParsed(i),raw:t.data.datasets[o].data[i],formattedValue:a,dataset:s.getDataset(),dataIndex:i,datasetIndex:o,element:n}}function Ba(t,e){const n=t.chart.ctx,{body:o,footer:i,title:s}=t,{boxWidth:l,boxHeight:a}=e,d=he(e.bodyFont),c=he(e.titleFont),u=he(e.footerFont),f=s.length,h=i.length,p=o.length,m=be(e.padding);let g=m.height,y=0,b=o.reduce((S,C)=>S+C.before.length+C.lines.length+C.after.length,0);if(b+=t.beforeBody.length+t.afterBody.length,f&&(g+=f*c.lineHeight+(f-1)*e.titleSpacing+e.titleMarginBottom),b){const S=e.displayColors?Math.max(a,d.lineHeight):d.lineHeight;g+=p*S+(b-p)*d.lineHeight+(b-1)*e.bodySpacing}h&&(g+=e.footerMarginTop+h*u.lineHeight+(h-1)*e.footerSpacing);let $=0;const x=function(S){y=Math.max(y,n.measureText(S).width+$)};return n.save(),n.font=c.string,ee(t.title,x),n.font=d.string,ee(t.beforeBody.concat(t.afterBody),x),$=e.displayColors?l+2+e.boxPadding:0,ee(o,S=>{ee(S.before,x),ee(S.lines,x),ee(S.after,x)}),$=0,n.font=u.string,ee(t.footer,x),n.restore(),y+=m.width,{width:y,height:g}}function v0(t,e){const{y:n,height:o}=e;return n<o/2?"top":n>t.height-o/2?"bottom":"center"}function M0(t,e,n,o){const{x:i,width:s}=o,l=n.caretSize+n.caretPadding;if(t==="left"&&i+s+l>e.width||t==="right"&&i-s-l<0)return!0}function D0(t,e,n,o){const{x:i,width:s}=n,{width:l,chartArea:{left:a,right:d}}=t;let c="center";return o==="center"?c=i<=(a+d)/2?"left":"right":i<=s/2?c="left":i>=l-s/2&&(c="right"),M0(c,t,e,n)&&(c="center"),c}function Va(t,e,n){const o=n.yAlign||e.yAlign||v0(t,n);return{xAlign:n.xAlign||e.xAlign||D0(t,e,n,o),yAlign:o}}function E0(t,e){let{x:n,width:o}=t;return e==="right"?n-=o:e==="center"&&(n-=o/2),n}function B0(t,e,n){let{y:o,height:i}=t;return e==="top"?o+=n:e==="bottom"?o-=i+n:o-=i/2,o}function Pa(t,e,n,o){const{caretSize:i,caretPadding:s,cornerRadius:l}=t,{xAlign:a,yAlign:d}=n,c=i+s,{topLeft:u,topRight:f,bottomLeft:h,bottomRight:p}=Pt(l);let m=E0(e,a);const g=B0(e,d,c);return d==="center"?a==="left"?m+=c:a==="right"&&(m-=c):a==="left"?m-=Math.max(u,h)+i:a==="right"&&(m+=Math.max(f,p)+i),{x:me(m,0,o.width-e.width),y:me(g,0,o.height-e.height)}}function Po(t,e,n){const o=be(n.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-o.right:t.x+o.left}function Ra(t){return Ge([],it(t))}function V0(t,e,n){return bt(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function Fa(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const Na={beforeTitle:Je,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,o=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(o>0&&e.dataIndex<o)return n[e.dataIndex]}return""},afterTitle:Je,beforeBody:Je,beforeLabel:Je,label(t){if(this&&this.options&&this.options.mode==="dataset")return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const n=t.formattedValue;return X(n)||(e+=n),e},labelColor(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:Je,afterBody:Je,beforeFooter:Je,footer:Je,afterFooter:Je};function Se(t,e,n,o){const i=t[e].call(n,o);return typeof i>"u"?Na[e].call(n,o):i}class ir extends ot{constructor(e){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=e.chart,this.options=e.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(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const n=this.chart,o=this.options.setContext(this.getContext()),i=o.enabled&&n.options.animation&&o.animations,s=new kl(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(s)),s}getContext(){return this.$context||(this.$context=V0(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,n){const{callbacks:o}=n,i=Se(o,"beforeTitle",this,e),s=Se(o,"title",this,e),l=Se(o,"afterTitle",this,e);let a=[];return a=Ge(a,it(i)),a=Ge(a,it(s)),a=Ge(a,it(l)),a}getBeforeBody(e,n){return Ra(Se(n.callbacks,"beforeBody",this,e))}getBody(e,n){const{callbacks:o}=n,i=[];return ee(e,s=>{const l={before:[],lines:[],after:[]},a=Fa(o,s);Ge(l.before,it(Se(a,"beforeLabel",this,s))),Ge(l.lines,Se(a,"label",this,s)),Ge(l.after,it(Se(a,"afterLabel",this,s))),i.push(l)}),i}getAfterBody(e,n){return Ra(Se(n.callbacks,"afterBody",this,e))}getFooter(e,n){const{callbacks:o}=n,i=Se(o,"beforeFooter",this,e),s=Se(o,"footer",this,e),l=Se(o,"afterFooter",this,e);let a=[];return a=Ge(a,it(i)),a=Ge(a,it(s)),a=Ge(a,it(l)),a}_createItems(e){const n=this._active,o=this.chart.data,i=[],s=[],l=[];let a=[],d,c;for(d=0,c=n.length;d<c;++d)a.push(S0(this.chart,n[d]));return e.filter&&(a=a.filter((u,f,h)=>e.filter(u,f,h,o))),e.itemSort&&(a=a.sort((u,f)=>e.itemSort(u,f,o))),ee(a,u=>{const f=Fa(e.callbacks,u);i.push(Se(f,"labelColor",this,u)),s.push(Se(f,"labelPointStyle",this,u)),l.push(Se(f,"labelTextColor",this,u))}),this.labelColors=i,this.labelPointStyles=s,this.labelTextColors=l,this.dataPoints=a,a}update(e,n){const o=this.options.setContext(this.getContext()),i=this._active;let s,l=[];if(!i.length)this.opacity!==0&&(s={opacity:0});else{const a=Vn[o.position].call(this,i,this._eventPosition);l=this._createItems(o),this.title=this.getTitle(l,o),this.beforeBody=this.getBeforeBody(l,o),this.body=this.getBody(l,o),this.afterBody=this.getAfterBody(l,o),this.footer=this.getFooter(l,o);const d=this._size=Ba(this,o),c=Object.assign({},a,d),u=Va(this.chart,o,c),f=Pa(o,c,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,s={opacity:1,x:f.x,y:f.y,width:d.width,height:d.height,caretX:a.x,caretY:a.y}}this._tooltipItems=l,this.$context=void 0,s&&this._resolveAnimations().update(this,s),e&&o.external&&o.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(e,n,o,i){const s=this.getCaretPosition(e,o,i);n.lineTo(s.x1,s.y1),n.lineTo(s.x2,s.y2),n.lineTo(s.x3,s.y3)}getCaretPosition(e,n,o){const{xAlign:i,yAlign:s}=this,{caretSize:l,cornerRadius:a}=o,{topLeft:d,topRight:c,bottomLeft:u,bottomRight:f}=Pt(a),{x:h,y:p}=e,{width:m,height:g}=n;let y,b,$,x,S,C;return s==="center"?(S=p+g/2,i==="left"?(y=h,b=y-l,x=S+l,C=S-l):(y=h+m,b=y+l,x=S-l,C=S+l),$=y):(i==="left"?b=h+Math.max(d,u)+l:i==="right"?b=h+m-Math.max(c,f)-l:b=this.caretX,s==="top"?(x=p,S=x-l,y=b-l,$=b+l):(x=p+g,S=x+l,y=b+l,$=b-l),C=x),{x1:y,x2:b,x3:$,y1:x,y2:S,y3:C}}drawTitle(e,n,o){const i=this.title,s=i.length;let l,a,d;if(s){const c=Xt(o.rtl,this.x,this.width);for(e.x=Po(this,o.titleAlign,o),n.textAlign=c.textAlign(o.titleAlign),n.textBaseline="middle",l=he(o.titleFont),a=o.titleSpacing,n.fillStyle=o.titleColor,n.font=l.string,d=0;d<s;++d)n.fillText(i[d],c.x(e.x),e.y+l.lineHeight/2),e.y+=l.lineHeight+a,d+1===s&&(e.y+=o.titleMarginBottom-a)}}_drawColorBox(e,n,o,i,s){const l=this.labelColors[o],a=this.labelPointStyles[o],{boxHeight:d,boxWidth:c}=s,u=he(s.bodyFont),f=Po(this,"left",s),h=i.x(f),p=d<u.lineHeight?(u.lineHeight-d)/2:0,m=n.y+p;if(s.usePointStyle){const g={radius:Math.min(c,d)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},y=i.leftForLtr(h,c)+c/2,b=m+d/2;e.strokeStyle=s.multiKeyBackground,e.fillStyle=s.multiKeyBackground,Ri(e,g,y,b),e.strokeStyle=l.borderColor,e.fillStyle=l.backgroundColor,Ri(e,g,y,b)}else{e.lineWidth=q(l.borderWidth)?Math.max(...Object.values(l.borderWidth)):l.borderWidth||1,e.strokeStyle=l.borderColor,e.setLineDash(l.borderDash||[]),e.lineDashOffset=l.borderDashOffset||0;const g=i.leftForLtr(h,c),y=i.leftForLtr(i.xPlus(h,1),c-2),b=Pt(l.borderRadius);Object.values(b).some($=>$!==0)?(e.beginPath(),e.fillStyle=s.multiKeyBackground,$n(e,{x:g,y:m,w:c,h:d,radius:b}),e.fill(),e.stroke(),e.fillStyle=l.backgroundColor,e.beginPath(),$n(e,{x:y,y:m+1,w:c-2,h:d-2,radius:b}),e.fill()):(e.fillStyle=s.multiKeyBackground,e.fillRect(g,m,c,d),e.strokeRect(g,m,c,d),e.fillStyle=l.backgroundColor,e.fillRect(y,m+1,c-2,d-2))}e.fillStyle=this.labelTextColors[o]}drawBody(e,n,o){const{body:i}=this,{bodySpacing:s,bodyAlign:l,displayColors:a,boxHeight:d,boxWidth:c,boxPadding:u}=o,f=he(o.bodyFont);let h=f.lineHeight,p=0;const m=Xt(o.rtl,this.x,this.width),g=function(F){n.fillText(F,m.x(e.x+p),e.y+h/2),e.y+=h+s},y=m.textAlign(l);let b,$,x,S,C,V,E;for(n.textAlign=l,n.textBaseline="middle",n.font=f.string,e.x=Po(this,y,o),n.fillStyle=o.bodyColor,ee(this.beforeBody,g),p=a&&y!=="right"?l==="center"?c/2+u:c+2+u:0,S=0,V=i.length;S<V;++S){for(b=i[S],$=this.labelTextColors[S],n.fillStyle=$,ee(b.before,g),x=b.lines,a&&x.length&&(this._drawColorBox(n,e,S,m,o),h=Math.max(f.lineHeight,d)),C=0,E=x.length;C<E;++C)g(x[C]),h=f.lineHeight;ee(b.after,g)}p=0,h=f.lineHeight,ee(this.afterBody,g),e.y-=s}drawFooter(e,n,o){const i=this.footer,s=i.length;let l,a;if(s){const d=Xt(o.rtl,this.x,this.width);for(e.x=Po(this,o.footerAlign,o),e.y+=o.footerMarginTop,n.textAlign=d.textAlign(o.footerAlign),n.textBaseline="middle",l=he(o.footerFont),n.fillStyle=o.footerColor,n.font=l.string,a=0;a<s;++a)n.fillText(i[a],d.x(e.x),e.y+l.lineHeight/2),e.y+=l.lineHeight+o.footerSpacing}}drawBackground(e,n,o,i){const{xAlign:s,yAlign:l}=this,{x:a,y:d}=e,{width:c,height:u}=o,{topLeft:f,topRight:h,bottomLeft:p,bottomRight:m}=Pt(i.cornerRadius);n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.beginPath(),n.moveTo(a+f,d),l==="top"&&this.drawCaret(e,n,o,i),n.lineTo(a+c-h,d),n.quadraticCurveTo(a+c,d,a+c,d+h),l==="center"&&s==="right"&&this.drawCaret(e,n,o,i),n.lineTo(a+c,d+u-m),n.quadraticCurveTo(a+c,d+u,a+c-m,d+u),l==="bottom"&&this.drawCaret(e,n,o,i),n.lineTo(a+p,d+u),n.quadraticCurveTo(a,d+u,a,d+u-p),l==="center"&&s==="left"&&this.drawCaret(e,n,o,i),n.lineTo(a,d+f),n.quadraticCurveTo(a,d,a+f,d),n.closePath(),n.fill(),i.borderWidth>0&&n.stroke()}_updateAnimationTarget(e){const n=this.chart,o=this.$animations,i=o&&o.x,s=o&&o.y;if(i||s){const l=Vn[e.position].call(this,this._active,this._eventPosition);if(!l)return;const a=this._size=Ba(this,e),d=Object.assign({},l,this._size),c=Va(n,e,d),u=Pa(e,d,c,n);(i._to!==u.x||s._to!==u.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=a.width,this.height=a.height,this.caretX=l.x,this.caretY=l.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(e){const n=this.options.setContext(this.getContext());let o=this.opacity;if(!o)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},s={x:this.x,y:this.y};o=Math.abs(o)<.001?0:o;const l=be(n.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&a&&(e.save(),e.globalAlpha=o,this.drawBackground(s,e,i,n),ml(e,n.textDirection),s.y+=l.top,this.drawTitle(s,e,n),this.drawBody(s,e,n),this.drawFooter(s,e,n),gl(e,n.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,n){const o=this._active,i=e.map(({datasetIndex:a,index:d})=>{const c=this.chart.getDatasetMeta(a);if(!c)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:c.data[d],index:d}}),s=!no(o,i),l=this._positionChanged(i,n);(s||l)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,n,o=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,s=this._active||[],l=this._getActiveElements(e,s,n,o),a=this._positionChanged(l,e),d=n||!no(l,s)||a;return d&&(this._active=l,(i.enabled||i.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,n))),d}_getActiveElements(e,n,o,i){const s=this.options;if(e.type==="mouseout")return[];if(!i)return n.filter(a=>this.chart.data.datasets[a.datasetIndex]&&this.chart.getDatasetMeta(a.datasetIndex).controller.getParsed(a.index)!==void 0);const l=this.chart.getElementsAtEventForMode(e,s.mode,s,o);return s.reverse&&l.reverse(),l}_positionChanged(e,n){const{caretX:o,caretY:i,options:s}=this,l=Vn[s.position].call(this,e,n);return l!==!1&&(o!==l.x||i!==l.y)}}I(ir,"positioners",Vn);var P0={id:"tooltip",_element:ir,positioners:Vn,afterInit(t,e,n){n&&(t.tooltip=new ir({chart:t,options:n}))},beforeUpdate(t,e,n){t.tooltip&&t.tooltip.initialize(n)},reset(t,e,n){t.tooltip&&t.tooltip.initialize(n)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const n={tooltip:e};if(t.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n)}},afterEvent(t,e){if(t.tooltip){const n=e.replay;t.tooltip.handleEvent(e.event,n,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:Na},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},R0=Object.freeze({__proto__:null,Colors:Ym,Decimation:Xm,Filler:m0,Legend:w0,SubTitle:k0,Title:x0,Tooltip:P0});const F0=(t,e,n,o)=>(typeof e=="string"?(n=t.push(e)-1,o.unshift({index:n,label:e})):isNaN(e)&&(n=null),n);function N0(t,e,n,o){const i=t.indexOf(e);if(i===-1)return F0(t,e,n,o);const s=t.lastIndexOf(e);return i!==s?n:i}const A0=(t,e)=>t===null?null:me(Math.round(t),0,e);function Aa(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}class rr extends It{constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const n=this._addedLabels;if(n.length){const o=this.getLabels();for(const{index:i,label:s}of n)o[i]===s&&o.splice(i,1);this._addedLabels=[]}super.init(e)}parse(e,n){if(X(e))return null;const o=this.getLabels();return n=isFinite(n)&&o[n]===e?n:N0(o,e,Y(n,e),this._addedLabels),A0(n,o.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let{min:o,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(o=0),n||(i=this.getLabels().length-1)),this.min=o,this.max=i}buildTicks(){const e=this.min,n=this.max,o=this.options.offset,i=[];let s=this.getLabels();s=e===0&&n===s.length-1?s:s.slice(e,n+1),this._valueRange=Math.max(s.length-(o?0:1),1),this._startValue=this.min-(o?.5:0);for(let l=e;l<=n;l++)i.push({value:l});return i}getLabelForValue(e){return Aa.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return typeof e!="number"&&(e=this.parse(e)),e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}I(rr,"id","category"),I(rr,"defaults",{ticks:{callback:Aa}});function O0(t,e){const n=[],{bounds:i,step:s,min:l,max:a,precision:d,count:c,maxTicks:u,maxDigits:f,includeBounds:h}=t,p=s||1,m=u-1,{min:g,max:y}=e,b=!X(l),$=!X(a),x=!X(c),S=(y-g)/(f+1);let C=Ls((y-g)/m/p)*p,V,E,F,N;if(C<1e-14&&!b&&!$)return[{value:g},{value:y}];N=Math.ceil(y/C)-Math.floor(g/C),N>m&&(C=Ls(N*C/m/p)*p),X(d)||(V=Math.pow(10,d),C=Math.ceil(C*V)/V),i==="ticks"?(E=Math.floor(g/C)*C,F=Math.ceil(y/C)*C):(E=g,F=y),b&&$&&s&&Vf((a-l)/s,C/1e3)?(N=Math.round(Math.min((a-l)/C,u)),C=(a-l)/N,E=l,F=a):x?(E=b?l:E,F=$?a:F,N=c-1,C=(F-E)/N):(N=(F-E)/C,pn(N,Math.round(N),C/1e3)?N=Math.round(N):N=Math.ceil(N));const P=Math.max(Hs(C),Hs(E));V=Math.pow(10,X(d)?P:d),E=Math.round(E*V)/V,F=Math.round(F*V)/V;let w=0;for(b&&(h&&E!==l?(n.push({value:l}),E<l&&w++,pn(Math.round((E+w*C)*V)/V,l,Oa(l,S,t))&&w++):E<l&&w++);w<N;++w){const _=Math.round((E+w*C)*V)/V;if($&&_>a)break;n.push({value:_})}return $&&h&&F!==a?n.length&&pn(n[n.length-1].value,a,Oa(a,S,t))?n[n.length-1].value=a:n.push({value:a}):(!$||F===a)&&n.push({value:F}),n}function Oa(t,e,{horizontal:n,minRotation:o}){const i=Ie(o),s=(n?Math.sin(i):Math.cos(i))||.001,l=.75*e*(""+t).length;return Math.min(e/s,l)}class Ro extends It{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,n){return X(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:n,maxDefined:o}=this.getUserBounds();let{min:i,max:s}=this;const l=d=>i=n?i:d,a=d=>s=o?s:d;if(e){const d=Ye(i),c=Ye(s);d<0&&c<0?a(0):d>0&&c>0&&l(0)}if(i===s){let d=s===0?1:Math.abs(s*.05);a(s+d),e||l(i-d)}this.min=i,this.max=s}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:n,stepSize:o}=e,i;return o?(i=Math.ceil(this.max/o)-Math.floor(this.min/o)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${o} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,n=e.ticks;let o=this.getTickLimit();o=Math.max(2,o);const i={maxTicks:o,bounds:e.bounds,min:e.min,max:e.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},s=this._range||this,l=O0(i,s);return e.bounds==="ticks"&&zs(l,this,"value"),e.reverse?(l.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),l}configure(){const e=this.ticks;let n=this.min,o=this.max;if(super.configure(),this.options.offset&&e.length){const i=(o-n)/Math.max(e.length-1,1)/2;n-=i,o+=i}this._startValue=n,this._endValue=o,this._valueRange=o-n}getLabelForValue(e){return yn(e,this.chart.options.locale,this.options.ticks.format)}}class sr extends Ro{determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=de(e)?e:0,this.max=de(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),n=e?this.width:this.height,o=Ie(this.options.ticks.minRotation),i=(e?Math.sin(o):Math.cos(o))||.001,s=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,s.lineHeight/i))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}I(sr,"id","linear"),I(sr,"defaults",{ticks:{callback:so.formatters.numeric}});const Pn=t=>Math.floor(yt(t)),Tt=(t,e)=>Math.pow(10,Pn(t)+e);function Ia(t){return t/Math.pow(10,Pn(t))===1}function Ta(t,e,n){const o=Math.pow(10,n),i=Math.floor(t/o);return Math.ceil(e/o)-i}function I0(t,e){const n=e-t;let o=Pn(n);for(;Ta(t,e,o)>10;)o++;for(;Ta(t,e,o)<10;)o--;return Math.min(o,Pn(t))}function T0(t,{min:e,max:n}){e=De(t.min,e);const o=[],i=Pn(e);let s=I0(e,n),l=s<0?Math.pow(10,Math.abs(s)):1;const a=Math.pow(10,s),d=i>s?Math.pow(10,i):0,c=Math.round((e-d)*l)/l,u=Math.floor((e-d)/a/10)*a*10;let f=Math.floor((c-u)/Math.pow(10,s)),h=De(t.min,Math.round((d+u+f*Math.pow(10,s))*l)/l);for(;h<n;)o.push({value:h,major:Ia(h),significand:f}),f>=10?f=f<15?15:20:f++,f>=20&&(s++,f=2,l=s>=0?1:l),h=Math.round((d+u+f*Math.pow(10,s))*l)/l;const p=De(t.max,h);return o.push({value:p,major:Ia(p),significand:f}),o}class lr extends It{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,n){const o=Ro.prototype.parse.apply(this,[e,n]);if(o===0){this._zero=!0;return}return de(o)&&o>0?o:null}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=de(e)?Math.max(0,e):null,this.max=de(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!de(this._userMin)&&(this.min=e===Tt(this.min,0)?Tt(this.min,-1):Tt(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let o=this.min,i=this.max;const s=a=>o=e?o:a,l=a=>i=n?i:a;o===i&&(o<=0?(s(1),l(10)):(s(Tt(o,-1)),l(Tt(i,1)))),o<=0&&s(Tt(i,-1)),i<=0&&l(Tt(o,1)),this.min=o,this.max=i}buildTicks(){const e=this.options,n={min:this._userMin,max:this._userMax},o=T0(n,this);return e.bounds==="ticks"&&zs(o,this,"value"),e.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}getLabelForValue(e){return e===void 0?"0":yn(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=yt(e),this._valueRange=yt(this.max)-yt(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(yt(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const n=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+n*this._valueRange)}}I(lr,"id","logarithmic"),I(lr,"defaults",{ticks:{callback:so.formatters.logarithmic,major:{enabled:!0}}});function ar(t){const e=t.ticks;if(e.display&&t.display){const n=be(e.backdropPadding);return Y(e.font&&e.font.size,ce.font.size)+n.height}return 0}function L0(t,e,n){return n=oe(n)?n:[n],{w:qf(t,e.string,n),h:n.length*e.lineHeight}}function La(t,e,n,o,i){return t===o||t===i?{start:e-n/2,end:e+n/2}:t<o||t>i?{start:e-n,end:e}:{start:e,end:e+n}}function z0(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},n=Object.assign({},e),o=[],i=[],s=t._pointLabels.length,l=t.options.pointLabels,a=l.centerPointLabels?ie/s:0;for(let d=0;d<s;d++){const c=l.setContext(t.getPointLabelContext(d));i[d]=c.padding;const u=t.getPointPosition(d,t.drawingArea+i[d],a),f=he(c.font),h=L0(t.ctx,f,t._pointLabels[d]);o[d]=h;const p=Ee(t.getIndexAngle(d)+a),m=Math.round(Si(p)),g=La(m,u.x,h.w,0,180),y=La(m,u.y,h.h,90,270);H0(n,e,p,g,y)}t.setCenterPoint(e.l-n.l,n.r-e.r,e.t-n.t,n.b-e.b),t._pointLabelItems=Y0(t,o,i)}function H0(t,e,n,o,i){const s=Math.abs(Math.sin(n)),l=Math.abs(Math.cos(n));let a=0,d=0;o.start<e.l?(a=(e.l-o.start)/s,t.l=Math.min(t.l,e.l-a)):o.end>e.r&&(a=(o.end-e.r)/s,t.r=Math.max(t.r,e.r+a)),i.start<e.t?(d=(e.t-i.start)/l,t.t=Math.min(t.t,e.t-d)):i.end>e.b&&(d=(i.end-e.b)/l,t.b=Math.max(t.b,e.b+d))}function j0(t,e,n){const o=t.drawingArea,{extra:i,additionalAngle:s,padding:l,size:a}=n,d=t.getPointPosition(e,o+i+l,s),c=Math.round(Si(Ee(d.angle+ue))),u=q0(d.y,a.h,c),f=U0(c),h=G0(d.x,a.w,f);return{visible:!0,x:d.x,y:u,textAlign:f,left:h,top:u,right:h+a.w,bottom:u+a.h}}function W0(t,e){if(!e)return!0;const{left:n,top:o,right:i,bottom:s}=t;return!(tt({x:n,y:o},e)||tt({x:n,y:s},e)||tt({x:i,y:o},e)||tt({x:i,y:s},e))}function Y0(t,e,n){const o=[],i=t._pointLabels.length,s=t.options,{centerPointLabels:l,display:a}=s.pointLabels,d={extra:ar(s)/2,additionalAngle:l?ie/i:0};let c;for(let u=0;u<i;u++){d.padding=n[u],d.size=e[u];const f=j0(t,u,d);o.push(f),a==="auto"&&(f.visible=W0(f,c),f.visible&&(c=f))}return o}function U0(t){return t===0||t===180?"center":t<180?"left":"right"}function G0(t,e,n){return n==="right"?t-=e:n==="center"&&(t-=e/2),t}function q0(t,e,n){return n===90||n===270?t-=e/2:(n>270||n<90)&&(t-=e),t}function X0(t,e,n){const{left:o,top:i,right:s,bottom:l}=n,{backdropColor:a}=e;if(!X(a)){const d=Pt(e.borderRadius),c=be(e.backdropPadding);t.fillStyle=a;const u=o-c.left,f=i-c.top,h=s-o+c.width,p=l-i+c.height;Object.values(d).some(m=>m!==0)?(t.beginPath(),$n(t,{x:u,y:f,w:h,h:p,radius:d}),t.fill()):t.fillRect(u,f,h,p)}}function K0(t,e){const{ctx:n,options:{pointLabels:o}}=t;for(let i=e-1;i>=0;i--){const s=t._pointLabelItems[i];if(!s.visible)continue;const l=o.setContext(t.getPointLabelContext(i));X0(n,l,s);const a=he(l.font),{x:d,y:c,textAlign:u}=s;Vt(n,t._pointLabels[i],d,c+a.lineHeight/2,a,{color:l.color,textAlign:u,textBaseline:"middle"})}}function za(t,e,n,o){const{ctx:i}=t;if(n)i.arc(t.xCenter,t.yCenter,e,0,re);else{let s=t.getPointPosition(0,e);i.moveTo(s.x,s.y);for(let l=1;l<o;l++)s=t.getPointPosition(l,e),i.lineTo(s.x,s.y)}}function Z0(t,e,n,o,i){const s=t.ctx,l=e.circular,{color:a,lineWidth:d}=e;!l&&!o||!a||!d||n<0||(s.save(),s.strokeStyle=a,s.lineWidth=d,s.setLineDash(i.dash),s.lineDashOffset=i.dashOffset,s.beginPath(),za(t,n,l,o),s.closePath(),s.stroke(),s.restore())}function J0(t,e,n){return bt(t,{label:n,index:e,type:"pointLabel"})}class Rn extends Ro{constructor(e){super(e),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const e=this._padding=be(ar(this.options)/2),n=this.width=this.maxWidth-e.width,o=this.height=this.maxHeight-e.height;this.xCenter=Math.floor(this.left+n/2+e.left),this.yCenter=Math.floor(this.top+o/2+e.top),this.drawingArea=Math.floor(Math.min(n,o)/2)}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!1);this.min=de(e)&&!isNaN(e)?e:0,this.max=de(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/ar(this.options))}generateTickLabels(e){Ro.prototype.generateTickLabels.call(this,e),this._pointLabels=this.getLabels().map((n,o)=>{const i=ne(this.options.pointLabels.callback,[n,o],this);return i||i===0?i:""}).filter((n,o)=>this.chart.getDataVisibility(o))}fit(){const e=this.options;e.display&&e.pointLabels.display?z0(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,n,o,i){this.xCenter+=Math.floor((e-n)/2),this.yCenter+=Math.floor((o-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,n,o,i))}getIndexAngle(e){const n=re/(this._pointLabels.length||1),o=this.options.startAngle||0;return Ee(e*n+Ie(o))}getDistanceFromCenterForValue(e){if(X(e))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*n:(e-this.min)*n}getValueForDistanceFromCenter(e){if(X(e))return NaN;const n=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(e){const n=this._pointLabels||[];if(e>=0&&e<n.length){const o=n[e];return J0(this.getContext(),e,o)}}getPointPosition(e,n,o=0){const i=this.getIndexAngle(e)-ue+o;return{x:Math.cos(i)*n+this.xCenter,y:Math.sin(i)*n+this.yCenter,angle:i}}getPointPositionForValue(e,n){return this.getPointPosition(e,this.getDistanceFromCenterForValue(n))}getBasePosition(e){return this.getPointPositionForValue(e||0,this.getBaseValue())}getPointLabelPosition(e){const{left:n,top:o,right:i,bottom:s}=this._pointLabelItems[e];return{left:n,top:o,right:i,bottom:s}}drawBackground(){const{backgroundColor:e,grid:{circular:n}}=this.options;if(e){const o=this.ctx;o.save(),o.beginPath(),za(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length),o.closePath(),o.fillStyle=e,o.fill(),o.restore()}}drawGrid(){const e=this.ctx,n=this.options,{angleLines:o,grid:i,border:s}=n,l=this._pointLabels.length;let a,d,c;if(n.pointLabels.display&&K0(this,l),i.display&&this.ticks.forEach((u,f)=>{if(f!==0||f===0&&this.min<0){d=this.getDistanceFromCenterForValue(u.value);const h=this.getContext(f),p=i.setContext(h),m=s.setContext(h);Z0(this,p,d,l,m)}}),o.display){for(e.save(),a=l-1;a>=0;a--){const u=o.setContext(this.getPointLabelContext(a)),{color:f,lineWidth:h}=u;!h||!f||(e.lineWidth=h,e.strokeStyle=f,e.setLineDash(u.borderDash),e.lineDashOffset=u.borderDashOffset,d=this.getDistanceFromCenterForValue(n.ticks.reverse?this.min:this.max),c=this.getPointPosition(a,d),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(c.x,c.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const e=this.ctx,n=this.options,o=n.ticks;if(!o.display)return;const i=this.getIndexAngle(0);let s,l;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(i),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((a,d)=>{if(d===0&&this.min>=0&&!n.reverse)return;const c=o.setContext(this.getContext(d)),u=he(c.font);if(s=this.getDistanceFromCenterForValue(this.ticks[d].value),c.showLabelBackdrop){e.font=u.string,l=e.measureText(a.label).width,e.fillStyle=c.backdropColor;const f=be(c.backdropPadding);e.fillRect(-l/2-f.left,-s-u.size/2-f.top,l+f.width,u.size+f.height)}Vt(e,a.label,0,-s,u,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),e.restore()}drawTitle(){}}I(Rn,"id","radialLinear"),I(Rn,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:so.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(e){return e},padding:5,centerPointLabels:!1}}),I(Rn,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),I(Rn,"descriptors",{angleLines:{_fallback:"grid"}});const Fo={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}},ve=Object.keys(Fo);function Ha(t,e){return t-e}function ja(t,e){if(X(e))return null;const n=t._adapter,{parser:o,round:i,isoWeekday:s}=t._parseOpts;let l=e;return typeof o=="function"&&(l=o(l)),de(l)||(l=typeof o=="string"?n.parse(l,o):n.parse(l)),l===null?null:(i&&(l=i==="week"&&(Ut(s)||s===!0)?n.startOf(l,"isoWeek",s):n.startOf(l,i)),+l)}function Wa(t,e,n,o){const i=ve.length;for(let s=ve.indexOf(t);s<i-1;++s){const l=Fo[ve[s]],a=l.steps?l.steps:Number.MAX_SAFE_INTEGER;if(l.common&&Math.ceil((n-e)/(a*l.size))<=o)return ve[s]}return ve[i-1]}function Q0(t,e,n,o,i){for(let s=ve.length-1;s>=ve.indexOf(n);s--){const l=ve[s];if(Fo[l].common&&t._adapter.diff(i,o,l)>=e-1)return l}return ve[n?ve.indexOf(n):0]}function eg(t){for(let e=ve.indexOf(t)+1,n=ve.length;e<n;++e)if(Fo[ve[e]].common)return ve[e]}function Ya(t,e,n){if(!n)t[e]=!0;else if(n.length){const{lo:o,hi:i}=Mi(n,e),s=n[o]>=e?n[o]:n[i];t[s]=!0}}function tg(t,e,n,o){const i=t._adapter,s=+i.startOf(e[0].value,o),l=e[e.length-1].value;let a,d;for(a=s;a<=l;a=+i.add(a,1,o))d=n[a],d>=0&&(e[d].major=!0);return e}function Ua(t,e,n){const o=[],i={},s=e.length;let l,a;for(l=0;l<s;++l)a=e[l],i[a]=l,o.push({value:a,major:!1});return s===0||!n?o:tg(t,o,i,n)}class Fn extends It{constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,n={}){const o=e.time||(e.time={}),i=this._adapter=new cp._date(e.adapters.date);i.init(n),fn(o.displayFormats,i.formats()),this._parseOpts={parser:o.parser,round:o.round,isoWeekday:o.isoWeekday},super.init(e),this._normalized=n.normalized}parse(e,n){return e===void 0?null:ja(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,n=this._adapter,o=e.time.unit||"day";let{min:i,max:s,minDefined:l,maxDefined:a}=this.getUserBounds();function d(c){!l&&!isNaN(c.min)&&(i=Math.min(i,c.min)),!a&&!isNaN(c.max)&&(s=Math.max(s,c.max))}(!l||!a)&&(d(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&d(this.getMinMax(!1))),i=de(i)&&!isNaN(i)?i:+n.startOf(Date.now(),o),s=de(s)&&!isNaN(s)?s:+n.endOf(Date.now(),o)+1,this.min=Math.min(i,s-1),this.max=Math.max(i+1,s)}_getLabelBounds(){const e=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;return e.length&&(n=e[0],o=e[e.length-1]),{min:n,max:o}}buildTicks(){const e=this.options,n=e.time,o=e.ticks,i=o.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const s=this.min,l=this.max,a=Nf(i,s,l);return this._unit=n.unit||(o.autoSkip?Wa(n.minUnit,this.min,this.max,this._getLabelCapacity(s)):Q0(this,a.length,n.minUnit,this.min,this.max)),this._majorUnit=!o.major.enabled||this._unit==="year"?void 0:eg(this._unit),this.initOffsets(i),e.reverse&&a.reverse(),Ua(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let n=0,o=0,i,s;this.options.offset&&e.length&&(i=this.getDecimalForValue(e[0]),e.length===1?n=1-i:n=(this.getDecimalForValue(e[1])-i)/2,s=this.getDecimalForValue(e[e.length-1]),e.length===1?o=s:o=(s-this.getDecimalForValue(e[e.length-2]))/2);const l=e.length<3?.5:.25;n=me(n,0,l),o=me(o,0,l),this._offsets={start:n,end:o,factor:1/(n+1+o)}}_generate(){const e=this._adapter,n=this.min,o=this.max,i=this.options,s=i.time,l=s.unit||Wa(s.minUnit,n,o,this._getLabelCapacity(n)),a=Y(i.ticks.stepSize,1),d=l==="week"?s.isoWeekday:!1,c=Ut(d)||d===!0,u={};let f=n,h,p;if(c&&(f=+e.startOf(f,"isoWeek",d)),f=+e.startOf(f,c?"day":l),e.diff(o,n,l)>1e5*a)throw new Error(n+" and "+o+" are too far apart with stepSize of "+a+" "+l);const m=i.ticks.source==="data"&&this.getDataTimestamps();for(h=f,p=0;h<o;h=+e.add(h,a,l),p++)Ya(u,h,m);return(h===o||i.bounds==="ticks"||p===1)&&Ya(u,h,m),Object.keys(u).sort(Ha).map(g=>+g)}getLabelForValue(e){const n=this._adapter,o=this.options.time;return o.tooltipFormat?n.format(e,o.tooltipFormat):n.format(e,o.displayFormats.datetime)}format(e,n){const i=this.options.time.displayFormats,s=this._unit,l=n||i[s];return this._adapter.format(e,l)}_tickFormatFunction(e,n,o,i){const s=this.options,l=s.ticks.callback;if(l)return ne(l,[e,n,o],this);const a=s.time.displayFormats,d=this._unit,c=this._majorUnit,u=d&&a[d],f=c&&a[c],h=o[n],p=c&&f&&h&&h.major;return this._adapter.format(e,i||(p?f:u))}generateTickLabels(e){let n,o,i;for(n=0,o=e.length;n<o;++n)i=e[n],i.label=this._tickFormatFunction(i.value,n,e)}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const n=this._offsets,o=this.getDecimalForValue(e);return this.getPixelForDecimal((n.start+o)*n.factor)}getValueForPixel(e){const n=this._offsets,o=this.getDecimalForPixel(e)/n.factor-n.end;return this.min+o*(this.max-this.min)}_getLabelSize(e){const n=this.options.ticks,o=this.ctx.measureText(e).width,i=Ie(this.isHorizontal()?n.maxRotation:n.minRotation),s=Math.cos(i),l=Math.sin(i),a=this._resolveTickFontOptions(0).size;return{w:o*s+a*l,h:o*l+a*s}}_getLabelCapacity(e){const n=this.options.time,o=n.displayFormats,i=o[n.unit]||o.millisecond,s=this._tickFormatFunction(e,0,Ua(this,[e],this._majorUnit),i),l=this._getLabelSize(s),a=Math.floor(this.isHorizontal()?this.width/l.w:this.height/l.h)-1;return a>0?a:1}getDataTimestamps(){let e=this._cache.data||[],n,o;if(e.length)return e;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,o=i.length;n<o;++n)e=e.concat(i[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){const e=this._cache.labels||[];let n,o;if(e.length)return e;const i=this.getLabels();for(n=0,o=i.length;n<o;++n)e.push(ja(this,i[n]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return Us(e.sort(Ha))}}I(Fn,"id","time"),I(Fn,"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 No(t,e,n){let o=0,i=t.length-1,s,l,a,d;n?(e>=t[o].pos&&e<=t[i].pos&&({lo:o,hi:i}=et(t,"pos",e)),{pos:s,time:a}=t[o],{pos:l,time:d}=t[i]):(e>=t[o].time&&e<=t[i].time&&({lo:o,hi:i}=et(t,"time",e)),{time:s,pos:a}=t[o],{time:l,pos:d}=t[i]);const c=l-s;return c?a+(d-a)*(e-s)/c:a}class dr extends Fn{constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(e);this._minPos=No(n,this.min),this._tableRange=No(n,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:n,max:o}=this,i=[],s=[];let l,a,d,c,u;for(l=0,a=e.length;l<a;++l)c=e[l],c>=n&&c<=o&&i.push(c);if(i.length<2)return[{time:n,pos:0},{time:o,pos:1}];for(l=0,a=i.length;l<a;++l)u=i[l+1],d=i[l-1],c=i[l],Math.round((u+d)/2)!==c&&s.push({time:c,pos:l/(a-1)});return s}_generate(){const e=this.min,n=this.max;let o=super.getDataTimestamps();return(!o.includes(e)||!o.length)&&o.splice(0,0,e),(!o.includes(n)||o.length===1)&&o.push(n),o.sort((i,s)=>i-s)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const n=this.getDataTimestamps(),o=this.getLabelTimestamps();return n.length&&o.length?e=this.normalize(n.concat(o)):e=n.length?n:o,e=this._cache.all=e,e}getDecimalForValue(e){return(No(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const n=this._offsets,o=this.getDecimalForPixel(e)/n.factor-n.end;return No(this._table,o*this._tableRange+this._minPos,!0)}}I(dr,"id","timeseries"),I(dr,"defaults",Fn.defaults);var ng=Object.freeze({__proto__:null,CategoryScale:rr,LinearScale:sr,LogarithmicScale:lr,RadialLinearScale:Rn,TimeScale:Fn,TimeSeriesScale:dr});const og=[dp,Tm,R0,ng];Le.register(...og);const ig={class:"flex flex-col h-full m-24 overflow-hidden p-24"},rg={class:"flex flex-col gap-8"},sg={class:"fm-color-typo-primary fm-typo-body-lg-400"},lg={class:"fm-color-typo-secondary fm-typo-body-md-400"},ag={class:"grow"},dg=r.defineComponent({__name:"FmLine",props:{name:{default:void 0},paragraph:{default:void 0},datasets:{},xAxis:{},transpose:{type:Boolean,default:!1},stacked:{type:Boolean},maintainAspectRatio:{type:Boolean}},setup(t){const e=t,n=r.ref(null);let o=null;r.watch([()=>e.transpose,()=>e.maintainAspectRatio],()=>{o&&o.config.options&&(o.destroy(),a())});const i=r.computed(()=>e.transpose?"y":"x");function s({context:d,color:c}){const{ctx:u,chartArea:f}=d.chart;if(!f)return;const h=u==null?void 0:u.createLinearGradient(0,0,0,f.height);return h.addColorStop(0,gi(c,.5)),h.addColorStop(1,gi(c,0)),h}const l=r.computed(()=>({labels:e.xAxis.categories,datasets:e.datasets.map(d=>{const c=sn(d.color)??"";return{...d,backgroundColor:c?u=>s({context:u,color:c}):"",borderColor:c,borderDash:d.dash?[5,5]:void 0,tension:.1}})}));r.watch(l,()=>{o&&(o.data=l.value,o.update())},{deep:!0});function a(){n.value&&(o=new Le(n.value,{type:"line",data:l.value,options:{plugins:{legend:{display:e.datasets.length>1,position:"bottom",labels:{usePointStyle:!0,pointStyle:"line"}}},maintainAspectRatio:e.maintainAspectRatio,responsive:!0,indexAxis:i.value,scales:{x:{stacked:e.stacked,grid:{display:!1},beginAtZero:!0},y:{stacked:e.stacked,grid:{display:!0},position:"right",beginAtZero:!0}},elements:{line:{borderWidth:1.5},point:{radius:0,hitRadius:30,hoverRadius:6,hoverBackgroundColor:"#FFFFFF",hoverBorderWidth:3}}}}))}return r.onMounted(()=>{a()}),(d,c)=>(r.openBlock(),r.createElementBlock("div",ig,[r.createElementVNode("div",rg,[r.renderSlot(d.$slots,"title"),r.createElementVNode("div",sg,r.toDisplayString(d.name),1),r.createElementVNode("div",lg,r.toDisplayString(d.paragraph),1)]),r.createElementVNode("div",ag,[r.createElementVNode("canvas",{ref_key:"canvas",ref:n},null,512)])]))}}),cg={class:"flex flex-col h-full overflow-hidden px-24 py-16"},ug={class:"flex flex-col gap-8"},fg={class:"fm-color-typo-primary fm-typo-body-lg-400"},hg={class:"fm-color-typo-secondary fm-typo-body-md-400"},pg={class:"grow"},mg=r.defineComponent({__name:"FmPie",props:{name:{default:void 0},variant:{},paragraph:{default:void 0},datasets:{},metrics:{},legend:{type:Boolean,default:!0},text:{default:void 0},textColor:{default:"#0E1715"},textStyle:{default:"bold 30px sans-serif"},maintainAspectRatio:{type:Boolean,default:!0}},setup(t){const e=t,n=r.ref(null);let o=null;const i=r.computed(()=>e.variant==="doughnut"?"90%":"0"),s=r.computed(()=>e.text);r.watch([()=>e.metrics,()=>e.datasets,()=>e.variant,()=>e.legend,()=>e.textColor,()=>e.textStyle,()=>e.text,()=>e.maintainAspectRatio],()=>{o&&(o.destroy(),a())});const l=r.computed(()=>({labels:e.metrics,datasets:e.datasets.map(d=>{var u;const c=(u=d.backgroundColor)==null?void 0:u.map(f=>sn(f)??"");return{...d,backgroundColor:c??void 0,hoverOffset:d.hoverOffset??0}})}));function a(){n.value&&(o=new Le(n.value,{type:"doughnut",data:l.value,options:{maintainAspectRatio:e.maintainAspectRatio,responsive:!0,cutout:i.value,plugins:{legend:{display:e.legend,position:"bottom",labels:{usePointStyle:!0}}}},plugins:[{id:"doughnutlabel",beforeDatasetsDraw:d=>{if(e.variant==="doughnut"){const{ctx:c}=d;c.save();const u=d.getDatasetMeta(0).data[0].x,f=d.getDatasetMeta(0).data[0].y;if(c.font=e.textStyle,c.textAlign="center",c.textBaseline="middle",s.value&&s.value!==""){const h=s.value.split(`
27
- `);for(let p=0;p<h.length;p++){const m=p===0?1:.7;c.fillStyle=gi(sn(e.textColor)??"",m),c.fillText(h[p],u,f+p*40)}}}}}]}))}return r.onMounted(()=>{a()}),(d,c)=>(r.openBlock(),r.createElementBlock("div",cg,[r.createElementVNode("div",ug,[r.renderSlot(d.$slots,"title"),r.createElementVNode("div",fg,r.toDisplayString(d.name),1),r.createElementVNode("div",hg,r.toDisplayString(d.paragraph),1)]),r.createElementVNode("div",pg,[r.createElementVNode("canvas",{ref_key:"canvas",ref:n},null,512)])]))}}),gg={class:"flex flex-col h-full overflow-hidden px-24 py-16"},yg={class:"flex flex-col gap-8"},bg={class:"fm-color-typo-primary fm-typo-body-lg-400"},$g={class:"fm-color-typo-secondary fm-typo-body-md-400"},_g={class:"grow"},wg=r.defineComponent({__name:"FmBar",props:{name:{default:void 0},paragraph:{default:void 0},datasets:{},xAxis:{},transpose:{type:Boolean,default:!1},stacked:{type:Boolean,default:!1},maintainAspectRatio:{type:Boolean,default:!0}},setup(t){const e=t,n=r.ref(null);let o=null;r.watch([()=>e.transpose,()=>e.maintainAspectRatio],()=>{o&&(o.destroy(),l())});const i=r.computed(()=>e.transpose?"y":"x"),s=r.computed(()=>({labels:e.xAxis.categories,datasets:e.datasets.map(a=>{var u;let d,c;return typeof a.backgroundColor=="string"?d=a.backgroundColor:typeof a.backgroundColor=="object"&&(d=a.backgroundColor.map(f=>sn(f)??"")),typeof a.borderColor=="string"?c=a.borderColor:typeof a.borderColor=="object"&&(c=(u=a.borderColor)==null?void 0:u.map(f=>sn(f)??"")),{...a,backgroundColor:d,borderColor:c,borderRadius:10,borderWidth:c?1:0}})}));r.watch(s,()=>{o&&(o.data=s.value,o.update())},{deep:!0});function l(){n.value&&(o=new Le(n.value,{type:"bar",data:s.value,options:{plugins:{legend:{display:e.datasets.length>1,position:"bottom"}},maintainAspectRatio:e.maintainAspectRatio,responsive:!0,indexAxis:i.value,scales:{x:{stacked:e.stacked,grid:{display:!1},beginAtZero:!0},y:{stacked:e.stacked,grid:{display:!1},position:"right",beginAtZero:!0}},elements:{point:{radius:0,hitRadius:30,hoverRadius:6,hoverBackgroundColor:"#FFFFFF",hoverBorderWidth:3}}}}))}return r.onMounted(()=>{l()}),(a,d)=>(r.openBlock(),r.createElementBlock("div",gg,[r.createElementVNode("div",yg,[r.renderSlot(a.$slots,"title"),r.createElementVNode("div",bg,r.toDisplayString(a.name),1),r.createElementVNode("div",$g,r.toDisplayString(a.paragraph),1)]),r.createElementVNode("div",_g,[r.createElementVNode("canvas",{ref_key:"canvas",ref:n},null,512)])]))}});function _e(t,e){return t===null||e===null||typeof t!="object"&&typeof e!="object"?t===e:Object.keys(t).length!==Object.keys(e).length?!1:Object.keys(t).every(n=>_e(t[n],e[n]))}const Cg={class:"fm-checkbox"},xg={class:"fm-checkbox--wrapper"},kg={class:"fm-checkbox__input--container"},Sg=["checked","disabled","indeterminate"],vg={key:0,class:"fm-checkbox__label-container"},Mg={class:"fm-typo-body-lg-400"},Dg={key:0,class:"fm-color-typo-secondary fm-typo-body-md-400"},Ga=r.defineComponent({__name:"FmCheckbox",props:{modelValue:{type:[Boolean,Array]},label:{default:""},sublabel:{default:""},disabled:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1},value:{}},emits:["update:modelValue","update:indeterminate"],setup(t){const e=t,n=Z(e,"modelValue"),o=Z(e,"indeterminate"),i=Array.isArray(n.value),s=r.ref(i?n.value.some(d=>_e(d,e.value)):n.value),l=r.computed(()=>{const d=i?n.value.some(c=>_e(c,e.value)):n.value;return o.value&&!d?"remove":n.value?"check_small":""});function a(){if(e.disabled)return;o.value=!1,s.value=!s.value;let d=n.value;i?d=s.value?d.concat(e.value):d.filter(c=>!_e(c,e.value)):d=s.value,n.value=d}return r.watch(()=>n.value,()=>{s.value=i?n.value.some(d=>_e(d,e.value)):n.value}),(d,c)=>(r.openBlock(),r.createElementBlock("div",Cg,[r.createElementVNode("label",xg,[r.createElementVNode("div",kg,[r.createElementVNode("input",{class:r.normalizeClass({"fm-checkbox__input--btn":!0,"fm-checkbox__input--btn--checked":s.value}),type:"checkbox",checked:s.value,disabled:e.disabled,indeterminate:r.unref(o),onInput:a},null,42,Sg),r.unref(o)||s.value?(r.openBlock(),r.createBlock(j,{key:0,class:"fm-checkbox__input--checkmark",name:l.value,size:"md",color:"#FFFFFF"},null,8,["name"])):r.createCommentVNode("",!0)]),e.label?(r.openBlock(),r.createElementBlock("div",vg,[r.renderSlot(d.$slots,"label"),r.createElementVNode("div",Mg,r.toDisplayString(e.label),1),e.sublabel?(r.openBlock(),r.createElementBlock("div",Dg,r.toDisplayString(e.sublabel),1)):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0)])]))}});function Ao(){const t=r.ref(window.innerWidth),e=()=>{t.value=window.innerWidth};return r.onMounted(()=>{window.addEventListener("resize",e)}),r.onUnmounted(()=>{window.removeEventListener("resize",e)}),{breakpoints:r.computed(()=>({xs:t.value>=0&&t.value<=647,sm:t.value>=648&&t.value<=959,md:t.value>=960&&t.value<=1247,lg:t.value>=1248}))}}var Eg=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function cr(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var qa={exports:{}};(function(t,e){(function(n,o){t.exports=o()})(Eg,function(){var n=1e3,o=6e4,i=36e5,s="millisecond",l="second",a="minute",d="hour",c="day",u="week",f="month",h="quarter",p="year",m="date",g="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|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(v){var M=["th","st","nd","rd"],k=v%100;return"["+v+(M[(k-20)%10]||M[k]||M[0])+"]"}},x=function(v,M,k){var B=String(v);return!B||B.length>=M?v:""+Array(M+1-B.length).join(k)+v},S={s:x,z:function(v){var M=-v.utcOffset(),k=Math.abs(M),B=Math.floor(k/60),O=k%60;return(M<=0?"+":"-")+x(B,2,"0")+":"+x(O,2,"0")},m:function v(M,k){if(M.date()<k.date())return-v(k,M);var B=12*(k.year()-M.year())+(k.month()-M.month()),O=M.clone().add(B,f),L=k-O<0,T=M.clone().add(B+(L?-1:1),f);return+(-(B+(k-O)/(L?O-T:T-O))||0)},a:function(v){return v<0?Math.ceil(v)||0:Math.floor(v)},p:function(v){return{M:f,y:p,w:u,d:c,D:m,h:d,m:a,s:l,ms:s,Q:h}[v]||String(v||"").toLowerCase().replace(/s$/,"")},u:function(v){return v===void 0}},C="en",V={};V[C]=$;var E="$isDayjsObject",F=function(v){return v instanceof _||!(!v||!v[E])},N=function v(M,k,B){var O;if(!M)return C;if(typeof M=="string"){var L=M.toLowerCase();V[L]&&(O=L),k&&(V[L]=k,O=L);var T=M.split("-");if(!O&&T.length>1)return v(T[0])}else{var W=M.name;V[W]=M,O=W}return!B&&O&&(C=O),O||!B&&C},P=function(v,M){if(F(v))return v.clone();var k=typeof M=="object"?M:{};return k.date=v,k.args=arguments,new _(k)},w=S;w.l=N,w.i=F,w.w=function(v,M){return P(v,{locale:M.$L,utc:M.$u,x:M.$x,$offset:M.$offset})};var _=function(){function v(k){this.$L=N(k.locale,null,!0),this.parse(k),this.$x=this.$x||k.x||{},this[E]=!0}var M=v.prototype;return M.parse=function(k){this.$d=function(B){var O=B.date,L=B.utc;if(O===null)return new Date(NaN);if(w.u(O))return new Date;if(O instanceof Date)return new Date(O);if(typeof O=="string"&&!/Z$/i.test(O)){var T=O.match(y);if(T){var W=T[2]-1||0,U=(T[7]||"0").substring(0,3);return L?new Date(Date.UTC(T[1],W,T[3]||1,T[4]||0,T[5]||0,T[6]||0,U)):new Date(T[1],W,T[3]||1,T[4]||0,T[5]||0,T[6]||0,U)}}return new Date(O)}(k),this.init()},M.init=function(){var k=this.$d;this.$y=k.getFullYear(),this.$M=k.getMonth(),this.$D=k.getDate(),this.$W=k.getDay(),this.$H=k.getHours(),this.$m=k.getMinutes(),this.$s=k.getSeconds(),this.$ms=k.getMilliseconds()},M.$utils=function(){return w},M.isValid=function(){return this.$d.toString()!==g},M.isSame=function(k,B){var O=P(k);return this.startOf(B)<=O&&O<=this.endOf(B)},M.isAfter=function(k,B){return P(k)<this.startOf(B)},M.isBefore=function(k,B){return this.endOf(B)<P(k)},M.$g=function(k,B,O){return w.u(k)?this[B]:this.set(O,k)},M.unix=function(){return Math.floor(this.valueOf()/1e3)},M.valueOf=function(){return this.$d.getTime()},M.startOf=function(k,B){var O=this,L=!!w.u(B)||B,T=w.p(k),W=function(Ne,te){var se=w.w(O.$u?Date.UTC(O.$y,te,Ne):new Date(O.$y,te,Ne),O);return L?se:se.endOf(c)},U=function(Ne,te){return w.w(O.toDate()[Ne].apply(O.toDate("s"),(L?[0,0,0,0]:[23,59,59,999]).slice(te)),O)},G=this.$W,Q=this.$M,le=this.$D,fe="set"+(this.$u?"UTC":"");switch(T){case p:return L?W(1,0):W(31,11);case f:return L?W(1,Q):W(0,Q+1);case u:var Fe=this.$locale().weekStart||0,je=(G<Fe?G+7:G)-Fe;return W(L?le-je:le+(6-je),Q);case c:case m:return U(fe+"Hours",0);case d:return U(fe+"Minutes",1);case a:return U(fe+"Seconds",2);case l:return U(fe+"Milliseconds",3);default:return this.clone()}},M.endOf=function(k){return this.startOf(k,!1)},M.$set=function(k,B){var O,L=w.p(k),T="set"+(this.$u?"UTC":""),W=(O={},O[c]=T+"Date",O[m]=T+"Date",O[f]=T+"Month",O[p]=T+"FullYear",O[d]=T+"Hours",O[a]=T+"Minutes",O[l]=T+"Seconds",O[s]=T+"Milliseconds",O)[L],U=L===c?this.$D+(B-this.$W):B;if(L===f||L===p){var G=this.clone().set(m,1);G.$d[W](U),G.init(),this.$d=G.set(m,Math.min(this.$D,G.daysInMonth())).$d}else W&&this.$d[W](U);return this.init(),this},M.set=function(k,B){return this.clone().$set(k,B)},M.get=function(k){return this[w.p(k)]()},M.add=function(k,B){var O,L=this;k=Number(k);var T=w.p(B),W=function(Q){var le=P(L);return w.w(le.date(le.date()+Math.round(Q*k)),L)};if(T===f)return this.set(f,this.$M+k);if(T===p)return this.set(p,this.$y+k);if(T===c)return W(1);if(T===u)return W(7);var U=(O={},O[a]=o,O[d]=i,O[l]=n,O)[T]||1,G=this.$d.getTime()+k*U;return w.w(G,this)},M.subtract=function(k,B){return this.add(-1*k,B)},M.format=function(k){var B=this,O=this.$locale();if(!this.isValid())return O.invalidDate||g;var L=k||"YYYY-MM-DDTHH:mm:ssZ",T=w.z(this),W=this.$H,U=this.$m,G=this.$M,Q=O.weekdays,le=O.months,fe=O.meridiem,Fe=function(te,se,xe,ke){return te&&(te[se]||te(B,L))||xe[se].slice(0,ke)},je=function(te){return w.s(W%12||12,te,"0")},Ne=fe||function(te,se,xe){var ke=te<12?"AM":"PM";return xe?ke.toLowerCase():ke};return L.replace(b,function(te,se){return se||function(xe){switch(xe){case"YY":return String(B.$y).slice(-2);case"YYYY":return w.s(B.$y,4,"0");case"M":return G+1;case"MM":return w.s(G+1,2,"0");case"MMM":return Fe(O.monthsShort,G,le,3);case"MMMM":return Fe(le,G);case"D":return B.$D;case"DD":return w.s(B.$D,2,"0");case"d":return String(B.$W);case"dd":return Fe(O.weekdaysMin,B.$W,Q,2);case"ddd":return Fe(O.weekdaysShort,B.$W,Q,3);case"dddd":return Q[B.$W];case"H":return String(W);case"HH":return w.s(W,2,"0");case"h":return je(1);case"hh":return je(2);case"a":return Ne(W,U,!0);case"A":return Ne(W,U,!1);case"m":return String(U);case"mm":return w.s(U,2,"0");case"s":return String(B.$s);case"ss":return w.s(B.$s,2,"0");case"SSS":return w.s(B.$ms,3,"0");case"Z":return T}return null}(te)||T.replace(":","")})},M.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},M.diff=function(k,B,O){var L,T=this,W=w.p(B),U=P(k),G=(U.utcOffset()-this.utcOffset())*o,Q=this-U,le=function(){return w.m(T,U)};switch(W){case p:L=le()/12;break;case f:L=le();break;case h:L=le()/3;break;case u:L=(Q-G)/6048e5;break;case c:L=(Q-G)/864e5;break;case d:L=Q/i;break;case a:L=Q/o;break;case l:L=Q/n;break;default:L=Q}return O?L:w.a(L)},M.daysInMonth=function(){return this.endOf(f).$D},M.$locale=function(){return V[this.$L]},M.locale=function(k,B){if(!k)return this.$L;var O=this.clone(),L=N(k,B,!0);return L&&(O.$L=L),O},M.clone=function(){return w.w(this.$d,this)},M.toDate=function(){return new Date(this.valueOf())},M.toJSON=function(){return this.isValid()?this.toISOString():null},M.toISOString=function(){return this.$d.toISOString()},M.toString=function(){return this.$d.toUTCString()},v}(),D=_.prototype;return P.prototype=D,[["$ms",s],["$s",l],["$m",a],["$H",d],["$W",c],["$M",f],["$y",p],["$D",m]].forEach(function(v){D[v[1]]=function(M){return this.$g(M,v[0],v[1])}}),P.extend=function(v,M){return v.$i||(v(M,_,P),v.$i=!0),P},P.locale=N,P.isDayjs=F,P.unix=function(v){return P(1e3*v)},P.en=V[C],P.Ls=V,P.p={},P})})(qa);var Bg=qa.exports;const R=cr(Bg),Vg={class:"w-full"},ge=K(r.defineComponent({__name:"FmField",props:{tag:{default:"div"},prependIcon:{default:""},appendIcon:{default:""},invalid:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},iconOutlined:{type:Boolean,default:!1}},setup(t){const e=t;return(n,o)=>(r.openBlock(),r.createBlock(e.tag,{class:r.normalizeClass({"fm-field":!0,"fm-field--focused":n.focused,"fm-field--invalid":n.invalid,"fm-field--valid":n.showValidBorder&&!n.invalid,"fm-field--disabled":n.disabled})},{default:r.withCtx(()=>[r.renderSlot(n.$slots,"prepend",{},()=>[n.prependIcon?(r.openBlock(),r.createBlock(j,{key:0,name:n.prependIcon,size:"md",color:n.disabled?"disabled":"neutral-black",outline:n.iconOutlined},null,8,["name","color","outline"])):r.createCommentVNode("",!0)],!0),r.createElementVNode("div",Vg,[r.renderSlot(n.$slots,"default",{},void 0,!0)]),r.renderSlot(n.$slots,"append",{},()=>[n.appendIcon?(r.openBlock(),r.createBlock(j,{key:0,name:n.appendIcon,size:"md",color:n.disabled?"disabled":"neutral-black",outline:n.iconOutlined},null,8,["name","color","outline"])):r.createCommentVNode("",!0)],!0)]),_:3},8,["class"]))}}),[["__scopeId","data-v-bf7938df"]]),Pg={class:"flex gap-4"},Xa=r.defineComponent({__name:"FmHelperText",props:{text:{default:""},disabled:{type:Boolean,default:!1},state:{default:"none"},errorMessages:{default:()=>[]}},setup(t){const e=t,n=r.computed(()=>e.state==="success"?"check_circle":e.state==="warning"?"warning":e.state==="error"?"error":""),o=r.computed(()=>e.state==="success"?"text-fm-color-system-success-300":e.state==="warning"?"text-fm-color-system-warning-300":e.state==="error"?"text-fm-color-system-error-300":"");return(i,s)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["fm-typo-body-sm-400",{"text-fm-color-typo-disabled":i.disabled,"text-fm-color-typo-secondary":i.state==="none"&&!i.disabled,"text-fm-color-typo-success":i.state==="success"&&!i.disabled,"text-fm-color-typo-warning":i.state==="warning"&&!i.disabled,"text-fm-color-typo-error":i.state==="error"&&!i.disabled}])},[i.errorMessages.length===0?r.renderSlot(i.$slots,"default",{key:0},()=>[r.createElementVNode("div",Pg,[n.value?(r.openBlock(),r.createBlock(j,{key:0,size:"sm",name:n.value,class:r.normalizeClass(["mt-[2px]",o.value])},null,8,["name","class"])):r.createCommentVNode("",!0),r.createElementVNode("span",null,r.toDisplayString(i.text),1)])]):r.renderSlot(i.$slots,"default",{key:1},()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.errorMessages,l=>(r.openBlock(),r.createElementBlock("div",{key:l,class:"flex gap-4 text-fm-color-typo-error"},[r.createVNode(j,{size:"sm",name:"error",class:"mt-[2px] text-fm-color-system-error-300"}),r.createElementVNode("span",null,r.toDisplayString(l),1)]))),128))])],2))}}),Zt=Math.min,Lt=Math.max,Oo=Math.round,Io=Math.floor,wt=t=>({x:t,y:t}),Rg={left:"right",right:"left",bottom:"top",top:"bottom"},Fg={start:"end",end:"start"};function ur(t,e,n){return Lt(t,Zt(e,n))}function Nn(t,e){return typeof t=="function"?t(e):t}function zt(t){return t.split("-")[0]}function An(t){return t.split("-")[1]}function Ka(t){return t==="x"?"y":"x"}function fr(t){return t==="y"?"height":"width"}function To(t){return["top","bottom"].includes(zt(t))?"y":"x"}function hr(t){return Ka(To(t))}function Ng(t,e,n){n===void 0&&(n=!1);const o=An(t),i=hr(t),s=fr(i);let l=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(l=Lo(l)),[l,Lo(l)]}function Ag(t){const e=Lo(t);return[pr(t),e,pr(e)]}function pr(t){return t.replace(/start|end/g,e=>Fg[e])}function Og(t,e,n){const o=["left","right"],i=["right","left"],s=["top","bottom"],l=["bottom","top"];switch(t){case"top":case"bottom":return n?e?i:o:e?o:i;case"left":case"right":return e?s:l;default:return[]}}function Ig(t,e,n,o){const i=An(t);let s=Og(zt(t),n==="start",o);return i&&(s=s.map(l=>l+"-"+i),e&&(s=s.concat(s.map(pr)))),s}function Lo(t){return t.replace(/left|right|bottom|top/g,e=>Rg[e])}function Tg(t){return{top:0,right:0,bottom:0,left:0,...t}}function Za(t){return typeof t!="number"?Tg(t):{top:t,right:t,bottom:t,left:t}}function zo(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function Ja(t,e,n){let{reference:o,floating:i}=t;const s=To(e),l=hr(e),a=fr(l),d=zt(e),c=s==="y",u=o.x+o.width/2-i.width/2,f=o.y+o.height/2-i.height/2,h=o[a]/2-i[a]/2;let p;switch(d){case"top":p={x:u,y:o.y-i.height};break;case"bottom":p={x:u,y:o.y+o.height};break;case"right":p={x:o.x+o.width,y:f};break;case"left":p={x:o.x-i.width,y:f};break;default:p={x:o.x,y:o.y}}switch(An(e)){case"start":p[l]-=h*(n&&c?-1:1);break;case"end":p[l]+=h*(n&&c?-1:1);break}return p}const Lg=async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:s=[],platform:l}=n,a=s.filter(Boolean),d=await(l.isRTL==null?void 0:l.isRTL(e));let c=await l.getElementRects({reference:t,floating:e,strategy:i}),{x:u,y:f}=Ja(c,o,d),h=o,p={},m=0;for(let g=0;g<a.length;g++){const{name:y,fn:b}=a[g],{x:$,y:x,data:S,reset:C}=await b({x:u,y:f,initialPlacement:o,placement:h,strategy:i,middlewareData:p,rects:c,platform:l,elements:{reference:t,floating:e}});u=$??u,f=x??f,p={...p,[y]:{...p[y],...S}},C&&m<=50&&(m++,typeof C=="object"&&(C.placement&&(h=C.placement),C.rects&&(c=C.rects===!0?await l.getElementRects({reference:t,floating:e,strategy:i}):C.rects),{x:u,y:f}=Ja(c,h,d)),g=-1)}return{x:u,y:f,placement:h,strategy:i,middlewareData:p}};async function Qa(t,e){var n;e===void 0&&(e={});const{x:o,y:i,platform:s,rects:l,elements:a,strategy:d}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:h=!1,padding:p=0}=Nn(e,t),m=Za(p),y=a[h?f==="floating"?"reference":"floating":f],b=zo(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(y)))==null||n?y:y.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:d})),$=f==="floating"?{...l.floating,x:o,y:i}:l.reference,x=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),S=await(s.isElement==null?void 0:s.isElement(x))?await(s.getScale==null?void 0:s.getScale(x))||{x:1,y:1}:{x:1,y:1},C=zo(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:$,offsetParent:x,strategy:d}):$);return{top:(b.top-C.top+m.top)/S.y,bottom:(C.bottom-b.bottom+m.bottom)/S.y,left:(b.left-C.left+m.left)/S.x,right:(C.right-b.right+m.right)/S.x}}const zg=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:i,rects:s,platform:l,elements:a,middlewareData:d}=e,{element:c,padding:u=0}=Nn(t,e)||{};if(c==null)return{};const f=Za(u),h={x:n,y:o},p=hr(i),m=fr(p),g=await l.getDimensions(c),y=p==="y",b=y?"top":"left",$=y?"bottom":"right",x=y?"clientHeight":"clientWidth",S=s.reference[m]+s.reference[p]-h[p]-s.floating[m],C=h[p]-s.reference[p],V=await(l.getOffsetParent==null?void 0:l.getOffsetParent(c));let E=V?V[x]:0;(!E||!await(l.isElement==null?void 0:l.isElement(V)))&&(E=a.floating[x]||s.floating[m]);const F=S/2-C/2,N=E/2-g[m]/2-1,P=Zt(f[b],N),w=Zt(f[$],N),_=P,D=E-g[m]-w,v=E/2-g[m]/2+F,M=ur(_,v,D),k=!d.arrow&&An(i)!=null&&v!==M&&s.reference[m]/2-(v<_?P:w)-g[m]/2<0,B=k?v<_?v-_:v-D:0;return{[p]:h[p]+B,data:{[p]:M,centerOffset:v-M-B,...k&&{alignmentOffset:B}},reset:k}}}),Hg=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:s,rects:l,initialPlacement:a,platform:d,elements:c}=e,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...y}=Nn(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const b=zt(i),$=zt(a)===a,x=await(d.isRTL==null?void 0:d.isRTL(c.floating)),S=h||($||!g?[Lo(a)]:Ag(a));!h&&m!=="none"&&S.push(...Ig(a,g,m,x));const C=[a,...S],V=await Qa(e,y),E=[];let F=((o=s.flip)==null?void 0:o.overflows)||[];if(u&&E.push(V[b]),f){const _=Ng(i,l,x);E.push(V[_[0]],V[_[1]])}if(F=[...F,{placement:i,overflows:E}],!E.every(_=>_<=0)){var N,P;const _=(((N=s.flip)==null?void 0:N.index)||0)+1,D=C[_];if(D)return{data:{index:_,overflows:F},reset:{placement:D}};let v=(P=F.filter(M=>M.overflows[0]<=0).sort((M,k)=>M.overflows[1]-k.overflows[1])[0])==null?void 0:P.placement;if(!v)switch(p){case"bestFit":{var w;const M=(w=F.map(k=>[k.placement,k.overflows.filter(B=>B>0).reduce((B,O)=>B+O,0)]).sort((k,B)=>k[1]-B[1])[0])==null?void 0:w[0];M&&(v=M);break}case"initialPlacement":v=a;break}if(i!==v)return{reset:{placement:v}}}return{}}}};async function jg(t,e){const{placement:n,platform:o,elements:i}=t,s=await(o.isRTL==null?void 0:o.isRTL(i.floating)),l=zt(n),a=An(n),d=To(n)==="y",c=["left","top"].includes(l)?-1:1,u=s&&d?-1:1,f=Nn(e,t);let{mainAxis:h,crossAxis:p,alignmentAxis:m}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&typeof m=="number"&&(p=a==="end"?m*-1:m),d?{x:p*u,y:h*c}:{x:h*c,y:p*u}}const On=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:i,y:s,placement:l,middlewareData:a}=e,d=await jg(e,t);return l===((n=a.offset)==null?void 0:n.placement)&&(o=a.arrow)!=null&&o.alignmentOffset?{}:{x:i+d.x,y:s+d.y,data:{...d,placement:l}}}}},Wg=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:i}=e,{mainAxis:s=!0,crossAxis:l=!1,limiter:a={fn:y=>{let{x:b,y:$}=y;return{x:b,y:$}}},...d}=Nn(t,e),c={x:n,y:o},u=await Qa(e,d),f=To(zt(i)),h=Ka(f);let p=c[h],m=c[f];if(s){const y=h==="y"?"top":"left",b=h==="y"?"bottom":"right",$=p+u[y],x=p-u[b];p=ur($,p,x)}if(l){const y=f==="y"?"top":"left",b=f==="y"?"bottom":"right",$=m+u[y],x=m-u[b];m=ur($,m,x)}const g=a.fn({...e,[h]:p,[f]:m});return{...g,data:{x:g.x-n,y:g.y-o}}}}};function rt(t){return mr(t)?(t.nodeName||"").toLowerCase():"#document"}function Be(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function st(t){var e;return(e=(mr(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function mr(t){return t instanceof Node||t instanceof Be(t).Node}function lt(t){return t instanceof Element||t instanceof Be(t).Element}function qe(t){return t instanceof HTMLElement||t instanceof Be(t).HTMLElement}function ed(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Be(t).ShadowRoot}function In(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=Oe(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!["inline","contents"].includes(i)}function Yg(t){return["table","td","th"].includes(rt(t))}function gr(t){const e=yr(),n=Oe(t);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(o=>(n.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(n.contain||"").includes(o))}function Ug(t){let e=Jt(t);for(;qe(e)&&!Ho(e);){if(gr(e))return e;e=Jt(e)}return null}function yr(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ho(t){return["html","body","#document"].includes(rt(t))}function Oe(t){return Be(t).getComputedStyle(t)}function jo(t){return lt(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Jt(t){if(rt(t)==="html")return t;const e=t.assignedSlot||t.parentNode||ed(t)&&t.host||st(t);return ed(e)?e.host:e}function td(t){const e=Jt(t);return Ho(e)?t.ownerDocument?t.ownerDocument.body:t.body:qe(e)&&In(e)?e:td(e)}function Tn(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=td(t),s=i===((o=t.ownerDocument)==null?void 0:o.body),l=Be(i);return s?e.concat(l,l.visualViewport||[],In(i)?i:[],l.frameElement&&n?Tn(l.frameElement):[]):e.concat(i,Tn(i,[],n))}function nd(t){const e=Oe(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=qe(t),s=i?t.offsetWidth:n,l=i?t.offsetHeight:o,a=Oo(n)!==s||Oo(o)!==l;return a&&(n=s,o=l),{width:n,height:o,$:a}}function br(t){return lt(t)?t:t.contextElement}function Qt(t){const e=br(t);if(!qe(e))return wt(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:s}=nd(e);let l=(s?Oo(n.width):n.width)/o,a=(s?Oo(n.height):n.height)/i;return(!l||!Number.isFinite(l))&&(l=1),(!a||!Number.isFinite(a))&&(a=1),{x:l,y:a}}const Gg=wt(0);function od(t){const e=Be(t);return!yr()||!e.visualViewport?Gg:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function qg(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Be(t)?!1:e}function Ht(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),s=br(t);let l=wt(1);e&&(o?lt(o)&&(l=Qt(o)):l=Qt(t));const a=qg(s,n,o)?od(s):wt(0);let d=(i.left+a.x)/l.x,c=(i.top+a.y)/l.y,u=i.width/l.x,f=i.height/l.y;if(s){const h=Be(s),p=o&&lt(o)?Be(o):o;let m=h,g=m.frameElement;for(;g&&o&&p!==m;){const y=Qt(g),b=g.getBoundingClientRect(),$=Oe(g),x=b.left+(g.clientLeft+parseFloat($.paddingLeft))*y.x,S=b.top+(g.clientTop+parseFloat($.paddingTop))*y.y;d*=y.x,c*=y.y,u*=y.x,f*=y.y,d+=x,c+=S,m=Be(g),g=m.frameElement}}return zo({width:u,height:f,x:d,y:c})}const Xg=[":popover-open",":modal"];function id(t){return Xg.some(e=>{try{return t.matches(e)}catch{return!1}})}function Kg(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const s=i==="fixed",l=st(o),a=e?id(e.floating):!1;if(o===l||a&&s)return n;let d={scrollLeft:0,scrollTop:0},c=wt(1);const u=wt(0),f=qe(o);if((f||!f&&!s)&&((rt(o)!=="body"||In(l))&&(d=jo(o)),qe(o))){const h=Ht(o);c=Qt(o),u.x=h.x+o.clientLeft,u.y=h.y+o.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-d.scrollLeft*c.x+u.x,y:n.y*c.y-d.scrollTop*c.y+u.y}}function Zg(t){return Array.from(t.getClientRects())}function rd(t){return Ht(st(t)).left+jo(t).scrollLeft}function Jg(t){const e=st(t),n=jo(t),o=t.ownerDocument.body,i=Lt(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),s=Lt(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let l=-n.scrollLeft+rd(t);const a=-n.scrollTop;return Oe(o).direction==="rtl"&&(l+=Lt(e.clientWidth,o.clientWidth)-i),{width:i,height:s,x:l,y:a}}function Qg(t,e){const n=Be(t),o=st(t),i=n.visualViewport;let s=o.clientWidth,l=o.clientHeight,a=0,d=0;if(i){s=i.width,l=i.height;const c=yr();(!c||c&&e==="fixed")&&(a=i.offsetLeft,d=i.offsetTop)}return{width:s,height:l,x:a,y:d}}function e1(t,e){const n=Ht(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,s=qe(t)?Qt(t):wt(1),l=t.clientWidth*s.x,a=t.clientHeight*s.y,d=i*s.x,c=o*s.y;return{width:l,height:a,x:d,y:c}}function sd(t,e,n){let o;if(e==="viewport")o=Qg(t,n);else if(e==="document")o=Jg(st(t));else if(lt(e))o=e1(e,n);else{const i=od(t);o={...e,x:e.x-i.x,y:e.y-i.y}}return zo(o)}function ld(t,e){const n=Jt(t);return n===e||!lt(n)||Ho(n)?!1:Oe(n).position==="fixed"||ld(n,e)}function t1(t,e){const n=e.get(t);if(n)return n;let o=Tn(t,[],!1).filter(a=>lt(a)&&rt(a)!=="body"),i=null;const s=Oe(t).position==="fixed";let l=s?Jt(t):t;for(;lt(l)&&!Ho(l);){const a=Oe(l),d=gr(l);!d&&a.position==="fixed"&&(i=null),(s?!d&&!i:!d&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||In(l)&&!d&&ld(t,l))?o=o.filter(u=>u!==l):i=a,l=Jt(l)}return e.set(t,o),o}function n1(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const l=[...n==="clippingAncestors"?t1(e,this._c):[].concat(n),o],a=l[0],d=l.reduce((c,u)=>{const f=sd(e,u,i);return c.top=Lt(f.top,c.top),c.right=Zt(f.right,c.right),c.bottom=Zt(f.bottom,c.bottom),c.left=Lt(f.left,c.left),c},sd(e,a,i));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function o1(t){const{width:e,height:n}=nd(t);return{width:e,height:n}}function i1(t,e,n){const o=qe(e),i=st(e),s=n==="fixed",l=Ht(t,!0,s,e);let a={scrollLeft:0,scrollTop:0};const d=wt(0);if(o||!o&&!s)if((rt(e)!=="body"||In(i))&&(a=jo(e)),o){const f=Ht(e,!0,s,e);d.x=f.x+e.clientLeft,d.y=f.y+e.clientTop}else i&&(d.x=rd(i));const c=l.left+a.scrollLeft-d.x,u=l.top+a.scrollTop-d.y;return{x:c,y:u,width:l.width,height:l.height}}function ad(t,e){return!qe(t)||Oe(t).position==="fixed"?null:e?e(t):t.offsetParent}function dd(t,e){const n=Be(t);if(!qe(t)||id(t))return n;let o=ad(t,e);for(;o&&Yg(o)&&Oe(o).position==="static";)o=ad(o,e);return o&&(rt(o)==="html"||rt(o)==="body"&&Oe(o).position==="static"&&!gr(o))?n:o||Ug(t)||n}const r1=async function(t){const e=this.getOffsetParent||dd,n=this.getDimensions;return{reference:i1(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,...await n(t.floating)}}};function s1(t){return Oe(t).direction==="rtl"}const l1={convertOffsetParentRelativeRectToViewportRelativeRect:Kg,getDocumentElement:st,getClippingRect:n1,getOffsetParent:dd,getElementRects:r1,getClientRects:Zg,getDimensions:o1,getScale:Qt,isElement:lt,isRTL:s1};function a1(t,e){let n=null,o;const i=st(t);function s(){var a;clearTimeout(o),(a=n)==null||a.disconnect(),n=null}function l(a,d){a===void 0&&(a=!1),d===void 0&&(d=1),s();const{left:c,top:u,width:f,height:h}=t.getBoundingClientRect();if(a||e(),!f||!h)return;const p=Io(u),m=Io(i.clientWidth-(c+f)),g=Io(i.clientHeight-(u+h)),y=Io(c),$={rootMargin:-p+"px "+-m+"px "+-g+"px "+-y+"px",threshold:Lt(0,Zt(1,d))||1};let x=!0;function S(C){const V=C[0].intersectionRatio;if(V!==d){if(!x)return l();V?l(!1,V):o=setTimeout(()=>{l(!1,1e-7)},100)}x=!1}try{n=new IntersectionObserver(S,{...$,root:i.ownerDocument})}catch{n=new IntersectionObserver(S,$)}n.observe(t)}return l(!0),s}function Ln(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:d=!1}=o,c=br(t),u=i||s?[...c?Tn(c):[],...Tn(e)]:[];u.forEach(b=>{i&&b.addEventListener("scroll",n,{passive:!0}),s&&b.addEventListener("resize",n)});const f=c&&a?a1(c,n):null;let h=-1,p=null;l&&(p=new ResizeObserver(b=>{let[$]=b;$&&$.target===c&&p&&(p.unobserve(e),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var x;(x=p)==null||x.observe(e)})),n()}),c&&!d&&p.observe(c),p.observe(e));let m,g=d?Ht(t):null;d&&y();function y(){const b=Ht(t);g&&(b.x!==g.x||b.y!==g.y||b.width!==g.width||b.height!==g.height)&&n(),g=b,m=requestAnimationFrame(y)}return n(),()=>{var b;u.forEach($=>{i&&$.removeEventListener("scroll",n),s&&$.removeEventListener("resize",n)}),f==null||f(),(b=p)==null||b.disconnect(),p=null,d&&cancelAnimationFrame(m)}}const d1=Wg,zn=Hg,c1=zg,u1=(t,e,n)=>{const o=new Map,i={platform:l1,...n},s={...i.platform,_c:o};return Lg(t,e,{...i,platform:s})};function f1(t){return t!=null&&typeof t=="object"&&"$el"in t}function $r(t){if(f1(t)){const e=t.$el;return mr(e)&&rt(e)==="#comment"?null:e}return t}function cd(t){return{name:"arrow",options:t,fn(e){const n=$r(r.unref(t.element));return n==null?{}:c1({element:n,padding:t.padding}).fn(e)}}}function ud(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function fd(t,e){const n=ud(t);return Math.round(e*n)/n}function Hn(t,e,n){n===void 0&&(n={});const o=n.whileElementsMounted,i=r.computed(()=>{var E;return(E=r.unref(n.open))!=null?E:!0}),s=r.computed(()=>r.unref(n.middleware)),l=r.computed(()=>{var E;return(E=r.unref(n.placement))!=null?E:"bottom"}),a=r.computed(()=>{var E;return(E=r.unref(n.strategy))!=null?E:"absolute"}),d=r.computed(()=>{var E;return(E=r.unref(n.transform))!=null?E:!0}),c=r.computed(()=>$r(t.value)),u=r.computed(()=>$r(e.value)),f=r.ref(0),h=r.ref(0),p=r.ref(a.value),m=r.ref(l.value),g=r.shallowRef({}),y=r.ref(!1),b=r.computed(()=>{const E={position:p.value,left:"0",top:"0"};if(!u.value)return E;const F=fd(u.value,f.value),N=fd(u.value,h.value);return d.value?{...E,transform:"translate("+F+"px, "+N+"px)",...ud(u.value)>=1.5&&{willChange:"transform"}}:{position:p.value,left:F+"px",top:N+"px"}});let $;function x(){c.value==null||u.value==null||u1(c.value,u.value,{middleware:s.value,placement:l.value,strategy:a.value}).then(E=>{f.value=E.x,h.value=E.y,p.value=E.strategy,m.value=E.placement,g.value=E.middlewareData,y.value=!0})}function S(){typeof $=="function"&&($(),$=void 0)}function C(){if(S(),o===void 0){x();return}if(c.value!=null&&u.value!=null){$=o(c.value,u.value,x);return}}function V(){i.value||(y.value=!1)}return r.watch([s,l,a],x,{flush:"sync"}),r.watch([c,u],C,{flush:"sync"}),r.watch(i,V,{flush:"sync"}),r.getCurrentScope()&&r.onScopeDispose(S),{x:r.shallowReadonly(f),y:r.shallowReadonly(h),strategy:r.shallowReadonly(p),placement:r.shallowReadonly(m),middlewareData:r.shallowReadonly(g),isPositioned:r.shallowReadonly(y),floatingStyles:b,update:x}}const hd=r.defineComponent({__name:"FmTooltip",props:{variant:{default:"plain"},placement:{default:"top"},hideArrow:{type:Boolean,default:!1},content:{default:""},disabled:{type:Boolean,default:!1}},setup(t){const e=t,n=r.ref(null),o=r.ref(null),i=r.ref(null),{floatingStyles:s,middlewareData:l,placement:a}=Hn(n,o,{whileElementsMounted:Ln,placement:e.placement,middleware:[zn(),On({mainAxis:6}),cd({element:i})]}),d=r.ref(!1),c=r.ref(0),u=r.ref(0),f=()=>{e.disabled||(clearTimeout(u.value),c.value=window.setTimeout(()=>{d.value=!0},250))},h=()=>{e.disabled||(clearTimeout(c.value),u.value=window.setTimeout(()=>d.value=!1,250))},p=()=>{clearTimeout(u.value),d.value=!0},m=r.computed(()=>{var y,b,$,x;const g={top:"bottom",right:"left",bottom:"top",left:"right"}[a.value];return{left:((y=l.value.arrow)==null?void 0:y.x)!=null?`${(b=l.value.arrow)==null?void 0:b.x}px`:"",top:(($=l.value.arrow)==null?void 0:$.y)!=null?`${(x=l.value.arrow)==null?void 0:x.y}px`:"",[g]:"-3px"}});return(g,y)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{ref_key:"referenceEl",ref:n,class:r.normalizeClass(["cursor-pointer flex items-center justify-center relative w-max",{"cursor-not-allowed pointer-events-none":g.disabled}]),onPointermove:y[0]||(y[0]=b=>{b.pointerType!=="touch"&&f()}),onPointerleave:h,onPointerdown:h,onPointerup:h},[r.renderSlot(g.$slots,"default")],34),(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[d.value&&!g.disabled?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"tooltipContent",ref:o,class:r.normalizeClass(["fm-shadow-light-300 max-w-[240px] px-16 py-12 rounded-lg",{"bg-fm-color-neutral-black text-fm-color-typo-white fm-typo-body-sm-400":g.variant==="plain","bg-fm-color-neutral-white text-fm-color-typo-secondary fm-typo-body-md-400":g.variant==="rich"}]),style:r.normalizeStyle(r.unref(s)),onMouseenter:p,onMouseleave:h},[r.renderSlot(g.$slots,"content",{},()=>[r.createTextVNode(r.toDisplayString(g.content),1)]),r.withDirectives(r.createElementVNode("div",{ref_key:"arrowEl",ref:i,class:r.normalizeClass(["absolute h-8 rotate-45 rounded-[2px] w-8",{"bg-fm-color-neutral-black":g.variant==="plain","bg-fm-color-neutral-white":g.variant==="rich"}]),style:r.normalizeStyle(m.value)},null,6),[[r.vShow,!g.hideArrow]])],38)):r.createCommentVNode("",!0)]))]))}}),en=r.defineComponent({__name:"FmLabel",props:{label:{default:""},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},optional:{type:Boolean,default:!1},info:{default:""}},setup(t){return(e,n)=>e.label||e.$slots.default?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["fm-typo-body-lg-400 flex gap-4",e.disabled?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary",{"items-center":e.info}])},[r.renderSlot(e.$slots,"default",{},()=>[r.createElementVNode("span",null,r.toDisplayString(e.label),1),e.required?(r.openBlock(),r.createElementBlock("span",{key:0,class:r.normalizeClass(["fm-typo-body-lg-700",e.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-error"])}," * ",2)):r.createCommentVNode("",!0),e.optional?(r.openBlock(),r.createElementBlock("span",{key:1,class:r.normalizeClass(["fm-typo-body-md-400",e.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-tertiary"])}," (optional) ",2)):r.createCommentVNode("",!0),e.info?(r.openBlock(),r.createBlock(hd,{key:2,placement:"top",content:e.info,disabled:e.disabled},{default:r.withCtx(()=>[r.createVNode(j,{name:"info",size:"sm",class:r.normalizeClass(["fm-typo-body-md-400",e.disabled?"text-fm-color-typo-disabled":"text-fm-color-neutral-gray-300"])},null,8,["class"])]),_:1},8,["content","disabled"])):r.createCommentVNode("",!0)])],2)):r.createCommentVNode("",!0)}});function pd(t,e){const n=r.ref([]);function o(){const s=[];if(e.value&&e.value.length>0)for(const l of e.value){const d=(typeof l=="function"?l:()=>l)(t.value);d!==!0&&s.push(d)}return n.value=s,n.value}function i(){n.value=[]}return{validate:o,resetValidation:i,errorMessages:n}}function md(t,e=null,n=null){let o=null;const i=Z(t,"modelValue"),s=r.ref(!0),l=r.inject(ys,null),{validate:a,resetValidation:d,errorMessages:c}=pd(i,r.toRef(()=>t.rules)),u=(f=n)=>{s.value=!0,d(),f&&typeof f=="function"&&f(),i.value=e};return r.onMounted(()=>{l&&(o=l.register({validate:a,resetValidation:d,resetValue:u}))}),r.onUnmounted(()=>{l&&l.unregister(o)}),r.watch(()=>i.value,()=>{s.value=!1,i.value!==e&&a()}),r.watch(()=>t.focused,f=>{s.value=!1,f||a()}),{validate:a,resetValidation:d,errorMessages:c,resetValue:u,isPristine:s}}function jn(){const t=r.ref(!1);function e(){t.value=!0}function n(){t.value=!1}return{focus:e,blur:n,isFocused:t}}const h1={key:1,class:"flex items-center justify-between"},Ve=r.defineComponent({__name:"FmFormGroup",props:{modelValue:{},rules:{default:()=>[]},focused:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},label:{default:""},required:{type:Boolean,default:!1},optional:{type:Boolean,default:!1},info:{default:""},helperText:{default:""},helperState:{default:"none"},tag:{default:"label"}},setup(t){const e=t,{errorMessages:n,isPristine:o}=md(e),{focus:i,blur:s}=jn(),l=r.computed(()=>({label:e.label,disabled:e.disabled,required:e.required,optional:e.optional,info:e.info})),a=r.computed(()=>({text:e.helperText,disabled:e.disabled,state:e.helperState,errorMessages:n.value})),d=r.computed(()=>({isPristine:o,invalid:n.value.length>0}));return(c,u)=>(r.openBlock(),r.createBlock(e.tag,{class:"flex flex-col gap-4",onClick:r.unref(i),onBlur:r.unref(s)},{default:r.withCtx(()=>[c.label||c.$slots.label?(r.openBlock(),r.createBlock(en,r.normalizeProps(r.mergeProps({key:0},l.value)),{default:r.withCtx(()=>[r.renderSlot(c.$slots,"label")]),_:3},16)):r.createCommentVNode("",!0),r.renderSlot(c.$slots,"default",r.normalizeProps(r.guardReactiveProps(d.value))),a.value.text||a.value.errorMessages.length>0||c.$slots["helper-text"]||c.$slots["helper-append"]?(r.openBlock(),r.createElementBlock("div",h1,[r.createVNode(Xa,r.normalizeProps(r.guardReactiveProps(a.value)),{default:r.withCtx(()=>[r.renderSlot(c.$slots,"helper-text")]),_:3},16),r.renderSlot(c.$slots,"helper-append")])):r.createCommentVNode("",!0)]),_:3},8,["onClick","onBlur"]))}}),Ct=K(r.defineComponent({__name:"FmMenu",props:{placement:{default:"bottom-start"},disabled:{type:Boolean,default:!1},trigger:{default:"click"},closeOnClick:{type:Boolean,default:!0},width:{default:void 0},maxHeight:{default:408},inPopover:{type:Boolean,default:!1}},emits:["menu-changed"],setup(t,{emit:e}){const n=t,o=e,i=r.ref([]);let s;const l=r.ref(),a=r.ref(!1),d=r.ref(!1),c=r.inject(ws,null),u=r.ref(null),f=r.ref(null),{floatingStyles:h}=Hn(u,f,{middleware:[On({mainAxis:c?8:4,crossAxis:c?-12:0}),zn(),d1()],placement:n.placement,whileElementsMounted:Ln}),p=()=>{C.value==="hover"&&g()},m=()=>{if(!n.disabled){if(a.value){a.value=!1;return}C.value==="click"&&g()}},g=()=>{d.value=!0,a.value=!0,c==null||c.setChildId(s)},y=()=>{C.value==="hover"&&(d.value=!1)},b=()=>{d.value=!0},$=()=>{d.value=!1},x=()=>{n.closeOnClick&&setTimeout(()=>{a.value=!1,c==null||c.closeParent()},10)},S=r.computed(()=>({mouseInMenu:d}));r.provide(ws,{register({injectProps:E}){return i.value=[...i.value,{injectProps:E}],i.value.length},closeParent(){c?(a.value=!1,c==null||c.closeParent()):a.value=C.value!=="click"},setChildId(E){l.value=E},mouseInChildId:l,trigger:n.trigger}),r.provide(Cs,{handleContentClick:x}),r.onMounted(()=>{window.addEventListener("click",V),c&&(s=c.register({injectProps:S}))}),r.onUnmounted(()=>{window.removeEventListener("click",V)}),r.watch(()=>c==null?void 0:c.mouseInChildId.value,E=>{E!==s&&(a.value=!1)});const C=r.computed(()=>c===null?n.trigger:"hover");r.watch(()=>a.value,()=>o("menu-changed",a.value));const V=E=>{if(!a.value)return;const F=E.path||E.composedPath();for(const N of F)if(N==u.value||N==f.value)return;a.value=!1};return(E,F)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{ref_key:"anchorEl",ref:u,class:"fm-menu",onMouseenter:p,onMouseleave:y,onClick:m},[r.renderSlot(E.$slots,"menu-button",{},void 0,!0)],544),(r.openBlock(),r.createBlock(r.Teleport,{to:"body",disabled:!!r.unref(c)||E.inPopover},[a.value?(r.openBlock(),r.createElementBlock("div",{key:0,id:"fm-menu",ref_key:"menuEl",ref:f,class:"block z-[99]",style:r.normalizeStyle(r.unref(h)),onMouseenter:b,onMouseleave:$},[r.renderSlot(E.$slots,"menu-wrapper",{},()=>[r.createElementVNode("div",{class:"fm-menu__wrapper",style:r.normalizeStyle({"max-height":`${E.maxHeight}px`,width:`${E.width}px`})},[r.renderSlot(E.$slots,"default",{},void 0,!0)],4)],!0)],36)):r.createCommentVNode("",!0)],8,["disabled"]))]))}}),[["__scopeId","data-v-c8a870c6"]]),p1={class:"fm-menu-item--left"},m1={key:0,class:"fm-menu-item--right"},Pe=K(r.defineComponent({__name:"FmMenuItem",props:{modelValue:{type:Boolean,default:!1},selectable:{type:Boolean,default:!0},label:{default:""},sublabel:{default:""},icon:{default:""},expandable:{type:Boolean,default:!1},hasCheckbox:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=r.ref(!1),i=r.inject(Cs,null),s=e,l=c=>{c.preventDefault(),i==null||i.handleContentClick(),!(n.disabled||!n.selectable)&&s("update:modelValue",!n.modelValue)},a=()=>{s("update:modelValue",n.modelValue)};function d(c){o.value=c}return(c,u)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{class:r.normalizeClass({"fm-menu-item":!0,"fm-menu-item--selected":c.modelValue&&!c.hasCheckbox,"fm-menu-item--disabled":c.disabled,"hover:bg-fm-color-opacity-sm":!c.disabled&&!c.modelValue&&c.selectable}),onClick:l,onMousedown:u[1]||(u[1]=()=>d(!0)),onMouseup:u[2]||(u[2]=()=>d(!1)),onMouseleave:u[3]||(u[3]=()=>d(!1))},[r.createElementVNode("div",p1,[r.renderSlot(c.$slots,"prepend",{},()=>[!c.hasCheckbox&&c.icon?(r.openBlock(),r.createBlock(j,{key:0,name:c.icon,size:"md",outline:!o.value&&!c.modelValue,color:c.disabled?"#C7C7CC":c.modelValue?"#FF7823":"#1C1C1E"},null,8,["name","outline","color"])):r.createCommentVNode("",!0),c.hasCheckbox?(r.openBlock(),r.createBlock(Ga,{key:1,"model-value":c.modelValue,name:"something",label:"",sublabel:"",value:"",indeterminate:!1,disabled:c.disabled,"onUpdate:modelValue":a,onClick:u[0]||(u[0]=f=>f.preventDefault())},null,8,["model-value","disabled"])):r.createCommentVNode("",!0)],!0),r.renderSlot(c.$slots,"label",{},()=>[r.createElementVNode("div",null,[r.createElementVNode("div",{class:r.normalizeClass(`fm-typo-body-lg-400 ${c.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-primary"}`)},r.toDisplayString(c.label),3),c.sublabel?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(`fm-typo-body-md-400 ${c.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-secondary"}`)},r.toDisplayString(c.sublabel),3)):r.createCommentVNode("",!0)])],!0)]),r.renderSlot(c.$slots,"append",{},void 0,!0),c.expandable?(r.openBlock(),r.createElementBlock("div",m1,[r.createVNode(j,{name:"chevron_right",size:"md",color:c.disabled?"#C7C7CC":"#AEAEB2"},null,8,["color"])])):r.createCommentVNode("",!0)],34)]))}}),[["__scopeId","data-v-cb553369"]]),g1={class:"fm-typo-body-lg-700"},y1={class:"h-[264px] overflow-y-auto w-[160px]"},tn=r.defineComponent({__name:"FmDateRangeYearMonthPicker",props:{modelValue:{},picker:{},min:{},max:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=e,i=r.ref(!1),s=r.computed(()=>{const d=R(n.min).startOf("year"),u=R(n.max).startOf("year").diff(d,"year"),f=[];for(let h=0;h<=u;h++)f.push(d.add(h,"year"));return f}),l=d=>{const c=R(n.min).startOf("month"),u=R(n.max).startOf("month");return d.get("year")===c.get("year")?d.startOf("month").isAfter(c)||d.get("month")===c.get("month"):d.get("year")===u.get("year")?d.startOf("month").isBefore(u)||d.get("month")===u.get("month"):!0},a=d=>{const c=R(n.min).startOf("month"),u=R(n.max).startOf("month");if(c.get("year")===d.get("year")){o("update:modelValue",c);return}if(u.get("year")===d.get("year")){o("update:modelValue",u);return}o("update:modelValue",d)};return(d,c)=>(r.openBlock(),r.createBlock(Ct,{trigger:"click","in-popover":"",onMenuChanged:c[0]||(c[0]=u=>i.value=u)},{"menu-button":r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass(["flex gap-4 h-24 items-center px-8 rounded-sm",i.value?"text-fm-color-primary":"hover:bg-fm-color-neutral-gray-100"])},[r.createElementVNode("div",g1,[d.picker==="month"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createTextVNode(r.toDisplayString(d.modelValue.format("MMMM")),1)],64)):r.createCommentVNode("",!0),d.picker==="year"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createTextVNode(r.toDisplayString(d.modelValue.format("YYYY")),1)],64)):r.createCommentVNode("",!0)]),r.createVNode(j,{name:i.value?"expand_less":"expand_more",size:"md",color:"black"},null,8,["name"])],2)]),default:r.withCtx(()=>[r.createElementVNode("ul",y1,[d.picker==="month"?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(Array.from(Array(12),(u,f)=>d.modelValue.month(f)),u=>(r.openBlock(),r.createElementBlock("li",{key:u.format("MMMM")},[r.createVNode(Pe,{disabled:!l(u),"model-value":d.modelValue.format("MMMM")===u.format("MMMM"),label:u.format("MMMM"),"onUpdate:modelValue":f=>o("update:modelValue",u)},null,8,["disabled","model-value","label","onUpdate:modelValue"])]))),128)):r.createCommentVNode("",!0),d.picker==="year"?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:1},r.renderList(s.value,u=>(r.openBlock(),r.createElementBlock("li",{key:u.format("YYYY")},[r.createVNode(Pe,{"model-value":d.modelValue.format("YYYY")===u.format("YYYY"),label:u.format("YYYY"),"onUpdate:modelValue":f=>a(u)},null,8,["model-value","label","onUpdate:modelValue"])]))),128)):r.createCommentVNode("",!0)])]),_:1}))}}),b1={mounted:(t,e)=>{t.clickOutsideEvent=n=>{const o=e.arg?document.querySelectorAll(`#${e.arg}`):[];!(t==n.target||t.contains(n.target))&&!Array.from(o).some(i=>i&&(n.target==i||i.contains(n.target)))&&e.value(n,t)},document.addEventListener("click",t.clickOutsideEvent)},unmounted:t=>{document.removeEventListener("click",t.clickOutsideEvent)}},_r=K(r.defineComponent({__name:"FmPopover",props:{showPopover:{type:Boolean,default:!1},placement:{default:"bottom-start"},disabled:{type:Boolean,default:!1}},emits:["popover-changed"],setup(t,{expose:e,emit:n}){const o=t,i=r.ref(o.showPopover),s=r.ref(null),l=r.ref(null),{floatingStyles:a}=Hn(s,l,{middleware:[On(4),zn()],placement:o.placement,whileElementsMounted:Ln}),d=n,c=()=>{i.value||(i.value=!0,d("popover-changed",i.value))},u=()=>{i.value&&(i.value=!1,d("popover-changed",i.value))};e({show:c,hide:u});const f=()=>{o.disabled||(i.value=!i.value,d("popover-changed",i.value))};r.watch(()=>o.showPopover,p=>i.value=p);const h=()=>{i.value&&(i.value=!1,d("popover-changed",i.value))};return(p,m)=>r.withDirectives((r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{ref_key:"anchorEl",ref:s,class:"fm-popover",onClick:f},[r.renderSlot(p.$slots,"popover-button",{},void 0,!0)],512),i.value?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"popoverEl",ref:l,class:"fm-popover__content",style:r.normalizeStyle(r.unref(a))},[r.renderSlot(p.$slots,"default",{show:c,hide:u},void 0,!0)],4)):r.createCommentVNode("",!0)])),[[r.unref(b1),h]])}}),[["__scopeId","data-v-1246b82b"]]),A="YYYY-MM-DD",wr=t=>{const e=[],n=t.endOf("month"),o=t.month();let i=t.startOf("week"),s=[];for(;i.isBefore(n.endOf("week"));)i.day()===0&&s.length>0&&(e.push(s),s=[]),s.push({date:i,isCurrentMonth:i.month()===o}),i=i.add(1,"day");return s.length>0&&e.push(s),e},gd=(t,e)=>{const n=R().startOf("month"),o=R(t).diff(n,"month"),i=R(e).diff(n,"month"),s=[];for(let l=o-1;l<=i;l++){const a=[],d=n.add(l,"month").startOf("month"),c=d.endOf("month"),u=d.month();let f=d.startOf("week"),h=[];for(;f.isBefore(c.endOf("week"));)f.day()===0&&h.length>0&&(a.push(h),h=[]),h.push({id:d.format("MM-YYYY"),date:f,isCurrentMonth:f.month()===u}),f=f.add(1,"day");h.length>0&&a.push(h),s.push({id:d.format("YYYY-MM-DD"),matrix:a,height:64+48*(c.endOf("week").diff(d.startOf("week"),"week")+1)})}return s},Wn=Array.from(Array(7),(t,e)=>R().day(e).format("ddd")),$1={class:"p-12 w-[360px]"},_1={class:"w-max"},w1={class:"flex h-40 justify-between px-4 py-8"},C1={class:"flex gap-4 items-center"},x1={class:"flex gap-4 items-center justify-center"},k1={class:"fm-calendar__row fm-typo-body-lg-400 text-fm-color-typo-tertiary"},S1=["onClick"],v1={class:"flex gap-8 h-72 items-center justify-end py-16 w-full"},M1=K(r.defineComponent({__name:"FmDatePickerDesktop",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},min:{default:()=>R().subtract(50,"year").format(A)},max:{default:()=>R().add(25,"year").format(A)},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=Z(e,"modelValue"),o=r.ref(R(n.value,A)),i=r.ref(!1),s=r.ref(R().startOf("month")),l=r.ref(!1),a=r.ref(!1),d=h=>{o.value=h},c=()=>{n.value=o.value.format(A),setTimeout(()=>{i.value=!1},0)},u=()=>{o.value=n.value?R(n.value):null,i.value=!1},f=h=>{l.value=!1,a.value=!1,s.value=h};return(h,p)=>(r.openBlock(),r.createBlock(Ve,{modelValue:r.unref(n),"onUpdate:modelValue":p[5]||(p[5]=m=>r.isRef(n)?n.value=m:null),label:h.label,disabled:h.disabled,required:h.labelMark==="required",optional:h.labelMark==="optional",info:h.labelInfo,rules:h.rules,focused:i.value,"helper-text":h.helperText,"helper-state":h.helperState,tag:"div"},{label:r.withCtx(()=>[r.renderSlot(h.$slots,"label",{},void 0,!0)]),default:r.withCtx(({invalid:m})=>[r.createVNode(_r,{"show-popover":i.value,disabled:h.disabled,onPopoverChanged:p[4]||(p[4]=g=>i.value=g)},{"popover-button":r.withCtx(()=>[r.createVNode(ge,{focused:i.value,invalid:m,"show-valid-border":h.showValidBorder,"prepend-icon":"calendar_month","icon-outlined":!i.value},{prepend:r.withCtx(()=>[r.renderSlot(h.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[r.renderSlot(h.$slots,"append",{},void 0,!0)]),default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-body-lg-400",[e.disabled?"text-fm-color-typo-disabled":r.unref(n)?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},r.toDisplayString(r.unref(n)?r.unref(R)(r.unref(n)).format("D MMM YYYY"):"DD MM YYYY"),3)]),_:2},1032,["focused","invalid","show-valid-border","icon-outlined"])]),default:r.withCtx(()=>[r.createElementVNode("div",$1,[r.createElementVNode("div",_1,[r.createElementVNode("div",w1,[r.createElementVNode("div",C1,[r.createVNode(tn,{min:h.min,max:h.max,picker:"month","model-value":s.value,"onUpdate:modelValue":p[0]||(p[0]=g=>f(g))},null,8,["min","max","model-value"]),r.createVNode(tn,{min:h.min,max:h.max,picker:"year","model-value":s.value,"onUpdate:modelValue":p[1]||(p[1]=g=>f(g))},null,8,["min","max","model-value"])]),r.createElementVNode("div",x1,[r.createVNode(j,{class:"cursor-pointer",name:"chevron_left",outline:!1,color:"#1C1C1E",onClick:p[2]||(p[2]=()=>f(s.value.subtract(1,"month")))}),r.createVNode(j,{class:"cursor-pointer",name:"chevron_right",outline:!1,color:"#1C1C1E",onClick:p[3]||(p[3]=()=>f(s.value.add(1,"month")))})])]),r.createElementVNode("div",null,[r.createElementVNode("div",k1,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(Wn),g=>(r.openBlock(),r.createElementBlock("div",{key:g,class:"fm-calendar__cell"},r.toDisplayString(g),1))),128))]),r.createElementVNode("div",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(wr)(s.value),(g,y)=>(r.openBlock(),r.createElementBlock("div",{key:y,class:"fm-calendar__row fm-typo-body-lg-400"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(g,b=>(r.openBlock(),r.createElementBlock("div",{key:b.date.date(),class:"fm-calendar__cell"},[b.isCurrentMonth?(r.openBlock(),r.createElementBlock("button",{key:0,class:r.normalizeClass(["fm-calendar__cell__button",{"fm-calendar__cell__button--selected":b.date.isSame(o.value)}]),type:"button",onClick:()=>d(b.date)},r.toDisplayString(b.date.date()),11,S1)):r.createCommentVNode("",!0)]))),128))]))),128))])])]),r.createElementVNode("div",v1,[r.createVNode(J,{label:"Cancel",size:"md",variant:"tertiary",onClick:u}),r.createVNode(J,{label:"Apply",size:"md",variant:"primary",disabled:!o.value,onClick:c},null,8,["disabled"])])])]),_:2},1032,["show-popover","disabled"])]),"helper-text":r.withCtx(()=>[r.renderSlot(h.$slots,"helper-text",{},void 0,!0)]),_:3},8,["modelValue","label","disabled","required","optional","info","rules","focused","helper-text","helper-state"]))}}),[["__scopeId","data-v-b06e47a1"]]),yd=t=>(r.pushScopeId("data-v-32a48831"),t=t(),r.popScopeId(),t),D1={class:"bg-fm-color-neutral-white fixed flex flex-col h-screen left-0 top-0 w-screen"},E1={class:"flex flex-col gap-8 pb-8 pt-24 px-16"},B1={class:"flex items-center justify-center"},V1={class:"flex fm-typo-body-lg-400 h-48 justify-center text-fm-color-typo-tertiary w-[336px]"},P1={class:"flex h-[calc(100%-208px)] justify-center relative w-full"},R1=yd(()=>r.createElementVNode("div",{class:"absolute bg-gradient-to-b from-[#1C1C1E14] h-32 left-0 pointer-events-none to-80% w-full z-10"},null,-1)),F1={id:"wrapper",class:"h-full relative w-[336px]"},N1=["id"],A1={class:"flex gap-4 items-center"},O1={class:"fm-typo-body-lg-700"},I1={class:"fm-typo-body-lg-700"},T1=["onClick"],L1={class:"absolute bg-fm-color-neutral-white bottom-0 left-0 p-16 w-full"},z1=yd(()=>r.createElementVNode("div",{class:"-top-32 absolute bg-gradient-to-t from-[#1C1C1E14] h-32 left-0 pointer-events-none to-80% w-full z-10"},null,-1)),H1={class:"flex gap-8 items-center justify-end w-full"},bd=K(r.defineComponent({__name:"FmDatePickerMobile",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},min:{default:()=>R().subtract(50,"year").format(A)},max:{default:()=>R().add(25,"year").format(A)},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=gd(e.min,e.max),o=Z(e,"modelValue"),i=R(),s=r.ref(R(o.value,A)),l=r.ref(!1),a=r.ref(),d=p=>{s.value=p},c=()=>{o.value=s.value.format(A),setTimeout(()=>{l.value=!1},0)},u=()=>{s.value=o.value?R(o.value):null,l.value=!1},f=()=>{l.value=!0,setTimeout(()=>{a.value.scrollToItem(h(i.startOf("month")))},0)},h=p=>n.findIndex(m=>m.id===p.startOf("month").format(A));return(p,m)=>{const g=r.resolveComponent("RecycleScroller");return r.openBlock(),r.createBlock(Ve,{modelValue:r.unref(o),"onUpdate:modelValue":m[0]||(m[0]=y=>r.isRef(o)?o.value=y:null),label:p.label,disabled:p.disabled,required:p.labelMark==="required",optional:p.labelMark==="optional",info:p.labelInfo,rules:p.rules,focused:l.value,"helper-text":p.helperText,"helper-state":p.helperState,tag:"div"},{label:r.withCtx(()=>[r.renderSlot(p.$slots,"label",{},void 0,!0)]),default:r.withCtx(({invalid:y})=>[r.createVNode(ge,{class:"cursor-pointer",focused:l.value,invalid:y,"show-valid-border":p.showValidBorder,"prepend-icon":"calendar_month","icon-outlined":"",onClick:f},{prepend:r.withCtx(()=>[r.renderSlot(p.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[r.renderSlot(p.$slots,"append",{},void 0,!0)]),default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-body-lg-400",[e.disabled?"text-fm-color-typo-disabled":r.unref(o)?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},r.toDisplayString(r.unref(o)?r.unref(R)(r.unref(o)).format("D MMM YYYY"):"DD MM YYYY"),3)]),_:2},1032,["focused","invalid","show-valid-border"]),l.value?(r.openBlock(),r.createBlock(r.Teleport,{key:0,to:"body"},[r.createElementVNode("div",D1,[r.createElementVNode("div",E1,[r.createVNode(ge,{focused:l.value,invalid:y,"show-valid-border":p.showValidBorder,"prepend-icon":"calendar_month","icon-outlined":""},{prepend:r.withCtx(()=>[r.renderSlot(p.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[r.renderSlot(p.$slots,"append",{},void 0,!0)]),default:r.withCtx(()=>{var b,$;return[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-body-lg-400",[e.disabled?"text-fm-color-typo-disabled":(b=s.value)!=null&&b.isValid()?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},r.toDisplayString(($=s.value)!=null&&$.isValid()?r.unref(R)(s.value).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:2},1032,["focused","invalid","show-valid-border"]),r.createElementVNode("div",B1,[r.createElementVNode("div",V1,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(Wn),b=>(r.openBlock(),r.createElementBlock("div",{key:b,class:"fm-calendar__cell"},r.toDisplayString(b),1))),128))])])]),r.createElementVNode("div",P1,[R1,r.createElementVNode("div",F1,[r.createVNode(g,{ref_key:"scroller",ref:a,class:"h-full no-scrollbar overflow-y-auto w-full",items:r.unref(n),"item-size":null,buffer:200,"key-field":"id","size-field":"height"},{default:r.withCtx(({item:b})=>[r.createElementVNode("div",{id:b.id,class:"flex gap-16 h-40 items-center justify-start px-4 py-8"},[r.createElementVNode("div",A1,[r.createElementVNode("div",O1,r.toDisplayString(r.unref(R)(b.id).format("MMMM")),1),r.createElementVNode("div",I1,r.toDisplayString(r.unref(R)(b.id).format("YYYY")),1)])],8,N1),r.createElementVNode("div",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(b.matrix,($,x)=>(r.openBlock(),r.createElementBlock("div",{key:x,class:"fm-calendar__row fm-typo-body-lg-400"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList($,S=>(r.openBlock(),r.createElementBlock("div",{key:S.date.date(),class:"fm-calendar__cell"},[S.isCurrentMonth?(r.openBlock(),r.createElementBlock("button",{key:0,class:r.normalizeClass(["fm-calendar__cell__button",{"fm-calendar__cell__button--selected":S.date.isSame(s.value),"fm-typo-body-lg-700":S.date.isSame(r.unref(i),"day")}]),type:"button",onClick:()=>d(S.date)},r.toDisplayString(S.date.date()),11,T1)):r.createCommentVNode("",!0)]))),128))]))),128))])]),_:1},8,["items"])])]),r.createElementVNode("div",L1,[z1,r.createElementVNode("div",H1,[r.createVNode(J,{label:"Cancel",size:"md",variant:"tertiary",onClick:u}),r.createVNode(J,{label:"Apply",size:"md",variant:"primary",disabled:!s.value,onClick:c},null,8,["disabled"])])])])])):r.createCommentVNode("",!0)]),"helper-text":r.withCtx(()=>[r.renderSlot(p.$slots,"helper-text",{},void 0,!0)]),_:3},8,["modelValue","label","disabled","required","optional","info","rules","focused","helper-text","helper-state"])}}}),[["__scopeId","data-v-32a48831"]]),j1=r.defineComponent({__name:"FmDatePicker",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},min:{default:()=>R().subtract(50,"year").format(A)},max:{default:()=>R().add(25,"year").format(A)},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const{breakpoints:e}=Ao(),n=t,o=Z(n,"modelValue");return(i,s)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.unref(e).md||r.unref(e).lg?(r.openBlock(),r.createBlock(M1,r.mergeProps({key:0},n,{modelValue:r.unref(o),"onUpdate:modelValue":s[0]||(s[0]=l=>r.isRef(o)?o.value=l:null)}),null,16,["modelValue"])):r.createCommentVNode("",!0),r.unref(e).xs||r.unref(e).sm?(r.openBlock(),r.createBlock(bd,r.mergeProps({key:1},n,{modelValue:r.unref(o),"onUpdate:modelValue":s[1]||(s[1]=l=>r.isRef(o)?o.value=l:null)}),null,16,["modelValue"])):r.createCommentVNode("",!0)],64))}}),$d=r.defineComponent({__name:"FmMenuDivider",props:{vertical:{type:Boolean,default:!1},inset:{type:Boolean,default:!1}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["border-fm-color-neutral-gray-100 rounded-sm",[e.vertical?"border-l -my-4 mx-4":"border-t -mx-4 my-4",{"my-0":e.inset&&e.vertical,"mx-0":e.inset&&!e.vertical}]])},null,2))}}),W1={class:"cursor-pointer fm-switch__container"},Y1={key:0},U1={class:"fm-typo-body-lg-400"},G1={key:0,class:"fm-color-typo-secondary fm-typo-body-md-400"},q1={class:"fm-switch__input--container"},X1=["checked","value","disabled"],K1={key:1},Z1={class:"fm-typo-body-lg-400"},J1={key:0,class:"fm-color-typo-secondary fm-typo-body-md-400"},Cr=K(r.defineComponent({__name:"FmSwitch",props:{modelValue:{type:Boolean},label:{default:""},sublabel:{default:""},labelPlacement:{default:"left"},value:{default:null},disabled:{type:Boolean,default:!1},showIcon:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t){const e=t,n=Z(e,"modelValue"),o=()=>{e.disabled||(n.value=!n.value)};return(i,s)=>(r.openBlock(),r.createElementBlock("label",W1,[i.labelPlacement==="left"?(r.openBlock(),r.createElementBlock("div",Y1,[r.renderSlot(i.$slots,"label",{},void 0,!0),r.createElementVNode("div",U1,r.toDisplayString(i.label),1),i.sublabel?(r.openBlock(),r.createElementBlock("div",G1,r.toDisplayString(i.sublabel),1)):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),r.createElementVNode("div",q1,[r.createElementVNode("input",{checked:r.unref(n),class:"fm-switch__input--btn",type:"checkbox",value:i.value,disabled:i.disabled,onClick:o},null,8,X1),r.createElementVNode("div",{class:r.normalizeClass({"fm-switch__input--knob":!0,"fm-switch__input--knob--show-icon":i.showIcon})},[i.showIcon?(r.openBlock(),r.createBlock(j,{key:0,name:r.unref(n)?"check":"close",size:"sm",color:i.disabled?"#C7C7CC":r.unref(n)?"#1C1C1E":"#FFFFFF"},null,8,["name","color"])):r.createCommentVNode("",!0)],2)]),i.labelPlacement==="right"?(r.openBlock(),r.createElementBlock("div",K1,[r.createElementVNode("div",Z1,r.toDisplayString(i.label),1),i.sublabel?(r.openBlock(),r.createElementBlock("div",J1,r.toDisplayString(i.sublabel),1)):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-0fcef85e"]]);var pe=(t=>(t.PrecedingPeriod="preceding_period",t.PrecedingWeek="preceding_week",t.PrecedingMonth="preceding_month",t.Custom="custom",t))(pe||{});const _d=t=>(r.pushScopeId("data-v-85f70ca7"),t=t(),r.popScopeId(),t),Q1={key:0,class:"flex gap-4 items-center relative w-full"},e2={class:"flex flex-col gap-4 w-full"},t2=_d(()=>r.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)),n2={class:"flex flex-col gap-4 w-full"},o2={key:1,class:"flex flex-col gap-4 w-full"},i2={class:"flex gap-4 p-12"},r2={key:0,class:"max-h-[549px] overflow-y-auto w-[171px]"},s2={key:0,class:"px-8"},l2={key:1,class:"-my-12 border-fm-color-neutral-gray-100 border-l shrink-0"},a2={class:"flex flex-col gap-24"},d2={key:0,class:"flex gap-4 items-center px-12 w-full"},c2={class:"flex flex-col gap-4 w-full"},u2=_d(()=>r.createElementVNode("div",{class:"fm-typo-body-lg-400 h-6 mt-7 shrink-0 text-center text-fm-color-typo-primary w-6"}," - ",-1)),f2={class:"flex flex-col gap-4 w-full"},h2={class:"flex gap-24"},p2={class:"w-max"},m2={class:"flex gap-16 h-40 items-center justify-start px-4 py-8"},g2={class:"flex gap-4 items-center"},y2={class:"fm-calendar__row fm-typo-body-lg-400 text-fm-color-typo-tertiary"},b2={class:"h-[288px]"},$2={key:0,class:"fm-calendar__cell__button--today"},_2=["onClick","onMouseover"],w2={class:"w-max"},C2={class:"flex gap-16 h-10 items-center justify-end px-4 py-8"},x2={class:"flex gap-4 items-center"},k2={class:"fm-calendar__row fm-typo-body-lg-400 text-fm-color-typo-tertiary"},S2={key:0,class:"fm-calendar__cell__button--today"},v2=["onClick","onMouseover"],M2={class:"flex gap-8 h-72 items-center justify-end py-16 w-full"},D2=K(r.defineComponent({__name:"FmDateRangePickerDesktop",props:{modelValue:{},startLabel:{default:"Start date"},endLabel:{default:"End date"},disabled:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},showPredefinedRange:{type:Boolean,default:!1},predefinedRange:{default:()=>[{label:"Today",value:{startDate:R().format(A),endDate:R().format(A)}},{label:"Yesterday",value:{startDate:R().subtract(1,"day").format(A),endDate:R().subtract(1,"day").format(A)}},{label:"This week",value:{startDate:R().startOf("week").format(A),endDate:R().endOf("week").format(A)}},{label:"Last week",value:{startDate:R().subtract(1,"week").startOf("week").format(A),endDate:R().subtract(1,"week").endOf("week").format(A)}},{label:"Last 7 days",value:{startDate:R().subtract(7,"day").format(A),endDate:R().subtract(1,"day").format(A)}},{label:"This month",value:{startDate:R().startOf("month").format(A),endDate:R().endOf("month").format(A)}},{label:"Last month",value:{startDate:R().subtract(1,"month").startOf("month").format(A),endDate:R().subtract(1,"month").endOf("month").format(A)}},{label:"This year",value:{startDate:R().startOf("year").format(A),endDate:R().endOf("year").format(A)}}]},compare:{type:Boolean,default:!1},compareLabel:{default:"Date"},min:{default:()=>R().subtract(50,"year").format(A)},max:{default:()=>R().add(25,"year").format(A)},labelMark:{default:"none"},labelInfo:{default:""},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){var N,P;const e=[{id:pe.PrecedingPeriod,label:"Preceding period",sublabel:"",action:()=>{d.value=pe.PrecedingPeriod;const w=s.value;if(w[0].startDate&&w[0].endDate){const _=w[0].startDate.diff(w[0].endDate,"day");w[1]={startDate:w[0].startDate.subtract(+(1-_),"day"),endDate:w[0].startDate.subtract(1,"day")}}}},{id:pe.PrecedingWeek,label:"Preceding period",sublabel:"Match day of week",action:()=>{d.value=pe.PrecedingWeek;const w=s.value;if(w[0].startDate&&w[0].endDate){let _=w[0].endDate.diff(w[0].startDate,"week");_===0&&(_+=1),w[1]={startDate:w[0].startDate.subtract(_,"week"),endDate:w[0].endDate.subtract(_,"week")}}}},{id:pe.PrecedingMonth,label:"Preceding period",sublabel:"Match day of month",action:()=>{d.value=pe.PrecedingMonth;const w=s.value;if(w[0].startDate&&w[0].endDate){let _=w[0].endDate.diff(w[0].startDate,"month");_===0&&(_+=1),w[1]={startDate:w[0].startDate.subtract(_,"month"),endDate:w[0].endDate.subtract(_,"month")}}}},{id:pe.Custom,label:"Custom",sublabel:"",action:()=>{d.value=pe.Custom}}],n=t,o=R(),i=Z(n,"modelValue"),s=r.ref([{startDate:(N=i.value)!=null&&N.startDate?R(i.value.startDate,A):null,endDate:(P=i.value)!=null&&P.endDate?R(i.value.endDate,A):null},{startDate:null,endDate:null}]),l=r.ref(!1),a=r.ref(!1),d=r.ref(""),c=r.ref(R().startOf("month")),u=r.ref(R().startOf("month").add(1,"month")),f=r.ref(""),h=r.ref(null);let p=0;const m=w=>{var _;if(f.value="",s.value[p].startDate&&s.value[p].endDate){p===1&&(s.value=s.value.map(()=>({startDate:null,endDate:null})),p=0),s.value[0]={startDate:w,endDate:null};return}else if(!s.value[p].startDate&&!s.value[p].endDate)s.value[p].startDate=w;else{if(w.isBefore(s.value[p].startDate)){const D=s.value[p].startDate;s.value[p]={startDate:w,endDate:D}}else s.value[p].endDate=w;a.value&&(p=1),e.find(D=>D.id===d.value)||(d.value=pe.Custom)}(_=e.find(D=>D.id===d.value))==null||_.action()},g=()=>{a.value?i.value=s.value.map(w=>({startDate:w.startDate.format(A),endDate:w.endDate.format(A)})):i.value={startDate:s.value[0].startDate.format(A),endDate:s.value[0].endDate.format(A)},setTimeout(()=>{l.value=!1})},y=()=>{var w,_;Array.isArray(i.value)?s.value=i.value:s.value[0]={startDate:(w=i.value)!=null&&w.startDate?R(i.value.startDate,A):null,endDate:(_=i.value)!=null&&_.endDate?R(i.value.endDate,A):null},l.value=!1},b=(w,_)=>{w==="left"?(c.value=_,u.value=_.add(1,"month")):w==="right"&&(u.value=_,c.value=_.subtract(1,"month"))},$=w=>{const _=s.value[0].startDate,D=s.value[0].endDate,v=s.value[1].startDate,M=s.value[1].endDate,k=h.value,B=_==null?void 0:_.isSame(w),O=D==null?void 0:D.isSame(w),L=v==null?void 0:v.isSame(w),T=M==null?void 0:M.isSame(w),W=k==null?void 0:k.isSame(w),U=B&&D&&!(B&&O)||_&&!D&&B&&(k==null?void 0:k.isAfter(_))||_&&!D&&W&&(k==null?void 0:k.isBefore(_)),G=L&&M&&!(L&&T)||v&&!M&&L&&(k==null?void 0:k.isAfter(v))||v&&!M&&W&&(k==null?void 0:k.isBefore(v)),Q=O&&_&&!(B&&O)||_&&!D&&B&&(k==null?void 0:k.isBefore(_))||_&&!D&&W&&(k==null?void 0:k.isAfter(_)),le=T&&v&&!(L&&T)||v&&!M&&L&&(k==null?void 0:k.isBefore(v))||v&&!M&&W&&(k==null?void 0:k.isAfter(v)),fe=B&&O||B&&!D,Fe=L&&T||L&&!M,je=_&&(D||k)&&D?w.isAfter(_)&&w.isBefore(D):w.isAfter(k)&&w.isBefore(_)||w.isBefore(k)&&w.isAfter(_),Ne=v&&(M||k)&&M?w.isAfter(v)&&w.isBefore(M):w.isAfter(k)&&w.isBefore(v)||w.isBefore(k)&&w.isAfter(v),te=(xe,ke,We)=>xe&&ke&&We?xe.isAfter(ke,"day")&&xe.isBefore(We,"day"):!1,se=()=>{if(s.value.filter(ke=>{var We;for(const jt in ke)if((We=ke[jt])!=null&&We.isSame(w,"day"))return!0;return!1}).length===2)return"bg-fm-color-system-success-400 before:bg-fm-color-system-success-100";if(B&&O&&(te(w,v,M)||te(w,v,k)))return"bg-fm-color-primary before:bg-fm-color-system-info-100 after:bg-fm-color-system-info-100";if(L&&T&&(te(w,_,D)||te(w,_,k)))return"bg-fm-color-system-info-300 before:bg-fm-color-system-warning-100 after:bg-fm-color-system-warning-100";if(U||Q)return te(w,v,M)||te(w,v,k)?"bg-fm-color-primary before:bg-fm-color-system-success-100 after:bg-fm-color-system-info-100":"bg-fm-color-primary before:bg-fm-color-system-warning-100";if(G||le)return te(w,_,D)||te(w,_,k)?"bg-fm-color-system-info-300 before:bg-fm-color-system-success-100 after:bg-fm-color-system-warning-100":"bg-fm-color-system-info-300 before:bg-fm-color-system-info-100";if(fe)return"bg-fm-color-primary";if(Fe)return"bg-fm-color-system-info-300";if(te(w,_,D)&&(te(w,v,M)||te(w,v,k)))return"bg-fm-color-system-success-100";if(je)return"bg-fm-color-system-warning-100";if(Ne)return"bg-fm-color-system-info-100"};return{[`fm-calendar__cell__button--selected-start ${se()}`]:U||G,[`fm-calendar__cell__button--selected-end ${se()}`]:Q||le,[`fm-calendar__cell__button--selected-between ${se()}`]:je||Ne,[`fm-calendar__cell__button--selected ${se()}`]:fe||Fe}},x=w=>{const _=s.value;if(_[0].startDate&&!_[0].endDate||_[1].startDate&&!_[1].endDate){h.value=w;return}h.value=null},S=w=>{f.value=w.label,s.value[0]={startDate:R(w.value.startDate,A),endDate:R(w.value.endDate,A)}},C=r.computed(()=>a.value?!s.value.every(w=>w.startDate&&w.endDate):!(s.value[0].startDate&&s.value[0].endDate)),V=w=>{d.value="",a.value=w,s.value=Array.from(Array(2),()=>({startDate:null,endDate:null})),p=0},E=r.computed(()=>{if(!i.value)return{startDate:"DD MM YYYY",endDate:"DD MM YYYY"};const w=a.value&&Array.isArray(i.value)?i.value[0].startDate:i.value.startDate,_=a.value&&Array.isArray(i.value)?i.value[0].endDate:i.value.endDate;return{startDate:w?R(w).format("D MMM YYYY"):"DD MM YYYY",endDate:_?R(_).format("D MMM YYYY"):"DD MM YYYY"}}),F=r.computed(()=>{const w=a.value&&Array.isArray(i.value)?i.value[1].startDate:null,_=a.value&&Array.isArray(i.value)?i.value[1].endDate:null;return w&&_?`Compared: ${R(w).format("D MMM YYYY")} - ${R(_).format("D MMM YYYY")}`:""});return r.watch(()=>i.value,()=>{var w,_;a.value?s.value=i.value.map(D=>({startDate:D!=null&&D.startDate?R(D.startDate,A):null,endDate:D!=null&&D.endDate?R(D.endDate,A):null})):s.value[0]={startDate:(w=i.value)!=null&&w.startDate?R(i.value.startDate,A):null,endDate:(_=i.value)!=null&&_.endDate?R(i.value.endDate,A):null}}),(w,_)=>(r.openBlock(),r.createBlock(Ve,{modelValue:r.unref(i),"onUpdate:modelValue":_[8]||(_[8]=D=>r.isRef(i)?i.value=D:null),disabled:w.disabled,rules:w.rules,focused:l.value,"helper-text":a.value?F.value:w.helperText,"helper-state":w.helperState,tag:"div"},{default:r.withCtx(({invalid:D})=>[r.createVNode(_r,{"show-popover":l.value,disabled:w.disabled,onPopoverChanged:_[7]||(_[7]=v=>l.value=v)},{"popover-button":r.withCtx(()=>[w.compare?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",Q1,[r.createElementVNode("label",e2,[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-body-lg-400",[n.disabled?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"]])},r.toDisplayString(n.startLabel),3),r.createVNode(ge,{class:r.normalizeClass(w.disabled?"cursor-not-allowed":"cursor-pointer"),focused:l.value,invalid:D,"show-valid-border":w.showValidBorder,"prepend-icon":"calendar_month","icon-outlined":!l.value},{prepend:r.withCtx(()=>[r.renderSlot(w.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[r.renderSlot(w.$slots,"append",{},void 0,!0)]),default:r.withCtx(()=>{var v,M;return[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-body-lg-400",[n.disabled?"text-fm-color-typo-disabled":(v=r.unref(i))!=null&&v.startDate?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},r.toDisplayString((M=r.unref(i))!=null&&M.startDate?r.unref(R)(r.unref(i).startDate).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:2},1032,["class","focused","invalid","show-valid-border","icon-outlined"])]),t2,r.createElementVNode("label",n2,[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-body-lg-400",[n.disabled?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"]])},r.toDisplayString(n.endLabel),3),r.createVNode(ge,{class:r.normalizeClass(w.disabled?"cursor-not-allowed":"cursor-pointer"),focused:l.value,invalid:D,"show-valid-border":w.showValidBorder,"prepend-icon":"calendar_month","icon-outlined":!l.value},{prepend:r.withCtx(()=>[r.renderSlot(w.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[r.renderSlot(w.$slots,"append",{},void 0,!0)]),default:r.withCtx(()=>{var v,M;return[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-body-lg-400",[n.disabled?"text-fm-color-typo-disabled":(v=r.unref(i))!=null&&v.endDate?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},r.toDisplayString((M=r.unref(i))!=null&&M.endDate?r.unref(R)(r.unref(i).endDate).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:2},1032,["class","focused","invalid","show-valid-border","icon-outlined"])])])),w.compare?(r.openBlock(),r.createElementBlock("label",o2,[r.createVNode(en,{label:w.compareLabel},null,8,["label"]),r.createVNode(ge,{class:r.normalizeClass(w.disabled?"cursor-not-allowed":"cursor-pointer"),focused:l.value,invalid:D,"show-valid-border":w.showValidBorder},{prepend:r.withCtx(()=>[r.renderSlot(w.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[r.renderSlot(w.$slots,"append",{},void 0,!0)]),default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-body-lg-400",[n.disabled?"text-fm-color-typo-disabled":E.value.startDate!=="DD MM YYYY"?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},r.toDisplayString(E.value.startDate)+" - "+r.toDisplayString(E.value.endDate),3)]),_:2},1032,["class","focused","invalid","show-valid-border"])])):r.createCommentVNode("",!0)]),default:r.withCtx(()=>[r.createElementVNode("div",i2,[w.showPredefinedRange?(r.openBlock(),r.createElementBlock("div",r2,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(w.predefinedRange,(v,M)=>(r.openBlock(),r.createBlock(Pe,{key:M,label:v.label,"model-value":f.value===v.label,selectable:"",onClick:k=>S(v)},null,8,["label","model-value","onClick"]))),128)),w.compare&&w.predefinedRange?(r.openBlock(),r.createElementBlock("div",s2,[r.createVNode($d,{inset:""})])):r.createCommentVNode("",!0),w.compare?(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createVNode(Cr,{"model-value":a.value,class:"justify-between px-12",label:"Compare","onUpdate:modelValue":_[0]||(_[0]=v=>V(v))},null,8,["model-value"]),a.value?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},r.renderList(e,(v,M)=>r.createVNode(Pe,{key:M,label:v.label,sublabel:v.sublabel,"model-value":d.value===v.id,selectable:"",onClick:k=>v.action()},null,8,["label","sublabel","model-value","onClick"])),64)):r.createCommentVNode("",!0)],64)):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),w.showPredefinedRange?(r.openBlock(),r.createElementBlock("div",l2)):r.createCommentVNode("",!0),r.createElementVNode("div",{class:r.normalizeClass({"pl-4":w.showPredefinedRange})},[r.createElementVNode("div",a2,[a.value?(r.openBlock(),r.createElementBlock("div",d2,[r.createElementVNode("label",c2,[r.createVNode(en,{label:"Custom"}),r.createVNode(ge,{focused:!1},{default:r.withCtx(()=>{var v,M;return[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-body-lg-400",[(v=s.value[0])!=null&&v.startDate&&((M=s.value[0])!=null&&M.endDate)?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},r.toDisplayString(s.value[0].startDate!==null?s.value[0].startDate.format("D MMM YYYY"):"DD MM YYYY")+" - "+r.toDisplayString(s.value[0].endDate!==null?s.value[0].endDate.format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:1})]),u2,r.createElementVNode("label",f2,[r.createVNode(en,{label:"Compare"}),r.createVNode(ge,{focused:!1},{default:r.withCtx(()=>{var v,M;return[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-body-lg-400",[(v=s.value[1])!=null&&v.startDate&&((M=s.value[1])!=null&&M.endDate)?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},r.toDisplayString(s.value[1].startDate!==null?s.value[1].startDate.format("D MMM YYYY"):"DD MM YYYY")+" - "+r.toDisplayString(s.value[1].endDate!==null?s.value[1].endDate.format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:1})])])):r.createCommentVNode("",!0),r.createElementVNode("div",h2,[r.createElementVNode("div",p2,[r.createElementVNode("div",m2,[r.createElementVNode("div",g2,[r.createVNode(j,{class:"cursor-pointer select-none",name:"chevron_left",outline:!1,color:"#1C1C1E",onClick:_[1]||(_[1]=()=>b("left",c.value.subtract(1,"month")))}),r.createVNode(tn,{min:w.min,max:w.max,picker:"month","model-value":c.value,"onUpdate:modelValue":_[2]||(_[2]=v=>b("left",v))},null,8,["min","max","model-value"]),r.createVNode(tn,{min:w.min,max:w.max,picker:"year","model-value":c.value,"onUpdate:modelValue":_[3]||(_[3]=v=>b("left",v))},null,8,["min","max","model-value"])])]),r.createElementVNode("div",null,[r.createElementVNode("div",y2,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(Wn),v=>(r.openBlock(),r.createElementBlock("div",{key:v,class:"fm-calendar__cell"},r.toDisplayString(v),1))),128))]),r.createElementVNode("div",b2,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(wr)(c.value),(v,M)=>(r.openBlock(),r.createElementBlock("div",{key:M,class:"fm-calendar__row fm-typo-body-lg-400"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(v,k=>(r.openBlock(),r.createElementBlock("div",{key:k.date.date(),class:"fm-calendar__cell"},[k.date.isSame(r.unref(o),"day")&&k.isCurrentMonth?(r.openBlock(),r.createElementBlock("div",$2)):r.createCommentVNode("",!0),k.isCurrentMonth?(r.openBlock(),r.createElementBlock("button",{key:1,class:r.normalizeClass(["fm-calendar__cell__button",[$(k.date),{"fm-typo-body-lg-700":k.date.isSame(r.unref(o),"day")}]]),type:"button",onClick:()=>m(k.date),onMouseover:B=>x(k.date)},r.toDisplayString(k.date.date()),43,_2)):r.createCommentVNode("",!0)]))),128))]))),128))])])]),r.createElementVNode("div",w2,[r.createElementVNode("div",C2,[r.createElementVNode("div",x2,[r.createVNode(tn,{min:w.min,max:w.max,picker:"month","model-value":u.value,"onUpdate:modelValue":_[4]||(_[4]=v=>b("right",v))},null,8,["min","max","model-value"]),r.createVNode(tn,{min:w.min,max:w.max,picker:"year","model-value":u.value,"onUpdate:modelValue":_[5]||(_[5]=v=>b("right",v))},null,8,["min","max","model-value"])]),r.createVNode(j,{class:"cursor-pointer select-none",name:"chevron_right",outline:!1,color:"#1C1C1E",onClick:_[6]||(_[6]=()=>b("left",c.value.add(1,"month")))})]),r.createElementVNode("div",null,[r.createElementVNode("div",k2,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(Wn),v=>(r.openBlock(),r.createElementBlock("div",{key:v,class:"fm-calendar__cell"},r.toDisplayString(v),1))),128))]),r.createElementVNode("div",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(wr)(u.value),(v,M)=>(r.openBlock(),r.createElementBlock("div",{key:M,class:"fm-calendar__row fm-typo-body-lg-400"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(v,k=>(r.openBlock(),r.createElementBlock("div",{key:k.date.date(),class:"fm-calendar__cell"},[k.date.isSame(r.unref(o),"day")&&k.isCurrentMonth?(r.openBlock(),r.createElementBlock("div",S2)):r.createCommentVNode("",!0),k.isCurrentMonth?(r.openBlock(),r.createElementBlock("button",{key:1,class:r.normalizeClass(["fm-calendar__cell__button",[$(k.date),{"fm-typo-body-lg-700":k.date.isSame(r.unref(o),"day")}]]),type:"button",onClick:()=>m(k.date),onMouseover:B=>x(k.date)},r.toDisplayString(k.date.date()),43,v2)):r.createCommentVNode("",!0)]))),128))]))),128))])])])])]),r.createElementVNode("div",M2,[r.createVNode(J,{label:"Cancel",size:"md",variant:"tertiary",onClick:y}),r.createVNode(J,{label:"Apply",size:"md",variant:"primary",disabled:C.value,onClick:g},null,8,["disabled"])])],2)])]),_:2},1032,["show-popover","disabled"])]),"helper-text":r.withCtx(()=>[r.renderSlot(w.$slots,"helper-text",{},void 0,!0)]),_:3},8,["modelValue","disabled","rules","focused","helper-text","helper-state"]))}}),[["__scopeId","data-v-85f70ca7"]]),E2={class:"flex flex-col gap-4"},B2={class:"flex flex-col gap-4 justify-center"},Wo=K(r.defineComponent({__name:"FmSelect",props:{modelValue:{},items:{},multiselect:{type:Boolean,default:!1},placement:{default:"bottom-start"},placeholder:{default:"Select item"},showValidBorder:{type:Boolean,default:!1},maxHeight:{default:408},width:{default:void 0},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue","dropdown-changed"],setup(t,{emit:e}){const n=t,o=e,i=Z(n,"modelValue"),s=r.ref(!1),l=(h,p)=>{if(n.multiselect){let m=[];h?m=i.value.length===0?[p]:n.items.filter(g=>i.value.some(y=>_e(g.value,y)||_e(g.value,p.value))):m=n.items.filter(g=>i.value.some(y=>_e(g.value,y)&&!_e(g.value,p.value))),i.value=m.map(g=>g.value)}else i.value=p.value,setTimeout(()=>{s.value=!1},0)},a=h=>{const p=[...i.value].filter((m,g)=>g!==h);i.value=p},d=r.computed(()=>n.multiselect?n.items.filter(h=>r.toRaw(i.value).some(p=>_e(p,h.value))):n.items.filter(h=>_e(i.value,h.value))),c=r.computed(()=>n.items.filter(h=>i.value.some(p=>_e(h.value,p))).map(h=>({label:h.label}))),u=r.computed(()=>{var h;return n.multiselect?n.placeholder:((h=n.items.find(p=>_e(p.value,i.value)))==null?void 0:h.label)??n.placeholder}),f=r.computed(()=>n.multiselect?i.value.length!==0:n.items.some(h=>_e(h.value,i.value)));return(h,p)=>(r.openBlock(),r.createElementBlock("div",E2,[r.createVNode(Ve,{modelValue:r.unref(i),"onUpdate:modelValue":p[1]||(p[1]=m=>r.isRef(i)?i.value=m:null),label:h.label,disabled:h.disabled,required:h.labelMark==="required",optional:h.labelMark==="optional",info:h.labelInfo,rules:h.rules,focused:s.value,"helper-text":h.helperText,"helper-state":h.helperState},r.createSlots({default:r.withCtx(({invalid:m})=>[r.createVNode(Ct,{"show-menu":s.value,disabled:h.disabled,placement:h.placement,"close-on-click":!h.multiselect,onMenuChanged:p[0]||(p[0]=g=>{s.value=g,o("dropdown-changed",s.value)})},{"menu-button":r.withCtx(()=>[r.createVNode(ge,{class:r.normalizeClass(h.disabled?"cursor-not-allowed":"cursor-pointer"),focused:s.value,invalid:m,"show-valid-border":h.showValidBorder},{prepend:r.withCtx(()=>[r.renderSlot(h.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[r.createVNode(j,{name:s.value?"expand_less":"expand_more",size:"md",color:h.disabled?"#C7C7CC":"black"},null,8,["name","color"])]),default:r.withCtx(()=>[r.renderSlot(h.$slots,"default",{},()=>[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-body-lg-400",[n.disabled?"text-fm-color-typo-disabled":f.value?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},r.toDisplayString(u.value),3)],!0)]),_:2},1032,["class","focused","invalid","show-valid-border"])]),"menu-wrapper":r.withCtx(()=>[r.createElementVNode("div",{class:"fm-select__menu__wrapper",style:r.normalizeStyle({"max-height":`${h.maxHeight}px`,width:`${h.width}px`})},[r.renderSlot(h.$slots,"menu-wrapper",{handleItemChange:(g,y)=>l(g,y)},()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(h.items,g=>(r.openBlock(),r.createBlock(Pe,{key:g.value,"has-checkbox":h.multiselect,label:g.label,value:g.value,"model-value":d.value.some(y=>r.unref(_e)(y.value,g.value)),"onUpdate:modelValue":y=>l(y,g)},null,8,["has-checkbox","label","value","model-value","onUpdate:modelValue"]))),128))],!0)],4)]),_:2},1032,["show-menu","disabled","placement","close-on-click"])]),_:2},[h.label||h.$slots.label?{name:"label",fn:r.withCtx(()=>[r.renderSlot(h.$slots,"label",{},void 0,!0)]),key:"0"}:void 0,h.helperText||h.$slots["helper-text"]?{name:"helper-text",fn:r.withCtx(()=>[r.renderSlot(h.$slots,"helper-text",{},void 0,!0)]),key:"1"}:void 0]),1032,["modelValue","label","disabled","required","optional","info","rules","focused","helper-text","helper-state"]),r.createElementVNode("div",B2,[h.multiselect&&d.value.length>0?(r.openBlock(),r.createBlock(vs,{key:0,items:c.value,removable:"",disabled:h.disabled,onChipClosed:a},null,8,["items","disabled"])):r.createCommentVNode("",!0)])]))}}),[["__scopeId","data-v-3ea6d291"]]),V2={key:0,class:"flex gap-4 items-center relative w-full"},P2={class:"flex flex-col gap-4 w-full"},R2=r.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),F2={class:"flex flex-col gap-4 w-full"},N2={key:1,class:"flex flex-col gap-4 w-full"},xr=r.defineComponent({__name:"FmDateRangePickerField",props:{modelValue:{},analytic:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},invalid:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},isComparing:{type:Boolean,default:!1},startLabel:{default:"Start date"},endLabel:{default:"End date"},compareLabel:{default:"Date"}},setup(t){const e=t,n=r.computed(()=>{if(!e.modelValue)return{startDate:"DD MM YYYY",endDate:"DD MM YYYY"};const o=e.isComparing&&Array.isArray(e.modelValue)?e.modelValue[0].startDate:e.modelValue.startDate,i=e.isComparing&&Array.isArray(e.modelValue)?e.modelValue[0].endDate:e.modelValue.endDate;return{startDate:o?R(o).format("D MMM YYYY"):"DD MM YYYY",endDate:i?R(i).format("D MMM YYYY"):"DD MM YYYY"}});return(o,i)=>(r.openBlock(),r.createElementBlock("div",null,[o.analytic?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",V2,[r.createElementVNode("label",P2,[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-body-lg-400",[o.disabled?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"]])},r.toDisplayString(o.startLabel),3),r.createVNode(ge,{class:r.normalizeClass(o.disabled?"cursor-not-allowed":"cursor-pointer"),focused:o.focused,invalid:o.invalid,"show-valid-border":o.showValidBorder,"prepend-icon":"calendar_month","icon-outlined":""},{prepend:r.withCtx(()=>[r.renderSlot(o.$slots,"prepend")]),append:r.withCtx(()=>[r.renderSlot(o.$slots,"append")]),default:r.withCtx(()=>{var s,l;return[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-body-lg-400",[o.disabled?"text-fm-color-typo-disabled":(s=o.modelValue)!=null&&s.startDate?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},r.toDisplayString((l=o.modelValue)!=null&&l.startDate?r.unref(R)(o.modelValue.startDate).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:3},8,["class","focused","invalid","show-valid-border"])]),R2,r.createElementVNode("label",F2,[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-body-lg-400",[o.disabled?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"]])},r.toDisplayString(o.endLabel),3),r.createVNode(ge,{class:r.normalizeClass(o.disabled?"cursor-not-allowed":"cursor-pointer"),focused:o.focused,invalid:o.invalid,"show-valid-border":o.showValidBorder,"prepend-icon":"calendar_month","icon-outlined":""},{prepend:r.withCtx(()=>[r.renderSlot(o.$slots,"prepend")]),append:r.withCtx(()=>[r.renderSlot(o.$slots,"append")]),default:r.withCtx(()=>{var s,l;return[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-body-lg-400",[o.disabled?"text-fm-color-typo-disabled":(s=o.modelValue)!=null&&s.endDate?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},r.toDisplayString((l=o.modelValue)!=null&&l.endDate?r.unref(R)(o.modelValue.endDate).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:3},8,["class","focused","invalid","show-valid-border"])])])),o.analytic?(r.openBlock(),r.createElementBlock("label",N2,[r.createVNode(en,{label:o.compareLabel},null,8,["label"]),r.createVNode(ge,{class:r.normalizeClass(o.disabled?"cursor-not-allowed":"cursor-pointer"),focused:o.focused,invalid:o.invalid,"show-valid-border":o.showValidBorder,"prepend-icon":"calendar_month","icon-outlined":""},{prepend:r.withCtx(()=>[r.renderSlot(o.$slots,"prepend")]),append:r.withCtx(()=>[r.renderSlot(o.$slots,"append")]),default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-body-lg-400",[o.disabled?"text-fm-color-typo-disabled":n.value.startDate!=="DD MM YYYY"?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},r.toDisplayString(n.value.startDate)+" - "+r.toDisplayString(n.value.endDate),3)]),_:3},8,["class","focused","invalid","show-valid-border"])])):r.createCommentVNode("",!0)]))}}),wd=t=>(r.pushScopeId("data-v-eed99d1e"),t=t(),r.popScopeId(),t),A2={class:"bg-fm-color-neutral-white fixed flex flex-col h-screen left-0 top-0 w-screen"},O2={class:"flex flex-col gap-8 pb-8 pt-24 px-16"},I2={class:"flex items-center justify-center"},T2={class:"flex fm-typo-body-lg-400 h-48 justify-center text-fm-color-typo-tertiary w-[336px]"},L2={class:"flex h-[calc(100%-172px)] justify-center relative w-full"},z2=wd(()=>r.createElementVNode("div",{class:"absolute bg-gradient-to-b from-[#1C1C1E14] h-32 left-0 pointer-events-none to-80% w-full z-10"},null,-1)),H2={id:"wrapper",class:"h-full relative w-[336px]"},j2=["id"],W2={class:"flex gap-4 items-center"},Y2={class:"fm-typo-body-lg-700"},U2={class:"fm-typo-body-lg-700"},G2=["onClick","onMouseover"],q2={class:"absolute bg-fm-color-neutral-white bottom-0 left-0 p-16 w-full"},X2=wd(()=>r.createElementVNode("div",{class:"-top-32 absolute bg-gradient-to-t from-[#1C1C1E14] h-32 left-0 pointer-events-none to-80% w-full z-10"},null,-1)),K2={class:"flex gap-8 items-center justify-end w-full"},Cd=K(r.defineComponent({__name:"FmDateRangePickerMobile",props:{modelValue:{},startLabel:{default:"Start date"},endLabel:{default:"End date"},disabled:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},showPredefinedRange:{type:Boolean,default:!1},predefinedRange:{default:()=>[{label:"Today",value:{startDate:R().format(A),endDate:R().format(A)}},{label:"Yesterday",value:{startDate:R().subtract(1,"day").format(A),endDate:R().subtract(1,"day").format(A)}},{label:"This week",value:{startDate:R().startOf("week").format(A),endDate:R().endOf("week").format(A)}},{label:"Last week",value:{startDate:R().subtract(1,"week").startOf("week").format(A),endDate:R().subtract(1,"week").endOf("week").format(A)}},{label:"Last 7 days",value:{startDate:R().subtract(7,"day").format(A),endDate:R().subtract(1,"day").format(A)}},{label:"This month",value:{startDate:R().startOf("month").format(A),endDate:R().endOf("month").format(A)}},{label:"Last month",value:{startDate:R().subtract(1,"month").startOf("month").format(A),endDate:R().subtract(1,"month").endOf("month").format(A)}},{label:"This year",value:{startDate:R().startOf("year").format(A),endDate:R().endOf("year").format(A)}}]},compare:{type:Boolean,default:!1},compareLabel:{default:"Date"},min:{default:()=>R().subtract(50,"year").format(A)},max:{default:()=>R().add(25,"year").format(A)},labelMark:{default:"none"},labelInfo:{default:""},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){var P,w;const e=r.ref(),n=[{id:pe.PrecedingPeriod,label:"Preceding period",sublabel:"",action:()=>{u.value=pe.PrecedingPeriod;const _=a.value;if(_[0].startDate&&_[0].endDate){const D=_[0].startDate.diff(_[0].endDate,"day");_[1]={startDate:_[0].startDate.subtract(+(1-D),"day"),endDate:_[0].startDate.subtract(1,"day")}}}},{id:pe.PrecedingWeek,label:"Preceding period",sublabel:"Match day of week",action:()=>{u.value=pe.PrecedingWeek;const _=a.value;if(_[0].startDate&&_[0].endDate){let D=_[0].endDate.diff(_[0].startDate,"week");D===0&&(D+=1),_[1]={startDate:_[0].startDate.subtract(D,"week"),endDate:_[0].endDate.subtract(D,"week")}}}},{id:pe.PrecedingMonth,label:"Preceding period",sublabel:"Match day of month",action:()=>{u.value=pe.PrecedingMonth;const _=a.value;if(_[0].startDate&&_[0].endDate){let D=_[0].endDate.diff(_[0].startDate,"month");D===0&&(D+=1),_[1]={startDate:_[0].startDate.subtract(D,"month"),endDate:_[0].endDate.subtract(D,"month")}}}},{id:pe.Custom,label:"Custom",sublabel:"",action:()=>{u.value=pe.Custom}}],o=t,i=gd(o.min,o.max),s=R(),l=Z(o,"modelValue"),a=r.ref([{startDate:(P=l.value)!=null&&P.startDate?R(l.value.startDate,A):null,endDate:(w=l.value)!=null&&w.endDate?R(l.value.endDate,A):null},{startDate:null,endDate:null}]),d=r.ref(!1),c=r.ref(!1),u=r.ref(""),f=r.ref(""),h=r.ref(null);let p=0;const m=_=>{var D;if(f.value="",a.value[p].startDate&&a.value[p].endDate){p===1&&(a.value=a.value.map(()=>({startDate:null,endDate:null})),p=0),a.value[0]={startDate:_,endDate:null};return}else if(!a.value[p].startDate&&!a.value[p].endDate)a.value[p].startDate=_;else{if(_.isBefore(a.value[p].startDate)){const v=a.value[p].startDate;a.value[p]={startDate:_,endDate:v}}else a.value[p].endDate=_;c.value&&(p=1),n.find(v=>v.id===u.value)||(u.value=pe.Custom)}(D=n.find(v=>v.id===u.value))==null||D.action()},g=()=>{c.value?l.value=a.value.map(_=>({startDate:_.startDate.format(A),endDate:_.endDate.format(A)})):l.value={startDate:a.value[0].startDate.format(A),endDate:a.value[0].endDate.format(A)},setTimeout(()=>{d.value=!1})},y=()=>{var _,D;Array.isArray(l.value)?a.value=l.value:a.value[0]={startDate:(_=l.value)!=null&&_.startDate?R(l.value.startDate,A):null,endDate:(D=l.value)!=null&&D.endDate?R(l.value.endDate,A):null},d.value=!1},b=_=>{const D=a.value[0].startDate,v=a.value[0].endDate,M=a.value[1].startDate,k=a.value[1].endDate,B=h.value,O=D==null?void 0:D.isSame(_),L=v==null?void 0:v.isSame(_),T=M==null?void 0:M.isSame(_),W=k==null?void 0:k.isSame(_),U=B==null?void 0:B.isSame(_),G=O&&v&&!(O&&L)||D&&!v&&O&&(B==null?void 0:B.isAfter(D))||D&&!v&&U&&(B==null?void 0:B.isBefore(D)),Q=T&&k&&!(T&&W)||M&&!k&&T&&(B==null?void 0:B.isAfter(M))||M&&!k&&U&&(B==null?void 0:B.isBefore(M)),le=L&&D&&!(O&&L)||D&&!v&&O&&(B==null?void 0:B.isBefore(D))||D&&!v&&U&&(B==null?void 0:B.isAfter(D)),fe=W&&M&&!(T&&W)||M&&!k&&T&&(B==null?void 0:B.isBefore(M))||M&&!k&&U&&(B==null?void 0:B.isAfter(M)),Fe=O&&L||O&&!v,je=T&&W||T&&!k,Ne=D&&(v||B)&&v?_.isAfter(D)&&_.isBefore(v):_.isAfter(B)&&_.isBefore(D)||_.isBefore(B)&&_.isAfter(D),te=M&&(k||B)&&k?_.isAfter(M)&&_.isBefore(k):_.isAfter(B)&&_.isBefore(M)||_.isBefore(B)&&_.isAfter(M),se=(ke,We,jt)=>ke&&We&&jt?ke.isAfter(We,"day")&&ke.isBefore(jt,"day"):!1,xe=()=>{if(a.value.filter(We=>{var jt;for(const X4 in We)if((jt=We[X4])!=null&&jt.isSame(_,"day"))return!0;return!1}).length===2)return"bg-fm-color-system-success-400 before:bg-fm-color-system-success-100";if(O&&L&&(se(_,M,k)||se(_,M,B)))return"bg-fm-color-primary before:bg-fm-color-system-info-100 after:bg-fm-color-system-info-100";if(T&&W&&(se(_,D,v)||se(_,D,B)))return"bg-fm-color-system-info-300 before:bg-fm-color-system-warning-100 after:bg-fm-color-system-warning-100";if(G||le)return se(_,M,k)||se(_,M,B)?"bg-fm-color-primary before:bg-fm-color-system-success-100 after:bg-fm-color-system-info-100":"bg-fm-color-primary before:bg-fm-color-system-warning-100";if(Q||fe)return se(_,D,v)||se(_,D,B)?"bg-fm-color-system-info-300 before:bg-fm-color-system-success-100 after:bg-fm-color-system-warning-100":"bg-fm-color-system-info-300 before:bg-fm-color-system-info-100";if(Fe)return"bg-fm-color-primary";if(je)return"bg-fm-color-system-info-300";if(se(_,D,v)&&(se(_,M,k)||se(_,M,B)))return"bg-fm-color-system-success-100";if(Ne)return"bg-fm-color-system-warning-100";if(te)return"bg-fm-color-system-info-100"};return{[`fm-calendar__cell__button--selected-start ${xe()}`]:G||Q,[`fm-calendar__cell__button--selected-end ${xe()}`]:le||fe,[`fm-calendar__cell__button--selected-between ${xe()}`]:Ne||te,[`fm-calendar__cell__button--selected ${xe()}`]:Fe||je}},$=_=>{const D=a.value;if(D[0].startDate&&!D[0].endDate||D[1].startDate&&!D[1].endDate){h.value=_;return}h.value=null},x=_=>{a.value[0]={startDate:R(_.startDate,A),endDate:R(_.endDate,A)}},S=_=>{const D=n.find(v=>v.id===_);D==null||D.action()},C=r.computed(()=>c.value?!a.value.every(_=>_.startDate&&_.endDate):!(a.value[0].startDate&&a.value[0].endDate)),V=_=>{u.value="",c.value=_,a.value=Array.from(Array(2),()=>({startDate:null,endDate:null})),p=0},E=r.computed(()=>{const _=c.value&&Array.isArray(l.value)?l.value[1].startDate:null,D=c.value&&Array.isArray(l.value)?l.value[1].endDate:null;return _&&D?`Compared: ${R(_).format("D MMM YYYY")} - ${R(D).format("D MMM YYYY")}`:""}),F=()=>{d.value=!0,setTimeout(()=>{e.value.scrollToItem(N(s.startOf("month")))},0)},N=_=>i.findIndex(D=>D.id===_.startOf("month").format(A));return r.watch(()=>l.value,()=>{var _,D;c.value?a.value=l.value.map(v=>({startDate:v!=null&&v.startDate?R(v.startDate,A):null,endDate:v!=null&&v.endDate?R(v.endDate,A):null})):a.value[0]={startDate:(_=l.value)!=null&&_.startDate?R(l.value.startDate,A):null,endDate:(D=l.value)!=null&&D.endDate?R(l.value.endDate,A):null}}),(_,D)=>{const v=r.resolveComponent("RecycleScroller");return r.openBlock(),r.createBlock(Ve,{modelValue:r.unref(l),"onUpdate:modelValue":D[3]||(D[3]=M=>r.isRef(l)?l.value=M:null),disabled:_.disabled,rules:_.rules,focused:d.value,"helper-text":c.value?E.value:_.helperText,"helper-state":_.helperState,tag:"div"},{default:r.withCtx(({invalid:M})=>{var k,B,O,L;return[r.createVNode(xr,{"model-value":r.unref(l),analytic:_.compare,disabled:_.disabled,invalid:M,focused:d.value,"show-valid-border":_.showValidBorder,"is-comparing":c.value,"start-label":_.startLabel,"end-label":_.endLabel,"compare-label":_.compareLabel,onClick:F},null,8,["model-value","analytic","disabled","invalid","focused","show-valid-border","is-comparing","start-label","end-label","compare-label"]),d.value?(r.openBlock(),r.createBlock(r.Teleport,{key:0,to:"body"},[r.createElementVNode("div",A2,[r.createElementVNode("div",O2,[_.showPredefinedRange?(r.openBlock(),r.createBlock(Wo,{key:0,items:_.predefinedRange,"model-value":f.value,"onUpdate:modelValue":D[0]||(D[0]=T=>x(T))},null,8,["items","model-value"])):r.createCommentVNode("",!0),r.createVNode(xr,{"model-value":{startDate:((k=a.value[0].startDate)==null?void 0:k.format(r.unref(A)))??null,endDate:((B=a.value[0].endDate)==null?void 0:B.format(r.unref(A)))??null},analytic:_.compare,"is-comparing":c.value,"start-label":_.startLabel,"end-label":_.endLabel,"compare-label":_.compareLabel},null,8,["model-value","analytic","is-comparing","start-label","end-label","compare-label"]),_.compare?(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createVNode(Cr,{"model-value":c.value,"label-placement":"right",label:"Compare","onUpdate:modelValue":D[1]||(D[1]=T=>V(T))},null,8,["model-value"]),c.value&&_.compare?(r.openBlock(),r.createBlock(Wo,{key:0,items:n.map(T=>({label:T.label,sublabel:T.sublabel,value:T.id})),"model-value":u.value,"onUpdate:modelValue":D[2]||(D[2]=T=>S(T))},null,8,["items","model-value"])):r.createCommentVNode("",!0),c.value&&_.compare?(r.openBlock(),r.createBlock(xr,{key:1,"model-value":{startDate:((O=a.value[1].startDate)==null?void 0:O.format(r.unref(A)))??null,endDate:((L=a.value[1].endDate)==null?void 0:L.format(r.unref(A)))??null},analytic:_.compare,"is-comparing":c.value,"start-label":_.startLabel,"end-label":_.endLabel,"compare-label":"Compare: Custom"},null,8,["model-value","analytic","is-comparing","start-label","end-label"])):r.createCommentVNode("",!0)],64)):r.createCommentVNode("",!0),r.createElementVNode("div",I2,[r.createElementVNode("div",T2,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(Wn),T=>(r.openBlock(),r.createElementBlock("div",{key:T,class:"fm-calendar__cell"},r.toDisplayString(T),1))),128))])])]),r.createElementVNode("div",L2,[z2,r.createElementVNode("div",H2,[r.createVNode(v,{ref_key:"scroller",ref:e,class:"h-full no-scrollbar overflow-y-auto w-full",items:r.unref(i),"item-size":null,buffer:200,"key-field":"id","size-field":"height"},{default:r.withCtx(({item:T})=>[r.createElementVNode("div",{id:T.id,class:"flex gap-16 h-40 items-center justify-start px-4 py-8"},[r.createElementVNode("div",W2,[r.createElementVNode("div",Y2,r.toDisplayString(r.unref(R)(T.id).format("MMMM")),1),r.createElementVNode("div",U2,r.toDisplayString(r.unref(R)(T.id).format("YYYY")),1)])],8,j2),r.createElementVNode("div",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(T.matrix,(W,U)=>(r.openBlock(),r.createElementBlock("div",{key:U,class:"fm-calendar__row fm-typo-body-lg-400"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(W,G=>(r.openBlock(),r.createElementBlock("div",{key:G.date.date(),class:"fm-calendar__cell"},[G.isCurrentMonth?(r.openBlock(),r.createElementBlock("button",{key:0,class:r.normalizeClass(["fm-calendar__cell__button",[b(G.date),{"fm-typo-body-lg-700":G.date.isSame(r.unref(s),"day")}]]),type:"button",onClick:()=>m(G.date),onMouseover:Q=>$(G.date)},r.toDisplayString(G.date.date()),43,G2)):r.createCommentVNode("",!0)]))),128))]))),128))])]),_:1},8,["items"])])]),r.createElementVNode("div",q2,[X2,r.createElementVNode("div",K2,[r.createVNode(J,{label:"Cancel",size:"md",variant:"tertiary",onClick:y}),r.createVNode(J,{label:"Apply",size:"md",variant:"primary",disabled:C.value,onClick:g},null,8,["disabled"])])])])])):r.createCommentVNode("",!0)]}),"helper-text":r.withCtx(()=>[r.renderSlot(_.$slots,"helper-text",{},void 0,!0)]),_:3},8,["modelValue","disabled","rules","focused","helper-text","helper-state"])}}}),[["__scopeId","data-v-eed99d1e"]]),Z2=r.defineComponent({__name:"FmDateRangePicker",props:{modelValue:{},startLabel:{default:"Start date"},endLabel:{default:"End date"},disabled:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},showPredefinedRange:{type:Boolean,default:!1},predefinedRange:{default:()=>[{label:"Today",value:{startDate:R().format(A),endDate:R().format(A)}},{label:"Yesterday",value:{startDate:R().subtract(1,"day").format(A),endDate:R().subtract(1,"day").format(A)}},{label:"This week",value:{startDate:R().startOf("week").format(A),endDate:R().endOf("week").format(A)}},{label:"Last week",value:{startDate:R().subtract(1,"week").startOf("week").format(A),endDate:R().subtract(1,"week").endOf("week").format(A)}},{label:"Last 7 days",value:{startDate:R().subtract(7,"day").format(A),endDate:R().subtract(1,"day").format(A)}},{label:"This month",value:{startDate:R().startOf("month").format(A),endDate:R().endOf("month").format(A)}},{label:"Last month",value:{startDate:R().subtract(1,"month").startOf("month").format(A),endDate:R().subtract(1,"month").endOf("month").format(A)}},{label:"This year",value:{startDate:R().startOf("year").format(A),endDate:R().endOf("year").format(A)}}]},compare:{type:Boolean,default:!1},compareLabel:{default:"Date"},min:{default:()=>R().subtract(50,"year").format(A)},max:{default:()=>R().add(25,"year").format(A)},labelMark:{default:"none"},labelInfo:{default:""},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,{breakpoints:n}=Ao(),o=Z(e,"modelValue");return(i,s)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.unref(n).md||r.unref(n).lg?(r.openBlock(),r.createBlock(D2,r.mergeProps({key:0},e,{modelValue:r.unref(o),"onUpdate:modelValue":s[0]||(s[0]=l=>r.isRef(o)?o.value=l:null)}),null,16,["modelValue"])):r.createCommentVNode("",!0),r.unref(n).xs||r.unref(n).sm?(r.openBlock(),r.createBlock(Cd,r.mergeProps({key:1},e,{modelValue:r.unref(o),"onUpdate:modelValue":s[1]||(s[1]=l=>r.isRef(o)?o.value=l:null)}),null,16,["modelValue"])):r.createCommentVNode("",!0)],64))}}),J2=r.defineComponent({__name:"FmForm",emits:["validation-reset","validation-success","validation-failed","reset"],setup(t,{expose:e,emit:n}){const o=r.ref([]),i=r.ref(0),s=n,l=()=>{let c=[];for(let u=0;u<o.value.length;u++){const f=o.value[u];c=[...c,...f.validate()]}c.length?s("validation-failed",c):s("validation-success")},a=()=>{for(let c=0;c<o.value.length;c++)o.value[c].resetValue();s("reset")};return e({validateInputs:l,resetInputsValidation:()=>{for(let c=0;c<o.value.length;c++)o.value[c].resetValidation();s("validation-reset")},resetInputs:a}),r.provide(ys,{register({validate:c,resetValidation:u,resetValue:f}){return o.value.push({componentId:i.value,validate:c,resetValidation:u,resetValue:f}),i.value++},unregister(c){o.value.filter(u=>u.componentId!==c)}}),(c,u)=>(r.openBlock(),r.createElementBlock("form",{onSubmit:r.withModifiers(l,["prevent"]),onReset:r.withModifiers(a,["prevent"])},[r.renderSlot(c.$slots,"default")],32))}}),Q2={version:4,country_calling_codes:{1:["US","AG","AI","AS","BB","BM","BS","CA","DM","DO","GD","GU","JM","KN","KY","LC","MP","MS","PR","SX","TC","TT","VC","VG","VI"],7:["RU","KZ"],20:["EG"],27:["ZA"],30:["GR"],31:["NL"],32:["BE"],33:["FR"],34:["ES"],36:["HU"],39:["IT","VA"],40:["RO"],41:["CH"],43:["AT"],44:["GB","GG","IM","JE"],45:["DK"],46:["SE"],47:["NO","SJ"],48:["PL"],49:["DE"],51:["PE"],52:["MX"],53:["CU"],54:["AR"],55:["BR"],56:["CL"],57:["CO"],58:["VE"],60:["MY"],61:["AU","CC","CX"],62:["ID"],63:["PH"],64:["NZ"],65:["SG"],66:["TH"],81:["JP"],82:["KR"],84:["VN"],86:["CN"],90:["TR"],91:["IN"],92:["PK"],93:["AF"],94:["LK"],95:["MM"],98:["IR"],211:["SS"],212:["MA","EH"],213:["DZ"],216:["TN"],218:["LY"],220:["GM"],221:["SN"],222:["MR"],223:["ML"],224:["GN"],225:["CI"],226:["BF"],227:["NE"],228:["TG"],229:["BJ"],230:["MU"],231:["LR"],232:["SL"],233:["GH"],234:["NG"],235:["TD"],236:["CF"],237:["CM"],238:["CV"],239:["ST"],240:["GQ"],241:["GA"],242:["CG"],243:["CD"],244:["AO"],245:["GW"],246:["IO"],247:["AC"],248:["SC"],249:["SD"],250:["RW"],251:["ET"],252:["SO"],253:["DJ"],254:["KE"],255:["TZ"],256:["UG"],257:["BI"],258:["MZ"],260:["ZM"],261:["MG"],262:["RE","YT"],263:["ZW"],264:["NA"],265:["MW"],266:["LS"],267:["BW"],268:["SZ"],269:["KM"],290:["SH","TA"],291:["ER"],297:["AW"],298:["FO"],299:["GL"],350:["GI"],351:["PT"],352:["LU"],353:["IE"],354:["IS"],355:["AL"],356:["MT"],357:["CY"],358:["FI","AX"],359:["BG"],370:["LT"],371:["LV"],372:["EE"],373:["MD"],374:["AM"],375:["BY"],376:["AD"],377:["MC"],378:["SM"],380:["UA"],381:["RS"],382:["ME"],383:["XK"],385:["HR"],386:["SI"],387:["BA"],389:["MK"],420:["CZ"],421:["SK"],423:["LI"],500:["FK"],501:["BZ"],502:["GT"],503:["SV"],504:["HN"],505:["NI"],506:["CR"],507:["PA"],508:["PM"],509:["HT"],590:["GP","BL","MF"],591:["BO"],592:["GY"],593:["EC"],594:["GF"],595:["PY"],596:["MQ"],597:["SR"],598:["UY"],599:["CW","BQ"],670:["TL"],672:["NF"],673:["BN"],674:["NR"],675:["PG"],676:["TO"],677:["SB"],678:["VU"],679:["FJ"],680:["PW"],681:["WF"],682:["CK"],683:["NU"],685:["WS"],686:["KI"],687:["NC"],688:["TV"],689:["PF"],690:["TK"],691:["FM"],692:["MH"],850:["KP"],852:["HK"],853:["MO"],855:["KH"],856:["LA"],880:["BD"],886:["TW"],960:["MV"],961:["LB"],962:["JO"],963:["SY"],964:["IQ"],965:["KW"],966:["SA"],967:["YE"],968:["OM"],970:["PS"],971:["AE"],972:["IL"],973:["BH"],974:["QA"],975:["BT"],976:["MN"],977:["NP"],992:["TJ"],993:["TM"],994:["AZ"],995:["GE"],996:["KG"],998:["UZ"]},countries:{AC:["247","00","(?:[01589]\\d|[46])\\d{4}",[5,6]],AD:["376","00","(?:1|6\\d)\\d{7}|[135-9]\\d{5}",[6,8,9],[["(\\d{3})(\\d{3})","$1 $2",["[135-9]"]],["(\\d{4})(\\d{4})","$1 $2",["1"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]]],AE:["971","00","(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}",[5,6,7,8,9,10,11,12],[["(\\d{3})(\\d{2,9})","$1 $2",["60|8"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[236]|[479][2-8]"],"0$1"],["(\\d{3})(\\d)(\\d{5})","$1 $2 $3",["[479]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"]],"0"],AF:["93","00","[2-7]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"]],"0"],AG:["1","011","(?:268|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([457]\\d{6})$|1","268$1",0,"268"],AI:["1","011","(?:264|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2457]\\d{6})$|1","264$1",0,"264"],AL:["355","00","(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}",[6,7,8,9],[["(\\d{3})(\\d{3,4})","$1 $2",["80|9"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["4[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2358][2-5]|4"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["[23578]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["6"],"0$1"]],"0"],AM:["374","00","(?:[1-489]\\d|55|60|77)\\d{6}",[8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[89]0"],"0 $1"],["(\\d{3})(\\d{5})","$1 $2",["2|3[12]"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["1|47"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[3-9]"],"0$1"]],"0"],AO:["244","00","[29]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[29]"]]]],AR:["54","00","(?:11|[89]\\d\\d)\\d{8}|[2368]\\d{9}",[10,11],[["(\\d{4})(\\d{2})(\\d{4})","$1 $2-$3",["2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])","2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["1"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[68]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2-$3",["[23]"],"0$1",1],["(\\d)(\\d{4})(\\d{2})(\\d{4})","$2 15-$3-$4",["9(?:2[2-469]|3[3-578])","9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))","9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",0,"$1 $2 $3-$4"],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 15-$3-$4",["91"],"0$1",0,"$1 $2 $3-$4"],["(\\d{3})(\\d{3})(\\d{5})","$1-$2-$3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 15-$3-$4",["9"],"0$1",0,"$1 $2 $3-$4"]],"0",0,"0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?","9$1"],AS:["1","011","(?:[58]\\d\\d|684|900)\\d{7}",[10],0,"1",0,"([267]\\d{6})$|1","684$1",0,"684"],AT:["43","00","1\\d{3,12}|2\\d{6,12}|43(?:(?:0\\d|5[02-9])\\d{3,9}|2\\d{4,5}|[3467]\\d{4}|8\\d{4,6}|9\\d{4,7})|5\\d{4,12}|8\\d{7,12}|9\\d{8,12}|(?:[367]\\d|4[0-24-9])\\d{4,11}",[4,5,6,7,8,9,10,11,12,13],[["(\\d)(\\d{3,12})","$1 $2",["1(?:11|[2-9])"],"0$1"],["(\\d{3})(\\d{2})","$1 $2",["517"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["5[079]"],"0$1"],["(\\d{3})(\\d{3,10})","$1 $2",["(?:31|4)6|51|6(?:5[0-3579]|[6-9])|7(?:20|32|8)|[89]"],"0$1"],["(\\d{4})(\\d{3,9})","$1 $2",["[2-467]|5[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["5"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,7})","$1 $2 $3",["5"],"0$1"]],"0"],AU:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{7}(?:\\d(?:\\d{2})?)?|8[0-24-9]\\d{7})|[2-478]\\d{8}|1\\d{4,7}",[5,6,7,8,9,10,12],[["(\\d{2})(\\d{3,4})","$1 $2",["16"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,4})","$1 $2 $3",["16"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["14|4"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[2378]"],"(0$1)"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:30|[89])"]]],"0",0,"(183[12])|0",0,0,0,[["(?:(?:(?:2(?:[0-26-9]\\d|3[0-8]|4[02-9]|5[0135-9])|7(?:[013-57-9]\\d|2[0-8]))\\d|3(?:(?:[0-3589]\\d|6[1-9]|7[0-35-9])\\d|4(?:[0-578]\\d|90)))\\d\\d|8(?:51(?:0(?:0[03-9]|[12479]\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\d|7[89]|9[0-4])|3\\d\\d)|(?:6[0-8]|[78]\\d)\\d{3}|9(?:[02-9]\\d{3}|1(?:(?:[0-58]\\d|6[0135-9])\\d|7(?:0[0-24-9]|[1-9]\\d)|9(?:[0-46-9]\\d|5[0-79])))))\\d{3}",[9]],["4(?:(?:79|94)[01]|83[0-389])\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[0-36-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,["163\\d{2,6}",[5,6,7,8,9]],["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],AW:["297","00","(?:[25-79]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[25-9]"]]]],AX:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","2\\d{4,9}|35\\d{4,5}|(?:60\\d\\d|800)\\d{4,6}|7\\d{5,11}|(?:[14]\\d|3[0-46-9]|50)\\d{4,8}",[5,6,7,8,9,10,11,12],0,"0",0,0,0,0,"18",0,"00"],AZ:["994","00","365\\d{6}|(?:[124579]\\d|60|88)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[28]|2|365|46","1[28]|2|365[45]|46","1[28]|2|365(?:4|5[02])|46"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[13-9]"],"0$1"]],"0"],BA:["387","00","6\\d{8}|(?:[35689]\\d|49|70)\\d{6}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["6[1-3]|[7-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2-$3",["[3-5]|6[56]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["6"],"0$1"]],"0"],BB:["1","011","(?:246|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","246$1",0,"246"],BD:["880","00","[1-469]\\d{9}|8[0-79]\\d{7,8}|[2-79]\\d{8}|[2-9]\\d{7}|[3-9]\\d{6}|[57-9]\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{4,6})","$1-$2",["31[5-8]|[459]1"],"0$1"],["(\\d{3})(\\d{3,7})","$1-$2",["3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:[15]|28|4[14])|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]"],"0$1"],["(\\d{4})(\\d{3,6})","$1-$2",["[13-9]|22"],"0$1"],["(\\d)(\\d{7,8})","$1-$2",["2"],"0$1"]],"0"],BE:["32","00","4\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:80|9)0"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[239]|4[23]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[15-8]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4"],"0$1"]],"0"],BF:["226","00","[025-7]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[025-7]"]]]],BG:["359","00","00800\\d{7}|[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}",[6,7,8,9,12],[["(\\d)(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["43[1-6]|70[1-9]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:70|8)0"],"0$1"],["(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["43[1-7]|7"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[48]|9[08]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"]],"0"],BH:["973","00","[136-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[13679]|8[02-4679]"]]]],BI:["257","00","(?:[267]\\d|31)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2367]"]]]],BJ:["229","00","[24-689]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-689]"]]]],BL:["590","00","590\\d{6}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:2[7-9]|3[3-7]|5[12]|87)\\d{4}"],["69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-5])\\d{4}"]]],BM:["1","011","(?:441|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","441$1",0,"441"],BN:["673","00","[2-578]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-578]"]]]],BO:["591","00(?:1\\d)?","(?:[2-467]\\d\\d|8001)\\d{5}",[8,9],[["(\\d)(\\d{7})","$1 $2",["[23]|4[46]"]],["(\\d{8})","$1",["[67]"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["8"]]],"0",0,"0(1\\d)?"],BQ:["599","00","(?:[34]1|7\\d)\\d{5}",[7],0,0,0,0,0,0,"[347]"],BR:["55","00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)","(?:[1-46-9]\\d\\d|5(?:[0-46-9]\\d|5[0-46-9]))\\d{8}|[1-9]\\d{9}|[3589]\\d{8}|[34]\\d{7}",[8,9,10,11],[["(\\d{4})(\\d{4})","$1-$2",["300|4(?:0[02]|37)","4(?:02|37)0|[34]00"]],["(\\d{3})(\\d{2,3})(\\d{4})","$1 $2 $3",["(?:[358]|90)0"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"],"($1)"],["(\\d{2})(\\d{5})(\\d{4})","$1 $2-$3",["[16][1-9]|[2-57-9]"],"($1)"]],"0",0,"(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?","$2"],BS:["1","011","(?:242|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([3-8]\\d{6})$|1","242$1",0,"242"],BT:["975","00","[17]\\d{7}|[2-8]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[2-68]|7[246]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[67]|7"]]]],BW:["267","00","(?:0800|(?:[37]|800)\\d)\\d{6}|(?:[2-6]\\d|90)\\d{5}",[7,8,10],[["(\\d{2})(\\d{5})","$1 $2",["90"]],["(\\d{3})(\\d{4})","$1 $2",["[24-6]|3[15-9]"]],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37]"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["8"]]]],BY:["375","810","(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3})","$1 $2",["800"],"8 $1"],["(\\d{3})(\\d{2})(\\d{2,4})","$1 $2 $3",["800"],"8 $1"],["(\\d{4})(\\d{2})(\\d{3})","$1 $2-$3",["1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])","1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])"],"8 0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["1(?:[56]|7[467])|2[1-3]"],"8 0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-4]"],"8 0$1"],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["[89]"],"8 $1"]],"8",0,"0|80?",0,0,0,0,"8~10"],BZ:["501","00","(?:0800\\d|[2-8])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1-$2",["[2-8]"]],["(\\d)(\\d{3})(\\d{4})(\\d{3})","$1-$2-$3-$4",["0"]]]],CA:["1","011","(?:[2-8]\\d|90)\\d{8}|3\\d{6}",[7,10],0,"1",0,0,0,0,0,[["(?:2(?:04|[23]6|[48]9|50|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|73)|90[25])[2-9]\\d{6}",[10]],["",[10]],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",[10]],["900[2-9]\\d{6}",[10]],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|(?:5(?:00|2[125-9]|33|44|66|77|88)|622)[2-9]\\d{6}",[10]],0,["310\\d{4}",[7]],0,["600[2-9]\\d{6}",[10]]]],CC:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:02|31|60|89)|1(?:18|76)|223)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\d|70[23]|959))\\d{3}",[9]],["4(?:(?:79|94)[01]|83[0-389])\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[0-36-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CD:["243","00","[189]\\d{8}|[1-68]\\d{6}",[7,9],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[1-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]"],"0$1"]],"0"],CF:["236","00","(?:[27]\\d{3}|8776)\\d{4}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[278]"]]]],CG:["242","00","222\\d{6}|(?:0\\d|80)\\d{7}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[02]"]]]],CH:["41","00","8\\d{11}|[2-9]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8[047]|90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]|81"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["8"],"0$1"]],"0"],CI:["225","00","[02]\\d{9}",[10],[["(\\d{2})(\\d{2})(\\d)(\\d{5})","$1 $2 $3 $4",["2"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3 $4",["0"]]]],CK:["682","00","[2-578]\\d{4}",[5],[["(\\d{2})(\\d{3})","$1 $2",["[2-578]"]]]],CL:["56","(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0","12300\\d{6}|6\\d{9,10}|[2-9]\\d{8}",[9,10,11],[["(\\d{5})(\\d{4})","$1 $2",["219","2196"],"($1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["44"]],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2[1-36]"],"($1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["9[2-9]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-9]|[1-9])"],"($1)"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["60|8"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{3})(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3 $4",["60"]]]],CM:["237","00","[26]\\d{8}|88\\d{6,7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["88"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[26]|88"]]]],CN:["86","00|1(?:[12]\\d|79)\\d\\d00","1[127]\\d{8,9}|2\\d{9}(?:\\d{2})?|[12]\\d{6,7}|86\\d{6}|(?:1[03-689]\\d|6)\\d{7,9}|(?:[3-579]\\d|8[0-57-9])\\d{6,9}",[7,8,9,10,11,12],[["(\\d{2})(\\d{5,6})","$1 $2",["(?:10|2[0-57-9])[19]","(?:10|2[0-57-9])(?:10|9[56])","10(?:10|9[56])|2[0-57-9](?:100|9[56])"],"0$1"],["(\\d{3})(\\d{5,6})","$1 $2",["3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]","(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]","85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])","85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["(?:4|80)0"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|2(?:[02-57-9]|1[1-9])","10|2(?:[02-57-9]|1[1-9])","10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]"],"0$1",1],["(\\d{3})(\\d{7,8})","$1 $2",["9"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["80"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[3-578]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["1[3-9]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["[12]"],"0$1",1]],"0",0,"(1(?:[12]\\d|79)\\d\\d)|0",0,0,0,0,"00"],CO:["57","00(?:4(?:[14]4|56)|[579])","(?:60\\d\\d|9101)\\d{6}|(?:1\\d|3)\\d{9}",[10,11],[["(\\d{3})(\\d{7})","$1 $2",["6"],"($1)"],["(\\d{3})(\\d{7})","$1 $2",["3[0-357]|91"]],["(\\d)(\\d{3})(\\d{7})","$1-$2-$3",["1"],"0$1",0,"$1 $2 $3"]],"0",0,"0([3579]|4(?:[14]4|56))?"],CR:["506","00","(?:8\\d|90)\\d{8}|(?:[24-8]\\d{3}|3005)\\d{4}",[8,10],[["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[3-9]"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[89]"]]],0,0,"(19(?:0[0-2468]|1[09]|20|66|77|99))"],CU:["53","119","[27]\\d{6,7}|[34]\\d{5,7}|63\\d{6}|(?:5|8\\d\\d)\\d{7}",[6,7,8,10],[["(\\d{2})(\\d{4,6})","$1 $2",["2[1-4]|[34]"],"(0$1)"],["(\\d)(\\d{6,7})","$1 $2",["7"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["[56]"],"0$1"],["(\\d{3})(\\d{7})","$1 $2",["8"],"0$1"]],"0"],CV:["238","0","(?:[2-59]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2-589]"]]]],CW:["599","00","(?:[34]1|60|(?:7|9\\d)\\d)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[3467]"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["9[4-8]"]]],0,0,0,0,0,"[69]"],CX:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:01|30|59|88)|1(?:17|46|75)|2(?:22|35))|91(?:00[6-9]|1(?:[28]1|49|78)|2(?:09|63)|3(?:12|26|75)|4(?:56|97)|64\\d|7(?:0[01]|1[0-2])|958))\\d{3}",[9]],["4(?:(?:79|94)[01]|83[0-389])\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[0-36-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CY:["357","00","(?:[279]\\d|[58]0)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[257-9]"]]]],CZ:["420","00","(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]|9[015-7]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["96"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]]],DE:["49","00","[2579]\\d{5,14}|49(?:[34]0|69|8\\d)\\d\\d?|49(?:37|49|60|7[089]|9\\d)\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\d{1,8}|(?:1|[368]\\d|4[0-8])\\d{3,13}|49(?:[015]\\d|2[13]|31|[46][1-8])\\d{1,9}",[4,5,6,7,8,9,10,11,12,13,14,15],[["(\\d{2})(\\d{3,13})","$1 $2",["3[02]|40|[68]9"],"0$1"],["(\\d{3})(\\d{3,12})","$1 $2",["2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1","2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1"],"0$1"],["(\\d{4})(\\d{2,11})","$1 $2",["[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]","[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["138"],"0$1"],["(\\d{5})(\\d{2,10})","$1 $2",["3"],"0$1"],["(\\d{3})(\\d{5,11})","$1 $2",["181"],"0$1"],["(\\d{3})(\\d)(\\d{4,10})","$1 $2 $3",["1(?:3|80)|9"],"0$1"],["(\\d{3})(\\d{7,8})","$1 $2",["1[67]"],"0$1"],["(\\d{3})(\\d{7,12})","$1 $2",["8"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["185","1850","18500"],"0$1"],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["18[68]"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["15[1279]"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["15[03568]","15(?:[0568]|31)"],"0$1"],["(\\d{3})(\\d{8})","$1 $2",["18"],"0$1"],["(\\d{3})(\\d{2})(\\d{7,8})","$1 $2 $3",["1(?:6[023]|7)"],"0$1"],["(\\d{4})(\\d{2})(\\d{7})","$1 $2 $3",["15[279]"],"0$1"],["(\\d{3})(\\d{2})(\\d{8})","$1 $2 $3",["15"],"0$1"]],"0"],DJ:["253","00","(?:2\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[27]"]]]],DK:["45","00","[2-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-9]"]]]],DM:["1","011","(?:[58]\\d\\d|767|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","767$1",0,"767"],DO:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,0,0,0,"8001|8[024]9"],DZ:["213","00","(?:[1-4]|[5-79]\\d|80)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["9"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-8]"],"0$1"]],"0"],EC:["593","00","1\\d{9,10}|(?:[2-7]|9\\d)\\d{7}",[8,9,10,11],[["(\\d)(\\d{3})(\\d{4})","$1 $2-$3",["[2-7]"],"(0$1)",0,"$1-$2-$3"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{3})(\\d{3,4})","$1 $2 $3",["1"]]],"0"],EE:["372","00","8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88","[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88"]],["(\\d{4})(\\d{3,4})","$1 $2",["[45]|8(?:00|[1-49])","[45]|8(?:00[1-9]|[1-49])"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],EG:["20","00","[189]\\d{8,9}|[24-6]\\d{8}|[135]\\d{7}",[8,9,10],[["(\\d)(\\d{7,8})","$1 $2",["[23]"],"0$1"],["(\\d{2})(\\d{6,7})","$1 $2",["1[35]|[4-6]|8[2468]|9[235-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{8})","$1 $2",["1"],"0$1"]],"0"],EH:["212","00","[5-8]\\d{8}",[9],0,"0",0,0,0,0,"528[89]"],ER:["291","00","[178]\\d{6}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[178]"],"0$1"]],"0"],ES:["34","00","[5-9]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]00"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-9]"]]]],ET:["251","00","(?:11|[2-579]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-579]"],"0$1"]],"0"],FI:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","[1-35689]\\d{4}|7\\d{10,11}|(?:[124-7]\\d|3[0-46-9])\\d{8}|[1-9]\\d{5,8}",[5,6,7,8,9,10,11,12],[["(\\d{5})","$1",["20[2-59]"],"0$1"],["(\\d{3})(\\d{3,7})","$1 $2",["(?:[1-3]0|[68])0|70[07-9]"],"0$1"],["(\\d{2})(\\d{4,8})","$1 $2",["[14]|2[09]|50|7[135]"],"0$1"],["(\\d{2})(\\d{6,10})","$1 $2",["7"],"0$1"],["(\\d)(\\d{4,9})","$1 $2",["(?:1[3-79]|[2568])[1-8]|3(?:0[1-9]|[1-9])|9"],"0$1"]],"0",0,0,0,0,"1[03-79]|[2-9]",0,"00"],FJ:["679","0(?:0|52)","45\\d{5}|(?:0800\\d|[235-9])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1 $2",["[235-9]|45"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]]],0,0,0,0,0,0,0,"00"],FK:["500","00","[2-7]\\d{4}",[5]],FM:["691","00","(?:[39]\\d\\d|820)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[389]"]]]],FO:["298","00","[2-9]\\d{5}",[6],[["(\\d{6})","$1",["[2-9]"]]],0,0,"(10(?:01|[12]0|88))"],FR:["33","00","[1-9]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0 $1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[1-79]"],"0$1"]],"0"],GA:["241","00","(?:[067]\\d|11)\\d{6}|[2-7]\\d{6}",[7,8],[["(\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-7]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["11|[67]"],"0$1"]],0,0,"0(11\\d{6}|60\\d{6}|61\\d{6}|6[256]\\d{6}|7[467]\\d{6})","$1"],GB:["44","00","[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}",[7,9,10],[["(\\d{3})(\\d{4})","$1 $2",["800","8001","80011","800111","8001111"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["845","8454","84546","845464"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["800"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["1(?:38|5[23]|69|76|94)","1(?:(?:38|69)7|5(?:24|39)|768|946)","1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["1(?:[2-69][02-9]|[78])"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[25]|7(?:0|6[02-9])","[25]|7(?:0|6(?:[03-9]|2[356]))"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[1389]"],"0$1"]],"0",0,0,0,0,0,[["(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0235])|4(?:[0-5]\\d\\d|69[7-9]|70[0-79])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|50))\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d|1(?:[0-7]\\d|8[0-2]))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d)\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}",[9,10]],["7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[2-49]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]],0," x"],GD:["1","011","(?:473|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","473$1",0,"473"],GE:["995","00","(?:[3-57]\\d\\d|800)\\d{6}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["32"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[57]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[348]"],"0$1"]],"0"],GF:["594","00","[56]94\\d{6}|(?:80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[56]|9[47]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[89]"],"0$1"]],"0"],GG:["44","00","(?:1481|[357-9]\\d{3})\\d{6}|8\\d{6}(?:\\d{2})?",[7,9,10],0,"0",0,"([25-9]\\d{5})$|0","1481$1",0,0,[["1481[25-9]\\d{5}",[10]],["7(?:(?:781|839)\\d|911[17])\\d{5}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[0-3]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]]],GH:["233","00","(?:[235]\\d{3}|800)\\d{5}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[235]"],"0$1"]],"0"],GI:["350","00","(?:[25]\\d|60)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["2"]]]],GL:["299","00","(?:19|[2-689]\\d|70)\\d{4}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["19|[2-9]"]]]],GM:["220","00","[2-9]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],GN:["224","00","722\\d{6}|(?:3|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["3"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[67]"]]]],GP:["590","00","590\\d{6}|(?:69|80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[569]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0",0,0,0,0,0,[["590(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\d)\\d{4}"],["69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-5])\\d{4}"]]],GQ:["240","00","222\\d{6}|(?:3\\d|55|[89]0)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235]"]],["(\\d{3})(\\d{6})","$1 $2",["[89]"]]]],GR:["30","00","5005000\\d{3}|8\\d{9,11}|(?:[269]\\d|70)\\d{8}",[10,11,12],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["21|7"]],["(\\d{4})(\\d{6})","$1 $2",["2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2689]"]],["(\\d{3})(\\d{3,4})(\\d{5})","$1 $2 $3",["8"]]]],GT:["502","00","80\\d{6}|(?:1\\d{3}|[2-7])\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1 $2",["[2-8]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],GU:["1","011","(?:[58]\\d\\d|671|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","671$1",0,"671"],GW:["245","00","[49]\\d{8}|4\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["40"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"]]]],GY:["592","001","(?:[2-8]\\d{3}|9008)\\d{3}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],HK:["852","00(?:30|5[09]|[126-9]?)","8[0-46-9]\\d{6,7}|9\\d{4,7}|(?:[2-7]|9\\d{3})\\d{7}",[5,6,7,8,9,11],[["(\\d{3})(\\d{2,5})","$1 $2",["900","9003"]],["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[1-4]|9(?:0[1-9]|[1-8])"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{3})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]],0,0,0,0,0,0,0,"00"],HN:["504","00","8\\d{10}|[237-9]\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1-$2",["[237-9]"]]]],HR:["385","00","(?:[24-69]\\d|3[0-79])\\d{7}|80\\d{5,7}|[1-79]\\d{7}|6\\d{5,6}",[6,7,8,9],[["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["6[01]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{4})(\\d{3})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6|7[245]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-57]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"]],"0"],HT:["509","00","(?:[2-489]\\d|55)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[2-589]"]]]],HU:["36","00","[235-7]\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"06 $1"]],"06"],ID:["62","00[89]","(?:(?:00[1-9]|8\\d)\\d{4}|[1-36])\\d{6}|00\\d{10}|[1-9]\\d{8,10}|[2-9]\\d{7}",[7,8,9,10,11,12,13],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["15"]],["(\\d{2})(\\d{5,9})","$1 $2",["2[124]|[36]1"],"(0$1)"],["(\\d{3})(\\d{5,7})","$1 $2",["800"],"0$1"],["(\\d{3})(\\d{5,8})","$1 $2",["[2-79]"],"(0$1)"],["(\\d{3})(\\d{3,4})(\\d{3})","$1-$2-$3",["8[1-35-9]"],"0$1"],["(\\d{3})(\\d{6,8})","$1 $2",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["804"],"0$1"],["(\\d{3})(\\d)(\\d{3})(\\d{3})","$1 $2 $3 $4",["80"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1-$2-$3",["8"],"0$1"]],"0"],IE:["353","00","(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["2[24-9]|47|58|6[237-9]|9[35-9]"],"(0$1)"],["(\\d{3})(\\d{5})","$1 $2",["[45]0"],"(0$1)"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["1"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2569]|4[1-69]|7[14]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["81"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[78]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["4"],"(0$1)"],["(\\d{2})(\\d)(\\d{3})(\\d{4})","$1 $2 $3 $4",["8"],"0$1"]],"0"],IL:["972","0(?:0|1[2-9])","1\\d{6}(?:\\d{3,5})?|[57]\\d{8}|[1-489]\\d{7}",[7,8,9,10,11,12],[["(\\d{4})(\\d{3})","$1-$2",["125"]],["(\\d{4})(\\d{2})(\\d{2})","$1-$2-$3",["121"]],["(\\d)(\\d{3})(\\d{4})","$1-$2-$3",["[2-489]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1-$2-$3",["12"]],["(\\d{4})(\\d{6})","$1-$2",["159"]],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3-$4",["1[7-9]"]],["(\\d{3})(\\d{1,2})(\\d{3})(\\d{4})","$1-$2 $3-$4",["15"]]],"0"],IM:["44","00","1624\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([25-8]\\d{5})$|0","1624$1",0,"74576|(?:16|7[56])24"],IN:["91","00","(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}",[8,9,10,11,12,13],[["(\\d{8})","$1",["5(?:0|2[23]|3[03]|[67]1|88)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"],0,1],["(\\d{4})(\\d{4,5})","$1 $2",["180","1800"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["140"],0,1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["11|2[02]|33|4[04]|79[1-7]|80[2-46]","11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])","11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|4[47]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67|72)[14]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:2[14]|3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:(?:2[14]|5[15])[2-6]|3171|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|(?:74[47]|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"],"0$1",1],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|28|3[129]|4[1-35689]|5[29]|6[02-5]|70)|807","1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1(?:[013-8]|9[6-9])|28[6-8]|3(?:17|2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]","1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|83)|73179|807(?:1|9[1-3])|(?:1552|6(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[124-6])\\d|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"],"0$1",1],["(\\d{5})(\\d{5})","$1 $2",["[6-9]"],"0$1",1],["(\\d{4})(\\d{2,4})(\\d{4})","$1 $2 $3",["1(?:6|8[06])","1(?:6|8[06]0)"],0,1],["(\\d{4})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["18"],0,1]],"0"],IO:["246","00","3\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["3"]]]],IQ:["964","00","(?:1|7\\d\\d)\\d{7}|[2-6]\\d{7,8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-6]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],IR:["98","00","[1-9]\\d{9}|(?:[1-8]\\d\\d|9)\\d{3,4}",[4,5,6,7,10],[["(\\d{4,5})","$1",["96"],"0$1"],["(\\d{2})(\\d{4,5})","$1 $2",["(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[1-8]"],"0$1"]],"0"],IS:["354","00|1(?:0(?:01|[12]0)|100)","(?:38\\d|[4-9])\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["[4-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["3"]]],0,0,0,0,0,0,0,"00"],IT:["39","00","0\\d{5,10}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:43|55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?",[6,7,8,9,10,11],[["(\\d{2})(\\d{4,6})","$1 $2",["0[26]"]],["(\\d{3})(\\d{3,6})","$1 $2",["0[13-57-9][0159]|8(?:03|4[17]|9[2-5])","0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))"]],["(\\d{4})(\\d{2,6})","$1 $2",["0(?:[13-579][2-46-8]|8[236-8])"]],["(\\d{4})(\\d{4})","$1 $2",["894"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[26]|5"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["1(?:44|[679])|[378]|43"]],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[13-57-9][0159]|14"]],["(\\d{2})(\\d{4})(\\d{5})","$1 $2 $3",["0[26]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["3"]]],0,0,0,0,0,0,[["0669[0-79]\\d{1,6}|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[1-356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}"],["3[2-9]\\d{7,8}|(?:31|43)\\d{8}",[9,10]],["80(?:0\\d{3}|3)\\d{3}",[6,9]],["(?:0878\\d{3}|89(?:2\\d|3[04]|4(?:[0-4]|[5-9]\\d\\d)|5[0-4]))\\d\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\d{6}",[6,8,9,10]],["1(?:78\\d|99)\\d{6}",[9,10]],0,0,0,["55\\d{8}",[10]],["84(?:[08]\\d{3}|[17])\\d{3}",[6,9]]]],JE:["44","00","1534\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([0-24-8]\\d{5})$|0","1534$1",0,0,[["1534[0-24-8]\\d{5}"],["7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97\\d))\\d{5}"],["80(?:07(?:35|81)|8901)\\d{4}"],["(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\d{4}"],["701511\\d{4}"],0,["(?:3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\d{4})\\d{4}"],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}"],["56\\d{8}"]]],JM:["1","011","(?:[58]\\d\\d|658|900)\\d{7}",[10],0,"1",0,0,0,0,"658|876"],JO:["962","00","(?:(?:[2689]|7\\d)\\d|32|53)\\d{6}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2356]|87"],"(0$1)"],["(\\d{3})(\\d{5,6})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["70"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],JP:["81","010","00[1-9]\\d{6,14}|[257-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}",[8,9,10,11,12,13,14,15,16,17],[["(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3",["(?:12|57|99)0"],"0$1"],["(\\d{4})(\\d)(\\d{4})","$1-$2-$3",["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51)|9(?:80|9[16])","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2-$3",["[36]|4(?:2[09]|7[01])","[36]|4(?:2(?:0|9[02-69])|7(?:0[019]|1))"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[0459]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[26-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9]|9[29])|5(?:2|3(?:[045]|9[0-8])|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|3(?:[29]|60)|49|51|6(?:[0-24]|36|5[0-3589]|7[23]|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3(?:[045]|9(?:[0-58]|6[4-9]|7[0-35689]))|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|60|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[2-57-9]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|7(?:2[2-468]|3[78])|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]"],"0$1"],["(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3",["[14]|[289][2-9]|5[3-9]|7[2-4679]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["800"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[257-9]"],"0$1"]],"0",0,"(000[259]\\d{6})$|(?:(?:003768)0?)|0","$1"],KE:["254","000","(?:[17]\\d\\d|900)\\d{6}|(?:2|80)0\\d{6,7}|[4-6]\\d{6,8}",[7,8,9,10],[["(\\d{2})(\\d{5,7})","$1 $2",["[24-6]"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[17]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0"],KG:["996","00","8\\d{9}|[235-9]\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["3(?:1[346]|[24-79])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-79]|88"],"0$1"],["(\\d{3})(\\d{3})(\\d)(\\d{2,3})","$1 $2 $3 $4",["8"],"0$1"]],"0"],KH:["855","00[14-9]","1\\d{9}|[1-9]\\d{7,8}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],KI:["686","00","(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}",[5,8],0,"0"],KM:["269","00","[3478]\\d{6}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[3478]"]]]],KN:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","869$1",0,"869"],KP:["850","00|99","85\\d{6}|(?:19\\d|[2-7])\\d{7}",[8,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"]],"0"],KR:["82","00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))","00[1-9]\\d{8,11}|(?:[12]|5\\d{3})\\d{7}|[13-6]\\d{9}|(?:[1-6]\\d|80)\\d{7}|[3-6]\\d{4,5}|(?:00|7)0\\d{8}",[5,6,8,9,10,11,12,13,14],[["(\\d{2})(\\d{3,4})","$1-$2",["(?:3[1-3]|[46][1-4]|5[1-5])1"],"0$1"],["(\\d{4})(\\d{4})","$1-$2",["1"]],["(\\d)(\\d{3,4})(\\d{4})","$1-$2-$3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60|8"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1-$2-$3",["[1346]|5[1-5]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{2})(\\d{5})(\\d{4})","$1-$2-$3",["5"],"0$1"]],"0",0,"0(8(?:[1-46-8]|5\\d\\d))?"],KW:["965","00","18\\d{5}|(?:[2569]\\d|41)\\d{6}",[7,8],[["(\\d{4})(\\d{3,4})","$1 $2",["[169]|2(?:[235]|4[1-35-9])|52"]],["(\\d{3})(\\d{5})","$1 $2",["[245]"]]]],KY:["1","011","(?:345|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","345$1",0,"345"],KZ:["7","810","(?:33622|8\\d{8})\\d{5}|[78]\\d{9}",[10,14],0,"8",0,0,0,0,"33|7",0,"8~10"],LA:["856","00","[23]\\d{9}|3\\d{8}|(?:[235-8]\\d|41)\\d{6}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2[13]|3[14]|[4-8]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["30[013-9]"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[23]"],"0$1"]],"0"],LB:["961","00","[27-9]\\d{7}|[13-9]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[13-69]|7(?:[2-57]|62|8[0-7]|9[04-9])|8[02-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27-9]"]]],"0"],LC:["1","011","(?:[58]\\d\\d|758|900)\\d{7}",[10],0,"1",0,"([2-8]\\d{6})$|1","758$1",0,"758"],LI:["423","00","[68]\\d{8}|(?:[2378]\\d|90)\\d{5}",[7,9],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2379]|8(?:0[09]|7)","[2379]|8(?:0(?:02|9)|7)"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["69"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]],"0",0,"(1001)|0"],LK:["94","00","[1-9]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[1-689]"],"0$1"]],"0"],LR:["231","00","(?:[245]\\d|33|77|88)\\d{7}|(?:2\\d|[4-6])\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["4[67]|[56]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-578]"],"0$1"]],"0"],LS:["266","00","(?:[256]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2568]"]]]],LT:["370","00","(?:[3469]\\d|52|[78]0)\\d{6}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["52[0-7]"],"(8-$1)",1],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[7-9]"],"8 $1",1],["(\\d{2})(\\d{6})","$1 $2",["37|4(?:[15]|6[1-8])"],"(8-$1)",1],["(\\d{3})(\\d{5})","$1 $2",["[3-6]"],"(8-$1)",1]],"8",0,"[08]"],LU:["352","00","35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}",[4,5,6,7,8,9,10,11],[["(\\d{2})(\\d{3})","$1 $2",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["20[2-689]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4",["2(?:[0367]|4[3-8])"]],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["80[01]|90[015]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["20"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4 $5",["2(?:[0367]|4[3-8])"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})","$1 $2 $3 $4",["[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]"]]],0,0,"(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)"],LV:["371","00","(?:[268]\\d|90)\\d{6}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[269]|8[01]"]]]],LY:["218","00","[2-9]\\d{8}",[9],[["(\\d{2})(\\d{7})","$1-$2",["[2-9]"],"0$1"]],"0"],MA:["212","00","[5-8]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5[45]"],"0$1"],["(\\d{4})(\\d{5})","$1-$2",["5(?:2[2-46-9]|3[3-9]|9)|8(?:0[89]|92)"],"0$1"],["(\\d{2})(\\d{7})","$1-$2",["8"],"0$1"],["(\\d{3})(\\d{6})","$1-$2",["[5-7]"],"0$1"]],"0",0,0,0,0,0,[["5(?:2(?:[0-25-79]\\d|3[1-578]|4[02-46-8]|8[0235-7])|3(?:[0-47]\\d|5[02-9]|6[02-8]|8[014-9]|9[3-9])|(?:4[067]|5[03])\\d)\\d{5}"],["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[0167]\\d|2[0-4]|5[01]|8[0-3]))\\d{6}"],["80[0-7]\\d{6}"],["89\\d{7}"],0,0,0,0,["(?:592(?:4[0-2]|93)|80[89]\\d\\d)\\d{4}"]]],MC:["377","00","(?:[3489]|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["4"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[389]"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["6"],"0$1"]],"0"],MD:["373","00","(?:[235-7]\\d|[89]0)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["22|3"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[25-7]"],"0$1"]],"0"],ME:["382","00","(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"0$1"]],"0"],MF:["590","00","590\\d{6}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)\\d{4}"],["69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-5])\\d{4}"]]],MG:["261","00","[23]\\d{8}",[9],[["(\\d{2})(\\d{2})(\\d{3})(\\d{2})","$1 $2 $3 $4",["[23]"],"0$1"]],"0",0,"([24-9]\\d{6})$|0","20$1"],MH:["692","011","329\\d{4}|(?:[256]\\d|45)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1-$2",["[2-6]"]]],"1"],MK:["389","00","[2-578]\\d{7}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2|34[47]|4(?:[37]7|5[47]|64)"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[347]"],"0$1"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["[58]"],"0$1"]],"0"],ML:["223","00","[24-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-9]"]]]],MM:["95","00","1\\d{5,7}|95\\d{6}|(?:[4-7]|9[0-46-9])\\d{6,8}|(?:2|8\\d)\\d{5,8}",[6,7,8,9,10],[["(\\d)(\\d{2})(\\d{3})","$1 $2 $3",["16|2"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["[45]|6(?:0[23]|[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-6]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[4-7]|8[1-35]"],"0$1"],["(\\d)(\\d{3})(\\d{4,6})","$1 $2 $3",["9(?:2[0-4]|[35-9]|4[137-9])"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["92"],"0$1"],["(\\d)(\\d{5})(\\d{4})","$1 $2 $3",["9"],"0$1"]],"0"],MN:["976","001","[12]\\d{7,9}|[5-9]\\d{7}",[8,9,10],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[12]1"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[5-9]"]],["(\\d{3})(\\d{5,6})","$1 $2",["[12]2[1-3]"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["[12](?:27|3[2-8]|4[2-68]|5[1-4689])","[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["[12]"],"0$1"]],"0"],MO:["853","00","0800\\d{3}|(?:28|[68]\\d)\\d{6}",[7,8],[["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{4})(\\d{4})","$1 $2",["[268]"]]]],MP:["1","011","[58]\\d{9}|(?:67|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","670$1",0,"670"],MQ:["596","00","596\\d{6}|(?:69|80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[569]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],MR:["222","00","(?:[2-4]\\d\\d|800)\\d{5}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-48]"]]]],MS:["1","011","(?:[58]\\d\\d|664|900)\\d{7}",[10],0,"1",0,"([34]\\d{6})$|1","664$1",0,"664"],MT:["356","00","3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2357-9]"]]]],MU:["230","0(?:0|[24-7]0|3[03])","(?:[57]|8\\d\\d)\\d{7}|[2-468]\\d{6}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[2-46]|8[013]"]],["(\\d{4})(\\d{4})","$1 $2",["[57]"]],["(\\d{5})(\\d{5})","$1 $2",["8"]]],0,0,0,0,0,0,0,"020"],MV:["960","0(?:0|19)","(?:800|9[0-57-9]\\d)\\d{7}|[34679]\\d{6}",[7,10],[["(\\d{3})(\\d{4})","$1-$2",["[34679]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"]]],0,0,0,0,0,0,0,"00"],MW:["265","00","(?:[1289]\\d|31|77)\\d{7}|1\\d{6}",[7,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["1[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[137-9]"],"0$1"]],"0"],MX:["52","0[09]","1(?:(?:22|44|7[27]|87|99)[1-9]|65[0-689])\\d{7}|(?:1(?:[01]\\d|2[13-9]|[35][1-9]|4[0-35-9]|6[0-46-9]|7[013-689]|8[1-69]|9[1-8])|[2-9]\\d)\\d{8}",[10,11],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["33|5[56]|81"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2-9]"],0,1],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 $3 $4",["1(?:33|5[56]|81)"],0,1],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 $3 $4",["1"],0,1]],"01",0,"0(?:[12]|4[45])|1",0,0,0,0,"00"],MY:["60","00","1\\d{8,9}|(?:3\\d|[4-9])\\d{7}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1-$2 $3",["[4-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1-$2 $3",["1(?:[02469]|[378][1-9]|53)|8","1(?:[02469]|[37][1-9]|53|8(?:[1-46-9]|5[7-9]))|8"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2 $3",["3"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3-$4",["1(?:[367]|80)"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2 $3",["15"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2 $3",["1"],"0$1"]],"0"],MZ:["258","00","(?:2|8\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2|8[2-79]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],NA:["264","00","[68]\\d{7,8}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["87"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],NC:["687","00","(?:050|[2-57-9]\\d\\d)\\d{3}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1.$2.$3",["[02-57-9]"]]]],NE:["227","00","[027-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["08"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[089]|2[013]|7[047]"]]]],NF:["672","00","[13]\\d{5}",[6],[["(\\d{2})(\\d{4})","$1 $2",["1[0-3]"]],["(\\d)(\\d{5})","$1 $2",["[13]"]]],0,0,"([0-258]\\d{4})$","3$1"],NG:["234","009","2[0-24-9]\\d{8}|[78]\\d{10,13}|[7-9]\\d{9}|[1-9]\\d{7}|[124-7]\\d{6}",[7,8,10,11,12,13,14],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["78"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]|9(?:0[3-9]|[1-9])"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[3-6]|7(?:0[0-689]|[1-79])|8[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[7-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["20[129]"],"0$1"],["(\\d{4})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[78]"],"0$1"],["(\\d{3})(\\d{5})(\\d{5,6})","$1 $2 $3",["[78]"],"0$1"]],"0"],NI:["505","00","(?:1800|[25-8]\\d{3})\\d{4}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[125-8]"]]]],NL:["31","00","(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|8\\d{6,9}|9\\d{6,10}|1\\d{4,5}",[5,6,7,8,9,10,11],[["(\\d{3})(\\d{4,7})","$1 $2",["[89]0"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["66"],"0$1"],["(\\d)(\\d{8})","$1 $2",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-578]|91"],"0$1"],["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3",["9"],"0$1"]],"0"],NO:["47","00","(?:0|[2-9]\\d{3})\\d{4}",[5,8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]"]]],0,0,0,0,0,"[02-689]|7[0-8]"],NP:["977","00","(?:1\\d|9)\\d{9}|[1-9]\\d{7}",[8,10,11],[["(\\d)(\\d{7})","$1-$2",["1[2-6]"],"0$1"],["(\\d{2})(\\d{6})","$1-$2",["1[01]|[2-8]|9(?:[1-59]|[67][2-6])"],"0$1"],["(\\d{3})(\\d{7})","$1-$2",["9"]]],"0"],NR:["674","00","(?:444|(?:55|8\\d)\\d|666)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[4-68]"]]]],NU:["683","00","(?:[4-7]|888\\d)\\d{3}",[4,7],[["(\\d{3})(\\d{4})","$1 $2",["8"]]]],NZ:["64","0(?:0|161)","[1289]\\d{9}|50\\d{5}(?:\\d{2,3})?|[27-9]\\d{7,8}|(?:[34]\\d|6[0-35-9])\\d{6}|8\\d{4,6}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,8})","$1 $2",["8[1-79]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["50[036-8]|8|90","50(?:[0367]|88)|8|90"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["24|[346]|7[2-57-9]|9[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:10|74)|[589]"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["1|2[028]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,5})","$1 $2 $3",["2(?:[169]|7[0-35-9])|7"],"0$1"]],"0",0,0,0,0,0,0,"00"],OM:["968","00","(?:1505|[279]\\d{3}|500)\\d{4}|800\\d{5,6}",[7,8,9],[["(\\d{3})(\\d{4,6})","$1 $2",["[58]"]],["(\\d{2})(\\d{6})","$1 $2",["2"]],["(\\d{4})(\\d{4})","$1 $2",["[179]"]]]],PA:["507","00","(?:00800|8\\d{3})\\d{6}|[68]\\d{7}|[1-57-9]\\d{6}",[7,8,10,11],[["(\\d{3})(\\d{4})","$1-$2",["[1-57-9]"]],["(\\d{4})(\\d{4})","$1-$2",["[68]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]]],PE:["51","00|19(?:1[124]|77|90)00","(?:[14-8]|9\\d)\\d{7}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["80"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["1"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[4-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"]]],"0",0,0,0,0,0,0,"00"," Anexo "],PF:["689","00","4\\d{5}(?:\\d{2})?|8\\d{7,8}",[6,8,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["44"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4|8[7-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],PG:["675","00|140[1-3]","(?:180|[78]\\d{3})\\d{4}|(?:[2-589]\\d|64)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["18|[2-69]|85"]],["(\\d{4})(\\d{4})","$1 $2",["[78]"]]],0,0,0,0,0,0,0,"00"],PH:["63","00","(?:[2-7]|9\\d)\\d{8}|2\\d{5}|(?:1800|8)\\d{7,9}",[6,8,9,10,11,12,13],[["(\\d)(\\d{5})","$1 $2",["2"],"(0$1)"],["(\\d{4})(\\d{4,6})","$1 $2",["3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2","3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))"],"(0$1)"],["(\\d{5})(\\d{4})","$1 $2",["346|4(?:27|9[35])|883","3469|4(?:279|9(?:30|56))|8834"],"(0$1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|8[2-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{4})(\\d{1,2})(\\d{3})(\\d{4})","$1 $2 $3 $4",["1"]]],"0"],PK:["92","00","122\\d{6}|[24-8]\\d{10,11}|9(?:[013-9]\\d{8,10}|2(?:[01]\\d\\d|2(?:[06-8]\\d|1[01]))\\d{7})|(?:[2-8]\\d{3}|92(?:[0-7]\\d|8[1-9]))\\d{6}|[24-9]\\d{8}|[89]\\d{7}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,7})","$1 $2 $3",["[89]0"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["1"]],["(\\d{3})(\\d{6,7})","$1 $2",["2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])","9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]"],"(0$1)"],["(\\d{2})(\\d{7,8})","$1 $2",["(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]"],"(0$1)"],["(\\d{5})(\\d{5})","$1 $2",["58"],"(0$1)"],["(\\d{3})(\\d{7})","$1 $2",["3"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[24-9]"],"(0$1)"]],"0"],PL:["48","00","(?:6|8\\d\\d)\\d{7}|[1-9]\\d{6}(?:\\d{2})?|[26]\\d{5}",[6,7,8,9,10],[["(\\d{5})","$1",["19"]],["(\\d{3})(\\d{3})","$1 $2",["11|20|64"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1","(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19"]],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["64"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["21|39|45|5[0137]|6[0469]|7[02389]|8(?:0[14]|8)"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[2-8]|[2-7]|8[1-79]|9[145]"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["8"]]]],PM:["508","00","[45]\\d{5}|(?:708|80\\d)\\d{6}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[45]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],PR:["1","011","(?:[589]\\d\\d|787)\\d{7}",[10],0,"1",0,0,0,0,"787|939"],PS:["970","00","[2489]2\\d{6}|(?:1\\d|5)\\d{8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2489]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["5"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],PT:["351","00","1693\\d{5}|(?:[26-9]\\d|30)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["2[12]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["16|[236-9]"]]]],PW:["680","01[12]","(?:[24-8]\\d\\d|345|900)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],PY:["595","00","59\\d{4,6}|9\\d{5,10}|(?:[2-46-8]\\d|5[0-8])\\d{4,7}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3,6})","$1 $2",["[2-9]0"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[26]1|3[289]|4[1246-8]|7[1-3]|8[1-36]"],"(0$1)"],["(\\d{3})(\\d{4,5})","$1 $2",["2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["87"]],["(\\d{3})(\\d{6})","$1 $2",["9(?:[5-79]|8[1-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["9"]]],"0"],QA:["974","00","800\\d{4}|(?:2|800)\\d{6}|(?:0080|[3-7])\\d{7}",[7,8,9,11],[["(\\d{3})(\\d{4})","$1 $2",["2[16]|8"]],["(\\d{4})(\\d{4})","$1 $2",["[3-7]"]]]],RE:["262","00","(?:26|[689]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2689]"],"0$1"]],"0",0,0,0,0,0,[["26(?:2\\d\\d|3(?:0\\d|1[0-6]))\\d{4}"],["69(?:2\\d\\d|3(?:[06][0-6]|1[013]|2[0-2]|3[0-39]|4\\d|5[0-5]|7[0-37]|8[0-8]|9[0-479]))\\d{4}"],["80\\d{7}"],["89[1-37-9]\\d{6}"],0,0,0,0,["9(?:399[0-3]|479[0-5]|76(?:2[27]|3[0-37]))\\d{4}"],["8(?:1[019]|2[0156]|84|90)\\d{6}"]]],RO:["40","00","(?:[236-8]\\d|90)\\d{7}|[23]\\d{5}",[6,9],[["(\\d{3})(\\d{3})","$1 $2",["2[3-6]","2[3-6]\\d9"],"0$1"],["(\\d{2})(\\d{4})","$1 $2",["219|31"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[23]1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[236-9]"],"0$1"]],"0",0,0,0,0,0,0,0," int "],RS:["381","00","38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}",[6,7,8,9,10,11,12],[["(\\d{3})(\\d{3,9})","$1 $2",["(?:2[389]|39)0|[7-9]"],"0$1"],["(\\d{2})(\\d{5,10})","$1 $2",["[1-36]"],"0$1"]],"0"],RU:["7","810","8\\d{13}|[347-9]\\d{9}",[10,14],[["(\\d{4})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-8]|2[1-9])","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:1[23]|[2-9]2))","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2"],"8 ($1)",1],["(\\d{5})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-68]|2[1-9])","7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))","7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[349]|8(?:[02-7]|1[1-8])"],"8 ($1)",1],["(\\d{4})(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3 $4",["8"],"8 ($1)"]],"8",0,0,0,0,"3[04-689]|[489]",0,"8~10"],RW:["250","00","(?:06|[27]\\d\\d|[89]00)\\d{6}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[7-9]"],"0$1"]],"0"],SA:["966","00","92\\d{7}|(?:[15]|8\\d)\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["9"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["81"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]],"0"],SB:["677","0[01]","(?:[1-6]|[7-9]\\d\\d)\\d{4}",[5,7],[["(\\d{2})(\\d{5})","$1 $2",["7|8[4-9]|9(?:[1-8]|9[0-8])"]]]],SC:["248","010|0[0-2]","800\\d{4}|(?:[249]\\d|64)\\d{5}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[246]|9[57]"]]],0,0,0,0,0,0,0,"00"],SD:["249","00","[19]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[19]"],"0$1"]],"0"],SE:["46","00","(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{2,3})(\\d{2})","$1-$2 $3",["20"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{4})","$1-$2",["9(?:00|39|44|9)"],"0$1",0,"$1 $2"],["(\\d{2})(\\d{3})(\\d{2})","$1-$2 $3",["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3"],["(\\d)(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2,3})(\\d{2})","$1-$2 $3",["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{2,3})(\\d{3})","$1-$2 $3",["9(?:00|39|44)"],"0$1",0,"$1 $2 $3"],["(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3 $4"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["10|7"],"0$1",0,"$1 $2 $3 $4"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1-$2 $3 $4",["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{3})","$1-$2 $3 $4",["9"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4 $5",["[26]"],"0$1",0,"$1 $2 $3 $4 $5"]],"0"],SG:["65","0[0-3]\\d","(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["[369]|8(?:0[1-9]|[1-9])"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]],["(\\d{4})(\\d{4})(\\d{3})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],SH:["290","00","(?:[256]\\d|8)\\d{3}",[4,5],0,0,0,0,0,0,"[256]"],SI:["386","00|10(?:22|66|88|99)","[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}",[5,6,7,8],[["(\\d{2})(\\d{3,6})","$1 $2",["8[09]|9"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["59|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37][01]|4[0139]|51|6"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-57]"],"(0$1)"]],"0",0,0,0,0,0,0,"00"],SJ:["47","00","0\\d{4}|(?:[489]\\d|79)\\d{6}",[5,8],0,0,0,0,0,0,"79"],SK:["421","00","[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}",[6,7,9],[["(\\d)(\\d{2})(\\d{3,4})","$1 $2 $3",["21"],"0$1"],["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["[3-5][1-8]1","[3-5][1-8]1[67]"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1/$2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[689]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1/$2 $3 $4",["[3-5]"],"0$1"]],"0"],SL:["232","00","(?:[237-9]\\d|66)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[236-9]"],"(0$1)"]],"0"],SM:["378","00","(?:0549|[5-7]\\d)\\d{6}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]"]],["(\\d{4})(\\d{6})","$1 $2",["0"]]],0,0,"([89]\\d{5})$","0549$1"],SN:["221","00","(?:[378]\\d|93)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[379]"]]]],SO:["252","00","[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}",[6,7,8,9],[["(\\d{2})(\\d{4})","$1 $2",["8[125]"]],["(\\d{6})","$1",["[134]"]],["(\\d)(\\d{6})","$1 $2",["[15]|2[0-79]|3[0-46-8]|4[0-7]"]],["(\\d)(\\d{7})","$1 $2",["(?:2|90)4|[67]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[348]|64|79|90"]],["(\\d{2})(\\d{5,7})","$1 $2",["1|28|6[0-35-9]|77|9[2-9]"]]],"0"],SR:["597","00","(?:[2-5]|68|[78]\\d)\\d{5}",[6,7],[["(\\d{2})(\\d{2})(\\d{2})","$1-$2-$3",["56"]],["(\\d{3})(\\d{3})","$1-$2",["[2-5]"]],["(\\d{3})(\\d{4})","$1-$2",["[6-8]"]]]],SS:["211","00","[19]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[19]"],"0$1"]],"0"],ST:["239","00","(?:22|9\\d)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[29]"]]]],SV:["503","00","[267]\\d{7}|(?:80\\d|900)\\d{4}(?:\\d{4})?",[7,8,11],[["(\\d{3})(\\d{4})","$1 $2",["[89]"]],["(\\d{4})(\\d{4})","$1 $2",["[267]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[89]"]]]],SX:["1","011","7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"(5\\d{6})$|1","721$1",0,"721"],SY:["963","00","[1-39]\\d{8}|[1-5]\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-5]"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1",1]],"0"],SZ:["268","00","0800\\d{4}|(?:[237]\\d|900)\\d{6}",[8,9],[["(\\d{4})(\\d{4})","$1 $2",["[0237]"]],["(\\d{5})(\\d{4})","$1 $2",["9"]]]],TA:["290","00","8\\d{3}",[4],0,0,0,0,0,0,"8"],TC:["1","011","(?:[58]\\d\\d|649|900)\\d{7}",[10],0,"1",0,"([2-479]\\d{6})$|1","649$1",0,"649"],TD:["235","00|16","(?:22|[69]\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2679]"]]],0,0,0,0,0,0,0,"00"],TG:["228","00","[279]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[279]"]]]],TH:["66","00[1-9]","(?:001800|[2-57]|[689]\\d)\\d{7}|1\\d{7,9}",[8,9,10,13],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[13-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],TJ:["992","810","[0-57-9]\\d{8}",[9],[["(\\d{6})(\\d)(\\d{2})","$1 $2 $3",["331","3317"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["44[02-479]|[34]7"]],["(\\d{4})(\\d)(\\d{4})","$1 $2 $3",["3[1-5]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[0-57-9]"]]],0,0,0,0,0,0,0,"8~10"],TK:["690","00","[2-47]\\d{3,6}",[4,5,6,7]],TL:["670","00","7\\d{7}|(?:[2-47]\\d|[89]0)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[2-489]|70"]],["(\\d{4})(\\d{4})","$1 $2",["7"]]]],TM:["993","810","[1-6]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["12"],"(8 $1)"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-5]"],"(8 $1)"],["(\\d{2})(\\d{6})","$1 $2",["6"],"8 $1"]],"8",0,0,0,0,0,0,"8~10"],TN:["216","00","[2-57-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-57-9]"]]]],TO:["676","00","(?:0800|(?:[5-8]\\d\\d|999)\\d)\\d{3}|[2-8]\\d{4}",[5,7],[["(\\d{2})(\\d{3})","$1-$2",["[2-4]|50|6[09]|7[0-24-69]|8[05]"]],["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[5-9]"]]]],TR:["90","00","4\\d{6}|8\\d{11,12}|(?:[2-58]\\d\\d|900)\\d{7}",[7,10,12,13],[["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["512|8[01589]|90"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5(?:[0-59]|61)","5(?:[0-59]|61[06])","5(?:[0-59]|61[06]1)"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24][1-8]|3[1-9]"],"(0$1)",1],["(\\d{3})(\\d{3})(\\d{6,7})","$1 $2 $3",["80"],"0$1",1]],"0"],TT:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-46-8]\\d{6})$|1","868$1",0,"868"],TV:["688","00","(?:2|7\\d\\d|90)\\d{4}",[5,6,7],[["(\\d{2})(\\d{3})","$1 $2",["2"]],["(\\d{2})(\\d{4})","$1 $2",["90"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],TW:["886","0(?:0[25-79]|19)","[2-689]\\d{8}|7\\d{9,10}|[2-8]\\d{7}|2\\d{6}",[7,8,9,10,11],[["(\\d{2})(\\d)(\\d{4})","$1 $2 $3",["202"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[258]0"],"0$1"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["[23568]|4(?:0[02-48]|[1-47-9])|7[1-9]","[23568]|4(?:0[2-48]|[1-47-9])|(?:400|7)[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,5})","$1 $2 $3",["7"],"0$1"]],"0",0,0,0,0,0,0,0,"#"],TZ:["255","00[056]","(?:[25-8]\\d|41|90)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[24]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["5"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[67]"],"0$1"]],"0"],UA:["380","00","[89]\\d{9}|[3-9]\\d{8}",[9,10],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6[12][29]|(?:3[1-8]|4[136-8]|5[12457]|6[49])2|(?:56|65)[24]","6[12][29]|(?:35|4[1378]|5[12457]|6[49])2|(?:56|65)[24]|(?:3[1-46-8]|46)2[013-9]"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6[0135689]|7[4-6])|6(?:[12][3-7]|[459])","3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6(?:[015689]|3[02389])|7[4-6])|6(?:[12][3-7]|[459])"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|89|9[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0",0,0,0,0,0,0,"0~0"],UG:["256","00[057]","800\\d{6}|(?:[29]0|[347]\\d)\\d{7}",[9],[["(\\d{4})(\\d{5})","$1 $2",["202","2024"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[27-9]|4(?:6[45]|[7-9])"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[34]"],"0$1"]],"0"],US:["1","011","[2-9]\\d{9}|3\\d{6}",[10],[["(\\d{3})(\\d{4})","$1-$2",["310"],0,1],["(\\d{3})(\\d{3})(\\d{4})","($1) $2-$3",["[2-9]"],0,1,"$1-$2-$3"]],"1",0,0,0,0,0,[["(?:5056(?:[0-35-9]\\d|4[468])|7302[0-3]\\d)\\d{4}|(?:472[24]|505[2-57-9]|7306|983[237-9])\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[149]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-57-9]|1[02-9]|2[013569]|3[0-24679]|4[167]|5[0-2]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-47-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-29])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[1247]|4[037]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[068]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-389]|8[04-69]))[2-9]\\d{6}"],[""],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"]]],UY:["598","0(?:0|1[3-9]\\d)","0004\\d{2,9}|[1249]\\d{7}|(?:[49]\\d|80)\\d{5}",[6,7,8,9,10,11,12,13],[["(\\d{3})(\\d{3,4})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[49]0|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[124]"]],["(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3 $4",["0"]]],"0",0,0,0,0,0,0,"00"," int. "],UZ:["998","810","(?:20|33|[5-79]\\d|88)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[235-9]"],"8 $1"]],"8",0,0,0,0,0,0,"8~10"],VA:["39","00","0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}",[6,7,8,9,10,11],0,0,0,0,0,0,"06698"],VC:["1","011","(?:[58]\\d\\d|784|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","784$1",0,"784"],VE:["58","00","[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}",[10],[["(\\d{3})(\\d{7})","$1-$2",["[24-689]"],"0$1"]],"0"],VG:["1","011","(?:284|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-578]\\d{6})$|1","284$1",0,"284"],VI:["1","011","[58]\\d{9}|(?:34|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","340$1",0,"340"],VN:["84","00","[12]\\d{9}|[135-9]\\d{8}|[16]\\d{7}|[16-8]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["80"],"0$1",1],["(\\d{4})(\\d{4,6})","$1 $2",["1"],0,1],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["6"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[357-9]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["2[48]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["2"],"0$1",1]],"0"],VU:["678","00","[57-9]\\d{6}|(?:[238]\\d|48)\\d{3}",[5,7],[["(\\d{3})(\\d{4})","$1 $2",["[57-9]"]]]],WF:["681","00","(?:40|72)\\d{4}|8\\d{5}(?:\\d{3})?",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[478]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],WS:["685","0","(?:[2-6]|8\\d{5})\\d{4}|[78]\\d{6}|[68]\\d{5}",[5,6,7,10],[["(\\d{5})","$1",["[2-5]|6[1-9]"]],["(\\d{3})(\\d{3,7})","$1 $2",["[68]"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],XK:["383","00","[23]\\d{7,8}|(?:4\\d\\d|[89]00)\\d{5}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[23]"],"0$1"]],"0"],YE:["967","00","(?:1|7\\d)\\d{7}|[1-7]\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-6]|7(?:[24-6]|8[0-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"],"0$1"]],"0"],YT:["262","00","(?:80|9\\d)\\d{7}|(?:26|63)9\\d{6}",[9],0,"0",0,0,0,0,0,[["269(?:0[0-467]|15|5[0-4]|6\\d|[78]0)\\d{4}"],["639(?:0[0-79]|1[019]|[267]\\d|3[09]|40|5[05-9]|9[04-79])\\d{4}"],["80\\d{7}"],0,0,0,0,0,["9(?:(?:39|47)8[01]|769\\d)\\d{4}"]]],ZA:["27","00","[1-79]\\d{8}|8\\d{4,9}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,4})","$1 $2",["8[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["8[1-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["860"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],ZM:["260","00","800\\d{6}|(?:21|63|[79]\\d)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[28]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[79]"],"0$1"]],"0"],ZW:["263","00","2(?:[0-57-9]\\d{6,8}|6[0-24-9]\\d{6,7})|[38]\\d{9}|[35-8]\\d{8}|[3-6]\\d{7}|[1-689]\\d{6}|[1-3569]\\d{5}|[1356]\\d{4}",[5,6,7,8,9,10],[["(\\d{3})(\\d{3,5})","$1 $2",["2(?:0[45]|2[278]|[49]8)|3(?:[09]8|17)|6(?:[29]8|37|75)|[23][78]|(?:33|5[15]|6[68])[78]"],"0$1"],["(\\d)(\\d{3})(\\d{2,4})","$1 $2 $3",["[49]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["80"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["24|8[13-59]|(?:2[05-79]|39|5[45]|6[15-8])2","2(?:02[014]|4|[56]20|[79]2)|392|5(?:42|525)|6(?:[16-8]21|52[013])|8[13-59]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:1[39]|2[0157]|[378]|[56][14])|3(?:12|29)","2(?:1[39]|2[0157]|[378]|[56][14])|3(?:123|29)"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["1|2(?:0[0-36-9]|12|29|[56])|3(?:1[0-689]|[24-6])|5(?:[0236-9]|1[2-4])|6(?:[013-59]|7[0-46-9])|(?:33|55|6[68])[0-69]|(?:29|3[09]|62)[0-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["29[013-9]|39|54"],"0$1"],["(\\d{4})(\\d{3,5})","$1 $2",["(?:25|54)8","258|5483"],"0$1"]],"0"]},nonGeographic:{800:["800",0,"(?:00|[1-9]\\d)\\d{6}",[8],[["(\\d{4})(\\d{4})","$1 $2",["\\d"]]],0,0,0,0,0,0,[0,0,["(?:00|[1-9]\\d)\\d{6}"]]],808:["808",0,"[1-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[1-9]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,0,["[1-9]\\d{7}"]]],870:["870",0,"7\\d{11}|[35-7]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[35-7]"]]],0,0,0,0,0,0,[0,["(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}"]]],878:["878",0,"10\\d{10}",[12],[["(\\d{2})(\\d{5})(\\d{5})","$1 $2 $3",["1"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["10\\d{10}"]]],881:["881",0,"6\\d{9}|[0-36-9]\\d{8}",[9,10],[["(\\d)(\\d{3})(\\d{5})","$1 $2 $3",["[0-37-9]"]],["(\\d)(\\d{3})(\\d{5,6})","$1 $2 $3",["6"]]],0,0,0,0,0,0,[0,["6\\d{9}|[0-36-9]\\d{8}"]]],882:["882",0,"[13]\\d{6}(?:\\d{2,5})?|[19]\\d{7}|(?:[25]\\d\\d|4)\\d{7}(?:\\d{2})?",[7,8,9,10,11,12],[["(\\d{2})(\\d{5})","$1 $2",["16|342"]],["(\\d{2})(\\d{6})","$1 $2",["49"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["1[36]|9"]],["(\\d{2})(\\d{4})(\\d{3})","$1 $2 $3",["3[23]"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["16"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|23|3(?:[15]|4[57])|4|51"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["34"]],["(\\d{2})(\\d{4,5})(\\d{5})","$1 $2 $3",["[1-35]"]]],0,0,0,0,0,0,[0,["342\\d{4}|(?:337|49)\\d{6}|(?:3(?:2|47|7\\d{3})|50\\d{3})\\d{7}",[7,8,9,10,12]],0,0,0,0,0,0,["1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15-8]|9[0689])\\d{4}|6\\d{5,10})|(?:345\\d|9[89])\\d{6}|(?:10|2(?:3|85\\d)|3(?:[15]|[69]\\d\\d)|4[15-8]|51)\\d{8}"]]],883:["883",0,"(?:[1-4]\\d|51)\\d{6,10}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,8})","$1 $2 $3",["[14]|2[24-689]|3[02-689]|51[24-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["510"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["21"]],["(\\d{4})(\\d{4})(\\d{4})","$1 $2 $3",["51[13]"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[235]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["(?:2(?:00\\d\\d|10)|(?:370[1-9]|51\\d0)\\d)\\d{7}|51(?:00\\d{5}|[24-9]0\\d{4,7})|(?:1[0-79]|2[24-689]|3[02-689]|4[0-4])0\\d{5,9}"]]],888:["888",0,"\\d{11}",[11],[["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3"]],0,0,0,0,0,0,[0,0,0,0,0,0,["\\d{11}"]]],979:["979",0,"[1359]\\d{8}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[1359]"]]],0,0,0,0,0,0,[0,0,0,["[1359]\\d{8}"]]]}};function xd(t,e){var n=Array.prototype.slice.call(e);return n.push(Q2),t.apply(this,n)}function kr(t){"@babel/helpers - typeof";return kr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},kr(t)}function kd(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function ey(t,e,n){return e&&kd(t.prototype,e),n&&kd(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function ty(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ny(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Yn(t,e)}function oy(t){var e=vd();return function(){var o=Un(t),i;if(e){var s=Un(this).constructor;i=Reflect.construct(o,arguments,s)}else i=o.apply(this,arguments);return iy(this,i)}}function iy(t,e){if(e&&(kr(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Sd(t)}function Sd(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Sr(t){var e=typeof Map=="function"?new Map:void 0;return Sr=function(o){if(o===null||!ry(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e<"u"){if(e.has(o))return e.get(o);e.set(o,i)}function i(){return Yo(o,arguments,Un(this).constructor)}return i.prototype=Object.create(o.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),Yn(i,o)},Sr(t)}function Yo(t,e,n){return vd()?Yo=Reflect.construct:Yo=function(i,s,l){var a=[null];a.push.apply(a,s);var d=Function.bind.apply(i,a),c=new d;return l&&Yn(c,l.prototype),c},Yo.apply(null,arguments)}function vd(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ry(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function Yn(t,e){return Yn=Object.setPrototypeOf||function(o,i){return o.__proto__=i,o},Yn(t,e)}function Un(t){return Un=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Un(t)}var at=function(t){ny(n,t);var e=oy(n);function n(o){var i;return ty(this,n),i=e.call(this,o),Object.setPrototypeOf(Sd(i),n.prototype),i.name=i.constructor.name,i}return ey(n)}(Sr(Error)),vr=2,sy=17,ly=3,ze="0-90-9٠-٩۰-۹",ay="-‐-―−ー-",dy="//",cy="..",uy="  ­​⁠ ",fy="()()[]\\[\\]",hy="~⁓∼~",Uo="".concat(ay).concat(dy).concat(cy).concat(uy).concat(fy).concat(hy),Mr="++";function Md(t,e){t=t.split("-"),e=e.split("-");for(var n=t[0].split("."),o=e[0].split("."),i=0;i<3;i++){var s=Number(n[i]),l=Number(o[i]);if(s>l)return 1;if(l>s)return-1;if(!isNaN(s)&&isNaN(l))return 1;if(isNaN(s)&&!isNaN(l))return-1}return t[1]&&e[1]?t[1]>e[1]?1:t[1]<e[1]?-1:0:!t[1]&&e[1]?1:t[1]&&!e[1]?-1:0}var py={}.constructor;function Go(t){return t!=null&&t.constructor===py}function Dr(t){"@babel/helpers - typeof";return Dr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Dr(t)}function qo(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Dd(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function Xo(t,e,n){return e&&Dd(t.prototype,e),n&&Dd(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}var my="1.2.0",gy="1.7.35",Ed=" ext. ",yy=/^\d+$/,Ce=function(){function t(e){qo(this,t),wy(e),this.metadata=e,Pd.call(this,e)}return Xo(t,[{key:"getCountries",value:function(){return Object.keys(this.metadata.countries).filter(function(n){return n!=="001"})}},{key:"getCountryMetadata",value:function(n){return this.metadata.countries[n]}},{key:"nonGeographic",value:function(){if(!(this.v1||this.v2||this.v3))return this.metadata.nonGeographic||this.metadata.nonGeographical}},{key:"hasCountry",value:function(n){return this.getCountryMetadata(n)!==void 0}},{key:"hasCallingCode",value:function(n){if(this.getCountryCodesForCallingCode(n))return!0;if(this.nonGeographic()){if(this.nonGeographic()[n])return!0}else{var o=this.countryCallingCodes()[n];if(o&&o.length===1&&o[0]==="001")return!0}}},{key:"isNonGeographicCallingCode",value:function(n){return this.nonGeographic()?!!this.nonGeographic()[n]:!this.getCountryCodesForCallingCode(n)}},{key:"country",value:function(n){return this.selectNumberingPlan(n)}},{key:"selectNumberingPlan",value:function(n,o){if(n&&yy.test(n)&&(o=n,n=null),n&&n!=="001"){if(!this.hasCountry(n))throw new Error("Unknown country: ".concat(n));this.numberingPlan=new Bd(this.getCountryMetadata(n),this)}else if(o){if(!this.hasCallingCode(o))throw new Error("Unknown calling code: ".concat(o));this.numberingPlan=new Bd(this.getNumberingPlanMetadata(o),this)}else this.numberingPlan=void 0;return this}},{key:"getCountryCodesForCallingCode",value:function(n){var o=this.countryCallingCodes()[n];if(o)return o.length===1&&o[0].length===3?void 0:o}},{key:"getCountryCodeForCallingCode",value:function(n){var o=this.getCountryCodesForCallingCode(n);if(o)return o[0]}},{key:"getNumberingPlanMetadata",value:function(n){var o=this.getCountryCodeForCallingCode(n);if(o)return this.getCountryMetadata(o);if(this.nonGeographic()){var i=this.nonGeographic()[n];if(i)return i}else{var s=this.countryCallingCodes()[n];if(s&&s.length===1&&s[0]==="001")return this.metadata.countries["001"]}}},{key:"countryCallingCode",value:function(){return this.numberingPlan.callingCode()}},{key:"IDDPrefix",value:function(){return this.numberingPlan.IDDPrefix()}},{key:"defaultIDDPrefix",value:function(){return this.numberingPlan.defaultIDDPrefix()}},{key:"nationalNumberPattern",value:function(){return this.numberingPlan.nationalNumberPattern()}},{key:"possibleLengths",value:function(){return this.numberingPlan.possibleLengths()}},{key:"formats",value:function(){return this.numberingPlan.formats()}},{key:"nationalPrefixForParsing",value:function(){return this.numberingPlan.nationalPrefixForParsing()}},{key:"nationalPrefixTransformRule",value:function(){return this.numberingPlan.nationalPrefixTransformRule()}},{key:"leadingDigits",value:function(){return this.numberingPlan.leadingDigits()}},{key:"hasTypes",value:function(){return this.numberingPlan.hasTypes()}},{key:"type",value:function(n){return this.numberingPlan.type(n)}},{key:"ext",value:function(){return this.numberingPlan.ext()}},{key:"countryCallingCodes",value:function(){return this.v1?this.metadata.country_phone_code_to_countries:this.metadata.country_calling_codes}},{key:"chooseCountryByCountryCallingCode",value:function(n){return this.selectNumberingPlan(n)}},{key:"hasSelectedNumberingPlan",value:function(){return this.numberingPlan!==void 0}}]),t}(),Bd=function(){function t(e,n){qo(this,t),this.globalMetadataObject=n,this.metadata=e,Pd.call(this,n.metadata)}return Xo(t,[{key:"callingCode",value:function(){return this.metadata[0]}},{key:"getDefaultCountryMetadataForRegion",value:function(){return this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode())}},{key:"IDDPrefix",value:function(){if(!(this.v1||this.v2))return this.metadata[1]}},{key:"defaultIDDPrefix",value:function(){if(!(this.v1||this.v2))return this.metadata[12]}},{key:"nationalNumberPattern",value:function(){return this.v1||this.v2?this.metadata[1]:this.metadata[2]}},{key:"possibleLengths",value:function(){if(!this.v1)return this.metadata[this.v2?2:3]}},{key:"_getFormats",value:function(n){return n[this.v1?2:this.v2?3:4]}},{key:"formats",value:function(){var n=this,o=this._getFormats(this.metadata)||this._getFormats(this.getDefaultCountryMetadataForRegion())||[];return o.map(function(i){return new by(i,n)})}},{key:"nationalPrefix",value:function(){return this.metadata[this.v1?3:this.v2?4:5]}},{key:"_getNationalPrefixFormattingRule",value:function(n){return n[this.v1?4:this.v2?5:6]}},{key:"nationalPrefixFormattingRule",value:function(){return this._getNationalPrefixFormattingRule(this.metadata)||this._getNationalPrefixFormattingRule(this.getDefaultCountryMetadataForRegion())}},{key:"_nationalPrefixForParsing",value:function(){return this.metadata[this.v1?5:this.v2?6:7]}},{key:"nationalPrefixForParsing",value:function(){return this._nationalPrefixForParsing()||this.nationalPrefix()}},{key:"nationalPrefixTransformRule",value:function(){return this.metadata[this.v1?6:this.v2?7:8]}},{key:"_getNationalPrefixIsOptionalWhenFormatting",value:function(){return!!this.metadata[this.v1?7:this.v2?8:9]}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return this._getNationalPrefixIsOptionalWhenFormatting(this.metadata)||this._getNationalPrefixIsOptionalWhenFormatting(this.getDefaultCountryMetadataForRegion())}},{key:"leadingDigits",value:function(){return this.metadata[this.v1?8:this.v2?9:10]}},{key:"types",value:function(){return this.metadata[this.v1?9:this.v2?10:11]}},{key:"hasTypes",value:function(){return this.types()&&this.types().length===0?!1:!!this.types()}},{key:"type",value:function(n){if(this.hasTypes()&&Vd(this.types(),n))return new _y(Vd(this.types(),n),this)}},{key:"ext",value:function(){return this.v1||this.v2?Ed:this.metadata[13]||Ed}}]),t}(),by=function(){function t(e,n){qo(this,t),this._format=e,this.metadata=n}return Xo(t,[{key:"pattern",value:function(){return this._format[0]}},{key:"format",value:function(){return this._format[1]}},{key:"leadingDigitsPatterns",value:function(){return this._format[2]||[]}},{key:"nationalPrefixFormattingRule",value:function(){return this._format[3]||this.metadata.nationalPrefixFormattingRule()}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return!!this._format[4]||this.metadata.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"nationalPrefixIsMandatoryWhenFormattingInNationalFormat",value:function(){return this.usesNationalPrefix()&&!this.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"usesNationalPrefix",value:function(){return!!(this.nationalPrefixFormattingRule()&&!$y.test(this.nationalPrefixFormattingRule()))}},{key:"internationalFormat",value:function(){return this._format[5]||this.format()}}]),t}(),$y=/^\(?\$1\)?$/,_y=function(){function t(e,n){qo(this,t),this.type=e,this.metadata=n}return Xo(t,[{key:"pattern",value:function(){return this.metadata.v1?this.type:this.type[0]}},{key:"possibleLengths",value:function(){if(!this.metadata.v1)return this.type[1]||this.metadata.possibleLengths()}}]),t}();function Vd(t,e){switch(e){case"FIXED_LINE":return t[0];case"MOBILE":return t[1];case"TOLL_FREE":return t[2];case"PREMIUM_RATE":return t[3];case"PERSONAL_NUMBER":return t[4];case"VOICEMAIL":return t[5];case"UAN":return t[6];case"PAGER":return t[7];case"VOIP":return t[8];case"SHARED_COST":return t[9]}}function wy(t){if(!t)throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");if(!Go(t)||!Go(t.countries))throw new Error("[libphonenumber-js] `metadata` argument was passed but it's not a valid metadata. Must be an object having `.countries` child object property. Got ".concat(Go(t)?"an object of shape: { "+Object.keys(t).join(", ")+" }":"a "+Cy(t)+": "+t,"."))}var Cy=function(e){return Dr(e)};function Ko(t,e){if(e=new Ce(e),e.hasCountry(t))return e.country(t).countryCallingCode();throw new Error("Unknown country: ".concat(t))}function xy(t,e){return e.countries.hasOwnProperty(t)}function Pd(t){var e=t.version;typeof e=="number"?(this.v1=e===1,this.v2=e===2,this.v3=e===3,this.v4=e===4):e?Md(e,my)===-1?this.v2=!0:Md(e,gy)===-1?this.v3=!0:this.v4=!0:this.v1=!0}var ky=";ext=",nn=function(e){return"([".concat(ze,"]{1,").concat(e,"})")};function Rd(t){var e="20",n="15",o="9",i="6",s="[  \\t,]*",l="[:\\..]?[  \\t,-]*",a="#?",d="(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)",c="(?:[xx##~~]|int|int)",u="[- ]+",f="[  \\t]*",h="(?:,{2}|;)",p=ky+nn(e),m=s+d+l+nn(e)+a,g=s+c+l+nn(o)+a,y=u+nn(i)+"#",b=f+h+l+nn(n)+a,$=f+"(?:,)+"+l+nn(o)+a;return p+"|"+m+"|"+g+"|"+y+"|"+b+"|"+$}var Sy="["+ze+"]{"+vr+"}",vy="["+Mr+"]{0,1}(?:["+Uo+"]*["+ze+"]){3,}["+Uo+ze+"]*",My=new RegExp("^["+Mr+"]{0,1}(?:["+Uo+"]*["+ze+"]){1,2}$","i"),Dy=vy+"(?:"+Rd()+")?",Ey=new RegExp("^"+Sy+"$|^"+Dy+"$","i");function By(t){return t.length>=vr&&Ey.test(t)}function Vy(t){return My.test(t)}var Fd=new RegExp("(?:"+Rd()+")$","i");function Py(t){var e=t.search(Fd);if(e<0)return{};for(var n=t.slice(0,e),o=t.match(Fd),i=1;i<o.length;){if(o[i])return{number:n,ext:o[i]};i++}}var Ry={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","0":"0","1":"1","2":"2","3":"3","4":"4","5":"5","6":"6","7":"7","8":"8","9":"9","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9"};function Fy(t){return Ry[t]}function Ny(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=Ay(t))||e&&t&&typeof t.length=="number"){n&&(t=n);var o=0;return function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
28
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ay(t,e){if(t){if(typeof t=="string")return Nd(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Nd(t,e)}}function Nd(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function Ad(t){for(var e="",n=Ny(t.split("")),o;!(o=n()).done;){var i=o.value;e+=Oy(i,e)||""}return e}function Oy(t,e,n){if(t==="+"){if(e){typeof n=="function"&&n("end");return}return"+"}return Fy(t)}function Iy(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=Ty(t))||e&&t&&typeof t.length=="number"){n&&(t=n);var o=0;return function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
29
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ty(t,e){if(t){if(typeof t=="string")return Od(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Od(t,e)}}function Od(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function Ly(t,e){for(var n=t.slice(),o=Iy(e),i;!(i=o()).done;){var s=i.value;t.indexOf(s)<0&&n.push(s)}return n.sort(function(l,a){return l-a})}function Er(t,e){return Id(t,void 0,e)}function Id(t,e,n){var o=n.type(e),i=o&&o.possibleLengths()||n.possibleLengths();if(!i)return"IS_POSSIBLE";if(e==="FIXED_LINE_OR_MOBILE"){if(!n.type("FIXED_LINE"))return Id(t,"MOBILE",n);var s=n.type("MOBILE");s&&(i=Ly(i,s.possibleLengths()))}else if(e&&!o)return"INVALID_LENGTH";var l=t.length,a=i[0];return a===l?"IS_POSSIBLE":a>l?"TOO_SHORT":i[i.length-1]<l?"TOO_LONG":i.indexOf(l,1)>=0?"IS_POSSIBLE":"INVALID_LENGTH"}function zy(t,e,n){if(e===void 0&&(e={}),n=new Ce(n),e.v2){if(!t.countryCallingCode)throw new Error("Invalid phone number object passed");n.selectNumberingPlan(t.countryCallingCode)}else{if(!t.phone)return!1;if(t.country){if(!n.hasCountry(t.country))throw new Error("Unknown country: ".concat(t.country));n.country(t.country)}else{if(!t.countryCallingCode)throw new Error("Invalid phone number object passed");n.selectNumberingPlan(t.countryCallingCode)}}if(n.possibleLengths())return Td(t.phone||t.nationalNumber,n);if(t.countryCallingCode&&n.isNonGeographicCallingCode(t.countryCallingCode))return!0;throw new Error('Missing "possibleLengths" in metadata. Perhaps the metadata has been generated before v1.0.18.')}function Td(t,e){switch(Er(t,e)){case"IS_POSSIBLE":return!0;default:return!1}}function dt(t,e){return t=t||"",new RegExp("^(?:"+e+")$").test(t)}function Hy(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=jy(t))||e&&t&&typeof t.length=="number"){n&&(t=n);var o=0;return function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
30
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jy(t,e){if(t){if(typeof t=="string")return Ld(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ld(t,e)}}function Ld(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}var Wy=["MOBILE","PREMIUM_RATE","TOLL_FREE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL"];function Br(t,e,n){if(e=e||{},!(!t.country&&!t.countryCallingCode)){n=new Ce(n),n.selectNumberingPlan(t.country,t.countryCallingCode);var o=e.v2?t.nationalNumber:t.phone;if(dt(o,n.nationalNumberPattern())){if(Vr(o,"FIXED_LINE",n))return n.type("MOBILE")&&n.type("MOBILE").pattern()===""||!n.type("MOBILE")||Vr(o,"MOBILE",n)?"FIXED_LINE_OR_MOBILE":"FIXED_LINE";for(var i=Hy(Wy),s;!(s=i()).done;){var l=s.value;if(Vr(o,l,n))return l}}}}function Vr(t,e,n){return e=n.type(e),!e||!e.pattern()||e.possibleLengths()&&e.possibleLengths().indexOf(t.length)<0?!1:dt(t,e.pattern())}function Yy(t,e,n){if(e=e||{},n=new Ce(n),n.selectNumberingPlan(t.country,t.countryCallingCode),n.hasTypes())return Br(t,e,n.metadata)!==void 0;var o=e.v2?t.nationalNumber:t.phone;return dt(o,n.nationalNumberPattern())}function Uy(t,e,n){var o=new Ce(n),i=o.getCountryCodesForCallingCode(t);return i?i.filter(function(s){return Gy(e,s,n)}):[]}function Gy(t,e,n){var o=new Ce(n);return o.selectNumberingPlan(e),o.numberingPlan.possibleLengths().indexOf(t.length)>=0}function qy(t){return t.replace(new RegExp("[".concat(Uo,"]+"),"g")," ").trim()}var Xy=/(\$\d)/;function Ky(t,e,n){var o=n.useInternationalFormat,i=n.withNationalPrefix;n.carrierCode,n.metadata;var s=t.replace(new RegExp(e.pattern()),o?e.internationalFormat():i&&e.nationalPrefixFormattingRule()?e.format().replace(Xy,e.nationalPrefixFormattingRule()):e.format());return o?qy(s):s}var Zy=/^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;function Jy(t,e,n){var o=new Ce(n);if(o.selectNumberingPlan(t,e),o.defaultIDDPrefix())return o.defaultIDDPrefix();if(Zy.test(o.IDDPrefix()))return o.IDDPrefix()}function Qy(t){var e=t.number,n=t.ext;if(!e)return"";if(e[0]!=="+")throw new Error('"formatRFC3966()" expects "number" to be in E.164 format.');return"tel:".concat(e).concat(n?";ext="+n:"")}function eb(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=tb(t))||e&&t&&typeof t.length=="number"){n&&(t=n);var o=0;return function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
31
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tb(t,e){if(t){if(typeof t=="string")return zd(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return zd(t,e)}}function zd(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function Hd(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,o)}return n}function jd(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Hd(Object(n),!0).forEach(function(o){nb(t,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Hd(Object(n)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(n,o))})}return t}function nb(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Wd={formatExtension:function(e,n,o){return"".concat(e).concat(o.ext()).concat(n)}};function ob(t,e,n,o){if(n?n=jd(jd({},Wd),n):n=Wd,o=new Ce(o),t.country&&t.country!=="001"){if(!o.hasCountry(t.country))throw new Error("Unknown country: ".concat(t.country));o.country(t.country)}else if(t.countryCallingCode)o.selectNumberingPlan(t.countryCallingCode);else return t.phone||"";var i=o.countryCallingCode(),s=n.v2?t.nationalNumber:t.phone,l;switch(e){case"NATIONAL":return s?(l=Zo(s,t.carrierCode,"NATIONAL",o,n),Pr(l,t.ext,o,n.formatExtension)):"";case"INTERNATIONAL":return s?(l=Zo(s,null,"INTERNATIONAL",o,n),l="+".concat(i," ").concat(l),Pr(l,t.ext,o,n.formatExtension)):"+".concat(i);case"E.164":return"+".concat(i).concat(s);case"RFC3966":return Qy({number:"+".concat(i).concat(s),ext:t.ext});case"IDD":if(!n.fromCountry)return;var a=rb(s,t.carrierCode,i,n.fromCountry,o);return Pr(a,t.ext,o,n.formatExtension);default:throw new Error('Unknown "format" argument passed to "formatNumber()": "'.concat(e,'"'))}}function Zo(t,e,n,o,i){var s=ib(o.formats(),t);return s?Ky(t,s,{useInternationalFormat:n==="INTERNATIONAL",withNationalPrefix:!(s.nationalPrefixIsOptionalWhenFormattingInNationalFormat()&&i&&i.nationalPrefix===!1),carrierCode:e,metadata:o}):t}function ib(t,e){for(var n=eb(t),o;!(o=n()).done;){var i=o.value;if(i.leadingDigitsPatterns().length>0){var s=i.leadingDigitsPatterns()[i.leadingDigitsPatterns().length-1];if(e.search(s)!==0)continue}if(dt(e,i.pattern()))return i}}function Pr(t,e,n,o){return e?o(t,e,n):t}function rb(t,e,n,o,i){var s=Ko(o,i.metadata);if(s===n){var l=Zo(t,e,"NATIONAL",i);return n==="1"?n+" "+l:l}var a=Jy(o,void 0,i.metadata);if(a)return"".concat(a," ").concat(n," ").concat(Zo(t,null,"INTERNATIONAL",i))}function Yd(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,o)}return n}function Ud(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Yd(Object(n),!0).forEach(function(o){sb(t,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Yd(Object(n)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(n,o))})}return t}function sb(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function lb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Gd(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function ab(t,e,n){return e&&Gd(t.prototype,e),n&&Gd(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}var db=function(){function t(e,n,o){if(lb(this,t),!e)throw new TypeError("`country` or `countryCallingCode` not passed");if(!n)throw new TypeError("`nationalNumber` not passed");if(!o)throw new TypeError("`metadata` not passed");var i=ub(e,o),s=i.country,l=i.countryCallingCode;this.country=s,this.countryCallingCode=l,this.nationalNumber=n,this.number="+"+this.countryCallingCode+this.nationalNumber,this.getMetadata=function(){return o}}return ab(t,[{key:"setExt",value:function(n){this.ext=n}},{key:"getPossibleCountries",value:function(){return this.country?[this.country]:Uy(this.countryCallingCode,this.nationalNumber,this.getMetadata())}},{key:"isPossible",value:function(){return zy(this,{v2:!0},this.getMetadata())}},{key:"isValid",value:function(){return Yy(this,{v2:!0},this.getMetadata())}},{key:"isNonGeographic",value:function(){var n=new Ce(this.getMetadata());return n.isNonGeographicCallingCode(this.countryCallingCode)}},{key:"isEqual",value:function(n){return this.number===n.number&&this.ext===n.ext}},{key:"getType",value:function(){return Br(this,{v2:!0},this.getMetadata())}},{key:"format",value:function(n,o){return ob(this,n,o?Ud(Ud({},o),{},{v2:!0}):{v2:!0},this.getMetadata())}},{key:"formatNational",value:function(n){return this.format("NATIONAL",n)}},{key:"formatInternational",value:function(n){return this.format("INTERNATIONAL",n)}},{key:"getURI",value:function(n){return this.format("RFC3966",n)}}]),t}(),cb=function(e){return/^[A-Z]{2}$/.test(e)};function ub(t,e){var n,o,i=new Ce(e);return cb(t)?(n=t,i.selectNumberingPlan(n),o=i.countryCallingCode()):o=t,{country:n,countryCallingCode:o}}var fb=new RegExp("(["+ze+"])");function hb(t,e,n,o){if(e){var i=new Ce(o);i.selectNumberingPlan(e,n);var s=new RegExp(i.IDDPrefix());if(t.search(s)===0){t=t.slice(t.match(s)[0].length);var l=t.match(fb);if(!(l&&l[1]!=null&&l[1].length>0&&l[1]==="0"))return t}}}function pb(t,e){if(t&&e.numberingPlan.nationalPrefixForParsing()){var n=new RegExp("^(?:"+e.numberingPlan.nationalPrefixForParsing()+")"),o=n.exec(t);if(o){var i,s,l=o.length-1,a=l>0&&o[l];if(e.nationalPrefixTransformRule()&&a)i=t.replace(n,e.nationalPrefixTransformRule()),l>1&&(s=o[1]);else{var d=o[0];i=t.slice(d.length),a&&(s=o[1])}var c;if(a){var u=t.indexOf(o[1]),f=t.slice(0,u);f===e.numberingPlan.nationalPrefix()&&(c=e.numberingPlan.nationalPrefix())}else c=o[0];return{nationalNumber:i,nationalPrefix:c,carrierCode:s}}}return{nationalNumber:t}}function Rr(t,e){var n=pb(t,e),o=n.carrierCode,i=n.nationalNumber;if(i!==t){if(!mb(t,i,e))return{nationalNumber:t};if(e.possibleLengths()&&!gb(i,e))return{nationalNumber:t}}return{nationalNumber:i,carrierCode:o}}function mb(t,e,n){return!(dt(t,n.nationalNumberPattern())&&!dt(e,n.nationalNumberPattern()))}function gb(t,e){switch(Er(t,e)){case"TOO_SHORT":case"INVALID_LENGTH":return!1;default:return!0}}function yb(t,e,n,o){var i=e?Ko(e,o):n;if(t.indexOf(i)===0){o=new Ce(o),o.selectNumberingPlan(e,n);var s=t.slice(i.length),l=Rr(s,o),a=l.nationalNumber,d=Rr(t,o),c=d.nationalNumber;if(!dt(c,o.nationalNumberPattern())&&dt(a,o.nationalNumberPattern())||Er(c,o)==="TOO_LONG")return{countryCallingCode:i,number:s}}return{number:t}}function bb(t,e,n,o){if(!t)return{};var i;if(t[0]!=="+"){var s=hb(t,e,n,o);if(s&&s!==t)i=!0,t="+"+s;else{if(e||n){var l=yb(t,e,n,o),a=l.countryCallingCode,d=l.number;if(a)return{countryCallingCodeSource:"FROM_NUMBER_WITHOUT_PLUS_SIGN",countryCallingCode:a,number:d}}return{number:t}}}if(t[1]==="0")return{};o=new Ce(o);for(var c=2;c-1<=ly&&c<=t.length;){var u=t.slice(1,c);if(o.hasCallingCode(u))return o.selectNumberingPlan(u),{countryCallingCodeSource:i?"FROM_NUMBER_WITH_IDD":"FROM_NUMBER_WITH_PLUS_SIGN",countryCallingCode:u,number:t.slice(c)};c++}return{}}function $b(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=_b(t))||e&&t&&typeof t.length=="number"){n&&(t=n);var o=0;return function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
32
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _b(t,e){if(t){if(typeof t=="string")return qd(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qd(t,e)}}function qd(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function wb(t,e){var n=e.countries,o=e.defaultCountry,i=e.metadata;i=new Ce(i);for(var s=[],l=$b(n),a;!(a=l()).done;){var d=a.value;if(i.country(d),i.leadingDigits()){if(t&&t.search(i.leadingDigits())===0)return d}else if(Br({phone:t,country:d},void 0,i.metadata))if(o){if(d===o)return d;s.push(d)}else return d}if(s.length>0)return s[0]}var Cb=!1;function xb(t,e){var n=e.nationalNumber,o=e.defaultCountry,i=e.metadata;if(Cb&&i.isNonGeographicCallingCode(t))return"001";var s=i.getCountryCodesForCallingCode(t);if(s)return s.length===1?s[0]:wb(n,{countries:s,defaultCountry:o,metadata:i.metadata})}var Xd="+",kb="[\\-\\.\\(\\)]?",Kd="(["+ze+"]|"+kb+")",Sb="^\\"+Xd+Kd+"*["+ze+"]"+Kd+"*$",vb=new RegExp(Sb,"g"),Fr=ze,Mb="["+Fr+"]+((\\-)*["+Fr+"])*",Db="a-zA-Z",Eb="["+Db+"]+((\\-)*["+Fr+"])*",Bb="^("+Mb+"\\.)*"+Eb+"\\.?$",Vb=new RegExp(Bb,"g"),Zd="tel:",Nr=";phone-context=",Pb=";isub=";function Rb(t){var e=t.indexOf(Nr);if(e<0)return null;var n=e+Nr.length;if(n>=t.length)return"";var o=t.indexOf(";",n);return o>=0?t.substring(n,o):t.substring(n)}function Fb(t){return t===null?!0:t.length===0?!1:vb.test(t)||Vb.test(t)}function Nb(t,e){var n=e.extractFormattedPhoneNumber,o=Rb(t);if(!Fb(o))throw new at("NOT_A_NUMBER");var i;if(o===null)i=n(t)||"";else{i="",o.charAt(0)===Xd&&(i+=o);var s=t.indexOf(Zd),l;s>=0?l=s+Zd.length:l=0;var a=t.indexOf(Nr);i+=t.substring(l,a)}var d=i.indexOf(Pb);if(d>0&&(i=i.substring(0,d)),i!=="")return i}var Ab=250,Ob=new RegExp("["+Mr+ze+"]"),Ib=new RegExp("[^"+ze+"#]+$");function Tb(t,e,n){if(e=e||{},n=new Ce(n),e.defaultCountry&&!n.hasCountry(e.defaultCountry))throw e.v2?new at("INVALID_COUNTRY"):new Error("Unknown country: ".concat(e.defaultCountry));var o=zb(t,e.v2,e.extract),i=o.number,s=o.ext,l=o.error;if(!i){if(e.v2)throw l==="TOO_SHORT"?new at("TOO_SHORT"):new at("NOT_A_NUMBER");return{}}var a=jb(i,e.defaultCountry,e.defaultCallingCode,n),d=a.country,c=a.nationalNumber,u=a.countryCallingCode,f=a.countryCallingCodeSource,h=a.carrierCode;if(!n.hasSelectedNumberingPlan()){if(e.v2)throw new at("INVALID_COUNTRY");return{}}if(!c||c.length<vr){if(e.v2)throw new at("TOO_SHORT");return{}}if(c.length>sy){if(e.v2)throw new at("TOO_LONG");return{}}if(e.v2){var p=new db(u,c,n.metadata);return d&&(p.country=d),h&&(p.carrierCode=h),s&&(p.ext=s),p.__countryCallingCodeSource=f,p}var m=(e.extended?n.hasSelectedNumberingPlan():d)?dt(c,n.nationalNumberPattern()):!1;return e.extended?{country:d,countryCallingCode:u,carrierCode:h,valid:m,possible:m?!0:!!(e.extended===!0&&n.possibleLengths()&&Td(c,n)),phone:c,ext:s}:m?Hb(d,c,s):{}}function Lb(t,e,n){if(t){if(t.length>Ab){if(n)throw new at("TOO_LONG");return}if(e===!1)return t;var o=t.search(Ob);if(!(o<0))return t.slice(o).replace(Ib,"")}}function zb(t,e,n){var o=Nb(t,{extractFormattedPhoneNumber:function(l){return Lb(l,n,e)}});if(!o)return{};if(!By(o))return Vy(o)?{error:"TOO_SHORT"}:{};var i=Py(o);return i.ext?i:{number:o}}function Hb(t,e,n){var o={country:t,phone:e};return n&&(o.ext=n),o}function jb(t,e,n,o){var i=bb(Ad(t),e,n,o.metadata),s=i.countryCallingCodeSource,l=i.countryCallingCode,a=i.number,d;if(l)o.selectNumberingPlan(l);else if(a&&(e||n))o.selectNumberingPlan(e,n),e&&(d=e),l=n||Ko(e,o.metadata);else return{};if(!a)return{countryCallingCodeSource:s,countryCallingCode:l};var c=Rr(Ad(a),o),u=c.nationalNumber,f=c.carrierCode,h=xb(l,{nationalNumber:u,defaultCountry:e,metadata:o});return h&&(d=h,h==="001"||o.country(d)),{country:d,countryCallingCode:l,countryCallingCodeSource:s,nationalNumber:u,carrierCode:f}}function Jd(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,o)}return n}function Qd(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Jd(Object(n),!0).forEach(function(o){Wb(t,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Jd(Object(n)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(n,o))})}return t}function Wb(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Yb(t,e,n){return Tb(t,Qd(Qd({},e),{},{v2:!0}),n)}function ec(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,o)}return n}function Ub(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ec(Object(n),!0).forEach(function(o){Gb(t,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ec(Object(n)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(n,o))})}return t}function Gb(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function qb(t,e){return Jb(t)||Zb(t,e)||Kb(t,e)||Xb()}function Xb(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
33
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Kb(t,e){if(t){if(typeof t=="string")return tc(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tc(t,e)}}function tc(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function Zb(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var o=[],i=!0,s=!1,l,a;try{for(n=n.call(t);!(i=(l=n.next()).done)&&(o.push(l.value),!(e&&o.length===e));i=!0);}catch(d){s=!0,a=d}finally{try{!i&&n.return!=null&&n.return()}finally{if(s)throw a}}return o}}function Jb(t){if(Array.isArray(t))return t}function Qb(t){var e=Array.prototype.slice.call(t),n=qb(e,4),o=n[0],i=n[1],s=n[2],l=n[3],a,d,c;if(typeof o=="string")a=o;else throw new TypeError("A text for parsing must be a string.");if(!i||typeof i=="string")l?(d=s,c=l):(d=void 0,c=s),i&&(d=Ub({defaultCountry:i},d));else if(Go(i))s?(d=i,c=s):c=i;else throw new Error("Invalid second argument: ".concat(i));return{text:a,options:d,metadata:c}}function nc(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,o)}return n}function oc(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?nc(Object(n),!0).forEach(function(o){e$(t,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):nc(Object(n)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(n,o))})}return t}function e$(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function t$(t,e,n){e&&e.defaultCountry&&!xy(e.defaultCountry,n)&&(e=oc(oc({},e),{},{defaultCountry:void 0}));try{return Yb(t,e,n)}catch(o){if(!(o instanceof at))throw o}}function n$(){var t=Qb(arguments),e=t.text,n=t.options,o=t.metadata;return t$(e,n,o)}function Ar(){return xd(n$,arguments)}function o$(){return xd(Ko,arguments)}const i$=["value","inputMode","type","placeholder","minlength","maxlength","disabled","readOnly"],Or=r.defineComponent({__name:"FmTextField",props:{placeholder:{default:""},minLength:{default:0},maxLength:{default:NaN},inputmode:{default:"text"},readonly:{type:Boolean,default:!1},labelMark:{default:"none"},prependIcon:{default:""},appendIcon:{default:""},showValidBorder:{type:Boolean,default:!1},labelInfo:{default:""},showWordCount:{type:Boolean,default:!1},invalid:{type:Boolean},modelValue:{},label:{default:""},disabled:{type:Boolean,default:!1},focused:{type:Boolean},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue","focus-changed"],setup(t,{expose:e,emit:n}){const o=t,i=n,s=r.ref(null),l=Z(o,"modelValue"),{isFocused:a,focus:d,blur:c}=jn(),u=f=>{l.value=f.target.value};return e({focus:d}),(f,h)=>(r.openBlock(),r.createBlock(Ve,{modelValue:r.unref(l),"onUpdate:modelValue":h[2]||(h[2]=p=>r.isRef(l)?l.value=p:null),label:f.label,disabled:f.disabled,required:f.labelMark==="required",optional:f.labelMark==="optional",info:f.labelInfo,rules:f.rules,focused:r.unref(a),"helper-text":f.helperText,"helper-state":f.helperState},r.createSlots({default:r.withCtx(({invalid:p})=>[r.createVNode(ge,{class:"cursor-text","append-icon":f.appendIcon,"prepend-icon":f.prependIcon,focused:r.unref(a),invalid:f.invalid||p,"show-valid-border":f.showValidBorder},{prepend:r.withCtx(()=>[r.renderSlot(f.$slots,"prepend")]),append:r.withCtx(()=>[r.renderSlot(f.$slots,"append")]),default:r.withCtx(()=>[r.createElementVNode("input",{ref_key:"inputEl",ref:s,class:r.normalizeClass({"fm-text-field--input fm-typo-body-lg-400":!0,"fm-color-typo-primary":!f.disabled,"fm-color-typo-disabled":f.disabled}),value:r.unref(l),inputMode:f.inputmode,type:f.inputmode,placeholder:f.placeholder,minlength:f.minLength,maxlength:f.maxLength,disabled:f.disabled,readOnly:f.readonly,onInput:u,onFocus:h[0]||(h[0]=()=>{r.unref(d)(),i("focus-changed",!0)}),onBlur:h[1]||(h[1]=()=>{r.unref(c)(),i("focus-changed",!1)})},null,42,i$)]),_:2},1032,["append-icon","prepend-icon","focused","invalid","show-valid-border"])]),_:2},[f.label||f.$slots.label?{name:"label",fn:r.withCtx(()=>[r.renderSlot(f.$slots,"label")]),key:"0"}:void 0,f.helperText||f.$slots["helper-text"]?{name:"helper-text",fn:r.withCtx(()=>[r.renderSlot(f.$slots,"helper-text")]),key:"1"}:void 0,f.showWordCount?{name:"helper-append",fn:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass([f.disabled?"fm-color-typo-disabled":"text-fm-color-typo-secondary","fm-typo-body-sm-400"])},r.toDisplayString(f.maxLength?`${r.unref(l).length} / ${f.maxLength}`:""),3)]),key:"2"}:void 0]),1032,["modelValue","label","disabled","required","optional","info","rules","focused","helper-text","helper-state"]))}}),r$="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-my'%20viewBox='0%200%20640%20480'%3e%3cg%20clip-path='url(%23my-a)'%3e%3cpath%20fill='%23C00'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23C00'%20d='M0%200h640v34.3H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%2034.3h640v34.3H0z'/%3e%3cpath%20fill='%23C00'%20d='M0%2068.6h640v34.3H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20102.9h640V137H0z'/%3e%3cpath%20fill='%23C00'%20d='M0%20137.1h640v34.3H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20171.4h640v34.3H0z'/%3e%3cpath%20fill='%23C00'%20d='M0%20205.7h640V240H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20240h640v34.3H0z'/%3e%3cpath%20fill='%23C00'%20d='M0%20274.3h640v34.3H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20308.6h640v34.3H0z'/%3e%3cpath%20fill='%23C00'%20d='M0%20342.9h640V377H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20377.1h640v34.3H0z'/%3e%3cpath%20fill='%23C00'%20d='M0%20411.4h640v34.3H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20445.7h640V480H0z'/%3e%3cpath%20fill='%23006'%20d='M0%20.5h320v274.3H0z'/%3e%3cpath%20fill='%23FC0'%20d='m207.5%2073.8%206%2040.7%2023-34-12.4%2039.2%2035.5-20.8-28.1%2030%2041-3.2-38.3%2014.8%2038.3%2014.8-41-3.2%2028.1%2030-35.5-20.8%2012.3%2039.3-23-34.1-6%2040.7-5.9-40.7-23%2034%2012.4-39.2-35.5%2020.8%2028-30-41%203.2%2038.4-14.8-38.3-14.8%2041%203.2-28.1-30%2035.5%2020.8-12.4-39.3%2023%2034.1zm-33.3%201.7a71.1%2071.1%200%200%200-100%2065%2071.1%2071.1%200%200%200%20100%2065%2080%2080%200%200%201-83.2%206.2%2080%2080%200%200%201-43.4-71.2%2080%2080%200%200%201%20126.6-65'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='my-a'%3e%3cpath%20fill='%23fff'%20d='M0%200h640v480H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",s$="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-sg'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cclipPath%20id='sg-a'%3e%3cpath%20fill-opacity='.7'%20d='M0%200h640v480H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20clip-path='url(%23sg-a)'%3e%3cpath%20fill='%23fff'%20d='M-20%200h720v480H-20z'/%3e%3cpath%20fill='%23df0000'%20d='M-20%200h720v240H-20z'/%3e%3cpath%20fill='%23fff'%20d='M146%2040.2a84.4%2084.4%200%200%200%20.8%20165.2%2086%2086%200%200%201-106.6-59%2086%2086%200%200%201%2059-106c16-4.6%2030.8-4.7%2046.9-.2z'/%3e%3cpath%20fill='%23fff'%20d='m133%20110%204.9%2015-13-9.2-12.8%209.4%204.7-15.2-12.8-9.3%2015.9-.2%205-15%205%2015h15.8zm17.5%2052%205%2015.1-13-9.2-12.9%209.3%204.8-15.1-12.8-9.4%2015.9-.1%204.9-15.1%205%2015h16zm58.5-.4%204.9%2015.2-13-9.3-12.8%209.3%204.7-15.1-12.8-9.3%2015.9-.2%205-15%205%2015h15.8zm17.4-51.6%204.9%2015.1-13-9.2-12.8%209.3%204.8-15.1-12.9-9.4%2016-.1%204.8-15.1%205%2015h16zm-46.3-34.3%205%2015.2-13-9.3-12.9%209.4%204.8-15.2-12.8-9.4%2015.8-.1%205-15.1%205%2015h16z'/%3e%3c/g%3e%3c/svg%3e",l$={class:"flex gap-4"},a$=["src","alt"],d$=["src","alt"],c$={class:""},u$=r.defineComponent({__name:"FmPhoneNumber",props:{modelValue:{},defaultCountry:{default:"MY"},placeholder:{default:""},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:!1},focused:{type:Boolean},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=e,i=Z(n,"modelValue"),s=["MY","SG"],l=s.reduce((y,b)=>(y[b]=`+${o$(b)}`,y),{}),a=s.map(y=>({label:"",value:y}));function d(y){var b;return y?((b=Object.entries(l).find(([,$])=>y.startsWith($)))==null?void 0:b[0])??null:n.defaultCountry}const c=r.computed(()=>d(n.modelValue)),u=r.computed(()=>!c.value||!n.modelValue?l[n.defaultCountry]:n.modelValue),f=r.computed({get(){const y=Ar(u.value);return y?y.formatInternational().replace(l[c.value],"").trim():u.value.replace(l[c.value],"").trim()},set(y){const b=`${l[c.value]}${y}`,$=Ar(b);if(!$){i.value=b;return}i.value=$.formatInternational()}}),h=r.computed({get(){return c.value??n.defaultCountry},set(y){if(!c.value){o("update:modelValue",l[n.defaultCountry]);return}const $=l[c.value],x=l[y];i.value=u.value.replace($,x)}}),p=r.ref({dropdown:!1,textField:!1});function m(y){const b=c.value;if(!y.replace(l[b],"").trim().length)return!0;const x=Ar(i.value,b);return!x||!x.isValid()?"Invalid phone number":!0}const g={MY:r$,SG:s$};return(y,b)=>(r.openBlock(),r.createBlock(Ve,{modelValue:r.unref(i),"onUpdate:modelValue":b[4]||(b[4]=$=>r.isRef(i)?i.value=$:null),class:"flex gap-4",label:y.label,disabled:y.disabled,required:y.labelMark==="required",optional:y.labelMark==="optional",info:y.labelInfo,rules:[...y.rules,m],focused:p.value.dropdown||p.value.textField,"helper-text":y.helperText,"helper-state":y.helperState},r.createSlots({default:r.withCtx(({invalid:$})=>[r.createElementVNode("div",l$,[r.createVNode(Wo,{"model-value":h.value,"onUpdate:modelValue":b[0]||(b[0]=x=>h.value=x),items:r.unref(a),onDropdownChanged:b[1]||(b[1]=x=>p.value.dropdown=x)},{default:r.withCtx(()=>[r.createElementVNode("img",{class:"h-auto w-[20px]",src:g[h.value],alt:h.value},null,8,a$)]),"menu-wrapper":r.withCtx(({handleItemChange:x})=>[(r.openBlock(),r.createElementBlock(r.Fragment,null,r.renderList(s,S=>r.createVNode(Pe,{key:S,"model-value":h.value===S,"onUpdate:modelValue":C=>x(C,r.unref(a).find(V=>V.value===S))},{label:r.withCtx(()=>[r.createElementVNode("img",{class:"h-auto w-[20px]",src:g[S],alt:S},null,8,d$)]),_:2},1032,["model-value","onUpdate:modelValue"])),64))]),_:1},8,["model-value","items"]),r.createVNode(Or,{"model-value":f.value,"onUpdate:modelValue":b[2]||(b[2]=x=>f.value=x),inputmode:"tel",class:"flex-1",invalid:$,onFocusChanged:b[3]||(b[3]=x=>p.value.textField=x)},{prepend:r.withCtx(()=>[r.createElementVNode("span",c$,"("+r.toDisplayString(r.unref(l)[c.value])+")",1)]),_:2},1032,["model-value","invalid"])])]),_:2},[y.label||y.$slots.label?{name:"label",fn:r.withCtx(()=>[r.renderSlot(y.$slots,"label")]),key:"0"}:void 0,y.helperText||y.$slots["helper-text"]?{name:"helper-text",fn:r.withCtx(()=>[r.renderSlot(y.$slots,"helper-text")]),key:"1"}:void 0]),1032,["modelValue","label","disabled","required","optional","info","rules","focused","helper-text","helper-state"]))}}),f$={class:"flex gap-8 items-center"},h$=["onInput","onKeydown"],p$=K(r.defineComponent({__name:"FmPinField",props:{modelValue:{default:()=>[]},length:{default:6},type:{default:"number"}},emits:["update:modelValue","complete"],setup(t,{emit:e}){const n=e,o=t,i=Z(o,"modelValue"),s=r.ref([]),l=(f,h)=>{const p=f.target;if(o.type==="number"&&!/^[0-9]$/g.test(p.value)){p.value="";return}p.value=p.value.slice(-1),c(p.value,h),s.value[h+1]?s.value[h+1].focus():s.value[h].blur()},a=(f,h)=>{f.preventDefault();const p=f.target;p.value="",c(null,h),s.value[h-1]?s.value[h-1].focus():s.value[h].focus()},d=(f,h)=>{f.preventDefault(),f.key==="ArrowLeft"&&(s.value[h-1]?s.value[h-1].focus():s.value[h].focus()),f.key==="ArrowRight"&&(s.value[h+1]?s.value[h+1].focus():s.value[h].focus())},c=(f,h)=>{i.value=i.value.toSpliced(h,1,f)},u=(f,h)=>{s.value[h]=f};return r.onMounted(()=>{i.value=Array.from(Array(o.length).fill(null))}),r.watch(()=>i.value,()=>{i.value.every(f=>f!==null)&&n("complete",i.value.join(""))}),(f,h)=>(r.openBlock(),r.createElementBlock("div",f$,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(f.length,(p,m)=>(r.openBlock(),r.createElementBlock("input",{key:p,ref_for:!0,ref:g=>u(g,m),class:r.normalizeClass(["fm-pin-field",{"fm-pin-field--populated":r.unref(i)[m]!==null}]),type:"text",onInput:g=>l(g,m),onKeydown:[r.withKeys(g=>a(g,m),["backspace"]),r.withKeys(g=>d(g,m),["arrow-left","arrow-right"])]},null,42,h$))),128))]))}}),[["__scopeId","data-v-45a53bf7"]]),m$={class:"fm-radio-btn"},g$={class:"fm-radio-btn__input--container"},y$=["value","disabled","checked"],b$={class:"py-8"},$$={class:"fm-typo-body-lg-400"},_$={key:0,class:"fm-typo-body-md-400 text-fm-color-typo-secondary"},w$=K(r.defineComponent({__name:"FmRadio",props:{modelValue:{default:null},value:{},label:{default:""},sublabel:{default:""},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t){const e=t,n=Z(e,"modelValue"),o=r.ref(),i=r.inject(bs,null),s=()=>{l.value||(i?i.updateValue(e.value):n.value=e.value)},l=r.computed(()=>i?i.getDisabled():e.disabled),a=r.computed(()=>i?e.value===i.groupValue.value:n.value===e.value);return(d,c)=>{const u=r.resolveDirective("wave");return r.openBlock(),r.createElementBlock("div",m$,[r.createElementVNode("label",{class:r.normalizeClass({"fm-radio-btn--wrapper":!0,"cursor-not-allowed text-fm-color-typo-disabled":l.value,"cursor-pointer":!l.value}),onClick:s},[r.withDirectives((r.openBlock(),r.createElementBlock("div",g$,[r.createElementVNode("input",{ref_key:"inputEl",ref:o,class:"fm-radio-btn__input--btn",type:"radio",value:d.value,disabled:l.value,checked:a.value},null,8,y$)])),[[u,!l.value]]),r.createElementVNode("div",b$,[r.renderSlot(d.$slots,"label",{},()=>[r.createElementVNode("div",$$,r.toDisplayString(d.label),1),d.sublabel?(r.openBlock(),r.createElementBlock("div",_$,r.toDisplayString(d.sublabel),1)):r.createCommentVNode("",!0)],!0)])],2)])}}}),[["__scopeId","data-v-24fa5bf9"]]),C$=r.defineComponent({__name:"FmRadioGroup",props:{modelValue:{},inline:{type:Boolean,default:!1},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},rules:{default:()=>[t=>!!t||"This field is required"]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=Z(e,"modelValue");return r.provide(bs,{groupValue:n,getDisabled:()=>e.disabled,updateValue(o){n.value=o}}),(o,i)=>(r.openBlock(),r.createBlock(Ve,{modelValue:r.unref(n),"onUpdate:modelValue":i[0]||(i[0]=s=>r.isRef(n)?n.value=s:null),label:o.label,disabled:o.disabled,required:o.labelMark==="required",optional:o.labelMark==="optional",info:o.labelInfo,rules:o.rules,"helper-text":o.helperText,"helper-state":o.helperState},{label:r.withCtx(()=>[r.renderSlot(o.$slots,"label")]),default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass({"flex items-center gap-16 justify-start":o.inline})},[r.renderSlot(o.$slots,"default")],2)]),"helper-text":r.withCtx(()=>[r.renderSlot(o.$slots,"helper-text")]),_:3},8,["modelValue","label","disabled","required","optional","info","rules","helper-text","helper-state"]))}}),ic=r.defineComponent({__name:"FmSearch",props:{placeholder:{default:""},minLength:{default:0},maxLength:{default:NaN},inputmode:{default:"text"},readonly:{type:Boolean,default:!1},labelMark:{default:"none"},showSuccess:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},prependText:{default:""},appendText:{default:""},labelInfo:{default:""},showWordCount:{type:Boolean,default:!1},collapsible:{type:Boolean,default:!1},maxWidth:{default:void 0},modelValue:{},label:{default:""},disabled:{type:Boolean,default:!1},focused:{type:Boolean},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},setup(t){const e=t,n=r.computed(()=>{const{modelValue:u,...f}=e;return f}),o=Z(e,"modelValue"),i=r.ref(!1),s=r.ref(),l=r.ref(e.collapsible),a=r.ref(e.collapsible);function d(){var h;l.value=!1;const u=(h=s.value)==null?void 0:h.querySelector("input");if(!u)return;(Array.isArray(u.__vnode.ref)?u.__vnode.ref:[u.__vnode.ref]).forEach(p=>{var m,g,y;return(y=(g=(m=p==null?void 0:p.i)==null?void 0:m.exposed)==null?void 0:g.focus)==null?void 0:y.call(g)}),r.nextTick(()=>{u.focus()})}function c(u){if(i.value=u,!!e.collapsible){if(u){a.value=!1;return}l.value=o.value.length===0,l.value&&setTimeout(()=>{a.value=!0},250)}}return(u,f)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"componentRoot",ref:s,class:"min-w-48 relative"},[r.createVNode(Or,r.mergeProps(n.value,{modelValue:r.unref(o),"onUpdate:modelValue":f[1]||(f[1]=h=>r.isRef(o)?o.value=h:null),disabled:e.disabled||u.collapsible&&l.value,class:["w-full transition-all",{"opacity-100":!u.collapsible||!l.value,"opacity-0 pointer-events-none":u.collapsible&&l.value}],style:{width:u.collapsible&&l.value?"24px":typeof u.maxWidth=="number"?`${u.maxWidth}px`:u.maxWidth},onFocusChanged:c}),r.createSlots({_:2},[i.value?void 0:{name:"prepend",fn:r.withCtx(()=>[r.createVNode(j,{name:"search"})]),key:"0"},r.unref(o).length?{name:"append",fn:r.withCtx(()=>[r.createVNode(j,{name:"close",class:"cursor-pointer text-fm-color-neutral-gray-300",onClick:f[0]||(f[0]=h=>o.value="")})]),key:"1"}:void 0]),1040,["modelValue","disabled","class","style"]),u.collapsible?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["absolute top-0 right-0",l.value?"opacity-100":"opacity-0 pointer-events-none"]),style:r.normalizeStyle({transition:"opacity 150ms",transitionTimingFunction:l.value?"cubic-bezier(.95,-0.01,.82,.6)":"ease-out"})},[r.createVNode(J,{variant:"tertiary",icon:"search",onClick:d})],6)):r.createCommentVNode("",!0)],512))}}),x$={key:0,class:"flex fm-typo-title-sm-700 items-center justify-between text-fm-color-typo-primary"},k$={key:0},S$={class:"overflow-y-auto"},v$={key:1,class:"flex gap-8 items-center"},rc=K(r.defineComponent({__name:"FmTopSheet",props:{header:{default:""},modelValue:{type:Boolean,default:!1},dismissAway:{type:Boolean,default:!1},fullscreenSize:{default:void 0}},emits:["update:modelValue"],setup(t){const e=t,n=r.ref(null),o=Z(e,"modelValue"),i=s=>{e.dismissAway&&n.value&&s.target===n.value&&(o.value=!1)};return(s,l)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{onClick:l[0]||(l[0]=a=>o.value=!0)},[r.renderSlot(s.$slots,"top-sheet-button",{},void 0,!0)]),(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(r.Transition,null,{default:r.withCtx(()=>[r.unref(o)?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"overlayRef",ref:n,class:"fm-top-sheet--container",onClick:l[1]||(l[1]=a=>i(a))},[r.createVNode(r.Transition,{name:s.fullscreenSize?`slide-${s.fullscreenSize}`:"slide",appear:""},{default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass(["fm-top-sheet",`fm-top-sheet--fullscreen-${s.fullscreenSize}`])},[s.header||s.$slots["top-sheet-header"]?(r.openBlock(),r.createElementBlock("div",x$,[r.renderSlot(s.$slots,"top-sheet-header",{},()=>[s.header?(r.openBlock(),r.createElementBlock("div",k$,r.toDisplayString(s.header),1)):r.createCommentVNode("",!0)],!0)])):r.createCommentVNode("",!0),r.createElementVNode("div",S$,[r.renderSlot(s.$slots,"default",{},void 0,!0)]),s.$slots["top-sheet-footer"]?(r.openBlock(),r.createElementBlock("div",v$,[r.renderSlot(s.$slots,"top-sheet-footer",{},void 0,!0)])):r.createCommentVNode("",!0)],2)]),_:3},8,["name"])],512)):r.createCommentVNode("",!0)]),_:3})]))]))}}),[["__scopeId","data-v-51e90de4"]]);var Ir={exports:{}};function sc(t,e=100,n={}){if(typeof t!="function")throw new TypeError(`Expected the first parameter to be a function, got \`${typeof t}\`.`);if(e<0)throw new RangeError("`wait` must not be negative.");const{immediate:o}=typeof n=="boolean"?{immediate:n}:n;let i,s,l,a,d;function c(){const f=Date.now()-a;if(f<e&&f>=0)l=setTimeout(c,e-f);else if(l=void 0,!o){const h=i,p=s;i=void 0,s=void 0,d=t.apply(h,p)}}const u=function(...f){if(i&&this!==i)throw new Error("Debounced method called with different contexts.");i=this,s=f,a=Date.now();const h=o&&!l;if(l||(l=setTimeout(c,e)),h){const p=i,m=s;i=void 0,s=void 0,d=t.apply(p,m)}return d};return u.clear=()=>{l&&(clearTimeout(l),l=void 0)},u.flush=()=>{if(!l)return;const f=i,h=s;i=void 0,s=void 0,d=t.apply(f,h),clearTimeout(l),l=void 0},u}Ir.exports.debounce=sc,Ir.exports=sc;var M$=Ir.exports;const lc=cr(M$);var ac={exports:{}};(function(t,e){(function(){var n={};t.exports=n,n.simpleFilter=function(o,i){return i.filter(function(s){return n.test(o,s)})},n.test=function(o,i){return n.match(o,i)!==null},n.match=function(o,i,s){s=s||{};var l=0,a=[],d=i.length,c=0,u=0,f=s.pre||"",h=s.post||"",p=s.caseSensitive&&i||i.toLowerCase(),m;o=s.caseSensitive&&o||o.toLowerCase();for(var g=0;g<d;g++)m=i[g],p[g]===o[l]?(m=f+m+h,l+=1,u+=1+u):u=0,c+=u,a[a.length]=m;return l===o.length?(c=p===o?1/0:c,{rendered:a.join(""),score:c}):null},n.filter=function(o,i,s){return!i||i.length===0?[]:typeof o!="string"?i:(s=s||{},i.reduce(function(l,a,d,c){var u=a;s.extract&&(u=s.extract(a));var f=n.match(o,u,s);return f!=null&&(l[l.length]={string:f.rendered,score:f.score,index:d,original:a}),l},[]).sort(function(l,a){var d=a.score-l.score;return d||l.index-a.index}))}})()})(ac);var D$=ac.exports;const E$=cr(D$);function Jo(t,e){const[n]=E$.filter(t.toLocaleLowerCase(),[e],{pre:"|",post:"|",extract(i){return i.toLocaleLowerCase()}});if(!n)return{label:e,segments:[{segment:e,isMatch:!1}],matched:!1};const o=n.string.toString().replace(/\|\|/g,"").split("|").reduce((i,s,l)=>(i.push({segment:s,isMatch:l%2!==0}),i),new Array);return{label:e,segments:o,matched:!0}}const B$={class:"flex flex-col gap-4"},V$={class:"bg-white flex gap-4 px-24 py-8 sticky top-0"},P$={class:"hidden sm:inline xs:inline"},R$={key:0},F$={key:0,class:"flex flex-col"},N$={class:"flex flex-col"},A$={class:"flex items-center px-24 py-12"},O$=r.createElementVNode("div",{class:"fm-typo-body-md-400 text-fm-color-typo-secondary"}," Recent search ",-1),I$=r.createElementVNode("div",{class:"py-4"},[r.createElementVNode("hr",{class:"border-fm-color-neutral-gray-100"})],-1),T$=["onClick"],L$={class:"fm-typo-body-lg-400 text-fm-color-typo-primary"},z$={class:"fm-typo-body-lg-400 px-24 py-12 text-center text-fm-color-primary"},H$={class:"fm-typo-body-lg-400 px-24 py-12 text-center text-fm-color-typo-secondary"},j$={key:3,class:"flex flex-col"},W$=["onClick"],Y$={class:"flex flex-col gap-4"},U$={key:0,class:"text-fm-color-typo-secondary"},G$={class:"px-16 py-4"},q$=5,X$=r.defineComponent({__name:"FmGlobalSearch",props:{show:{type:Boolean,default:!1},modelValue:{default:""},suggestions:{default:void 0},onSearch:{type:Function,default:void 0},placeholder:{default:""},hintPlaceholder:{default:""},notFoundPlaceholder:{default:""},recentSearchKey:{default:""}},emits:["dismiss","submit","update:show","update:modelValue"],setup(t,{emit:e}){const n=t,o=e;function i(){if(!n.recentSearchKey)return;const N=n.recentSearchKey;localStorage.removeItem(N),a.value=[]}function s(){if(!n.recentSearchKey)return;const N=n.recentSearchKey,P=localStorage.getItem(N);if(!P)return[];try{return JSON.parse(P)}catch{return new Array}}const l=lc(function(P){if(!n.recentSearchKey)return;const w=n.recentSearchKey,_=P().trim();if(!w||!_)return;const D=s()??[],v=[...new Set([_,...D])].slice(0,q$),M=JSON.stringify(v);return localStorage.setItem(w,M),a.value=v,v},800),a=r.ref(s()),d=Z(n,"show");r.watch([()=>n.show],()=>{n.show?(f.value=null,n.suggestions&&$()):o("dismiss")});const c=Z(n,"modelValue"),u=r.ref(n.modelValue);r.watch([()=>u.value],()=>{S()});const f=r.ref(null),h=r.ref(!0),p=r.computed(()=>{var N;return h.value?(N=f.value)==null?void 0:N.slice(0,5):f.value});r.watch([()=>f.value],([])=>{h.value=!0});const m=r.computed(()=>f.value===null),g=r.ref(!1),y=r.ref(""),b=()=>u.value;async function $(){if(!d.value)return;const N=b();if(!N)return;const P=Math.random().toString();if(y.value=P,n.suggestions){f.value=n.suggestions.map(w=>({label:Jo(N,w.label),sublabel:w.sublabel?Jo(N,w.sublabel):null})).filter(w=>{var _;return w.label.matched||((_=w.sublabel)==null?void 0:_.matched)}),l(b);return}if(n.onSearch)try{g.value=!0;const w=await n.onSearch(N);P===y.value&&(f.value=w.map(_=>({label:Jo(N,_.label),sublabel:_.sublabel?Jo(N,_.sublabel):null})))}catch{P===y.value&&(f.value=[])}finally{P===y.value&&(g.value=!1,l(b))}}function x(N){d.value=!1,o("dismiss"),c.value=N}const S=lc($),C=r.computed(()=>a.value&&a.value.length===0),V=r.computed(()=>(!u.value||m.value)&&!C.value),E=r.computed(()=>(!u.value||m.value)&&C.value),F=r.computed(()=>u.value&&f.value&&f.value.length===0);return(N,P)=>(r.openBlock(),r.createBlock(rc,{"model-value":r.unref(d),"onUpdate:modelValue":P[4]||(P[4]=w=>r.isRef(d)?d.value=w:null),"fullscreen-size":"sm","dismiss-away":""},{default:r.withCtx(()=>{var w,_;return[r.createElementVNode("div",B$,[r.createElementVNode("div",V$,[r.createElementVNode("div",P$,[r.createVNode(J,{"prepend-icon":"arrow_back",variant:"tertiary",onClick:P[0]||(P[0]=D=>d.value=!1)})]),r.createVNode(ic,{"model-value":u.value,"onUpdate:modelValue":P[1]||(P[1]=D=>u.value=D),class:"flex-1",placeholder:N.placeholder},null,8,["model-value","placeholder"])]),g.value?(r.openBlock(),r.createElementBlock("div",R$,[r.createVNode(ln,{size:"xl"})])):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[V.value?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[N.recentSearchKey&&((w=a.value)!=null&&w.length)?(r.openBlock(),r.createElementBlock("div",F$,[r.createElementVNode("div",N$,[r.createElementVNode("div",A$,[O$,r.createVNode(Wt),r.createVNode(J,{label:"Clear history",variant:"plain",size:"md",onClick:P[2]||(P[2]=D=>i())})]),I$]),r.createElementVNode("div",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(a.value,(D,v)=>(r.openBlock(),r.createElementBlock("div",{key:v,class:"cursor-pointer flex gap-8 hover:bg-fm-color-neutral-gray-100 items-center px-24 py-12",onClick:M=>u.value=D},[r.createVNode(j,{size:"lg",name:"history"}),r.createElementVNode("div",L$,r.toDisplayString(D),1)],8,T$))),128))])])):r.createCommentVNode("",!0)],64)):E.value?r.renderSlot(N.$slots,"hint-placeholder",{key:1},()=>[r.createElementVNode("div",z$,r.toDisplayString(N.hintPlaceholder),1)]):F.value?r.renderSlot(N.$slots,"not-found-placeholder",{key:2},()=>[r.createElementVNode("div",H$,r.toDisplayString(N.notFoundPlaceholder||`No result found for “${u.value}”`),1)]):(r.openBlock(),r.createElementBlock("div",j$,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(p.value,(D,v)=>r.renderSlot(N.$slots,"search-result-item",r.mergeProps({key:v},{result:D}),()=>[r.createElementVNode("div",{class:"cursor-pointer flex gap-16 hover:bg-fm-color-neutral-gray-100 items-center px-24 py-12 w-full",onClick:M=>x(D.label.label)},[r.createVNode(j,{size:"lg",name:"arrow_forward"}),r.createElementVNode("div",Y$,[r.createElementVNode("div",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(D.label.segments,(M,k)=>(r.openBlock(),r.createElementBlock("span",{key:k,class:r.normalizeClass({"fm-typo-body-lg-400":!M.isMatch,"fm-typo-body-lg-700":M.isMatch})},r.toDisplayString(M.segment),3))),128))]),D.sublabel?(r.openBlock(),r.createElementBlock("div",U$,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(D.sublabel.segments,(M,k)=>(r.openBlock(),r.createElementBlock("span",{key:k,class:r.normalizeClass({"fm-typo-body-md-400":!M.isMatch,"fm-typo-body-md-700":M.isMatch})},r.toDisplayString(M.segment),3))),128))])):r.createCommentVNode("",!0)])],8,W$)])),128)),r.createElementVNode("div",G$,[h.value&&(((_=f.value)==null?void 0:_.length)??0)>5?(r.openBlock(),r.createBlock(J,{key:0,label:`show ${f.value.length-5} more results`,variant:"plain",onClick:P[3]||(P[3]=D=>h.value=!1)},null,8,["label"])):r.createCommentVNode("",!0)])]))],64))])]}),_:3},8,["model-value"]))}}),K$=["inputMode","value","placeholder","readOnly"],Z$={key:0},J$=K(r.defineComponent({__name:"FmStepperField",props:{modelValue:{},placeholder:{default:""},inputmode:{default:"numeric"},readonly:{type:Boolean},labelMark:{default:"none"},step:{default:1},min:{default:void 0},max:{default:void 0},prependIcon:{default:""},appendIcon:{default:""},isCurrency:{type:Boolean,default:!1},showSteppers:{type:Boolean,default:!0},showValidBorder:{type:Boolean,default:!1},prependText:{default:""},appendText:{default:""},labelInfo:{default:""},useGrouping:{type:Boolean,default:!0},minFractionDigits:{default:0},maxFractionDigits:{default:2},label:{default:""},disabled:{type:Boolean},focused:{type:Boolean},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=Z(e,"modelValue"),{isFocused:o,blur:i,focus:s}=jn(),l=r.ref(null);let a;const d=$=>{if($!==""){const x=+$.replace(/,/g,"");return isNaN(x)?null:x}return null},c=$=>a.format($),u=$=>{if(typeof n.value!="number"){n.value=+n.value;return}if($>0&&g.value||$<0&&y.value)return;let x=b(n.value)?n.value+$:0;x=f(x),n.value=x},f=$=>e.max!==void 0&&$>e.max?e.max:e.min!==void 0&&$<e.min?e.min:$,h=()=>{var $;n.value=d((($=l.value)==null?void 0:$.value)??"")},p=$=>{if(![...Array(10).keys()].map(x=>x.toString()).includes($.key)&&!["Backspace","Tab","Enter",".","-","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes($.key)){$.preventDefault();return}},m=r.computed(()=>n.value!=null?c(n.value):""),g=r.computed(()=>{let $=!1;return e.max!==void 0&&($=n.value>=e.max),e.min!==void 0&&($=n.value<e.min),$}),y=r.computed(()=>{let $=!1;return e.max!==void 0&&($=n.value>e.max),e.min!==void 0&&($=n.value<=e.min),$});r.onBeforeMount(()=>{a=new Intl.NumberFormat("en-MY",{useGrouping:e.useGrouping,minimumFractionDigits:e.minFractionDigits,maximumFractionDigits:e.maxFractionDigits,roundingMode:"trunc"})});function b($){return typeof $=="number"&&isFinite($)}return($,x)=>(r.openBlock(),r.createBlock(Ve,{modelValue:r.unref(n),"onUpdate:modelValue":x[8]||(x[8]=S=>r.isRef(n)?n.value=S:null),label:$.label,disabled:$.disabled,required:$.labelMark==="required",optional:$.labelMark==="optional",info:$.labelInfo,rules:$.rules,focused:r.unref(o),"helper-text":$.helperText,"helper-state":$.helperState},{label:r.withCtx(()=>[r.renderSlot($.$slots,"label",{},void 0,!0)]),default:r.withCtx(({invalid:S})=>[r.createVNode(ge,{class:"cursor-text","append-icon":$.appendIcon,"prepend-icon":$.prependIcon,focused:r.unref(o),invalid:S,"show-valid-border":$.showValidBorder},{prepend:r.withCtx(()=>[r.renderSlot($.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[r.renderSlot($.$slots,"append",{},()=>[r.createElementVNode("div",{class:r.normalizeClass(["flex items-center justify-center",{"mr-32":$.showSteppers}])},[$.appendText?(r.openBlock(),r.createElementBlock("div",Z$,r.toDisplayString($.appendText),1)):r.createCommentVNode("",!0),$.appendIcon?(r.openBlock(),r.createBlock(j,{key:1,name:$.appendIcon,size:"md",color:$.disabled?"#C7C7CC":"#1C1C1E"},null,8,["name","color"])):r.createCommentVNode("",!0)],2)],!0),$.showSteppers?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["fm-stepper-field__stepper__container",r.unref(o)?"right-[6px]":"right-[7px]"])},[r.createElementVNode("button",{class:"fm-stepper-field__stepper__item",tabindex:"0",type:"button",onMousedown:x[2]||(x[2]=()=>u($.step)),onFocus:x[3]||(x[3]=(...C)=>r.unref(s)&&r.unref(s)(...C)),onBlur:x[4]||(x[4]=(...C)=>r.unref(i)&&r.unref(i)(...C))},[r.createVNode(j,{name:"expand_less",size:"md",color:$.disabled||g.value?"#C7C7CC":"#1C1C1E"},null,8,["color"])],32),r.createElementVNode("button",{class:"fm-stepper-field__stepper__item",tabindex:"1",type:"button",onMousedown:x[5]||(x[5]=()=>u(-$.step)),onFocus:x[6]||(x[6]=(...C)=>r.unref(s)&&r.unref(s)(...C)),onBlur:x[7]||(x[7]=(...C)=>r.unref(i)&&r.unref(i)(...C))},[r.createVNode(j,{name:"expand_more",size:"md",color:$.disabled||y.value?"#C7C7CC":"#1C1C1E"},null,8,["color"])],32)],2)):r.createCommentVNode("",!0)]),default:r.withCtx(()=>[r.createElementVNode("input",{ref_key:"inputEl",ref:l,class:"fm-stepper-field--input",type:"text",inputMode:$.inputmode,value:m.value,placeholder:$.placeholder,readOnly:$.readonly,onInput:h,onFocus:x[0]||(x[0]=(...C)=>r.unref(s)&&r.unref(s)(...C)),onBlur:x[1]||(x[1]=(...C)=>r.unref(i)&&r.unref(i)(...C)),onKeydown:p},null,40,K$)]),_:2},1032,["append-icon","prepend-icon","focused","invalid","show-valid-border"])]),"helper-text":r.withCtx(()=>[r.renderSlot($.$slots,"helper-text",{},void 0,!0)]),_:3},8,["modelValue","label","disabled","required","optional","info","rules","focused","helper-text","helper-state"]))}}),[["__scopeId","data-v-d5ed159e"]]),Q$=["value","placeholder","minlength","maxlength","readOnly","disabled"],e3=K(r.defineComponent({__name:"FmTextarea",props:{modelValue:{default:""},placeholder:{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},labelInfo:{default:""},helperText:{default:""},helperState:{default:"none"},showWordCount:{type:Boolean,default:!1},label:{default:""},disabled:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},rules:{default:()=>[]}},emits:["update:modelValue"],setup(t){const n=Z(t,"modelValue"),{isFocused:o,focus:i,blur:s}=jn(),l=a=>{n.value=a.target.value};return(a,d)=>(r.openBlock(),r.createBlock(Ve,{modelValue:r.unref(n),"onUpdate:modelValue":d[2]||(d[2]=c=>r.isRef(n)?n.value=c:null),label:a.label,disabled:a.disabled,required:a.labelMark==="required",optional:a.labelMark==="optional",info:a.labelInfo,rules:a.rules,focused:r.unref(o),"helper-text":a.helperText,"helper-state":a.helperState},r.createSlots({label:r.withCtx(()=>[r.renderSlot(a.$slots,"label",{},void 0,!0)]),default:r.withCtx(({invalid:c})=>[r.createElementVNode("div",{class:r.normalizeClass({"fm-textarea__container":!0,"fm-textarea__container--focused":r.unref(o),"fm-textarea__container--invalid":!!r.unref(n)&&c,"fm-textarea__container--valid":a.showValidBorder&&a.showSuccess&&!!r.unref(n)&&!c,"fm-textarea__container--disabled":a.disabled})},[r.createElementVNode("textarea",{class:r.normalizeClass({"fm-textarea--input fm-typo-body-lg-400":!0,"fm-color-typo-primary":!a.disabled,"fm-color-typo-disabled":a.disabled}),value:r.unref(n),placeholder:a.placeholder,minlength:a.minLength,maxlength:a.maxLength,readOnly:a.readonly,disabled:a.disabled,onInput:l,onFocus:d[0]||(d[0]=(...u)=>r.unref(i)&&r.unref(i)(...u)),onBlur:d[1]||(d[1]=(...u)=>r.unref(s)&&r.unref(s)(...u))},null,42,Q$)],2)]),"helper-text":r.withCtx(()=>[r.renderSlot(a.$slots,"helper-text",{},void 0,!0)]),_:2},[a.showWordCount?{name:"helper-append",fn:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass([a.disabled?"fm-color-typo-disabled":"text-fm-color-typo-secondary","fm-typo-body-sm-400"])},r.toDisplayString(a.maxLength?`${r.unref(n).length} / ${a.maxLength}`:""),3)]),key:"0"}:void 0]),1032,["modelValue","label","disabled","required","optional","info","rules","focused","helper-text","helper-state"]))}}),[["__scopeId","data-v-280a005d"]]),t3={class:"flex flex-col fm-time-input items-center"},n3=["value"],dc=K(r.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(t,{emit:e}){const n=t,o=e,i=r.ref();function s(u){i.value&&(i.value.value=u)}r.watch(()=>n.modelValue,s);function l(){if(!i.value)return;const u=a(i.value.value);if(u==null||u>n.max||u<n.min){s(n.modelValue);return}o("update:model-value",u)}function a(u){return u&&/^\d+$/.test(u)?Number(u):null}function d(){o("update:model-value",a(n.modelValue)+1)}function c(){o("update:model-value",a(n.modelValue)-1)}return(u,f)=>(r.openBlock(),r.createElementBlock("div",t3,[r.createElementVNode("div",{class:"fm-time-input__scroller",onClick:d},[r.createVNode(j,{name:"expand_less",size:"lg"})]),r.createElementVNode("input",{ref_key:"inputRef",ref:i,value:n.modelValue,onInput:l},null,40,n3),r.createElementVNode("div",{class:"fm-time-input__scroller",onClick:c},[r.createVNode(j,{name:"expand_more",size:"lg"})])]))}}),[["__scopeId","data-v-e8ddb125"]]);var Xe=(t=>(t.AM="AM",t.PM="PM",t))(Xe||{});function Ke(t){return t.toString().padStart(2,"0")}function o3(t){const[e,n]=t.split(":"),o=Number(e),i=Number(n),s=o>11?"PM":"AM";let l=o;return l===0?l=12:l>12&&(l-=12),`${Ke(l)}:${Ke(i)}:${s}`}function Me(t){const[e,n,o]=o3(t).split(":");return{hours:Number(e),minutes:Number(n),period:o}}function Tr({hours:t,minutes:e,period:n}){let o=t;return n==="PM"?o=t===12?t:t+12:t===12&&(o=0),`${Ke(o)}:${Ke(e)}`}const i3={class:"flex fm-time-input gap-16 items-center"},r3=r.createElementVNode("div",{class:"fm-typo-title-sm-700"}," : ",-1),s3={class:"fm-time-input-periods"},l3=["onClick"],Qo=r.defineComponent({__name:"FmTimeInput",props:{modelValue:{type:Object,required:!0}},emits:["update:model-value"],setup(t,{emit:e}){const n=t,o=e;function i(s){const l={hours:s.hours??n.modelValue.hours,minutes:s.minutes??n.modelValue.minutes,period:s.period??n.modelValue.period},a=n.modelValue.hours;(a===12&&l.hours===11||a===11&&l.hours===12)&&(l.period=n.modelValue.period===Xe.AM?Xe.PM:Xe.AM),l.hours>12?l.hours=1:l.hours<1&&(l.hours=12),l.minutes>59?l.minutes=0:l.minutes<0&&(l.minutes=59),o("update:model-value",l)}return(s,l)=>(r.openBlock(),r.createElementBlock("div",i3,[r.createVNode(dc,{"model-value":r.unref(Ke)(t.modelValue.hours),min:1,max:12,"onUpdate:modelValue":l[0]||(l[0]=a=>i({hours:a}))},null,8,["model-value"]),r3,r.createVNode(dc,{"model-value":r.unref(Ke)(t.modelValue.minutes),min:0,max:59,"onUpdate:modelValue":l[1]||(l[1]=a=>i({minutes:a}))},null,8,["model-value"]),r.createElementVNode("div",s3,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(Xe),a=>(r.openBlock(),r.createElementBlock("div",{key:a,class:r.normalizeClass([{"fm-time-input-period__selected":a===t.modelValue.period},"bg-fm-color-neutral-gray-100 fm-time-input-period"]),onClick:()=>i({period:a})},r.toDisplayString(a),11,l3))),128))])]))}});function a3(t){for(;t;){if(d3(t))return t;t=t.parentElement}return document.scrollingElement}function d3(t){if(!t||t.nodeType!==Node.ELEMENT_NODE)return!1;const e=window.getComputedStyle(t);return e.overflowY==="scroll"||e.overflowY==="auto"&&t.scrollHeight>t.clientHeight}class c3{constructor(e,n){I(this,"onScroll");I(this,"scrollParent");this.onScroll=n,this.scrollParent=a3(e)}bindScroll(){this.scrollParent.addEventListener("scroll",this.onScroll)}unbindScroll(){this.scrollParent.removeEventListener("scroll",this.onScroll)}}const u3={class:"fm-menu__wrapper"},cc=K(r.defineComponent({__name:"FmMenuDeprecated",props:{showMenu:{type:Boolean,default:!1},placement:{default:"bottom-start"},disabled:{type:Boolean,default:!1}},emits:["dropdown-changed"],setup(t,{expose:e,emit:n}){const o=t,i=r.ref(!1),s=r.ref(null),l=r.ref(null),{floatingStyles:a}=Hn(s,l,{middleware:[On(4),zn()],placement:o.placement,whileElementsMounted:Ln});let d;const c=n;e({show:()=>{i.value||(i.value=!0,c("dropdown-changed",i.value))},hide:()=>{i.value&&(i.value=!1,c("dropdown-changed",i.value))}});const u=p=>{p.preventDefault(),p.stopPropagation(),!o.disabled&&(i.value=!i.value,c("dropdown-changed",i.value))},f=p=>{if(!i.value)return;const m=p.path||p.composedPath();for(const g of m)if(g==s.value||g==l.value)return;i.value=!1,c("dropdown-changed",i.value)},h=()=>{c("dropdown-changed",!1)};return r.watch(()=>o.showMenu,p=>i.value=p),r.onMounted(()=>{i.value=o.showMenu,window.addEventListener("click",f),d=new c3(s.value,h),d.bindScroll()}),r.onUnmounted(()=>{window.removeEventListener("click",f),d.unbindScroll()}),(p,m)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{ref_key:"anchorEl",ref:s,class:"fm-menu",onClick:u},[r.renderSlot(p.$slots,"menu-button",{},void 0,!0)],512),i.value?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"menuEl",ref:l,class:r.normalizeClass({"fm-menu__content":!0,"fm-menu__content--opened":i.value}),style:r.normalizeStyle(r.unref(a))},[r.renderSlot(p.$slots,"menu-wrapper",{},()=>[r.createElementVNode("div",u3,[r.renderSlot(p.$slots,"menu-content",{},void 0,!0)])],!0)],6)):r.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-5b19ece2"]]),f3={class:"flex gap-8"},h3={class:"bg-fm-color-neutral-white flex flex-col px-24 py-16 rounded-lg shadow-light-300 w-[343px]"},p3=r.createElementVNode("div",{class:"fm-typo-title-sm-700 mb-8"},"Enter time",-1),m3={class:"flex items-center justify-center py-16 w-full"},g3={class:"flex justify-end"},y3=r.defineComponent({__name:"FmTimePicker",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const n=Z(t,"modelValue"),o=r.ref(null),i=r.computed(()=>{if(!n.value)return null;const{hours:u,minutes:f,period:h}=Me(n.value);return`${Ke(u)}:${Ke(f)} ${h}`});function s(){if(!o.value){n.value=null;return}const u=Tr(o.value);n.value=u,a()}r.onMounted(()=>{n.value&&(o.value=Me(n.value))}),r.watch(()=>n.value,u=>{u&&(o.value=Me(u))});const l=r.ref();function a(){var u;(u=l.value)==null||u.hide()}const d=r.ref(!1);function c(u){u?o.value=Me(n.value??"00:00"):o.value=n.value?Me(n.value):null,d.value=u}return(u,f)=>(r.openBlock(),r.createBlock(Ve,{modelValue:r.unref(n),"onUpdate:modelValue":f[1]||(f[1]=h=>r.isRef(n)?n.value=h:null),label:u.label,disabled:u.disabled,required:u.labelMark==="required",optional:u.labelMark==="optional",info:u.labelInfo,rules:u.rules,focused:d.value,"helper-text":u.helperText,"helper-state":u.helperState},{label:r.withCtx(()=>[r.renderSlot(u.$slots,"label")]),default:r.withCtx(({invalid:h})=>[r.createVNode(cc,{ref_key:"dropdownRef",ref:l,onDropdownChanged:c},{"menu-button":r.withCtx(()=>[r.createVNode(ge,{class:r.normalizeClass(u.disabled?"cursor-not-allowed":"cursor-pointer"),focused:d.value,invalid:h,"show-valid-border":u.showValidBorder},{default:r.withCtx(()=>[r.createElementVNode("div",f3,[r.createVNode(j,{name:"schedule",outline:!d.value},null,8,["outline"]),r.createElementVNode("div",{class:r.normalizeClass(["grow",{"text-fm-color-typo-disabled":!i.value}])},r.toDisplayString(i.value??"HH:MM"),3)])]),_:2},1032,["class","focused","invalid","show-valid-border"])]),"menu-wrapper":r.withCtx(()=>[r.createElementVNode("div",h3,[p3,r.createElementVNode("div",m3,[r.createVNode(Qo,{"model-value":o.value??{hours:0,minutes:0,period:r.unref(Xe).AM},"onUpdate:modelValue":f[0]||(f[0]=p=>o.value=p)},null,8,["model-value"])]),r.createElementVNode("div",g3,[r.createVNode(J,{label:"Cancel",size:"md",variant:"tertiary",onClick:a}),r.createVNode(J,{label:"Apply",size:"md",variant:"primary",onClick:s})])])]),_:2},1536)]),"helper-text":r.withCtx(()=>[r.renderSlot(u.$slots,"helper-text")]),_:3},8,["modelValue","label","disabled","required","optional","info","rules","focused","helper-text","helper-state"]))}}),b3={class:"flex gap-8"},$3={class:"bg-fm-color-neutral-white flex flex-col px-24 py-16 rounded-lg shadow-light-300"},_3=r.createElementVNode("div",{class:"fm-typo-title-sm-700 mb-8"},"Enter time",-1),w3={class:"flex flex-col gap-16 items-center justify-center py-16 w-full"},C3=r.createElementVNode("div",{class:"fm-typo-body-lg-700 text-left w-full"}," Starting Time ",-1),x3=r.createElementVNode("div",{class:"fm-typo-body-lg-700 text-left w-full"}," Ending Time ",-1),k3={class:"flex gap-8 items-center justify-end"},S3=r.defineComponent({__name:"FmTimeRangePicker",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const n=Z(t,"modelValue"),o=r.ref(null),i=r.ref(null),s=r.computed(()=>{const p=Array.isArray(n.value);return!n.value||!p||p&&n.value.every(m=>!f(m))?null:n.value.map(m=>{const{hours:g,minutes:y,period:b}=Me(m);return`${Ke(g)}:${Ke(y)} ${b}`}).join(" - ")});function l(){if(!o.value||!i.value){n.value=null;return}let p=!1;const m=o.value,g=i.value;(m.period===Xe.PM&&g.period===Xe.AM||m.period===g.period&&(m.hours<g.hours||m.minutes<g.minutes))&&(p=!0);const y=Tr(o.value),b=Tr(i.value);n.value=p?[b,y]:[y,b],d()}r.onMounted(()=>{Array.isArray(n.value)&&n.value.every(p=>!!p)&&(o.value=Me(n.value[0]),i.value=Me(n.value[1]))}),r.watch(()=>n.value,p=>{const m=Array.isArray(p);p&&m&&p.every(g=>f(g))&&(o.value=Me(p[0]),i.value=Me(p[1]))});const a=r.ref();function d(){var p;(p=a.value)==null||p.hide()}const c=r.ref(!1);function u(p){var m,g,y,b;p?(o.value=Me(((y=n.value)==null?void 0:y[0])??"00:00"),i.value=Me(((b=n.value)==null?void 0:b[1])??"23:59")):(o.value=(m=n.value)!=null&&m[0]?Me(n.value[0]):null,i.value=(g=n.value)!=null&&g[1]?Me(n.value[1]):null),c.value=p}const f=p=>/^(?:[01]\d|2[0-3]):[0-5]\d$/.test(p),h=r.computed(()=>_e(o.value,i.value));return(p,m)=>(r.openBlock(),r.createBlock(Ve,{modelValue:r.unref(n),"onUpdate:modelValue":m[2]||(m[2]=g=>r.isRef(n)?n.value=g:null),label:p.label,disabled:p.disabled,required:p.labelMark==="required",optional:p.labelMark==="optional",info:p.labelInfo,rules:p.rules,focused:c.value,"helper-text":p.helperText,"helper-state":p.helperState},{label:r.withCtx(()=>[r.renderSlot(p.$slots,"label")]),default:r.withCtx(({invalid:g})=>[r.createVNode(_r,{ref_key:"dropdownRef",ref:a,width:343,onPopoverChanged:u},{"popover-button":r.withCtx(()=>[r.createVNode(ge,{class:r.normalizeClass(p.disabled?"cursor-not-allowed":"cursor-pointer"),focused:c.value,invalid:g,"show-valid-border":p.showValidBorder},{default:r.withCtx(()=>[r.createElementVNode("div",b3,[r.createVNode(j,{name:"schedule",outline:!c.value},null,8,["outline"]),r.createElementVNode("div",{class:r.normalizeClass(["grow",{"text-fm-color-typo-disabled":!s.value}])},r.toDisplayString(s.value??"HH:MM"),3)])]),_:2},1032,["class","focused","invalid","show-valid-border"])]),default:r.withCtx(()=>[r.createElementVNode("div",$3,[_3,r.createElementVNode("div",w3,[r.createElementVNode("div",null,[C3,r.createVNode(Qo,{"model-value":o.value??{hours:0,minutes:0,period:r.unref(Xe).AM},"onUpdate:modelValue":m[0]||(m[0]=y=>o.value=y)},null,8,["model-value"])]),r.createElementVNode("div",null,[x3,r.createVNode(Qo,{"model-value":i.value??{hours:0,minutes:0,period:r.unref(Xe).AM},"onUpdate:modelValue":m[1]||(m[1]=y=>i.value=y)},null,8,["model-value"])])]),r.createElementVNode("div",k3,[r.createVNode(J,{label:"Cancel",variant:"tertiary",size:"md",onClick:d}),r.createVNode(J,{label:"Apply",variant:"primary",size:"md",disabled:h.value,onClick:l},null,8,["disabled"])])])]),_:2},1536)]),"helper-text":r.withCtx(()=>[r.renderSlot(p.$slots,"helper-text")]),_:3},8,["modelValue","label","disabled","required","optional","info","rules","focused","helper-text","helper-state"]))}}),uc=K(r.defineComponent({__name:"FmList",props:{separator:{type:Boolean,default:!1},disabled:{type:Boolean},activeClass:{default:""}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass({"fm-list--separator":e.separator,activeClass:e.activeClass})},[r.renderSlot(e.$slots,"default",{},void 0,!0)],2))}}),[["__scopeId","data-v-884ba127"]]),fc=K(r.defineComponent({__name:"FmListItem",props:{tag:{default:"div"},clickable:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},label:{default:""},sublabel:{default:""}},setup(t){const e=t;return(n,o)=>{const i=r.resolveDirective("wave");return r.withDirectives((r.openBlock(),r.createBlock(e.tag,{class:r.normalizeClass({"fm-list-item":!0,"fm-list-item--disabled":n.disabled,"cursor-pointer hover:bg-fm-color-opacity-sm":n.clickable&&!n.disabled,"cursor-not-allowed":n.clickable&&n.disabled}),onClick:o[0]||(o[0]=r.withModifiers(()=>{},["prevent"]))},{default:r.withCtx(()=>[r.renderSlot(n.$slots,"prepend",{},void 0,!0),r.renderSlot(n.$slots,"default",{},()=>[r.createElementVNode("div",null,[r.createElementVNode("div",{class:r.normalizeClass(`fm-typo-body-lg-400 line-clamp-1 break-all ${n.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-primary"}`)},r.toDisplayString(n.label),3),n.sublabel?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(`fm-typo-body-md-400 line-clamp-2 break-all ${n.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-secondary"}`)},r.toDisplayString(n.sublabel),3)):r.createCommentVNode("",!0)])],!0),n.$slots.append?(r.openBlock(),r.createBlock(Wt,{key:0})):r.createCommentVNode("",!0),r.renderSlot(n.$slots,"append",{},void 0,!0)]),_:3},8,["class"])),[[i,n.clickable&&!n.disabled]])}}}),[["__scopeId","data-v-90312222"]]),v3={class:"fm-typo-body-lg-700 mx-8 p-12 text-fm-color-typo-primary"},M3=r.defineComponent({__name:"FmMenuHeader",props:{label:{}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",v3,r.toDisplayString(e.label),1))}}),D3=t=>(r.pushScopeId("data-v-c5236366"),t=t(),r.popScopeId(),t),E3={class:"relative"},B3={class:"fm-progress-linear fm-typo-body-sm-400 h-4 overflow-hidden relative rounded-lg w-auto"},V3=D3(()=>r.createElementVNode("span",{class:"bg-fm-color-neutral-gray-100",style:{width:"100%"}},null,-1)),P3=K(r.defineComponent({__name:"FmLinearProgress",props:{color:{default:"primary"}},setup(t){const e=t,n=r.computed(()=>{const o=new Array,i={};return e.color?(rn(e.color)?i["background-color"]=e.color:o.push(`bg-fm-color-${e.color}`),{class:o.join(" "),style:i}):{class:o.join(" "),style:i}});return(o,i)=>(r.openBlock(),r.createElementBlock("div",E3,[r.createElementVNode("div",B3,[V3,r.createElementVNode("span",{class:r.normalizeClass(["dash-1",n.value.class]),style:r.normalizeStyle(n.value.style)},null,6),r.createElementVNode("span",{class:r.normalizeClass(["dash-2",n.value.class]),style:r.normalizeStyle(n.value.style)},null,6)])]))}}),[["__scopeId","data-v-c5236366"]]),R3={class:"fm-side-sheet"},F3={class:"flex fm-typo-title-sm-700 items-center justify-between text-fm-color-typo-primary"},N3={key:0},A3={class:"h-full overflow-y-auto"},O3={class:"pt-24"},I3=K(r.defineComponent({__name:"FmSideSheet",props:{header:{default:""},modelValue:{type:Boolean,default:!1},dismissAway:{type:Boolean,default:!1},closeButton:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(t){const e=t,n=r.ref(null),o=Z(e,"modelValue"),i=s=>{e.dismissAway&&n.value&&s.target===n.value&&(o.value=!1)};return(s,l)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{onClick:l[0]||(l[0]=a=>o.value=!0)},[r.renderSlot(s.$slots,"side-sheet-button",{},void 0,!0)]),(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(r.Transition,null,{default:r.withCtx(()=>[r.unref(o)?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"overlayRef",ref:n,class:"fm-side-sheet--container",onClick:l[2]||(l[2]=a=>i(a))},[r.createVNode(r.Transition,{name:"slide",appear:""},{default:r.withCtx(()=>[r.createElementVNode("div",R3,[r.createElementVNode("div",F3,[r.renderSlot(s.$slots,"side-sheet-header",{},()=>[s.header?(r.openBlock(),r.createElementBlock("div",N3,r.toDisplayString(s.header),1)):r.createCommentVNode("",!0)],!0),s.closeButton?(r.openBlock(),r.createBlock(j,{key:0,class:"cursor-pointer",name:"close",size:"md",onClick:l[1]||(l[1]=a=>o.value=!1)})):r.createCommentVNode("",!0)]),r.createElementVNode("div",A3,[r.renderSlot(s.$slots,"default",{},void 0,!0)]),r.createElementVNode("div",O3,[r.renderSlot(s.$slots,"side-sheet-footer",{},void 0,!0)])])]),_:3})],512)):r.createCommentVNode("",!0)]),_:3})]))]))}}),[["__scopeId","data-v-c002a2ae"]]),T3={class:"flex"},L3={key:0,class:"mt-8"},hc=K(r.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(t,{emit:e}){const n=t,o=e,i=r.computed(()=>{switch(n.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 ${n.variant}`)}}),s=r.computed(()=>n.title?{text:n.title,classes:"fm-typo-body-lg-700"}:{text:n.description,classes:""}),l=r.computed(()=>n.bgColor?rn(n.bgColor)?{style:{backgroundColor:n.bgColor}}:{class:`bg-fm-color-${n.bgColor}`}:{class:`bg-fm-color-${i.value.bgColor}`}),a=r.computed(()=>n.color?rn(n.color)?{style:{color:n.color}}:{class:`text-fm-color-${n.color}`}:{class:`text-fm-color-${i.value.actionColor}`});return(d,c)=>(r.openBlock(),r.createElementBlock("div",r.mergeProps(l.value,{class:"fm-corner-radius-lg fm-shadow-light-400 fm-snackbar px-24 py-16"}),[r.createElementVNode("div",T3,[i.value.icon?(r.openBlock(),r.createBlock(j,{key:0,name:i.value.icon.name,color:n.color??i.value.icon.color,class:"mr-12"},null,8,["name","color"])):r.createCommentVNode("",!0),r.createElementVNode("div",{class:r.normalizeClass(`${s.value.classes} grow ellipsis`)},r.toDisplayString(s.value.text),3),n.dismissable?(r.openBlock(),r.createBlock(j,{key:1,style:{"{ flex":"none}"},name:"close",class:"cursor-pointer",onClick:c[0]||(c[0]=()=>o("onDismiss"))})):r.createCommentVNode("",!0)]),n.title&&n.description?(r.openBlock(),r.createElementBlock("div",L3,r.toDisplayString(n.description),1)):r.createCommentVNode("",!0),r.renderSlot(d.$slots,"actions",{},()=>[n.action?(r.openBlock(),r.createElementBlock("div",r.mergeProps({key:0},a.value,{class:"mt-16 fm-typo-body-lg-700"}),[r.createElementVNode("span",{class:"cursor-pointer",onClick:c[1]||(c[1]=()=>o("onAction"))},r.toDisplayString(n.action),1)],16)):r.createCommentVNode("",!0)],!0)],16))}}),[["__scopeId","data-v-e2ff7141"]]),z3={key:0,class:"fm-step-description fm-typo-body-sm-400 line-clamp-1 mt-4"},Lr=r.defineComponent({__name:"FmStepHeader",props:{title:{type:String,required:!0},description:{type:String,default:void 0},disabled:{type:Boolean,default:!1},titleBold:{type:Boolean,default:!1}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["flex flex-col",t.disabled?"text-fm-color-typo-disabled":""])},[r.createElementVNode("div",{class:r.normalizeClass(["fm-step-title line-clamp-2",t.titleBold?"fm-typo-body-xl-700":"fm-typo-body-md-400"])},r.toDisplayString(t.title),3),t.description?(r.openBlock(),r.createElementBlock("div",z3,r.toDisplayString(t.description),1)):r.createCommentVNode("",!0)],2))}}),H3=["data-title","data-description","data-disabled"],j3={class:"flex fm-step-container gap-12 grow"},W3=K(r.defineComponent({__name:"FmStep",props:{title:{type:String,required:!0},description:{type:String,default:void 0},value:{type:Number,required:!0},complete:{type:Function,required:!0},error:{type:Function,default:void 0},disabled:{type:Function,default:void 0}},setup(t){const e=t,{currentStep:n,goToStep:o}=r.inject($s);function i(){s.value||o(e.value)}const s=r.computed(()=>e.disabled?e.disabled():!1),l=r.computed(()=>e.error?e.error():!1),a=r.computed(()=>n()===e.value),d=r.computed(()=>e.complete()),c=r.computed(()=>a.value||d.value||n()>e.value?"bg-fm-color-primary":"bg-fm-color-neutral-gray-300"),u=r.computed(()=>a.value?{className:"bg-fm-color-primary"}:l.value?{config:{name:"warning",color:"system-error-300"}}:s.value?{className:"border-2 border-fm-color-neutral-gray-200"}:d.value?{config:{name:"check_small",color:"primary"},className:"border-2 border-fm-color-primary"}:{className:"border-2 border-fm-color-neutral-gray-300"});return(f,h)=>{const p=r.resolveDirective("wave");return r.withDirectives((r.openBlock(),r.createElementBlock("div",{"data-title":t.title,"data-description":t.description,"data-disabled":s.value,class:r.normalizeClass(`fm-step gap-4 grow ${s.value?"cursor-not-allowed":"cursor-pointer"}`),onClick:r.withModifiers(i,["stop"])},[r.createElementVNode("div",null,[r.createElementVNode("div",{class:r.normalizeClass(`fm-step-indicator ${c.value}`)},null,2)]),r.createElementVNode("div",j3,[r.createElementVNode("div",{class:r.normalizeClass(["flex fm-step-container-icon h-[24px] items-center justify-center min-h-[24px] min-w-[24px] relative rounded-full w-[24px]",u.value.className])},[u.value.config?(r.openBlock(),r.createBlock(j,{key:0,name:u.value.config.name,color:u.value.config.color,outline:"",class:"absolute"},null,8,["name","color"])):r.createCommentVNode("",!0)],2),r.createVNode(Lr,{title:t.title,description:t.description,disabled:s.value,class:"grow"},null,8,["title","description","disabled"])])],10,H3)),[[p,!s.value]])}}}),[["__scopeId","data-v-ee172cad"]]),Y3={class:"hidden items-center xs:flex"},U3={class:"flex gap-2 items-start justify-end mb-24 mt-40 p-0 self-stretch"},G3=r.defineComponent({__name:"FmStepper",props:{modelValue:{type:Number,required:!0},orientation:{type:String,default:"horizontal"}},emits:["update:model-value"],setup(t,{emit:e}){const n=t,o=e,i=u=>{o("update:model-value",u)};r.provide($s,{currentStep:()=>n.modelValue,goToStep:i});const s=r.ref(),l=r.ref([]),a=r.computed(()=>l.value[n.modelValue-1]),d=r.computed(()=>`${n.modelValue} of ${l.value.length}`),c=()=>{var f;const u=Array.from(((f=s.value)==null?void 0:f.querySelectorAll(":scope > .fm-step"))??[]);l.value=u.map(h=>({title:h.dataset.title??"",description:h.dataset.description,disabled:h.dataset.disabled=="true"}))};return r.onMounted(()=>{c()}),(u,f)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(`fm-stepper fm-stepper__${t.orientation}`)},[r.createElementVNode("div",{ref_key:"stepperRef",ref:s,class:r.normalizeClass(`flex mx-24 mt-12 mb-24 xs:hidden ${t.orientation==="vertical"?"flex-col":""}`)},[r.renderSlot(u.$slots,"default")],2),r.createElementVNode("div",Y3,[r.createVNode(ln,{"current-step":t.modelValue,"total-steps":l.value.length,class:"mr-12"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(d.value),1)]),_:1},8,["current-step","total-steps"]),a.value?(r.openBlock(),r.createBlock(Lr,{key:0,class:"grow","title-bold":"",title:a.value.title,description:a.value.description,disabled:a.value.disabled},null,8,["title","description","disabled"])):r.createCommentVNode("",!0)]),u.$slots.contents?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(`flex-col mx-24 mt-12 mb-24 ${t.orientation==="vertical"?"w-2/3":""}`)},[r.renderSlot(u.$slots,"contents"),r.createElementVNode("div",U3,[r.renderSlot(u.$slots,"actions")])],2)):r.createCommentVNode("",!0)],2))}});let q3=0;function X3(){return q3++}const K3=t=>(r.pushScopeId("data-v-57d43f79"),t=t(),r.popScopeId(),t),Z3=["disabled"],J3=[K3(()=>r.createElementVNode("div",{class:"fm-tab__indicator"},null,-1))],pc=K(r.defineComponent({__name:"FmTab",props:{modelValue:{default:null},label:{default:""},vertical:{type:Boolean,default:!1},icon:{default:""},disabled:{type:Boolean,default:!1},badge:{default:0},value:{default:()=>X3()},children:{default:()=>[]}},emits:["update:modelValue"],setup(t,{emit:e}){const n=r.ref(!1),o=t,i=e,s=r.ref(!1);function l(f){n.value=f}const a=()=>{o.disabled||o.children.length>0||i("update:modelValue",o.value)},d=f=>{o.children.length!==0&&(s.value=f)},c=r.computed(()=>o.children.length>0?o.children.some(f=>f.value===o.modelValue):o.modelValue===o.value),u=f=>{s.value=!1,i("update:modelValue",f)};return(f,h)=>(r.openBlock(),r.createBlock(Ct,{"show-menu":s.value,disabled:f.children.length===0,class:r.normalizeClass(["max-w-[360px] min-w-[90px] rounded-sm",{"w-full":f.vertical}]),placement:f.vertical?"right-start":"bottom-start",onMenuChanged:d},{"menu-button":r.withCtx(()=>[r.createElementVNode("button",{class:r.normalizeClass(["fm-tab",`fm-tab--${f.vertical?"vertical":"horizontal"}`,f.disabled?"cursor-not-allowed":"cursor-pointer",{"fm-tab--selected":c.value}]),disabled:f.disabled,type:"button",onMousedown:h[0]||(h[0]=()=>l(!0)),onMouseup:h[1]||(h[1]=()=>l(!1)),onMouseleave:h[2]||(h[2]=()=>l(!1)),onClick:a},[r.renderSlot(f.$slots,"prepend",{},void 0,!0),f.icon?(r.openBlock(),r.createBlock(j,{key:0,name:f.icon,outline:!n.value&&!c.value,color:f.disabled?"neutral-gray-200":c.value?"primary":"neutral-black",size:"md"},null,8,["name","outline","color"])):r.createCommentVNode("",!0),f.label?(r.openBlock(),r.createElementBlock("span",{key:1,class:r.normalizeClass(["fm-typo-body-lg-700 text-fm-color-typo-primary row-start-1 text-left",c.value?"visible":"invisible",f.icon||f.$slots.append?"col-start-2":"col-start-1"])},r.toDisplayString(f.label),3)):r.createCommentVNode("",!0),f.label?(r.openBlock(),r.createElementBlock("span",{key:2,class:r.normalizeClass(["fm-typo-body-lg-400 row-start-1 text-left",f.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-secondary",!c.value||f.disabled?"visible":"invisible",f.icon||f.$slots.append?"col-start-2":"col-start-1"])},r.toDisplayString(f.label),3)):r.createCommentVNode("",!0),f.badge?(r.openBlock(),r.createBlock(Mt,{key:3,value:f.badge,inline:"",variant:"numeric"},null,8,["value"])):r.createCommentVNode("",!0),f.children.length>0?(r.openBlock(),r.createBlock(j,{key:4,size:"md",name:s.value?"expand_less":"expand_more"},null,8,["name"])):r.createCommentVNode("",!0),r.renderSlot(f.$slots,"append",{},void 0,!0),c.value?(r.openBlock(),r.createElementBlock("div",{key:5,class:r.normalizeClass([`fm-tab__indicator__wrapper--${f.vertical?"vertical":"horizontal"}`])},J3,2)):r.createCommentVNode("",!0)],42,Z3)]),default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(f.children,p=>(r.openBlock(),r.createBlock(Pe,{key:p.value,"model-value":o.modelValue===p.value,label:p.label,icon:p.icon,disabled:p.disabled,onClick:m=>u(p.value)},{append:r.withCtx(()=>[p.badge?(r.openBlock(),r.createBlock(Mt,{key:0,value:p.badge,inline:"",variant:"numeric"},null,8,["value"])):r.createCommentVNode("",!0)]),_:2},1032,["model-value","label","icon","disabled","onClick"]))),128))]),_:3},8,["show-menu","disabled","class","placement"]))}}),[["__scopeId","data-v-57d43f79"]]);/**
26
+ `):t}function C0(t,e){const{element:n,datasetIndex:o,index:i}=e,r=t.getDatasetMeta(o).controller,{label:l,value:a}=r.getLabelAndValue(i);return{chart:t,label:l,parsed:r.getParsed(i),raw:t.data.datasets[o].data[i],formattedValue:a,dataset:r.getDataset(),dataIndex:i,datasetIndex:o,element:n}}function Va(t,e){const n=t.chart.ctx,{body:o,footer:i,title:r}=t,{boxWidth:l,boxHeight:a}=e,d=he(e.bodyFont),c=he(e.titleFont),u=he(e.footerFont),f=r.length,h=i.length,p=o.length,m=be(e.padding);let g=m.height,y=0,b=o.reduce((S,x)=>S+x.before.length+x.lines.length+x.after.length,0);if(b+=t.beforeBody.length+t.afterBody.length,f&&(g+=f*c.lineHeight+(f-1)*e.titleSpacing+e.titleMarginBottom),b){const S=e.displayColors?Math.max(a,d.lineHeight):d.lineHeight;g+=p*S+(b-p)*d.lineHeight+(b-1)*e.bodySpacing}h&&(g+=e.footerMarginTop+h*u.lineHeight+(h-1)*e.footerSpacing);let $=0;const w=function(S){y=Math.max(y,n.measureText(S).width+$)};return n.save(),n.font=c.string,ee(t.title,w),n.font=d.string,ee(t.beforeBody.concat(t.afterBody),w),$=e.displayColors?l+2+e.boxPadding:0,ee(o,S=>{ee(S.before,w),ee(S.lines,w),ee(S.after,w)}),$=0,n.font=u.string,ee(t.footer,w),n.restore(),y+=m.width,{width:y,height:g}}function x0(t,e){const{y:n,height:o}=e;return n<o/2?"top":n>t.height-o/2?"bottom":"center"}function k0(t,e,n,o){const{x:i,width:r}=o,l=n.caretSize+n.caretPadding;if(t==="left"&&i+r+l>e.width||t==="right"&&i-r-l<0)return!0}function S0(t,e,n,o){const{x:i,width:r}=n,{width:l,chartArea:{left:a,right:d}}=t;let c="center";return o==="center"?c=i<=(a+d)/2?"left":"right":i<=r/2?c="left":i>=l-r/2&&(c="right"),k0(c,t,e,n)&&(c="center"),c}function Pa(t,e,n){const o=n.yAlign||e.yAlign||x0(t,n);return{xAlign:n.xAlign||e.xAlign||S0(t,e,n,o),yAlign:o}}function v0(t,e){let{x:n,width:o}=t;return e==="right"?n-=o:e==="center"&&(n-=o/2),n}function M0(t,e,n){let{y:o,height:i}=t;return e==="top"?o+=n:e==="bottom"?o-=i+n:o-=i/2,o}function Ra(t,e,n,o){const{caretSize:i,caretPadding:r,cornerRadius:l}=t,{xAlign:a,yAlign:d}=n,c=i+r,{topLeft:u,topRight:f,bottomLeft:h,bottomRight:p}=Pt(l);let m=v0(e,a);const g=M0(e,d,c);return d==="center"?a==="left"?m+=c:a==="right"&&(m-=c):a==="left"?m-=Math.max(u,h)+i:a==="right"&&(m+=Math.max(f,p)+i),{x:me(m,0,o.width-e.width),y:me(g,0,o.height-e.height)}}function Po(t,e,n){const o=be(n.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-o.right:t.x+o.left}function Fa(t){return Ge([],it(t))}function D0(t,e,n){return bt(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function Na(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const Aa={beforeTitle:Je,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,o=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(o>0&&e.dataIndex<o)return n[e.dataIndex]}return""},afterTitle:Je,beforeBody:Je,beforeLabel:Je,label(t){if(this&&this.options&&this.options.mode==="dataset")return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const n=t.formattedValue;return X(n)||(e+=n),e},labelColor(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:Je,afterBody:Je,beforeFooter:Je,footer:Je,afterFooter:Je};function Se(t,e,n,o){const i=t[e].call(n,o);return typeof i>"u"?Aa[e].call(n,o):i}class is extends ot{constructor(e){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=e.chart,this.options=e.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(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const n=this.chart,o=this.options.setContext(this.getContext()),i=o.enabled&&n.options.animation&&o.animations,r=new Sl(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(r)),r}getContext(){return this.$context||(this.$context=D0(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,n){const{callbacks:o}=n,i=Se(o,"beforeTitle",this,e),r=Se(o,"title",this,e),l=Se(o,"afterTitle",this,e);let a=[];return a=Ge(a,it(i)),a=Ge(a,it(r)),a=Ge(a,it(l)),a}getBeforeBody(e,n){return Fa(Se(n.callbacks,"beforeBody",this,e))}getBody(e,n){const{callbacks:o}=n,i=[];return ee(e,r=>{const l={before:[],lines:[],after:[]},a=Na(o,r);Ge(l.before,it(Se(a,"beforeLabel",this,r))),Ge(l.lines,Se(a,"label",this,r)),Ge(l.after,it(Se(a,"afterLabel",this,r))),i.push(l)}),i}getAfterBody(e,n){return Fa(Se(n.callbacks,"afterBody",this,e))}getFooter(e,n){const{callbacks:o}=n,i=Se(o,"beforeFooter",this,e),r=Se(o,"footer",this,e),l=Se(o,"afterFooter",this,e);let a=[];return a=Ge(a,it(i)),a=Ge(a,it(r)),a=Ge(a,it(l)),a}_createItems(e){const n=this._active,o=this.chart.data,i=[],r=[],l=[];let a=[],d,c;for(d=0,c=n.length;d<c;++d)a.push(C0(this.chart,n[d]));return e.filter&&(a=a.filter((u,f,h)=>e.filter(u,f,h,o))),e.itemSort&&(a=a.sort((u,f)=>e.itemSort(u,f,o))),ee(a,u=>{const f=Na(e.callbacks,u);i.push(Se(f,"labelColor",this,u)),r.push(Se(f,"labelPointStyle",this,u)),l.push(Se(f,"labelTextColor",this,u))}),this.labelColors=i,this.labelPointStyles=r,this.labelTextColors=l,this.dataPoints=a,a}update(e,n){const o=this.options.setContext(this.getContext()),i=this._active;let r,l=[];if(!i.length)this.opacity!==0&&(r={opacity:0});else{const a=Vn[o.position].call(this,i,this._eventPosition);l=this._createItems(o),this.title=this.getTitle(l,o),this.beforeBody=this.getBeforeBody(l,o),this.body=this.getBody(l,o),this.afterBody=this.getAfterBody(l,o),this.footer=this.getFooter(l,o);const d=this._size=Va(this,o),c=Object.assign({},a,d),u=Pa(this.chart,o,c),f=Ra(o,c,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,r={opacity:1,x:f.x,y:f.y,width:d.width,height:d.height,caretX:a.x,caretY:a.y}}this._tooltipItems=l,this.$context=void 0,r&&this._resolveAnimations().update(this,r),e&&o.external&&o.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(e,n,o,i){const r=this.getCaretPosition(e,o,i);n.lineTo(r.x1,r.y1),n.lineTo(r.x2,r.y2),n.lineTo(r.x3,r.y3)}getCaretPosition(e,n,o){const{xAlign:i,yAlign:r}=this,{caretSize:l,cornerRadius:a}=o,{topLeft:d,topRight:c,bottomLeft:u,bottomRight:f}=Pt(a),{x:h,y:p}=e,{width:m,height:g}=n;let y,b,$,w,S,x;return r==="center"?(S=p+g/2,i==="left"?(y=h,b=y-l,w=S+l,x=S-l):(y=h+m,b=y+l,w=S-l,x=S+l),$=y):(i==="left"?b=h+Math.max(d,u)+l:i==="right"?b=h+m-Math.max(c,f)-l:b=this.caretX,r==="top"?(w=p,S=w-l,y=b-l,$=b+l):(w=p+g,S=w+l,y=b+l,$=b-l),x=w),{x1:y,x2:b,x3:$,y1:w,y2:S,y3:x}}drawTitle(e,n,o){const i=this.title,r=i.length;let l,a,d;if(r){const c=Xt(o.rtl,this.x,this.width);for(e.x=Po(this,o.titleAlign,o),n.textAlign=c.textAlign(o.titleAlign),n.textBaseline="middle",l=he(o.titleFont),a=o.titleSpacing,n.fillStyle=o.titleColor,n.font=l.string,d=0;d<r;++d)n.fillText(i[d],c.x(e.x),e.y+l.lineHeight/2),e.y+=l.lineHeight+a,d+1===r&&(e.y+=o.titleMarginBottom-a)}}_drawColorBox(e,n,o,i,r){const l=this.labelColors[o],a=this.labelPointStyles[o],{boxHeight:d,boxWidth:c}=r,u=he(r.bodyFont),f=Po(this,"left",r),h=i.x(f),p=d<u.lineHeight?(u.lineHeight-d)/2:0,m=n.y+p;if(r.usePointStyle){const g={radius:Math.min(c,d)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},y=i.leftForLtr(h,c)+c/2,b=m+d/2;e.strokeStyle=r.multiKeyBackground,e.fillStyle=r.multiKeyBackground,Ri(e,g,y,b),e.strokeStyle=l.borderColor,e.fillStyle=l.backgroundColor,Ri(e,g,y,b)}else{e.lineWidth=q(l.borderWidth)?Math.max(...Object.values(l.borderWidth)):l.borderWidth||1,e.strokeStyle=l.borderColor,e.setLineDash(l.borderDash||[]),e.lineDashOffset=l.borderDashOffset||0;const g=i.leftForLtr(h,c),y=i.leftForLtr(i.xPlus(h,1),c-2),b=Pt(l.borderRadius);Object.values(b).some($=>$!==0)?(e.beginPath(),e.fillStyle=r.multiKeyBackground,$n(e,{x:g,y:m,w:c,h:d,radius:b}),e.fill(),e.stroke(),e.fillStyle=l.backgroundColor,e.beginPath(),$n(e,{x:y,y:m+1,w:c-2,h:d-2,radius:b}),e.fill()):(e.fillStyle=r.multiKeyBackground,e.fillRect(g,m,c,d),e.strokeRect(g,m,c,d),e.fillStyle=l.backgroundColor,e.fillRect(y,m+1,c-2,d-2))}e.fillStyle=this.labelTextColors[o]}drawBody(e,n,o){const{body:i}=this,{bodySpacing:r,bodyAlign:l,displayColors:a,boxHeight:d,boxWidth:c,boxPadding:u}=o,f=he(o.bodyFont);let h=f.lineHeight,p=0;const m=Xt(o.rtl,this.x,this.width),g=function(F){n.fillText(F,m.x(e.x+p),e.y+h/2),e.y+=h+r},y=m.textAlign(l);let b,$,w,S,x,V,D;for(n.textAlign=l,n.textBaseline="middle",n.font=f.string,e.x=Po(this,y,o),n.fillStyle=o.bodyColor,ee(this.beforeBody,g),p=a&&y!=="right"?l==="center"?c/2+u:c+2+u:0,S=0,V=i.length;S<V;++S){for(b=i[S],$=this.labelTextColors[S],n.fillStyle=$,ee(b.before,g),w=b.lines,a&&w.length&&(this._drawColorBox(n,e,S,m,o),h=Math.max(f.lineHeight,d)),x=0,D=w.length;x<D;++x)g(w[x]),h=f.lineHeight;ee(b.after,g)}p=0,h=f.lineHeight,ee(this.afterBody,g),e.y-=r}drawFooter(e,n,o){const i=this.footer,r=i.length;let l,a;if(r){const d=Xt(o.rtl,this.x,this.width);for(e.x=Po(this,o.footerAlign,o),e.y+=o.footerMarginTop,n.textAlign=d.textAlign(o.footerAlign),n.textBaseline="middle",l=he(o.footerFont),n.fillStyle=o.footerColor,n.font=l.string,a=0;a<r;++a)n.fillText(i[a],d.x(e.x),e.y+l.lineHeight/2),e.y+=l.lineHeight+o.footerSpacing}}drawBackground(e,n,o,i){const{xAlign:r,yAlign:l}=this,{x:a,y:d}=e,{width:c,height:u}=o,{topLeft:f,topRight:h,bottomLeft:p,bottomRight:m}=Pt(i.cornerRadius);n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.beginPath(),n.moveTo(a+f,d),l==="top"&&this.drawCaret(e,n,o,i),n.lineTo(a+c-h,d),n.quadraticCurveTo(a+c,d,a+c,d+h),l==="center"&&r==="right"&&this.drawCaret(e,n,o,i),n.lineTo(a+c,d+u-m),n.quadraticCurveTo(a+c,d+u,a+c-m,d+u),l==="bottom"&&this.drawCaret(e,n,o,i),n.lineTo(a+p,d+u),n.quadraticCurveTo(a,d+u,a,d+u-p),l==="center"&&r==="left"&&this.drawCaret(e,n,o,i),n.lineTo(a,d+f),n.quadraticCurveTo(a,d,a+f,d),n.closePath(),n.fill(),i.borderWidth>0&&n.stroke()}_updateAnimationTarget(e){const n=this.chart,o=this.$animations,i=o&&o.x,r=o&&o.y;if(i||r){const l=Vn[e.position].call(this,this._active,this._eventPosition);if(!l)return;const a=this._size=Va(this,e),d=Object.assign({},l,this._size),c=Pa(n,e,d),u=Ra(e,d,c,n);(i._to!==u.x||r._to!==u.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=a.width,this.height=a.height,this.caretX=l.x,this.caretY=l.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(e){const n=this.options.setContext(this.getContext());let o=this.opacity;if(!o)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},r={x:this.x,y:this.y};o=Math.abs(o)<.001?0:o;const l=be(n.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&a&&(e.save(),e.globalAlpha=o,this.drawBackground(r,e,i,n),gl(e,n.textDirection),r.y+=l.top,this.drawTitle(r,e,n),this.drawBody(r,e,n),this.drawFooter(r,e,n),yl(e,n.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,n){const o=this._active,i=e.map(({datasetIndex:a,index:d})=>{const c=this.chart.getDatasetMeta(a);if(!c)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:c.data[d],index:d}}),r=!no(o,i),l=this._positionChanged(i,n);(r||l)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,n,o=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,r=this._active||[],l=this._getActiveElements(e,r,n,o),a=this._positionChanged(l,e),d=n||!no(l,r)||a;return d&&(this._active=l,(i.enabled||i.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,n))),d}_getActiveElements(e,n,o,i){const r=this.options;if(e.type==="mouseout")return[];if(!i)return n.filter(a=>this.chart.data.datasets[a.datasetIndex]&&this.chart.getDatasetMeta(a.datasetIndex).controller.getParsed(a.index)!==void 0);const l=this.chart.getElementsAtEventForMode(e,r.mode,r,o);return r.reverse&&l.reverse(),l}_positionChanged(e,n){const{caretX:o,caretY:i,options:r}=this,l=Vn[r.position].call(this,e,n);return l!==!1&&(o!==l.x||i!==l.y)}}I(is,"positioners",Vn);var E0={id:"tooltip",_element:is,positioners:Vn,afterInit(t,e,n){n&&(t.tooltip=new is({chart:t,options:n}))},beforeUpdate(t,e,n){t.tooltip&&t.tooltip.initialize(n)},reset(t,e,n){t.tooltip&&t.tooltip.initialize(n)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const n={tooltip:e};if(t.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n)}},afterEvent(t,e){if(t.tooltip){const n=e.replay;t.tooltip.handleEvent(e.event,n,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:Aa},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},B0=Object.freeze({__proto__:null,Colors:Hm,Decimation:Um,Filler:f0,Legend:b0,SubTitle:w0,Title:_0,Tooltip:E0});const V0=(t,e,n,o)=>(typeof e=="string"?(n=t.push(e)-1,o.unshift({index:n,label:e})):isNaN(e)&&(n=null),n);function P0(t,e,n,o){const i=t.indexOf(e);if(i===-1)return V0(t,e,n,o);const r=t.lastIndexOf(e);return i!==r?n:i}const R0=(t,e)=>t===null?null:me(Math.round(t),0,e);function Oa(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}class ss extends It{constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const n=this._addedLabels;if(n.length){const o=this.getLabels();for(const{index:i,label:r}of n)o[i]===r&&o.splice(i,1);this._addedLabels=[]}super.init(e)}parse(e,n){if(X(e))return null;const o=this.getLabels();return n=isFinite(n)&&o[n]===e?n:P0(o,e,Y(n,e),this._addedLabels),R0(n,o.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let{min:o,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(o=0),n||(i=this.getLabels().length-1)),this.min=o,this.max=i}buildTicks(){const e=this.min,n=this.max,o=this.options.offset,i=[];let r=this.getLabels();r=e===0&&n===r.length-1?r:r.slice(e,n+1),this._valueRange=Math.max(r.length-(o?0:1),1),this._startValue=this.min-(o?.5:0);for(let l=e;l<=n;l++)i.push({value:l});return i}getLabelForValue(e){return Oa.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return typeof e!="number"&&(e=this.parse(e)),e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}I(ss,"id","category"),I(ss,"defaults",{ticks:{callback:Oa}});function F0(t,e){const n=[],{bounds:i,step:r,min:l,max:a,precision:d,count:c,maxTicks:u,maxDigits:f,includeBounds:h}=t,p=r||1,m=u-1,{min:g,max:y}=e,b=!X(l),$=!X(a),w=!X(c),S=(y-g)/(f+1);let x=zr((y-g)/m/p)*p,V,D,F,N;if(x<1e-14&&!b&&!$)return[{value:g},{value:y}];N=Math.ceil(y/x)-Math.floor(g/x),N>m&&(x=zr(N*x/m/p)*p),X(d)||(V=Math.pow(10,d),x=Math.ceil(x*V)/V),i==="ticks"?(D=Math.floor(g/x)*x,F=Math.ceil(y/x)*x):(D=g,F=y),b&&$&&r&&Df((a-l)/r,x/1e3)?(N=Math.round(Math.min((a-l)/x,u)),x=(a-l)/N,D=l,F=a):w?(D=b?l:D,F=$?a:F,N=c-1,x=(F-D)/N):(N=(F-D)/x,pn(N,Math.round(N),x/1e3)?N=Math.round(N):N=Math.ceil(N));const P=Math.max(jr(x),jr(D));V=Math.pow(10,X(d)?P:d),D=Math.round(D*V)/V,F=Math.round(F*V)/V;let C=0;for(b&&(h&&D!==l?(n.push({value:l}),D<l&&C++,pn(Math.round((D+C*x)*V)/V,l,Ia(l,S,t))&&C++):D<l&&C++);C<N;++C){const _=Math.round((D+C*x)*V)/V;if($&&_>a)break;n.push({value:_})}return $&&h&&F!==a?n.length&&pn(n[n.length-1].value,a,Ia(a,S,t))?n[n.length-1].value=a:n.push({value:a}):(!$||F===a)&&n.push({value:F}),n}function Ia(t,e,{horizontal:n,minRotation:o}){const i=Ie(o),r=(n?Math.sin(i):Math.cos(i))||.001,l=.75*e*(""+t).length;return Math.min(e/r,l)}class Ro extends It{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,n){return X(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:n,maxDefined:o}=this.getUserBounds();let{min:i,max:r}=this;const l=d=>i=n?i:d,a=d=>r=o?r:d;if(e){const d=Ye(i),c=Ye(r);d<0&&c<0?a(0):d>0&&c>0&&l(0)}if(i===r){let d=r===0?1:Math.abs(r*.05);a(r+d),e||l(i-d)}this.min=i,this.max=r}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:n,stepSize:o}=e,i;return o?(i=Math.ceil(this.max/o)-Math.floor(this.min/o)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${o} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,n=e.ticks;let o=this.getTickLimit();o=Math.max(2,o);const i={maxTicks:o,bounds:e.bounds,min:e.min,max:e.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},r=this._range||this,l=F0(i,r);return e.bounds==="ticks"&&Hr(l,this,"value"),e.reverse?(l.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),l}configure(){const e=this.ticks;let n=this.min,o=this.max;if(super.configure(),this.options.offset&&e.length){const i=(o-n)/Math.max(e.length-1,1)/2;n-=i,o+=i}this._startValue=n,this._endValue=o,this._valueRange=o-n}getLabelForValue(e){return yn(e,this.chart.options.locale,this.options.ticks.format)}}class rs extends Ro{determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=de(e)?e:0,this.max=de(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),n=e?this.width:this.height,o=Ie(this.options.ticks.minRotation),i=(e?Math.sin(o):Math.cos(o))||.001,r=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,r.lineHeight/i))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}I(rs,"id","linear"),I(rs,"defaults",{ticks:{callback:ro.formatters.numeric}});const Pn=t=>Math.floor(yt(t)),Tt=(t,e)=>Math.pow(10,Pn(t)+e);function Ta(t){return t/Math.pow(10,Pn(t))===1}function La(t,e,n){const o=Math.pow(10,n),i=Math.floor(t/o);return Math.ceil(e/o)-i}function N0(t,e){const n=e-t;let o=Pn(n);for(;La(t,e,o)>10;)o++;for(;La(t,e,o)<10;)o--;return Math.min(o,Pn(t))}function A0(t,{min:e,max:n}){e=De(t.min,e);const o=[],i=Pn(e);let r=N0(e,n),l=r<0?Math.pow(10,Math.abs(r)):1;const a=Math.pow(10,r),d=i>r?Math.pow(10,i):0,c=Math.round((e-d)*l)/l,u=Math.floor((e-d)/a/10)*a*10;let f=Math.floor((c-u)/Math.pow(10,r)),h=De(t.min,Math.round((d+u+f*Math.pow(10,r))*l)/l);for(;h<n;)o.push({value:h,major:Ta(h),significand:f}),f>=10?f=f<15?15:20:f++,f>=20&&(r++,f=2,l=r>=0?1:l),h=Math.round((d+u+f*Math.pow(10,r))*l)/l;const p=De(t.max,h);return o.push({value:p,major:Ta(p),significand:f}),o}class ls extends It{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,n){const o=Ro.prototype.parse.apply(this,[e,n]);if(o===0){this._zero=!0;return}return de(o)&&o>0?o:null}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=de(e)?Math.max(0,e):null,this.max=de(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!de(this._userMin)&&(this.min=e===Tt(this.min,0)?Tt(this.min,-1):Tt(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let o=this.min,i=this.max;const r=a=>o=e?o:a,l=a=>i=n?i:a;o===i&&(o<=0?(r(1),l(10)):(r(Tt(o,-1)),l(Tt(i,1)))),o<=0&&r(Tt(i,-1)),i<=0&&l(Tt(o,1)),this.min=o,this.max=i}buildTicks(){const e=this.options,n={min:this._userMin,max:this._userMax},o=A0(n,this);return e.bounds==="ticks"&&Hr(o,this,"value"),e.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}getLabelForValue(e){return e===void 0?"0":yn(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=yt(e),this._valueRange=yt(this.max)-yt(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(yt(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const n=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+n*this._valueRange)}}I(ls,"id","logarithmic"),I(ls,"defaults",{ticks:{callback:ro.formatters.logarithmic,major:{enabled:!0}}});function as(t){const e=t.ticks;if(e.display&&t.display){const n=be(e.backdropPadding);return Y(e.font&&e.font.size,ce.font.size)+n.height}return 0}function O0(t,e,n){return n=oe(n)?n:[n],{w:Yf(t,e.string,n),h:n.length*e.lineHeight}}function za(t,e,n,o,i){return t===o||t===i?{start:e-n/2,end:e+n/2}:t<o||t>i?{start:e-n,end:e}:{start:e,end:e+n}}function I0(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},n=Object.assign({},e),o=[],i=[],r=t._pointLabels.length,l=t.options.pointLabels,a=l.centerPointLabels?ie/r:0;for(let d=0;d<r;d++){const c=l.setContext(t.getPointLabelContext(d));i[d]=c.padding;const u=t.getPointPosition(d,t.drawingArea+i[d],a),f=he(c.font),h=O0(t.ctx,f,t._pointLabels[d]);o[d]=h;const p=Ee(t.getIndexAngle(d)+a),m=Math.round(Si(p)),g=za(m,u.x,h.w,0,180),y=za(m,u.y,h.h,90,270);T0(n,e,p,g,y)}t.setCenterPoint(e.l-n.l,n.r-e.r,e.t-n.t,n.b-e.b),t._pointLabelItems=H0(t,o,i)}function T0(t,e,n,o,i){const r=Math.abs(Math.sin(n)),l=Math.abs(Math.cos(n));let a=0,d=0;o.start<e.l?(a=(e.l-o.start)/r,t.l=Math.min(t.l,e.l-a)):o.end>e.r&&(a=(o.end-e.r)/r,t.r=Math.max(t.r,e.r+a)),i.start<e.t?(d=(e.t-i.start)/l,t.t=Math.min(t.t,e.t-d)):i.end>e.b&&(d=(i.end-e.b)/l,t.b=Math.max(t.b,e.b+d))}function L0(t,e,n){const o=t.drawingArea,{extra:i,additionalAngle:r,padding:l,size:a}=n,d=t.getPointPosition(e,o+i+l,r),c=Math.round(Si(Ee(d.angle+ue))),u=Y0(d.y,a.h,c),f=j0(c),h=W0(d.x,a.w,f);return{visible:!0,x:d.x,y:u,textAlign:f,left:h,top:u,right:h+a.w,bottom:u+a.h}}function z0(t,e){if(!e)return!0;const{left:n,top:o,right:i,bottom:r}=t;return!(tt({x:n,y:o},e)||tt({x:n,y:r},e)||tt({x:i,y:o},e)||tt({x:i,y:r},e))}function H0(t,e,n){const o=[],i=t._pointLabels.length,r=t.options,{centerPointLabels:l,display:a}=r.pointLabels,d={extra:as(r)/2,additionalAngle:l?ie/i:0};let c;for(let u=0;u<i;u++){d.padding=n[u],d.size=e[u];const f=L0(t,u,d);o.push(f),a==="auto"&&(f.visible=z0(f,c),f.visible&&(c=f))}return o}function j0(t){return t===0||t===180?"center":t<180?"left":"right"}function W0(t,e,n){return n==="right"?t-=e:n==="center"&&(t-=e/2),t}function Y0(t,e,n){return n===90||n===270?t-=e/2:(n>270||n<90)&&(t-=e),t}function U0(t,e,n){const{left:o,top:i,right:r,bottom:l}=n,{backdropColor:a}=e;if(!X(a)){const d=Pt(e.borderRadius),c=be(e.backdropPadding);t.fillStyle=a;const u=o-c.left,f=i-c.top,h=r-o+c.width,p=l-i+c.height;Object.values(d).some(m=>m!==0)?(t.beginPath(),$n(t,{x:u,y:f,w:h,h:p,radius:d}),t.fill()):t.fillRect(u,f,h,p)}}function G0(t,e){const{ctx:n,options:{pointLabels:o}}=t;for(let i=e-1;i>=0;i--){const r=t._pointLabelItems[i];if(!r.visible)continue;const l=o.setContext(t.getPointLabelContext(i));U0(n,l,r);const a=he(l.font),{x:d,y:c,textAlign:u}=r;Vt(n,t._pointLabels[i],d,c+a.lineHeight/2,a,{color:l.color,textAlign:u,textBaseline:"middle"})}}function Ha(t,e,n,o){const{ctx:i}=t;if(n)i.arc(t.xCenter,t.yCenter,e,0,se);else{let r=t.getPointPosition(0,e);i.moveTo(r.x,r.y);for(let l=1;l<o;l++)r=t.getPointPosition(l,e),i.lineTo(r.x,r.y)}}function q0(t,e,n,o,i){const r=t.ctx,l=e.circular,{color:a,lineWidth:d}=e;!l&&!o||!a||!d||n<0||(r.save(),r.strokeStyle=a,r.lineWidth=d,r.setLineDash(i.dash),r.lineDashOffset=i.dashOffset,r.beginPath(),Ha(t,n,l,o),r.closePath(),r.stroke(),r.restore())}function X0(t,e,n){return bt(t,{label:n,index:e,type:"pointLabel"})}class Rn extends Ro{constructor(e){super(e),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const e=this._padding=be(as(this.options)/2),n=this.width=this.maxWidth-e.width,o=this.height=this.maxHeight-e.height;this.xCenter=Math.floor(this.left+n/2+e.left),this.yCenter=Math.floor(this.top+o/2+e.top),this.drawingArea=Math.floor(Math.min(n,o)/2)}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!1);this.min=de(e)&&!isNaN(e)?e:0,this.max=de(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/as(this.options))}generateTickLabels(e){Ro.prototype.generateTickLabels.call(this,e),this._pointLabels=this.getLabels().map((n,o)=>{const i=ne(this.options.pointLabels.callback,[n,o],this);return i||i===0?i:""}).filter((n,o)=>this.chart.getDataVisibility(o))}fit(){const e=this.options;e.display&&e.pointLabels.display?I0(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,n,o,i){this.xCenter+=Math.floor((e-n)/2),this.yCenter+=Math.floor((o-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,n,o,i))}getIndexAngle(e){const n=se/(this._pointLabels.length||1),o=this.options.startAngle||0;return Ee(e*n+Ie(o))}getDistanceFromCenterForValue(e){if(X(e))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*n:(e-this.min)*n}getValueForDistanceFromCenter(e){if(X(e))return NaN;const n=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(e){const n=this._pointLabels||[];if(e>=0&&e<n.length){const o=n[e];return X0(this.getContext(),e,o)}}getPointPosition(e,n,o=0){const i=this.getIndexAngle(e)-ue+o;return{x:Math.cos(i)*n+this.xCenter,y:Math.sin(i)*n+this.yCenter,angle:i}}getPointPositionForValue(e,n){return this.getPointPosition(e,this.getDistanceFromCenterForValue(n))}getBasePosition(e){return this.getPointPositionForValue(e||0,this.getBaseValue())}getPointLabelPosition(e){const{left:n,top:o,right:i,bottom:r}=this._pointLabelItems[e];return{left:n,top:o,right:i,bottom:r}}drawBackground(){const{backgroundColor:e,grid:{circular:n}}=this.options;if(e){const o=this.ctx;o.save(),o.beginPath(),Ha(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length),o.closePath(),o.fillStyle=e,o.fill(),o.restore()}}drawGrid(){const e=this.ctx,n=this.options,{angleLines:o,grid:i,border:r}=n,l=this._pointLabels.length;let a,d,c;if(n.pointLabels.display&&G0(this,l),i.display&&this.ticks.forEach((u,f)=>{if(f!==0||f===0&&this.min<0){d=this.getDistanceFromCenterForValue(u.value);const h=this.getContext(f),p=i.setContext(h),m=r.setContext(h);q0(this,p,d,l,m)}}),o.display){for(e.save(),a=l-1;a>=0;a--){const u=o.setContext(this.getPointLabelContext(a)),{color:f,lineWidth:h}=u;!h||!f||(e.lineWidth=h,e.strokeStyle=f,e.setLineDash(u.borderDash),e.lineDashOffset=u.borderDashOffset,d=this.getDistanceFromCenterForValue(n.ticks.reverse?this.min:this.max),c=this.getPointPosition(a,d),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(c.x,c.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const e=this.ctx,n=this.options,o=n.ticks;if(!o.display)return;const i=this.getIndexAngle(0);let r,l;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(i),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((a,d)=>{if(d===0&&this.min>=0&&!n.reverse)return;const c=o.setContext(this.getContext(d)),u=he(c.font);if(r=this.getDistanceFromCenterForValue(this.ticks[d].value),c.showLabelBackdrop){e.font=u.string,l=e.measureText(a.label).width,e.fillStyle=c.backdropColor;const f=be(c.backdropPadding);e.fillRect(-l/2-f.left,-r-u.size/2-f.top,l+f.width,u.size+f.height)}Vt(e,a.label,0,-r,u,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),e.restore()}drawTitle(){}}I(Rn,"id","radialLinear"),I(Rn,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:ro.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(e){return e},padding:5,centerPointLabels:!1}}),I(Rn,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),I(Rn,"descriptors",{angleLines:{_fallback:"grid"}});const Fo={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}},ve=Object.keys(Fo);function ja(t,e){return t-e}function Wa(t,e){if(X(e))return null;const n=t._adapter,{parser:o,round:i,isoWeekday:r}=t._parseOpts;let l=e;return typeof o=="function"&&(l=o(l)),de(l)||(l=typeof o=="string"?n.parse(l,o):n.parse(l)),l===null?null:(i&&(l=i==="week"&&(Ut(r)||r===!0)?n.startOf(l,"isoWeek",r):n.startOf(l,i)),+l)}function Ya(t,e,n,o){const i=ve.length;for(let r=ve.indexOf(t);r<i-1;++r){const l=Fo[ve[r]],a=l.steps?l.steps:Number.MAX_SAFE_INTEGER;if(l.common&&Math.ceil((n-e)/(a*l.size))<=o)return ve[r]}return ve[i-1]}function K0(t,e,n,o,i){for(let r=ve.length-1;r>=ve.indexOf(n);r--){const l=ve[r];if(Fo[l].common&&t._adapter.diff(i,o,l)>=e-1)return l}return ve[n?ve.indexOf(n):0]}function Z0(t){for(let e=ve.indexOf(t)+1,n=ve.length;e<n;++e)if(Fo[ve[e]].common)return ve[e]}function Ua(t,e,n){if(!n)t[e]=!0;else if(n.length){const{lo:o,hi:i}=Mi(n,e),r=n[o]>=e?n[o]:n[i];t[r]=!0}}function J0(t,e,n,o){const i=t._adapter,r=+i.startOf(e[0].value,o),l=e[e.length-1].value;let a,d;for(a=r;a<=l;a=+i.add(a,1,o))d=n[a],d>=0&&(e[d].major=!0);return e}function Ga(t,e,n){const o=[],i={},r=e.length;let l,a;for(l=0;l<r;++l)a=e[l],i[a]=l,o.push({value:a,major:!1});return r===0||!n?o:J0(t,o,i,n)}class Fn extends It{constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,n={}){const o=e.time||(e.time={}),i=this._adapter=new lp._date(e.adapters.date);i.init(n),fn(o.displayFormats,i.formats()),this._parseOpts={parser:o.parser,round:o.round,isoWeekday:o.isoWeekday},super.init(e),this._normalized=n.normalized}parse(e,n){return e===void 0?null:Wa(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,n=this._adapter,o=e.time.unit||"day";let{min:i,max:r,minDefined:l,maxDefined:a}=this.getUserBounds();function d(c){!l&&!isNaN(c.min)&&(i=Math.min(i,c.min)),!a&&!isNaN(c.max)&&(r=Math.max(r,c.max))}(!l||!a)&&(d(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&d(this.getMinMax(!1))),i=de(i)&&!isNaN(i)?i:+n.startOf(Date.now(),o),r=de(r)&&!isNaN(r)?r:+n.endOf(Date.now(),o)+1,this.min=Math.min(i,r-1),this.max=Math.max(i+1,r)}_getLabelBounds(){const e=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;return e.length&&(n=e[0],o=e[e.length-1]),{min:n,max:o}}buildTicks(){const e=this.options,n=e.time,o=e.ticks,i=o.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const r=this.min,l=this.max,a=Pf(i,r,l);return this._unit=n.unit||(o.autoSkip?Ya(n.minUnit,this.min,this.max,this._getLabelCapacity(r)):K0(this,a.length,n.minUnit,this.min,this.max)),this._majorUnit=!o.major.enabled||this._unit==="year"?void 0:Z0(this._unit),this.initOffsets(i),e.reverse&&a.reverse(),Ga(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let n=0,o=0,i,r;this.options.offset&&e.length&&(i=this.getDecimalForValue(e[0]),e.length===1?n=1-i:n=(this.getDecimalForValue(e[1])-i)/2,r=this.getDecimalForValue(e[e.length-1]),e.length===1?o=r:o=(r-this.getDecimalForValue(e[e.length-2]))/2);const l=e.length<3?.5:.25;n=me(n,0,l),o=me(o,0,l),this._offsets={start:n,end:o,factor:1/(n+1+o)}}_generate(){const e=this._adapter,n=this.min,o=this.max,i=this.options,r=i.time,l=r.unit||Ya(r.minUnit,n,o,this._getLabelCapacity(n)),a=Y(i.ticks.stepSize,1),d=l==="week"?r.isoWeekday:!1,c=Ut(d)||d===!0,u={};let f=n,h,p;if(c&&(f=+e.startOf(f,"isoWeek",d)),f=+e.startOf(f,c?"day":l),e.diff(o,n,l)>1e5*a)throw new Error(n+" and "+o+" are too far apart with stepSize of "+a+" "+l);const m=i.ticks.source==="data"&&this.getDataTimestamps();for(h=f,p=0;h<o;h=+e.add(h,a,l),p++)Ua(u,h,m);return(h===o||i.bounds==="ticks"||p===1)&&Ua(u,h,m),Object.keys(u).sort(ja).map(g=>+g)}getLabelForValue(e){const n=this._adapter,o=this.options.time;return o.tooltipFormat?n.format(e,o.tooltipFormat):n.format(e,o.displayFormats.datetime)}format(e,n){const i=this.options.time.displayFormats,r=this._unit,l=n||i[r];return this._adapter.format(e,l)}_tickFormatFunction(e,n,o,i){const r=this.options,l=r.ticks.callback;if(l)return ne(l,[e,n,o],this);const a=r.time.displayFormats,d=this._unit,c=this._majorUnit,u=d&&a[d],f=c&&a[c],h=o[n],p=c&&f&&h&&h.major;return this._adapter.format(e,i||(p?f:u))}generateTickLabels(e){let n,o,i;for(n=0,o=e.length;n<o;++n)i=e[n],i.label=this._tickFormatFunction(i.value,n,e)}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const n=this._offsets,o=this.getDecimalForValue(e);return this.getPixelForDecimal((n.start+o)*n.factor)}getValueForPixel(e){const n=this._offsets,o=this.getDecimalForPixel(e)/n.factor-n.end;return this.min+o*(this.max-this.min)}_getLabelSize(e){const n=this.options.ticks,o=this.ctx.measureText(e).width,i=Ie(this.isHorizontal()?n.maxRotation:n.minRotation),r=Math.cos(i),l=Math.sin(i),a=this._resolveTickFontOptions(0).size;return{w:o*r+a*l,h:o*l+a*r}}_getLabelCapacity(e){const n=this.options.time,o=n.displayFormats,i=o[n.unit]||o.millisecond,r=this._tickFormatFunction(e,0,Ga(this,[e],this._majorUnit),i),l=this._getLabelSize(r),a=Math.floor(this.isHorizontal()?this.width/l.w:this.height/l.h)-1;return a>0?a:1}getDataTimestamps(){let e=this._cache.data||[],n,o;if(e.length)return e;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,o=i.length;n<o;++n)e=e.concat(i[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){const e=this._cache.labels||[];let n,o;if(e.length)return e;const i=this.getLabels();for(n=0,o=i.length;n<o;++n)e.push(Wa(this,i[n]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return Gr(e.sort(ja))}}I(Fn,"id","time"),I(Fn,"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 No(t,e,n){let o=0,i=t.length-1,r,l,a,d;n?(e>=t[o].pos&&e<=t[i].pos&&({lo:o,hi:i}=et(t,"pos",e)),{pos:r,time:a}=t[o],{pos:l,time:d}=t[i]):(e>=t[o].time&&e<=t[i].time&&({lo:o,hi:i}=et(t,"time",e)),{time:r,pos:a}=t[o],{time:l,pos:d}=t[i]);const c=l-r;return c?a+(d-a)*(e-r)/c:a}class ds extends Fn{constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(e);this._minPos=No(n,this.min),this._tableRange=No(n,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:n,max:o}=this,i=[],r=[];let l,a,d,c,u;for(l=0,a=e.length;l<a;++l)c=e[l],c>=n&&c<=o&&i.push(c);if(i.length<2)return[{time:n,pos:0},{time:o,pos:1}];for(l=0,a=i.length;l<a;++l)u=i[l+1],d=i[l-1],c=i[l],Math.round((u+d)/2)!==c&&r.push({time:c,pos:l/(a-1)});return r}_generate(){const e=this.min,n=this.max;let o=super.getDataTimestamps();return(!o.includes(e)||!o.length)&&o.splice(0,0,e),(!o.includes(n)||o.length===1)&&o.push(n),o.sort((i,r)=>i-r)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const n=this.getDataTimestamps(),o=this.getLabelTimestamps();return n.length&&o.length?e=this.normalize(n.concat(o)):e=n.length?n:o,e=this._cache.all=e,e}getDecimalForValue(e){return(No(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const n=this._offsets,o=this.getDecimalForPixel(e)/n.factor-n.end;return No(this._table,o*this._tableRange+this._minPos,!0)}}I(ds,"id","timeseries"),I(ds,"defaults",Fn.defaults);var Q0=Object.freeze({__proto__:null,CategoryScale:ss,LinearScale:rs,LogarithmicScale:ls,RadialLinearScale:Rn,TimeScale:Fn,TimeSeriesScale:ds});const eg=[rp,Am,B0,Q0];Le.register(...eg);const tg={class:"flex flex-col h-full m-24 overflow-hidden p-24"},ng={class:"flex flex-col gap-8"},og={class:"fm-color-typo-primary fm-typo-body-lg-400"},ig={class:"fm-color-typo-secondary fm-typo-body-md-400"},sg={class:"grow"},rg=s.defineComponent({__name:"FmLine",props:{name:{default:void 0},paragraph:{default:void 0},datasets:{},xAxis:{},transpose:{type:Boolean,default:!1},stacked:{type:Boolean},maintainAspectRatio:{type:Boolean}},setup(t){const e=t,n=s.ref(null);let o=null;s.watch([()=>e.transpose,()=>e.maintainAspectRatio],()=>{o&&o.config.options&&(o.destroy(),a())});const i=s.computed(()=>e.transpose?"y":"x");function r({context:d,color:c}){const{ctx:u,chartArea:f}=d.chart;if(!f)return;const h=u==null?void 0:u.createLinearGradient(0,0,0,f.height);return h.addColorStop(0,gi(c,.5)),h.addColorStop(1,gi(c,0)),h}const l=s.computed(()=>({labels:e.xAxis.categories,datasets:e.datasets.map(d=>{const c=rn(d.color)??"";return{...d,backgroundColor:c?u=>r({context:u,color:c}):"",borderColor:c,borderDash:d.dash?[5,5]:void 0,tension:.1}})}));s.watch(l,()=>{o&&(o.data=l.value,o.update())},{deep:!0});function a(){n.value&&(o=new Le(n.value,{type:"line",data:l.value,options:{plugins:{legend:{display:e.datasets.length>1,position:"bottom",labels:{usePointStyle:!0,pointStyle:"line"}}},maintainAspectRatio:e.maintainAspectRatio,responsive:!0,indexAxis:i.value,scales:{x:{stacked:e.stacked,grid:{display:!1},beginAtZero:!0},y:{stacked:e.stacked,grid:{display:!0},position:"right",beginAtZero:!0}},elements:{line:{borderWidth:1.5},point:{radius:0,hitRadius:30,hoverRadius:6,hoverBackgroundColor:"#FFFFFF",hoverBorderWidth:3}}}}))}return s.onMounted(()=>{a()}),(d,c)=>(s.openBlock(),s.createElementBlock("div",tg,[s.createElementVNode("div",ng,[s.renderSlot(d.$slots,"title"),s.createElementVNode("div",og,s.toDisplayString(d.name),1),s.createElementVNode("div",ig,s.toDisplayString(d.paragraph),1)]),s.createElementVNode("div",sg,[s.createElementVNode("canvas",{ref_key:"canvas",ref:n},null,512)])]))}}),lg={class:"flex flex-col h-full overflow-hidden px-24 py-16"},ag={class:"flex flex-col gap-8"},dg={class:"fm-color-typo-primary fm-typo-body-lg-400"},cg={class:"fm-color-typo-secondary fm-typo-body-md-400"},ug={class:"grow"},fg=s.defineComponent({__name:"FmPie",props:{name:{default:void 0},variant:{},paragraph:{default:void 0},datasets:{},metrics:{},legend:{type:Boolean,default:!0},text:{default:void 0},textColor:{default:"#0E1715"},textStyle:{default:"bold 30px sans-serif"},maintainAspectRatio:{type:Boolean,default:!0}},setup(t){const e=t,n=s.ref(null);let o=null;const i=s.computed(()=>e.variant==="doughnut"?"90%":"0"),r=s.computed(()=>e.text);s.watch([()=>e.metrics,()=>e.datasets,()=>e.variant,()=>e.legend,()=>e.textColor,()=>e.textStyle,()=>e.text,()=>e.maintainAspectRatio],()=>{o&&(o.destroy(),a())});const l=s.computed(()=>({labels:e.metrics,datasets:e.datasets.map(d=>{var u;const c=(u=d.backgroundColor)==null?void 0:u.map(f=>rn(f)??"");return{...d,backgroundColor:c??void 0,hoverOffset:d.hoverOffset??0}})}));function a(){n.value&&(o=new Le(n.value,{type:"doughnut",data:l.value,options:{maintainAspectRatio:e.maintainAspectRatio,responsive:!0,cutout:i.value,plugins:{legend:{display:e.legend,position:"bottom",labels:{usePointStyle:!0}}}},plugins:[{id:"doughnutlabel",beforeDatasetsDraw:d=>{if(e.variant==="doughnut"){const{ctx:c}=d;c.save();const u=d.getDatasetMeta(0).data[0].x,f=d.getDatasetMeta(0).data[0].y;if(c.font=e.textStyle,c.textAlign="center",c.textBaseline="middle",r.value&&r.value!==""){const h=r.value.split(`
27
+ `);for(let p=0;p<h.length;p++){const m=p===0?1:.7;c.fillStyle=gi(rn(e.textColor)??"",m),c.fillText(h[p],u,f+p*40)}}}}}]}))}return s.onMounted(()=>{a()}),(d,c)=>(s.openBlock(),s.createElementBlock("div",lg,[s.createElementVNode("div",ag,[s.renderSlot(d.$slots,"title"),s.createElementVNode("div",dg,s.toDisplayString(d.name),1),s.createElementVNode("div",cg,s.toDisplayString(d.paragraph),1)]),s.createElementVNode("div",ug,[s.createElementVNode("canvas",{ref_key:"canvas",ref:n},null,512)])]))}}),hg={class:"flex flex-col h-full overflow-hidden px-24 py-16"},pg={class:"flex flex-col gap-8"},mg={class:"fm-color-typo-primary fm-typo-body-lg-400"},gg={class:"fm-color-typo-secondary fm-typo-body-md-400"},yg={class:"grow"},bg=s.defineComponent({__name:"FmBar",props:{name:{default:void 0},paragraph:{default:void 0},datasets:{},xAxis:{},transpose:{type:Boolean,default:!1},stacked:{type:Boolean,default:!1},maintainAspectRatio:{type:Boolean,default:!0}},setup(t){const e=t,n=s.ref(null);let o=null;s.watch([()=>e.transpose,()=>e.maintainAspectRatio],()=>{o&&(o.destroy(),l())});const i=s.computed(()=>e.transpose?"y":"x"),r=s.computed(()=>({labels:e.xAxis.categories,datasets:e.datasets.map(a=>{var u;let d,c;return typeof a.backgroundColor=="string"?d=a.backgroundColor:typeof a.backgroundColor=="object"&&(d=a.backgroundColor.map(f=>rn(f)??"")),typeof a.borderColor=="string"?c=a.borderColor:typeof a.borderColor=="object"&&(c=(u=a.borderColor)==null?void 0:u.map(f=>rn(f)??"")),{...a,backgroundColor:d,borderColor:c,borderRadius:10,borderWidth:c?1:0}})}));s.watch(r,()=>{o&&(o.data=r.value,o.update())},{deep:!0});function l(){n.value&&(o=new Le(n.value,{type:"bar",data:r.value,options:{plugins:{legend:{display:e.datasets.length>1,position:"bottom"}},maintainAspectRatio:e.maintainAspectRatio,responsive:!0,indexAxis:i.value,scales:{x:{stacked:e.stacked,grid:{display:!1},beginAtZero:!0},y:{stacked:e.stacked,grid:{display:!1},position:"right",beginAtZero:!0}},elements:{point:{radius:0,hitRadius:30,hoverRadius:6,hoverBackgroundColor:"#FFFFFF",hoverBorderWidth:3}}}}))}return s.onMounted(()=>{l()}),(a,d)=>(s.openBlock(),s.createElementBlock("div",hg,[s.createElementVNode("div",pg,[s.renderSlot(a.$slots,"title"),s.createElementVNode("div",mg,s.toDisplayString(a.name),1),s.createElementVNode("div",gg,s.toDisplayString(a.paragraph),1)]),s.createElementVNode("div",yg,[s.createElementVNode("canvas",{ref_key:"canvas",ref:n},null,512)])]))}});function _e(t,e){return t===null||e===null||typeof t!="object"&&typeof e!="object"?t===e:Object.keys(t).length!==Object.keys(e).length?!1:Object.keys(t).every(n=>_e(t[n],e[n]))}const $g=t=>typeof t=="boolean",_g={class:"fm-checkbox"},wg={class:"fm-checkbox--wrapper"},Cg={class:"fm-checkbox__input--container"},xg=["checked","disabled","indeterminate"],kg={key:0,class:"fm-checkbox__label-container"},Sg={class:"fm-typo-body-lg-400"},vg={key:0,class:"fm-color-typo-secondary fm-typo-body-md-400"},qa=s.defineComponent({__name:"FmCheckbox",props:{modelValue:{type:[Boolean,Array]},label:{default:""},sublabel:{default:""},disabled:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1},value:{}},emits:["update:modelValue","update:indeterminate"],setup(t){const e=t,n=Z(e,"modelValue"),o=Z(e,"indeterminate"),i=Array.isArray(n.value),r=s.ref(i?n.value.some(d=>_e(d,e.value)):n.value),l=s.computed(()=>{const d=i?n.value.some(c=>_e(c,e.value)):n.value;return o.value&&!d?"remove":n.value?"check_small":""});function a(){if(e.disabled)return;o.value=!1,r.value=!r.value;let d=n.value;i?d=r.value?d.concat(e.value):d.filter(c=>!_e(c,e.value)):d=r.value,n.value=d}return s.watch(()=>n.value,()=>{r.value=i?n.value.some(d=>_e(d,e.value)):n.value}),(d,c)=>(s.openBlock(),s.createElementBlock("div",_g,[s.createElementVNode("label",wg,[s.createElementVNode("div",Cg,[s.createElementVNode("input",{class:s.normalizeClass({"fm-checkbox__input--btn":!0,"fm-checkbox__input--btn--checked":r.value}),type:"checkbox",checked:r.value,disabled:e.disabled,indeterminate:s.unref(o),onInput:a},null,42,xg),s.unref(o)||r.value?(s.openBlock(),s.createBlock(j,{key:0,class:"fm-checkbox__input--checkmark",name:l.value,size:"md",color:"#FFFFFF"},null,8,["name"])):s.createCommentVNode("",!0)]),e.label?(s.openBlock(),s.createElementBlock("div",kg,[s.renderSlot(d.$slots,"label"),s.createElementVNode("div",Sg,s.toDisplayString(e.label),1),e.sublabel?(s.openBlock(),s.createElementBlock("div",vg,s.toDisplayString(e.sublabel),1)):s.createCommentVNode("",!0)])):s.createCommentVNode("",!0)])]))}});function Ao(){const t=s.ref(window.innerWidth),e=()=>{t.value=window.innerWidth};return s.onMounted(()=>{window.addEventListener("resize",e)}),s.onUnmounted(()=>{window.removeEventListener("resize",e)}),{breakpoints:s.computed(()=>({xs:t.value>=0&&t.value<=647,sm:t.value>=648&&t.value<=959,md:t.value>=960&&t.value<=1247,lg:t.value>=1248}))}}var Mg=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function cs(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Xa={exports:{}};(function(t,e){(function(n,o){t.exports=o()})(Mg,function(){var n=1e3,o=6e4,i=36e5,r="millisecond",l="second",a="minute",d="hour",c="day",u="week",f="month",h="quarter",p="year",m="date",g="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|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(v){var M=["th","st","nd","rd"],k=v%100;return"["+v+(M[(k-20)%10]||M[k]||M[0])+"]"}},w=function(v,M,k){var B=String(v);return!B||B.length>=M?v:""+Array(M+1-B.length).join(k)+v},S={s:w,z:function(v){var M=-v.utcOffset(),k=Math.abs(M),B=Math.floor(k/60),O=k%60;return(M<=0?"+":"-")+w(B,2,"0")+":"+w(O,2,"0")},m:function v(M,k){if(M.date()<k.date())return-v(k,M);var B=12*(k.year()-M.year())+(k.month()-M.month()),O=M.clone().add(B,f),L=k-O<0,T=M.clone().add(B+(L?-1:1),f);return+(-(B+(k-O)/(L?O-T:T-O))||0)},a:function(v){return v<0?Math.ceil(v)||0:Math.floor(v)},p:function(v){return{M:f,y:p,w:u,d:c,D:m,h:d,m:a,s:l,ms:r,Q:h}[v]||String(v||"").toLowerCase().replace(/s$/,"")},u:function(v){return v===void 0}},x="en",V={};V[x]=$;var D="$isDayjsObject",F=function(v){return v instanceof _||!(!v||!v[D])},N=function v(M,k,B){var O;if(!M)return x;if(typeof M=="string"){var L=M.toLowerCase();V[L]&&(O=L),k&&(V[L]=k,O=L);var T=M.split("-");if(!O&&T.length>1)return v(T[0])}else{var W=M.name;V[W]=M,O=W}return!B&&O&&(x=O),O||!B&&x},P=function(v,M){if(F(v))return v.clone();var k=typeof M=="object"?M:{};return k.date=v,k.args=arguments,new _(k)},C=S;C.l=N,C.i=F,C.w=function(v,M){return P(v,{locale:M.$L,utc:M.$u,x:M.$x,$offset:M.$offset})};var _=function(){function v(k){this.$L=N(k.locale,null,!0),this.parse(k),this.$x=this.$x||k.x||{},this[D]=!0}var M=v.prototype;return M.parse=function(k){this.$d=function(B){var O=B.date,L=B.utc;if(O===null)return new Date(NaN);if(C.u(O))return new Date;if(O instanceof Date)return new Date(O);if(typeof O=="string"&&!/Z$/i.test(O)){var T=O.match(y);if(T){var W=T[2]-1||0,U=(T[7]||"0").substring(0,3);return L?new Date(Date.UTC(T[1],W,T[3]||1,T[4]||0,T[5]||0,T[6]||0,U)):new Date(T[1],W,T[3]||1,T[4]||0,T[5]||0,T[6]||0,U)}}return new Date(O)}(k),this.init()},M.init=function(){var k=this.$d;this.$y=k.getFullYear(),this.$M=k.getMonth(),this.$D=k.getDate(),this.$W=k.getDay(),this.$H=k.getHours(),this.$m=k.getMinutes(),this.$s=k.getSeconds(),this.$ms=k.getMilliseconds()},M.$utils=function(){return C},M.isValid=function(){return this.$d.toString()!==g},M.isSame=function(k,B){var O=P(k);return this.startOf(B)<=O&&O<=this.endOf(B)},M.isAfter=function(k,B){return P(k)<this.startOf(B)},M.isBefore=function(k,B){return this.endOf(B)<P(k)},M.$g=function(k,B,O){return C.u(k)?this[B]:this.set(O,k)},M.unix=function(){return Math.floor(this.valueOf()/1e3)},M.valueOf=function(){return this.$d.getTime()},M.startOf=function(k,B){var O=this,L=!!C.u(B)||B,T=C.p(k),W=function(Ne,te){var re=C.w(O.$u?Date.UTC(O.$y,te,Ne):new Date(O.$y,te,Ne),O);return L?re:re.endOf(c)},U=function(Ne,te){return C.w(O.toDate()[Ne].apply(O.toDate("s"),(L?[0,0,0,0]:[23,59,59,999]).slice(te)),O)},G=this.$W,Q=this.$M,le=this.$D,fe="set"+(this.$u?"UTC":"");switch(T){case p:return L?W(1,0):W(31,11);case f:return L?W(1,Q):W(0,Q+1);case u:var Fe=this.$locale().weekStart||0,je=(G<Fe?G+7:G)-Fe;return W(L?le-je:le+(6-je),Q);case c:case m:return U(fe+"Hours",0);case d:return U(fe+"Minutes",1);case a:return U(fe+"Seconds",2);case l:return U(fe+"Milliseconds",3);default:return this.clone()}},M.endOf=function(k){return this.startOf(k,!1)},M.$set=function(k,B){var O,L=C.p(k),T="set"+(this.$u?"UTC":""),W=(O={},O[c]=T+"Date",O[m]=T+"Date",O[f]=T+"Month",O[p]=T+"FullYear",O[d]=T+"Hours",O[a]=T+"Minutes",O[l]=T+"Seconds",O[r]=T+"Milliseconds",O)[L],U=L===c?this.$D+(B-this.$W):B;if(L===f||L===p){var G=this.clone().set(m,1);G.$d[W](U),G.init(),this.$d=G.set(m,Math.min(this.$D,G.daysInMonth())).$d}else W&&this.$d[W](U);return this.init(),this},M.set=function(k,B){return this.clone().$set(k,B)},M.get=function(k){return this[C.p(k)]()},M.add=function(k,B){var O,L=this;k=Number(k);var T=C.p(B),W=function(Q){var le=P(L);return C.w(le.date(le.date()+Math.round(Q*k)),L)};if(T===f)return this.set(f,this.$M+k);if(T===p)return this.set(p,this.$y+k);if(T===c)return W(1);if(T===u)return W(7);var U=(O={},O[a]=o,O[d]=i,O[l]=n,O)[T]||1,G=this.$d.getTime()+k*U;return C.w(G,this)},M.subtract=function(k,B){return this.add(-1*k,B)},M.format=function(k){var B=this,O=this.$locale();if(!this.isValid())return O.invalidDate||g;var L=k||"YYYY-MM-DDTHH:mm:ssZ",T=C.z(this),W=this.$H,U=this.$m,G=this.$M,Q=O.weekdays,le=O.months,fe=O.meridiem,Fe=function(te,re,xe,ke){return te&&(te[re]||te(B,L))||xe[re].slice(0,ke)},je=function(te){return C.s(W%12||12,te,"0")},Ne=fe||function(te,re,xe){var ke=te<12?"AM":"PM";return xe?ke.toLowerCase():ke};return L.replace(b,function(te,re){return re||function(xe){switch(xe){case"YY":return String(B.$y).slice(-2);case"YYYY":return C.s(B.$y,4,"0");case"M":return G+1;case"MM":return C.s(G+1,2,"0");case"MMM":return Fe(O.monthsShort,G,le,3);case"MMMM":return Fe(le,G);case"D":return B.$D;case"DD":return C.s(B.$D,2,"0");case"d":return String(B.$W);case"dd":return Fe(O.weekdaysMin,B.$W,Q,2);case"ddd":return Fe(O.weekdaysShort,B.$W,Q,3);case"dddd":return Q[B.$W];case"H":return String(W);case"HH":return C.s(W,2,"0");case"h":return je(1);case"hh":return je(2);case"a":return Ne(W,U,!0);case"A":return Ne(W,U,!1);case"m":return String(U);case"mm":return C.s(U,2,"0");case"s":return String(B.$s);case"ss":return C.s(B.$s,2,"0");case"SSS":return C.s(B.$ms,3,"0");case"Z":return T}return null}(te)||T.replace(":","")})},M.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},M.diff=function(k,B,O){var L,T=this,W=C.p(B),U=P(k),G=(U.utcOffset()-this.utcOffset())*o,Q=this-U,le=function(){return C.m(T,U)};switch(W){case p:L=le()/12;break;case f:L=le();break;case h:L=le()/3;break;case u:L=(Q-G)/6048e5;break;case c:L=(Q-G)/864e5;break;case d:L=Q/i;break;case a:L=Q/o;break;case l:L=Q/n;break;default:L=Q}return O?L:C.a(L)},M.daysInMonth=function(){return this.endOf(f).$D},M.$locale=function(){return V[this.$L]},M.locale=function(k,B){if(!k)return this.$L;var O=this.clone(),L=N(k,B,!0);return L&&(O.$L=L),O},M.clone=function(){return C.w(this.$d,this)},M.toDate=function(){return new Date(this.valueOf())},M.toJSON=function(){return this.isValid()?this.toISOString():null},M.toISOString=function(){return this.$d.toISOString()},M.toString=function(){return this.$d.toUTCString()},v}(),E=_.prototype;return P.prototype=E,[["$ms",r],["$s",l],["$m",a],["$H",d],["$W",c],["$M",f],["$y",p],["$D",m]].forEach(function(v){E[v[1]]=function(M){return this.$g(M,v[0],v[1])}}),P.extend=function(v,M){return v.$i||(v(M,_,P),v.$i=!0),P},P.locale=N,P.isDayjs=F,P.unix=function(v){return P(1e3*v)},P.en=V[x],P.Ls=V,P.p={},P})})(Xa);var Dg=Xa.exports;const R=cs(Dg),Eg={class:"w-full"},ge=K(s.defineComponent({__name:"FmField",props:{tag:{default:"div"},prependIcon:{default:""},appendIcon:{default:""},invalid:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},iconOutlined:{type:Boolean,default:!1}},setup(t){const e=t;return(n,o)=>(s.openBlock(),s.createBlock(e.tag,{class:s.normalizeClass({"fm-field":!0,"fm-field--focused":n.focused,"fm-field--invalid":n.invalid,"fm-field--valid":n.showValidBorder&&!n.invalid,"fm-field--disabled":n.disabled})},{default:s.withCtx(()=>[s.renderSlot(n.$slots,"prepend",{},()=>[n.prependIcon?(s.openBlock(),s.createBlock(j,{key:0,name:n.prependIcon,size:"md",color:n.disabled?"disabled":"neutral-black",outline:n.iconOutlined},null,8,["name","color","outline"])):s.createCommentVNode("",!0)],!0),s.createElementVNode("div",Eg,[s.renderSlot(n.$slots,"default",{},void 0,!0)]),s.renderSlot(n.$slots,"append",{},()=>[n.appendIcon?(s.openBlock(),s.createBlock(j,{key:0,name:n.appendIcon,size:"md",color:n.disabled?"disabled":"neutral-black",outline:n.iconOutlined},null,8,["name","color","outline"])):s.createCommentVNode("",!0)],!0)]),_:3},8,["class"]))}}),[["__scopeId","data-v-bf7938df"]]),Bg={class:"flex gap-4"},Ka=s.defineComponent({__name:"FmHelperText",props:{text:{default:""},disabled:{type:Boolean,default:!1},state:{default:"none"},errorMessages:{default:()=>[]}},setup(t){const e=t,n=s.computed(()=>e.state==="success"?"check_circle":e.state==="warning"?"warning":e.state==="error"?"error":""),o=s.computed(()=>e.state==="success"?"text-fm-color-system-success-300":e.state==="warning"?"text-fm-color-system-warning-300":e.state==="error"?"text-fm-color-system-error-300":"");return(i,r)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["fm-typo-body-sm-400",{"text-fm-color-typo-disabled":i.disabled,"text-fm-color-typo-secondary":i.state==="none"&&!i.disabled,"text-fm-color-typo-success":i.state==="success"&&!i.disabled,"text-fm-color-typo-warning":i.state==="warning"&&!i.disabled,"text-fm-color-typo-error":i.state==="error"&&!i.disabled}])},[i.errorMessages.length===0?s.renderSlot(i.$slots,"default",{key:0},()=>[s.createElementVNode("div",Bg,[n.value?(s.openBlock(),s.createBlock(j,{key:0,size:"sm",name:n.value,class:s.normalizeClass(["mt-[2px]",o.value])},null,8,["name","class"])):s.createCommentVNode("",!0),s.createElementVNode("span",null,s.toDisplayString(i.text),1)])]):s.renderSlot(i.$slots,"default",{key:1},()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.errorMessages,l=>(s.openBlock(),s.createElementBlock("div",{key:l,class:"flex gap-4 text-fm-color-typo-error"},[s.createVNode(j,{size:"sm",name:"error",class:"mt-[2px] text-fm-color-system-error-300"}),s.createElementVNode("span",null,s.toDisplayString(l),1)]))),128))])],2))}}),Zt=Math.min,Lt=Math.max,Oo=Math.round,Io=Math.floor,wt=t=>({x:t,y:t}),Vg={left:"right",right:"left",bottom:"top",top:"bottom"},Pg={start:"end",end:"start"};function us(t,e,n){return Lt(t,Zt(e,n))}function Nn(t,e){return typeof t=="function"?t(e):t}function zt(t){return t.split("-")[0]}function An(t){return t.split("-")[1]}function Za(t){return t==="x"?"y":"x"}function fs(t){return t==="y"?"height":"width"}function To(t){return["top","bottom"].includes(zt(t))?"y":"x"}function hs(t){return Za(To(t))}function Rg(t,e,n){n===void 0&&(n=!1);const o=An(t),i=hs(t),r=fs(i);let l=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(l=Lo(l)),[l,Lo(l)]}function Fg(t){const e=Lo(t);return[ps(t),e,ps(e)]}function ps(t){return t.replace(/start|end/g,e=>Pg[e])}function Ng(t,e,n){const o=["left","right"],i=["right","left"],r=["top","bottom"],l=["bottom","top"];switch(t){case"top":case"bottom":return n?e?i:o:e?o:i;case"left":case"right":return e?r:l;default:return[]}}function Ag(t,e,n,o){const i=An(t);let r=Ng(zt(t),n==="start",o);return i&&(r=r.map(l=>l+"-"+i),e&&(r=r.concat(r.map(ps)))),r}function Lo(t){return t.replace(/left|right|bottom|top/g,e=>Vg[e])}function Og(t){return{top:0,right:0,bottom:0,left:0,...t}}function Ja(t){return typeof t!="number"?Og(t):{top:t,right:t,bottom:t,left:t}}function zo(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function Qa(t,e,n){let{reference:o,floating:i}=t;const r=To(e),l=hs(e),a=fs(l),d=zt(e),c=r==="y",u=o.x+o.width/2-i.width/2,f=o.y+o.height/2-i.height/2,h=o[a]/2-i[a]/2;let p;switch(d){case"top":p={x:u,y:o.y-i.height};break;case"bottom":p={x:u,y:o.y+o.height};break;case"right":p={x:o.x+o.width,y:f};break;case"left":p={x:o.x-i.width,y:f};break;default:p={x:o.x,y:o.y}}switch(An(e)){case"start":p[l]-=h*(n&&c?-1:1);break;case"end":p[l]+=h*(n&&c?-1:1);break}return p}const Ig=async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:l}=n,a=r.filter(Boolean),d=await(l.isRTL==null?void 0:l.isRTL(e));let c=await l.getElementRects({reference:t,floating:e,strategy:i}),{x:u,y:f}=Qa(c,o,d),h=o,p={},m=0;for(let g=0;g<a.length;g++){const{name:y,fn:b}=a[g],{x:$,y:w,data:S,reset:x}=await b({x:u,y:f,initialPlacement:o,placement:h,strategy:i,middlewareData:p,rects:c,platform:l,elements:{reference:t,floating:e}});u=$??u,f=w??f,p={...p,[y]:{...p[y],...S}},x&&m<=50&&(m++,typeof x=="object"&&(x.placement&&(h=x.placement),x.rects&&(c=x.rects===!0?await l.getElementRects({reference:t,floating:e,strategy:i}):x.rects),{x:u,y:f}=Qa(c,h,d)),g=-1)}return{x:u,y:f,placement:h,strategy:i,middlewareData:p}};async function ed(t,e){var n;e===void 0&&(e={});const{x:o,y:i,platform:r,rects:l,elements:a,strategy:d}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:h=!1,padding:p=0}=Nn(e,t),m=Ja(p),y=a[h?f==="floating"?"reference":"floating":f],b=zo(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(y)))==null||n?y:y.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:d})),$=f==="floating"?{...l.floating,x:o,y:i}:l.reference,w=await(r.getOffsetParent==null?void 0:r.getOffsetParent(a.floating)),S=await(r.isElement==null?void 0:r.isElement(w))?await(r.getScale==null?void 0:r.getScale(w))||{x:1,y:1}:{x:1,y:1},x=zo(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:$,offsetParent:w,strategy:d}):$);return{top:(b.top-x.top+m.top)/S.y,bottom:(x.bottom-b.bottom+m.bottom)/S.y,left:(b.left-x.left+m.left)/S.x,right:(x.right-b.right+m.right)/S.x}}const Tg=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:i,rects:r,platform:l,elements:a,middlewareData:d}=e,{element:c,padding:u=0}=Nn(t,e)||{};if(c==null)return{};const f=Ja(u),h={x:n,y:o},p=hs(i),m=fs(p),g=await l.getDimensions(c),y=p==="y",b=y?"top":"left",$=y?"bottom":"right",w=y?"clientHeight":"clientWidth",S=r.reference[m]+r.reference[p]-h[p]-r.floating[m],x=h[p]-r.reference[p],V=await(l.getOffsetParent==null?void 0:l.getOffsetParent(c));let D=V?V[w]:0;(!D||!await(l.isElement==null?void 0:l.isElement(V)))&&(D=a.floating[w]||r.floating[m]);const F=S/2-x/2,N=D/2-g[m]/2-1,P=Zt(f[b],N),C=Zt(f[$],N),_=P,E=D-g[m]-C,v=D/2-g[m]/2+F,M=us(_,v,E),k=!d.arrow&&An(i)!=null&&v!==M&&r.reference[m]/2-(v<_?P:C)-g[m]/2<0,B=k?v<_?v-_:v-E:0;return{[p]:h[p]+B,data:{[p]:M,centerOffset:v-M-B,...k&&{alignmentOffset:B}},reset:k}}}),Lg=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:r,rects:l,initialPlacement:a,platform:d,elements:c}=e,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...y}=Nn(t,e);if((n=r.arrow)!=null&&n.alignmentOffset)return{};const b=zt(i),$=zt(a)===a,w=await(d.isRTL==null?void 0:d.isRTL(c.floating)),S=h||($||!g?[Lo(a)]:Fg(a));!h&&m!=="none"&&S.push(...Ag(a,g,m,w));const x=[a,...S],V=await ed(e,y),D=[];let F=((o=r.flip)==null?void 0:o.overflows)||[];if(u&&D.push(V[b]),f){const _=Rg(i,l,w);D.push(V[_[0]],V[_[1]])}if(F=[...F,{placement:i,overflows:D}],!D.every(_=>_<=0)){var N,P;const _=(((N=r.flip)==null?void 0:N.index)||0)+1,E=x[_];if(E)return{data:{index:_,overflows:F},reset:{placement:E}};let v=(P=F.filter(M=>M.overflows[0]<=0).sort((M,k)=>M.overflows[1]-k.overflows[1])[0])==null?void 0:P.placement;if(!v)switch(p){case"bestFit":{var C;const M=(C=F.map(k=>[k.placement,k.overflows.filter(B=>B>0).reduce((B,O)=>B+O,0)]).sort((k,B)=>k[1]-B[1])[0])==null?void 0:C[0];M&&(v=M);break}case"initialPlacement":v=a;break}if(i!==v)return{reset:{placement:v}}}return{}}}};async function zg(t,e){const{placement:n,platform:o,elements:i}=t,r=await(o.isRTL==null?void 0:o.isRTL(i.floating)),l=zt(n),a=An(n),d=To(n)==="y",c=["left","top"].includes(l)?-1:1,u=r&&d?-1:1,f=Nn(e,t);let{mainAxis:h,crossAxis:p,alignmentAxis:m}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&typeof m=="number"&&(p=a==="end"?m*-1:m),d?{x:p*u,y:h*c}:{x:h*c,y:p*u}}const On=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:i,y:r,placement:l,middlewareData:a}=e,d=await zg(e,t);return l===((n=a.offset)==null?void 0:n.placement)&&(o=a.arrow)!=null&&o.alignmentOffset?{}:{x:i+d.x,y:r+d.y,data:{...d,placement:l}}}}},Hg=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:i}=e,{mainAxis:r=!0,crossAxis:l=!1,limiter:a={fn:y=>{let{x:b,y:$}=y;return{x:b,y:$}}},...d}=Nn(t,e),c={x:n,y:o},u=await ed(e,d),f=To(zt(i)),h=Za(f);let p=c[h],m=c[f];if(r){const y=h==="y"?"top":"left",b=h==="y"?"bottom":"right",$=p+u[y],w=p-u[b];p=us($,p,w)}if(l){const y=f==="y"?"top":"left",b=f==="y"?"bottom":"right",$=m+u[y],w=m-u[b];m=us($,m,w)}const g=a.fn({...e,[h]:p,[f]:m});return{...g,data:{x:g.x-n,y:g.y-o}}}}};function st(t){return ms(t)?(t.nodeName||"").toLowerCase():"#document"}function Be(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function rt(t){var e;return(e=(ms(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function ms(t){return t instanceof Node||t instanceof Be(t).Node}function lt(t){return t instanceof Element||t instanceof Be(t).Element}function qe(t){return t instanceof HTMLElement||t instanceof Be(t).HTMLElement}function td(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Be(t).ShadowRoot}function In(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=Oe(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!["inline","contents"].includes(i)}function jg(t){return["table","td","th"].includes(st(t))}function gs(t){const e=ys(),n=Oe(t);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(o=>(n.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(n.contain||"").includes(o))}function Wg(t){let e=Jt(t);for(;qe(e)&&!Ho(e);){if(gs(e))return e;e=Jt(e)}return null}function ys(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ho(t){return["html","body","#document"].includes(st(t))}function Oe(t){return Be(t).getComputedStyle(t)}function jo(t){return lt(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Jt(t){if(st(t)==="html")return t;const e=t.assignedSlot||t.parentNode||td(t)&&t.host||rt(t);return td(e)?e.host:e}function nd(t){const e=Jt(t);return Ho(e)?t.ownerDocument?t.ownerDocument.body:t.body:qe(e)&&In(e)?e:nd(e)}function Tn(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=nd(t),r=i===((o=t.ownerDocument)==null?void 0:o.body),l=Be(i);return r?e.concat(l,l.visualViewport||[],In(i)?i:[],l.frameElement&&n?Tn(l.frameElement):[]):e.concat(i,Tn(i,[],n))}function od(t){const e=Oe(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=qe(t),r=i?t.offsetWidth:n,l=i?t.offsetHeight:o,a=Oo(n)!==r||Oo(o)!==l;return a&&(n=r,o=l),{width:n,height:o,$:a}}function bs(t){return lt(t)?t:t.contextElement}function Qt(t){const e=bs(t);if(!qe(e))return wt(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:r}=od(e);let l=(r?Oo(n.width):n.width)/o,a=(r?Oo(n.height):n.height)/i;return(!l||!Number.isFinite(l))&&(l=1),(!a||!Number.isFinite(a))&&(a=1),{x:l,y:a}}const Yg=wt(0);function id(t){const e=Be(t);return!ys()||!e.visualViewport?Yg:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Ug(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Be(t)?!1:e}function Ht(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),r=bs(t);let l=wt(1);e&&(o?lt(o)&&(l=Qt(o)):l=Qt(t));const a=Ug(r,n,o)?id(r):wt(0);let d=(i.left+a.x)/l.x,c=(i.top+a.y)/l.y,u=i.width/l.x,f=i.height/l.y;if(r){const h=Be(r),p=o&&lt(o)?Be(o):o;let m=h,g=m.frameElement;for(;g&&o&&p!==m;){const y=Qt(g),b=g.getBoundingClientRect(),$=Oe(g),w=b.left+(g.clientLeft+parseFloat($.paddingLeft))*y.x,S=b.top+(g.clientTop+parseFloat($.paddingTop))*y.y;d*=y.x,c*=y.y,u*=y.x,f*=y.y,d+=w,c+=S,m=Be(g),g=m.frameElement}}return zo({width:u,height:f,x:d,y:c})}const Gg=[":popover-open",":modal"];function sd(t){return Gg.some(e=>{try{return t.matches(e)}catch{return!1}})}function qg(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const r=i==="fixed",l=rt(o),a=e?sd(e.floating):!1;if(o===l||a&&r)return n;let d={scrollLeft:0,scrollTop:0},c=wt(1);const u=wt(0),f=qe(o);if((f||!f&&!r)&&((st(o)!=="body"||In(l))&&(d=jo(o)),qe(o))){const h=Ht(o);c=Qt(o),u.x=h.x+o.clientLeft,u.y=h.y+o.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-d.scrollLeft*c.x+u.x,y:n.y*c.y-d.scrollTop*c.y+u.y}}function Xg(t){return Array.from(t.getClientRects())}function rd(t){return Ht(rt(t)).left+jo(t).scrollLeft}function Kg(t){const e=rt(t),n=jo(t),o=t.ownerDocument.body,i=Lt(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),r=Lt(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let l=-n.scrollLeft+rd(t);const a=-n.scrollTop;return Oe(o).direction==="rtl"&&(l+=Lt(e.clientWidth,o.clientWidth)-i),{width:i,height:r,x:l,y:a}}function Zg(t,e){const n=Be(t),o=rt(t),i=n.visualViewport;let r=o.clientWidth,l=o.clientHeight,a=0,d=0;if(i){r=i.width,l=i.height;const c=ys();(!c||c&&e==="fixed")&&(a=i.offsetLeft,d=i.offsetTop)}return{width:r,height:l,x:a,y:d}}function Jg(t,e){const n=Ht(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=qe(t)?Qt(t):wt(1),l=t.clientWidth*r.x,a=t.clientHeight*r.y,d=i*r.x,c=o*r.y;return{width:l,height:a,x:d,y:c}}function ld(t,e,n){let o;if(e==="viewport")o=Zg(t,n);else if(e==="document")o=Kg(rt(t));else if(lt(e))o=Jg(e,n);else{const i=id(t);o={...e,x:e.x-i.x,y:e.y-i.y}}return zo(o)}function ad(t,e){const n=Jt(t);return n===e||!lt(n)||Ho(n)?!1:Oe(n).position==="fixed"||ad(n,e)}function Qg(t,e){const n=e.get(t);if(n)return n;let o=Tn(t,[],!1).filter(a=>lt(a)&&st(a)!=="body"),i=null;const r=Oe(t).position==="fixed";let l=r?Jt(t):t;for(;lt(l)&&!Ho(l);){const a=Oe(l),d=gs(l);!d&&a.position==="fixed"&&(i=null),(r?!d&&!i:!d&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||In(l)&&!d&&ad(t,l))?o=o.filter(u=>u!==l):i=a,l=Jt(l)}return e.set(t,o),o}function e1(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const l=[...n==="clippingAncestors"?Qg(e,this._c):[].concat(n),o],a=l[0],d=l.reduce((c,u)=>{const f=ld(e,u,i);return c.top=Lt(f.top,c.top),c.right=Zt(f.right,c.right),c.bottom=Zt(f.bottom,c.bottom),c.left=Lt(f.left,c.left),c},ld(e,a,i));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function t1(t){const{width:e,height:n}=od(t);return{width:e,height:n}}function n1(t,e,n){const o=qe(e),i=rt(e),r=n==="fixed",l=Ht(t,!0,r,e);let a={scrollLeft:0,scrollTop:0};const d=wt(0);if(o||!o&&!r)if((st(e)!=="body"||In(i))&&(a=jo(e)),o){const f=Ht(e,!0,r,e);d.x=f.x+e.clientLeft,d.y=f.y+e.clientTop}else i&&(d.x=rd(i));const c=l.left+a.scrollLeft-d.x,u=l.top+a.scrollTop-d.y;return{x:c,y:u,width:l.width,height:l.height}}function dd(t,e){return!qe(t)||Oe(t).position==="fixed"?null:e?e(t):t.offsetParent}function cd(t,e){const n=Be(t);if(!qe(t)||sd(t))return n;let o=dd(t,e);for(;o&&jg(o)&&Oe(o).position==="static";)o=dd(o,e);return o&&(st(o)==="html"||st(o)==="body"&&Oe(o).position==="static"&&!gs(o))?n:o||Wg(t)||n}const o1=async function(t){const e=this.getOffsetParent||cd,n=this.getDimensions;return{reference:n1(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,...await n(t.floating)}}};function i1(t){return Oe(t).direction==="rtl"}const s1={convertOffsetParentRelativeRectToViewportRelativeRect:qg,getDocumentElement:rt,getClippingRect:e1,getOffsetParent:cd,getElementRects:o1,getClientRects:Xg,getDimensions:t1,getScale:Qt,isElement:lt,isRTL:i1};function r1(t,e){let n=null,o;const i=rt(t);function r(){var a;clearTimeout(o),(a=n)==null||a.disconnect(),n=null}function l(a,d){a===void 0&&(a=!1),d===void 0&&(d=1),r();const{left:c,top:u,width:f,height:h}=t.getBoundingClientRect();if(a||e(),!f||!h)return;const p=Io(u),m=Io(i.clientWidth-(c+f)),g=Io(i.clientHeight-(u+h)),y=Io(c),$={rootMargin:-p+"px "+-m+"px "+-g+"px "+-y+"px",threshold:Lt(0,Zt(1,d))||1};let w=!0;function S(x){const V=x[0].intersectionRatio;if(V!==d){if(!w)return l();V?l(!1,V):o=setTimeout(()=>{l(!1,1e-7)},100)}w=!1}try{n=new IntersectionObserver(S,{...$,root:i.ownerDocument})}catch{n=new IntersectionObserver(S,$)}n.observe(t)}return l(!0),r}function Ln(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:d=!1}=o,c=bs(t),u=i||r?[...c?Tn(c):[],...Tn(e)]:[];u.forEach(b=>{i&&b.addEventListener("scroll",n,{passive:!0}),r&&b.addEventListener("resize",n)});const f=c&&a?r1(c,n):null;let h=-1,p=null;l&&(p=new ResizeObserver(b=>{let[$]=b;$&&$.target===c&&p&&(p.unobserve(e),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var w;(w=p)==null||w.observe(e)})),n()}),c&&!d&&p.observe(c),p.observe(e));let m,g=d?Ht(t):null;d&&y();function y(){const b=Ht(t);g&&(b.x!==g.x||b.y!==g.y||b.width!==g.width||b.height!==g.height)&&n(),g=b,m=requestAnimationFrame(y)}return n(),()=>{var b;u.forEach($=>{i&&$.removeEventListener("scroll",n),r&&$.removeEventListener("resize",n)}),f==null||f(),(b=p)==null||b.disconnect(),p=null,d&&cancelAnimationFrame(m)}}const ud=Hg,zn=Lg,l1=Tg,a1=(t,e,n)=>{const o=new Map,i={platform:s1,...n},r={...i.platform,_c:o};return Ig(t,e,{...i,platform:r})};function d1(t){return t!=null&&typeof t=="object"&&"$el"in t}function $s(t){if(d1(t)){const e=t.$el;return ms(e)&&st(e)==="#comment"?null:e}return t}function fd(t){return{name:"arrow",options:t,fn(e){const n=$s(s.unref(t.element));return n==null?{}:l1({element:n,padding:t.padding}).fn(e)}}}function hd(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function pd(t,e){const n=hd(t);return Math.round(e*n)/n}function Hn(t,e,n){n===void 0&&(n={});const o=n.whileElementsMounted,i=s.computed(()=>{var D;return(D=s.unref(n.open))!=null?D:!0}),r=s.computed(()=>s.unref(n.middleware)),l=s.computed(()=>{var D;return(D=s.unref(n.placement))!=null?D:"bottom"}),a=s.computed(()=>{var D;return(D=s.unref(n.strategy))!=null?D:"absolute"}),d=s.computed(()=>{var D;return(D=s.unref(n.transform))!=null?D:!0}),c=s.computed(()=>$s(t.value)),u=s.computed(()=>$s(e.value)),f=s.ref(0),h=s.ref(0),p=s.ref(a.value),m=s.ref(l.value),g=s.shallowRef({}),y=s.ref(!1),b=s.computed(()=>{const D={position:p.value,left:"0",top:"0"};if(!u.value)return D;const F=pd(u.value,f.value),N=pd(u.value,h.value);return d.value?{...D,transform:"translate("+F+"px, "+N+"px)",...hd(u.value)>=1.5&&{willChange:"transform"}}:{position:p.value,left:F+"px",top:N+"px"}});let $;function w(){c.value==null||u.value==null||a1(c.value,u.value,{middleware:r.value,placement:l.value,strategy:a.value}).then(D=>{f.value=D.x,h.value=D.y,p.value=D.strategy,m.value=D.placement,g.value=D.middlewareData,y.value=!0})}function S(){typeof $=="function"&&($(),$=void 0)}function x(){if(S(),o===void 0){w();return}if(c.value!=null&&u.value!=null){$=o(c.value,u.value,w);return}}function V(){i.value||(y.value=!1)}return s.watch([r,l,a],w,{flush:"sync"}),s.watch([c,u],x,{flush:"sync"}),s.watch(i,V,{flush:"sync"}),s.getCurrentScope()&&s.onScopeDispose(S),{x:s.shallowReadonly(f),y:s.shallowReadonly(h),strategy:s.shallowReadonly(p),placement:s.shallowReadonly(m),middlewareData:s.shallowReadonly(g),isPositioned:s.shallowReadonly(y),floatingStyles:b,update:w}}const md=s.defineComponent({__name:"FmTooltip",props:{variant:{default:"plain"},placement:{default:"top"},hideArrow:{type:Boolean,default:!1},content:{default:""},disabled:{type:Boolean,default:!1}},setup(t){const e=t,n=s.ref(null),o=s.ref(null),i=s.ref(null),{floatingStyles:r,middlewareData:l,placement:a}=Hn(n,o,{whileElementsMounted:Ln,placement:e.placement,middleware:[zn(),On({mainAxis:6}),fd({element:i})]}),d=s.ref(!1),c=s.ref(0),u=s.ref(0),f=()=>{e.disabled||(clearTimeout(u.value),c.value=window.setTimeout(()=>{d.value=!0},250))},h=()=>{e.disabled||(clearTimeout(c.value),u.value=window.setTimeout(()=>d.value=!1,250))},p=()=>{clearTimeout(u.value),d.value=!0},m=s.computed(()=>{var y,b,$,w;const g={top:"bottom",right:"left",bottom:"top",left:"right"}[a.value];return{left:((y=l.value.arrow)==null?void 0:y.x)!=null?`${(b=l.value.arrow)==null?void 0:b.x}px`:"",top:(($=l.value.arrow)==null?void 0:$.y)!=null?`${(w=l.value.arrow)==null?void 0:w.y}px`:"",[g]:"-3px"}});return(g,y)=>(s.openBlock(),s.createElementBlock("div",null,[s.createElementVNode("div",{ref_key:"referenceEl",ref:n,class:s.normalizeClass(["cursor-pointer flex items-center justify-center relative w-max",{"cursor-not-allowed pointer-events-none":g.disabled}]),onPointermove:y[0]||(y[0]=b=>{b.pointerType!=="touch"&&f()}),onPointerleave:h,onPointerdown:h,onPointerup:h},[s.renderSlot(g.$slots,"default")],34),(s.openBlock(),s.createBlock(s.Teleport,{to:"body"},[d.value&&!g.disabled?(s.openBlock(),s.createElementBlock("div",{key:0,ref_key:"tooltipContent",ref:o,class:s.normalizeClass(["fm-shadow-light-300 max-w-[240px] px-16 py-12 rounded-lg",{"bg-fm-color-neutral-black text-fm-color-typo-white fm-typo-body-sm-400":g.variant==="plain","bg-fm-color-neutral-white text-fm-color-typo-secondary fm-typo-body-md-400":g.variant==="rich"}]),style:s.normalizeStyle(s.unref(r)),onMouseenter:p,onMouseleave:h},[s.renderSlot(g.$slots,"content",{},()=>[s.createTextVNode(s.toDisplayString(g.content),1)]),s.withDirectives(s.createElementVNode("div",{ref_key:"arrowEl",ref:i,class:s.normalizeClass(["absolute h-8 rotate-45 rounded-[2px] w-8",{"bg-fm-color-neutral-black":g.variant==="plain","bg-fm-color-neutral-white":g.variant==="rich"}]),style:s.normalizeStyle(m.value)},null,6),[[s.vShow,!g.hideArrow]])],38)):s.createCommentVNode("",!0)]))]))}}),en=s.defineComponent({__name:"FmLabel",props:{label:{default:""},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},optional:{type:Boolean,default:!1},info:{default:""}},setup(t){return(e,n)=>e.label||e.$slots.default?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(["fm-typo-body-lg-400 flex gap-4",e.disabled?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary",{"items-center":e.info}])},[s.renderSlot(e.$slots,"default",{},()=>[s.createElementVNode("span",null,s.toDisplayString(e.label),1),e.required?(s.openBlock(),s.createElementBlock("span",{key:0,class:s.normalizeClass(["fm-typo-body-lg-700",e.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-error"])}," * ",2)):s.createCommentVNode("",!0),e.optional?(s.openBlock(),s.createElementBlock("span",{key:1,class:s.normalizeClass(["fm-typo-body-md-400",e.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-tertiary"])}," (optional) ",2)):s.createCommentVNode("",!0),e.info?(s.openBlock(),s.createBlock(md,{key:2,placement:"top",content:e.info,disabled:e.disabled},{default:s.withCtx(()=>[s.createVNode(j,{name:"info",size:"sm",class:s.normalizeClass(["fm-typo-body-md-400",e.disabled?"text-fm-color-typo-disabled":"text-fm-color-neutral-gray-300"])},null,8,["class"])]),_:1},8,["content","disabled"])):s.createCommentVNode("",!0)])],2)):s.createCommentVNode("",!0)}});function gd(t,e){const n=s.ref([]);function o(){const r=[];if(e.value&&e.value.length>0)for(const l of e.value){const d=(typeof l=="function"?l:()=>l)(t.value);d!==!0&&r.push(d)}return n.value=r,n.value}function i(){n.value=[]}return{validate:o,resetValidation:i,errorMessages:n}}function yd(t,e=null,n=null){let o=null;const i=Z(t,"modelValue"),r=s.ref(!0),l=s.inject(yr,null),{validate:a,resetValidation:d,errorMessages:c}=gd(i,s.toRef(()=>t.rules)),u=(f=n)=>{r.value=!0,d(),f&&typeof f=="function"&&f(),i.value=e};return s.onMounted(()=>{l&&(o=l.register({validate:a,resetValidation:d,resetValue:u}))}),s.onUnmounted(()=>{l&&l.unregister(o)}),s.watch(()=>i.value,()=>{r.value=!1,i.value!==e&&a()}),s.watch(()=>t.focused,f=>{r.value=!1,f||a()}),{validate:a,resetValidation:d,errorMessages:c,resetValue:u,isPristine:r}}function jn(){const t=s.ref(!1);function e(){t.value=!0}function n(){t.value=!1}return{focus:e,blur:n,isFocused:t}}const c1={key:1,class:"flex items-center justify-between"},Ve=s.defineComponent({__name:"FmFormGroup",props:{modelValue:{},rules:{default:()=>[]},focused:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},label:{default:""},required:{type:Boolean,default:!1},optional:{type:Boolean,default:!1},info:{default:""},helperText:{default:""},helperState:{default:"none"},tag:{default:"label"}},setup(t){const e=t,{errorMessages:n,isPristine:o}=yd(e),{focus:i,blur:r}=jn(),l=s.computed(()=>({label:e.label,disabled:e.disabled,required:e.required,optional:e.optional,info:e.info})),a=s.computed(()=>({text:e.helperText,disabled:e.disabled,state:e.helperState,errorMessages:n.value})),d=s.computed(()=>({isPristine:o,invalid:n.value.length>0}));return(c,u)=>(s.openBlock(),s.createBlock(e.tag,{class:"flex flex-col gap-4",onClick:s.unref(i),onBlur:s.unref(r)},{default:s.withCtx(()=>[c.label||c.$slots.label?(s.openBlock(),s.createBlock(en,s.normalizeProps(s.mergeProps({key:0},l.value)),{default:s.withCtx(()=>[s.renderSlot(c.$slots,"label")]),_:3},16)):s.createCommentVNode("",!0),s.renderSlot(c.$slots,"default",s.normalizeProps(s.guardReactiveProps(d.value))),a.value.text||a.value.errorMessages.length>0||c.$slots["helper-text"]||c.$slots["helper-append"]?(s.openBlock(),s.createElementBlock("div",c1,[s.createVNode(Ka,s.normalizeProps(s.guardReactiveProps(a.value)),{default:s.withCtx(()=>[s.renderSlot(c.$slots,"helper-text")]),_:3},16),s.renderSlot(c.$slots,"helper-append")])):s.createCommentVNode("",!0)]),_:3},8,["onClick","onBlur"]))}}),Ct=K(s.defineComponent({__name:"FmMenu",props:{placement:{default:"bottom-start"},disabled:{type:Boolean,default:!1},trigger:{default:"click"},closeOnClick:{type:Boolean,default:!0},width:{default:void 0},maxHeight:{default:408},inPopover:{type:Boolean,default:!1}},emits:["menu-changed"],setup(t,{emit:e}){const n=t,o=e,i=s.ref([]);let r;const l=s.ref(),a=s.ref(!1),d=s.ref(!1),c=s.inject(wr,null),u=s.ref(null),f=s.ref(null),{floatingStyles:h}=Hn(u,f,{middleware:[On({mainAxis:c?8:4,crossAxis:c?-12:0}),zn(),ud()],placement:n.placement,whileElementsMounted:Ln}),p=()=>{x.value==="hover"&&g()},m=()=>{if(!n.disabled){if(a.value){a.value=!1;return}x.value==="click"&&g()}},g=()=>{d.value=!0,a.value=!0,c==null||c.setChildId(r)},y=()=>{x.value==="hover"&&(d.value=!1)},b=()=>{d.value=!0},$=()=>{d.value=!1},w=()=>{n.closeOnClick&&setTimeout(()=>{a.value=!1,c==null||c.closeParent()},10)},S=s.computed(()=>({mouseInMenu:d}));s.provide(wr,{register({injectProps:D}){return i.value=[...i.value,{injectProps:D}],i.value.length},closeParent(){c?(a.value=!1,c==null||c.closeParent()):a.value=x.value!=="click"},setChildId(D){l.value=D},mouseInChildId:l,trigger:n.trigger}),s.provide(Cr,{handleContentClick:w}),s.onMounted(()=>{window.addEventListener("click",V),c&&(r=c.register({injectProps:S}))}),s.onUnmounted(()=>{window.removeEventListener("click",V)}),s.watch(()=>c==null?void 0:c.mouseInChildId.value,D=>{D!==r&&(a.value=!1)});const x=s.computed(()=>c===null?n.trigger:"hover");s.watch(()=>a.value,()=>o("menu-changed",a.value));const V=D=>{if(!a.value)return;const F=D.path||D.composedPath();for(const N of F)if(N==u.value||N==f.value)return;a.value=!1};return(D,F)=>(s.openBlock(),s.createElementBlock("div",null,[s.createElementVNode("div",{ref_key:"anchorEl",ref:u,class:"fm-menu",onMouseenter:p,onMouseleave:y,onClick:m},[s.renderSlot(D.$slots,"menu-button",{},void 0,!0)],544),(s.openBlock(),s.createBlock(s.Teleport,{to:"body",disabled:!!s.unref(c)||D.inPopover},[a.value?(s.openBlock(),s.createElementBlock("div",{key:0,id:"fm-menu",ref_key:"menuEl",ref:f,class:"block z-[99]",style:s.normalizeStyle(s.unref(h)),onMouseenter:b,onMouseleave:$},[s.renderSlot(D.$slots,"menu-wrapper",{},()=>[s.createElementVNode("div",{class:"fm-menu__wrapper",style:s.normalizeStyle({"max-height":`${D.maxHeight}px`,width:`${D.width}px`})},[s.renderSlot(D.$slots,"default",{},void 0,!0)],4)],!0)],36)):s.createCommentVNode("",!0)],8,["disabled"]))]))}}),[["__scopeId","data-v-c8a870c6"]]),u1={class:"fm-menu-item--left"},f1={key:0,class:"fm-menu-item--right"},Pe=K(s.defineComponent({__name:"FmMenuItem",props:{modelValue:{type:Boolean,default:!1},selectable:{type:Boolean,default:!0},label:{default:""},sublabel:{default:""},icon:{default:""},expandable:{type:Boolean,default:!1},hasCheckbox:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=s.ref(!1),i=s.inject(Cr,null),r=e,l=c=>{c.preventDefault(),i==null||i.handleContentClick(),!(n.disabled||!n.selectable)&&r("update:modelValue",!n.modelValue)},a=()=>{r("update:modelValue",n.modelValue)};function d(c){o.value=c}return(c,u)=>(s.openBlock(),s.createElementBlock("div",null,[s.createElementVNode("div",{class:s.normalizeClass({"fm-menu-item":!0,"fm-menu-item--selected":c.modelValue&&!c.hasCheckbox,"fm-menu-item--disabled":c.disabled,"hover:bg-fm-color-opacity-sm":!c.disabled&&!c.modelValue&&c.selectable}),onClick:l,onMousedown:u[1]||(u[1]=()=>d(!0)),onMouseup:u[2]||(u[2]=()=>d(!1)),onMouseleave:u[3]||(u[3]=()=>d(!1))},[s.createElementVNode("div",u1,[s.renderSlot(c.$slots,"prepend",{},()=>[!c.hasCheckbox&&c.icon?(s.openBlock(),s.createBlock(j,{key:0,name:c.icon,size:"md",outline:!o.value&&!c.modelValue,color:c.disabled?"#C7C7CC":c.modelValue?"#FF7823":"#1C1C1E"},null,8,["name","outline","color"])):s.createCommentVNode("",!0),c.hasCheckbox?(s.openBlock(),s.createBlock(qa,{key:1,"model-value":c.modelValue,name:"something",label:"",sublabel:"",value:"",indeterminate:!1,disabled:c.disabled,"onUpdate:modelValue":a,onClick:u[0]||(u[0]=f=>f.preventDefault())},null,8,["model-value","disabled"])):s.createCommentVNode("",!0)],!0),s.renderSlot(c.$slots,"label",{},()=>[s.createElementVNode("div",null,[s.createElementVNode("div",{class:s.normalizeClass(`fm-typo-body-lg-400 ${c.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-primary"}`)},s.toDisplayString(c.label),3),c.sublabel?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(`fm-typo-body-md-400 ${c.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-secondary"}`)},s.toDisplayString(c.sublabel),3)):s.createCommentVNode("",!0)])],!0)]),s.renderSlot(c.$slots,"append",{},void 0,!0),c.expandable?(s.openBlock(),s.createElementBlock("div",f1,[s.createVNode(j,{name:"chevron_right",size:"md",color:c.disabled?"#C7C7CC":"#AEAEB2"},null,8,["color"])])):s.createCommentVNode("",!0)],34)]))}}),[["__scopeId","data-v-cb553369"]]),h1={class:"fm-typo-body-lg-700"},p1={class:"h-[264px] overflow-y-auto w-[160px]"},tn=s.defineComponent({__name:"FmDateRangeYearMonthPicker",props:{modelValue:{},picker:{},min:{},max:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=e,i=s.ref(!1),r=s.computed(()=>{const d=R(n.min).startOf("year"),u=R(n.max).startOf("year").diff(d,"year"),f=[];for(let h=0;h<=u;h++)f.push(d.add(h,"year"));return f}),l=d=>{const c=R(n.min).startOf("month"),u=R(n.max).startOf("month");return d.get("year")===c.get("year")?d.startOf("month").isAfter(c)||d.get("month")===c.get("month"):d.get("year")===u.get("year")?d.startOf("month").isBefore(u)||d.get("month")===u.get("month"):!0},a=d=>{const c=R(n.min).startOf("month"),u=R(n.max).startOf("month");if(c.get("year")===d.get("year")){o("update:modelValue",c);return}if(u.get("year")===d.get("year")){o("update:modelValue",u);return}o("update:modelValue",d)};return(d,c)=>(s.openBlock(),s.createBlock(Ct,{trigger:"click","in-popover":"",onMenuChanged:c[0]||(c[0]=u=>i.value=u)},{"menu-button":s.withCtx(()=>[s.createElementVNode("div",{class:s.normalizeClass(["flex gap-4 h-24 items-center px-8 rounded-sm",i.value?"text-fm-color-primary":"hover:bg-fm-color-neutral-gray-100"])},[s.createElementVNode("div",h1,[d.picker==="month"?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[s.createTextVNode(s.toDisplayString(d.modelValue.format("MMMM")),1)],64)):s.createCommentVNode("",!0),d.picker==="year"?(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[s.createTextVNode(s.toDisplayString(d.modelValue.format("YYYY")),1)],64)):s.createCommentVNode("",!0)]),s.createVNode(j,{name:i.value?"expand_less":"expand_more",size:"md",color:"black"},null,8,["name"])],2)]),default:s.withCtx(()=>[s.createElementVNode("ul",p1,[d.picker==="month"?(s.openBlock(!0),s.createElementBlock(s.Fragment,{key:0},s.renderList(Array.from(Array(12),(u,f)=>d.modelValue.month(f)),u=>(s.openBlock(),s.createElementBlock("li",{key:u.format("MMMM")},[s.createVNode(Pe,{disabled:!l(u),"model-value":d.modelValue.format("MMMM")===u.format("MMMM"),label:u.format("MMMM"),"onUpdate:modelValue":f=>o("update:modelValue",u)},null,8,["disabled","model-value","label","onUpdate:modelValue"])]))),128)):s.createCommentVNode("",!0),d.picker==="year"?(s.openBlock(!0),s.createElementBlock(s.Fragment,{key:1},s.renderList(r.value,u=>(s.openBlock(),s.createElementBlock("li",{key:u.format("YYYY")},[s.createVNode(Pe,{"model-value":d.modelValue.format("YYYY")===u.format("YYYY"),label:u.format("YYYY"),"onUpdate:modelValue":f=>a(u)},null,8,["model-value","label","onUpdate:modelValue"])]))),128)):s.createCommentVNode("",!0)])]),_:1}))}}),m1={mounted:(t,e)=>{t.clickOutsideEvent=n=>{const o=e.arg?document.querySelectorAll(`#${e.arg}`):[];!(t==n.target||t.contains(n.target))&&!Array.from(o).some(i=>i&&(n.target==i||i.contains(n.target)))&&e.value(n,t)},document.addEventListener("click",t.clickOutsideEvent)},unmounted:t=>{document.removeEventListener("click",t.clickOutsideEvent)}},_s=K(s.defineComponent({__name:"FmPopover",props:{showPopover:{type:Boolean,default:!1},placement:{default:"bottom-start"},disabled:{type:Boolean,default:!1}},emits:["popover-changed"],setup(t,{expose:e,emit:n}){const o=t,i=s.ref(o.showPopover),r=s.ref(null),l=s.ref(null),{floatingStyles:a}=Hn(r,l,{middleware:[On(4),zn(),ud({crossAxis:!0})],placement:o.placement,whileElementsMounted:Ln}),d=n,c=()=>{i.value||(i.value=!0,d("popover-changed",i.value))},u=()=>{i.value&&(i.value=!1,d("popover-changed",i.value))};e({show:c,hide:u});const f=()=>{o.disabled||(i.value=!i.value,d("popover-changed",i.value))};s.watch(()=>o.showPopover,p=>i.value=p);const h=()=>{i.value&&(i.value=!1,d("popover-changed",i.value))};return(p,m)=>s.withDirectives((s.openBlock(),s.createElementBlock("div",null,[s.createElementVNode("div",{ref_key:"anchorEl",ref:r,class:"fm-popover",onClick:f},[s.renderSlot(p.$slots,"popover-button",{},void 0,!0)],512),i.value?(s.openBlock(),s.createElementBlock("div",{key:0,ref_key:"popoverEl",ref:l,style:s.normalizeStyle(s.unref(a)),class:"fm-popover__content"},[s.renderSlot(p.$slots,"default",{hide:u,show:c},void 0,!0)],4)):s.createCommentVNode("",!0)])),[[s.unref(m1),h]])}}),[["__scopeId","data-v-f18163e0"]]),A="YYYY-MM-DD",ws=t=>{const e=[],n=t.endOf("month"),o=t.month();let i=t.startOf("week"),r=[];for(;i.isBefore(n.endOf("week"));)i.day()===0&&r.length>0&&(e.push(r),r=[]),r.push({date:i,isCurrentMonth:i.month()===o}),i=i.add(1,"day");return r.length>0&&e.push(r),e},bd=(t,e)=>{const n=R().startOf("month"),o=R(t).diff(n,"month"),i=R(e).diff(n,"month"),r=[];for(let l=o-1;l<=i;l++){const a=[],d=n.add(l,"month").startOf("month"),c=d.endOf("month"),u=d.month();let f=d.startOf("week"),h=[];for(;f.isBefore(c.endOf("week"));)f.day()===0&&h.length>0&&(a.push(h),h=[]),h.push({id:d.format("MM-YYYY"),date:f,isCurrentMonth:f.month()===u}),f=f.add(1,"day");h.length>0&&a.push(h),r.push({id:d.format("YYYY-MM-DD"),matrix:a,height:64+48*(c.endOf("week").diff(d.startOf("week"),"week")+1)})}return r},Wn=Array.from(Array(7),(t,e)=>R().day(e).format("ddd")),g1={class:"p-12 w-[360px]"},y1={class:"w-max"},b1={class:"flex h-40 justify-between px-4 py-8"},$1={class:"flex gap-4 items-center"},_1={class:"flex gap-4 items-center justify-center"},w1={class:"fm-calendar__row fm-typo-body-lg-400 text-fm-color-typo-tertiary"},C1=["onClick"],x1={class:"flex gap-8 h-72 items-center justify-end py-16 w-full"},k1=K(s.defineComponent({__name:"FmDatePickerDesktop",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},min:{default:()=>R().subtract(50,"year").format(A)},max:{default:()=>R().add(25,"year").format(A)},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=Z(e,"modelValue"),o=s.ref(R(n.value,A)),i=s.ref(!1),r=s.ref(R().startOf("month")),l=s.ref(!1),a=s.ref(!1),d=h=>{o.value=h},c=()=>{n.value=o.value.format(A),setTimeout(()=>{i.value=!1},0)},u=()=>{o.value=n.value?R(n.value):null,i.value=!1},f=h=>{l.value=!1,a.value=!1,r.value=h};return(h,p)=>(s.openBlock(),s.createBlock(Ve,{modelValue:s.unref(n),"onUpdate:modelValue":p[5]||(p[5]=m=>s.isRef(n)?n.value=m:null),label:h.label,disabled:h.disabled,required:h.labelMark==="required",optional:h.labelMark==="optional",info:h.labelInfo,rules:h.rules,focused:i.value,"helper-text":h.helperText,"helper-state":h.helperState,tag:"div"},{label:s.withCtx(()=>[s.renderSlot(h.$slots,"label",{},void 0,!0)]),default:s.withCtx(({invalid:m})=>[s.createVNode(_s,{"show-popover":i.value,disabled:h.disabled,onPopoverChanged:p[4]||(p[4]=g=>i.value=g)},{"popover-button":s.withCtx(()=>[s.createVNode(ge,{focused:i.value,invalid:m,"show-valid-border":h.showValidBorder,"prepend-icon":"calendar_month","icon-outlined":!i.value},{prepend:s.withCtx(()=>[s.renderSlot(h.$slots,"prepend",{},void 0,!0)]),append:s.withCtx(()=>[s.renderSlot(h.$slots,"append",{},void 0,!0)]),default:s.withCtx(()=>[s.createElementVNode("div",{class:s.normalizeClass(["fm-typo-body-lg-400",[e.disabled?"text-fm-color-typo-disabled":s.unref(n)?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},s.toDisplayString(s.unref(n)?s.unref(R)(s.unref(n)).format("D MMM YYYY"):"DD MM YYYY"),3)]),_:2},1032,["focused","invalid","show-valid-border","icon-outlined"])]),default:s.withCtx(()=>[s.createElementVNode("div",g1,[s.createElementVNode("div",y1,[s.createElementVNode("div",b1,[s.createElementVNode("div",$1,[s.createVNode(tn,{min:h.min,max:h.max,picker:"month","model-value":r.value,"onUpdate:modelValue":p[0]||(p[0]=g=>f(g))},null,8,["min","max","model-value"]),s.createVNode(tn,{min:h.min,max:h.max,picker:"year","model-value":r.value,"onUpdate:modelValue":p[1]||(p[1]=g=>f(g))},null,8,["min","max","model-value"])]),s.createElementVNode("div",_1,[s.createVNode(j,{class:"cursor-pointer",name:"chevron_left",outline:!1,color:"#1C1C1E",onClick:p[2]||(p[2]=()=>f(r.value.subtract(1,"month")))}),s.createVNode(j,{class:"cursor-pointer",name:"chevron_right",outline:!1,color:"#1C1C1E",onClick:p[3]||(p[3]=()=>f(r.value.add(1,"month")))})])]),s.createElementVNode("div",null,[s.createElementVNode("div",w1,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(Wn),g=>(s.openBlock(),s.createElementBlock("div",{key:g,class:"fm-calendar__cell"},s.toDisplayString(g),1))),128))]),s.createElementVNode("div",null,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(ws)(r.value),(g,y)=>(s.openBlock(),s.createElementBlock("div",{key:y,class:"fm-calendar__row fm-typo-body-lg-400"},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(g,b=>(s.openBlock(),s.createElementBlock("div",{key:b.date.date(),class:"fm-calendar__cell"},[b.isCurrentMonth?(s.openBlock(),s.createElementBlock("button",{key:0,class:s.normalizeClass(["fm-calendar__cell__button",{"fm-calendar__cell__button--selected":b.date.isSame(o.value)}]),type:"button",onClick:()=>d(b.date)},s.toDisplayString(b.date.date()),11,C1)):s.createCommentVNode("",!0)]))),128))]))),128))])])]),s.createElementVNode("div",x1,[s.createVNode(J,{label:"Cancel",size:"md",variant:"tertiary",onClick:u}),s.createVNode(J,{label:"Apply",size:"md",variant:"primary",disabled:!o.value,onClick:c},null,8,["disabled"])])])]),_:2},1032,["show-popover","disabled"])]),"helper-text":s.withCtx(()=>[s.renderSlot(h.$slots,"helper-text",{},void 0,!0)]),_:3},8,["modelValue","label","disabled","required","optional","info","rules","focused","helper-text","helper-state"]))}}),[["__scopeId","data-v-b06e47a1"]]),$d=t=>(s.pushScopeId("data-v-32a48831"),t=t(),s.popScopeId(),t),S1={class:"bg-fm-color-neutral-white fixed flex flex-col h-screen left-0 top-0 w-screen"},v1={class:"flex flex-col gap-8 pb-8 pt-24 px-16"},M1={class:"flex items-center justify-center"},D1={class:"flex fm-typo-body-lg-400 h-48 justify-center text-fm-color-typo-tertiary w-[336px]"},E1={class:"flex h-[calc(100%-208px)] justify-center relative w-full"},B1=$d(()=>s.createElementVNode("div",{class:"absolute bg-gradient-to-b from-[#1C1C1E14] h-32 left-0 pointer-events-none to-80% w-full z-10"},null,-1)),V1={id:"wrapper",class:"h-full relative w-[336px]"},P1=["id"],R1={class:"flex gap-4 items-center"},F1={class:"fm-typo-body-lg-700"},N1={class:"fm-typo-body-lg-700"},A1=["onClick"],O1={class:"absolute bg-fm-color-neutral-white bottom-0 left-0 p-16 w-full"},I1=$d(()=>s.createElementVNode("div",{class:"-top-32 absolute bg-gradient-to-t from-[#1C1C1E14] h-32 left-0 pointer-events-none to-80% w-full z-10"},null,-1)),T1={class:"flex gap-8 items-center justify-end w-full"},_d=K(s.defineComponent({__name:"FmDatePickerMobile",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},min:{default:()=>R().subtract(50,"year").format(A)},max:{default:()=>R().add(25,"year").format(A)},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=bd(e.min,e.max),o=Z(e,"modelValue"),i=R(),r=s.ref(R(o.value,A)),l=s.ref(!1),a=s.ref(),d=p=>{r.value=p},c=()=>{o.value=r.value.format(A),setTimeout(()=>{l.value=!1},0)},u=()=>{r.value=o.value?R(o.value):null,l.value=!1},f=()=>{l.value=!0,setTimeout(()=>{a.value.scrollToItem(h(i.startOf("month")))},0)},h=p=>n.findIndex(m=>m.id===p.startOf("month").format(A));return(p,m)=>{const g=s.resolveComponent("RecycleScroller");return s.openBlock(),s.createBlock(Ve,{modelValue:s.unref(o),"onUpdate:modelValue":m[0]||(m[0]=y=>s.isRef(o)?o.value=y:null),label:p.label,disabled:p.disabled,required:p.labelMark==="required",optional:p.labelMark==="optional",info:p.labelInfo,rules:p.rules,focused:l.value,"helper-text":p.helperText,"helper-state":p.helperState,tag:"div"},{label:s.withCtx(()=>[s.renderSlot(p.$slots,"label",{},void 0,!0)]),default:s.withCtx(({invalid:y})=>[s.createVNode(ge,{class:"cursor-pointer",focused:l.value,invalid:y,"show-valid-border":p.showValidBorder,"prepend-icon":"calendar_month","icon-outlined":"",onClick:f},{prepend:s.withCtx(()=>[s.renderSlot(p.$slots,"prepend",{},void 0,!0)]),append:s.withCtx(()=>[s.renderSlot(p.$slots,"append",{},void 0,!0)]),default:s.withCtx(()=>[s.createElementVNode("div",{class:s.normalizeClass(["fm-typo-body-lg-400",[e.disabled?"text-fm-color-typo-disabled":s.unref(o)?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},s.toDisplayString(s.unref(o)?s.unref(R)(s.unref(o)).format("D MMM YYYY"):"DD MM YYYY"),3)]),_:2},1032,["focused","invalid","show-valid-border"]),l.value?(s.openBlock(),s.createBlock(s.Teleport,{key:0,to:"body"},[s.createElementVNode("div",S1,[s.createElementVNode("div",v1,[s.createVNode(ge,{focused:l.value,invalid:y,"show-valid-border":p.showValidBorder,"prepend-icon":"calendar_month","icon-outlined":""},{prepend:s.withCtx(()=>[s.renderSlot(p.$slots,"prepend",{},void 0,!0)]),append:s.withCtx(()=>[s.renderSlot(p.$slots,"append",{},void 0,!0)]),default:s.withCtx(()=>{var b,$;return[s.createElementVNode("div",{class:s.normalizeClass(["fm-typo-body-lg-400",[e.disabled?"text-fm-color-typo-disabled":(b=r.value)!=null&&b.isValid()?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},s.toDisplayString(($=r.value)!=null&&$.isValid()?s.unref(R)(r.value).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:2},1032,["focused","invalid","show-valid-border"]),s.createElementVNode("div",M1,[s.createElementVNode("div",D1,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(Wn),b=>(s.openBlock(),s.createElementBlock("div",{key:b,class:"fm-calendar__cell"},s.toDisplayString(b),1))),128))])])]),s.createElementVNode("div",E1,[B1,s.createElementVNode("div",V1,[s.createVNode(g,{ref_key:"scroller",ref:a,class:"h-full no-scrollbar overflow-y-auto w-full",items:s.unref(n),"item-size":null,buffer:200,"key-field":"id","size-field":"height"},{default:s.withCtx(({item:b})=>[s.createElementVNode("div",{id:b.id,class:"flex gap-16 h-40 items-center justify-start px-4 py-8"},[s.createElementVNode("div",R1,[s.createElementVNode("div",F1,s.toDisplayString(s.unref(R)(b.id).format("MMMM")),1),s.createElementVNode("div",N1,s.toDisplayString(s.unref(R)(b.id).format("YYYY")),1)])],8,P1),s.createElementVNode("div",null,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(b.matrix,($,w)=>(s.openBlock(),s.createElementBlock("div",{key:w,class:"fm-calendar__row fm-typo-body-lg-400"},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList($,S=>(s.openBlock(),s.createElementBlock("div",{key:S.date.date(),class:"fm-calendar__cell"},[S.isCurrentMonth?(s.openBlock(),s.createElementBlock("button",{key:0,class:s.normalizeClass(["fm-calendar__cell__button",{"fm-calendar__cell__button--selected":S.date.isSame(r.value),"fm-typo-body-lg-700":S.date.isSame(s.unref(i),"day")}]),type:"button",onClick:()=>d(S.date)},s.toDisplayString(S.date.date()),11,A1)):s.createCommentVNode("",!0)]))),128))]))),128))])]),_:1},8,["items"])])]),s.createElementVNode("div",O1,[I1,s.createElementVNode("div",T1,[s.createVNode(J,{label:"Cancel",size:"md",variant:"tertiary",onClick:u}),s.createVNode(J,{label:"Apply",size:"md",variant:"primary",disabled:!r.value,onClick:c},null,8,["disabled"])])])])])):s.createCommentVNode("",!0)]),"helper-text":s.withCtx(()=>[s.renderSlot(p.$slots,"helper-text",{},void 0,!0)]),_:3},8,["modelValue","label","disabled","required","optional","info","rules","focused","helper-text","helper-state"])}}}),[["__scopeId","data-v-32a48831"]]),L1=s.defineComponent({__name:"FmDatePicker",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},min:{default:()=>R().subtract(50,"year").format(A)},max:{default:()=>R().add(25,"year").format(A)},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const{breakpoints:e}=Ao(),n=t,o=Z(n,"modelValue");return(i,r)=>(s.openBlock(),s.createElementBlock(s.Fragment,null,[s.unref(e).md||s.unref(e).lg?(s.openBlock(),s.createBlock(k1,s.mergeProps({key:0},n,{modelValue:s.unref(o),"onUpdate:modelValue":r[0]||(r[0]=l=>s.isRef(o)?o.value=l:null)}),null,16,["modelValue"])):s.createCommentVNode("",!0),s.unref(e).xs||s.unref(e).sm?(s.openBlock(),s.createBlock(_d,s.mergeProps({key:1},n,{modelValue:s.unref(o),"onUpdate:modelValue":r[1]||(r[1]=l=>s.isRef(o)?o.value=l:null)}),null,16,["modelValue"])):s.createCommentVNode("",!0)],64))}}),wd=s.defineComponent({__name:"FmMenuDivider",props:{vertical:{type:Boolean,default:!1},inset:{type:Boolean,default:!1}},setup(t){return(e,n)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["border-fm-color-neutral-gray-100 rounded-sm",[e.vertical?"border-l -my-4 mx-4":"border-t -mx-4 my-4",{"my-0":e.inset&&e.vertical,"mx-0":e.inset&&!e.vertical}]])},null,2))}}),z1={class:"cursor-pointer fm-switch__container"},H1={key:0},j1={class:"fm-typo-body-lg-400"},W1={key:0,class:"fm-color-typo-secondary fm-typo-body-md-400"},Y1={class:"fm-switch__input--container"},U1=["checked","value","disabled"],G1={key:1},q1={class:"fm-typo-body-lg-400"},X1={key:0,class:"fm-color-typo-secondary fm-typo-body-md-400"},Cs=K(s.defineComponent({__name:"FmSwitch",props:{modelValue:{type:Boolean},label:{default:""},sublabel:{default:""},labelPlacement:{default:"left"},value:{default:null},disabled:{type:Boolean,default:!1},showIcon:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t){const e=t,n=Z(e,"modelValue"),o=()=>{e.disabled||(n.value=!n.value)};return(i,r)=>(s.openBlock(),s.createElementBlock("label",z1,[i.labelPlacement==="left"?(s.openBlock(),s.createElementBlock("div",H1,[s.renderSlot(i.$slots,"label",{},void 0,!0),s.createElementVNode("div",j1,s.toDisplayString(i.label),1),i.sublabel?(s.openBlock(),s.createElementBlock("div",W1,s.toDisplayString(i.sublabel),1)):s.createCommentVNode("",!0)])):s.createCommentVNode("",!0),s.createElementVNode("div",Y1,[s.createElementVNode("input",{checked:s.unref(n),class:"fm-switch__input--btn",type:"checkbox",value:i.value,disabled:i.disabled,onClick:o},null,8,U1),s.createElementVNode("div",{class:s.normalizeClass({"fm-switch__input--knob":!0,"fm-switch__input--knob--show-icon":i.showIcon})},[i.showIcon?(s.openBlock(),s.createBlock(j,{key:0,name:s.unref(n)?"check":"close",size:"sm",color:i.disabled?"#C7C7CC":s.unref(n)?"#1C1C1E":"#FFFFFF"},null,8,["name","color"])):s.createCommentVNode("",!0)],2)]),i.labelPlacement==="right"?(s.openBlock(),s.createElementBlock("div",G1,[s.createElementVNode("div",q1,s.toDisplayString(i.label),1),i.sublabel?(s.openBlock(),s.createElementBlock("div",X1,s.toDisplayString(i.sublabel),1)):s.createCommentVNode("",!0)])):s.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-0fcef85e"]]);var pe=(t=>(t.PrecedingPeriod="preceding_period",t.PrecedingWeek="preceding_week",t.PrecedingMonth="preceding_month",t.Custom="custom",t))(pe||{});const Cd=t=>(s.pushScopeId("data-v-85f70ca7"),t=t(),s.popScopeId(),t),K1={key:0,class:"flex gap-4 items-center relative w-full"},Z1={class:"flex flex-col gap-4 w-full"},J1=Cd(()=>s.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)),Q1={class:"flex flex-col gap-4 w-full"},e2={key:1,class:"flex flex-col gap-4 w-full"},t2={class:"flex gap-4 p-12"},n2={key:0,class:"max-h-[549px] overflow-y-auto w-[171px]"},o2={key:0,class:"px-8"},i2={key:1,class:"-my-12 border-fm-color-neutral-gray-100 border-l shrink-0"},s2={class:"flex flex-col gap-24"},r2={key:0,class:"flex gap-4 items-center px-12 w-full"},l2={class:"flex flex-col gap-4 w-full"},a2=Cd(()=>s.createElementVNode("div",{class:"fm-typo-body-lg-400 h-6 mt-7 shrink-0 text-center text-fm-color-typo-primary w-6"}," - ",-1)),d2={class:"flex flex-col gap-4 w-full"},c2={class:"flex gap-24"},u2={class:"w-max"},f2={class:"flex gap-16 h-40 items-center justify-start px-4 py-8"},h2={class:"flex gap-4 items-center"},p2={class:"fm-calendar__row fm-typo-body-lg-400 text-fm-color-typo-tertiary"},m2={class:"h-[288px]"},g2={key:0,class:"fm-calendar__cell__button--today"},y2=["onClick","onMouseover"],b2={class:"w-max"},$2={class:"flex gap-16 h-10 items-center justify-end px-4 py-8"},_2={class:"flex gap-4 items-center"},w2={class:"fm-calendar__row fm-typo-body-lg-400 text-fm-color-typo-tertiary"},C2={key:0,class:"fm-calendar__cell__button--today"},x2=["onClick","onMouseover"],k2={class:"flex gap-8 h-72 items-center justify-end py-16 w-full"},S2=K(s.defineComponent({__name:"FmDateRangePickerDesktop",props:{modelValue:{},startLabel:{default:"Start date"},endLabel:{default:"End date"},disabled:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},showPredefinedRange:{type:Boolean,default:!1},predefinedRange:{default:()=>[{label:"Today",value:{startDate:R().format(A),endDate:R().format(A)}},{label:"Yesterday",value:{startDate:R().subtract(1,"day").format(A),endDate:R().subtract(1,"day").format(A)}},{label:"This week",value:{startDate:R().startOf("week").format(A),endDate:R().endOf("week").format(A)}},{label:"Last week",value:{startDate:R().subtract(1,"week").startOf("week").format(A),endDate:R().subtract(1,"week").endOf("week").format(A)}},{label:"Last 7 days",value:{startDate:R().subtract(7,"day").format(A),endDate:R().subtract(1,"day").format(A)}},{label:"This month",value:{startDate:R().startOf("month").format(A),endDate:R().endOf("month").format(A)}},{label:"Last month",value:{startDate:R().subtract(1,"month").startOf("month").format(A),endDate:R().subtract(1,"month").endOf("month").format(A)}},{label:"This year",value:{startDate:R().startOf("year").format(A),endDate:R().endOf("year").format(A)}}]},compare:{type:Boolean,default:!1},compareLabel:{default:"Date"},min:{default:()=>R().subtract(50,"year").format(A)},max:{default:()=>R().add(25,"year").format(A)},labelMark:{default:"none"},labelInfo:{default:""},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){var N,P;const e=[{id:pe.PrecedingPeriod,label:"Preceding period",sublabel:"",action:()=>{d.value=pe.PrecedingPeriod;const C=r.value;if(C[0].startDate&&C[0].endDate){const _=C[0].startDate.diff(C[0].endDate,"day");C[1]={startDate:C[0].startDate.subtract(+(1-_),"day"),endDate:C[0].startDate.subtract(1,"day")}}}},{id:pe.PrecedingWeek,label:"Preceding period",sublabel:"Match day of week",action:()=>{d.value=pe.PrecedingWeek;const C=r.value;if(C[0].startDate&&C[0].endDate){let _=C[0].endDate.diff(C[0].startDate,"week");_===0&&(_+=1),C[1]={startDate:C[0].startDate.subtract(_,"week"),endDate:C[0].endDate.subtract(_,"week")}}}},{id:pe.PrecedingMonth,label:"Preceding period",sublabel:"Match day of month",action:()=>{d.value=pe.PrecedingMonth;const C=r.value;if(C[0].startDate&&C[0].endDate){let _=C[0].endDate.diff(C[0].startDate,"month");_===0&&(_+=1),C[1]={startDate:C[0].startDate.subtract(_,"month"),endDate:C[0].endDate.subtract(_,"month")}}}},{id:pe.Custom,label:"Custom",sublabel:"",action:()=>{d.value=pe.Custom}}],n=t,o=R(),i=Z(n,"modelValue"),r=s.ref([{startDate:(N=i.value)!=null&&N.startDate?R(i.value.startDate,A):null,endDate:(P=i.value)!=null&&P.endDate?R(i.value.endDate,A):null},{startDate:null,endDate:null}]),l=s.ref(!1),a=s.ref(!1),d=s.ref(""),c=s.ref(R().startOf("month")),u=s.ref(R().startOf("month").add(1,"month")),f=s.ref(""),h=s.ref(null);let p=0;const m=C=>{var _;if(f.value="",r.value[p].startDate&&r.value[p].endDate){p===1&&(r.value=r.value.map(()=>({startDate:null,endDate:null})),p=0),r.value[0]={startDate:C,endDate:null};return}else if(!r.value[p].startDate&&!r.value[p].endDate)r.value[p].startDate=C;else{if(C.isBefore(r.value[p].startDate)){const E=r.value[p].startDate;r.value[p]={startDate:C,endDate:E}}else r.value[p].endDate=C;a.value&&(p=1),e.find(E=>E.id===d.value)||(d.value=pe.Custom)}(_=e.find(E=>E.id===d.value))==null||_.action()},g=()=>{a.value?i.value=r.value.map(C=>({startDate:C.startDate.format(A),endDate:C.endDate.format(A)})):i.value={startDate:r.value[0].startDate.format(A),endDate:r.value[0].endDate.format(A)},setTimeout(()=>{l.value=!1})},y=()=>{var C,_;Array.isArray(i.value)?r.value=i.value:r.value[0]={startDate:(C=i.value)!=null&&C.startDate?R(i.value.startDate,A):null,endDate:(_=i.value)!=null&&_.endDate?R(i.value.endDate,A):null},l.value=!1},b=(C,_)=>{C==="left"?(c.value=_,u.value=_.add(1,"month")):C==="right"&&(u.value=_,c.value=_.subtract(1,"month"))},$=C=>{const _=r.value[0].startDate,E=r.value[0].endDate,v=r.value[1].startDate,M=r.value[1].endDate,k=h.value,B=_==null?void 0:_.isSame(C),O=E==null?void 0:E.isSame(C),L=v==null?void 0:v.isSame(C),T=M==null?void 0:M.isSame(C),W=k==null?void 0:k.isSame(C),U=B&&E&&!(B&&O)||_&&!E&&B&&(k==null?void 0:k.isAfter(_))||_&&!E&&W&&(k==null?void 0:k.isBefore(_)),G=L&&M&&!(L&&T)||v&&!M&&L&&(k==null?void 0:k.isAfter(v))||v&&!M&&W&&(k==null?void 0:k.isBefore(v)),Q=O&&_&&!(B&&O)||_&&!E&&B&&(k==null?void 0:k.isBefore(_))||_&&!E&&W&&(k==null?void 0:k.isAfter(_)),le=T&&v&&!(L&&T)||v&&!M&&L&&(k==null?void 0:k.isBefore(v))||v&&!M&&W&&(k==null?void 0:k.isAfter(v)),fe=B&&O||B&&!E,Fe=L&&T||L&&!M,je=_&&(E||k)&&E?C.isAfter(_)&&C.isBefore(E):C.isAfter(k)&&C.isBefore(_)||C.isBefore(k)&&C.isAfter(_),Ne=v&&(M||k)&&M?C.isAfter(v)&&C.isBefore(M):C.isAfter(k)&&C.isBefore(v)||C.isBefore(k)&&C.isAfter(v),te=(xe,ke,We)=>xe&&ke&&We?xe.isAfter(ke,"day")&&xe.isBefore(We,"day"):!1,re=()=>{if(r.value.filter(ke=>{var We;for(const jt in ke)if((We=ke[jt])!=null&&We.isSame(C,"day"))return!0;return!1}).length===2)return"bg-fm-color-system-success-400 before:bg-fm-color-system-success-100";if(B&&O&&(te(C,v,M)||te(C,v,k)))return"bg-fm-color-primary before:bg-fm-color-system-info-100 after:bg-fm-color-system-info-100";if(L&&T&&(te(C,_,E)||te(C,_,k)))return"bg-fm-color-system-info-300 before:bg-fm-color-system-warning-100 after:bg-fm-color-system-warning-100";if(U||Q)return te(C,v,M)||te(C,v,k)?"bg-fm-color-primary before:bg-fm-color-system-success-100 after:bg-fm-color-system-info-100":"bg-fm-color-primary before:bg-fm-color-system-warning-100";if(G||le)return te(C,_,E)||te(C,_,k)?"bg-fm-color-system-info-300 before:bg-fm-color-system-success-100 after:bg-fm-color-system-warning-100":"bg-fm-color-system-info-300 before:bg-fm-color-system-info-100";if(fe)return"bg-fm-color-primary";if(Fe)return"bg-fm-color-system-info-300";if(te(C,_,E)&&(te(C,v,M)||te(C,v,k)))return"bg-fm-color-system-success-100";if(je)return"bg-fm-color-system-warning-100";if(Ne)return"bg-fm-color-system-info-100"};return{[`fm-calendar__cell__button--selected-start ${re()}`]:U||G,[`fm-calendar__cell__button--selected-end ${re()}`]:Q||le,[`fm-calendar__cell__button--selected-between ${re()}`]:je||Ne,[`fm-calendar__cell__button--selected ${re()}`]:fe||Fe}},w=C=>{const _=r.value;if(_[0].startDate&&!_[0].endDate||_[1].startDate&&!_[1].endDate){h.value=C;return}h.value=null},S=C=>{f.value=C.label,r.value[0]={startDate:R(C.value.startDate,A),endDate:R(C.value.endDate,A)}},x=s.computed(()=>a.value?!r.value.every(C=>C.startDate&&C.endDate):!(r.value[0].startDate&&r.value[0].endDate)),V=C=>{d.value="",a.value=C,r.value=Array.from(Array(2),()=>({startDate:null,endDate:null})),p=0},D=s.computed(()=>{if(!i.value)return{startDate:"DD MM YYYY",endDate:"DD MM YYYY"};const C=a.value&&Array.isArray(i.value)?i.value[0].startDate:i.value.startDate,_=a.value&&Array.isArray(i.value)?i.value[0].endDate:i.value.endDate;return{startDate:C?R(C).format("D MMM YYYY"):"DD MM YYYY",endDate:_?R(_).format("D MMM YYYY"):"DD MM YYYY"}}),F=s.computed(()=>{const C=a.value&&Array.isArray(i.value)?i.value[1].startDate:null,_=a.value&&Array.isArray(i.value)?i.value[1].endDate:null;return C&&_?`Compared: ${R(C).format("D MMM YYYY")} - ${R(_).format("D MMM YYYY")}`:""});return s.watch(()=>i.value,()=>{var C,_;a.value?r.value=i.value.map(E=>({startDate:E!=null&&E.startDate?R(E.startDate,A):null,endDate:E!=null&&E.endDate?R(E.endDate,A):null})):r.value[0]={startDate:(C=i.value)!=null&&C.startDate?R(i.value.startDate,A):null,endDate:(_=i.value)!=null&&_.endDate?R(i.value.endDate,A):null}}),(C,_)=>(s.openBlock(),s.createBlock(Ve,{modelValue:s.unref(i),"onUpdate:modelValue":_[8]||(_[8]=E=>s.isRef(i)?i.value=E:null),disabled:C.disabled,rules:C.rules,focused:l.value,"helper-text":a.value?F.value:C.helperText,"helper-state":C.helperState,tag:"div"},{default:s.withCtx(({invalid:E})=>[s.createVNode(_s,{"show-popover":l.value,disabled:C.disabled,onPopoverChanged:_[7]||(_[7]=v=>l.value=v)},{"popover-button":s.withCtx(()=>[C.compare?s.createCommentVNode("",!0):(s.openBlock(),s.createElementBlock("div",K1,[s.createElementVNode("label",Z1,[s.createElementVNode("div",{class:s.normalizeClass(["fm-typo-body-lg-400",[n.disabled?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"]])},s.toDisplayString(n.startLabel),3),s.createVNode(ge,{class:s.normalizeClass(C.disabled?"cursor-not-allowed":"cursor-pointer"),focused:l.value,invalid:E,"show-valid-border":C.showValidBorder,"prepend-icon":"calendar_month","icon-outlined":!l.value},{prepend:s.withCtx(()=>[s.renderSlot(C.$slots,"prepend",{},void 0,!0)]),append:s.withCtx(()=>[s.renderSlot(C.$slots,"append",{},void 0,!0)]),default:s.withCtx(()=>{var v,M;return[s.createElementVNode("div",{class:s.normalizeClass(["fm-typo-body-lg-400",[n.disabled?"text-fm-color-typo-disabled":(v=s.unref(i))!=null&&v.startDate?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},s.toDisplayString((M=s.unref(i))!=null&&M.startDate?s.unref(R)(s.unref(i).startDate).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:2},1032,["class","focused","invalid","show-valid-border","icon-outlined"])]),J1,s.createElementVNode("label",Q1,[s.createElementVNode("div",{class:s.normalizeClass(["fm-typo-body-lg-400",[n.disabled?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"]])},s.toDisplayString(n.endLabel),3),s.createVNode(ge,{class:s.normalizeClass(C.disabled?"cursor-not-allowed":"cursor-pointer"),focused:l.value,invalid:E,"show-valid-border":C.showValidBorder,"prepend-icon":"calendar_month","icon-outlined":!l.value},{prepend:s.withCtx(()=>[s.renderSlot(C.$slots,"prepend",{},void 0,!0)]),append:s.withCtx(()=>[s.renderSlot(C.$slots,"append",{},void 0,!0)]),default:s.withCtx(()=>{var v,M;return[s.createElementVNode("div",{class:s.normalizeClass(["fm-typo-body-lg-400",[n.disabled?"text-fm-color-typo-disabled":(v=s.unref(i))!=null&&v.endDate?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},s.toDisplayString((M=s.unref(i))!=null&&M.endDate?s.unref(R)(s.unref(i).endDate).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:2},1032,["class","focused","invalid","show-valid-border","icon-outlined"])])])),C.compare?(s.openBlock(),s.createElementBlock("label",e2,[s.createVNode(en,{label:C.compareLabel},null,8,["label"]),s.createVNode(ge,{class:s.normalizeClass(C.disabled?"cursor-not-allowed":"cursor-pointer"),focused:l.value,invalid:E,"show-valid-border":C.showValidBorder},{prepend:s.withCtx(()=>[s.renderSlot(C.$slots,"prepend",{},void 0,!0)]),append:s.withCtx(()=>[s.renderSlot(C.$slots,"append",{},void 0,!0)]),default:s.withCtx(()=>[s.createElementVNode("div",{class:s.normalizeClass(["fm-typo-body-lg-400",[n.disabled?"text-fm-color-typo-disabled":D.value.startDate!=="DD MM YYYY"?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},s.toDisplayString(D.value.startDate)+" - "+s.toDisplayString(D.value.endDate),3)]),_:2},1032,["class","focused","invalid","show-valid-border"])])):s.createCommentVNode("",!0)]),default:s.withCtx(()=>[s.createElementVNode("div",t2,[C.showPredefinedRange?(s.openBlock(),s.createElementBlock("div",n2,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(C.predefinedRange,(v,M)=>(s.openBlock(),s.createBlock(Pe,{key:M,label:v.label,"model-value":f.value===v.label,selectable:"",onClick:k=>S(v)},null,8,["label","model-value","onClick"]))),128)),C.compare&&C.predefinedRange?(s.openBlock(),s.createElementBlock("div",o2,[s.createVNode(wd,{inset:""})])):s.createCommentVNode("",!0),C.compare?(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[s.createVNode(Cs,{"model-value":a.value,class:"justify-between px-12",label:"Compare","onUpdate:modelValue":_[0]||(_[0]=v=>V(v))},null,8,["model-value"]),a.value?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},s.renderList(e,(v,M)=>s.createVNode(Pe,{key:M,label:v.label,sublabel:v.sublabel,"model-value":d.value===v.id,selectable:"",onClick:k=>v.action()},null,8,["label","sublabel","model-value","onClick"])),64)):s.createCommentVNode("",!0)],64)):s.createCommentVNode("",!0)])):s.createCommentVNode("",!0),C.showPredefinedRange?(s.openBlock(),s.createElementBlock("div",i2)):s.createCommentVNode("",!0),s.createElementVNode("div",{class:s.normalizeClass({"pl-4":C.showPredefinedRange})},[s.createElementVNode("div",s2,[a.value?(s.openBlock(),s.createElementBlock("div",r2,[s.createElementVNode("label",l2,[s.createVNode(en,{label:"Custom"}),s.createVNode(ge,{focused:!1},{default:s.withCtx(()=>{var v,M;return[s.createElementVNode("div",{class:s.normalizeClass(["fm-typo-body-lg-400",[(v=r.value[0])!=null&&v.startDate&&((M=r.value[0])!=null&&M.endDate)?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},s.toDisplayString(r.value[0].startDate!==null?r.value[0].startDate.format("D MMM YYYY"):"DD MM YYYY")+" - "+s.toDisplayString(r.value[0].endDate!==null?r.value[0].endDate.format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:1})]),a2,s.createElementVNode("label",d2,[s.createVNode(en,{label:"Compare"}),s.createVNode(ge,{focused:!1},{default:s.withCtx(()=>{var v,M;return[s.createElementVNode("div",{class:s.normalizeClass(["fm-typo-body-lg-400",[(v=r.value[1])!=null&&v.startDate&&((M=r.value[1])!=null&&M.endDate)?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},s.toDisplayString(r.value[1].startDate!==null?r.value[1].startDate.format("D MMM YYYY"):"DD MM YYYY")+" - "+s.toDisplayString(r.value[1].endDate!==null?r.value[1].endDate.format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:1})])])):s.createCommentVNode("",!0),s.createElementVNode("div",c2,[s.createElementVNode("div",u2,[s.createElementVNode("div",f2,[s.createElementVNode("div",h2,[s.createVNode(j,{class:"cursor-pointer select-none",name:"chevron_left",outline:!1,color:"#1C1C1E",onClick:_[1]||(_[1]=()=>b("left",c.value.subtract(1,"month")))}),s.createVNode(tn,{min:C.min,max:C.max,picker:"month","model-value":c.value,"onUpdate:modelValue":_[2]||(_[2]=v=>b("left",v))},null,8,["min","max","model-value"]),s.createVNode(tn,{min:C.min,max:C.max,picker:"year","model-value":c.value,"onUpdate:modelValue":_[3]||(_[3]=v=>b("left",v))},null,8,["min","max","model-value"])])]),s.createElementVNode("div",null,[s.createElementVNode("div",p2,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(Wn),v=>(s.openBlock(),s.createElementBlock("div",{key:v,class:"fm-calendar__cell"},s.toDisplayString(v),1))),128))]),s.createElementVNode("div",m2,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(ws)(c.value),(v,M)=>(s.openBlock(),s.createElementBlock("div",{key:M,class:"fm-calendar__row fm-typo-body-lg-400"},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(v,k=>(s.openBlock(),s.createElementBlock("div",{key:k.date.date(),class:"fm-calendar__cell"},[k.date.isSame(s.unref(o),"day")&&k.isCurrentMonth?(s.openBlock(),s.createElementBlock("div",g2)):s.createCommentVNode("",!0),k.isCurrentMonth?(s.openBlock(),s.createElementBlock("button",{key:1,class:s.normalizeClass(["fm-calendar__cell__button",[$(k.date),{"fm-typo-body-lg-700":k.date.isSame(s.unref(o),"day")}]]),type:"button",onClick:()=>m(k.date),onMouseover:B=>w(k.date)},s.toDisplayString(k.date.date()),43,y2)):s.createCommentVNode("",!0)]))),128))]))),128))])])]),s.createElementVNode("div",b2,[s.createElementVNode("div",$2,[s.createElementVNode("div",_2,[s.createVNode(tn,{min:C.min,max:C.max,picker:"month","model-value":u.value,"onUpdate:modelValue":_[4]||(_[4]=v=>b("right",v))},null,8,["min","max","model-value"]),s.createVNode(tn,{min:C.min,max:C.max,picker:"year","model-value":u.value,"onUpdate:modelValue":_[5]||(_[5]=v=>b("right",v))},null,8,["min","max","model-value"])]),s.createVNode(j,{class:"cursor-pointer select-none",name:"chevron_right",outline:!1,color:"#1C1C1E",onClick:_[6]||(_[6]=()=>b("left",c.value.add(1,"month")))})]),s.createElementVNode("div",null,[s.createElementVNode("div",w2,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(Wn),v=>(s.openBlock(),s.createElementBlock("div",{key:v,class:"fm-calendar__cell"},s.toDisplayString(v),1))),128))]),s.createElementVNode("div",null,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(ws)(u.value),(v,M)=>(s.openBlock(),s.createElementBlock("div",{key:M,class:"fm-calendar__row fm-typo-body-lg-400"},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(v,k=>(s.openBlock(),s.createElementBlock("div",{key:k.date.date(),class:"fm-calendar__cell"},[k.date.isSame(s.unref(o),"day")&&k.isCurrentMonth?(s.openBlock(),s.createElementBlock("div",C2)):s.createCommentVNode("",!0),k.isCurrentMonth?(s.openBlock(),s.createElementBlock("button",{key:1,class:s.normalizeClass(["fm-calendar__cell__button",[$(k.date),{"fm-typo-body-lg-700":k.date.isSame(s.unref(o),"day")}]]),type:"button",onClick:()=>m(k.date),onMouseover:B=>w(k.date)},s.toDisplayString(k.date.date()),43,x2)):s.createCommentVNode("",!0)]))),128))]))),128))])])])])]),s.createElementVNode("div",k2,[s.createVNode(J,{label:"Cancel",size:"md",variant:"tertiary",onClick:y}),s.createVNode(J,{label:"Apply",size:"md",variant:"primary",disabled:x.value,onClick:g},null,8,["disabled"])])],2)])]),_:2},1032,["show-popover","disabled"])]),"helper-text":s.withCtx(()=>[s.renderSlot(C.$slots,"helper-text",{},void 0,!0)]),_:3},8,["modelValue","disabled","rules","focused","helper-text","helper-state"]))}}),[["__scopeId","data-v-85f70ca7"]]),v2={class:"flex flex-col gap-4"},M2={class:"flex flex-col gap-4 justify-center"},Wo=K(s.defineComponent({__name:"FmSelect",props:{modelValue:{},items:{},multiselect:{type:Boolean,default:!1},placement:{default:"bottom-start"},placeholder:{default:"Select item"},showValidBorder:{type:Boolean,default:!1},maxHeight:{default:408},width:{default:void 0},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue","dropdown-changed"],setup(t,{emit:e}){const n=t,o=e,i=Z(n,"modelValue"),r=s.ref(!1),l=(h,p)=>{if(n.multiselect){let m=[];h?m=i.value.length===0?[p]:n.items.filter(g=>i.value.some(y=>_e(g.value,y)||_e(g.value,p.value))):m=n.items.filter(g=>i.value.some(y=>_e(g.value,y)&&!_e(g.value,p.value))),i.value=m.map(g=>g.value)}else i.value=p.value,setTimeout(()=>{r.value=!1},0)},a=h=>{const p=[...i.value].filter((m,g)=>g!==h);i.value=p},d=s.computed(()=>n.multiselect?n.items.filter(h=>s.toRaw(i.value).some(p=>_e(p,h.value))):n.items.filter(h=>_e(i.value,h.value))),c=s.computed(()=>n.items.filter(h=>i.value.some(p=>_e(h.value,p))).map(h=>({label:h.label}))),u=s.computed(()=>{var h;return n.multiselect?n.placeholder:((h=n.items.find(p=>_e(p.value,i.value)))==null?void 0:h.label)??n.placeholder}),f=s.computed(()=>n.multiselect?i.value.length!==0:n.items.some(h=>_e(h.value,i.value)));return(h,p)=>(s.openBlock(),s.createElementBlock("div",v2,[s.createVNode(Ve,{modelValue:s.unref(i),"onUpdate:modelValue":p[1]||(p[1]=m=>s.isRef(i)?i.value=m:null),label:h.label,disabled:h.disabled,required:h.labelMark==="required",optional:h.labelMark==="optional",info:h.labelInfo,rules:h.rules,focused:r.value,"helper-text":h.helperText,"helper-state":h.helperState},s.createSlots({default:s.withCtx(({invalid:m})=>[s.createVNode(Ct,{"show-menu":r.value,disabled:h.disabled,placement:h.placement,"close-on-click":!h.multiselect,onMenuChanged:p[0]||(p[0]=g=>{r.value=g,o("dropdown-changed",r.value)})},{"menu-button":s.withCtx(()=>[s.createVNode(ge,{class:s.normalizeClass(h.disabled?"cursor-not-allowed":"cursor-pointer"),focused:r.value,invalid:m,"show-valid-border":h.showValidBorder},{prepend:s.withCtx(()=>[s.renderSlot(h.$slots,"prepend",{},void 0,!0)]),append:s.withCtx(()=>[s.createVNode(j,{name:r.value?"expand_less":"expand_more",size:"md",color:h.disabled?"#C7C7CC":"black"},null,8,["name","color"])]),default:s.withCtx(()=>[s.renderSlot(h.$slots,"default",{},()=>[s.createElementVNode("div",{class:s.normalizeClass(["fm-typo-body-lg-400",[n.disabled?"text-fm-color-typo-disabled":f.value?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},s.toDisplayString(u.value),3)],!0)]),_:2},1032,["class","focused","invalid","show-valid-border"])]),"menu-wrapper":s.withCtx(()=>[s.createElementVNode("div",{class:"fm-select__menu__wrapper",style:s.normalizeStyle({"max-height":`${h.maxHeight}px`,width:`${h.width}px`})},[s.renderSlot(h.$slots,"menu-wrapper",{handleItemChange:(g,y)=>l(g,y)},()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(h.items,g=>(s.openBlock(),s.createBlock(Pe,{key:g.value,"has-checkbox":h.multiselect,label:g.label,value:g.value,"model-value":d.value.some(y=>s.unref(_e)(y.value,g.value)),"onUpdate:modelValue":y=>l(y,g)},null,8,["has-checkbox","label","value","model-value","onUpdate:modelValue"]))),128))],!0)],4)]),_:2},1032,["show-menu","disabled","placement","close-on-click"])]),_:2},[h.label||h.$slots.label?{name:"label",fn:s.withCtx(()=>[s.renderSlot(h.$slots,"label",{},void 0,!0)]),key:"0"}:void 0,h.helperText||h.$slots["helper-text"]?{name:"helper-text",fn:s.withCtx(()=>[s.renderSlot(h.$slots,"helper-text",{},void 0,!0)]),key:"1"}:void 0]),1032,["modelValue","label","disabled","required","optional","info","rules","focused","helper-text","helper-state"]),s.createElementVNode("div",M2,[h.multiselect&&d.value.length>0?(s.openBlock(),s.createBlock(vr,{key:0,items:c.value,removable:"",disabled:h.disabled,onChipClosed:a},null,8,["items","disabled"])):s.createCommentVNode("",!0)])]))}}),[["__scopeId","data-v-3ea6d291"]]),D2={key:0,class:"flex gap-4 items-center relative w-full"},E2={class:"flex flex-col gap-4 w-full"},B2=s.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),V2={class:"flex flex-col gap-4 w-full"},P2={key:1,class:"flex flex-col gap-4 w-full"},xs=s.defineComponent({__name:"FmDateRangePickerField",props:{modelValue:{},analytic:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},invalid:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},isComparing:{type:Boolean,default:!1},startLabel:{default:"Start date"},endLabel:{default:"End date"},compareLabel:{default:"Date"}},setup(t){const e=t,n=s.computed(()=>{if(!e.modelValue)return{startDate:"DD MM YYYY",endDate:"DD MM YYYY"};const o=e.isComparing&&Array.isArray(e.modelValue)?e.modelValue[0].startDate:e.modelValue.startDate,i=e.isComparing&&Array.isArray(e.modelValue)?e.modelValue[0].endDate:e.modelValue.endDate;return{startDate:o?R(o).format("D MMM YYYY"):"DD MM YYYY",endDate:i?R(i).format("D MMM YYYY"):"DD MM YYYY"}});return(o,i)=>(s.openBlock(),s.createElementBlock("div",null,[o.analytic?s.createCommentVNode("",!0):(s.openBlock(),s.createElementBlock("div",D2,[s.createElementVNode("label",E2,[s.createElementVNode("div",{class:s.normalizeClass(["fm-typo-body-lg-400",[o.disabled?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"]])},s.toDisplayString(o.startLabel),3),s.createVNode(ge,{class:s.normalizeClass(o.disabled?"cursor-not-allowed":"cursor-pointer"),focused:o.focused,invalid:o.invalid,"show-valid-border":o.showValidBorder,"prepend-icon":"calendar_month","icon-outlined":""},{prepend:s.withCtx(()=>[s.renderSlot(o.$slots,"prepend")]),append:s.withCtx(()=>[s.renderSlot(o.$slots,"append")]),default:s.withCtx(()=>{var r,l;return[s.createElementVNode("div",{class:s.normalizeClass(["fm-typo-body-lg-400",[o.disabled?"text-fm-color-typo-disabled":(r=o.modelValue)!=null&&r.startDate?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},s.toDisplayString((l=o.modelValue)!=null&&l.startDate?s.unref(R)(o.modelValue.startDate).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:3},8,["class","focused","invalid","show-valid-border"])]),B2,s.createElementVNode("label",V2,[s.createElementVNode("div",{class:s.normalizeClass(["fm-typo-body-lg-400",[o.disabled?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"]])},s.toDisplayString(o.endLabel),3),s.createVNode(ge,{class:s.normalizeClass(o.disabled?"cursor-not-allowed":"cursor-pointer"),focused:o.focused,invalid:o.invalid,"show-valid-border":o.showValidBorder,"prepend-icon":"calendar_month","icon-outlined":""},{prepend:s.withCtx(()=>[s.renderSlot(o.$slots,"prepend")]),append:s.withCtx(()=>[s.renderSlot(o.$slots,"append")]),default:s.withCtx(()=>{var r,l;return[s.createElementVNode("div",{class:s.normalizeClass(["fm-typo-body-lg-400",[o.disabled?"text-fm-color-typo-disabled":(r=o.modelValue)!=null&&r.endDate?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},s.toDisplayString((l=o.modelValue)!=null&&l.endDate?s.unref(R)(o.modelValue.endDate).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:3},8,["class","focused","invalid","show-valid-border"])])])),o.analytic?(s.openBlock(),s.createElementBlock("label",P2,[s.createVNode(en,{label:o.compareLabel},null,8,["label"]),s.createVNode(ge,{class:s.normalizeClass(o.disabled?"cursor-not-allowed":"cursor-pointer"),focused:o.focused,invalid:o.invalid,"show-valid-border":o.showValidBorder,"prepend-icon":"calendar_month","icon-outlined":""},{prepend:s.withCtx(()=>[s.renderSlot(o.$slots,"prepend")]),append:s.withCtx(()=>[s.renderSlot(o.$slots,"append")]),default:s.withCtx(()=>[s.createElementVNode("div",{class:s.normalizeClass(["fm-typo-body-lg-400",[o.disabled?"text-fm-color-typo-disabled":n.value.startDate!=="DD MM YYYY"?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},s.toDisplayString(n.value.startDate)+" - "+s.toDisplayString(n.value.endDate),3)]),_:3},8,["class","focused","invalid","show-valid-border"])])):s.createCommentVNode("",!0)]))}}),xd=t=>(s.pushScopeId("data-v-eed99d1e"),t=t(),s.popScopeId(),t),R2={class:"bg-fm-color-neutral-white fixed flex flex-col h-screen left-0 top-0 w-screen"},F2={class:"flex flex-col gap-8 pb-8 pt-24 px-16"},N2={class:"flex items-center justify-center"},A2={class:"flex fm-typo-body-lg-400 h-48 justify-center text-fm-color-typo-tertiary w-[336px]"},O2={class:"flex h-[calc(100%-172px)] justify-center relative w-full"},I2=xd(()=>s.createElementVNode("div",{class:"absolute bg-gradient-to-b from-[#1C1C1E14] h-32 left-0 pointer-events-none to-80% w-full z-10"},null,-1)),T2={id:"wrapper",class:"h-full relative w-[336px]"},L2=["id"],z2={class:"flex gap-4 items-center"},H2={class:"fm-typo-body-lg-700"},j2={class:"fm-typo-body-lg-700"},W2=["onClick","onMouseover"],Y2={class:"absolute bg-fm-color-neutral-white bottom-0 left-0 p-16 w-full"},U2=xd(()=>s.createElementVNode("div",{class:"-top-32 absolute bg-gradient-to-t from-[#1C1C1E14] h-32 left-0 pointer-events-none to-80% w-full z-10"},null,-1)),G2={class:"flex gap-8 items-center justify-end w-full"},kd=K(s.defineComponent({__name:"FmDateRangePickerMobile",props:{modelValue:{},startLabel:{default:"Start date"},endLabel:{default:"End date"},disabled:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},showPredefinedRange:{type:Boolean,default:!1},predefinedRange:{default:()=>[{label:"Today",value:{startDate:R().format(A),endDate:R().format(A)}},{label:"Yesterday",value:{startDate:R().subtract(1,"day").format(A),endDate:R().subtract(1,"day").format(A)}},{label:"This week",value:{startDate:R().startOf("week").format(A),endDate:R().endOf("week").format(A)}},{label:"Last week",value:{startDate:R().subtract(1,"week").startOf("week").format(A),endDate:R().subtract(1,"week").endOf("week").format(A)}},{label:"Last 7 days",value:{startDate:R().subtract(7,"day").format(A),endDate:R().subtract(1,"day").format(A)}},{label:"This month",value:{startDate:R().startOf("month").format(A),endDate:R().endOf("month").format(A)}},{label:"Last month",value:{startDate:R().subtract(1,"month").startOf("month").format(A),endDate:R().subtract(1,"month").endOf("month").format(A)}},{label:"This year",value:{startDate:R().startOf("year").format(A),endDate:R().endOf("year").format(A)}}]},compare:{type:Boolean,default:!1},compareLabel:{default:"Date"},min:{default:()=>R().subtract(50,"year").format(A)},max:{default:()=>R().add(25,"year").format(A)},labelMark:{default:"none"},labelInfo:{default:""},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){var P,C;const e=s.ref(),n=[{id:pe.PrecedingPeriod,label:"Preceding period",sublabel:"",action:()=>{u.value=pe.PrecedingPeriod;const _=a.value;if(_[0].startDate&&_[0].endDate){const E=_[0].startDate.diff(_[0].endDate,"day");_[1]={startDate:_[0].startDate.subtract(+(1-E),"day"),endDate:_[0].startDate.subtract(1,"day")}}}},{id:pe.PrecedingWeek,label:"Preceding period",sublabel:"Match day of week",action:()=>{u.value=pe.PrecedingWeek;const _=a.value;if(_[0].startDate&&_[0].endDate){let E=_[0].endDate.diff(_[0].startDate,"week");E===0&&(E+=1),_[1]={startDate:_[0].startDate.subtract(E,"week"),endDate:_[0].endDate.subtract(E,"week")}}}},{id:pe.PrecedingMonth,label:"Preceding period",sublabel:"Match day of month",action:()=>{u.value=pe.PrecedingMonth;const _=a.value;if(_[0].startDate&&_[0].endDate){let E=_[0].endDate.diff(_[0].startDate,"month");E===0&&(E+=1),_[1]={startDate:_[0].startDate.subtract(E,"month"),endDate:_[0].endDate.subtract(E,"month")}}}},{id:pe.Custom,label:"Custom",sublabel:"",action:()=>{u.value=pe.Custom}}],o=t,i=bd(o.min,o.max),r=R(),l=Z(o,"modelValue"),a=s.ref([{startDate:(P=l.value)!=null&&P.startDate?R(l.value.startDate,A):null,endDate:(C=l.value)!=null&&C.endDate?R(l.value.endDate,A):null},{startDate:null,endDate:null}]),d=s.ref(!1),c=s.ref(!1),u=s.ref(""),f=s.ref(""),h=s.ref(null);let p=0;const m=_=>{var E;if(f.value="",a.value[p].startDate&&a.value[p].endDate){p===1&&(a.value=a.value.map(()=>({startDate:null,endDate:null})),p=0),a.value[0]={startDate:_,endDate:null};return}else if(!a.value[p].startDate&&!a.value[p].endDate)a.value[p].startDate=_;else{if(_.isBefore(a.value[p].startDate)){const v=a.value[p].startDate;a.value[p]={startDate:_,endDate:v}}else a.value[p].endDate=_;c.value&&(p=1),n.find(v=>v.id===u.value)||(u.value=pe.Custom)}(E=n.find(v=>v.id===u.value))==null||E.action()},g=()=>{c.value?l.value=a.value.map(_=>({startDate:_.startDate.format(A),endDate:_.endDate.format(A)})):l.value={startDate:a.value[0].startDate.format(A),endDate:a.value[0].endDate.format(A)},setTimeout(()=>{d.value=!1})},y=()=>{var _,E;Array.isArray(l.value)?a.value=l.value:a.value[0]={startDate:(_=l.value)!=null&&_.startDate?R(l.value.startDate,A):null,endDate:(E=l.value)!=null&&E.endDate?R(l.value.endDate,A):null},d.value=!1},b=_=>{const E=a.value[0].startDate,v=a.value[0].endDate,M=a.value[1].startDate,k=a.value[1].endDate,B=h.value,O=E==null?void 0:E.isSame(_),L=v==null?void 0:v.isSame(_),T=M==null?void 0:M.isSame(_),W=k==null?void 0:k.isSame(_),U=B==null?void 0:B.isSame(_),G=O&&v&&!(O&&L)||E&&!v&&O&&(B==null?void 0:B.isAfter(E))||E&&!v&&U&&(B==null?void 0:B.isBefore(E)),Q=T&&k&&!(T&&W)||M&&!k&&T&&(B==null?void 0:B.isAfter(M))||M&&!k&&U&&(B==null?void 0:B.isBefore(M)),le=L&&E&&!(O&&L)||E&&!v&&O&&(B==null?void 0:B.isBefore(E))||E&&!v&&U&&(B==null?void 0:B.isAfter(E)),fe=W&&M&&!(T&&W)||M&&!k&&T&&(B==null?void 0:B.isBefore(M))||M&&!k&&U&&(B==null?void 0:B.isAfter(M)),Fe=O&&L||O&&!v,je=T&&W||T&&!k,Ne=E&&(v||B)&&v?_.isAfter(E)&&_.isBefore(v):_.isAfter(B)&&_.isBefore(E)||_.isBefore(B)&&_.isAfter(E),te=M&&(k||B)&&k?_.isAfter(M)&&_.isBefore(k):_.isAfter(B)&&_.isBefore(M)||_.isBefore(B)&&_.isAfter(M),re=(ke,We,jt)=>ke&&We&&jt?ke.isAfter(We,"day")&&ke.isBefore(jt,"day"):!1,xe=()=>{if(a.value.filter(We=>{var jt;for(const Y_ in We)if((jt=We[Y_])!=null&&jt.isSame(_,"day"))return!0;return!1}).length===2)return"bg-fm-color-system-success-400 before:bg-fm-color-system-success-100";if(O&&L&&(re(_,M,k)||re(_,M,B)))return"bg-fm-color-primary before:bg-fm-color-system-info-100 after:bg-fm-color-system-info-100";if(T&&W&&(re(_,E,v)||re(_,E,B)))return"bg-fm-color-system-info-300 before:bg-fm-color-system-warning-100 after:bg-fm-color-system-warning-100";if(G||le)return re(_,M,k)||re(_,M,B)?"bg-fm-color-primary before:bg-fm-color-system-success-100 after:bg-fm-color-system-info-100":"bg-fm-color-primary before:bg-fm-color-system-warning-100";if(Q||fe)return re(_,E,v)||re(_,E,B)?"bg-fm-color-system-info-300 before:bg-fm-color-system-success-100 after:bg-fm-color-system-warning-100":"bg-fm-color-system-info-300 before:bg-fm-color-system-info-100";if(Fe)return"bg-fm-color-primary";if(je)return"bg-fm-color-system-info-300";if(re(_,E,v)&&(re(_,M,k)||re(_,M,B)))return"bg-fm-color-system-success-100";if(Ne)return"bg-fm-color-system-warning-100";if(te)return"bg-fm-color-system-info-100"};return{[`fm-calendar__cell__button--selected-start ${xe()}`]:G||Q,[`fm-calendar__cell__button--selected-end ${xe()}`]:le||fe,[`fm-calendar__cell__button--selected-between ${xe()}`]:Ne||te,[`fm-calendar__cell__button--selected ${xe()}`]:Fe||je}},$=_=>{const E=a.value;if(E[0].startDate&&!E[0].endDate||E[1].startDate&&!E[1].endDate){h.value=_;return}h.value=null},w=_=>{a.value[0]={startDate:R(_.startDate,A),endDate:R(_.endDate,A)}},S=_=>{const E=n.find(v=>v.id===_);E==null||E.action()},x=s.computed(()=>c.value?!a.value.every(_=>_.startDate&&_.endDate):!(a.value[0].startDate&&a.value[0].endDate)),V=_=>{u.value="",c.value=_,a.value=Array.from(Array(2),()=>({startDate:null,endDate:null})),p=0},D=s.computed(()=>{const _=c.value&&Array.isArray(l.value)?l.value[1].startDate:null,E=c.value&&Array.isArray(l.value)?l.value[1].endDate:null;return _&&E?`Compared: ${R(_).format("D MMM YYYY")} - ${R(E).format("D MMM YYYY")}`:""}),F=()=>{d.value=!0,setTimeout(()=>{e.value.scrollToItem(N(r.startOf("month")))},0)},N=_=>i.findIndex(E=>E.id===_.startOf("month").format(A));return s.watch(()=>l.value,()=>{var _,E;c.value?a.value=l.value.map(v=>({startDate:v!=null&&v.startDate?R(v.startDate,A):null,endDate:v!=null&&v.endDate?R(v.endDate,A):null})):a.value[0]={startDate:(_=l.value)!=null&&_.startDate?R(l.value.startDate,A):null,endDate:(E=l.value)!=null&&E.endDate?R(l.value.endDate,A):null}}),(_,E)=>{const v=s.resolveComponent("RecycleScroller");return s.openBlock(),s.createBlock(Ve,{modelValue:s.unref(l),"onUpdate:modelValue":E[3]||(E[3]=M=>s.isRef(l)?l.value=M:null),disabled:_.disabled,rules:_.rules,focused:d.value,"helper-text":c.value?D.value:_.helperText,"helper-state":_.helperState,tag:"div"},{default:s.withCtx(({invalid:M})=>{var k,B,O,L;return[s.createVNode(xs,{"model-value":s.unref(l),analytic:_.compare,disabled:_.disabled,invalid:M,focused:d.value,"show-valid-border":_.showValidBorder,"is-comparing":c.value,"start-label":_.startLabel,"end-label":_.endLabel,"compare-label":_.compareLabel,onClick:F},null,8,["model-value","analytic","disabled","invalid","focused","show-valid-border","is-comparing","start-label","end-label","compare-label"]),d.value?(s.openBlock(),s.createBlock(s.Teleport,{key:0,to:"body"},[s.createElementVNode("div",R2,[s.createElementVNode("div",F2,[_.showPredefinedRange?(s.openBlock(),s.createBlock(Wo,{key:0,items:_.predefinedRange,"model-value":f.value,"onUpdate:modelValue":E[0]||(E[0]=T=>w(T))},null,8,["items","model-value"])):s.createCommentVNode("",!0),s.createVNode(xs,{"model-value":{startDate:((k=a.value[0].startDate)==null?void 0:k.format(s.unref(A)))??null,endDate:((B=a.value[0].endDate)==null?void 0:B.format(s.unref(A)))??null},analytic:_.compare,"is-comparing":c.value,"start-label":_.startLabel,"end-label":_.endLabel,"compare-label":_.compareLabel},null,8,["model-value","analytic","is-comparing","start-label","end-label","compare-label"]),_.compare?(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[s.createVNode(Cs,{"model-value":c.value,"label-placement":"right",label:"Compare","onUpdate:modelValue":E[1]||(E[1]=T=>V(T))},null,8,["model-value"]),c.value&&_.compare?(s.openBlock(),s.createBlock(Wo,{key:0,items:n.map(T=>({label:T.label,sublabel:T.sublabel,value:T.id})),"model-value":u.value,"onUpdate:modelValue":E[2]||(E[2]=T=>S(T))},null,8,["items","model-value"])):s.createCommentVNode("",!0),c.value&&_.compare?(s.openBlock(),s.createBlock(xs,{key:1,"model-value":{startDate:((O=a.value[1].startDate)==null?void 0:O.format(s.unref(A)))??null,endDate:((L=a.value[1].endDate)==null?void 0:L.format(s.unref(A)))??null},analytic:_.compare,"is-comparing":c.value,"start-label":_.startLabel,"end-label":_.endLabel,"compare-label":"Compare: Custom"},null,8,["model-value","analytic","is-comparing","start-label","end-label"])):s.createCommentVNode("",!0)],64)):s.createCommentVNode("",!0),s.createElementVNode("div",N2,[s.createElementVNode("div",A2,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(Wn),T=>(s.openBlock(),s.createElementBlock("div",{key:T,class:"fm-calendar__cell"},s.toDisplayString(T),1))),128))])])]),s.createElementVNode("div",O2,[I2,s.createElementVNode("div",T2,[s.createVNode(v,{ref_key:"scroller",ref:e,class:"h-full no-scrollbar overflow-y-auto w-full",items:s.unref(i),"item-size":null,buffer:200,"key-field":"id","size-field":"height"},{default:s.withCtx(({item:T})=>[s.createElementVNode("div",{id:T.id,class:"flex gap-16 h-40 items-center justify-start px-4 py-8"},[s.createElementVNode("div",z2,[s.createElementVNode("div",H2,s.toDisplayString(s.unref(R)(T.id).format("MMMM")),1),s.createElementVNode("div",j2,s.toDisplayString(s.unref(R)(T.id).format("YYYY")),1)])],8,L2),s.createElementVNode("div",null,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(T.matrix,(W,U)=>(s.openBlock(),s.createElementBlock("div",{key:U,class:"fm-calendar__row fm-typo-body-lg-400"},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(W,G=>(s.openBlock(),s.createElementBlock("div",{key:G.date.date(),class:"fm-calendar__cell"},[G.isCurrentMonth?(s.openBlock(),s.createElementBlock("button",{key:0,class:s.normalizeClass(["fm-calendar__cell__button",[b(G.date),{"fm-typo-body-lg-700":G.date.isSame(s.unref(r),"day")}]]),type:"button",onClick:()=>m(G.date),onMouseover:Q=>$(G.date)},s.toDisplayString(G.date.date()),43,W2)):s.createCommentVNode("",!0)]))),128))]))),128))])]),_:1},8,["items"])])]),s.createElementVNode("div",Y2,[U2,s.createElementVNode("div",G2,[s.createVNode(J,{label:"Cancel",size:"md",variant:"tertiary",onClick:y}),s.createVNode(J,{label:"Apply",size:"md",variant:"primary",disabled:x.value,onClick:g},null,8,["disabled"])])])])])):s.createCommentVNode("",!0)]}),"helper-text":s.withCtx(()=>[s.renderSlot(_.$slots,"helper-text",{},void 0,!0)]),_:3},8,["modelValue","disabled","rules","focused","helper-text","helper-state"])}}}),[["__scopeId","data-v-eed99d1e"]]),q2=s.defineComponent({__name:"FmDateRangePicker",props:{modelValue:{},startLabel:{default:"Start date"},endLabel:{default:"End date"},disabled:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},showPredefinedRange:{type:Boolean,default:!1},predefinedRange:{default:()=>[{label:"Today",value:{startDate:R().format(A),endDate:R().format(A)}},{label:"Yesterday",value:{startDate:R().subtract(1,"day").format(A),endDate:R().subtract(1,"day").format(A)}},{label:"This week",value:{startDate:R().startOf("week").format(A),endDate:R().endOf("week").format(A)}},{label:"Last week",value:{startDate:R().subtract(1,"week").startOf("week").format(A),endDate:R().subtract(1,"week").endOf("week").format(A)}},{label:"Last 7 days",value:{startDate:R().subtract(7,"day").format(A),endDate:R().subtract(1,"day").format(A)}},{label:"This month",value:{startDate:R().startOf("month").format(A),endDate:R().endOf("month").format(A)}},{label:"Last month",value:{startDate:R().subtract(1,"month").startOf("month").format(A),endDate:R().subtract(1,"month").endOf("month").format(A)}},{label:"This year",value:{startDate:R().startOf("year").format(A),endDate:R().endOf("year").format(A)}}]},compare:{type:Boolean,default:!1},compareLabel:{default:"Date"},min:{default:()=>R().subtract(50,"year").format(A)},max:{default:()=>R().add(25,"year").format(A)},labelMark:{default:"none"},labelInfo:{default:""},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,{breakpoints:n}=Ao(),o=Z(e,"modelValue");return(i,r)=>(s.openBlock(),s.createElementBlock(s.Fragment,null,[s.unref(n).md||s.unref(n).lg?(s.openBlock(),s.createBlock(S2,s.mergeProps({key:0},e,{modelValue:s.unref(o),"onUpdate:modelValue":r[0]||(r[0]=l=>s.isRef(o)?o.value=l:null)}),null,16,["modelValue"])):s.createCommentVNode("",!0),s.unref(n).xs||s.unref(n).sm?(s.openBlock(),s.createBlock(kd,s.mergeProps({key:1},e,{modelValue:s.unref(o),"onUpdate:modelValue":r[1]||(r[1]=l=>s.isRef(o)?o.value=l:null)}),null,16,["modelValue"])):s.createCommentVNode("",!0)],64))}}),X2=s.defineComponent({__name:"FmForm",emits:["validation-reset","validation-success","validation-failed","reset"],setup(t,{expose:e,emit:n}){const o=s.ref([]),i=s.ref(0),r=n,l=()=>{let c=[];for(let u=0;u<o.value.length;u++){const f=o.value[u];c=[...c,...f.validate()]}c.length?r("validation-failed",c):r("validation-success")},a=()=>{for(let c=0;c<o.value.length;c++)o.value[c].resetValue();r("reset")};return e({validateInputs:l,resetInputsValidation:()=>{for(let c=0;c<o.value.length;c++)o.value[c].resetValidation();r("validation-reset")},resetInputs:a}),s.provide(yr,{register({validate:c,resetValidation:u,resetValue:f}){return o.value.push({componentId:i.value,validate:c,resetValidation:u,resetValue:f}),i.value++},unregister(c){o.value.filter(u=>u.componentId!==c)}}),(c,u)=>(s.openBlock(),s.createElementBlock("form",{onSubmit:s.withModifiers(l,["prevent"]),onReset:s.withModifiers(a,["prevent"])},[s.renderSlot(c.$slots,"default")],32))}}),K2={version:4,country_calling_codes:{1:["US","AG","AI","AS","BB","BM","BS","CA","DM","DO","GD","GU","JM","KN","KY","LC","MP","MS","PR","SX","TC","TT","VC","VG","VI"],7:["RU","KZ"],20:["EG"],27:["ZA"],30:["GR"],31:["NL"],32:["BE"],33:["FR"],34:["ES"],36:["HU"],39:["IT","VA"],40:["RO"],41:["CH"],43:["AT"],44:["GB","GG","IM","JE"],45:["DK"],46:["SE"],47:["NO","SJ"],48:["PL"],49:["DE"],51:["PE"],52:["MX"],53:["CU"],54:["AR"],55:["BR"],56:["CL"],57:["CO"],58:["VE"],60:["MY"],61:["AU","CC","CX"],62:["ID"],63:["PH"],64:["NZ"],65:["SG"],66:["TH"],81:["JP"],82:["KR"],84:["VN"],86:["CN"],90:["TR"],91:["IN"],92:["PK"],93:["AF"],94:["LK"],95:["MM"],98:["IR"],211:["SS"],212:["MA","EH"],213:["DZ"],216:["TN"],218:["LY"],220:["GM"],221:["SN"],222:["MR"],223:["ML"],224:["GN"],225:["CI"],226:["BF"],227:["NE"],228:["TG"],229:["BJ"],230:["MU"],231:["LR"],232:["SL"],233:["GH"],234:["NG"],235:["TD"],236:["CF"],237:["CM"],238:["CV"],239:["ST"],240:["GQ"],241:["GA"],242:["CG"],243:["CD"],244:["AO"],245:["GW"],246:["IO"],247:["AC"],248:["SC"],249:["SD"],250:["RW"],251:["ET"],252:["SO"],253:["DJ"],254:["KE"],255:["TZ"],256:["UG"],257:["BI"],258:["MZ"],260:["ZM"],261:["MG"],262:["RE","YT"],263:["ZW"],264:["NA"],265:["MW"],266:["LS"],267:["BW"],268:["SZ"],269:["KM"],290:["SH","TA"],291:["ER"],297:["AW"],298:["FO"],299:["GL"],350:["GI"],351:["PT"],352:["LU"],353:["IE"],354:["IS"],355:["AL"],356:["MT"],357:["CY"],358:["FI","AX"],359:["BG"],370:["LT"],371:["LV"],372:["EE"],373:["MD"],374:["AM"],375:["BY"],376:["AD"],377:["MC"],378:["SM"],380:["UA"],381:["RS"],382:["ME"],383:["XK"],385:["HR"],386:["SI"],387:["BA"],389:["MK"],420:["CZ"],421:["SK"],423:["LI"],500:["FK"],501:["BZ"],502:["GT"],503:["SV"],504:["HN"],505:["NI"],506:["CR"],507:["PA"],508:["PM"],509:["HT"],590:["GP","BL","MF"],591:["BO"],592:["GY"],593:["EC"],594:["GF"],595:["PY"],596:["MQ"],597:["SR"],598:["UY"],599:["CW","BQ"],670:["TL"],672:["NF"],673:["BN"],674:["NR"],675:["PG"],676:["TO"],677:["SB"],678:["VU"],679:["FJ"],680:["PW"],681:["WF"],682:["CK"],683:["NU"],685:["WS"],686:["KI"],687:["NC"],688:["TV"],689:["PF"],690:["TK"],691:["FM"],692:["MH"],850:["KP"],852:["HK"],853:["MO"],855:["KH"],856:["LA"],880:["BD"],886:["TW"],960:["MV"],961:["LB"],962:["JO"],963:["SY"],964:["IQ"],965:["KW"],966:["SA"],967:["YE"],968:["OM"],970:["PS"],971:["AE"],972:["IL"],973:["BH"],974:["QA"],975:["BT"],976:["MN"],977:["NP"],992:["TJ"],993:["TM"],994:["AZ"],995:["GE"],996:["KG"],998:["UZ"]},countries:{AC:["247","00","(?:[01589]\\d|[46])\\d{4}",[5,6]],AD:["376","00","(?:1|6\\d)\\d{7}|[135-9]\\d{5}",[6,8,9],[["(\\d{3})(\\d{3})","$1 $2",["[135-9]"]],["(\\d{4})(\\d{4})","$1 $2",["1"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]]],AE:["971","00","(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}",[5,6,7,8,9,10,11,12],[["(\\d{3})(\\d{2,9})","$1 $2",["60|8"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[236]|[479][2-8]"],"0$1"],["(\\d{3})(\\d)(\\d{5})","$1 $2 $3",["[479]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"]],"0"],AF:["93","00","[2-7]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"]],"0"],AG:["1","011","(?:268|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([457]\\d{6})$|1","268$1",0,"268"],AI:["1","011","(?:264|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2457]\\d{6})$|1","264$1",0,"264"],AL:["355","00","(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}",[6,7,8,9],[["(\\d{3})(\\d{3,4})","$1 $2",["80|9"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["4[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2358][2-5]|4"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["[23578]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["6"],"0$1"]],"0"],AM:["374","00","(?:[1-489]\\d|55|60|77)\\d{6}",[8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[89]0"],"0 $1"],["(\\d{3})(\\d{5})","$1 $2",["2|3[12]"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["1|47"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[3-9]"],"0$1"]],"0"],AO:["244","00","[29]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[29]"]]]],AR:["54","00","(?:11|[89]\\d\\d)\\d{8}|[2368]\\d{9}",[10,11],[["(\\d{4})(\\d{2})(\\d{4})","$1 $2-$3",["2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])","2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["1"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[68]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2-$3",["[23]"],"0$1",1],["(\\d)(\\d{4})(\\d{2})(\\d{4})","$2 15-$3-$4",["9(?:2[2-469]|3[3-578])","9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))","9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",0,"$1 $2 $3-$4"],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 15-$3-$4",["91"],"0$1",0,"$1 $2 $3-$4"],["(\\d{3})(\\d{3})(\\d{5})","$1-$2-$3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 15-$3-$4",["9"],"0$1",0,"$1 $2 $3-$4"]],"0",0,"0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?","9$1"],AS:["1","011","(?:[58]\\d\\d|684|900)\\d{7}",[10],0,"1",0,"([267]\\d{6})$|1","684$1",0,"684"],AT:["43","00","1\\d{3,12}|2\\d{6,12}|43(?:(?:0\\d|5[02-9])\\d{3,9}|2\\d{4,5}|[3467]\\d{4}|8\\d{4,6}|9\\d{4,7})|5\\d{4,12}|8\\d{7,12}|9\\d{8,12}|(?:[367]\\d|4[0-24-9])\\d{4,11}",[4,5,6,7,8,9,10,11,12,13],[["(\\d)(\\d{3,12})","$1 $2",["1(?:11|[2-9])"],"0$1"],["(\\d{3})(\\d{2})","$1 $2",["517"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["5[079]"],"0$1"],["(\\d{3})(\\d{3,10})","$1 $2",["(?:31|4)6|51|6(?:5[0-3579]|[6-9])|7(?:20|32|8)|[89]"],"0$1"],["(\\d{4})(\\d{3,9})","$1 $2",["[2-467]|5[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["5"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,7})","$1 $2 $3",["5"],"0$1"]],"0"],AU:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{7}(?:\\d(?:\\d{2})?)?|8[0-24-9]\\d{7})|[2-478]\\d{8}|1\\d{4,7}",[5,6,7,8,9,10,12],[["(\\d{2})(\\d{3,4})","$1 $2",["16"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,4})","$1 $2 $3",["16"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["14|4"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[2378]"],"(0$1)"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:30|[89])"]]],"0",0,"(183[12])|0",0,0,0,[["(?:(?:(?:2(?:[0-26-9]\\d|3[0-8]|4[02-9]|5[0135-9])|7(?:[013-57-9]\\d|2[0-8]))\\d|3(?:(?:[0-3589]\\d|6[1-9]|7[0-35-9])\\d|4(?:[0-578]\\d|90)))\\d\\d|8(?:51(?:0(?:0[03-9]|[12479]\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\d|7[89]|9[0-4])|3\\d\\d)|(?:6[0-8]|[78]\\d)\\d{3}|9(?:[02-9]\\d{3}|1(?:(?:[0-58]\\d|6[0135-9])\\d|7(?:0[0-24-9]|[1-9]\\d)|9(?:[0-46-9]\\d|5[0-79])))))\\d{3}",[9]],["4(?:(?:79|94)[01]|83[0-389])\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[0-36-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,["163\\d{2,6}",[5,6,7,8,9]],["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],AW:["297","00","(?:[25-79]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[25-9]"]]]],AX:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","2\\d{4,9}|35\\d{4,5}|(?:60\\d\\d|800)\\d{4,6}|7\\d{5,11}|(?:[14]\\d|3[0-46-9]|50)\\d{4,8}",[5,6,7,8,9,10,11,12],0,"0",0,0,0,0,"18",0,"00"],AZ:["994","00","365\\d{6}|(?:[124579]\\d|60|88)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[28]|2|365|46","1[28]|2|365[45]|46","1[28]|2|365(?:4|5[02])|46"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[13-9]"],"0$1"]],"0"],BA:["387","00","6\\d{8}|(?:[35689]\\d|49|70)\\d{6}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["6[1-3]|[7-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2-$3",["[3-5]|6[56]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["6"],"0$1"]],"0"],BB:["1","011","(?:246|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","246$1",0,"246"],BD:["880","00","[1-469]\\d{9}|8[0-79]\\d{7,8}|[2-79]\\d{8}|[2-9]\\d{7}|[3-9]\\d{6}|[57-9]\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{4,6})","$1-$2",["31[5-8]|[459]1"],"0$1"],["(\\d{3})(\\d{3,7})","$1-$2",["3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:[15]|28|4[14])|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]"],"0$1"],["(\\d{4})(\\d{3,6})","$1-$2",["[13-9]|22"],"0$1"],["(\\d)(\\d{7,8})","$1-$2",["2"],"0$1"]],"0"],BE:["32","00","4\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:80|9)0"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[239]|4[23]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[15-8]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4"],"0$1"]],"0"],BF:["226","00","[025-7]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[025-7]"]]]],BG:["359","00","00800\\d{7}|[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}",[6,7,8,9,12],[["(\\d)(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["43[1-6]|70[1-9]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:70|8)0"],"0$1"],["(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["43[1-7]|7"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[48]|9[08]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"]],"0"],BH:["973","00","[136-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[13679]|8[02-4679]"]]]],BI:["257","00","(?:[267]\\d|31)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2367]"]]]],BJ:["229","00","[24-689]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-689]"]]]],BL:["590","00","590\\d{6}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:2[7-9]|3[3-7]|5[12]|87)\\d{4}"],["69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-5])\\d{4}"]]],BM:["1","011","(?:441|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","441$1",0,"441"],BN:["673","00","[2-578]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-578]"]]]],BO:["591","00(?:1\\d)?","(?:[2-467]\\d\\d|8001)\\d{5}",[8,9],[["(\\d)(\\d{7})","$1 $2",["[23]|4[46]"]],["(\\d{8})","$1",["[67]"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["8"]]],"0",0,"0(1\\d)?"],BQ:["599","00","(?:[34]1|7\\d)\\d{5}",[7],0,0,0,0,0,0,"[347]"],BR:["55","00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)","(?:[1-46-9]\\d\\d|5(?:[0-46-9]\\d|5[0-46-9]))\\d{8}|[1-9]\\d{9}|[3589]\\d{8}|[34]\\d{7}",[8,9,10,11],[["(\\d{4})(\\d{4})","$1-$2",["300|4(?:0[02]|37)","4(?:02|37)0|[34]00"]],["(\\d{3})(\\d{2,3})(\\d{4})","$1 $2 $3",["(?:[358]|90)0"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"],"($1)"],["(\\d{2})(\\d{5})(\\d{4})","$1 $2-$3",["[16][1-9]|[2-57-9]"],"($1)"]],"0",0,"(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?","$2"],BS:["1","011","(?:242|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([3-8]\\d{6})$|1","242$1",0,"242"],BT:["975","00","[17]\\d{7}|[2-8]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[2-68]|7[246]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[67]|7"]]]],BW:["267","00","(?:0800|(?:[37]|800)\\d)\\d{6}|(?:[2-6]\\d|90)\\d{5}",[7,8,10],[["(\\d{2})(\\d{5})","$1 $2",["90"]],["(\\d{3})(\\d{4})","$1 $2",["[24-6]|3[15-9]"]],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37]"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["8"]]]],BY:["375","810","(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3})","$1 $2",["800"],"8 $1"],["(\\d{3})(\\d{2})(\\d{2,4})","$1 $2 $3",["800"],"8 $1"],["(\\d{4})(\\d{2})(\\d{3})","$1 $2-$3",["1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])","1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])"],"8 0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["1(?:[56]|7[467])|2[1-3]"],"8 0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-4]"],"8 0$1"],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["[89]"],"8 $1"]],"8",0,"0|80?",0,0,0,0,"8~10"],BZ:["501","00","(?:0800\\d|[2-8])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1-$2",["[2-8]"]],["(\\d)(\\d{3})(\\d{4})(\\d{3})","$1-$2-$3-$4",["0"]]]],CA:["1","011","(?:[2-8]\\d|90)\\d{8}|3\\d{6}",[7,10],0,"1",0,0,0,0,0,[["(?:2(?:04|[23]6|[48]9|50|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|73)|90[25])[2-9]\\d{6}",[10]],["",[10]],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",[10]],["900[2-9]\\d{6}",[10]],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|(?:5(?:00|2[125-9]|33|44|66|77|88)|622)[2-9]\\d{6}",[10]],0,["310\\d{4}",[7]],0,["600[2-9]\\d{6}",[10]]]],CC:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:02|31|60|89)|1(?:18|76)|223)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\d|70[23]|959))\\d{3}",[9]],["4(?:(?:79|94)[01]|83[0-389])\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[0-36-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CD:["243","00","[189]\\d{8}|[1-68]\\d{6}",[7,9],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[1-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]"],"0$1"]],"0"],CF:["236","00","(?:[27]\\d{3}|8776)\\d{4}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[278]"]]]],CG:["242","00","222\\d{6}|(?:0\\d|80)\\d{7}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[02]"]]]],CH:["41","00","8\\d{11}|[2-9]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8[047]|90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]|81"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["8"],"0$1"]],"0"],CI:["225","00","[02]\\d{9}",[10],[["(\\d{2})(\\d{2})(\\d)(\\d{5})","$1 $2 $3 $4",["2"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3 $4",["0"]]]],CK:["682","00","[2-578]\\d{4}",[5],[["(\\d{2})(\\d{3})","$1 $2",["[2-578]"]]]],CL:["56","(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0","12300\\d{6}|6\\d{9,10}|[2-9]\\d{8}",[9,10,11],[["(\\d{5})(\\d{4})","$1 $2",["219","2196"],"($1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["44"]],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2[1-36]"],"($1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["9[2-9]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-9]|[1-9])"],"($1)"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["60|8"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{3})(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3 $4",["60"]]]],CM:["237","00","[26]\\d{8}|88\\d{6,7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["88"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[26]|88"]]]],CN:["86","00|1(?:[12]\\d|79)\\d\\d00","1[127]\\d{8,9}|2\\d{9}(?:\\d{2})?|[12]\\d{6,7}|86\\d{6}|(?:1[03-689]\\d|6)\\d{7,9}|(?:[3-579]\\d|8[0-57-9])\\d{6,9}",[7,8,9,10,11,12],[["(\\d{2})(\\d{5,6})","$1 $2",["(?:10|2[0-57-9])[19]","(?:10|2[0-57-9])(?:10|9[56])","10(?:10|9[56])|2[0-57-9](?:100|9[56])"],"0$1"],["(\\d{3})(\\d{5,6})","$1 $2",["3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]","(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]","85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])","85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["(?:4|80)0"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|2(?:[02-57-9]|1[1-9])","10|2(?:[02-57-9]|1[1-9])","10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]"],"0$1",1],["(\\d{3})(\\d{7,8})","$1 $2",["9"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["80"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[3-578]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["1[3-9]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["[12]"],"0$1",1]],"0",0,"(1(?:[12]\\d|79)\\d\\d)|0",0,0,0,0,"00"],CO:["57","00(?:4(?:[14]4|56)|[579])","(?:60\\d\\d|9101)\\d{6}|(?:1\\d|3)\\d{9}",[10,11],[["(\\d{3})(\\d{7})","$1 $2",["6"],"($1)"],["(\\d{3})(\\d{7})","$1 $2",["3[0-357]|91"]],["(\\d)(\\d{3})(\\d{7})","$1-$2-$3",["1"],"0$1",0,"$1 $2 $3"]],"0",0,"0([3579]|4(?:[14]4|56))?"],CR:["506","00","(?:8\\d|90)\\d{8}|(?:[24-8]\\d{3}|3005)\\d{4}",[8,10],[["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[3-9]"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[89]"]]],0,0,"(19(?:0[0-2468]|1[09]|20|66|77|99))"],CU:["53","119","[27]\\d{6,7}|[34]\\d{5,7}|63\\d{6}|(?:5|8\\d\\d)\\d{7}",[6,7,8,10],[["(\\d{2})(\\d{4,6})","$1 $2",["2[1-4]|[34]"],"(0$1)"],["(\\d)(\\d{6,7})","$1 $2",["7"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["[56]"],"0$1"],["(\\d{3})(\\d{7})","$1 $2",["8"],"0$1"]],"0"],CV:["238","0","(?:[2-59]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2-589]"]]]],CW:["599","00","(?:[34]1|60|(?:7|9\\d)\\d)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[3467]"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["9[4-8]"]]],0,0,0,0,0,"[69]"],CX:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:01|30|59|88)|1(?:17|46|75)|2(?:22|35))|91(?:00[6-9]|1(?:[28]1|49|78)|2(?:09|63)|3(?:12|26|75)|4(?:56|97)|64\\d|7(?:0[01]|1[0-2])|958))\\d{3}",[9]],["4(?:(?:79|94)[01]|83[0-389])\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[0-36-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CY:["357","00","(?:[279]\\d|[58]0)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[257-9]"]]]],CZ:["420","00","(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]|9[015-7]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["96"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]]],DE:["49","00","[2579]\\d{5,14}|49(?:[34]0|69|8\\d)\\d\\d?|49(?:37|49|60|7[089]|9\\d)\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\d{1,8}|(?:1|[368]\\d|4[0-8])\\d{3,13}|49(?:[015]\\d|2[13]|31|[46][1-8])\\d{1,9}",[4,5,6,7,8,9,10,11,12,13,14,15],[["(\\d{2})(\\d{3,13})","$1 $2",["3[02]|40|[68]9"],"0$1"],["(\\d{3})(\\d{3,12})","$1 $2",["2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1","2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1"],"0$1"],["(\\d{4})(\\d{2,11})","$1 $2",["[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]","[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["138"],"0$1"],["(\\d{5})(\\d{2,10})","$1 $2",["3"],"0$1"],["(\\d{3})(\\d{5,11})","$1 $2",["181"],"0$1"],["(\\d{3})(\\d)(\\d{4,10})","$1 $2 $3",["1(?:3|80)|9"],"0$1"],["(\\d{3})(\\d{7,8})","$1 $2",["1[67]"],"0$1"],["(\\d{3})(\\d{7,12})","$1 $2",["8"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["185","1850","18500"],"0$1"],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["18[68]"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["15[1279]"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["15[03568]","15(?:[0568]|31)"],"0$1"],["(\\d{3})(\\d{8})","$1 $2",["18"],"0$1"],["(\\d{3})(\\d{2})(\\d{7,8})","$1 $2 $3",["1(?:6[023]|7)"],"0$1"],["(\\d{4})(\\d{2})(\\d{7})","$1 $2 $3",["15[279]"],"0$1"],["(\\d{3})(\\d{2})(\\d{8})","$1 $2 $3",["15"],"0$1"]],"0"],DJ:["253","00","(?:2\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[27]"]]]],DK:["45","00","[2-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-9]"]]]],DM:["1","011","(?:[58]\\d\\d|767|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","767$1",0,"767"],DO:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,0,0,0,"8001|8[024]9"],DZ:["213","00","(?:[1-4]|[5-79]\\d|80)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["9"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-8]"],"0$1"]],"0"],EC:["593","00","1\\d{9,10}|(?:[2-7]|9\\d)\\d{7}",[8,9,10,11],[["(\\d)(\\d{3})(\\d{4})","$1 $2-$3",["[2-7]"],"(0$1)",0,"$1-$2-$3"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{3})(\\d{3,4})","$1 $2 $3",["1"]]],"0"],EE:["372","00","8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88","[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88"]],["(\\d{4})(\\d{3,4})","$1 $2",["[45]|8(?:00|[1-49])","[45]|8(?:00[1-9]|[1-49])"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],EG:["20","00","[189]\\d{8,9}|[24-6]\\d{8}|[135]\\d{7}",[8,9,10],[["(\\d)(\\d{7,8})","$1 $2",["[23]"],"0$1"],["(\\d{2})(\\d{6,7})","$1 $2",["1[35]|[4-6]|8[2468]|9[235-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{8})","$1 $2",["1"],"0$1"]],"0"],EH:["212","00","[5-8]\\d{8}",[9],0,"0",0,0,0,0,"528[89]"],ER:["291","00","[178]\\d{6}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[178]"],"0$1"]],"0"],ES:["34","00","[5-9]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]00"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-9]"]]]],ET:["251","00","(?:11|[2-579]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-579]"],"0$1"]],"0"],FI:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","[1-35689]\\d{4}|7\\d{10,11}|(?:[124-7]\\d|3[0-46-9])\\d{8}|[1-9]\\d{5,8}",[5,6,7,8,9,10,11,12],[["(\\d{5})","$1",["20[2-59]"],"0$1"],["(\\d{3})(\\d{3,7})","$1 $2",["(?:[1-3]0|[68])0|70[07-9]"],"0$1"],["(\\d{2})(\\d{4,8})","$1 $2",["[14]|2[09]|50|7[135]"],"0$1"],["(\\d{2})(\\d{6,10})","$1 $2",["7"],"0$1"],["(\\d)(\\d{4,9})","$1 $2",["(?:1[3-79]|[2568])[1-8]|3(?:0[1-9]|[1-9])|9"],"0$1"]],"0",0,0,0,0,"1[03-79]|[2-9]",0,"00"],FJ:["679","0(?:0|52)","45\\d{5}|(?:0800\\d|[235-9])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1 $2",["[235-9]|45"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]]],0,0,0,0,0,0,0,"00"],FK:["500","00","[2-7]\\d{4}",[5]],FM:["691","00","(?:[39]\\d\\d|820)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[389]"]]]],FO:["298","00","[2-9]\\d{5}",[6],[["(\\d{6})","$1",["[2-9]"]]],0,0,"(10(?:01|[12]0|88))"],FR:["33","00","[1-9]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0 $1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[1-79]"],"0$1"]],"0"],GA:["241","00","(?:[067]\\d|11)\\d{6}|[2-7]\\d{6}",[7,8],[["(\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-7]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["11|[67]"],"0$1"]],0,0,"0(11\\d{6}|60\\d{6}|61\\d{6}|6[256]\\d{6}|7[467]\\d{6})","$1"],GB:["44","00","[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}",[7,9,10],[["(\\d{3})(\\d{4})","$1 $2",["800","8001","80011","800111","8001111"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["845","8454","84546","845464"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["800"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["1(?:38|5[23]|69|76|94)","1(?:(?:38|69)7|5(?:24|39)|768|946)","1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["1(?:[2-69][02-9]|[78])"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[25]|7(?:0|6[02-9])","[25]|7(?:0|6(?:[03-9]|2[356]))"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[1389]"],"0$1"]],"0",0,0,0,0,0,[["(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0235])|4(?:[0-5]\\d\\d|69[7-9]|70[0-79])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|50))\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d|1(?:[0-7]\\d|8[0-2]))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d)\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}",[9,10]],["7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[2-49]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]],0," x"],GD:["1","011","(?:473|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","473$1",0,"473"],GE:["995","00","(?:[3-57]\\d\\d|800)\\d{6}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["32"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[57]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[348]"],"0$1"]],"0"],GF:["594","00","[56]94\\d{6}|(?:80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[56]|9[47]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[89]"],"0$1"]],"0"],GG:["44","00","(?:1481|[357-9]\\d{3})\\d{6}|8\\d{6}(?:\\d{2})?",[7,9,10],0,"0",0,"([25-9]\\d{5})$|0","1481$1",0,0,[["1481[25-9]\\d{5}",[10]],["7(?:(?:781|839)\\d|911[17])\\d{5}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[0-3]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]]],GH:["233","00","(?:[235]\\d{3}|800)\\d{5}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[235]"],"0$1"]],"0"],GI:["350","00","(?:[25]\\d|60)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["2"]]]],GL:["299","00","(?:19|[2-689]\\d|70)\\d{4}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["19|[2-9]"]]]],GM:["220","00","[2-9]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],GN:["224","00","722\\d{6}|(?:3|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["3"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[67]"]]]],GP:["590","00","590\\d{6}|(?:69|80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[569]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0",0,0,0,0,0,[["590(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\d)\\d{4}"],["69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-5])\\d{4}"]]],GQ:["240","00","222\\d{6}|(?:3\\d|55|[89]0)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235]"]],["(\\d{3})(\\d{6})","$1 $2",["[89]"]]]],GR:["30","00","5005000\\d{3}|8\\d{9,11}|(?:[269]\\d|70)\\d{8}",[10,11,12],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["21|7"]],["(\\d{4})(\\d{6})","$1 $2",["2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2689]"]],["(\\d{3})(\\d{3,4})(\\d{5})","$1 $2 $3",["8"]]]],GT:["502","00","80\\d{6}|(?:1\\d{3}|[2-7])\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1 $2",["[2-8]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],GU:["1","011","(?:[58]\\d\\d|671|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","671$1",0,"671"],GW:["245","00","[49]\\d{8}|4\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["40"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"]]]],GY:["592","001","(?:[2-8]\\d{3}|9008)\\d{3}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],HK:["852","00(?:30|5[09]|[126-9]?)","8[0-46-9]\\d{6,7}|9\\d{4,7}|(?:[2-7]|9\\d{3})\\d{7}",[5,6,7,8,9,11],[["(\\d{3})(\\d{2,5})","$1 $2",["900","9003"]],["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[1-4]|9(?:0[1-9]|[1-8])"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{3})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]],0,0,0,0,0,0,0,"00"],HN:["504","00","8\\d{10}|[237-9]\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1-$2",["[237-9]"]]]],HR:["385","00","(?:[24-69]\\d|3[0-79])\\d{7}|80\\d{5,7}|[1-79]\\d{7}|6\\d{5,6}",[6,7,8,9],[["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["6[01]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{4})(\\d{3})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6|7[245]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-57]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"]],"0"],HT:["509","00","(?:[2-489]\\d|55)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[2-589]"]]]],HU:["36","00","[235-7]\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"06 $1"]],"06"],ID:["62","00[89]","(?:(?:00[1-9]|8\\d)\\d{4}|[1-36])\\d{6}|00\\d{10}|[1-9]\\d{8,10}|[2-9]\\d{7}",[7,8,9,10,11,12,13],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["15"]],["(\\d{2})(\\d{5,9})","$1 $2",["2[124]|[36]1"],"(0$1)"],["(\\d{3})(\\d{5,7})","$1 $2",["800"],"0$1"],["(\\d{3})(\\d{5,8})","$1 $2",["[2-79]"],"(0$1)"],["(\\d{3})(\\d{3,4})(\\d{3})","$1-$2-$3",["8[1-35-9]"],"0$1"],["(\\d{3})(\\d{6,8})","$1 $2",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["804"],"0$1"],["(\\d{3})(\\d)(\\d{3})(\\d{3})","$1 $2 $3 $4",["80"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1-$2-$3",["8"],"0$1"]],"0"],IE:["353","00","(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["2[24-9]|47|58|6[237-9]|9[35-9]"],"(0$1)"],["(\\d{3})(\\d{5})","$1 $2",["[45]0"],"(0$1)"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["1"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2569]|4[1-69]|7[14]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["81"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[78]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["4"],"(0$1)"],["(\\d{2})(\\d)(\\d{3})(\\d{4})","$1 $2 $3 $4",["8"],"0$1"]],"0"],IL:["972","0(?:0|1[2-9])","1\\d{6}(?:\\d{3,5})?|[57]\\d{8}|[1-489]\\d{7}",[7,8,9,10,11,12],[["(\\d{4})(\\d{3})","$1-$2",["125"]],["(\\d{4})(\\d{2})(\\d{2})","$1-$2-$3",["121"]],["(\\d)(\\d{3})(\\d{4})","$1-$2-$3",["[2-489]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1-$2-$3",["12"]],["(\\d{4})(\\d{6})","$1-$2",["159"]],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3-$4",["1[7-9]"]],["(\\d{3})(\\d{1,2})(\\d{3})(\\d{4})","$1-$2 $3-$4",["15"]]],"0"],IM:["44","00","1624\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([25-8]\\d{5})$|0","1624$1",0,"74576|(?:16|7[56])24"],IN:["91","00","(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}",[8,9,10,11,12,13],[["(\\d{8})","$1",["5(?:0|2[23]|3[03]|[67]1|88)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"],0,1],["(\\d{4})(\\d{4,5})","$1 $2",["180","1800"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["140"],0,1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["11|2[02]|33|4[04]|79[1-7]|80[2-46]","11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])","11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|4[47]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67|72)[14]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:2[14]|3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:(?:2[14]|5[15])[2-6]|3171|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|(?:74[47]|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"],"0$1",1],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|28|3[129]|4[1-35689]|5[29]|6[02-5]|70)|807","1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1(?:[013-8]|9[6-9])|28[6-8]|3(?:17|2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]","1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|83)|73179|807(?:1|9[1-3])|(?:1552|6(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[124-6])\\d|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"],"0$1",1],["(\\d{5})(\\d{5})","$1 $2",["[6-9]"],"0$1",1],["(\\d{4})(\\d{2,4})(\\d{4})","$1 $2 $3",["1(?:6|8[06])","1(?:6|8[06]0)"],0,1],["(\\d{4})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["18"],0,1]],"0"],IO:["246","00","3\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["3"]]]],IQ:["964","00","(?:1|7\\d\\d)\\d{7}|[2-6]\\d{7,8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-6]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],IR:["98","00","[1-9]\\d{9}|(?:[1-8]\\d\\d|9)\\d{3,4}",[4,5,6,7,10],[["(\\d{4,5})","$1",["96"],"0$1"],["(\\d{2})(\\d{4,5})","$1 $2",["(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[1-8]"],"0$1"]],"0"],IS:["354","00|1(?:0(?:01|[12]0)|100)","(?:38\\d|[4-9])\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["[4-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["3"]]],0,0,0,0,0,0,0,"00"],IT:["39","00","0\\d{5,10}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:43|55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?",[6,7,8,9,10,11],[["(\\d{2})(\\d{4,6})","$1 $2",["0[26]"]],["(\\d{3})(\\d{3,6})","$1 $2",["0[13-57-9][0159]|8(?:03|4[17]|9[2-5])","0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))"]],["(\\d{4})(\\d{2,6})","$1 $2",["0(?:[13-579][2-46-8]|8[236-8])"]],["(\\d{4})(\\d{4})","$1 $2",["894"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[26]|5"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["1(?:44|[679])|[378]|43"]],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[13-57-9][0159]|14"]],["(\\d{2})(\\d{4})(\\d{5})","$1 $2 $3",["0[26]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["3"]]],0,0,0,0,0,0,[["0669[0-79]\\d{1,6}|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[1-356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}"],["3[2-9]\\d{7,8}|(?:31|43)\\d{8}",[9,10]],["80(?:0\\d{3}|3)\\d{3}",[6,9]],["(?:0878\\d{3}|89(?:2\\d|3[04]|4(?:[0-4]|[5-9]\\d\\d)|5[0-4]))\\d\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\d{6}",[6,8,9,10]],["1(?:78\\d|99)\\d{6}",[9,10]],0,0,0,["55\\d{8}",[10]],["84(?:[08]\\d{3}|[17])\\d{3}",[6,9]]]],JE:["44","00","1534\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([0-24-8]\\d{5})$|0","1534$1",0,0,[["1534[0-24-8]\\d{5}"],["7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97\\d))\\d{5}"],["80(?:07(?:35|81)|8901)\\d{4}"],["(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\d{4}"],["701511\\d{4}"],0,["(?:3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\d{4})\\d{4}"],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}"],["56\\d{8}"]]],JM:["1","011","(?:[58]\\d\\d|658|900)\\d{7}",[10],0,"1",0,0,0,0,"658|876"],JO:["962","00","(?:(?:[2689]|7\\d)\\d|32|53)\\d{6}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2356]|87"],"(0$1)"],["(\\d{3})(\\d{5,6})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["70"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],JP:["81","010","00[1-9]\\d{6,14}|[257-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}",[8,9,10,11,12,13,14,15,16,17],[["(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3",["(?:12|57|99)0"],"0$1"],["(\\d{4})(\\d)(\\d{4})","$1-$2-$3",["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51)|9(?:80|9[16])","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2-$3",["[36]|4(?:2[09]|7[01])","[36]|4(?:2(?:0|9[02-69])|7(?:0[019]|1))"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[0459]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[26-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9]|9[29])|5(?:2|3(?:[045]|9[0-8])|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|3(?:[29]|60)|49|51|6(?:[0-24]|36|5[0-3589]|7[23]|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3(?:[045]|9(?:[0-58]|6[4-9]|7[0-35689]))|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|60|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[2-57-9]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|7(?:2[2-468]|3[78])|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]"],"0$1"],["(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3",["[14]|[289][2-9]|5[3-9]|7[2-4679]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["800"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[257-9]"],"0$1"]],"0",0,"(000[259]\\d{6})$|(?:(?:003768)0?)|0","$1"],KE:["254","000","(?:[17]\\d\\d|900)\\d{6}|(?:2|80)0\\d{6,7}|[4-6]\\d{6,8}",[7,8,9,10],[["(\\d{2})(\\d{5,7})","$1 $2",["[24-6]"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[17]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0"],KG:["996","00","8\\d{9}|[235-9]\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["3(?:1[346]|[24-79])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-79]|88"],"0$1"],["(\\d{3})(\\d{3})(\\d)(\\d{2,3})","$1 $2 $3 $4",["8"],"0$1"]],"0"],KH:["855","00[14-9]","1\\d{9}|[1-9]\\d{7,8}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],KI:["686","00","(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}",[5,8],0,"0"],KM:["269","00","[3478]\\d{6}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[3478]"]]]],KN:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","869$1",0,"869"],KP:["850","00|99","85\\d{6}|(?:19\\d|[2-7])\\d{7}",[8,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"]],"0"],KR:["82","00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))","00[1-9]\\d{8,11}|(?:[12]|5\\d{3})\\d{7}|[13-6]\\d{9}|(?:[1-6]\\d|80)\\d{7}|[3-6]\\d{4,5}|(?:00|7)0\\d{8}",[5,6,8,9,10,11,12,13,14],[["(\\d{2})(\\d{3,4})","$1-$2",["(?:3[1-3]|[46][1-4]|5[1-5])1"],"0$1"],["(\\d{4})(\\d{4})","$1-$2",["1"]],["(\\d)(\\d{3,4})(\\d{4})","$1-$2-$3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60|8"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1-$2-$3",["[1346]|5[1-5]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{2})(\\d{5})(\\d{4})","$1-$2-$3",["5"],"0$1"]],"0",0,"0(8(?:[1-46-8]|5\\d\\d))?"],KW:["965","00","18\\d{5}|(?:[2569]\\d|41)\\d{6}",[7,8],[["(\\d{4})(\\d{3,4})","$1 $2",["[169]|2(?:[235]|4[1-35-9])|52"]],["(\\d{3})(\\d{5})","$1 $2",["[245]"]]]],KY:["1","011","(?:345|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","345$1",0,"345"],KZ:["7","810","(?:33622|8\\d{8})\\d{5}|[78]\\d{9}",[10,14],0,"8",0,0,0,0,"33|7",0,"8~10"],LA:["856","00","[23]\\d{9}|3\\d{8}|(?:[235-8]\\d|41)\\d{6}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2[13]|3[14]|[4-8]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["30[013-9]"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[23]"],"0$1"]],"0"],LB:["961","00","[27-9]\\d{7}|[13-9]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[13-69]|7(?:[2-57]|62|8[0-7]|9[04-9])|8[02-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27-9]"]]],"0"],LC:["1","011","(?:[58]\\d\\d|758|900)\\d{7}",[10],0,"1",0,"([2-8]\\d{6})$|1","758$1",0,"758"],LI:["423","00","[68]\\d{8}|(?:[2378]\\d|90)\\d{5}",[7,9],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2379]|8(?:0[09]|7)","[2379]|8(?:0(?:02|9)|7)"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["69"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]],"0",0,"(1001)|0"],LK:["94","00","[1-9]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[1-689]"],"0$1"]],"0"],LR:["231","00","(?:[245]\\d|33|77|88)\\d{7}|(?:2\\d|[4-6])\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["4[67]|[56]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-578]"],"0$1"]],"0"],LS:["266","00","(?:[256]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2568]"]]]],LT:["370","00","(?:[3469]\\d|52|[78]0)\\d{6}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["52[0-7]"],"(8-$1)",1],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[7-9]"],"8 $1",1],["(\\d{2})(\\d{6})","$1 $2",["37|4(?:[15]|6[1-8])"],"(8-$1)",1],["(\\d{3})(\\d{5})","$1 $2",["[3-6]"],"(8-$1)",1]],"8",0,"[08]"],LU:["352","00","35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}",[4,5,6,7,8,9,10,11],[["(\\d{2})(\\d{3})","$1 $2",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["20[2-689]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4",["2(?:[0367]|4[3-8])"]],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["80[01]|90[015]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["20"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4 $5",["2(?:[0367]|4[3-8])"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})","$1 $2 $3 $4",["[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]"]]],0,0,"(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)"],LV:["371","00","(?:[268]\\d|90)\\d{6}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[269]|8[01]"]]]],LY:["218","00","[2-9]\\d{8}",[9],[["(\\d{2})(\\d{7})","$1-$2",["[2-9]"],"0$1"]],"0"],MA:["212","00","[5-8]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5[45]"],"0$1"],["(\\d{4})(\\d{5})","$1-$2",["5(?:2[2-46-9]|3[3-9]|9)|8(?:0[89]|92)"],"0$1"],["(\\d{2})(\\d{7})","$1-$2",["8"],"0$1"],["(\\d{3})(\\d{6})","$1-$2",["[5-7]"],"0$1"]],"0",0,0,0,0,0,[["5(?:2(?:[0-25-79]\\d|3[1-578]|4[02-46-8]|8[0235-7])|3(?:[0-47]\\d|5[02-9]|6[02-8]|8[014-9]|9[3-9])|(?:4[067]|5[03])\\d)\\d{5}"],["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[0167]\\d|2[0-4]|5[01]|8[0-3]))\\d{6}"],["80[0-7]\\d{6}"],["89\\d{7}"],0,0,0,0,["(?:592(?:4[0-2]|93)|80[89]\\d\\d)\\d{4}"]]],MC:["377","00","(?:[3489]|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["4"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[389]"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["6"],"0$1"]],"0"],MD:["373","00","(?:[235-7]\\d|[89]0)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["22|3"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[25-7]"],"0$1"]],"0"],ME:["382","00","(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"0$1"]],"0"],MF:["590","00","590\\d{6}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)\\d{4}"],["69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-5])\\d{4}"]]],MG:["261","00","[23]\\d{8}",[9],[["(\\d{2})(\\d{2})(\\d{3})(\\d{2})","$1 $2 $3 $4",["[23]"],"0$1"]],"0",0,"([24-9]\\d{6})$|0","20$1"],MH:["692","011","329\\d{4}|(?:[256]\\d|45)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1-$2",["[2-6]"]]],"1"],MK:["389","00","[2-578]\\d{7}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2|34[47]|4(?:[37]7|5[47]|64)"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[347]"],"0$1"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["[58]"],"0$1"]],"0"],ML:["223","00","[24-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-9]"]]]],MM:["95","00","1\\d{5,7}|95\\d{6}|(?:[4-7]|9[0-46-9])\\d{6,8}|(?:2|8\\d)\\d{5,8}",[6,7,8,9,10],[["(\\d)(\\d{2})(\\d{3})","$1 $2 $3",["16|2"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["[45]|6(?:0[23]|[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-6]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[4-7]|8[1-35]"],"0$1"],["(\\d)(\\d{3})(\\d{4,6})","$1 $2 $3",["9(?:2[0-4]|[35-9]|4[137-9])"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["92"],"0$1"],["(\\d)(\\d{5})(\\d{4})","$1 $2 $3",["9"],"0$1"]],"0"],MN:["976","001","[12]\\d{7,9}|[5-9]\\d{7}",[8,9,10],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[12]1"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[5-9]"]],["(\\d{3})(\\d{5,6})","$1 $2",["[12]2[1-3]"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["[12](?:27|3[2-8]|4[2-68]|5[1-4689])","[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["[12]"],"0$1"]],"0"],MO:["853","00","0800\\d{3}|(?:28|[68]\\d)\\d{6}",[7,8],[["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{4})(\\d{4})","$1 $2",["[268]"]]]],MP:["1","011","[58]\\d{9}|(?:67|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","670$1",0,"670"],MQ:["596","00","596\\d{6}|(?:69|80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[569]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],MR:["222","00","(?:[2-4]\\d\\d|800)\\d{5}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-48]"]]]],MS:["1","011","(?:[58]\\d\\d|664|900)\\d{7}",[10],0,"1",0,"([34]\\d{6})$|1","664$1",0,"664"],MT:["356","00","3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2357-9]"]]]],MU:["230","0(?:0|[24-7]0|3[03])","(?:[57]|8\\d\\d)\\d{7}|[2-468]\\d{6}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[2-46]|8[013]"]],["(\\d{4})(\\d{4})","$1 $2",["[57]"]],["(\\d{5})(\\d{5})","$1 $2",["8"]]],0,0,0,0,0,0,0,"020"],MV:["960","0(?:0|19)","(?:800|9[0-57-9]\\d)\\d{7}|[34679]\\d{6}",[7,10],[["(\\d{3})(\\d{4})","$1-$2",["[34679]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"]]],0,0,0,0,0,0,0,"00"],MW:["265","00","(?:[1289]\\d|31|77)\\d{7}|1\\d{6}",[7,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["1[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[137-9]"],"0$1"]],"0"],MX:["52","0[09]","1(?:(?:22|44|7[27]|87|99)[1-9]|65[0-689])\\d{7}|(?:1(?:[01]\\d|2[13-9]|[35][1-9]|4[0-35-9]|6[0-46-9]|7[013-689]|8[1-69]|9[1-8])|[2-9]\\d)\\d{8}",[10,11],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["33|5[56]|81"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2-9]"],0,1],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 $3 $4",["1(?:33|5[56]|81)"],0,1],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 $3 $4",["1"],0,1]],"01",0,"0(?:[12]|4[45])|1",0,0,0,0,"00"],MY:["60","00","1\\d{8,9}|(?:3\\d|[4-9])\\d{7}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1-$2 $3",["[4-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1-$2 $3",["1(?:[02469]|[378][1-9]|53)|8","1(?:[02469]|[37][1-9]|53|8(?:[1-46-9]|5[7-9]))|8"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2 $3",["3"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3-$4",["1(?:[367]|80)"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2 $3",["15"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2 $3",["1"],"0$1"]],"0"],MZ:["258","00","(?:2|8\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2|8[2-79]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],NA:["264","00","[68]\\d{7,8}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["87"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],NC:["687","00","(?:050|[2-57-9]\\d\\d)\\d{3}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1.$2.$3",["[02-57-9]"]]]],NE:["227","00","[027-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["08"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[089]|2[013]|7[047]"]]]],NF:["672","00","[13]\\d{5}",[6],[["(\\d{2})(\\d{4})","$1 $2",["1[0-3]"]],["(\\d)(\\d{5})","$1 $2",["[13]"]]],0,0,"([0-258]\\d{4})$","3$1"],NG:["234","009","2[0-24-9]\\d{8}|[78]\\d{10,13}|[7-9]\\d{9}|[1-9]\\d{7}|[124-7]\\d{6}",[7,8,10,11,12,13,14],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["78"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]|9(?:0[3-9]|[1-9])"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[3-6]|7(?:0[0-689]|[1-79])|8[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[7-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["20[129]"],"0$1"],["(\\d{4})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[78]"],"0$1"],["(\\d{3})(\\d{5})(\\d{5,6})","$1 $2 $3",["[78]"],"0$1"]],"0"],NI:["505","00","(?:1800|[25-8]\\d{3})\\d{4}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[125-8]"]]]],NL:["31","00","(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|8\\d{6,9}|9\\d{6,10}|1\\d{4,5}",[5,6,7,8,9,10,11],[["(\\d{3})(\\d{4,7})","$1 $2",["[89]0"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["66"],"0$1"],["(\\d)(\\d{8})","$1 $2",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-578]|91"],"0$1"],["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3",["9"],"0$1"]],"0"],NO:["47","00","(?:0|[2-9]\\d{3})\\d{4}",[5,8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]"]]],0,0,0,0,0,"[02-689]|7[0-8]"],NP:["977","00","(?:1\\d|9)\\d{9}|[1-9]\\d{7}",[8,10,11],[["(\\d)(\\d{7})","$1-$2",["1[2-6]"],"0$1"],["(\\d{2})(\\d{6})","$1-$2",["1[01]|[2-8]|9(?:[1-59]|[67][2-6])"],"0$1"],["(\\d{3})(\\d{7})","$1-$2",["9"]]],"0"],NR:["674","00","(?:444|(?:55|8\\d)\\d|666)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[4-68]"]]]],NU:["683","00","(?:[4-7]|888\\d)\\d{3}",[4,7],[["(\\d{3})(\\d{4})","$1 $2",["8"]]]],NZ:["64","0(?:0|161)","[1289]\\d{9}|50\\d{5}(?:\\d{2,3})?|[27-9]\\d{7,8}|(?:[34]\\d|6[0-35-9])\\d{6}|8\\d{4,6}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,8})","$1 $2",["8[1-79]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["50[036-8]|8|90","50(?:[0367]|88)|8|90"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["24|[346]|7[2-57-9]|9[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:10|74)|[589]"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["1|2[028]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,5})","$1 $2 $3",["2(?:[169]|7[0-35-9])|7"],"0$1"]],"0",0,0,0,0,0,0,"00"],OM:["968","00","(?:1505|[279]\\d{3}|500)\\d{4}|800\\d{5,6}",[7,8,9],[["(\\d{3})(\\d{4,6})","$1 $2",["[58]"]],["(\\d{2})(\\d{6})","$1 $2",["2"]],["(\\d{4})(\\d{4})","$1 $2",["[179]"]]]],PA:["507","00","(?:00800|8\\d{3})\\d{6}|[68]\\d{7}|[1-57-9]\\d{6}",[7,8,10,11],[["(\\d{3})(\\d{4})","$1-$2",["[1-57-9]"]],["(\\d{4})(\\d{4})","$1-$2",["[68]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]]],PE:["51","00|19(?:1[124]|77|90)00","(?:[14-8]|9\\d)\\d{7}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["80"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["1"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[4-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"]]],"0",0,0,0,0,0,0,"00"," Anexo "],PF:["689","00","4\\d{5}(?:\\d{2})?|8\\d{7,8}",[6,8,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["44"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4|8[7-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],PG:["675","00|140[1-3]","(?:180|[78]\\d{3})\\d{4}|(?:[2-589]\\d|64)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["18|[2-69]|85"]],["(\\d{4})(\\d{4})","$1 $2",["[78]"]]],0,0,0,0,0,0,0,"00"],PH:["63","00","(?:[2-7]|9\\d)\\d{8}|2\\d{5}|(?:1800|8)\\d{7,9}",[6,8,9,10,11,12,13],[["(\\d)(\\d{5})","$1 $2",["2"],"(0$1)"],["(\\d{4})(\\d{4,6})","$1 $2",["3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2","3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))"],"(0$1)"],["(\\d{5})(\\d{4})","$1 $2",["346|4(?:27|9[35])|883","3469|4(?:279|9(?:30|56))|8834"],"(0$1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|8[2-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{4})(\\d{1,2})(\\d{3})(\\d{4})","$1 $2 $3 $4",["1"]]],"0"],PK:["92","00","122\\d{6}|[24-8]\\d{10,11}|9(?:[013-9]\\d{8,10}|2(?:[01]\\d\\d|2(?:[06-8]\\d|1[01]))\\d{7})|(?:[2-8]\\d{3}|92(?:[0-7]\\d|8[1-9]))\\d{6}|[24-9]\\d{8}|[89]\\d{7}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,7})","$1 $2 $3",["[89]0"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["1"]],["(\\d{3})(\\d{6,7})","$1 $2",["2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])","9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]"],"(0$1)"],["(\\d{2})(\\d{7,8})","$1 $2",["(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]"],"(0$1)"],["(\\d{5})(\\d{5})","$1 $2",["58"],"(0$1)"],["(\\d{3})(\\d{7})","$1 $2",["3"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[24-9]"],"(0$1)"]],"0"],PL:["48","00","(?:6|8\\d\\d)\\d{7}|[1-9]\\d{6}(?:\\d{2})?|[26]\\d{5}",[6,7,8,9,10],[["(\\d{5})","$1",["19"]],["(\\d{3})(\\d{3})","$1 $2",["11|20|64"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1","(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19"]],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["64"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["21|39|45|5[0137]|6[0469]|7[02389]|8(?:0[14]|8)"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[2-8]|[2-7]|8[1-79]|9[145]"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["8"]]]],PM:["508","00","[45]\\d{5}|(?:708|80\\d)\\d{6}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[45]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],PR:["1","011","(?:[589]\\d\\d|787)\\d{7}",[10],0,"1",0,0,0,0,"787|939"],PS:["970","00","[2489]2\\d{6}|(?:1\\d|5)\\d{8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2489]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["5"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],PT:["351","00","1693\\d{5}|(?:[26-9]\\d|30)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["2[12]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["16|[236-9]"]]]],PW:["680","01[12]","(?:[24-8]\\d\\d|345|900)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],PY:["595","00","59\\d{4,6}|9\\d{5,10}|(?:[2-46-8]\\d|5[0-8])\\d{4,7}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3,6})","$1 $2",["[2-9]0"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[26]1|3[289]|4[1246-8]|7[1-3]|8[1-36]"],"(0$1)"],["(\\d{3})(\\d{4,5})","$1 $2",["2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["87"]],["(\\d{3})(\\d{6})","$1 $2",["9(?:[5-79]|8[1-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["9"]]],"0"],QA:["974","00","800\\d{4}|(?:2|800)\\d{6}|(?:0080|[3-7])\\d{7}",[7,8,9,11],[["(\\d{3})(\\d{4})","$1 $2",["2[16]|8"]],["(\\d{4})(\\d{4})","$1 $2",["[3-7]"]]]],RE:["262","00","(?:26|[689]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2689]"],"0$1"]],"0",0,0,0,0,0,[["26(?:2\\d\\d|3(?:0\\d|1[0-6]))\\d{4}"],["69(?:2\\d\\d|3(?:[06][0-6]|1[013]|2[0-2]|3[0-39]|4\\d|5[0-5]|7[0-37]|8[0-8]|9[0-479]))\\d{4}"],["80\\d{7}"],["89[1-37-9]\\d{6}"],0,0,0,0,["9(?:399[0-3]|479[0-5]|76(?:2[27]|3[0-37]))\\d{4}"],["8(?:1[019]|2[0156]|84|90)\\d{6}"]]],RO:["40","00","(?:[236-8]\\d|90)\\d{7}|[23]\\d{5}",[6,9],[["(\\d{3})(\\d{3})","$1 $2",["2[3-6]","2[3-6]\\d9"],"0$1"],["(\\d{2})(\\d{4})","$1 $2",["219|31"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[23]1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[236-9]"],"0$1"]],"0",0,0,0,0,0,0,0," int "],RS:["381","00","38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}",[6,7,8,9,10,11,12],[["(\\d{3})(\\d{3,9})","$1 $2",["(?:2[389]|39)0|[7-9]"],"0$1"],["(\\d{2})(\\d{5,10})","$1 $2",["[1-36]"],"0$1"]],"0"],RU:["7","810","8\\d{13}|[347-9]\\d{9}",[10,14],[["(\\d{4})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-8]|2[1-9])","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:1[23]|[2-9]2))","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2"],"8 ($1)",1],["(\\d{5})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-68]|2[1-9])","7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))","7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[349]|8(?:[02-7]|1[1-8])"],"8 ($1)",1],["(\\d{4})(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3 $4",["8"],"8 ($1)"]],"8",0,0,0,0,"3[04-689]|[489]",0,"8~10"],RW:["250","00","(?:06|[27]\\d\\d|[89]00)\\d{6}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[7-9]"],"0$1"]],"0"],SA:["966","00","92\\d{7}|(?:[15]|8\\d)\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["9"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["81"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]],"0"],SB:["677","0[01]","(?:[1-6]|[7-9]\\d\\d)\\d{4}",[5,7],[["(\\d{2})(\\d{5})","$1 $2",["7|8[4-9]|9(?:[1-8]|9[0-8])"]]]],SC:["248","010|0[0-2]","800\\d{4}|(?:[249]\\d|64)\\d{5}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[246]|9[57]"]]],0,0,0,0,0,0,0,"00"],SD:["249","00","[19]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[19]"],"0$1"]],"0"],SE:["46","00","(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{2,3})(\\d{2})","$1-$2 $3",["20"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{4})","$1-$2",["9(?:00|39|44|9)"],"0$1",0,"$1 $2"],["(\\d{2})(\\d{3})(\\d{2})","$1-$2 $3",["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3"],["(\\d)(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2,3})(\\d{2})","$1-$2 $3",["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{2,3})(\\d{3})","$1-$2 $3",["9(?:00|39|44)"],"0$1",0,"$1 $2 $3"],["(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3 $4"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["10|7"],"0$1",0,"$1 $2 $3 $4"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1-$2 $3 $4",["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{3})","$1-$2 $3 $4",["9"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4 $5",["[26]"],"0$1",0,"$1 $2 $3 $4 $5"]],"0"],SG:["65","0[0-3]\\d","(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["[369]|8(?:0[1-9]|[1-9])"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]],["(\\d{4})(\\d{4})(\\d{3})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],SH:["290","00","(?:[256]\\d|8)\\d{3}",[4,5],0,0,0,0,0,0,"[256]"],SI:["386","00|10(?:22|66|88|99)","[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}",[5,6,7,8],[["(\\d{2})(\\d{3,6})","$1 $2",["8[09]|9"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["59|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37][01]|4[0139]|51|6"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-57]"],"(0$1)"]],"0",0,0,0,0,0,0,"00"],SJ:["47","00","0\\d{4}|(?:[489]\\d|79)\\d{6}",[5,8],0,0,0,0,0,0,"79"],SK:["421","00","[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}",[6,7,9],[["(\\d)(\\d{2})(\\d{3,4})","$1 $2 $3",["21"],"0$1"],["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["[3-5][1-8]1","[3-5][1-8]1[67]"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1/$2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[689]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1/$2 $3 $4",["[3-5]"],"0$1"]],"0"],SL:["232","00","(?:[237-9]\\d|66)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[236-9]"],"(0$1)"]],"0"],SM:["378","00","(?:0549|[5-7]\\d)\\d{6}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]"]],["(\\d{4})(\\d{6})","$1 $2",["0"]]],0,0,"([89]\\d{5})$","0549$1"],SN:["221","00","(?:[378]\\d|93)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[379]"]]]],SO:["252","00","[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}",[6,7,8,9],[["(\\d{2})(\\d{4})","$1 $2",["8[125]"]],["(\\d{6})","$1",["[134]"]],["(\\d)(\\d{6})","$1 $2",["[15]|2[0-79]|3[0-46-8]|4[0-7]"]],["(\\d)(\\d{7})","$1 $2",["(?:2|90)4|[67]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[348]|64|79|90"]],["(\\d{2})(\\d{5,7})","$1 $2",["1|28|6[0-35-9]|77|9[2-9]"]]],"0"],SR:["597","00","(?:[2-5]|68|[78]\\d)\\d{5}",[6,7],[["(\\d{2})(\\d{2})(\\d{2})","$1-$2-$3",["56"]],["(\\d{3})(\\d{3})","$1-$2",["[2-5]"]],["(\\d{3})(\\d{4})","$1-$2",["[6-8]"]]]],SS:["211","00","[19]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[19]"],"0$1"]],"0"],ST:["239","00","(?:22|9\\d)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[29]"]]]],SV:["503","00","[267]\\d{7}|(?:80\\d|900)\\d{4}(?:\\d{4})?",[7,8,11],[["(\\d{3})(\\d{4})","$1 $2",["[89]"]],["(\\d{4})(\\d{4})","$1 $2",["[267]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[89]"]]]],SX:["1","011","7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"(5\\d{6})$|1","721$1",0,"721"],SY:["963","00","[1-39]\\d{8}|[1-5]\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-5]"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1",1]],"0"],SZ:["268","00","0800\\d{4}|(?:[237]\\d|900)\\d{6}",[8,9],[["(\\d{4})(\\d{4})","$1 $2",["[0237]"]],["(\\d{5})(\\d{4})","$1 $2",["9"]]]],TA:["290","00","8\\d{3}",[4],0,0,0,0,0,0,"8"],TC:["1","011","(?:[58]\\d\\d|649|900)\\d{7}",[10],0,"1",0,"([2-479]\\d{6})$|1","649$1",0,"649"],TD:["235","00|16","(?:22|[69]\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2679]"]]],0,0,0,0,0,0,0,"00"],TG:["228","00","[279]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[279]"]]]],TH:["66","00[1-9]","(?:001800|[2-57]|[689]\\d)\\d{7}|1\\d{7,9}",[8,9,10,13],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[13-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],TJ:["992","810","[0-57-9]\\d{8}",[9],[["(\\d{6})(\\d)(\\d{2})","$1 $2 $3",["331","3317"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["44[02-479]|[34]7"]],["(\\d{4})(\\d)(\\d{4})","$1 $2 $3",["3[1-5]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[0-57-9]"]]],0,0,0,0,0,0,0,"8~10"],TK:["690","00","[2-47]\\d{3,6}",[4,5,6,7]],TL:["670","00","7\\d{7}|(?:[2-47]\\d|[89]0)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[2-489]|70"]],["(\\d{4})(\\d{4})","$1 $2",["7"]]]],TM:["993","810","[1-6]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["12"],"(8 $1)"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-5]"],"(8 $1)"],["(\\d{2})(\\d{6})","$1 $2",["6"],"8 $1"]],"8",0,0,0,0,0,0,"8~10"],TN:["216","00","[2-57-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-57-9]"]]]],TO:["676","00","(?:0800|(?:[5-8]\\d\\d|999)\\d)\\d{3}|[2-8]\\d{4}",[5,7],[["(\\d{2})(\\d{3})","$1-$2",["[2-4]|50|6[09]|7[0-24-69]|8[05]"]],["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[5-9]"]]]],TR:["90","00","4\\d{6}|8\\d{11,12}|(?:[2-58]\\d\\d|900)\\d{7}",[7,10,12,13],[["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["512|8[01589]|90"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5(?:[0-59]|61)","5(?:[0-59]|61[06])","5(?:[0-59]|61[06]1)"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24][1-8]|3[1-9]"],"(0$1)",1],["(\\d{3})(\\d{3})(\\d{6,7})","$1 $2 $3",["80"],"0$1",1]],"0"],TT:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-46-8]\\d{6})$|1","868$1",0,"868"],TV:["688","00","(?:2|7\\d\\d|90)\\d{4}",[5,6,7],[["(\\d{2})(\\d{3})","$1 $2",["2"]],["(\\d{2})(\\d{4})","$1 $2",["90"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],TW:["886","0(?:0[25-79]|19)","[2-689]\\d{8}|7\\d{9,10}|[2-8]\\d{7}|2\\d{6}",[7,8,9,10,11],[["(\\d{2})(\\d)(\\d{4})","$1 $2 $3",["202"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[258]0"],"0$1"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["[23568]|4(?:0[02-48]|[1-47-9])|7[1-9]","[23568]|4(?:0[2-48]|[1-47-9])|(?:400|7)[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,5})","$1 $2 $3",["7"],"0$1"]],"0",0,0,0,0,0,0,0,"#"],TZ:["255","00[056]","(?:[25-8]\\d|41|90)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[24]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["5"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[67]"],"0$1"]],"0"],UA:["380","00","[89]\\d{9}|[3-9]\\d{8}",[9,10],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6[12][29]|(?:3[1-8]|4[136-8]|5[12457]|6[49])2|(?:56|65)[24]","6[12][29]|(?:35|4[1378]|5[12457]|6[49])2|(?:56|65)[24]|(?:3[1-46-8]|46)2[013-9]"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6[0135689]|7[4-6])|6(?:[12][3-7]|[459])","3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6(?:[015689]|3[02389])|7[4-6])|6(?:[12][3-7]|[459])"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|89|9[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0",0,0,0,0,0,0,"0~0"],UG:["256","00[057]","800\\d{6}|(?:[29]0|[347]\\d)\\d{7}",[9],[["(\\d{4})(\\d{5})","$1 $2",["202","2024"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[27-9]|4(?:6[45]|[7-9])"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[34]"],"0$1"]],"0"],US:["1","011","[2-9]\\d{9}|3\\d{6}",[10],[["(\\d{3})(\\d{4})","$1-$2",["310"],0,1],["(\\d{3})(\\d{3})(\\d{4})","($1) $2-$3",["[2-9]"],0,1,"$1-$2-$3"]],"1",0,0,0,0,0,[["(?:5056(?:[0-35-9]\\d|4[468])|7302[0-3]\\d)\\d{4}|(?:472[24]|505[2-57-9]|7306|983[237-9])\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[149]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-57-9]|1[02-9]|2[013569]|3[0-24679]|4[167]|5[0-2]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-47-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-29])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[1247]|4[037]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[068]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-389]|8[04-69]))[2-9]\\d{6}"],[""],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"]]],UY:["598","0(?:0|1[3-9]\\d)","0004\\d{2,9}|[1249]\\d{7}|(?:[49]\\d|80)\\d{5}",[6,7,8,9,10,11,12,13],[["(\\d{3})(\\d{3,4})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[49]0|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[124]"]],["(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3 $4",["0"]]],"0",0,0,0,0,0,0,"00"," int. "],UZ:["998","810","(?:20|33|[5-79]\\d|88)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[235-9]"],"8 $1"]],"8",0,0,0,0,0,0,"8~10"],VA:["39","00","0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}",[6,7,8,9,10,11],0,0,0,0,0,0,"06698"],VC:["1","011","(?:[58]\\d\\d|784|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","784$1",0,"784"],VE:["58","00","[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}",[10],[["(\\d{3})(\\d{7})","$1-$2",["[24-689]"],"0$1"]],"0"],VG:["1","011","(?:284|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-578]\\d{6})$|1","284$1",0,"284"],VI:["1","011","[58]\\d{9}|(?:34|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","340$1",0,"340"],VN:["84","00","[12]\\d{9}|[135-9]\\d{8}|[16]\\d{7}|[16-8]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["80"],"0$1",1],["(\\d{4})(\\d{4,6})","$1 $2",["1"],0,1],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["6"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[357-9]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["2[48]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["2"],"0$1",1]],"0"],VU:["678","00","[57-9]\\d{6}|(?:[238]\\d|48)\\d{3}",[5,7],[["(\\d{3})(\\d{4})","$1 $2",["[57-9]"]]]],WF:["681","00","(?:40|72)\\d{4}|8\\d{5}(?:\\d{3})?",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[478]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],WS:["685","0","(?:[2-6]|8\\d{5})\\d{4}|[78]\\d{6}|[68]\\d{5}",[5,6,7,10],[["(\\d{5})","$1",["[2-5]|6[1-9]"]],["(\\d{3})(\\d{3,7})","$1 $2",["[68]"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],XK:["383","00","[23]\\d{7,8}|(?:4\\d\\d|[89]00)\\d{5}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[23]"],"0$1"]],"0"],YE:["967","00","(?:1|7\\d)\\d{7}|[1-7]\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-6]|7(?:[24-6]|8[0-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"],"0$1"]],"0"],YT:["262","00","(?:80|9\\d)\\d{7}|(?:26|63)9\\d{6}",[9],0,"0",0,0,0,0,0,[["269(?:0[0-467]|15|5[0-4]|6\\d|[78]0)\\d{4}"],["639(?:0[0-79]|1[019]|[267]\\d|3[09]|40|5[05-9]|9[04-79])\\d{4}"],["80\\d{7}"],0,0,0,0,0,["9(?:(?:39|47)8[01]|769\\d)\\d{4}"]]],ZA:["27","00","[1-79]\\d{8}|8\\d{4,9}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,4})","$1 $2",["8[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["8[1-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["860"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],ZM:["260","00","800\\d{6}|(?:21|63|[79]\\d)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[28]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[79]"],"0$1"]],"0"],ZW:["263","00","2(?:[0-57-9]\\d{6,8}|6[0-24-9]\\d{6,7})|[38]\\d{9}|[35-8]\\d{8}|[3-6]\\d{7}|[1-689]\\d{6}|[1-3569]\\d{5}|[1356]\\d{4}",[5,6,7,8,9,10],[["(\\d{3})(\\d{3,5})","$1 $2",["2(?:0[45]|2[278]|[49]8)|3(?:[09]8|17)|6(?:[29]8|37|75)|[23][78]|(?:33|5[15]|6[68])[78]"],"0$1"],["(\\d)(\\d{3})(\\d{2,4})","$1 $2 $3",["[49]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["80"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["24|8[13-59]|(?:2[05-79]|39|5[45]|6[15-8])2","2(?:02[014]|4|[56]20|[79]2)|392|5(?:42|525)|6(?:[16-8]21|52[013])|8[13-59]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:1[39]|2[0157]|[378]|[56][14])|3(?:12|29)","2(?:1[39]|2[0157]|[378]|[56][14])|3(?:123|29)"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["1|2(?:0[0-36-9]|12|29|[56])|3(?:1[0-689]|[24-6])|5(?:[0236-9]|1[2-4])|6(?:[013-59]|7[0-46-9])|(?:33|55|6[68])[0-69]|(?:29|3[09]|62)[0-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["29[013-9]|39|54"],"0$1"],["(\\d{4})(\\d{3,5})","$1 $2",["(?:25|54)8","258|5483"],"0$1"]],"0"]},nonGeographic:{800:["800",0,"(?:00|[1-9]\\d)\\d{6}",[8],[["(\\d{4})(\\d{4})","$1 $2",["\\d"]]],0,0,0,0,0,0,[0,0,["(?:00|[1-9]\\d)\\d{6}"]]],808:["808",0,"[1-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[1-9]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,0,["[1-9]\\d{7}"]]],870:["870",0,"7\\d{11}|[35-7]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[35-7]"]]],0,0,0,0,0,0,[0,["(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}"]]],878:["878",0,"10\\d{10}",[12],[["(\\d{2})(\\d{5})(\\d{5})","$1 $2 $3",["1"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["10\\d{10}"]]],881:["881",0,"6\\d{9}|[0-36-9]\\d{8}",[9,10],[["(\\d)(\\d{3})(\\d{5})","$1 $2 $3",["[0-37-9]"]],["(\\d)(\\d{3})(\\d{5,6})","$1 $2 $3",["6"]]],0,0,0,0,0,0,[0,["6\\d{9}|[0-36-9]\\d{8}"]]],882:["882",0,"[13]\\d{6}(?:\\d{2,5})?|[19]\\d{7}|(?:[25]\\d\\d|4)\\d{7}(?:\\d{2})?",[7,8,9,10,11,12],[["(\\d{2})(\\d{5})","$1 $2",["16|342"]],["(\\d{2})(\\d{6})","$1 $2",["49"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["1[36]|9"]],["(\\d{2})(\\d{4})(\\d{3})","$1 $2 $3",["3[23]"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["16"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|23|3(?:[15]|4[57])|4|51"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["34"]],["(\\d{2})(\\d{4,5})(\\d{5})","$1 $2 $3",["[1-35]"]]],0,0,0,0,0,0,[0,["342\\d{4}|(?:337|49)\\d{6}|(?:3(?:2|47|7\\d{3})|50\\d{3})\\d{7}",[7,8,9,10,12]],0,0,0,0,0,0,["1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15-8]|9[0689])\\d{4}|6\\d{5,10})|(?:345\\d|9[89])\\d{6}|(?:10|2(?:3|85\\d)|3(?:[15]|[69]\\d\\d)|4[15-8]|51)\\d{8}"]]],883:["883",0,"(?:[1-4]\\d|51)\\d{6,10}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,8})","$1 $2 $3",["[14]|2[24-689]|3[02-689]|51[24-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["510"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["21"]],["(\\d{4})(\\d{4})(\\d{4})","$1 $2 $3",["51[13]"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[235]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["(?:2(?:00\\d\\d|10)|(?:370[1-9]|51\\d0)\\d)\\d{7}|51(?:00\\d{5}|[24-9]0\\d{4,7})|(?:1[0-79]|2[24-689]|3[02-689]|4[0-4])0\\d{5,9}"]]],888:["888",0,"\\d{11}",[11],[["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3"]],0,0,0,0,0,0,[0,0,0,0,0,0,["\\d{11}"]]],979:["979",0,"[1359]\\d{8}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[1359]"]]],0,0,0,0,0,0,[0,0,0,["[1359]\\d{8}"]]]}};function Sd(t,e){var n=Array.prototype.slice.call(e);return n.push(K2),t.apply(this,n)}function ks(t){"@babel/helpers - typeof";return ks=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ks(t)}function vd(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function Z2(t,e,n){return e&&vd(t.prototype,e),n&&vd(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function J2(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Q2(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Yn(t,e)}function ey(t){var e=Dd();return function(){var o=Un(t),i;if(e){var r=Un(this).constructor;i=Reflect.construct(o,arguments,r)}else i=o.apply(this,arguments);return ty(this,i)}}function ty(t,e){if(e&&(ks(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Md(t)}function Md(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ss(t){var e=typeof Map=="function"?new Map:void 0;return Ss=function(o){if(o===null||!ny(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e<"u"){if(e.has(o))return e.get(o);e.set(o,i)}function i(){return Yo(o,arguments,Un(this).constructor)}return i.prototype=Object.create(o.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),Yn(i,o)},Ss(t)}function Yo(t,e,n){return Dd()?Yo=Reflect.construct:Yo=function(i,r,l){var a=[null];a.push.apply(a,r);var d=Function.bind.apply(i,a),c=new d;return l&&Yn(c,l.prototype),c},Yo.apply(null,arguments)}function Dd(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ny(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function Yn(t,e){return Yn=Object.setPrototypeOf||function(o,i){return o.__proto__=i,o},Yn(t,e)}function Un(t){return Un=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Un(t)}var at=function(t){Q2(n,t);var e=ey(n);function n(o){var i;return J2(this,n),i=e.call(this,o),Object.setPrototypeOf(Md(i),n.prototype),i.name=i.constructor.name,i}return Z2(n)}(Ss(Error)),vs=2,oy=17,iy=3,ze="0-90-9٠-٩۰-۹",sy="-‐-―−ー-",ry="//",ly="..",ay="  ­​⁠ ",dy="()()[]\\[\\]",cy="~⁓∼~",Uo="".concat(sy).concat(ry).concat(ly).concat(ay).concat(dy).concat(cy),Ms="++";function Ed(t,e){t=t.split("-"),e=e.split("-");for(var n=t[0].split("."),o=e[0].split("."),i=0;i<3;i++){var r=Number(n[i]),l=Number(o[i]);if(r>l)return 1;if(l>r)return-1;if(!isNaN(r)&&isNaN(l))return 1;if(isNaN(r)&&!isNaN(l))return-1}return t[1]&&e[1]?t[1]>e[1]?1:t[1]<e[1]?-1:0:!t[1]&&e[1]?1:t[1]&&!e[1]?-1:0}var uy={}.constructor;function Go(t){return t!=null&&t.constructor===uy}function Ds(t){"@babel/helpers - typeof";return Ds=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ds(t)}function qo(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Bd(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function Xo(t,e,n){return e&&Bd(t.prototype,e),n&&Bd(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}var fy="1.2.0",hy="1.7.35",Vd=" ext. ",py=/^\d+$/,Ce=function(){function t(e){qo(this,t),by(e),this.metadata=e,Fd.call(this,e)}return Xo(t,[{key:"getCountries",value:function(){return Object.keys(this.metadata.countries).filter(function(n){return n!=="001"})}},{key:"getCountryMetadata",value:function(n){return this.metadata.countries[n]}},{key:"nonGeographic",value:function(){if(!(this.v1||this.v2||this.v3))return this.metadata.nonGeographic||this.metadata.nonGeographical}},{key:"hasCountry",value:function(n){return this.getCountryMetadata(n)!==void 0}},{key:"hasCallingCode",value:function(n){if(this.getCountryCodesForCallingCode(n))return!0;if(this.nonGeographic()){if(this.nonGeographic()[n])return!0}else{var o=this.countryCallingCodes()[n];if(o&&o.length===1&&o[0]==="001")return!0}}},{key:"isNonGeographicCallingCode",value:function(n){return this.nonGeographic()?!!this.nonGeographic()[n]:!this.getCountryCodesForCallingCode(n)}},{key:"country",value:function(n){return this.selectNumberingPlan(n)}},{key:"selectNumberingPlan",value:function(n,o){if(n&&py.test(n)&&(o=n,n=null),n&&n!=="001"){if(!this.hasCountry(n))throw new Error("Unknown country: ".concat(n));this.numberingPlan=new Pd(this.getCountryMetadata(n),this)}else if(o){if(!this.hasCallingCode(o))throw new Error("Unknown calling code: ".concat(o));this.numberingPlan=new Pd(this.getNumberingPlanMetadata(o),this)}else this.numberingPlan=void 0;return this}},{key:"getCountryCodesForCallingCode",value:function(n){var o=this.countryCallingCodes()[n];if(o)return o.length===1&&o[0].length===3?void 0:o}},{key:"getCountryCodeForCallingCode",value:function(n){var o=this.getCountryCodesForCallingCode(n);if(o)return o[0]}},{key:"getNumberingPlanMetadata",value:function(n){var o=this.getCountryCodeForCallingCode(n);if(o)return this.getCountryMetadata(o);if(this.nonGeographic()){var i=this.nonGeographic()[n];if(i)return i}else{var r=this.countryCallingCodes()[n];if(r&&r.length===1&&r[0]==="001")return this.metadata.countries["001"]}}},{key:"countryCallingCode",value:function(){return this.numberingPlan.callingCode()}},{key:"IDDPrefix",value:function(){return this.numberingPlan.IDDPrefix()}},{key:"defaultIDDPrefix",value:function(){return this.numberingPlan.defaultIDDPrefix()}},{key:"nationalNumberPattern",value:function(){return this.numberingPlan.nationalNumberPattern()}},{key:"possibleLengths",value:function(){return this.numberingPlan.possibleLengths()}},{key:"formats",value:function(){return this.numberingPlan.formats()}},{key:"nationalPrefixForParsing",value:function(){return this.numberingPlan.nationalPrefixForParsing()}},{key:"nationalPrefixTransformRule",value:function(){return this.numberingPlan.nationalPrefixTransformRule()}},{key:"leadingDigits",value:function(){return this.numberingPlan.leadingDigits()}},{key:"hasTypes",value:function(){return this.numberingPlan.hasTypes()}},{key:"type",value:function(n){return this.numberingPlan.type(n)}},{key:"ext",value:function(){return this.numberingPlan.ext()}},{key:"countryCallingCodes",value:function(){return this.v1?this.metadata.country_phone_code_to_countries:this.metadata.country_calling_codes}},{key:"chooseCountryByCountryCallingCode",value:function(n){return this.selectNumberingPlan(n)}},{key:"hasSelectedNumberingPlan",value:function(){return this.numberingPlan!==void 0}}]),t}(),Pd=function(){function t(e,n){qo(this,t),this.globalMetadataObject=n,this.metadata=e,Fd.call(this,n.metadata)}return Xo(t,[{key:"callingCode",value:function(){return this.metadata[0]}},{key:"getDefaultCountryMetadataForRegion",value:function(){return this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode())}},{key:"IDDPrefix",value:function(){if(!(this.v1||this.v2))return this.metadata[1]}},{key:"defaultIDDPrefix",value:function(){if(!(this.v1||this.v2))return this.metadata[12]}},{key:"nationalNumberPattern",value:function(){return this.v1||this.v2?this.metadata[1]:this.metadata[2]}},{key:"possibleLengths",value:function(){if(!this.v1)return this.metadata[this.v2?2:3]}},{key:"_getFormats",value:function(n){return n[this.v1?2:this.v2?3:4]}},{key:"formats",value:function(){var n=this,o=this._getFormats(this.metadata)||this._getFormats(this.getDefaultCountryMetadataForRegion())||[];return o.map(function(i){return new my(i,n)})}},{key:"nationalPrefix",value:function(){return this.metadata[this.v1?3:this.v2?4:5]}},{key:"_getNationalPrefixFormattingRule",value:function(n){return n[this.v1?4:this.v2?5:6]}},{key:"nationalPrefixFormattingRule",value:function(){return this._getNationalPrefixFormattingRule(this.metadata)||this._getNationalPrefixFormattingRule(this.getDefaultCountryMetadataForRegion())}},{key:"_nationalPrefixForParsing",value:function(){return this.metadata[this.v1?5:this.v2?6:7]}},{key:"nationalPrefixForParsing",value:function(){return this._nationalPrefixForParsing()||this.nationalPrefix()}},{key:"nationalPrefixTransformRule",value:function(){return this.metadata[this.v1?6:this.v2?7:8]}},{key:"_getNationalPrefixIsOptionalWhenFormatting",value:function(){return!!this.metadata[this.v1?7:this.v2?8:9]}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return this._getNationalPrefixIsOptionalWhenFormatting(this.metadata)||this._getNationalPrefixIsOptionalWhenFormatting(this.getDefaultCountryMetadataForRegion())}},{key:"leadingDigits",value:function(){return this.metadata[this.v1?8:this.v2?9:10]}},{key:"types",value:function(){return this.metadata[this.v1?9:this.v2?10:11]}},{key:"hasTypes",value:function(){return this.types()&&this.types().length===0?!1:!!this.types()}},{key:"type",value:function(n){if(this.hasTypes()&&Rd(this.types(),n))return new yy(Rd(this.types(),n),this)}},{key:"ext",value:function(){return this.v1||this.v2?Vd:this.metadata[13]||Vd}}]),t}(),my=function(){function t(e,n){qo(this,t),this._format=e,this.metadata=n}return Xo(t,[{key:"pattern",value:function(){return this._format[0]}},{key:"format",value:function(){return this._format[1]}},{key:"leadingDigitsPatterns",value:function(){return this._format[2]||[]}},{key:"nationalPrefixFormattingRule",value:function(){return this._format[3]||this.metadata.nationalPrefixFormattingRule()}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return!!this._format[4]||this.metadata.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"nationalPrefixIsMandatoryWhenFormattingInNationalFormat",value:function(){return this.usesNationalPrefix()&&!this.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"usesNationalPrefix",value:function(){return!!(this.nationalPrefixFormattingRule()&&!gy.test(this.nationalPrefixFormattingRule()))}},{key:"internationalFormat",value:function(){return this._format[5]||this.format()}}]),t}(),gy=/^\(?\$1\)?$/,yy=function(){function t(e,n){qo(this,t),this.type=e,this.metadata=n}return Xo(t,[{key:"pattern",value:function(){return this.metadata.v1?this.type:this.type[0]}},{key:"possibleLengths",value:function(){if(!this.metadata.v1)return this.type[1]||this.metadata.possibleLengths()}}]),t}();function Rd(t,e){switch(e){case"FIXED_LINE":return t[0];case"MOBILE":return t[1];case"TOLL_FREE":return t[2];case"PREMIUM_RATE":return t[3];case"PERSONAL_NUMBER":return t[4];case"VOICEMAIL":return t[5];case"UAN":return t[6];case"PAGER":return t[7];case"VOIP":return t[8];case"SHARED_COST":return t[9]}}function by(t){if(!t)throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");if(!Go(t)||!Go(t.countries))throw new Error("[libphonenumber-js] `metadata` argument was passed but it's not a valid metadata. Must be an object having `.countries` child object property. Got ".concat(Go(t)?"an object of shape: { "+Object.keys(t).join(", ")+" }":"a "+$y(t)+": "+t,"."))}var $y=function(e){return Ds(e)};function Ko(t,e){if(e=new Ce(e),e.hasCountry(t))return e.country(t).countryCallingCode();throw new Error("Unknown country: ".concat(t))}function _y(t,e){return e.countries.hasOwnProperty(t)}function Fd(t){var e=t.version;typeof e=="number"?(this.v1=e===1,this.v2=e===2,this.v3=e===3,this.v4=e===4):e?Ed(e,fy)===-1?this.v2=!0:Ed(e,hy)===-1?this.v3=!0:this.v4=!0:this.v1=!0}var wy=";ext=",nn=function(e){return"([".concat(ze,"]{1,").concat(e,"})")};function Nd(t){var e="20",n="15",o="9",i="6",r="[  \\t,]*",l="[:\\..]?[  \\t,-]*",a="#?",d="(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)",c="(?:[xx##~~]|int|int)",u="[- ]+",f="[  \\t]*",h="(?:,{2}|;)",p=wy+nn(e),m=r+d+l+nn(e)+a,g=r+c+l+nn(o)+a,y=u+nn(i)+"#",b=f+h+l+nn(n)+a,$=f+"(?:,)+"+l+nn(o)+a;return p+"|"+m+"|"+g+"|"+y+"|"+b+"|"+$}var Cy="["+ze+"]{"+vs+"}",xy="["+Ms+"]{0,1}(?:["+Uo+"]*["+ze+"]){3,}["+Uo+ze+"]*",ky=new RegExp("^["+Ms+"]{0,1}(?:["+Uo+"]*["+ze+"]){1,2}$","i"),Sy=xy+"(?:"+Nd()+")?",vy=new RegExp("^"+Cy+"$|^"+Sy+"$","i");function My(t){return t.length>=vs&&vy.test(t)}function Dy(t){return ky.test(t)}var Ad=new RegExp("(?:"+Nd()+")$","i");function Ey(t){var e=t.search(Ad);if(e<0)return{};for(var n=t.slice(0,e),o=t.match(Ad),i=1;i<o.length;){if(o[i])return{number:n,ext:o[i]};i++}}var By={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","0":"0","1":"1","2":"2","3":"3","4":"4","5":"5","6":"6","7":"7","8":"8","9":"9","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9"};function Vy(t){return By[t]}function Py(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=Ry(t))||e&&t&&typeof t.length=="number"){n&&(t=n);var o=0;return function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
28
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ry(t,e){if(t){if(typeof t=="string")return Od(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Od(t,e)}}function Od(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function Id(t){for(var e="",n=Py(t.split("")),o;!(o=n()).done;){var i=o.value;e+=Fy(i,e)||""}return e}function Fy(t,e,n){if(t==="+"){if(e){typeof n=="function"&&n("end");return}return"+"}return Vy(t)}function Ny(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=Ay(t))||e&&t&&typeof t.length=="number"){n&&(t=n);var o=0;return function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
29
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ay(t,e){if(t){if(typeof t=="string")return Td(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Td(t,e)}}function Td(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function Oy(t,e){for(var n=t.slice(),o=Ny(e),i;!(i=o()).done;){var r=i.value;t.indexOf(r)<0&&n.push(r)}return n.sort(function(l,a){return l-a})}function Es(t,e){return Ld(t,void 0,e)}function Ld(t,e,n){var o=n.type(e),i=o&&o.possibleLengths()||n.possibleLengths();if(!i)return"IS_POSSIBLE";if(e==="FIXED_LINE_OR_MOBILE"){if(!n.type("FIXED_LINE"))return Ld(t,"MOBILE",n);var r=n.type("MOBILE");r&&(i=Oy(i,r.possibleLengths()))}else if(e&&!o)return"INVALID_LENGTH";var l=t.length,a=i[0];return a===l?"IS_POSSIBLE":a>l?"TOO_SHORT":i[i.length-1]<l?"TOO_LONG":i.indexOf(l,1)>=0?"IS_POSSIBLE":"INVALID_LENGTH"}function Iy(t,e,n){if(e===void 0&&(e={}),n=new Ce(n),e.v2){if(!t.countryCallingCode)throw new Error("Invalid phone number object passed");n.selectNumberingPlan(t.countryCallingCode)}else{if(!t.phone)return!1;if(t.country){if(!n.hasCountry(t.country))throw new Error("Unknown country: ".concat(t.country));n.country(t.country)}else{if(!t.countryCallingCode)throw new Error("Invalid phone number object passed");n.selectNumberingPlan(t.countryCallingCode)}}if(n.possibleLengths())return zd(t.phone||t.nationalNumber,n);if(t.countryCallingCode&&n.isNonGeographicCallingCode(t.countryCallingCode))return!0;throw new Error('Missing "possibleLengths" in metadata. Perhaps the metadata has been generated before v1.0.18.')}function zd(t,e){switch(Es(t,e)){case"IS_POSSIBLE":return!0;default:return!1}}function dt(t,e){return t=t||"",new RegExp("^(?:"+e+")$").test(t)}function Ty(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=Ly(t))||e&&t&&typeof t.length=="number"){n&&(t=n);var o=0;return function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
30
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ly(t,e){if(t){if(typeof t=="string")return Hd(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Hd(t,e)}}function Hd(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}var zy=["MOBILE","PREMIUM_RATE","TOLL_FREE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL"];function Bs(t,e,n){if(e=e||{},!(!t.country&&!t.countryCallingCode)){n=new Ce(n),n.selectNumberingPlan(t.country,t.countryCallingCode);var o=e.v2?t.nationalNumber:t.phone;if(dt(o,n.nationalNumberPattern())){if(Vs(o,"FIXED_LINE",n))return n.type("MOBILE")&&n.type("MOBILE").pattern()===""||!n.type("MOBILE")||Vs(o,"MOBILE",n)?"FIXED_LINE_OR_MOBILE":"FIXED_LINE";for(var i=Ty(zy),r;!(r=i()).done;){var l=r.value;if(Vs(o,l,n))return l}}}}function Vs(t,e,n){return e=n.type(e),!e||!e.pattern()||e.possibleLengths()&&e.possibleLengths().indexOf(t.length)<0?!1:dt(t,e.pattern())}function Hy(t,e,n){if(e=e||{},n=new Ce(n),n.selectNumberingPlan(t.country,t.countryCallingCode),n.hasTypes())return Bs(t,e,n.metadata)!==void 0;var o=e.v2?t.nationalNumber:t.phone;return dt(o,n.nationalNumberPattern())}function jy(t,e,n){var o=new Ce(n),i=o.getCountryCodesForCallingCode(t);return i?i.filter(function(r){return Wy(e,r,n)}):[]}function Wy(t,e,n){var o=new Ce(n);return o.selectNumberingPlan(e),o.numberingPlan.possibleLengths().indexOf(t.length)>=0}function Yy(t){return t.replace(new RegExp("[".concat(Uo,"]+"),"g")," ").trim()}var Uy=/(\$\d)/;function Gy(t,e,n){var o=n.useInternationalFormat,i=n.withNationalPrefix;n.carrierCode,n.metadata;var r=t.replace(new RegExp(e.pattern()),o?e.internationalFormat():i&&e.nationalPrefixFormattingRule()?e.format().replace(Uy,e.nationalPrefixFormattingRule()):e.format());return o?Yy(r):r}var qy=/^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;function Xy(t,e,n){var o=new Ce(n);if(o.selectNumberingPlan(t,e),o.defaultIDDPrefix())return o.defaultIDDPrefix();if(qy.test(o.IDDPrefix()))return o.IDDPrefix()}function Ky(t){var e=t.number,n=t.ext;if(!e)return"";if(e[0]!=="+")throw new Error('"formatRFC3966()" expects "number" to be in E.164 format.');return"tel:".concat(e).concat(n?";ext="+n:"")}function Zy(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=Jy(t))||e&&t&&typeof t.length=="number"){n&&(t=n);var o=0;return function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
31
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Jy(t,e){if(t){if(typeof t=="string")return jd(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return jd(t,e)}}function jd(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function Wd(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,o)}return n}function Yd(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Wd(Object(n),!0).forEach(function(o){Qy(t,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Wd(Object(n)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(n,o))})}return t}function Qy(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Ud={formatExtension:function(e,n,o){return"".concat(e).concat(o.ext()).concat(n)}};function eb(t,e,n,o){if(n?n=Yd(Yd({},Ud),n):n=Ud,o=new Ce(o),t.country&&t.country!=="001"){if(!o.hasCountry(t.country))throw new Error("Unknown country: ".concat(t.country));o.country(t.country)}else if(t.countryCallingCode)o.selectNumberingPlan(t.countryCallingCode);else return t.phone||"";var i=o.countryCallingCode(),r=n.v2?t.nationalNumber:t.phone,l;switch(e){case"NATIONAL":return r?(l=Zo(r,t.carrierCode,"NATIONAL",o,n),Ps(l,t.ext,o,n.formatExtension)):"";case"INTERNATIONAL":return r?(l=Zo(r,null,"INTERNATIONAL",o,n),l="+".concat(i," ").concat(l),Ps(l,t.ext,o,n.formatExtension)):"+".concat(i);case"E.164":return"+".concat(i).concat(r);case"RFC3966":return Ky({number:"+".concat(i).concat(r),ext:t.ext});case"IDD":if(!n.fromCountry)return;var a=nb(r,t.carrierCode,i,n.fromCountry,o);return Ps(a,t.ext,o,n.formatExtension);default:throw new Error('Unknown "format" argument passed to "formatNumber()": "'.concat(e,'"'))}}function Zo(t,e,n,o,i){var r=tb(o.formats(),t);return r?Gy(t,r,{useInternationalFormat:n==="INTERNATIONAL",withNationalPrefix:!(r.nationalPrefixIsOptionalWhenFormattingInNationalFormat()&&i&&i.nationalPrefix===!1),carrierCode:e,metadata:o}):t}function tb(t,e){for(var n=Zy(t),o;!(o=n()).done;){var i=o.value;if(i.leadingDigitsPatterns().length>0){var r=i.leadingDigitsPatterns()[i.leadingDigitsPatterns().length-1];if(e.search(r)!==0)continue}if(dt(e,i.pattern()))return i}}function Ps(t,e,n,o){return e?o(t,e,n):t}function nb(t,e,n,o,i){var r=Ko(o,i.metadata);if(r===n){var l=Zo(t,e,"NATIONAL",i);return n==="1"?n+" "+l:l}var a=Xy(o,void 0,i.metadata);if(a)return"".concat(a," ").concat(n," ").concat(Zo(t,null,"INTERNATIONAL",i))}function Gd(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,o)}return n}function qd(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Gd(Object(n),!0).forEach(function(o){ob(t,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Gd(Object(n)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(n,o))})}return t}function ob(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ib(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Xd(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function sb(t,e,n){return e&&Xd(t.prototype,e),n&&Xd(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}var rb=function(){function t(e,n,o){if(ib(this,t),!e)throw new TypeError("`country` or `countryCallingCode` not passed");if(!n)throw new TypeError("`nationalNumber` not passed");if(!o)throw new TypeError("`metadata` not passed");var i=ab(e,o),r=i.country,l=i.countryCallingCode;this.country=r,this.countryCallingCode=l,this.nationalNumber=n,this.number="+"+this.countryCallingCode+this.nationalNumber,this.getMetadata=function(){return o}}return sb(t,[{key:"setExt",value:function(n){this.ext=n}},{key:"getPossibleCountries",value:function(){return this.country?[this.country]:jy(this.countryCallingCode,this.nationalNumber,this.getMetadata())}},{key:"isPossible",value:function(){return Iy(this,{v2:!0},this.getMetadata())}},{key:"isValid",value:function(){return Hy(this,{v2:!0},this.getMetadata())}},{key:"isNonGeographic",value:function(){var n=new Ce(this.getMetadata());return n.isNonGeographicCallingCode(this.countryCallingCode)}},{key:"isEqual",value:function(n){return this.number===n.number&&this.ext===n.ext}},{key:"getType",value:function(){return Bs(this,{v2:!0},this.getMetadata())}},{key:"format",value:function(n,o){return eb(this,n,o?qd(qd({},o),{},{v2:!0}):{v2:!0},this.getMetadata())}},{key:"formatNational",value:function(n){return this.format("NATIONAL",n)}},{key:"formatInternational",value:function(n){return this.format("INTERNATIONAL",n)}},{key:"getURI",value:function(n){return this.format("RFC3966",n)}}]),t}(),lb=function(e){return/^[A-Z]{2}$/.test(e)};function ab(t,e){var n,o,i=new Ce(e);return lb(t)?(n=t,i.selectNumberingPlan(n),o=i.countryCallingCode()):o=t,{country:n,countryCallingCode:o}}var db=new RegExp("(["+ze+"])");function cb(t,e,n,o){if(e){var i=new Ce(o);i.selectNumberingPlan(e,n);var r=new RegExp(i.IDDPrefix());if(t.search(r)===0){t=t.slice(t.match(r)[0].length);var l=t.match(db);if(!(l&&l[1]!=null&&l[1].length>0&&l[1]==="0"))return t}}}function ub(t,e){if(t&&e.numberingPlan.nationalPrefixForParsing()){var n=new RegExp("^(?:"+e.numberingPlan.nationalPrefixForParsing()+")"),o=n.exec(t);if(o){var i,r,l=o.length-1,a=l>0&&o[l];if(e.nationalPrefixTransformRule()&&a)i=t.replace(n,e.nationalPrefixTransformRule()),l>1&&(r=o[1]);else{var d=o[0];i=t.slice(d.length),a&&(r=o[1])}var c;if(a){var u=t.indexOf(o[1]),f=t.slice(0,u);f===e.numberingPlan.nationalPrefix()&&(c=e.numberingPlan.nationalPrefix())}else c=o[0];return{nationalNumber:i,nationalPrefix:c,carrierCode:r}}}return{nationalNumber:t}}function Rs(t,e){var n=ub(t,e),o=n.carrierCode,i=n.nationalNumber;if(i!==t){if(!fb(t,i,e))return{nationalNumber:t};if(e.possibleLengths()&&!hb(i,e))return{nationalNumber:t}}return{nationalNumber:i,carrierCode:o}}function fb(t,e,n){return!(dt(t,n.nationalNumberPattern())&&!dt(e,n.nationalNumberPattern()))}function hb(t,e){switch(Es(t,e)){case"TOO_SHORT":case"INVALID_LENGTH":return!1;default:return!0}}function pb(t,e,n,o){var i=e?Ko(e,o):n;if(t.indexOf(i)===0){o=new Ce(o),o.selectNumberingPlan(e,n);var r=t.slice(i.length),l=Rs(r,o),a=l.nationalNumber,d=Rs(t,o),c=d.nationalNumber;if(!dt(c,o.nationalNumberPattern())&&dt(a,o.nationalNumberPattern())||Es(c,o)==="TOO_LONG")return{countryCallingCode:i,number:r}}return{number:t}}function mb(t,e,n,o){if(!t)return{};var i;if(t[0]!=="+"){var r=cb(t,e,n,o);if(r&&r!==t)i=!0,t="+"+r;else{if(e||n){var l=pb(t,e,n,o),a=l.countryCallingCode,d=l.number;if(a)return{countryCallingCodeSource:"FROM_NUMBER_WITHOUT_PLUS_SIGN",countryCallingCode:a,number:d}}return{number:t}}}if(t[1]==="0")return{};o=new Ce(o);for(var c=2;c-1<=iy&&c<=t.length;){var u=t.slice(1,c);if(o.hasCallingCode(u))return o.selectNumberingPlan(u),{countryCallingCodeSource:i?"FROM_NUMBER_WITH_IDD":"FROM_NUMBER_WITH_PLUS_SIGN",countryCallingCode:u,number:t.slice(c)};c++}return{}}function gb(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=yb(t))||e&&t&&typeof t.length=="number"){n&&(t=n);var o=0;return function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
32
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yb(t,e){if(t){if(typeof t=="string")return Kd(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Kd(t,e)}}function Kd(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function bb(t,e){var n=e.countries,o=e.defaultCountry,i=e.metadata;i=new Ce(i);for(var r=[],l=gb(n),a;!(a=l()).done;){var d=a.value;if(i.country(d),i.leadingDigits()){if(t&&t.search(i.leadingDigits())===0)return d}else if(Bs({phone:t,country:d},void 0,i.metadata))if(o){if(d===o)return d;r.push(d)}else return d}if(r.length>0)return r[0]}var $b=!1;function _b(t,e){var n=e.nationalNumber,o=e.defaultCountry,i=e.metadata;if($b&&i.isNonGeographicCallingCode(t))return"001";var r=i.getCountryCodesForCallingCode(t);if(r)return r.length===1?r[0]:bb(n,{countries:r,defaultCountry:o,metadata:i.metadata})}var Zd="+",wb="[\\-\\.\\(\\)]?",Jd="(["+ze+"]|"+wb+")",Cb="^\\"+Zd+Jd+"*["+ze+"]"+Jd+"*$",xb=new RegExp(Cb,"g"),Fs=ze,kb="["+Fs+"]+((\\-)*["+Fs+"])*",Sb="a-zA-Z",vb="["+Sb+"]+((\\-)*["+Fs+"])*",Mb="^("+kb+"\\.)*"+vb+"\\.?$",Db=new RegExp(Mb,"g"),Qd="tel:",Ns=";phone-context=",Eb=";isub=";function Bb(t){var e=t.indexOf(Ns);if(e<0)return null;var n=e+Ns.length;if(n>=t.length)return"";var o=t.indexOf(";",n);return o>=0?t.substring(n,o):t.substring(n)}function Vb(t){return t===null?!0:t.length===0?!1:xb.test(t)||Db.test(t)}function Pb(t,e){var n=e.extractFormattedPhoneNumber,o=Bb(t);if(!Vb(o))throw new at("NOT_A_NUMBER");var i;if(o===null)i=n(t)||"";else{i="",o.charAt(0)===Zd&&(i+=o);var r=t.indexOf(Qd),l;r>=0?l=r+Qd.length:l=0;var a=t.indexOf(Ns);i+=t.substring(l,a)}var d=i.indexOf(Eb);if(d>0&&(i=i.substring(0,d)),i!=="")return i}var Rb=250,Fb=new RegExp("["+Ms+ze+"]"),Nb=new RegExp("[^"+ze+"#]+$");function Ab(t,e,n){if(e=e||{},n=new Ce(n),e.defaultCountry&&!n.hasCountry(e.defaultCountry))throw e.v2?new at("INVALID_COUNTRY"):new Error("Unknown country: ".concat(e.defaultCountry));var o=Ib(t,e.v2,e.extract),i=o.number,r=o.ext,l=o.error;if(!i){if(e.v2)throw l==="TOO_SHORT"?new at("TOO_SHORT"):new at("NOT_A_NUMBER");return{}}var a=Lb(i,e.defaultCountry,e.defaultCallingCode,n),d=a.country,c=a.nationalNumber,u=a.countryCallingCode,f=a.countryCallingCodeSource,h=a.carrierCode;if(!n.hasSelectedNumberingPlan()){if(e.v2)throw new at("INVALID_COUNTRY");return{}}if(!c||c.length<vs){if(e.v2)throw new at("TOO_SHORT");return{}}if(c.length>oy){if(e.v2)throw new at("TOO_LONG");return{}}if(e.v2){var p=new rb(u,c,n.metadata);return d&&(p.country=d),h&&(p.carrierCode=h),r&&(p.ext=r),p.__countryCallingCodeSource=f,p}var m=(e.extended?n.hasSelectedNumberingPlan():d)?dt(c,n.nationalNumberPattern()):!1;return e.extended?{country:d,countryCallingCode:u,carrierCode:h,valid:m,possible:m?!0:!!(e.extended===!0&&n.possibleLengths()&&zd(c,n)),phone:c,ext:r}:m?Tb(d,c,r):{}}function Ob(t,e,n){if(t){if(t.length>Rb){if(n)throw new at("TOO_LONG");return}if(e===!1)return t;var o=t.search(Fb);if(!(o<0))return t.slice(o).replace(Nb,"")}}function Ib(t,e,n){var o=Pb(t,{extractFormattedPhoneNumber:function(l){return Ob(l,n,e)}});if(!o)return{};if(!My(o))return Dy(o)?{error:"TOO_SHORT"}:{};var i=Ey(o);return i.ext?i:{number:o}}function Tb(t,e,n){var o={country:t,phone:e};return n&&(o.ext=n),o}function Lb(t,e,n,o){var i=mb(Id(t),e,n,o.metadata),r=i.countryCallingCodeSource,l=i.countryCallingCode,a=i.number,d;if(l)o.selectNumberingPlan(l);else if(a&&(e||n))o.selectNumberingPlan(e,n),e&&(d=e),l=n||Ko(e,o.metadata);else return{};if(!a)return{countryCallingCodeSource:r,countryCallingCode:l};var c=Rs(Id(a),o),u=c.nationalNumber,f=c.carrierCode,h=_b(l,{nationalNumber:u,defaultCountry:e,metadata:o});return h&&(d=h,h==="001"||o.country(d)),{country:d,countryCallingCode:l,countryCallingCodeSource:r,nationalNumber:u,carrierCode:f}}function ec(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,o)}return n}function tc(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ec(Object(n),!0).forEach(function(o){zb(t,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ec(Object(n)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(n,o))})}return t}function zb(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Hb(t,e,n){return Ab(t,tc(tc({},e),{},{v2:!0}),n)}function nc(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,o)}return n}function jb(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?nc(Object(n),!0).forEach(function(o){Wb(t,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):nc(Object(n)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(n,o))})}return t}function Wb(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Yb(t,e){return Xb(t)||qb(t,e)||Gb(t,e)||Ub()}function Ub(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
33
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Gb(t,e){if(t){if(typeof t=="string")return oc(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return oc(t,e)}}function oc(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function qb(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var o=[],i=!0,r=!1,l,a;try{for(n=n.call(t);!(i=(l=n.next()).done)&&(o.push(l.value),!(e&&o.length===e));i=!0);}catch(d){r=!0,a=d}finally{try{!i&&n.return!=null&&n.return()}finally{if(r)throw a}}return o}}function Xb(t){if(Array.isArray(t))return t}function Kb(t){var e=Array.prototype.slice.call(t),n=Yb(e,4),o=n[0],i=n[1],r=n[2],l=n[3],a,d,c;if(typeof o=="string")a=o;else throw new TypeError("A text for parsing must be a string.");if(!i||typeof i=="string")l?(d=r,c=l):(d=void 0,c=r),i&&(d=jb({defaultCountry:i},d));else if(Go(i))r?(d=i,c=r):c=i;else throw new Error("Invalid second argument: ".concat(i));return{text:a,options:d,metadata:c}}function ic(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,o)}return n}function sc(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ic(Object(n),!0).forEach(function(o){Zb(t,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ic(Object(n)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(n,o))})}return t}function Zb(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Jb(t,e,n){e&&e.defaultCountry&&!_y(e.defaultCountry,n)&&(e=sc(sc({},e),{},{defaultCountry:void 0}));try{return Hb(t,e,n)}catch(o){if(!(o instanceof at))throw o}}function Qb(){var t=Kb(arguments),e=t.text,n=t.options,o=t.metadata;return Jb(e,n,o)}function As(){return Sd(Qb,arguments)}function e$(){return Sd(Ko,arguments)}const t$=["value","inputMode","type","placeholder","minlength","maxlength","disabled","readOnly"],Os=s.defineComponent({__name:"FmTextField",props:{placeholder:{default:""},minLength:{default:0},maxLength:{default:NaN},inputmode:{default:"text"},readonly:{type:Boolean,default:!1},labelMark:{default:"none"},prependIcon:{default:""},appendIcon:{default:""},showValidBorder:{type:Boolean,default:!1},labelInfo:{default:""},showWordCount:{type:Boolean,default:!1},invalid:{type:Boolean},modelValue:{},label:{default:""},disabled:{type:Boolean,default:!1},focused:{type:Boolean},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue","focus-changed"],setup(t,{expose:e,emit:n}){const o=t,i=n,r=s.ref(null),l=Z(o,"modelValue"),{isFocused:a,focus:d,blur:c}=jn(),u=f=>{l.value=f.target.value};return e({focus:d}),(f,h)=>(s.openBlock(),s.createBlock(Ve,{modelValue:s.unref(l),"onUpdate:modelValue":h[2]||(h[2]=p=>s.isRef(l)?l.value=p:null),label:f.label,disabled:f.disabled,required:f.labelMark==="required",optional:f.labelMark==="optional",info:f.labelInfo,rules:f.rules,focused:s.unref(a),"helper-text":f.helperText,"helper-state":f.helperState},s.createSlots({default:s.withCtx(({invalid:p})=>[s.createVNode(ge,{class:"cursor-text","append-icon":f.appendIcon,"prepend-icon":f.prependIcon,focused:s.unref(a),invalid:f.invalid||p,"show-valid-border":f.showValidBorder},{prepend:s.withCtx(()=>[s.renderSlot(f.$slots,"prepend")]),append:s.withCtx(()=>[s.renderSlot(f.$slots,"append")]),default:s.withCtx(()=>[s.createElementVNode("input",{ref_key:"inputEl",ref:r,class:s.normalizeClass({"fm-text-field--input fm-typo-body-lg-400":!0,"text-fm-color-typo-primary":!f.disabled,"text-fm-color-typo-disabled":f.disabled}),value:s.unref(l),inputMode:f.inputmode,type:f.inputmode,placeholder:f.placeholder,minlength:f.minLength,maxlength:f.maxLength,disabled:f.disabled,readOnly:f.readonly,onInput:u,onFocus:h[0]||(h[0]=()=>{s.unref(d)(),i("focus-changed",!0)}),onBlur:h[1]||(h[1]=()=>{s.unref(c)(),i("focus-changed",!1)})},null,42,t$)]),_:2},1032,["append-icon","prepend-icon","focused","invalid","show-valid-border"])]),_:2},[f.label||f.$slots.label?{name:"label",fn:s.withCtx(()=>[s.renderSlot(f.$slots,"label")]),key:"0"}:void 0,f.helperText||f.$slots["helper-text"]?{name:"helper-text",fn:s.withCtx(()=>[s.renderSlot(f.$slots,"helper-text")]),key:"1"}:void 0,f.showWordCount?{name:"helper-append",fn:s.withCtx(()=>[s.createElementVNode("div",{class:s.normalizeClass([f.disabled?"fm-color-typo-disabled":"text-fm-color-typo-secondary","fm-typo-body-sm-400"])},s.toDisplayString(f.maxLength?`${s.unref(l).length} / ${f.maxLength}`:""),3)]),key:"2"}:void 0]),1032,["modelValue","label","disabled","required","optional","info","rules","focused","helper-text","helper-state"]))}}),n$="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-my'%20viewBox='0%200%20640%20480'%3e%3cg%20clip-path='url(%23my-a)'%3e%3cpath%20fill='%23C00'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23C00'%20d='M0%200h640v34.3H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%2034.3h640v34.3H0z'/%3e%3cpath%20fill='%23C00'%20d='M0%2068.6h640v34.3H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20102.9h640V137H0z'/%3e%3cpath%20fill='%23C00'%20d='M0%20137.1h640v34.3H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20171.4h640v34.3H0z'/%3e%3cpath%20fill='%23C00'%20d='M0%20205.7h640V240H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20240h640v34.3H0z'/%3e%3cpath%20fill='%23C00'%20d='M0%20274.3h640v34.3H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20308.6h640v34.3H0z'/%3e%3cpath%20fill='%23C00'%20d='M0%20342.9h640V377H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20377.1h640v34.3H0z'/%3e%3cpath%20fill='%23C00'%20d='M0%20411.4h640v34.3H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20445.7h640V480H0z'/%3e%3cpath%20fill='%23006'%20d='M0%20.5h320v274.3H0z'/%3e%3cpath%20fill='%23FC0'%20d='m207.5%2073.8%206%2040.7%2023-34-12.4%2039.2%2035.5-20.8-28.1%2030%2041-3.2-38.3%2014.8%2038.3%2014.8-41-3.2%2028.1%2030-35.5-20.8%2012.3%2039.3-23-34.1-6%2040.7-5.9-40.7-23%2034%2012.4-39.2-35.5%2020.8%2028-30-41%203.2%2038.4-14.8-38.3-14.8%2041%203.2-28.1-30%2035.5%2020.8-12.4-39.3%2023%2034.1zm-33.3%201.7a71.1%2071.1%200%200%200-100%2065%2071.1%2071.1%200%200%200%20100%2065%2080%2080%200%200%201-83.2%206.2%2080%2080%200%200%201-43.4-71.2%2080%2080%200%200%201%20126.6-65'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='my-a'%3e%3cpath%20fill='%23fff'%20d='M0%200h640v480H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",o$="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-sg'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cclipPath%20id='sg-a'%3e%3cpath%20fill-opacity='.7'%20d='M0%200h640v480H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20clip-path='url(%23sg-a)'%3e%3cpath%20fill='%23fff'%20d='M-20%200h720v480H-20z'/%3e%3cpath%20fill='%23df0000'%20d='M-20%200h720v240H-20z'/%3e%3cpath%20fill='%23fff'%20d='M146%2040.2a84.4%2084.4%200%200%200%20.8%20165.2%2086%2086%200%200%201-106.6-59%2086%2086%200%200%201%2059-106c16-4.6%2030.8-4.7%2046.9-.2z'/%3e%3cpath%20fill='%23fff'%20d='m133%20110%204.9%2015-13-9.2-12.8%209.4%204.7-15.2-12.8-9.3%2015.9-.2%205-15%205%2015h15.8zm17.5%2052%205%2015.1-13-9.2-12.9%209.3%204.8-15.1-12.8-9.4%2015.9-.1%204.9-15.1%205%2015h16zm58.5-.4%204.9%2015.2-13-9.3-12.8%209.3%204.7-15.1-12.8-9.3%2015.9-.2%205-15%205%2015h15.8zm17.4-51.6%204.9%2015.1-13-9.2-12.8%209.3%204.8-15.1-12.9-9.4%2016-.1%204.8-15.1%205%2015h16zm-46.3-34.3%205%2015.2-13-9.3-12.9%209.4%204.8-15.2-12.8-9.4%2015.8-.1%205-15.1%205%2015h16z'/%3e%3c/g%3e%3c/svg%3e",i$={class:"flex gap-4"},s$=["src","alt"],r$=["src","alt"],l$=s.defineComponent({__name:"FmPhoneNumber",props:{modelValue:{},defaultCountry:{default:"MY"},placeholder:{default:""},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:!1},focused:{type:Boolean},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=e,i=Z(n,"modelValue"),r=["MY","SG"],l=r.reduce((y,b)=>(y[b]=`+${e$(b)}`,y),{}),a=r.map(y=>({label:"",value:y}));function d(y){var b;return y?((b=Object.entries(l).find(([,$])=>y.startsWith($)))==null?void 0:b[0])??null:n.defaultCountry}const c=s.computed(()=>d(n.modelValue)),u=s.computed(()=>!c.value||!n.modelValue?l[n.defaultCountry]:n.modelValue),f=s.computed({get(){const y=As(u.value);return y?y.formatInternational().replace(l[c.value],"").trim():u.value.replace(l[c.value],"").trim()},set(y){const b=`${l[c.value]}${y}`,$=As(b);if(!$){i.value=b;return}i.value=$.formatInternational()}}),h=s.computed({get(){return c.value??n.defaultCountry},set(y){if(!c.value){o("update:modelValue",l[n.defaultCountry]);return}const $=l[c.value],w=l[y];i.value=u.value.replace($,w)}}),p=s.ref({dropdown:!1,textField:!1});function m(y){const b=c.value;if(!y.replace(l[b],"").trim().length)return!0;const w=As(i.value,b);return!w||!w.isValid()?"Invalid phone number":!0}const g={MY:n$,SG:o$};return(y,b)=>(s.openBlock(),s.createBlock(Ve,{modelValue:s.unref(i),"onUpdate:modelValue":b[4]||(b[4]=$=>s.isRef(i)?i.value=$:null),class:"flex gap-4",label:y.label,disabled:y.disabled,required:y.labelMark==="required",optional:y.labelMark==="optional",info:y.labelInfo,rules:[...y.rules,m],focused:p.value.dropdown||p.value.textField,"helper-text":y.helperText,"helper-state":y.helperState},s.createSlots({default:s.withCtx(({invalid:$})=>[s.createElementVNode("div",i$,[s.createVNode(Wo,{"model-value":h.value,"onUpdate:modelValue":b[0]||(b[0]=w=>h.value=w),items:s.unref(a),disabled:y.disabled,onDropdownChanged:b[1]||(b[1]=w=>p.value.dropdown=w)},{default:s.withCtx(()=>[s.createElementVNode("img",{class:"h-auto w-[20px]",src:g[h.value],alt:h.value},null,8,s$)]),"menu-wrapper":s.withCtx(({handleItemChange:w})=>[(s.openBlock(),s.createElementBlock(s.Fragment,null,s.renderList(r,S=>s.createVNode(Pe,{key:S,"model-value":h.value===S,"onUpdate:modelValue":x=>w(x,s.unref(a).find(V=>V.value===S))},{label:s.withCtx(()=>[s.createElementVNode("img",{class:"h-auto w-[20px]",src:g[S],alt:S},null,8,r$)]),_:2},1032,["model-value","onUpdate:modelValue"])),64))]),_:1},8,["model-value","items","disabled"]),s.createVNode(Os,{"model-value":f.value,"onUpdate:modelValue":b[2]||(b[2]=w=>f.value=w),inputmode:"tel",class:"flex-1",disabled:y.disabled,invalid:$,onFocusChanged:b[3]||(b[3]=w=>p.value.textField=w)},{prepend:s.withCtx(()=>[s.createElementVNode("span",{class:s.normalizeClass([y.disabled?"text-fm-color-typo-disabled":""])},"("+s.toDisplayString(s.unref(l)[c.value])+")",3)]),_:2},1032,["model-value","disabled","invalid"])])]),_:2},[y.label||y.$slots.label?{name:"label",fn:s.withCtx(()=>[s.renderSlot(y.$slots,"label")]),key:"0"}:void 0,y.helperText||y.$slots["helper-text"]?{name:"helper-text",fn:s.withCtx(()=>[s.renderSlot(y.$slots,"helper-text")]),key:"1"}:void 0]),1032,["modelValue","label","disabled","required","optional","info","rules","focused","helper-text","helper-state"]))}}),a$={class:"flex gap-8 items-center"},d$=["onInput","onKeydown"],c$=K(s.defineComponent({__name:"FmPinField",props:{modelValue:{default:()=>[]},length:{default:6},type:{default:"number"}},emits:["update:modelValue","complete"],setup(t,{emit:e}){const n=e,o=t,i=Z(o,"modelValue"),r=s.ref([]),l=(f,h)=>{const p=f.target;if(o.type==="number"&&!/^[0-9]$/g.test(p.value)){p.value="";return}p.value=p.value.slice(-1),c(p.value,h),r.value[h+1]?r.value[h+1].focus():r.value[h].blur()},a=(f,h)=>{f.preventDefault();const p=f.target;p.value="",c(null,h),r.value[h-1]?r.value[h-1].focus():r.value[h].focus()},d=(f,h)=>{f.preventDefault(),f.key==="ArrowLeft"&&(r.value[h-1]?r.value[h-1].focus():r.value[h].focus()),f.key==="ArrowRight"&&(r.value[h+1]?r.value[h+1].focus():r.value[h].focus())},c=(f,h)=>{i.value=i.value.toSpliced(h,1,f)},u=(f,h)=>{r.value[h]=f};return s.onMounted(()=>{i.value=Array.from(Array(o.length).fill(null))}),s.watch(()=>i.value,()=>{i.value.every(f=>f!==null)&&n("complete",i.value.join(""))}),(f,h)=>(s.openBlock(),s.createElementBlock("div",a$,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(f.length,(p,m)=>(s.openBlock(),s.createElementBlock("input",{key:p,ref_for:!0,ref:g=>u(g,m),class:s.normalizeClass(["fm-pin-field",{"fm-pin-field--populated":s.unref(i)[m]!==null}]),type:"text",onInput:g=>l(g,m),onKeydown:[s.withKeys(g=>a(g,m),["backspace"]),s.withKeys(g=>d(g,m),["arrow-left","arrow-right"])]},null,42,d$))),128))]))}}),[["__scopeId","data-v-45a53bf7"]]),u$={class:"fm-radio-btn"},f$={class:"fm-radio-btn__input--container"},h$=["checked","disabled","value"],p$={class:"py-8"},m$={class:"fm-typo-body-lg-400"},g$={key:0,class:"fm-typo-body-md-400 text-fm-color-typo-secondary"},y$=K(s.defineComponent({__name:"FmRadio",props:{modelValue:{default:null},value:{},label:{default:""},sublabel:{default:""},disabled:{type:Boolean,default:void 0}},emits:["update:modelValue"],setup(t){const e=t,n=Z(e,"modelValue"),o=s.ref(),i=s.inject(br,null),r=()=>{l.value||(i?i.updateValue(e.value):n.value=e.value)},l=s.computed(()=>(console.log(`${e.label} isDisabled: ${e.disabled}`),console.log(`${e.label} disabled from provider: ${i==null?void 0:i.getDisabled()}`),console.log("-----------------------------------"),$g(e.disabled)?e.disabled:i?i.getDisabled():!1)),a=s.computed(()=>i?e.value===i.groupValue.value:n.value===e.value);return(d,c)=>{const u=s.resolveDirective("wave");return s.openBlock(),s.createElementBlock("div",u$,[s.createElementVNode("label",{class:s.normalizeClass({"fm-radio-btn--wrapper":!0,"cursor-not-allowed text-fm-color-typo-disabled":l.value,"cursor-pointer":!l.value}),onClick:r},[s.withDirectives((s.openBlock(),s.createElementBlock("div",f$,[s.createElementVNode("input",{ref_key:"inputEl",ref:o,checked:a.value,disabled:l.value,value:d.value,class:"fm-radio-btn__input--btn",type:"radio"},null,8,h$)])),[[u,!l.value]]),s.createElementVNode("div",p$,[s.renderSlot(d.$slots,"label",{},()=>[s.createElementVNode("div",m$,s.toDisplayString(d.label),1),d.sublabel?(s.openBlock(),s.createElementBlock("div",g$,s.toDisplayString(d.sublabel),1)):s.createCommentVNode("",!0)],!0)])],2)])}}}),[["__scopeId","data-v-67a13ac9"]]),b$=s.defineComponent({__name:"FmRadioGroup",props:{modelValue:{},inline:{type:Boolean,default:!1},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},rules:{default:()=>[t=>!!t||"This field is required"]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=Z(e,"modelValue");return s.provide(br,{groupValue:n,getDisabled:()=>e.disabled,updateValue(o){n.value=o}}),(o,i)=>(s.openBlock(),s.createBlock(Ve,{modelValue:s.unref(n),"onUpdate:modelValue":i[0]||(i[0]=r=>s.isRef(n)?n.value=r:null),label:o.label,disabled:o.disabled,required:o.labelMark==="required",optional:o.labelMark==="optional",info:o.labelInfo,rules:o.rules,"helper-text":o.helperText,"helper-state":o.helperState},{label:s.withCtx(()=>[s.renderSlot(o.$slots,"label")]),default:s.withCtx(()=>[s.createElementVNode("div",{class:s.normalizeClass({"flex items-center gap-16 justify-start":o.inline})},[s.renderSlot(o.$slots,"default")],2)]),"helper-text":s.withCtx(()=>[s.renderSlot(o.$slots,"helper-text")]),_:3},8,["modelValue","label","disabled","required","optional","info","rules","helper-text","helper-state"]))}}),rc=s.defineComponent({__name:"FmSearch",props:{placeholder:{default:""},minLength:{default:0},maxLength:{default:NaN},inputmode:{default:"text"},readonly:{type:Boolean,default:!1},labelMark:{default:"none"},showSuccess:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},prependText:{default:""},appendText:{default:""},labelInfo:{default:""},showWordCount:{type:Boolean,default:!1},collapsible:{type:Boolean,default:!1},maxWidth:{default:void 0},modelValue:{},label:{default:""},disabled:{type:Boolean,default:!1},focused:{type:Boolean},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},setup(t){const e=t,n=s.computed(()=>{const{modelValue:u,...f}=e;return f}),o=Z(e,"modelValue"),i=s.ref(!1),r=s.ref(),l=s.ref(e.collapsible),a=s.ref(e.collapsible);function d(){var h;l.value=!1;const u=(h=r.value)==null?void 0:h.querySelector("input");if(!u)return;(Array.isArray(u.__vnode.ref)?u.__vnode.ref:[u.__vnode.ref]).forEach(p=>{var m,g,y;return(y=(g=(m=p==null?void 0:p.i)==null?void 0:m.exposed)==null?void 0:g.focus)==null?void 0:y.call(g)}),s.nextTick(()=>{u.focus()})}function c(u){if(i.value=u,!!e.collapsible){if(u){a.value=!1;return}l.value=o.value.length===0,l.value&&setTimeout(()=>{a.value=!0},250)}}return(u,f)=>(s.openBlock(),s.createElementBlock("div",{ref_key:"componentRoot",ref:r,class:"min-w-48 relative"},[s.createVNode(Os,s.mergeProps(n.value,{modelValue:s.unref(o),"onUpdate:modelValue":f[1]||(f[1]=h=>s.isRef(o)?o.value=h:null),disabled:e.disabled||u.collapsible&&l.value,class:["w-full transition-all",{"opacity-100":!u.collapsible||!l.value,"opacity-0 pointer-events-none":u.collapsible&&l.value}],style:{width:u.collapsible&&l.value?"24px":typeof u.maxWidth=="number"?`${u.maxWidth}px`:u.maxWidth},onFocusChanged:c}),s.createSlots({_:2},[i.value?void 0:{name:"prepend",fn:s.withCtx(()=>[s.createVNode(j,{name:"search"})]),key:"0"},s.unref(o).length?{name:"append",fn:s.withCtx(()=>[s.createVNode(j,{name:"close",class:"cursor-pointer text-fm-color-neutral-gray-300",onClick:f[0]||(f[0]=h=>o.value="")})]),key:"1"}:void 0]),1040,["modelValue","disabled","class","style"]),u.collapsible?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(["absolute top-0 right-0",l.value?"opacity-100":"opacity-0 pointer-events-none"]),style:s.normalizeStyle({transition:"opacity 150ms",transitionTimingFunction:l.value?"cubic-bezier(.95,-0.01,.82,.6)":"ease-out"})},[s.createVNode(J,{variant:"tertiary",icon:"search",onClick:d})],6)):s.createCommentVNode("",!0)],512))}}),$$={key:0,class:"flex fm-typo-title-sm-700 items-center justify-between text-fm-color-typo-primary"},_$={key:0},w$={class:"overflow-y-auto"},C$={key:1,class:"flex gap-8 items-center"},lc=K(s.defineComponent({__name:"FmTopSheet",props:{header:{default:""},modelValue:{type:Boolean,default:!1},dismissAway:{type:Boolean,default:!1},fullscreenSize:{default:void 0}},emits:["update:modelValue"],setup(t){const e=t,n=s.ref(null),o=Z(e,"modelValue"),i=r=>{e.dismissAway&&n.value&&r.target===n.value&&(o.value=!1)};return(r,l)=>(s.openBlock(),s.createElementBlock("div",null,[s.createElementVNode("div",{onClick:l[0]||(l[0]=a=>o.value=!0)},[s.renderSlot(r.$slots,"top-sheet-button",{},void 0,!0)]),(s.openBlock(),s.createBlock(s.Teleport,{to:"body"},[s.createVNode(s.Transition,null,{default:s.withCtx(()=>[s.unref(o)?(s.openBlock(),s.createElementBlock("div",{key:0,ref_key:"overlayRef",ref:n,class:"fm-top-sheet--container",onClick:l[1]||(l[1]=a=>i(a))},[s.createVNode(s.Transition,{name:r.fullscreenSize?`slide-${r.fullscreenSize}`:"slide",appear:""},{default:s.withCtx(()=>[s.createElementVNode("div",{class:s.normalizeClass(["fm-top-sheet",`fm-top-sheet--fullscreen-${r.fullscreenSize}`])},[r.header||r.$slots["top-sheet-header"]?(s.openBlock(),s.createElementBlock("div",$$,[s.renderSlot(r.$slots,"top-sheet-header",{},()=>[r.header?(s.openBlock(),s.createElementBlock("div",_$,s.toDisplayString(r.header),1)):s.createCommentVNode("",!0)],!0)])):s.createCommentVNode("",!0),s.createElementVNode("div",w$,[s.renderSlot(r.$slots,"default",{},void 0,!0)]),r.$slots["top-sheet-footer"]?(s.openBlock(),s.createElementBlock("div",C$,[s.renderSlot(r.$slots,"top-sheet-footer",{},void 0,!0)])):s.createCommentVNode("",!0)],2)]),_:3},8,["name"])],512)):s.createCommentVNode("",!0)]),_:3})]))]))}}),[["__scopeId","data-v-51e90de4"]]);var Is={exports:{}};function ac(t,e=100,n={}){if(typeof t!="function")throw new TypeError(`Expected the first parameter to be a function, got \`${typeof t}\`.`);if(e<0)throw new RangeError("`wait` must not be negative.");const{immediate:o}=typeof n=="boolean"?{immediate:n}:n;let i,r,l,a,d;function c(){const f=Date.now()-a;if(f<e&&f>=0)l=setTimeout(c,e-f);else if(l=void 0,!o){const h=i,p=r;i=void 0,r=void 0,d=t.apply(h,p)}}const u=function(...f){if(i&&this!==i)throw new Error("Debounced method called with different contexts.");i=this,r=f,a=Date.now();const h=o&&!l;if(l||(l=setTimeout(c,e)),h){const p=i,m=r;i=void 0,r=void 0,d=t.apply(p,m)}return d};return u.clear=()=>{l&&(clearTimeout(l),l=void 0)},u.flush=()=>{if(!l)return;const f=i,h=r;i=void 0,r=void 0,d=t.apply(f,h),clearTimeout(l),l=void 0},u}Is.exports.debounce=ac,Is.exports=ac;var x$=Is.exports;const dc=cs(x$);var cc={exports:{}};(function(t,e){(function(){var n={};t.exports=n,n.simpleFilter=function(o,i){return i.filter(function(r){return n.test(o,r)})},n.test=function(o,i){return n.match(o,i)!==null},n.match=function(o,i,r){r=r||{};var l=0,a=[],d=i.length,c=0,u=0,f=r.pre||"",h=r.post||"",p=r.caseSensitive&&i||i.toLowerCase(),m;o=r.caseSensitive&&o||o.toLowerCase();for(var g=0;g<d;g++)m=i[g],p[g]===o[l]?(m=f+m+h,l+=1,u+=1+u):u=0,c+=u,a[a.length]=m;return l===o.length?(c=p===o?1/0:c,{rendered:a.join(""),score:c}):null},n.filter=function(o,i,r){return!i||i.length===0?[]:typeof o!="string"?i:(r=r||{},i.reduce(function(l,a,d,c){var u=a;r.extract&&(u=r.extract(a));var f=n.match(o,u,r);return f!=null&&(l[l.length]={string:f.rendered,score:f.score,index:d,original:a}),l},[]).sort(function(l,a){var d=a.score-l.score;return d||l.index-a.index}))}})()})(cc);var k$=cc.exports;const S$=cs(k$);function Jo(t,e){const[n]=S$.filter(t.toLocaleLowerCase(),[e],{pre:"|",post:"|",extract(i){return i.toLocaleLowerCase()}});if(!n)return{label:e,segments:[{segment:e,isMatch:!1}],matched:!1};const o=n.string.toString().replace(/\|\|/g,"").split("|").reduce((i,r,l)=>(i.push({segment:r,isMatch:l%2!==0}),i),new Array);return{label:e,segments:o,matched:!0}}const v$={class:"flex flex-col gap-4"},M$={class:"bg-white flex gap-4 px-24 py-8 sticky top-0"},D$={class:"hidden sm:inline xs:inline"},E$={key:0},B$={key:0,class:"flex flex-col"},V$={class:"flex flex-col"},P$={class:"flex items-center px-24 py-12"},R$=s.createElementVNode("div",{class:"fm-typo-body-md-400 text-fm-color-typo-secondary"}," Recent search ",-1),F$=s.createElementVNode("div",{class:"py-4"},[s.createElementVNode("hr",{class:"border-fm-color-neutral-gray-100"})],-1),N$=["onClick"],A$={class:"fm-typo-body-lg-400 text-fm-color-typo-primary"},O$={class:"fm-typo-body-lg-400 px-24 py-12 text-center text-fm-color-primary"},I$={class:"fm-typo-body-lg-400 px-24 py-12 text-center text-fm-color-typo-secondary"},T$={key:3,class:"flex flex-col"},L$=["onClick"],z$={class:"flex flex-col gap-4"},H$={key:0,class:"text-fm-color-typo-secondary"},j$={class:"px-16 py-4"},W$=5,Y$=s.defineComponent({__name:"FmGlobalSearch",props:{show:{type:Boolean,default:!1},modelValue:{default:""},suggestions:{default:void 0},onSearch:{type:Function,default:void 0},placeholder:{default:""},hintPlaceholder:{default:""},notFoundPlaceholder:{default:""},recentSearchKey:{default:""}},emits:["dismiss","submit","update:show","update:modelValue"],setup(t,{emit:e}){const n=t,o=e;function i(){if(!n.recentSearchKey)return;const N=n.recentSearchKey;localStorage.removeItem(N),a.value=[]}function r(){if(!n.recentSearchKey)return;const N=n.recentSearchKey,P=localStorage.getItem(N);if(!P)return[];try{return JSON.parse(P)}catch{return new Array}}const l=dc(function(P){if(!n.recentSearchKey)return;const C=n.recentSearchKey,_=P().trim();if(!C||!_)return;const E=r()??[],v=[...new Set([_,...E])].slice(0,W$),M=JSON.stringify(v);return localStorage.setItem(C,M),a.value=v,v},800),a=s.ref(r()),d=Z(n,"show");s.watch([()=>n.show],()=>{n.show?(f.value=null,n.suggestions&&$()):o("dismiss")});const c=Z(n,"modelValue"),u=s.ref(n.modelValue);s.watch([()=>u.value],()=>{S()});const f=s.ref(null),h=s.ref(!0),p=s.computed(()=>{var N;return h.value?(N=f.value)==null?void 0:N.slice(0,5):f.value});s.watch([()=>f.value],([])=>{h.value=!0});const m=s.computed(()=>f.value===null),g=s.ref(!1),y=s.ref(""),b=()=>u.value;async function $(){if(!d.value)return;const N=b();if(!N)return;const P=Math.random().toString();if(y.value=P,n.suggestions){f.value=n.suggestions.map(C=>({label:Jo(N,C.label),sublabel:C.sublabel?Jo(N,C.sublabel):null})).filter(C=>{var _;return C.label.matched||((_=C.sublabel)==null?void 0:_.matched)}),l(b);return}if(n.onSearch)try{g.value=!0;const C=await n.onSearch(N);P===y.value&&(f.value=C.map(_=>({label:Jo(N,_.label),sublabel:_.sublabel?Jo(N,_.sublabel):null})))}catch{P===y.value&&(f.value=[])}finally{P===y.value&&(g.value=!1,l(b))}}function w(N){d.value=!1,o("dismiss"),c.value=N}const S=dc($),x=s.computed(()=>a.value&&a.value.length===0),V=s.computed(()=>(!u.value||m.value)&&!x.value),D=s.computed(()=>(!u.value||m.value)&&x.value),F=s.computed(()=>u.value&&f.value&&f.value.length===0);return(N,P)=>(s.openBlock(),s.createBlock(lc,{"model-value":s.unref(d),"onUpdate:modelValue":P[4]||(P[4]=C=>s.isRef(d)?d.value=C:null),"fullscreen-size":"sm","dismiss-away":""},{default:s.withCtx(()=>{var C,_;return[s.createElementVNode("div",v$,[s.createElementVNode("div",M$,[s.createElementVNode("div",D$,[s.createVNode(J,{"prepend-icon":"arrow_back",variant:"tertiary",onClick:P[0]||(P[0]=E=>d.value=!1)})]),s.createVNode(rc,{"model-value":u.value,"onUpdate:modelValue":P[1]||(P[1]=E=>u.value=E),class:"flex-1",placeholder:N.placeholder},null,8,["model-value","placeholder"])]),g.value?(s.openBlock(),s.createElementBlock("div",E$,[s.createVNode(ln,{size:"xl"})])):(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[V.value?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[N.recentSearchKey&&((C=a.value)!=null&&C.length)?(s.openBlock(),s.createElementBlock("div",B$,[s.createElementVNode("div",V$,[s.createElementVNode("div",P$,[R$,s.createVNode(Wt),s.createVNode(J,{label:"Clear history",variant:"plain",size:"md",onClick:P[2]||(P[2]=E=>i())})]),F$]),s.createElementVNode("div",null,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(a.value,(E,v)=>(s.openBlock(),s.createElementBlock("div",{key:v,class:"cursor-pointer flex gap-8 hover:bg-fm-color-neutral-gray-100 items-center px-24 py-12",onClick:M=>u.value=E},[s.createVNode(j,{size:"lg",name:"history"}),s.createElementVNode("div",A$,s.toDisplayString(E),1)],8,N$))),128))])])):s.createCommentVNode("",!0)],64)):D.value?s.renderSlot(N.$slots,"hint-placeholder",{key:1},()=>[s.createElementVNode("div",O$,s.toDisplayString(N.hintPlaceholder),1)]):F.value?s.renderSlot(N.$slots,"not-found-placeholder",{key:2},()=>[s.createElementVNode("div",I$,s.toDisplayString(N.notFoundPlaceholder||`No result found for “${u.value}”`),1)]):(s.openBlock(),s.createElementBlock("div",T$,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(p.value,(E,v)=>s.renderSlot(N.$slots,"search-result-item",s.mergeProps({key:v},{result:E}),()=>[s.createElementVNode("div",{class:"cursor-pointer flex gap-16 hover:bg-fm-color-neutral-gray-100 items-center px-24 py-12 w-full",onClick:M=>w(E.label.label)},[s.createVNode(j,{size:"lg",name:"arrow_forward"}),s.createElementVNode("div",z$,[s.createElementVNode("div",null,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(E.label.segments,(M,k)=>(s.openBlock(),s.createElementBlock("span",{key:k,class:s.normalizeClass({"fm-typo-body-lg-400":!M.isMatch,"fm-typo-body-lg-700":M.isMatch})},s.toDisplayString(M.segment),3))),128))]),E.sublabel?(s.openBlock(),s.createElementBlock("div",H$,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(E.sublabel.segments,(M,k)=>(s.openBlock(),s.createElementBlock("span",{key:k,class:s.normalizeClass({"fm-typo-body-md-400":!M.isMatch,"fm-typo-body-md-700":M.isMatch})},s.toDisplayString(M.segment),3))),128))])):s.createCommentVNode("",!0)])],8,L$)])),128)),s.createElementVNode("div",j$,[h.value&&(((_=f.value)==null?void 0:_.length)??0)>5?(s.openBlock(),s.createBlock(J,{key:0,label:`show ${f.value.length-5} more results`,variant:"plain",onClick:P[3]||(P[3]=E=>h.value=!1)},null,8,["label"])):s.createCommentVNode("",!0)])]))],64))])]}),_:3},8,["model-value"]))}}),U$=["inputMode","value","placeholder","readOnly"],G$={key:0},q$=K(s.defineComponent({__name:"FmStepperField",props:{modelValue:{},placeholder:{default:""},inputmode:{default:"numeric"},readonly:{type:Boolean},labelMark:{default:"none"},step:{default:1},min:{default:void 0},max:{default:void 0},prependIcon:{default:""},appendIcon:{default:""},isCurrency:{type:Boolean,default:!1},showSteppers:{type:Boolean,default:!0},showValidBorder:{type:Boolean,default:!1},prependText:{default:""},appendText:{default:""},labelInfo:{default:""},useGrouping:{type:Boolean,default:!0},minFractionDigits:{default:0},maxFractionDigits:{default:2},label:{default:""},disabled:{type:Boolean},focused:{type:Boolean},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=Z(e,"modelValue"),{isFocused:o,blur:i,focus:r}=jn(),l=s.ref(null);let a;const d=$=>{if($!==""){const w=+$.replace(/,/g,"");return isNaN(w)?null:w}return null},c=$=>a.format($),u=$=>{if(typeof n.value!="number"){n.value=+n.value;return}if($>0&&g.value||$<0&&y.value)return;let w=b(n.value)?n.value+$:0;w=f(w),n.value=w},f=$=>e.max!==void 0&&$>e.max?e.max:e.min!==void 0&&$<e.min?e.min:$,h=()=>{var $;n.value=d((($=l.value)==null?void 0:$.value)??"")},p=$=>{if(![...Array(10).keys()].map(w=>w.toString()).includes($.key)&&!["Backspace","Tab","Enter",".","-","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes($.key)){$.preventDefault();return}},m=s.computed(()=>n.value!=null?c(n.value):""),g=s.computed(()=>{let $=!1;return e.max!==void 0&&($=n.value>=e.max),e.min!==void 0&&($=n.value<e.min),$}),y=s.computed(()=>{let $=!1;return e.max!==void 0&&($=n.value>e.max),e.min!==void 0&&($=n.value<=e.min),$});s.onBeforeMount(()=>{a=new Intl.NumberFormat("en-MY",{useGrouping:e.useGrouping,minimumFractionDigits:e.minFractionDigits,maximumFractionDigits:e.maxFractionDigits,roundingMode:"trunc"})});function b($){return typeof $=="number"&&isFinite($)}return($,w)=>(s.openBlock(),s.createBlock(Ve,{modelValue:s.unref(n),"onUpdate:modelValue":w[8]||(w[8]=S=>s.isRef(n)?n.value=S:null),label:$.label,disabled:$.disabled,required:$.labelMark==="required",optional:$.labelMark==="optional",info:$.labelInfo,rules:$.rules,focused:s.unref(o),"helper-text":$.helperText,"helper-state":$.helperState},{label:s.withCtx(()=>[s.renderSlot($.$slots,"label",{},void 0,!0)]),default:s.withCtx(({invalid:S})=>[s.createVNode(ge,{class:"cursor-text","append-icon":$.appendIcon,"prepend-icon":$.prependIcon,focused:s.unref(o),invalid:S,"show-valid-border":$.showValidBorder},{prepend:s.withCtx(()=>[s.renderSlot($.$slots,"prepend",{},void 0,!0)]),append:s.withCtx(()=>[s.renderSlot($.$slots,"append",{},()=>[s.createElementVNode("div",{class:s.normalizeClass(["flex items-center justify-center",{"mr-32":$.showSteppers}])},[$.appendText?(s.openBlock(),s.createElementBlock("div",G$,s.toDisplayString($.appendText),1)):s.createCommentVNode("",!0),$.appendIcon?(s.openBlock(),s.createBlock(j,{key:1,name:$.appendIcon,size:"md",color:$.disabled?"#C7C7CC":"#1C1C1E"},null,8,["name","color"])):s.createCommentVNode("",!0)],2)],!0),$.showSteppers?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(["fm-stepper-field__stepper__container",s.unref(o)?"right-[6px]":"right-[7px]"])},[s.createElementVNode("button",{class:"fm-stepper-field__stepper__item",tabindex:"0",type:"button",onMousedown:w[2]||(w[2]=()=>u($.step)),onFocus:w[3]||(w[3]=(...x)=>s.unref(r)&&s.unref(r)(...x)),onBlur:w[4]||(w[4]=(...x)=>s.unref(i)&&s.unref(i)(...x))},[s.createVNode(j,{name:"expand_less",size:"md",color:$.disabled||g.value?"#C7C7CC":"#1C1C1E"},null,8,["color"])],32),s.createElementVNode("button",{class:"fm-stepper-field__stepper__item",tabindex:"1",type:"button",onMousedown:w[5]||(w[5]=()=>u(-$.step)),onFocus:w[6]||(w[6]=(...x)=>s.unref(r)&&s.unref(r)(...x)),onBlur:w[7]||(w[7]=(...x)=>s.unref(i)&&s.unref(i)(...x))},[s.createVNode(j,{name:"expand_more",size:"md",color:$.disabled||y.value?"#C7C7CC":"#1C1C1E"},null,8,["color"])],32)],2)):s.createCommentVNode("",!0)]),default:s.withCtx(()=>[s.createElementVNode("input",{ref_key:"inputEl",ref:l,class:"fm-stepper-field--input",type:"text",inputMode:$.inputmode,value:m.value,placeholder:$.placeholder,readOnly:$.readonly,onInput:h,onFocus:w[0]||(w[0]=(...x)=>s.unref(r)&&s.unref(r)(...x)),onBlur:w[1]||(w[1]=(...x)=>s.unref(i)&&s.unref(i)(...x)),onKeydown:p},null,40,U$)]),_:2},1032,["append-icon","prepend-icon","focused","invalid","show-valid-border"])]),"helper-text":s.withCtx(()=>[s.renderSlot($.$slots,"helper-text",{},void 0,!0)]),_:3},8,["modelValue","label","disabled","required","optional","info","rules","focused","helper-text","helper-state"]))}}),[["__scopeId","data-v-d5ed159e"]]),X$=["value","placeholder","minlength","maxlength","readOnly","disabled"],K$=K(s.defineComponent({__name:"FmTextarea",props:{modelValue:{default:""},placeholder:{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},labelInfo:{default:""},helperText:{default:""},helperState:{default:"none"},showWordCount:{type:Boolean,default:!1},label:{default:""},disabled:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},rules:{default:()=>[]}},emits:["update:modelValue"],setup(t){const n=Z(t,"modelValue"),{isFocused:o,focus:i,blur:r}=jn(),l=a=>{n.value=a.target.value};return(a,d)=>(s.openBlock(),s.createBlock(Ve,{modelValue:s.unref(n),"onUpdate:modelValue":d[2]||(d[2]=c=>s.isRef(n)?n.value=c:null),label:a.label,disabled:a.disabled,required:a.labelMark==="required",optional:a.labelMark==="optional",info:a.labelInfo,rules:a.rules,focused:s.unref(o),"helper-text":a.helperText,"helper-state":a.helperState},s.createSlots({label:s.withCtx(()=>[s.renderSlot(a.$slots,"label",{},void 0,!0)]),default:s.withCtx(({invalid:c})=>[s.createElementVNode("div",{class:s.normalizeClass({"fm-textarea__container":!0,"fm-textarea__container--focused":s.unref(o),"fm-textarea__container--invalid":!!s.unref(n)&&c,"fm-textarea__container--valid":a.showValidBorder&&a.showSuccess&&!!s.unref(n)&&!c,"fm-textarea__container--disabled":a.disabled})},[s.createElementVNode("textarea",{class:s.normalizeClass({"fm-textarea--input fm-typo-body-lg-400":!0,"fm-color-typo-primary":!a.disabled,"fm-color-typo-disabled":a.disabled}),value:s.unref(n),placeholder:a.placeholder,minlength:a.minLength,maxlength:a.maxLength,readOnly:a.readonly,disabled:a.disabled,onInput:l,onFocus:d[0]||(d[0]=(...u)=>s.unref(i)&&s.unref(i)(...u)),onBlur:d[1]||(d[1]=(...u)=>s.unref(r)&&s.unref(r)(...u))},null,42,X$)],2)]),"helper-text":s.withCtx(()=>[s.renderSlot(a.$slots,"helper-text",{},void 0,!0)]),_:2},[a.showWordCount?{name:"helper-append",fn:s.withCtx(()=>[s.createElementVNode("div",{class:s.normalizeClass([a.disabled?"fm-color-typo-disabled":"text-fm-color-typo-secondary","fm-typo-body-sm-400"])},s.toDisplayString(a.maxLength?`${s.unref(n).length} / ${a.maxLength}`:""),3)]),key:"0"}:void 0]),1032,["modelValue","label","disabled","required","optional","info","rules","focused","helper-text","helper-state"]))}}),[["__scopeId","data-v-280a005d"]]),Z$={class:"flex flex-col fm-time-input items-center"},J$=["value"],uc=K(s.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(t,{emit:e}){const n=t,o=e,i=s.ref();function r(u){i.value&&(i.value.value=u)}s.watch(()=>n.modelValue,r);function l(){if(!i.value)return;const u=a(i.value.value);if(u==null||u>n.max||u<n.min){r(n.modelValue);return}o("update:model-value",u)}function a(u){return u&&/^\d+$/.test(u)?Number(u):null}function d(){o("update:model-value",a(n.modelValue)+1)}function c(){o("update:model-value",a(n.modelValue)-1)}return(u,f)=>(s.openBlock(),s.createElementBlock("div",Z$,[s.createElementVNode("div",{class:"fm-time-input__scroller",onClick:d},[s.createVNode(j,{name:"expand_less",size:"lg"})]),s.createElementVNode("input",{ref_key:"inputRef",ref:i,value:n.modelValue,onInput:l},null,40,J$),s.createElementVNode("div",{class:"fm-time-input__scroller",onClick:c},[s.createVNode(j,{name:"expand_more",size:"lg"})])]))}}),[["__scopeId","data-v-e8ddb125"]]);var Xe=(t=>(t.AM="AM",t.PM="PM",t))(Xe||{});function Ke(t){return t.toString().padStart(2,"0")}function Q$(t){const[e,n]=t.split(":"),o=Number(e),i=Number(n),r=o>11?"PM":"AM";let l=o;return l===0?l=12:l>12&&(l-=12),`${Ke(l)}:${Ke(i)}:${r}`}function Me(t){const[e,n,o]=Q$(t).split(":");return{hours:Number(e),minutes:Number(n),period:o}}function Ts({hours:t,minutes:e,period:n}){let o=t;return n==="PM"?o=t===12?t:t+12:t===12&&(o=0),`${Ke(o)}:${Ke(e)}`}const e3={class:"flex fm-time-input gap-16 items-center"},t3=s.createElementVNode("div",{class:"fm-typo-title-sm-700"}," : ",-1),n3={class:"fm-time-input-periods"},o3=["onClick"],Qo=s.defineComponent({__name:"FmTimeInput",props:{modelValue:{type:Object,required:!0}},emits:["update:model-value"],setup(t,{emit:e}){const n=t,o=e;function i(r){const l={hours:r.hours??n.modelValue.hours,minutes:r.minutes??n.modelValue.minutes,period:r.period??n.modelValue.period},a=n.modelValue.hours;(a===12&&l.hours===11||a===11&&l.hours===12)&&(l.period=n.modelValue.period===Xe.AM?Xe.PM:Xe.AM),l.hours>12?l.hours=1:l.hours<1&&(l.hours=12),l.minutes>59?l.minutes=0:l.minutes<0&&(l.minutes=59),o("update:model-value",l)}return(r,l)=>(s.openBlock(),s.createElementBlock("div",e3,[s.createVNode(uc,{"model-value":s.unref(Ke)(t.modelValue.hours),min:1,max:12,"onUpdate:modelValue":l[0]||(l[0]=a=>i({hours:a}))},null,8,["model-value"]),t3,s.createVNode(uc,{"model-value":s.unref(Ke)(t.modelValue.minutes),min:0,max:59,"onUpdate:modelValue":l[1]||(l[1]=a=>i({minutes:a}))},null,8,["model-value"]),s.createElementVNode("div",n3,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(Xe),a=>(s.openBlock(),s.createElementBlock("div",{key:a,class:s.normalizeClass([{"fm-time-input-period__selected":a===t.modelValue.period},"bg-fm-color-neutral-gray-100 fm-time-input-period"]),onClick:()=>i({period:a})},s.toDisplayString(a),11,o3))),128))])]))}});function i3(t){for(;t;){if(s3(t))return t;t=t.parentElement}return document.scrollingElement}function s3(t){if(!t||t.nodeType!==Node.ELEMENT_NODE)return!1;const e=window.getComputedStyle(t);return e.overflowY==="scroll"||e.overflowY==="auto"&&t.scrollHeight>t.clientHeight}class r3{constructor(e,n){I(this,"onScroll");I(this,"scrollParent");this.onScroll=n,this.scrollParent=i3(e)}bindScroll(){this.scrollParent.addEventListener("scroll",this.onScroll)}unbindScroll(){this.scrollParent.removeEventListener("scroll",this.onScroll)}}const l3={class:"fm-menu__wrapper"},fc=K(s.defineComponent({__name:"FmMenuDeprecated",props:{showMenu:{type:Boolean,default:!1},placement:{default:"bottom-start"},disabled:{type:Boolean,default:!1}},emits:["dropdown-changed"],setup(t,{expose:e,emit:n}){const o=t,i=s.ref(!1),r=s.ref(null),l=s.ref(null),{floatingStyles:a}=Hn(r,l,{middleware:[On(4),zn()],placement:o.placement,whileElementsMounted:Ln});let d;const c=n;e({show:()=>{i.value||(i.value=!0,c("dropdown-changed",i.value))},hide:()=>{i.value&&(i.value=!1,c("dropdown-changed",i.value))}});const u=p=>{p.preventDefault(),p.stopPropagation(),!o.disabled&&(i.value=!i.value,c("dropdown-changed",i.value))},f=p=>{if(!i.value)return;const m=p.path||p.composedPath();for(const g of m)if(g==r.value||g==l.value)return;i.value=!1,c("dropdown-changed",i.value)},h=()=>{c("dropdown-changed",!1)};return s.watch(()=>o.showMenu,p=>i.value=p),s.onMounted(()=>{i.value=o.showMenu,window.addEventListener("click",f),d=new r3(r.value,h),d.bindScroll()}),s.onUnmounted(()=>{window.removeEventListener("click",f),d.unbindScroll()}),(p,m)=>(s.openBlock(),s.createElementBlock("div",null,[s.createElementVNode("div",{ref_key:"anchorEl",ref:r,class:"fm-menu",onClick:u},[s.renderSlot(p.$slots,"menu-button",{},void 0,!0)],512),i.value?(s.openBlock(),s.createElementBlock("div",{key:0,ref_key:"menuEl",ref:l,class:s.normalizeClass({"fm-menu__content":!0,"fm-menu__content--opened":i.value}),style:s.normalizeStyle(s.unref(a))},[s.renderSlot(p.$slots,"menu-wrapper",{},()=>[s.createElementVNode("div",l3,[s.renderSlot(p.$slots,"menu-content",{},void 0,!0)])],!0)],6)):s.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-5b19ece2"]]),a3={class:"flex gap-8"},d3={class:"bg-fm-color-neutral-white flex flex-col px-24 py-16 rounded-lg shadow-light-300 w-[343px]"},c3=s.createElementVNode("div",{class:"fm-typo-title-sm-700 mb-8"},"Enter time",-1),u3={class:"flex items-center justify-center py-16 w-full"},f3={class:"flex justify-end"},h3=s.defineComponent({__name:"FmTimePicker",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const n=Z(t,"modelValue"),o=s.ref(null),i=s.computed(()=>{if(!n.value)return null;const{hours:u,minutes:f,period:h}=Me(n.value);return`${Ke(u)}:${Ke(f)} ${h}`});function r(){if(!o.value){n.value=null;return}const u=Ts(o.value);n.value=u,a()}s.onMounted(()=>{n.value&&(o.value=Me(n.value))}),s.watch(()=>n.value,u=>{u&&(o.value=Me(u))});const l=s.ref();function a(){var u;(u=l.value)==null||u.hide()}const d=s.ref(!1);function c(u){u?o.value=Me(n.value??"00:00"):o.value=n.value?Me(n.value):null,d.value=u}return(u,f)=>(s.openBlock(),s.createBlock(Ve,{modelValue:s.unref(n),"onUpdate:modelValue":f[1]||(f[1]=h=>s.isRef(n)?n.value=h:null),label:u.label,disabled:u.disabled,required:u.labelMark==="required",optional:u.labelMark==="optional",info:u.labelInfo,rules:u.rules,focused:d.value,"helper-text":u.helperText,"helper-state":u.helperState},{label:s.withCtx(()=>[s.renderSlot(u.$slots,"label")]),default:s.withCtx(({invalid:h})=>[s.createVNode(fc,{ref_key:"dropdownRef",ref:l,onDropdownChanged:c},{"menu-button":s.withCtx(()=>[s.createVNode(ge,{class:s.normalizeClass(u.disabled?"cursor-not-allowed":"cursor-pointer"),focused:d.value,invalid:h,"show-valid-border":u.showValidBorder},{default:s.withCtx(()=>[s.createElementVNode("div",a3,[s.createVNode(j,{name:"schedule",outline:!d.value},null,8,["outline"]),s.createElementVNode("div",{class:s.normalizeClass(["grow",{"text-fm-color-typo-disabled":!i.value}])},s.toDisplayString(i.value??"HH:MM"),3)])]),_:2},1032,["class","focused","invalid","show-valid-border"])]),"menu-wrapper":s.withCtx(()=>[s.createElementVNode("div",d3,[c3,s.createElementVNode("div",u3,[s.createVNode(Qo,{"model-value":o.value??{hours:0,minutes:0,period:s.unref(Xe).AM},"onUpdate:modelValue":f[0]||(f[0]=p=>o.value=p)},null,8,["model-value"])]),s.createElementVNode("div",f3,[s.createVNode(J,{label:"Cancel",size:"md",variant:"tertiary",onClick:a}),s.createVNode(J,{label:"Apply",size:"md",variant:"primary",onClick:r})])])]),_:2},1536)]),"helper-text":s.withCtx(()=>[s.renderSlot(u.$slots,"helper-text")]),_:3},8,["modelValue","label","disabled","required","optional","info","rules","focused","helper-text","helper-state"]))}}),p3={class:"flex gap-8"},m3={class:"bg-fm-color-neutral-white flex flex-col px-24 py-16 rounded-lg shadow-light-300"},g3=s.createElementVNode("div",{class:"fm-typo-title-sm-700 mb-8"},"Enter time",-1),y3={class:"flex flex-col gap-16 items-center justify-center py-16 w-full"},b3=s.createElementVNode("div",{class:"fm-typo-body-lg-700 text-left w-full"}," Starting Time ",-1),$3=s.createElementVNode("div",{class:"fm-typo-body-lg-700 text-left w-full"}," Ending Time ",-1),_3={class:"flex gap-8 items-center justify-end"},w3=s.defineComponent({__name:"FmTimeRangePicker",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const n=Z(t,"modelValue"),o=s.ref(null),i=s.ref(null),r=s.computed(()=>{const p=Array.isArray(n.value);return!n.value||!p||p&&n.value.every(m=>!f(m))?null:n.value.map(m=>{const{hours:g,minutes:y,period:b}=Me(m);return`${Ke(g)}:${Ke(y)} ${b}`}).join(" - ")});function l(){if(!o.value||!i.value){n.value=null;return}let p=!1;const m=o.value,g=i.value;(m.period===Xe.PM&&g.period===Xe.AM||m.period===g.period&&(m.hours<g.hours||m.minutes<g.minutes))&&(p=!0);const y=Ts(o.value),b=Ts(i.value);n.value=p?[b,y]:[y,b],d()}s.onMounted(()=>{Array.isArray(n.value)&&n.value.every(p=>!!p)&&(o.value=Me(n.value[0]),i.value=Me(n.value[1]))}),s.watch(()=>n.value,p=>{const m=Array.isArray(p);p&&m&&p.every(g=>f(g))&&(o.value=Me(p[0]),i.value=Me(p[1]))});const a=s.ref();function d(){var p;(p=a.value)==null||p.hide()}const c=s.ref(!1);function u(p){var m,g,y,b;p?(o.value=Me(((y=n.value)==null?void 0:y[0])??"00:00"),i.value=Me(((b=n.value)==null?void 0:b[1])??"23:59")):(o.value=(m=n.value)!=null&&m[0]?Me(n.value[0]):null,i.value=(g=n.value)!=null&&g[1]?Me(n.value[1]):null),c.value=p}const f=p=>/^(?:[01]\d|2[0-3]):[0-5]\d$/.test(p),h=s.computed(()=>_e(o.value,i.value));return(p,m)=>(s.openBlock(),s.createBlock(Ve,{modelValue:s.unref(n),"onUpdate:modelValue":m[2]||(m[2]=g=>s.isRef(n)?n.value=g:null),label:p.label,disabled:p.disabled,required:p.labelMark==="required",optional:p.labelMark==="optional",info:p.labelInfo,rules:p.rules,focused:c.value,"helper-text":p.helperText,"helper-state":p.helperState},{label:s.withCtx(()=>[s.renderSlot(p.$slots,"label")]),default:s.withCtx(({invalid:g})=>[s.createVNode(_s,{ref_key:"dropdownRef",ref:a,width:343,onPopoverChanged:u},{"popover-button":s.withCtx(()=>[s.createVNode(ge,{class:s.normalizeClass(p.disabled?"cursor-not-allowed":"cursor-pointer"),focused:c.value,invalid:g,"show-valid-border":p.showValidBorder},{default:s.withCtx(()=>[s.createElementVNode("div",p3,[s.createVNode(j,{name:"schedule",outline:!c.value},null,8,["outline"]),s.createElementVNode("div",{class:s.normalizeClass(["grow",{"text-fm-color-typo-disabled":!r.value}])},s.toDisplayString(r.value??"HH:MM"),3)])]),_:2},1032,["class","focused","invalid","show-valid-border"])]),default:s.withCtx(()=>[s.createElementVNode("div",m3,[g3,s.createElementVNode("div",y3,[s.createElementVNode("div",null,[b3,s.createVNode(Qo,{"model-value":o.value??{hours:0,minutes:0,period:s.unref(Xe).AM},"onUpdate:modelValue":m[0]||(m[0]=y=>o.value=y)},null,8,["model-value"])]),s.createElementVNode("div",null,[$3,s.createVNode(Qo,{"model-value":i.value??{hours:0,minutes:0,period:s.unref(Xe).AM},"onUpdate:modelValue":m[1]||(m[1]=y=>i.value=y)},null,8,["model-value"])])]),s.createElementVNode("div",_3,[s.createVNode(J,{label:"Cancel",variant:"tertiary",size:"md",onClick:d}),s.createVNode(J,{label:"Apply",variant:"primary",size:"md",disabled:h.value,onClick:l},null,8,["disabled"])])])]),_:2},1536)]),"helper-text":s.withCtx(()=>[s.renderSlot(p.$slots,"helper-text")]),_:3},8,["modelValue","label","disabled","required","optional","info","rules","focused","helper-text","helper-state"]))}}),hc=K(s.defineComponent({__name:"FmList",props:{separator:{type:Boolean,default:!1},disabled:{type:Boolean},activeClass:{default:""}},setup(t){return(e,n)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass({"fm-list--separator":e.separator,activeClass:e.activeClass})},[s.renderSlot(e.$slots,"default",{},void 0,!0)],2))}}),[["__scopeId","data-v-884ba127"]]),pc=K(s.defineComponent({__name:"FmListItem",props:{tag:{default:"div"},clickable:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},label:{default:""},sublabel:{default:""}},setup(t){const e=t;return(n,o)=>{const i=s.resolveDirective("wave");return s.withDirectives((s.openBlock(),s.createBlock(e.tag,{class:s.normalizeClass({"fm-list-item":!0,"fm-list-item--disabled":n.disabled,"cursor-pointer hover:bg-fm-color-opacity-sm":n.clickable&&!n.disabled,"cursor-not-allowed":n.clickable&&n.disabled}),onClick:o[0]||(o[0]=s.withModifiers(()=>{},["prevent"]))},{default:s.withCtx(()=>[s.renderSlot(n.$slots,"prepend",{},void 0,!0),s.renderSlot(n.$slots,"default",{},()=>[s.createElementVNode("div",null,[s.createElementVNode("div",{class:s.normalizeClass(`fm-typo-body-lg-400 line-clamp-1 break-all ${n.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-primary"}`)},s.toDisplayString(n.label),3),n.sublabel?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(`fm-typo-body-md-400 line-clamp-2 break-all ${n.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-secondary"}`)},s.toDisplayString(n.sublabel),3)):s.createCommentVNode("",!0)])],!0),n.$slots.append?(s.openBlock(),s.createBlock(Wt,{key:0})):s.createCommentVNode("",!0),s.renderSlot(n.$slots,"append",{},void 0,!0)]),_:3},8,["class"])),[[i,n.clickable&&!n.disabled]])}}}),[["__scopeId","data-v-90312222"]]),C3={class:"fm-typo-body-lg-700 mx-8 p-12 text-fm-color-typo-primary"},x3=s.defineComponent({__name:"FmMenuHeader",props:{label:{}},setup(t){return(e,n)=>(s.openBlock(),s.createElementBlock("div",C3,s.toDisplayString(e.label),1))}}),k3=t=>(s.pushScopeId("data-v-c5236366"),t=t(),s.popScopeId(),t),S3={class:"relative"},v3={class:"fm-progress-linear fm-typo-body-sm-400 h-4 overflow-hidden relative rounded-lg w-auto"},M3=k3(()=>s.createElementVNode("span",{class:"bg-fm-color-neutral-gray-100",style:{width:"100%"}},null,-1)),D3=K(s.defineComponent({__name:"FmLinearProgress",props:{color:{default:"primary"}},setup(t){const e=t,n=s.computed(()=>{const o=new Array,i={};return e.color?(sn(e.color)?i["background-color"]=e.color:o.push(`bg-fm-color-${e.color}`),{class:o.join(" "),style:i}):{class:o.join(" "),style:i}});return(o,i)=>(s.openBlock(),s.createElementBlock("div",S3,[s.createElementVNode("div",v3,[M3,s.createElementVNode("span",{class:s.normalizeClass(["dash-1",n.value.class]),style:s.normalizeStyle(n.value.style)},null,6),s.createElementVNode("span",{class:s.normalizeClass(["dash-2",n.value.class]),style:s.normalizeStyle(n.value.style)},null,6)])]))}}),[["__scopeId","data-v-c5236366"]]),E3={class:"fm-side-sheet"},B3={class:"flex fm-typo-title-sm-700 items-center justify-between text-fm-color-typo-primary"},V3={key:0},P3={class:"h-full overflow-y-auto"},R3={class:"pt-24"},F3=K(s.defineComponent({__name:"FmSideSheet",props:{header:{default:""},modelValue:{type:Boolean,default:!1},dismissAway:{type:Boolean,default:!1},closeButton:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(t){const e=t,n=s.ref(null),o=Z(e,"modelValue"),i=r=>{e.dismissAway&&n.value&&r.target===n.value&&(o.value=!1)};return(r,l)=>(s.openBlock(),s.createElementBlock("div",null,[s.createElementVNode("div",{onClick:l[0]||(l[0]=a=>o.value=!0)},[s.renderSlot(r.$slots,"side-sheet-button",{},void 0,!0)]),(s.openBlock(),s.createBlock(s.Teleport,{to:"body"},[s.createVNode(s.Transition,null,{default:s.withCtx(()=>[s.unref(o)?(s.openBlock(),s.createElementBlock("div",{key:0,ref_key:"overlayRef",ref:n,class:"fm-side-sheet--container",onClick:l[2]||(l[2]=a=>i(a))},[s.createVNode(s.Transition,{name:"slide",appear:""},{default:s.withCtx(()=>[s.createElementVNode("div",E3,[s.createElementVNode("div",B3,[s.renderSlot(r.$slots,"side-sheet-header",{},()=>[r.header?(s.openBlock(),s.createElementBlock("div",V3,s.toDisplayString(r.header),1)):s.createCommentVNode("",!0)],!0),r.closeButton?(s.openBlock(),s.createBlock(j,{key:0,class:"cursor-pointer",name:"close",size:"md",onClick:l[1]||(l[1]=a=>o.value=!1)})):s.createCommentVNode("",!0)]),s.createElementVNode("div",P3,[s.renderSlot(r.$slots,"default",{},void 0,!0)]),s.createElementVNode("div",R3,[s.renderSlot(r.$slots,"side-sheet-footer",{},void 0,!0)])])]),_:3})],512)):s.createCommentVNode("",!0)]),_:3})]))]))}}),[["__scopeId","data-v-c002a2ae"]]),N3={class:"flex"},A3={key:0,class:"mt-8"},mc=K(s.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(t,{emit:e}){const n=t,o=e,i=s.computed(()=>{switch(n.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 ${n.variant}`)}}),r=s.computed(()=>n.title?{text:n.title,classes:"fm-typo-body-lg-700"}:{text:n.description,classes:""}),l=s.computed(()=>n.bgColor?sn(n.bgColor)?{style:{backgroundColor:n.bgColor}}:{class:`bg-fm-color-${n.bgColor}`}:{class:`bg-fm-color-${i.value.bgColor}`}),a=s.computed(()=>n.color?sn(n.color)?{style:{color:n.color}}:{class:`text-fm-color-${n.color}`}:{class:`text-fm-color-${i.value.actionColor}`});return(d,c)=>(s.openBlock(),s.createElementBlock("div",s.mergeProps(l.value,{class:"fm-corner-radius-lg fm-shadow-light-400 fm-snackbar px-24 py-16"}),[s.createElementVNode("div",N3,[i.value.icon?(s.openBlock(),s.createBlock(j,{key:0,name:i.value.icon.name,color:n.color??i.value.icon.color,class:"mr-12"},null,8,["name","color"])):s.createCommentVNode("",!0),s.createElementVNode("div",{class:s.normalizeClass(`${r.value.classes} grow ellipsis`)},s.toDisplayString(r.value.text),3),n.dismissable?(s.openBlock(),s.createBlock(j,{key:1,style:{"{ flex":"none}"},name:"close",class:"cursor-pointer",onClick:c[0]||(c[0]=()=>o("onDismiss"))})):s.createCommentVNode("",!0)]),n.title&&n.description?(s.openBlock(),s.createElementBlock("div",A3,s.toDisplayString(n.description),1)):s.createCommentVNode("",!0),s.renderSlot(d.$slots,"actions",{},()=>[n.action?(s.openBlock(),s.createElementBlock("div",s.mergeProps({key:0},a.value,{class:"mt-16 fm-typo-body-lg-700"}),[s.createElementVNode("span",{class:"cursor-pointer",onClick:c[1]||(c[1]=()=>o("onAction"))},s.toDisplayString(n.action),1)],16)):s.createCommentVNode("",!0)],!0)],16))}}),[["__scopeId","data-v-e2ff7141"]]),O3={key:0,class:"fm-step-description fm-typo-body-sm-400 line-clamp-1 mt-4"},Ls=s.defineComponent({__name:"FmStepHeader",props:{title:{type:String,required:!0},description:{type:String,default:void 0},disabled:{type:Boolean,default:!1},titleBold:{type:Boolean,default:!1}},setup(t){return(e,n)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["flex flex-col",t.disabled?"text-fm-color-typo-disabled":""])},[s.createElementVNode("div",{class:s.normalizeClass(["fm-step-title line-clamp-2",t.titleBold?"fm-typo-body-xl-700":"fm-typo-body-md-400"])},s.toDisplayString(t.title),3),t.description?(s.openBlock(),s.createElementBlock("div",O3,s.toDisplayString(t.description),1)):s.createCommentVNode("",!0)],2))}}),I3=["data-title","data-description","data-disabled"],T3={class:"flex fm-step-container gap-12 grow"},L3=K(s.defineComponent({__name:"FmStep",props:{title:{type:String,required:!0},description:{type:String,default:void 0},value:{type:Number,required:!0},complete:{type:Function,required:!0},error:{type:Function,default:void 0},disabled:{type:Function,default:void 0}},setup(t){const e=t,{currentStep:n,goToStep:o}=s.inject($r);function i(){r.value||o(e.value)}const r=s.computed(()=>e.disabled?e.disabled():!1),l=s.computed(()=>e.error?e.error():!1),a=s.computed(()=>n()===e.value),d=s.computed(()=>e.complete()),c=s.computed(()=>a.value||d.value||n()>e.value?"bg-fm-color-primary":"bg-fm-color-neutral-gray-300"),u=s.computed(()=>a.value?{className:"bg-fm-color-primary"}:l.value?{config:{name:"warning",color:"system-error-300"}}:r.value?{className:"border-2 border-fm-color-neutral-gray-200"}:d.value?{config:{name:"check_small",color:"primary"},className:"border-2 border-fm-color-primary"}:{className:"border-2 border-fm-color-neutral-gray-300"});return(f,h)=>{const p=s.resolveDirective("wave");return s.withDirectives((s.openBlock(),s.createElementBlock("div",{"data-title":t.title,"data-description":t.description,"data-disabled":r.value,class:s.normalizeClass(`fm-step gap-4 grow ${r.value?"cursor-not-allowed":"cursor-pointer"}`),onClick:s.withModifiers(i,["stop"])},[s.createElementVNode("div",null,[s.createElementVNode("div",{class:s.normalizeClass(`fm-step-indicator ${c.value}`)},null,2)]),s.createElementVNode("div",T3,[s.createElementVNode("div",{class:s.normalizeClass(["flex fm-step-container-icon h-[24px] items-center justify-center min-h-[24px] min-w-[24px] relative rounded-full w-[24px]",u.value.className])},[u.value.config?(s.openBlock(),s.createBlock(j,{key:0,name:u.value.config.name,color:u.value.config.color,outline:"",class:"absolute"},null,8,["name","color"])):s.createCommentVNode("",!0)],2),s.createVNode(Ls,{title:t.title,description:t.description,disabled:r.value,class:"grow"},null,8,["title","description","disabled"])])],10,I3)),[[p,!r.value]])}}}),[["__scopeId","data-v-ee172cad"]]),z3={class:"hidden items-center xs:flex"},H3={class:"flex gap-2 items-start justify-end mb-24 mt-40 p-0 self-stretch"},j3=s.defineComponent({__name:"FmStepper",props:{modelValue:{type:Number,required:!0},orientation:{type:String,default:"horizontal"}},emits:["update:model-value"],setup(t,{emit:e}){const n=t,o=e,i=u=>{o("update:model-value",u)};s.provide($r,{currentStep:()=>n.modelValue,goToStep:i});const r=s.ref(),l=s.ref([]),a=s.computed(()=>l.value[n.modelValue-1]),d=s.computed(()=>`${n.modelValue} of ${l.value.length}`),c=()=>{var f;const u=Array.from(((f=r.value)==null?void 0:f.querySelectorAll(":scope > .fm-step"))??[]);l.value=u.map(h=>({title:h.dataset.title??"",description:h.dataset.description,disabled:h.dataset.disabled=="true"}))};return s.onMounted(()=>{c()}),(u,f)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(`fm-stepper fm-stepper__${t.orientation}`)},[s.createElementVNode("div",{ref_key:"stepperRef",ref:r,class:s.normalizeClass(`flex mx-24 mt-12 mb-24 xs:hidden ${t.orientation==="vertical"?"flex-col":""}`)},[s.renderSlot(u.$slots,"default")],2),s.createElementVNode("div",z3,[s.createVNode(ln,{"current-step":t.modelValue,"total-steps":l.value.length,class:"mr-12"},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(d.value),1)]),_:1},8,["current-step","total-steps"]),a.value?(s.openBlock(),s.createBlock(Ls,{key:0,class:"grow","title-bold":"",title:a.value.title,description:a.value.description,disabled:a.value.disabled},null,8,["title","description","disabled"])):s.createCommentVNode("",!0)]),u.$slots.contents?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(`flex-col mx-24 mt-12 mb-24 ${t.orientation==="vertical"?"w-2/3":""}`)},[s.renderSlot(u.$slots,"contents"),s.createElementVNode("div",H3,[s.renderSlot(u.$slots,"actions")])],2)):s.createCommentVNode("",!0)],2))}});let W3=0;function Y3(){return W3++}const U3=t=>(s.pushScopeId("data-v-57d43f79"),t=t(),s.popScopeId(),t),G3=["disabled"],q3=[U3(()=>s.createElementVNode("div",{class:"fm-tab__indicator"},null,-1))],gc=K(s.defineComponent({__name:"FmTab",props:{modelValue:{default:null},label:{default:""},vertical:{type:Boolean,default:!1},icon:{default:""},disabled:{type:Boolean,default:!1},badge:{default:0},value:{default:()=>Y3()},children:{default:()=>[]}},emits:["update:modelValue"],setup(t,{emit:e}){const n=s.ref(!1),o=t,i=e,r=s.ref(!1);function l(f){n.value=f}const a=()=>{o.disabled||o.children.length>0||i("update:modelValue",o.value)},d=f=>{o.children.length!==0&&(r.value=f)},c=s.computed(()=>o.children.length>0?o.children.some(f=>f.value===o.modelValue):o.modelValue===o.value),u=f=>{r.value=!1,i("update:modelValue",f)};return(f,h)=>(s.openBlock(),s.createBlock(Ct,{"show-menu":r.value,disabled:f.children.length===0,class:s.normalizeClass(["max-w-[360px] min-w-[90px] rounded-sm",{"w-full":f.vertical}]),placement:f.vertical?"right-start":"bottom-start",onMenuChanged:d},{"menu-button":s.withCtx(()=>[s.createElementVNode("button",{class:s.normalizeClass(["fm-tab",`fm-tab--${f.vertical?"vertical":"horizontal"}`,f.disabled?"cursor-not-allowed":"cursor-pointer",{"fm-tab--selected":c.value}]),disabled:f.disabled,type:"button",onMousedown:h[0]||(h[0]=()=>l(!0)),onMouseup:h[1]||(h[1]=()=>l(!1)),onMouseleave:h[2]||(h[2]=()=>l(!1)),onClick:a},[s.renderSlot(f.$slots,"prepend",{},void 0,!0),f.icon?(s.openBlock(),s.createBlock(j,{key:0,name:f.icon,outline:!n.value&&!c.value,color:f.disabled?"neutral-gray-200":c.value?"primary":"neutral-black",size:"md"},null,8,["name","outline","color"])):s.createCommentVNode("",!0),f.label?(s.openBlock(),s.createElementBlock("span",{key:1,class:s.normalizeClass(["fm-typo-body-lg-700 text-fm-color-typo-primary row-start-1 text-left",c.value?"visible":"invisible",f.icon||f.$slots.append?"col-start-2":"col-start-1"])},s.toDisplayString(f.label),3)):s.createCommentVNode("",!0),f.label?(s.openBlock(),s.createElementBlock("span",{key:2,class:s.normalizeClass(["fm-typo-body-lg-400 row-start-1 text-left",f.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-secondary",!c.value||f.disabled?"visible":"invisible",f.icon||f.$slots.append?"col-start-2":"col-start-1"])},s.toDisplayString(f.label),3)):s.createCommentVNode("",!0),f.badge?(s.openBlock(),s.createBlock(Mt,{key:3,value:f.badge,inline:"",variant:"numeric"},null,8,["value"])):s.createCommentVNode("",!0),f.children.length>0?(s.openBlock(),s.createBlock(j,{key:4,size:"md",name:r.value?"expand_less":"expand_more"},null,8,["name"])):s.createCommentVNode("",!0),s.renderSlot(f.$slots,"append",{},void 0,!0),c.value?(s.openBlock(),s.createElementBlock("div",{key:5,class:s.normalizeClass([`fm-tab__indicator__wrapper--${f.vertical?"vertical":"horizontal"}`])},q3,2)):s.createCommentVNode("",!0)],42,G3)]),default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(f.children,p=>(s.openBlock(),s.createBlock(Pe,{key:p.value,"model-value":o.modelValue===p.value,label:p.label,icon:p.icon,disabled:p.disabled,onClick:m=>u(p.value)},{append:s.withCtx(()=>[p.badge?(s.openBlock(),s.createBlock(Mt,{key:0,value:p.badge,inline:"",variant:"numeric"},null,8,["value"])):s.createCommentVNode("",!0)]),_:2},1032,["model-value","label","icon","disabled","onClick"]))),128))]),_:3},8,["show-menu","disabled","class","placement"]))}}),[["__scopeId","data-v-57d43f79"]]);/**
34
34
  * table-core
35
35
  *
36
36
  * Copyright (c) TanStack
@@ -39,10 +39,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
39
39
  * LICENSE.md file in the root directory of this source tree.
40
40
  *
41
41
  * @license MIT
42
- */function xt(t,e){return typeof t=="function"?t(e):t}function Re(t,e){return n=>{e.setState(o=>({...o,[t]:xt(n,o[t])}))}}function ei(t){return t instanceof Function}function Q3(t){return Array.isArray(t)&&t.every(e=>typeof e=="number")}function e_(t,e){const n=[],o=i=>{i.forEach(s=>{n.push(s);const l=e(s);l!=null&&l.length&&o(l)})};return o(t),n}function z(t,e,n){let o=[],i;return s=>{let l;n.key&&n.debug&&(l=Date.now());const a=t(s);if(!(a.length!==o.length||a.some((u,f)=>o[f]!==u)))return i;o=a;let c;if(n.key&&n.debug&&(c=Date.now()),i=e(...a),n==null||n.onChange==null||n.onChange(i),n.key&&n.debug&&n!=null&&n.debug()){const u=Math.round((Date.now()-l)*100)/100,f=Math.round((Date.now()-c)*100)/100,h=f/16,p=(m,g)=>{for(m=String(m);m.length<g;)m=" "+m;return m};console.info(`%c⏱ ${p(f,5)} /${p(u,5)} ms`,`
42
+ */function xt(t,e){return typeof t=="function"?t(e):t}function Re(t,e){return n=>{e.setState(o=>({...o,[t]:xt(n,o[t])}))}}function ei(t){return t instanceof Function}function X3(t){return Array.isArray(t)&&t.every(e=>typeof e=="number")}function K3(t,e){const n=[],o=i=>{i.forEach(r=>{n.push(r);const l=e(r);l!=null&&l.length&&o(l)})};return o(t),n}function z(t,e,n){let o=[],i;return r=>{let l;n.key&&n.debug&&(l=Date.now());const a=t(r);if(!(a.length!==o.length||a.some((u,f)=>o[f]!==u)))return i;o=a;let c;if(n.key&&n.debug&&(c=Date.now()),i=e(...a),n==null||n.onChange==null||n.onChange(i),n.key&&n.debug&&n!=null&&n.debug()){const u=Math.round((Date.now()-l)*100)/100,f=Math.round((Date.now()-c)*100)/100,h=f/16,p=(m,g)=>{for(m=String(m);m.length<g;)m=" "+m;return m};console.info(`%c⏱ ${p(f,5)} /${p(u,5)} ms`,`
43
43
  font-size: .6rem;
44
44
  font-weight: bold;
45
- color: hsl(${Math.max(0,Math.min(120-120*h,120))}deg 100% 31%);`,n==null?void 0:n.key)}return i}}function H(t,e,n,o){return{debug:()=>{var i;return(i=t==null?void 0:t.debugAll)!=null?i:t[e]},key:process.env.NODE_ENV==="development"&&n,onChange:o}}function t_(t,e,n,o){var i,s;const a={...t._getDefaultColumnDef(),...e},d=a.accessorKey;let c=(i=(s=a.id)!=null?s:d?d.replace(".","_"):void 0)!=null?i:typeof a.header=="string"?a.header:void 0,u;if(a.accessorFn?u=a.accessorFn:d&&(d.includes(".")?u=h=>{let p=h;for(const g of d.split(".")){var m;p=(m=p)==null?void 0:m[g],process.env.NODE_ENV!=="production"&&p===void 0&&console.warn(`"${g}" in deeply nested key "${d}" returned undefined.`)}return p}:u=h=>h[a.accessorKey]),!c)throw process.env.NODE_ENV!=="production"?new Error(a.accessorFn?"Columns require an id when using an accessorFn":"Columns require an id when using a non-string header"):new Error;let f={id:`${String(c)}`,accessorFn:u,parent:o,depth:n,columnDef:a,columns:[],getFlatColumns:z(()=>[!0],()=>{var h;return[f,...(h=f.columns)==null?void 0:h.flatMap(p=>p.getFlatColumns())]},H(t.options,"debugColumns","column.getFlatColumns")),getLeafColumns:z(()=>[t._getOrderColumnsFn()],h=>{var p;if((p=f.columns)!=null&&p.length){let m=f.columns.flatMap(g=>g.getLeafColumns());return h(m)}return[f]},H(t.options,"debugColumns","column.getLeafColumns"))};for(const h of t._features)h.createColumn==null||h.createColumn(f,t);return f}const we="debugHeaders";function mc(t,e,n){var o;let s={id:(o=n.id)!=null?o:e.id,column:e,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const l=[],a=d=>{d.subHeaders&&d.subHeaders.length&&d.subHeaders.map(a),l.push(d)};return a(s),l},getContext:()=>({table:t,header:s,column:e})};return t._features.forEach(l=>{l.createHeader==null||l.createHeader(s,t)}),s}const n_={createTable:t=>{t.getHeaderGroups=z(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.left,t.getState().columnPinning.right],(e,n,o,i)=>{var s,l;const a=(s=o==null?void 0:o.map(f=>n.find(h=>h.id===f)).filter(Boolean))!=null?s:[],d=(l=i==null?void 0:i.map(f=>n.find(h=>h.id===f)).filter(Boolean))!=null?l:[],c=n.filter(f=>!(o!=null&&o.includes(f.id))&&!(i!=null&&i.includes(f.id)));return ti(e,[...a,...c,...d],t)},H(t.options,we,"getHeaderGroups")),t.getCenterHeaderGroups=z(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.left,t.getState().columnPinning.right],(e,n,o,i)=>(n=n.filter(s=>!(o!=null&&o.includes(s.id))&&!(i!=null&&i.includes(s.id))),ti(e,n,t,"center")),H(t.options,we,"getCenterHeaderGroups")),t.getLeftHeaderGroups=z(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.left],(e,n,o)=>{var i;const s=(i=o==null?void 0:o.map(l=>n.find(a=>a.id===l)).filter(Boolean))!=null?i:[];return ti(e,s,t,"left")},H(t.options,we,"getLeftHeaderGroups")),t.getRightHeaderGroups=z(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.right],(e,n,o)=>{var i;const s=(i=o==null?void 0:o.map(l=>n.find(a=>a.id===l)).filter(Boolean))!=null?i:[];return ti(e,s,t,"right")},H(t.options,we,"getRightHeaderGroups")),t.getFooterGroups=z(()=>[t.getHeaderGroups()],e=>[...e].reverse(),H(t.options,we,"getFooterGroups")),t.getLeftFooterGroups=z(()=>[t.getLeftHeaderGroups()],e=>[...e].reverse(),H(t.options,we,"getLeftFooterGroups")),t.getCenterFooterGroups=z(()=>[t.getCenterHeaderGroups()],e=>[...e].reverse(),H(t.options,we,"getCenterFooterGroups")),t.getRightFooterGroups=z(()=>[t.getRightHeaderGroups()],e=>[...e].reverse(),H(t.options,we,"getRightFooterGroups")),t.getFlatHeaders=z(()=>[t.getHeaderGroups()],e=>e.map(n=>n.headers).flat(),H(t.options,we,"getFlatHeaders")),t.getLeftFlatHeaders=z(()=>[t.getLeftHeaderGroups()],e=>e.map(n=>n.headers).flat(),H(t.options,we,"getLeftFlatHeaders")),t.getCenterFlatHeaders=z(()=>[t.getCenterHeaderGroups()],e=>e.map(n=>n.headers).flat(),H(t.options,we,"getCenterFlatHeaders")),t.getRightFlatHeaders=z(()=>[t.getRightHeaderGroups()],e=>e.map(n=>n.headers).flat(),H(t.options,we,"getRightFlatHeaders")),t.getCenterLeafHeaders=z(()=>[t.getCenterFlatHeaders()],e=>e.filter(n=>{var o;return!((o=n.subHeaders)!=null&&o.length)}),H(t.options,we,"getCenterLeafHeaders")),t.getLeftLeafHeaders=z(()=>[t.getLeftFlatHeaders()],e=>e.filter(n=>{var o;return!((o=n.subHeaders)!=null&&o.length)}),H(t.options,we,"getLeftLeafHeaders")),t.getRightLeafHeaders=z(()=>[t.getRightFlatHeaders()],e=>e.filter(n=>{var o;return!((o=n.subHeaders)!=null&&o.length)}),H(t.options,we,"getRightLeafHeaders")),t.getLeafHeaders=z(()=>[t.getLeftHeaderGroups(),t.getCenterHeaderGroups(),t.getRightHeaderGroups()],(e,n,o)=>{var i,s,l,a,d,c;return[...(i=(s=e[0])==null?void 0:s.headers)!=null?i:[],...(l=(a=n[0])==null?void 0:a.headers)!=null?l:[],...(d=(c=o[0])==null?void 0:c.headers)!=null?d:[]].map(u=>u.getLeafHeaders()).flat()},H(t.options,we,"getLeafHeaders"))}};function ti(t,e,n,o){var i,s;let l=0;const a=function(h,p){p===void 0&&(p=1),l=Math.max(l,p),h.filter(m=>m.getIsVisible()).forEach(m=>{var g;(g=m.columns)!=null&&g.length&&a(m.columns,p+1)},0)};a(t);let d=[];const c=(h,p)=>{const m={depth:p,id:[o,`${p}`].filter(Boolean).join("_"),headers:[]},g=[];h.forEach(y=>{const b=[...g].reverse()[0],$=y.column.depth===m.depth;let x,S=!1;if($&&y.column.parent?x=y.column.parent:(x=y.column,S=!0),b&&(b==null?void 0:b.column)===x)b.subHeaders.push(y);else{const C=mc(n,x,{id:[o,p,x.id,y==null?void 0:y.id].filter(Boolean).join("_"),isPlaceholder:S,placeholderId:S?`${g.filter(V=>V.column===x).length}`:void 0,depth:p,index:g.length});C.subHeaders.push(y),g.push(C)}m.headers.push(y),y.headerGroup=m}),d.push(m),p>0&&c(g,p-1)},u=e.map((h,p)=>mc(n,h,{depth:l,index:p}));c(u,l-1),d.reverse();const f=h=>h.filter(m=>m.column.getIsVisible()).map(m=>{let g=0,y=0,b=[0];m.subHeaders&&m.subHeaders.length?(b=[],f(m.subHeaders).forEach(x=>{let{colSpan:S,rowSpan:C}=x;g+=S,b.push(C)})):g=1;const $=Math.min(...b);return y=y+$,m.colSpan=g,m.rowSpan=y,{colSpan:g,rowSpan:y}});return f((i=(s=d[0])==null?void 0:s.headers)!=null?i:[]),d}const ni={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},zr=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),o_={getDefaultColumnDef:()=>ni,getInitialState:t=>({columnSizing:{},columnSizingInfo:zr(),...t}),getDefaultOptions:t=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Re("columnSizing",t),onColumnSizingInfoChange:Re("columnSizingInfo",t)}),createColumn:(t,e)=>{t.getSize=()=>{var n,o,i;const s=e.getState().columnSizing[t.id];return Math.min(Math.max((n=t.columnDef.minSize)!=null?n:ni.minSize,(o=s??t.columnDef.size)!=null?o:ni.size),(i=t.columnDef.maxSize)!=null?i:ni.maxSize)},t.getStart=z(n=>[n,qn(e,n),e.getState().columnSizing],(n,o)=>o.slice(0,t.getIndex(n)).reduce((i,s)=>i+s.getSize(),0),H(e.options,"debugColumns","getStart")),t.getAfter=z(n=>[n,qn(e,n),e.getState().columnSizing],(n,o)=>o.slice(t.getIndex(n)+1).reduce((i,s)=>i+s.getSize(),0),H(e.options,"debugColumns","getAfter")),t.resetSize=()=>{e.setColumnSizing(n=>{let{[t.id]:o,...i}=n;return i})},t.getCanResize=()=>{var n,o;return((n=t.columnDef.enableResizing)!=null?n:!0)&&((o=e.options.enableColumnResizing)!=null?o:!0)},t.getIsResizing=()=>e.getState().columnSizingInfo.isResizingColumn===t.id},createHeader:(t,e)=>{t.getSize=()=>{let n=0;const o=i=>{if(i.subHeaders.length)i.subHeaders.forEach(o);else{var s;n+=(s=i.column.getSize())!=null?s:0}};return o(t),n},t.getStart=()=>{if(t.index>0){const n=t.headerGroup.headers[t.index-1];return n.getStart()+n.getSize()}return 0},t.getResizeHandler=n=>{const o=e.getColumn(t.column.id),i=o==null?void 0:o.getCanResize();return s=>{if(!o||!i||(s.persist==null||s.persist(),Hr(s)&&s.touches&&s.touches.length>1))return;const l=t.getSize(),a=t?t.getLeafHeaders().map(b=>[b.column.id,b.column.getSize()]):[[o.id,o.getSize()]],d=Hr(s)?Math.round(s.touches[0].clientX):s.clientX,c={},u=(b,$)=>{typeof $=="number"&&(e.setColumnSizingInfo(x=>{var S,C;const V=e.options.columnResizeDirection==="rtl"?-1:1,E=($-((S=x==null?void 0:x.startOffset)!=null?S:0))*V,F=Math.max(E/((C=x==null?void 0:x.startSize)!=null?C:0),-.999999);return x.columnSizingStart.forEach(N=>{let[P,w]=N;c[P]=Math.round(Math.max(w+w*F,0)*100)/100}),{...x,deltaOffset:E,deltaPercentage:F}}),(e.options.columnResizeMode==="onChange"||b==="end")&&e.setColumnSizing(x=>({...x,...c})))},f=b=>u("move",b),h=b=>{u("end",b),e.setColumnSizingInfo($=>({...$,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},p=n||typeof document<"u"?document:null,m={moveHandler:b=>f(b.clientX),upHandler:b=>{p==null||p.removeEventListener("mousemove",m.moveHandler),p==null||p.removeEventListener("mouseup",m.upHandler),h(b.clientX)}},g={moveHandler:b=>(b.cancelable&&(b.preventDefault(),b.stopPropagation()),f(b.touches[0].clientX),!1),upHandler:b=>{var $;p==null||p.removeEventListener("touchmove",g.moveHandler),p==null||p.removeEventListener("touchend",g.upHandler),b.cancelable&&(b.preventDefault(),b.stopPropagation()),h(($=b.touches[0])==null?void 0:$.clientX)}},y=i_()?{passive:!1}:!1;Hr(s)?(p==null||p.addEventListener("touchmove",g.moveHandler,y),p==null||p.addEventListener("touchend",g.upHandler,y)):(p==null||p.addEventListener("mousemove",m.moveHandler,y),p==null||p.addEventListener("mouseup",m.upHandler,y)),e.setColumnSizingInfo(b=>({...b,startOffset:d,startSize:l,deltaOffset:0,deltaPercentage:0,columnSizingStart:a,isResizingColumn:o.id}))}}},createTable:t=>{t.setColumnSizing=e=>t.options.onColumnSizingChange==null?void 0:t.options.onColumnSizingChange(e),t.setColumnSizingInfo=e=>t.options.onColumnSizingInfoChange==null?void 0:t.options.onColumnSizingInfoChange(e),t.resetColumnSizing=e=>{var n;t.setColumnSizing(e?{}:(n=t.initialState.columnSizing)!=null?n:{})},t.resetHeaderSizeInfo=e=>{var n;t.setColumnSizingInfo(e?zr():(n=t.initialState.columnSizingInfo)!=null?n:zr())},t.getTotalSize=()=>{var e,n;return(e=(n=t.getHeaderGroups()[0])==null?void 0:n.headers.reduce((o,i)=>o+i.getSize(),0))!=null?e:0},t.getLeftTotalSize=()=>{var e,n;return(e=(n=t.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((o,i)=>o+i.getSize(),0))!=null?e:0},t.getCenterTotalSize=()=>{var e,n;return(e=(n=t.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((o,i)=>o+i.getSize(),0))!=null?e:0},t.getRightTotalSize=()=>{var e,n;return(e=(n=t.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((o,i)=>o+i.getSize(),0))!=null?e:0}}};let oi=null;function i_(){if(typeof oi=="boolean")return oi;let t=!1;try{const e={get passive(){return t=!0,!1}},n=()=>{};window.addEventListener("test",n,e),window.removeEventListener("test",n)}catch{t=!1}return oi=t,oi}function Hr(t){return t.type==="touchstart"}const r_={getInitialState:t=>({expanded:{},...t}),getDefaultOptions:t=>({onExpandedChange:Re("expanded",t),paginateExpandedRows:!0}),createTable:t=>{let e=!1,n=!1;t._autoResetExpanded=()=>{var o,i;if(!e){t._queue(()=>{e=!0});return}if((o=(i=t.options.autoResetAll)!=null?i:t.options.autoResetExpanded)!=null?o:!t.options.manualExpanding){if(n)return;n=!0,t._queue(()=>{t.resetExpanded(),n=!1})}},t.setExpanded=o=>t.options.onExpandedChange==null?void 0:t.options.onExpandedChange(o),t.toggleAllRowsExpanded=o=>{o??!t.getIsAllRowsExpanded()?t.setExpanded(!0):t.setExpanded({})},t.resetExpanded=o=>{var i,s;t.setExpanded(o?{}:(i=(s=t.initialState)==null?void 0:s.expanded)!=null?i:{})},t.getCanSomeRowsExpand=()=>t.getPrePaginationRowModel().flatRows.some(o=>o.getCanExpand()),t.getToggleAllRowsExpandedHandler=()=>o=>{o.persist==null||o.persist(),t.toggleAllRowsExpanded()},t.getIsSomeRowsExpanded=()=>{const o=t.getState().expanded;return o===!0||Object.values(o).some(Boolean)},t.getIsAllRowsExpanded=()=>{const o=t.getState().expanded;return typeof o=="boolean"?o===!0:!(!Object.keys(o).length||t.getRowModel().flatRows.some(i=>!i.getIsExpanded()))},t.getExpandedDepth=()=>{let o=0;return(t.getState().expanded===!0?Object.keys(t.getRowModel().rowsById):Object.keys(t.getState().expanded)).forEach(s=>{const l=s.split(".");o=Math.max(o,l.length)}),o},t.getPreExpandedRowModel=()=>t.getSortedRowModel(),t.getExpandedRowModel=()=>(!t._getExpandedRowModel&&t.options.getExpandedRowModel&&(t._getExpandedRowModel=t.options.getExpandedRowModel(t)),t.options.manualExpanding||!t._getExpandedRowModel?t.getPreExpandedRowModel():t._getExpandedRowModel())},createRow:(t,e)=>{t.toggleExpanded=n=>{e.setExpanded(o=>{var i;const s=o===!0?!0:!!(o!=null&&o[t.id]);let l={};if(o===!0?Object.keys(e.getRowModel().rowsById).forEach(a=>{l[a]=!0}):l=o,n=(i=n)!=null?i:!s,!s&&n)return{...l,[t.id]:!0};if(s&&!n){const{[t.id]:a,...d}=l;return d}return o})},t.getIsExpanded=()=>{var n;const o=e.getState().expanded;return!!((n=e.options.getIsRowExpanded==null?void 0:e.options.getIsRowExpanded(t))!=null?n:o===!0||o!=null&&o[t.id])},t.getCanExpand=()=>{var n,o,i;return(n=e.options.getRowCanExpand==null?void 0:e.options.getRowCanExpand(t))!=null?n:((o=e.options.enableExpanding)!=null?o:!0)&&!!((i=t.subRows)!=null&&i.length)},t.getIsAllParentsExpanded=()=>{let n=!0,o=t;for(;n&&o.parentId;)o=e.getRow(o.parentId,!0),n=o.getIsExpanded();return n},t.getToggleExpandedHandler=()=>{const n=t.getCanExpand();return()=>{n&&t.toggleExpanded()}}}},gc=(t,e,n)=>{var o;const i=n.toLowerCase();return!!(!((o=t.getValue(e))==null||(o=o.toString())==null||(o=o.toLowerCase())==null)&&o.includes(i))};gc.autoRemove=t=>He(t);const yc=(t,e,n)=>{var o;return!!(!((o=t.getValue(e))==null||(o=o.toString())==null)&&o.includes(n))};yc.autoRemove=t=>He(t);const bc=(t,e,n)=>{var o;return((o=t.getValue(e))==null||(o=o.toString())==null?void 0:o.toLowerCase())===(n==null?void 0:n.toLowerCase())};bc.autoRemove=t=>He(t);const $c=(t,e,n)=>{var o;return(o=t.getValue(e))==null?void 0:o.includes(n)};$c.autoRemove=t=>He(t)||!(t!=null&&t.length);const _c=(t,e,n)=>!n.some(o=>{var i;return!((i=t.getValue(e))!=null&&i.includes(o))});_c.autoRemove=t=>He(t)||!(t!=null&&t.length);const wc=(t,e,n)=>n.some(o=>{var i;return(i=t.getValue(e))==null?void 0:i.includes(o)});wc.autoRemove=t=>He(t)||!(t!=null&&t.length);const Cc=(t,e,n)=>t.getValue(e)===n;Cc.autoRemove=t=>He(t);const xc=(t,e,n)=>t.getValue(e)==n;xc.autoRemove=t=>He(t);const jr=(t,e,n)=>{let[o,i]=n;const s=t.getValue(e);return s>=o&&s<=i};jr.resolveFilterValue=t=>{let[e,n]=t,o=typeof e!="number"?parseFloat(e):e,i=typeof n!="number"?parseFloat(n):n,s=e===null||Number.isNaN(o)?-1/0:o,l=n===null||Number.isNaN(i)?1/0:i;if(s>l){const a=s;s=l,l=a}return[s,l]},jr.autoRemove=t=>He(t)||He(t[0])&&He(t[1]);const ct={includesString:gc,includesStringSensitive:yc,equalsString:bc,arrIncludes:$c,arrIncludesAll:_c,arrIncludesSome:wc,equals:Cc,weakEquals:xc,inNumberRange:jr};function He(t){return t==null||t===""}const s_={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:t=>({columnFilters:[],globalFilter:void 0,...t}),getDefaultOptions:t=>({onColumnFiltersChange:Re("columnFilters",t),onGlobalFilterChange:Re("globalFilter",t),filterFromLeafRows:!1,maxLeafRowFilterDepth:100,globalFilterFn:"auto",getColumnCanGlobalFilter:e=>{var n;const o=(n=t.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[e.id])==null?void 0:n.getValue();return typeof o=="string"||typeof o=="number"}}),createColumn:(t,e)=>{t.getAutoFilterFn=()=>{const n=e.getCoreRowModel().flatRows[0],o=n==null?void 0:n.getValue(t.id);return typeof o=="string"?ct.includesString:typeof o=="number"?ct.inNumberRange:typeof o=="boolean"||o!==null&&typeof o=="object"?ct.equals:Array.isArray(o)?ct.arrIncludes:ct.weakEquals},t.getFilterFn=()=>{var n,o;return ei(t.columnDef.filterFn)?t.columnDef.filterFn:t.columnDef.filterFn==="auto"?t.getAutoFilterFn():(n=(o=e.options.filterFns)==null?void 0:o[t.columnDef.filterFn])!=null?n:ct[t.columnDef.filterFn]},t.getCanFilter=()=>{var n,o,i;return((n=t.columnDef.enableColumnFilter)!=null?n:!0)&&((o=e.options.enableColumnFilters)!=null?o:!0)&&((i=e.options.enableFilters)!=null?i:!0)&&!!t.accessorFn},t.getCanGlobalFilter=()=>{var n,o,i,s;return((n=t.columnDef.enableGlobalFilter)!=null?n:!0)&&((o=e.options.enableGlobalFilter)!=null?o:!0)&&((i=e.options.enableFilters)!=null?i:!0)&&((s=e.options.getColumnCanGlobalFilter==null?void 0:e.options.getColumnCanGlobalFilter(t))!=null?s:!0)&&!!t.accessorFn},t.getIsFiltered=()=>t.getFilterIndex()>-1,t.getFilterValue=()=>{var n;return(n=e.getState().columnFilters)==null||(n=n.find(o=>o.id===t.id))==null?void 0:n.value},t.getFilterIndex=()=>{var n,o;return(n=(o=e.getState().columnFilters)==null?void 0:o.findIndex(i=>i.id===t.id))!=null?n:-1},t.setFilterValue=n=>{e.setColumnFilters(o=>{const i=t.getFilterFn(),s=o==null?void 0:o.find(u=>u.id===t.id),l=xt(n,s?s.value:void 0);if(kc(i,l,t)){var a;return(a=o==null?void 0:o.filter(u=>u.id!==t.id))!=null?a:[]}const d={id:t.id,value:l};if(s){var c;return(c=o==null?void 0:o.map(u=>u.id===t.id?d:u))!=null?c:[]}return o!=null&&o.length?[...o,d]:[d]})},t._getFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,t.id),t.getFacetedRowModel=()=>t._getFacetedRowModel?t._getFacetedRowModel():e.getPreFilteredRowModel(),t._getFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,t.id),t.getFacetedUniqueValues=()=>t._getFacetedUniqueValues?t._getFacetedUniqueValues():new Map,t._getFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,t.id),t.getFacetedMinMaxValues=()=>{if(t._getFacetedMinMaxValues)return t._getFacetedMinMaxValues()}},createRow:(t,e)=>{t.columnFilters={},t.columnFiltersMeta={}},createTable:t=>{t.getGlobalAutoFilterFn=()=>ct.includesString,t.getGlobalFilterFn=()=>{var e,n;const{globalFilterFn:o}=t.options;return ei(o)?o:o==="auto"?t.getGlobalAutoFilterFn():(e=(n=t.options.filterFns)==null?void 0:n[o])!=null?e:ct[o]},t.setColumnFilters=e=>{const n=t.getAllLeafColumns(),o=i=>{var s;return(s=xt(e,i))==null?void 0:s.filter(l=>{const a=n.find(d=>d.id===l.id);if(a){const d=a.getFilterFn();if(kc(d,l.value,a))return!1}return!0})};t.options.onColumnFiltersChange==null||t.options.onColumnFiltersChange(o)},t.setGlobalFilter=e=>{t.options.onGlobalFilterChange==null||t.options.onGlobalFilterChange(e)},t.resetGlobalFilter=e=>{t.setGlobalFilter(e?void 0:t.initialState.globalFilter)},t.resetColumnFilters=e=>{var n,o;t.setColumnFilters(e?[]:(n=(o=t.initialState)==null?void 0:o.columnFilters)!=null?n:[])},t.getPreFilteredRowModel=()=>t.getCoreRowModel(),t.getFilteredRowModel=()=>(!t._getFilteredRowModel&&t.options.getFilteredRowModel&&(t._getFilteredRowModel=t.options.getFilteredRowModel(t)),t.options.manualFiltering||!t._getFilteredRowModel?t.getPreFilteredRowModel():t._getFilteredRowModel()),t._getGlobalFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,"__global__"),t.getGlobalFacetedRowModel=()=>t.options.manualFiltering||!t._getGlobalFacetedRowModel?t.getPreFilteredRowModel():t._getGlobalFacetedRowModel(),t._getGlobalFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,"__global__"),t.getGlobalFacetedUniqueValues=()=>t._getGlobalFacetedUniqueValues?t._getGlobalFacetedUniqueValues():new Map,t._getGlobalFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,"__global__"),t.getGlobalFacetedMinMaxValues=()=>{if(t._getGlobalFacetedMinMaxValues)return t._getGlobalFacetedMinMaxValues()}}};function kc(t,e,n){return(t&&t.autoRemove?t.autoRemove(e,n):!1)||typeof e>"u"||typeof e=="string"&&!e}const Wr={sum:(t,e,n)=>n.reduce((o,i)=>{const s=i.getValue(t);return o+(typeof s=="number"?s:0)},0),min:(t,e,n)=>{let o;return n.forEach(i=>{const s=i.getValue(t);s!=null&&(o>s||o===void 0&&s>=s)&&(o=s)}),o},max:(t,e,n)=>{let o;return n.forEach(i=>{const s=i.getValue(t);s!=null&&(o<s||o===void 0&&s>=s)&&(o=s)}),o},extent:(t,e,n)=>{let o,i;return n.forEach(s=>{const l=s.getValue(t);l!=null&&(o===void 0?l>=l&&(o=i=l):(o>l&&(o=l),i<l&&(i=l)))}),[o,i]},mean:(t,e)=>{let n=0,o=0;if(e.forEach(i=>{let s=i.getValue(t);s!=null&&(s=+s)>=s&&(++n,o+=s)}),n)return o/n},median:(t,e)=>{if(!e.length)return;const n=e.map(s=>s.getValue(t));if(!Q3(n))return;if(n.length===1)return n[0];const o=Math.floor(n.length/2),i=n.sort((s,l)=>s-l);return n.length%2!==0?i[o]:(i[o-1]+i[o])/2},unique:(t,e)=>Array.from(new Set(e.map(n=>n.getValue(t))).values()),uniqueCount:(t,e)=>new Set(e.map(n=>n.getValue(t))).size,count:(t,e)=>e.length},l_={getDefaultColumnDef:()=>({aggregatedCell:t=>{var e,n;return(e=(n=t.getValue())==null||n.toString==null?void 0:n.toString())!=null?e:null},aggregationFn:"auto"}),getInitialState:t=>({grouping:[],...t}),getDefaultOptions:t=>({onGroupingChange:Re("grouping",t),groupedColumnMode:"reorder"}),createColumn:(t,e)=>{t.toggleGrouping=()=>{e.setGrouping(n=>n!=null&&n.includes(t.id)?n.filter(o=>o!==t.id):[...n??[],t.id])},t.getCanGroup=()=>{var n,o,i,s;return(n=(o=(i=(s=t.columnDef.enableGrouping)!=null?s:!0)!=null?i:e.options.enableGrouping)!=null?o:!0)!=null?n:!!t.accessorFn},t.getIsGrouped=()=>{var n;return(n=e.getState().grouping)==null?void 0:n.includes(t.id)},t.getGroupedIndex=()=>{var n;return(n=e.getState().grouping)==null?void 0:n.indexOf(t.id)},t.getToggleGroupingHandler=()=>{const n=t.getCanGroup();return()=>{n&&t.toggleGrouping()}},t.getAutoAggregationFn=()=>{const n=e.getCoreRowModel().flatRows[0],o=n==null?void 0:n.getValue(t.id);if(typeof o=="number")return Wr.sum;if(Object.prototype.toString.call(o)==="[object Date]")return Wr.extent},t.getAggregationFn=()=>{var n,o;if(!t)throw new Error;return ei(t.columnDef.aggregationFn)?t.columnDef.aggregationFn:t.columnDef.aggregationFn==="auto"?t.getAutoAggregationFn():(n=(o=e.options.aggregationFns)==null?void 0:o[t.columnDef.aggregationFn])!=null?n:Wr[t.columnDef.aggregationFn]}},createTable:t=>{t.setGrouping=e=>t.options.onGroupingChange==null?void 0:t.options.onGroupingChange(e),t.resetGrouping=e=>{var n,o;t.setGrouping(e?[]:(n=(o=t.initialState)==null?void 0:o.grouping)!=null?n:[])},t.getPreGroupedRowModel=()=>t.getFilteredRowModel(),t.getGroupedRowModel=()=>(!t._getGroupedRowModel&&t.options.getGroupedRowModel&&(t._getGroupedRowModel=t.options.getGroupedRowModel(t)),t.options.manualGrouping||!t._getGroupedRowModel?t.getPreGroupedRowModel():t._getGroupedRowModel())},createRow:(t,e)=>{t.getIsGrouped=()=>!!t.groupingColumnId,t.getGroupingValue=n=>{if(t._groupingValuesCache.hasOwnProperty(n))return t._groupingValuesCache[n];const o=e.getColumn(n);return o!=null&&o.columnDef.getGroupingValue?(t._groupingValuesCache[n]=o.columnDef.getGroupingValue(t.original),t._groupingValuesCache[n]):t.getValue(n)},t._groupingValuesCache={}},createCell:(t,e,n,o)=>{t.getIsGrouped=()=>e.getIsGrouped()&&e.id===n.groupingColumnId,t.getIsPlaceholder=()=>!t.getIsGrouped()&&e.getIsGrouped(),t.getIsAggregated=()=>{var i;return!t.getIsGrouped()&&!t.getIsPlaceholder()&&!!((i=n.subRows)!=null&&i.length)}}};function a_(t,e,n){if(!(e!=null&&e.length)||!n)return t;const o=t.filter(s=>!e.includes(s.id));return n==="remove"?o:[...e.map(s=>t.find(l=>l.id===s)).filter(Boolean),...o]}const d_={getInitialState:t=>({columnOrder:[],...t}),getDefaultOptions:t=>({onColumnOrderChange:Re("columnOrder",t)}),createColumn:(t,e)=>{t.getIndex=z(n=>[qn(e,n)],n=>n.findIndex(o=>o.id===t.id),H(e.options,"debugColumns","getIndex")),t.getIsFirstColumn=n=>{var o;return((o=qn(e,n)[0])==null?void 0:o.id)===t.id},t.getIsLastColumn=n=>{var o;const i=qn(e,n);return((o=i[i.length-1])==null?void 0:o.id)===t.id}},createTable:t=>{t.setColumnOrder=e=>t.options.onColumnOrderChange==null?void 0:t.options.onColumnOrderChange(e),t.resetColumnOrder=e=>{var n;t.setColumnOrder(e?[]:(n=t.initialState.columnOrder)!=null?n:[])},t._getOrderColumnsFn=z(()=>[t.getState().columnOrder,t.getState().grouping,t.options.groupedColumnMode],(e,n,o)=>i=>{let s=[];if(!(e!=null&&e.length))s=i;else{const l=[...e],a=[...i];for(;a.length&&l.length;){const d=l.shift(),c=a.findIndex(u=>u.id===d);c>-1&&s.push(a.splice(c,1)[0])}s=[...s,...a]}return a_(s,n,o)},H(t.options,"debugTable","_getOrderColumnsFn"))}},Yr=0,Ur=10,Gr=()=>({pageIndex:Yr,pageSize:Ur}),c_={getInitialState:t=>({...t,pagination:{...Gr(),...t==null?void 0:t.pagination}}),getDefaultOptions:t=>({onPaginationChange:Re("pagination",t)}),createTable:t=>{let e=!1,n=!1;t._autoResetPageIndex=()=>{var o,i;if(!e){t._queue(()=>{e=!0});return}if((o=(i=t.options.autoResetAll)!=null?i:t.options.autoResetPageIndex)!=null?o:!t.options.manualPagination){if(n)return;n=!0,t._queue(()=>{t.resetPageIndex(),n=!1})}},t.setPagination=o=>{const i=s=>xt(o,s);return t.options.onPaginationChange==null?void 0:t.options.onPaginationChange(i)},t.resetPagination=o=>{var i;t.setPagination(o?Gr():(i=t.initialState.pagination)!=null?i:Gr())},t.setPageIndex=o=>{t.setPagination(i=>{let s=xt(o,i.pageIndex);const l=typeof t.options.pageCount>"u"||t.options.pageCount===-1?Number.MAX_SAFE_INTEGER:t.options.pageCount-1;return s=Math.max(0,Math.min(s,l)),{...i,pageIndex:s}})},t.resetPageIndex=o=>{var i,s;t.setPageIndex(o?Yr:(i=(s=t.initialState)==null||(s=s.pagination)==null?void 0:s.pageIndex)!=null?i:Yr)},t.resetPageSize=o=>{var i,s;t.setPageSize(o?Ur:(i=(s=t.initialState)==null||(s=s.pagination)==null?void 0:s.pageSize)!=null?i:Ur)},t.setPageSize=o=>{t.setPagination(i=>{const s=Math.max(1,xt(o,i.pageSize)),l=i.pageSize*i.pageIndex,a=Math.floor(l/s);return{...i,pageIndex:a,pageSize:s}})},t.setPageCount=o=>t.setPagination(i=>{var s;let l=xt(o,(s=t.options.pageCount)!=null?s:-1);return typeof l=="number"&&(l=Math.max(-1,l)),{...i,pageCount:l}}),t.getPageOptions=z(()=>[t.getPageCount()],o=>{let i=[];return o&&o>0&&(i=[...new Array(o)].fill(null).map((s,l)=>l)),i},H(t.options,"debugTable","getPageOptions")),t.getCanPreviousPage=()=>t.getState().pagination.pageIndex>0,t.getCanNextPage=()=>{const{pageIndex:o}=t.getState().pagination,i=t.getPageCount();return i===-1?!0:i===0?!1:o<i-1},t.previousPage=()=>t.setPageIndex(o=>o-1),t.nextPage=()=>t.setPageIndex(o=>o+1),t.firstPage=()=>t.setPageIndex(0),t.lastPage=()=>t.setPageIndex(t.getPageCount()-1),t.getPrePaginationRowModel=()=>t.getExpandedRowModel(),t.getPaginationRowModel=()=>(!t._getPaginationRowModel&&t.options.getPaginationRowModel&&(t._getPaginationRowModel=t.options.getPaginationRowModel(t)),t.options.manualPagination||!t._getPaginationRowModel?t.getPrePaginationRowModel():t._getPaginationRowModel()),t.getPageCount=()=>{var o;return(o=t.options.pageCount)!=null?o:Math.ceil(t.getRowCount()/t.getState().pagination.pageSize)},t.getRowCount=()=>{var o;return(o=t.options.rowCount)!=null?o:t.getPrePaginationRowModel().rows.length}}},qr=()=>({left:[],right:[]}),Xr=()=>({top:[],bottom:[]}),u_={getInitialState:t=>({columnPinning:qr(),rowPinning:Xr(),...t}),getDefaultOptions:t=>({onColumnPinningChange:Re("columnPinning",t),onRowPinningChange:Re("rowPinning",t)}),createColumn:(t,e)=>{t.pin=n=>{const o=t.getLeafColumns().map(i=>i.id).filter(Boolean);e.setColumnPinning(i=>{var s,l;if(n==="right"){var a,d;return{left:((a=i==null?void 0:i.left)!=null?a:[]).filter(f=>!(o!=null&&o.includes(f))),right:[...((d=i==null?void 0:i.right)!=null?d:[]).filter(f=>!(o!=null&&o.includes(f))),...o]}}if(n==="left"){var c,u;return{left:[...((c=i==null?void 0:i.left)!=null?c:[]).filter(f=>!(o!=null&&o.includes(f))),...o],right:((u=i==null?void 0:i.right)!=null?u:[]).filter(f=>!(o!=null&&o.includes(f)))}}return{left:((s=i==null?void 0:i.left)!=null?s:[]).filter(f=>!(o!=null&&o.includes(f))),right:((l=i==null?void 0:i.right)!=null?l:[]).filter(f=>!(o!=null&&o.includes(f)))}})},t.getCanPin=()=>t.getLeafColumns().some(o=>{var i,s,l;return((i=o.columnDef.enablePinning)!=null?i:!0)&&((s=(l=e.options.enableColumnPinning)!=null?l:e.options.enablePinning)!=null?s:!0)}),t.getIsPinned=()=>{const n=t.getLeafColumns().map(a=>a.id),{left:o,right:i}=e.getState().columnPinning,s=n.some(a=>o==null?void 0:o.includes(a)),l=n.some(a=>i==null?void 0:i.includes(a));return s?"left":l?"right":!1},t.getPinnedIndex=()=>{var n,o;const i=t.getIsPinned();return i?(n=(o=e.getState().columnPinning)==null||(o=o[i])==null?void 0:o.indexOf(t.id))!=null?n:-1:0}},createRow:(t,e)=>{t.pin=(n,o,i)=>{const s=o?t.getLeafRows().map(d=>{let{id:c}=d;return c}):[],l=i?t.getParentRows().map(d=>{let{id:c}=d;return c}):[],a=new Set([...l,t.id,...s]);e.setRowPinning(d=>{var c,u;if(n==="bottom"){var f,h;return{top:((f=d==null?void 0:d.top)!=null?f:[]).filter(g=>!(a!=null&&a.has(g))),bottom:[...((h=d==null?void 0:d.bottom)!=null?h:[]).filter(g=>!(a!=null&&a.has(g))),...Array.from(a)]}}if(n==="top"){var p,m;return{top:[...((p=d==null?void 0:d.top)!=null?p:[]).filter(g=>!(a!=null&&a.has(g))),...Array.from(a)],bottom:((m=d==null?void 0:d.bottom)!=null?m:[]).filter(g=>!(a!=null&&a.has(g)))}}return{top:((c=d==null?void 0:d.top)!=null?c:[]).filter(g=>!(a!=null&&a.has(g))),bottom:((u=d==null?void 0:d.bottom)!=null?u:[]).filter(g=>!(a!=null&&a.has(g)))}})},t.getCanPin=()=>{var n;const{enableRowPinning:o,enablePinning:i}=e.options;return typeof o=="function"?o(t):(n=o??i)!=null?n:!0},t.getIsPinned=()=>{const n=[t.id],{top:o,bottom:i}=e.getState().rowPinning,s=n.some(a=>o==null?void 0:o.includes(a)),l=n.some(a=>i==null?void 0:i.includes(a));return s?"top":l?"bottom":!1},t.getPinnedIndex=()=>{var n,o;const i=t.getIsPinned();if(!i)return-1;const s=(n=e._getPinnedRows(i))==null?void 0:n.map(l=>{let{id:a}=l;return a});return(o=s==null?void 0:s.indexOf(t.id))!=null?o:-1},t.getCenterVisibleCells=z(()=>[t._getAllVisibleCells(),e.getState().columnPinning.left,e.getState().columnPinning.right],(n,o,i)=>{const s=[...o??[],...i??[]];return n.filter(l=>!s.includes(l.column.id))},H(e.options,"debugRows","getCenterVisibleCells")),t.getLeftVisibleCells=z(()=>[t._getAllVisibleCells(),e.getState().columnPinning.left],(n,o)=>(o??[]).map(s=>n.find(l=>l.column.id===s)).filter(Boolean).map(s=>({...s,position:"left"})),H(e.options,"debugRows","getLeftVisibleCells")),t.getRightVisibleCells=z(()=>[t._getAllVisibleCells(),e.getState().columnPinning.right],(n,o)=>(o??[]).map(s=>n.find(l=>l.column.id===s)).filter(Boolean).map(s=>({...s,position:"right"})),H(e.options,"debugRows","getRightVisibleCells"))},createTable:t=>{t.setColumnPinning=e=>t.options.onColumnPinningChange==null?void 0:t.options.onColumnPinningChange(e),t.resetColumnPinning=e=>{var n,o;return t.setColumnPinning(e?qr():(n=(o=t.initialState)==null?void 0:o.columnPinning)!=null?n:qr())},t.getIsSomeColumnsPinned=e=>{var n;const o=t.getState().columnPinning;if(!e){var i,s;return!!((i=o.left)!=null&&i.length||(s=o.right)!=null&&s.length)}return!!((n=o[e])!=null&&n.length)},t.getLeftLeafColumns=z(()=>[t.getAllLeafColumns(),t.getState().columnPinning.left],(e,n)=>(n??[]).map(o=>e.find(i=>i.id===o)).filter(Boolean),H(t.options,"debugColumns","getLeftLeafColumns")),t.getRightLeafColumns=z(()=>[t.getAllLeafColumns(),t.getState().columnPinning.right],(e,n)=>(n??[]).map(o=>e.find(i=>i.id===o)).filter(Boolean),H(t.options,"debugColumns","getRightLeafColumns")),t.getCenterLeafColumns=z(()=>[t.getAllLeafColumns(),t.getState().columnPinning.left,t.getState().columnPinning.right],(e,n,o)=>{const i=[...n??[],...o??[]];return e.filter(s=>!i.includes(s.id))},H(t.options,"debugColumns","getCenterLeafColumns")),t.setRowPinning=e=>t.options.onRowPinningChange==null?void 0:t.options.onRowPinningChange(e),t.resetRowPinning=e=>{var n,o;return t.setRowPinning(e?Xr():(n=(o=t.initialState)==null?void 0:o.rowPinning)!=null?n:Xr())},t.getIsSomeRowsPinned=e=>{var n;const o=t.getState().rowPinning;if(!e){var i,s;return!!((i=o.top)!=null&&i.length||(s=o.bottom)!=null&&s.length)}return!!((n=o[e])!=null&&n.length)},t._getPinnedRows=z(e=>[t.getRowModel().rows,t.getState().rowPinning[e],e],(e,n,o)=>{var i;return((i=t.options.keepPinnedRows)==null||i?(n??[]).map(l=>{const a=t.getRow(l,!0);return a.getIsAllParentsExpanded()?a:null}):(n??[]).map(l=>e.find(a=>a.id===l))).filter(Boolean).map(l=>({...l,position:o}))},H(t.options,"debugRows","_getPinnedRows")),t.getTopRows=()=>t._getPinnedRows("top"),t.getBottomRows=()=>t._getPinnedRows("bottom"),t.getCenterRows=z(()=>[t.getRowModel().rows,t.getState().rowPinning.top,t.getState().rowPinning.bottom],(e,n,o)=>{const i=new Set([...n??[],...o??[]]);return e.filter(s=>!i.has(s.id))},H(t.options,"debugRows","getCenterRows"))}},f_={getInitialState:t=>({rowSelection:{},...t}),getDefaultOptions:t=>({onRowSelectionChange:Re("rowSelection",t),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:t=>{t.setRowSelection=e=>t.options.onRowSelectionChange==null?void 0:t.options.onRowSelectionChange(e),t.resetRowSelection=e=>{var n;return t.setRowSelection(e?{}:(n=t.initialState.rowSelection)!=null?n:{})},t.toggleAllRowsSelected=e=>{t.setRowSelection(n=>{e=typeof e<"u"?e:!t.getIsAllRowsSelected();const o={...n},i=t.getPreGroupedRowModel().flatRows;return e?i.forEach(s=>{s.getCanSelect()&&(o[s.id]=!0)}):i.forEach(s=>{delete o[s.id]}),o})},t.toggleAllPageRowsSelected=e=>t.setRowSelection(n=>{const o=typeof e<"u"?e:!t.getIsAllPageRowsSelected(),i={...n};return t.getRowModel().rows.forEach(s=>{Kr(i,s.id,o,!0,t)}),i}),t.getPreSelectedRowModel=()=>t.getCoreRowModel(),t.getSelectedRowModel=z(()=>[t.getState().rowSelection,t.getCoreRowModel()],(e,n)=>Object.keys(e).length?Zr(t,n):{rows:[],flatRows:[],rowsById:{}},H(t.options,"debugTable","getSelectedRowModel")),t.getFilteredSelectedRowModel=z(()=>[t.getState().rowSelection,t.getFilteredRowModel()],(e,n)=>Object.keys(e).length?Zr(t,n):{rows:[],flatRows:[],rowsById:{}},H(t.options,"debugTable","getFilteredSelectedRowModel")),t.getGroupedSelectedRowModel=z(()=>[t.getState().rowSelection,t.getSortedRowModel()],(e,n)=>Object.keys(e).length?Zr(t,n):{rows:[],flatRows:[],rowsById:{}},H(t.options,"debugTable","getGroupedSelectedRowModel")),t.getIsAllRowsSelected=()=>{const e=t.getFilteredRowModel().flatRows,{rowSelection:n}=t.getState();let o=!!(e.length&&Object.keys(n).length);return o&&e.some(i=>i.getCanSelect()&&!n[i.id])&&(o=!1),o},t.getIsAllPageRowsSelected=()=>{const e=t.getPaginationRowModel().flatRows.filter(i=>i.getCanSelect()),{rowSelection:n}=t.getState();let o=!!e.length;return o&&e.some(i=>!n[i.id])&&(o=!1),o},t.getIsSomeRowsSelected=()=>{var e;const n=Object.keys((e=t.getState().rowSelection)!=null?e:{}).length;return n>0&&n<t.getFilteredRowModel().flatRows.length},t.getIsSomePageRowsSelected=()=>{const e=t.getPaginationRowModel().flatRows;return t.getIsAllPageRowsSelected()?!1:e.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},t.getToggleAllRowsSelectedHandler=()=>e=>{t.toggleAllRowsSelected(e.target.checked)},t.getToggleAllPageRowsSelectedHandler=()=>e=>{t.toggleAllPageRowsSelected(e.target.checked)}},createRow:(t,e)=>{t.toggleSelected=(n,o)=>{const i=t.getIsSelected();e.setRowSelection(s=>{var l;if(n=typeof n<"u"?n:!i,t.getCanSelect()&&i===n)return s;const a={...s};return Kr(a,t.id,n,(l=o==null?void 0:o.selectChildren)!=null?l:!0,e),a})},t.getIsSelected=()=>{const{rowSelection:n}=e.getState();return Jr(t,n)},t.getIsSomeSelected=()=>{const{rowSelection:n}=e.getState();return Qr(t,n)==="some"},t.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=e.getState();return Qr(t,n)==="all"},t.getCanSelect=()=>{var n;return typeof e.options.enableRowSelection=="function"?e.options.enableRowSelection(t):(n=e.options.enableRowSelection)!=null?n:!0},t.getCanSelectSubRows=()=>{var n;return typeof e.options.enableSubRowSelection=="function"?e.options.enableSubRowSelection(t):(n=e.options.enableSubRowSelection)!=null?n:!0},t.getCanMultiSelect=()=>{var n;return typeof e.options.enableMultiRowSelection=="function"?e.options.enableMultiRowSelection(t):(n=e.options.enableMultiRowSelection)!=null?n:!0},t.getToggleSelectedHandler=()=>{const n=t.getCanSelect();return o=>{var i;n&&t.toggleSelected((i=o.target)==null?void 0:i.checked)}}}},Kr=(t,e,n,o,i)=>{var s;const l=i.getRow(e,!0);n?(l.getCanMultiSelect()||Object.keys(t).forEach(a=>delete t[a]),l.getCanSelect()&&(t[e]=!0)):delete t[e],o&&(s=l.subRows)!=null&&s.length&&l.getCanSelectSubRows()&&l.subRows.forEach(a=>Kr(t,a.id,n,o,i))};function Zr(t,e){const n=t.getState().rowSelection,o=[],i={},s=function(l,a){return l.map(d=>{var c;const u=Jr(d,n);if(u&&(o.push(d),i[d.id]=d),(c=d.subRows)!=null&&c.length&&(d={...d,subRows:s(d.subRows)}),u)return d}).filter(Boolean)};return{rows:s(e.rows),flatRows:o,rowsById:i}}function Jr(t,e){var n;return(n=e[t.id])!=null?n:!1}function Qr(t,e,n){var o;if(!((o=t.subRows)!=null&&o.length))return!1;let i=!0,s=!1;return t.subRows.forEach(l=>{if(!(s&&!i)&&(l.getCanSelect()&&(Jr(l,e)?s=!0:i=!1),l.subRows&&l.subRows.length)){const a=Qr(l,e);a==="all"?s=!0:(a==="some"&&(s=!0),i=!1)}}),i?"all":s?"some":!1}const es=/([0-9]+)/gm,h_=(t,e,n)=>Sc(kt(t.getValue(n)).toLowerCase(),kt(e.getValue(n)).toLowerCase()),p_=(t,e,n)=>Sc(kt(t.getValue(n)),kt(e.getValue(n))),m_=(t,e,n)=>ts(kt(t.getValue(n)).toLowerCase(),kt(e.getValue(n)).toLowerCase()),g_=(t,e,n)=>ts(kt(t.getValue(n)),kt(e.getValue(n))),y_=(t,e,n)=>{const o=t.getValue(n),i=e.getValue(n);return o>i?1:o<i?-1:0},b_=(t,e,n)=>ts(t.getValue(n),e.getValue(n));function ts(t,e){return t===e?0:t>e?1:-1}function kt(t){return typeof t=="number"?isNaN(t)||t===1/0||t===-1/0?"":String(t):typeof t=="string"?t:""}function Sc(t,e){const n=t.split(es).filter(Boolean),o=e.split(es).filter(Boolean);for(;n.length&&o.length;){const i=n.shift(),s=o.shift(),l=parseInt(i,10),a=parseInt(s,10),d=[l,a].sort();if(isNaN(d[0])){if(i>s)return 1;if(s>i)return-1;continue}if(isNaN(d[1]))return isNaN(l)?-1:1;if(l>a)return 1;if(a>l)return-1}return n.length-o.length}const Gn={alphanumeric:h_,alphanumericCaseSensitive:p_,text:m_,textCaseSensitive:g_,datetime:y_,basic:b_},$_={getInitialState:t=>({sorting:[],...t}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:t=>({onSortingChange:Re("sorting",t),isMultiSortEvent:e=>e.shiftKey}),createColumn:(t,e)=>{t.getAutoSortingFn=()=>{const n=e.getFilteredRowModel().flatRows.slice(10);let o=!1;for(const i of n){const s=i==null?void 0:i.getValue(t.id);if(Object.prototype.toString.call(s)==="[object Date]")return Gn.datetime;if(typeof s=="string"&&(o=!0,s.split(es).length>1))return Gn.alphanumeric}return o?Gn.text:Gn.basic},t.getAutoSortDir=()=>{const n=e.getFilteredRowModel().flatRows[0];return typeof(n==null?void 0:n.getValue(t.id))=="string"?"asc":"desc"},t.getSortingFn=()=>{var n,o;if(!t)throw new Error;return ei(t.columnDef.sortingFn)?t.columnDef.sortingFn:t.columnDef.sortingFn==="auto"?t.getAutoSortingFn():(n=(o=e.options.sortingFns)==null?void 0:o[t.columnDef.sortingFn])!=null?n:Gn[t.columnDef.sortingFn]},t.toggleSorting=(n,o)=>{const i=t.getNextSortingOrder(),s=typeof n<"u"&&n!==null;e.setSorting(l=>{const a=l==null?void 0:l.find(p=>p.id===t.id),d=l==null?void 0:l.findIndex(p=>p.id===t.id);let c=[],u,f=s?n:i==="desc";if(l!=null&&l.length&&t.getCanMultiSort()&&o?a?u="toggle":u="add":l!=null&&l.length&&d!==l.length-1?u="replace":a?u="toggle":u="replace",u==="toggle"&&(s||i||(u="remove")),u==="add"){var h;c=[...l,{id:t.id,desc:f}],c.splice(0,c.length-((h=e.options.maxMultiSortColCount)!=null?h:Number.MAX_SAFE_INTEGER))}else u==="toggle"?c=l.map(p=>p.id===t.id?{...p,desc:f}:p):u==="remove"?c=l.filter(p=>p.id!==t.id):c=[{id:t.id,desc:f}];return c})},t.getFirstSortDir=()=>{var n,o;return((n=(o=t.columnDef.sortDescFirst)!=null?o:e.options.sortDescFirst)!=null?n:t.getAutoSortDir()==="desc")?"desc":"asc"},t.getNextSortingOrder=n=>{var o,i;const s=t.getFirstSortDir(),l=t.getIsSorted();return l?l!==s&&((o=e.options.enableSortingRemoval)==null||o)&&(!(n&&(i=e.options.enableMultiRemove)!=null)||i)?!1:l==="desc"?"asc":"desc":s},t.getCanSort=()=>{var n,o;return((n=t.columnDef.enableSorting)!=null?n:!0)&&((o=e.options.enableSorting)!=null?o:!0)&&!!t.accessorFn},t.getCanMultiSort=()=>{var n,o;return(n=(o=t.columnDef.enableMultiSort)!=null?o:e.options.enableMultiSort)!=null?n:!!t.accessorFn},t.getIsSorted=()=>{var n;const o=(n=e.getState().sorting)==null?void 0:n.find(i=>i.id===t.id);return o?o.desc?"desc":"asc":!1},t.getSortIndex=()=>{var n,o;return(n=(o=e.getState().sorting)==null?void 0:o.findIndex(i=>i.id===t.id))!=null?n:-1},t.clearSorting=()=>{e.setSorting(n=>n!=null&&n.length?n.filter(o=>o.id!==t.id):[])},t.getToggleSortingHandler=()=>{const n=t.getCanSort();return o=>{n&&(o.persist==null||o.persist(),t.toggleSorting==null||t.toggleSorting(void 0,t.getCanMultiSort()?e.options.isMultiSortEvent==null?void 0:e.options.isMultiSortEvent(o):!1))}}},createTable:t=>{t.setSorting=e=>t.options.onSortingChange==null?void 0:t.options.onSortingChange(e),t.resetSorting=e=>{var n,o;t.setSorting(e?[]:(n=(o=t.initialState)==null?void 0:o.sorting)!=null?n:[])},t.getPreSortedRowModel=()=>t.getGroupedRowModel(),t.getSortedRowModel=()=>(!t._getSortedRowModel&&t.options.getSortedRowModel&&(t._getSortedRowModel=t.options.getSortedRowModel(t)),t.options.manualSorting||!t._getSortedRowModel?t.getPreSortedRowModel():t._getSortedRowModel())}},__={getInitialState:t=>({columnVisibility:{},...t}),getDefaultOptions:t=>({onColumnVisibilityChange:Re("columnVisibility",t)}),createColumn:(t,e)=>{t.toggleVisibility=n=>{t.getCanHide()&&e.setColumnVisibility(o=>({...o,[t.id]:n??!t.getIsVisible()}))},t.getIsVisible=()=>{var n,o;const i=t.columns;return(n=i.length?i.some(s=>s.getIsVisible()):(o=e.getState().columnVisibility)==null?void 0:o[t.id])!=null?n:!0},t.getCanHide=()=>{var n,o;return((n=t.columnDef.enableHiding)!=null?n:!0)&&((o=e.options.enableHiding)!=null?o:!0)},t.getToggleVisibilityHandler=()=>n=>{t.toggleVisibility==null||t.toggleVisibility(n.target.checked)}},createRow:(t,e)=>{t._getAllVisibleCells=z(()=>[t.getAllCells(),e.getState().columnVisibility],n=>n.filter(o=>o.column.getIsVisible()),H(e.options,"debugRows","_getAllVisibleCells")),t.getVisibleCells=z(()=>[t.getLeftVisibleCells(),t.getCenterVisibleCells(),t.getRightVisibleCells()],(n,o,i)=>[...n,...o,...i],H(e.options,"debugRows","getVisibleCells"))},createTable:t=>{const e=(n,o)=>z(()=>[o(),o().filter(i=>i.getIsVisible()).map(i=>i.id).join("_")],i=>i.filter(s=>s.getIsVisible==null?void 0:s.getIsVisible()),H(t.options,"debugColumns",n));t.getVisibleFlatColumns=e("getVisibleFlatColumns",()=>t.getAllFlatColumns()),t.getVisibleLeafColumns=e("getVisibleLeafColumns",()=>t.getAllLeafColumns()),t.getLeftVisibleLeafColumns=e("getLeftVisibleLeafColumns",()=>t.getLeftLeafColumns()),t.getRightVisibleLeafColumns=e("getRightVisibleLeafColumns",()=>t.getRightLeafColumns()),t.getCenterVisibleLeafColumns=e("getCenterVisibleLeafColumns",()=>t.getCenterLeafColumns()),t.setColumnVisibility=n=>t.options.onColumnVisibilityChange==null?void 0:t.options.onColumnVisibilityChange(n),t.resetColumnVisibility=n=>{var o;t.setColumnVisibility(n?{}:(o=t.initialState.columnVisibility)!=null?o:{})},t.toggleAllColumnsVisible=n=>{var o;n=(o=n)!=null?o:!t.getIsAllColumnsVisible(),t.setColumnVisibility(t.getAllLeafColumns().reduce((i,s)=>({...i,[s.id]:n||!(s.getCanHide!=null&&s.getCanHide())}),{}))},t.getIsAllColumnsVisible=()=>!t.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),t.getIsSomeColumnsVisible=()=>t.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),t.getToggleAllColumnsVisibilityHandler=()=>n=>{var o;t.toggleAllColumnsVisible((o=n.target)==null?void 0:o.checked)}}};function qn(t,e){return e?e==="center"?t.getCenterVisibleLeafColumns():e==="left"?t.getLeftVisibleLeafColumns():t.getRightVisibleLeafColumns():t.getVisibleLeafColumns()}const vc=[n_,__,d_,u_,s_,$_,l_,r_,c_,f_,o_];function w_(t){var e;(t.debugAll||t.debugTable)&&console.info("Creating Table Instance...");let n={_features:vc};const o=n._features.reduce((u,f)=>Object.assign(u,f.getDefaultOptions==null?void 0:f.getDefaultOptions(n)),{}),i=u=>n.options.mergeOptions?n.options.mergeOptions(o,u):{...o,...u};let l={...{},...(e=t.initialState)!=null?e:{}};n._features.forEach(u=>{var f;l=(f=u.getInitialState==null?void 0:u.getInitialState(l))!=null?f:l});const a=[];let d=!1;const c={_features:vc,options:{...o,...t},initialState:l,_queue:u=>{a.push(u),d||(d=!0,Promise.resolve().then(()=>{for(;a.length;)a.shift()();d=!1}).catch(f=>setTimeout(()=>{throw f})))},reset:()=>{n.setState(n.initialState)},setOptions:u=>{const f=xt(u,n.options);n.options=i(f)},getState:()=>n.options.state,setState:u=>{n.options.onStateChange==null||n.options.onStateChange(u)},_getRowId:(u,f,h)=>{var p;return(p=n.options.getRowId==null?void 0:n.options.getRowId(u,f,h))!=null?p:`${h?[h.id,f].join("."):f}`},getCoreRowModel:()=>(n._getCoreRowModel||(n._getCoreRowModel=n.options.getCoreRowModel(n)),n._getCoreRowModel()),getRowModel:()=>n.getPaginationRowModel(),getRow:(u,f)=>{let h=(f?n.getPrePaginationRowModel():n.getRowModel()).rowsById[u];if(!h&&(h=n.getCoreRowModel().rowsById[u],!h))throw process.env.NODE_ENV!=="production"?new Error(`getRow could not find row with ID: ${u}`):new Error;return h},_getDefaultColumnDef:z(()=>[n.options.defaultColumn],u=>{var f;return u=(f=u)!=null?f:{},{header:h=>{const p=h.header.column.columnDef;return p.accessorKey?p.accessorKey:p.accessorFn?p.id:null},cell:h=>{var p,m;return(p=(m=h.renderValue())==null||m.toString==null?void 0:m.toString())!=null?p:null},...n._features.reduce((h,p)=>Object.assign(h,p.getDefaultColumnDef==null?void 0:p.getDefaultColumnDef()),{}),...u}},H(t,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>n.options.columns,getAllColumns:z(()=>[n._getColumnDefs()],u=>{const f=function(h,p,m){return m===void 0&&(m=0),h.map(g=>{const y=t_(n,g,m,p),b=g;return y.columns=b.columns?f(b.columns,y,m+1):[],y})};return f(u)},H(t,"debugColumns","getAllColumns")),getAllFlatColumns:z(()=>[n.getAllColumns()],u=>u.flatMap(f=>f.getFlatColumns()),H(t,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:z(()=>[n.getAllFlatColumns()],u=>u.reduce((f,h)=>(f[h.id]=h,f),{}),H(t,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:z(()=>[n.getAllColumns(),n._getOrderColumnsFn()],(u,f)=>{let h=u.flatMap(p=>p.getLeafColumns());return f(h)},H(t,"debugColumns","getAllLeafColumns")),getColumn:u=>{const f=n._getAllFlatColumnsById()[u];return process.env.NODE_ENV!=="production"&&!f&&console.error(`[Table] Column with id '${u}' does not exist.`),f}};Object.assign(n,c);for(let u=0;u<n._features.length;u++){const f=n._features[u];f==null||f.createTable==null||f.createTable(n)}return n}function C_(t,e,n,o){const i=()=>{var l;return(l=s.getValue())!=null?l:t.options.renderFallbackValue},s={id:`${e.id}_${n.id}`,row:e,column:n,getValue:()=>e.getValue(o),renderValue:i,getContext:z(()=>[t,n,e,s],(l,a,d,c)=>({table:l,column:a,row:d,cell:c,getValue:c.getValue,renderValue:c.renderValue}),H(t.options,"debugCells","cell.getContext"))};return t._features.forEach(l=>{l.createCell==null||l.createCell(s,n,e,t)},{}),s}const ns=(t,e,n,o,i,s,l)=>{let a={id:e,index:o,original:n,depth:i,parentId:l,_valuesCache:{},_uniqueValuesCache:{},getValue:d=>{if(a._valuesCache.hasOwnProperty(d))return a._valuesCache[d];const c=t.getColumn(d);if(c!=null&&c.accessorFn)return a._valuesCache[d]=c.accessorFn(a.original,o),a._valuesCache[d]},getUniqueValues:d=>{if(a._uniqueValuesCache.hasOwnProperty(d))return a._uniqueValuesCache[d];const c=t.getColumn(d);if(c!=null&&c.accessorFn)return c.columnDef.getUniqueValues?(a._uniqueValuesCache[d]=c.columnDef.getUniqueValues(a.original,o),a._uniqueValuesCache[d]):(a._uniqueValuesCache[d]=[a.getValue(d)],a._uniqueValuesCache[d])},renderValue:d=>{var c;return(c=a.getValue(d))!=null?c:t.options.renderFallbackValue},subRows:s??[],getLeafRows:()=>e_(a.subRows,d=>d.subRows),getParentRow:()=>a.parentId?t.getRow(a.parentId,!0):void 0,getParentRows:()=>{let d=[],c=a;for(;;){const u=c.getParentRow();if(!u)break;d.push(u),c=u}return d.reverse()},getAllCells:z(()=>[t.getAllLeafColumns()],d=>d.map(c=>C_(t,a,c,c.id)),H(t.options,"debugRows","getAllCells")),_getAllCellsByColumnId:z(()=>[a.getAllCells()],d=>d.reduce((c,u)=>(c[u.column.id]=u,c),{}),H(t.options,"debugRows","getAllCellsByColumnId"))};for(let d=0;d<t._features.length;d++){const c=t._features[d];c==null||c.createRow==null||c.createRow(a,t)}return a};function x_(){return t=>z(()=>[t.options.data],e=>{const n={rows:[],flatRows:[],rowsById:{}},o=function(i,s,l){s===void 0&&(s=0);const a=[];for(let c=0;c<i.length;c++){const u=ns(t,t._getRowId(i[c],c,l),i[c],c,s,void 0,l==null?void 0:l.id);if(n.flatRows.push(u),n.rowsById[u.id]=u,a.push(u),t.options.getSubRows){var d;u.originalSubRows=t.options.getSubRows(i[c],c),(d=u.originalSubRows)!=null&&d.length&&(u.subRows=o(u.originalSubRows,s+1,u))}}return a};return n.rows=o(e),n},H(t.options,"debugTable","getRowModel",()=>t._autoResetPageIndex()))}function k_(t,e,n){return n.options.filterFromLeafRows?S_(t,e,n):v_(t,e,n)}function S_(t,e,n){var o;const i=[],s={},l=(o=n.options.maxLeafRowFilterDepth)!=null?o:100,a=function(d,c){c===void 0&&(c=0);const u=[];for(let h=0;h<d.length;h++){var f;let p=d[h];const m=ns(n,p.id,p.original,p.index,p.depth,void 0,p.parentId);if(m.columnFilters=p.columnFilters,(f=p.subRows)!=null&&f.length&&c<l){if(m.subRows=a(p.subRows,c+1),p=m,e(p)&&!m.subRows.length){u.push(p),s[p.id]=p,i.push(p);continue}if(e(p)||m.subRows.length){u.push(p),s[p.id]=p,i.push(p);continue}}else p=m,e(p)&&(u.push(p),s[p.id]=p,i.push(p))}return u};return{rows:a(t),flatRows:i,rowsById:s}}function v_(t,e,n){var o;const i=[],s={},l=(o=n.options.maxLeafRowFilterDepth)!=null?o:100,a=function(d,c){c===void 0&&(c=0);const u=[];for(let h=0;h<d.length;h++){let p=d[h];if(e(p)){var f;if((f=p.subRows)!=null&&f.length&&c<l){const g=ns(n,p.id,p.original,p.index,p.depth,void 0,p.parentId);g.subRows=a(p.subRows,c+1),p=g}u.push(p),i.push(p),s[p.id]=p}}return u};return{rows:a(t),flatRows:i,rowsById:s}}function M_(){return t=>z(()=>[t.getPreFilteredRowModel(),t.getState().columnFilters,t.getState().globalFilter],(e,n,o)=>{if(!e.rows.length||!(n!=null&&n.length)&&!o){for(let h=0;h<e.flatRows.length;h++)e.flatRows[h].columnFilters={},e.flatRows[h].columnFiltersMeta={};return e}const i=[],s=[];(n??[]).forEach(h=>{var p;const m=t.getColumn(h.id);if(!m)return;const g=m.getFilterFn();if(!g){process.env.NODE_ENV!=="production"&&console.warn(`Could not find a valid 'column.filterFn' for column with the ID: ${m.id}.`);return}i.push({id:h.id,filterFn:g,resolvedValue:(p=g.resolveFilterValue==null?void 0:g.resolveFilterValue(h.value))!=null?p:h.value})});const l=n.map(h=>h.id),a=t.getGlobalFilterFn(),d=t.getAllLeafColumns().filter(h=>h.getCanGlobalFilter());o&&a&&d.length&&(l.push("__global__"),d.forEach(h=>{var p;s.push({id:h.id,filterFn:a,resolvedValue:(p=a.resolveFilterValue==null?void 0:a.resolveFilterValue(o))!=null?p:o})}));let c,u;for(let h=0;h<e.flatRows.length;h++){const p=e.flatRows[h];if(p.columnFilters={},i.length)for(let m=0;m<i.length;m++){c=i[m];const g=c.id;p.columnFilters[g]=c.filterFn(p,g,c.resolvedValue,y=>{p.columnFiltersMeta[g]=y})}if(s.length){for(let m=0;m<s.length;m++){u=s[m];const g=u.id;if(u.filterFn(p,g,u.resolvedValue,y=>{p.columnFiltersMeta[g]=y})){p.columnFilters.__global__=!0;break}}p.columnFilters.__global__!==!0&&(p.columnFilters.__global__=!1)}}const f=h=>{for(let p=0;p<l.length;p++)if(h.columnFilters[l[p]]===!1)return!1;return!0};return k_(e.rows,f,t)},H(t.options,"debugTable","getFilteredRowModel",()=>t._autoResetPageIndex()))}function D_(){return t=>z(()=>[t.getState().sorting,t.getPreSortedRowModel()],(e,n)=>{if(!n.rows.length||!(e!=null&&e.length))return n;const o=t.getState().sorting,i=[],s=o.filter(d=>{var c;return(c=t.getColumn(d.id))==null?void 0:c.getCanSort()}),l={};s.forEach(d=>{const c=t.getColumn(d.id);c&&(l[d.id]={sortUndefined:c.columnDef.sortUndefined,invertSorting:c.columnDef.invertSorting,sortingFn:c.getSortingFn()})});const a=d=>{const c=d.map(u=>({...u}));return c.sort((u,f)=>{for(let p=0;p<s.length;p+=1){var h;const m=s[p],g=l[m.id],y=(h=m==null?void 0:m.desc)!=null?h:!1;let b=0;if(g.sortUndefined){const $=u.getValue(m.id),x=f.getValue(m.id),S=$===void 0,C=x===void 0;(S||C)&&(b=S&&C?0:S?g.sortUndefined:-g.sortUndefined)}if(b===0&&(b=g.sortingFn(u,f,m.id)),b!==0)return y&&(b*=-1),g.invertSorting&&(b*=-1),b}return u.index-f.index}),c.forEach(u=>{var f;i.push(u),(f=u.subRows)!=null&&f.length&&(u.subRows=a(u.subRows))}),c};return{rows:a(n.rows),flatRows:i,rowsById:n.rowsById}},H(t.options,"debugTable","getSortedRowModel",()=>t._autoResetPageIndex()))}function E_(){return t=>z(()=>[t.getState().expanded,t.getPreExpandedRowModel(),t.options.paginateExpandedRows],(e,n,o)=>!n.rows.length||e!==!0&&!Object.keys(e??{}).length||!o?n:Mc(n),H(t.options,"debugTable","getExpandedRowModel"))}function Mc(t){const e=[],n=o=>{var i;e.push(o),(i=o.subRows)!=null&&i.length&&o.getIsExpanded()&&o.subRows.forEach(n)};return t.rows.forEach(n),{rows:e,flatRows:t.flatRows,rowsById:t.rowsById}}function B_(t){return e=>z(()=>[e.getState().pagination,e.getPrePaginationRowModel(),e.options.paginateExpandedRows?void 0:e.getState().expanded],(n,o)=>{if(!o.rows.length)return o;const{pageSize:i,pageIndex:s}=n;let{rows:l,flatRows:a,rowsById:d}=o;const c=i*s,u=c+i;l=l.slice(c,u);let f;e.options.paginateExpandedRows?f={rows:l,flatRows:a,rowsById:d}:f=Mc({rows:l,flatRows:a,rowsById:d}),f.flatRows=[];const h=p=>{f.flatRows.push(p),p.subRows.length&&p.subRows.forEach(h)};return f.rows.forEach(h),f},H(e.options,"debugTable","getPaginationRowModel"))}/**
45
+ color: hsl(${Math.max(0,Math.min(120-120*h,120))}deg 100% 31%);`,n==null?void 0:n.key)}return i}}function H(t,e,n,o){return{debug:()=>{var i;return(i=t==null?void 0:t.debugAll)!=null?i:t[e]},key:process.env.NODE_ENV==="development"&&n,onChange:o}}function Z3(t,e,n,o){var i,r;const a={...t._getDefaultColumnDef(),...e},d=a.accessorKey;let c=(i=(r=a.id)!=null?r:d?d.replace(".","_"):void 0)!=null?i:typeof a.header=="string"?a.header:void 0,u;if(a.accessorFn?u=a.accessorFn:d&&(d.includes(".")?u=h=>{let p=h;for(const g of d.split(".")){var m;p=(m=p)==null?void 0:m[g],process.env.NODE_ENV!=="production"&&p===void 0&&console.warn(`"${g}" in deeply nested key "${d}" returned undefined.`)}return p}:u=h=>h[a.accessorKey]),!c)throw process.env.NODE_ENV!=="production"?new Error(a.accessorFn?"Columns require an id when using an accessorFn":"Columns require an id when using a non-string header"):new Error;let f={id:`${String(c)}`,accessorFn:u,parent:o,depth:n,columnDef:a,columns:[],getFlatColumns:z(()=>[!0],()=>{var h;return[f,...(h=f.columns)==null?void 0:h.flatMap(p=>p.getFlatColumns())]},H(t.options,"debugColumns","column.getFlatColumns")),getLeafColumns:z(()=>[t._getOrderColumnsFn()],h=>{var p;if((p=f.columns)!=null&&p.length){let m=f.columns.flatMap(g=>g.getLeafColumns());return h(m)}return[f]},H(t.options,"debugColumns","column.getLeafColumns"))};for(const h of t._features)h.createColumn==null||h.createColumn(f,t);return f}const we="debugHeaders";function yc(t,e,n){var o;let r={id:(o=n.id)!=null?o:e.id,column:e,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const l=[],a=d=>{d.subHeaders&&d.subHeaders.length&&d.subHeaders.map(a),l.push(d)};return a(r),l},getContext:()=>({table:t,header:r,column:e})};return t._features.forEach(l=>{l.createHeader==null||l.createHeader(r,t)}),r}const J3={createTable:t=>{t.getHeaderGroups=z(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.left,t.getState().columnPinning.right],(e,n,o,i)=>{var r,l;const a=(r=o==null?void 0:o.map(f=>n.find(h=>h.id===f)).filter(Boolean))!=null?r:[],d=(l=i==null?void 0:i.map(f=>n.find(h=>h.id===f)).filter(Boolean))!=null?l:[],c=n.filter(f=>!(o!=null&&o.includes(f.id))&&!(i!=null&&i.includes(f.id)));return ti(e,[...a,...c,...d],t)},H(t.options,we,"getHeaderGroups")),t.getCenterHeaderGroups=z(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.left,t.getState().columnPinning.right],(e,n,o,i)=>(n=n.filter(r=>!(o!=null&&o.includes(r.id))&&!(i!=null&&i.includes(r.id))),ti(e,n,t,"center")),H(t.options,we,"getCenterHeaderGroups")),t.getLeftHeaderGroups=z(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.left],(e,n,o)=>{var i;const r=(i=o==null?void 0:o.map(l=>n.find(a=>a.id===l)).filter(Boolean))!=null?i:[];return ti(e,r,t,"left")},H(t.options,we,"getLeftHeaderGroups")),t.getRightHeaderGroups=z(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.right],(e,n,o)=>{var i;const r=(i=o==null?void 0:o.map(l=>n.find(a=>a.id===l)).filter(Boolean))!=null?i:[];return ti(e,r,t,"right")},H(t.options,we,"getRightHeaderGroups")),t.getFooterGroups=z(()=>[t.getHeaderGroups()],e=>[...e].reverse(),H(t.options,we,"getFooterGroups")),t.getLeftFooterGroups=z(()=>[t.getLeftHeaderGroups()],e=>[...e].reverse(),H(t.options,we,"getLeftFooterGroups")),t.getCenterFooterGroups=z(()=>[t.getCenterHeaderGroups()],e=>[...e].reverse(),H(t.options,we,"getCenterFooterGroups")),t.getRightFooterGroups=z(()=>[t.getRightHeaderGroups()],e=>[...e].reverse(),H(t.options,we,"getRightFooterGroups")),t.getFlatHeaders=z(()=>[t.getHeaderGroups()],e=>e.map(n=>n.headers).flat(),H(t.options,we,"getFlatHeaders")),t.getLeftFlatHeaders=z(()=>[t.getLeftHeaderGroups()],e=>e.map(n=>n.headers).flat(),H(t.options,we,"getLeftFlatHeaders")),t.getCenterFlatHeaders=z(()=>[t.getCenterHeaderGroups()],e=>e.map(n=>n.headers).flat(),H(t.options,we,"getCenterFlatHeaders")),t.getRightFlatHeaders=z(()=>[t.getRightHeaderGroups()],e=>e.map(n=>n.headers).flat(),H(t.options,we,"getRightFlatHeaders")),t.getCenterLeafHeaders=z(()=>[t.getCenterFlatHeaders()],e=>e.filter(n=>{var o;return!((o=n.subHeaders)!=null&&o.length)}),H(t.options,we,"getCenterLeafHeaders")),t.getLeftLeafHeaders=z(()=>[t.getLeftFlatHeaders()],e=>e.filter(n=>{var o;return!((o=n.subHeaders)!=null&&o.length)}),H(t.options,we,"getLeftLeafHeaders")),t.getRightLeafHeaders=z(()=>[t.getRightFlatHeaders()],e=>e.filter(n=>{var o;return!((o=n.subHeaders)!=null&&o.length)}),H(t.options,we,"getRightLeafHeaders")),t.getLeafHeaders=z(()=>[t.getLeftHeaderGroups(),t.getCenterHeaderGroups(),t.getRightHeaderGroups()],(e,n,o)=>{var i,r,l,a,d,c;return[...(i=(r=e[0])==null?void 0:r.headers)!=null?i:[],...(l=(a=n[0])==null?void 0:a.headers)!=null?l:[],...(d=(c=o[0])==null?void 0:c.headers)!=null?d:[]].map(u=>u.getLeafHeaders()).flat()},H(t.options,we,"getLeafHeaders"))}};function ti(t,e,n,o){var i,r;let l=0;const a=function(h,p){p===void 0&&(p=1),l=Math.max(l,p),h.filter(m=>m.getIsVisible()).forEach(m=>{var g;(g=m.columns)!=null&&g.length&&a(m.columns,p+1)},0)};a(t);let d=[];const c=(h,p)=>{const m={depth:p,id:[o,`${p}`].filter(Boolean).join("_"),headers:[]},g=[];h.forEach(y=>{const b=[...g].reverse()[0],$=y.column.depth===m.depth;let w,S=!1;if($&&y.column.parent?w=y.column.parent:(w=y.column,S=!0),b&&(b==null?void 0:b.column)===w)b.subHeaders.push(y);else{const x=yc(n,w,{id:[o,p,w.id,y==null?void 0:y.id].filter(Boolean).join("_"),isPlaceholder:S,placeholderId:S?`${g.filter(V=>V.column===w).length}`:void 0,depth:p,index:g.length});x.subHeaders.push(y),g.push(x)}m.headers.push(y),y.headerGroup=m}),d.push(m),p>0&&c(g,p-1)},u=e.map((h,p)=>yc(n,h,{depth:l,index:p}));c(u,l-1),d.reverse();const f=h=>h.filter(m=>m.column.getIsVisible()).map(m=>{let g=0,y=0,b=[0];m.subHeaders&&m.subHeaders.length?(b=[],f(m.subHeaders).forEach(w=>{let{colSpan:S,rowSpan:x}=w;g+=S,b.push(x)})):g=1;const $=Math.min(...b);return y=y+$,m.colSpan=g,m.rowSpan=y,{colSpan:g,rowSpan:y}});return f((i=(r=d[0])==null?void 0:r.headers)!=null?i:[]),d}const ni={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},zs=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),Q3={getDefaultColumnDef:()=>ni,getInitialState:t=>({columnSizing:{},columnSizingInfo:zs(),...t}),getDefaultOptions:t=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Re("columnSizing",t),onColumnSizingInfoChange:Re("columnSizingInfo",t)}),createColumn:(t,e)=>{t.getSize=()=>{var n,o,i;const r=e.getState().columnSizing[t.id];return Math.min(Math.max((n=t.columnDef.minSize)!=null?n:ni.minSize,(o=r??t.columnDef.size)!=null?o:ni.size),(i=t.columnDef.maxSize)!=null?i:ni.maxSize)},t.getStart=z(n=>[n,qn(e,n),e.getState().columnSizing],(n,o)=>o.slice(0,t.getIndex(n)).reduce((i,r)=>i+r.getSize(),0),H(e.options,"debugColumns","getStart")),t.getAfter=z(n=>[n,qn(e,n),e.getState().columnSizing],(n,o)=>o.slice(t.getIndex(n)+1).reduce((i,r)=>i+r.getSize(),0),H(e.options,"debugColumns","getAfter")),t.resetSize=()=>{e.setColumnSizing(n=>{let{[t.id]:o,...i}=n;return i})},t.getCanResize=()=>{var n,o;return((n=t.columnDef.enableResizing)!=null?n:!0)&&((o=e.options.enableColumnResizing)!=null?o:!0)},t.getIsResizing=()=>e.getState().columnSizingInfo.isResizingColumn===t.id},createHeader:(t,e)=>{t.getSize=()=>{let n=0;const o=i=>{if(i.subHeaders.length)i.subHeaders.forEach(o);else{var r;n+=(r=i.column.getSize())!=null?r:0}};return o(t),n},t.getStart=()=>{if(t.index>0){const n=t.headerGroup.headers[t.index-1];return n.getStart()+n.getSize()}return 0},t.getResizeHandler=n=>{const o=e.getColumn(t.column.id),i=o==null?void 0:o.getCanResize();return r=>{if(!o||!i||(r.persist==null||r.persist(),Hs(r)&&r.touches&&r.touches.length>1))return;const l=t.getSize(),a=t?t.getLeafHeaders().map(b=>[b.column.id,b.column.getSize()]):[[o.id,o.getSize()]],d=Hs(r)?Math.round(r.touches[0].clientX):r.clientX,c={},u=(b,$)=>{typeof $=="number"&&(e.setColumnSizingInfo(w=>{var S,x;const V=e.options.columnResizeDirection==="rtl"?-1:1,D=($-((S=w==null?void 0:w.startOffset)!=null?S:0))*V,F=Math.max(D/((x=w==null?void 0:w.startSize)!=null?x:0),-.999999);return w.columnSizingStart.forEach(N=>{let[P,C]=N;c[P]=Math.round(Math.max(C+C*F,0)*100)/100}),{...w,deltaOffset:D,deltaPercentage:F}}),(e.options.columnResizeMode==="onChange"||b==="end")&&e.setColumnSizing(w=>({...w,...c})))},f=b=>u("move",b),h=b=>{u("end",b),e.setColumnSizingInfo($=>({...$,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},p=n||typeof document<"u"?document:null,m={moveHandler:b=>f(b.clientX),upHandler:b=>{p==null||p.removeEventListener("mousemove",m.moveHandler),p==null||p.removeEventListener("mouseup",m.upHandler),h(b.clientX)}},g={moveHandler:b=>(b.cancelable&&(b.preventDefault(),b.stopPropagation()),f(b.touches[0].clientX),!1),upHandler:b=>{var $;p==null||p.removeEventListener("touchmove",g.moveHandler),p==null||p.removeEventListener("touchend",g.upHandler),b.cancelable&&(b.preventDefault(),b.stopPropagation()),h(($=b.touches[0])==null?void 0:$.clientX)}},y=e4()?{passive:!1}:!1;Hs(r)?(p==null||p.addEventListener("touchmove",g.moveHandler,y),p==null||p.addEventListener("touchend",g.upHandler,y)):(p==null||p.addEventListener("mousemove",m.moveHandler,y),p==null||p.addEventListener("mouseup",m.upHandler,y)),e.setColumnSizingInfo(b=>({...b,startOffset:d,startSize:l,deltaOffset:0,deltaPercentage:0,columnSizingStart:a,isResizingColumn:o.id}))}}},createTable:t=>{t.setColumnSizing=e=>t.options.onColumnSizingChange==null?void 0:t.options.onColumnSizingChange(e),t.setColumnSizingInfo=e=>t.options.onColumnSizingInfoChange==null?void 0:t.options.onColumnSizingInfoChange(e),t.resetColumnSizing=e=>{var n;t.setColumnSizing(e?{}:(n=t.initialState.columnSizing)!=null?n:{})},t.resetHeaderSizeInfo=e=>{var n;t.setColumnSizingInfo(e?zs():(n=t.initialState.columnSizingInfo)!=null?n:zs())},t.getTotalSize=()=>{var e,n;return(e=(n=t.getHeaderGroups()[0])==null?void 0:n.headers.reduce((o,i)=>o+i.getSize(),0))!=null?e:0},t.getLeftTotalSize=()=>{var e,n;return(e=(n=t.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((o,i)=>o+i.getSize(),0))!=null?e:0},t.getCenterTotalSize=()=>{var e,n;return(e=(n=t.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((o,i)=>o+i.getSize(),0))!=null?e:0},t.getRightTotalSize=()=>{var e,n;return(e=(n=t.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((o,i)=>o+i.getSize(),0))!=null?e:0}}};let oi=null;function e4(){if(typeof oi=="boolean")return oi;let t=!1;try{const e={get passive(){return t=!0,!1}},n=()=>{};window.addEventListener("test",n,e),window.removeEventListener("test",n)}catch{t=!1}return oi=t,oi}function Hs(t){return t.type==="touchstart"}const t4={getInitialState:t=>({expanded:{},...t}),getDefaultOptions:t=>({onExpandedChange:Re("expanded",t),paginateExpandedRows:!0}),createTable:t=>{let e=!1,n=!1;t._autoResetExpanded=()=>{var o,i;if(!e){t._queue(()=>{e=!0});return}if((o=(i=t.options.autoResetAll)!=null?i:t.options.autoResetExpanded)!=null?o:!t.options.manualExpanding){if(n)return;n=!0,t._queue(()=>{t.resetExpanded(),n=!1})}},t.setExpanded=o=>t.options.onExpandedChange==null?void 0:t.options.onExpandedChange(o),t.toggleAllRowsExpanded=o=>{o??!t.getIsAllRowsExpanded()?t.setExpanded(!0):t.setExpanded({})},t.resetExpanded=o=>{var i,r;t.setExpanded(o?{}:(i=(r=t.initialState)==null?void 0:r.expanded)!=null?i:{})},t.getCanSomeRowsExpand=()=>t.getPrePaginationRowModel().flatRows.some(o=>o.getCanExpand()),t.getToggleAllRowsExpandedHandler=()=>o=>{o.persist==null||o.persist(),t.toggleAllRowsExpanded()},t.getIsSomeRowsExpanded=()=>{const o=t.getState().expanded;return o===!0||Object.values(o).some(Boolean)},t.getIsAllRowsExpanded=()=>{const o=t.getState().expanded;return typeof o=="boolean"?o===!0:!(!Object.keys(o).length||t.getRowModel().flatRows.some(i=>!i.getIsExpanded()))},t.getExpandedDepth=()=>{let o=0;return(t.getState().expanded===!0?Object.keys(t.getRowModel().rowsById):Object.keys(t.getState().expanded)).forEach(r=>{const l=r.split(".");o=Math.max(o,l.length)}),o},t.getPreExpandedRowModel=()=>t.getSortedRowModel(),t.getExpandedRowModel=()=>(!t._getExpandedRowModel&&t.options.getExpandedRowModel&&(t._getExpandedRowModel=t.options.getExpandedRowModel(t)),t.options.manualExpanding||!t._getExpandedRowModel?t.getPreExpandedRowModel():t._getExpandedRowModel())},createRow:(t,e)=>{t.toggleExpanded=n=>{e.setExpanded(o=>{var i;const r=o===!0?!0:!!(o!=null&&o[t.id]);let l={};if(o===!0?Object.keys(e.getRowModel().rowsById).forEach(a=>{l[a]=!0}):l=o,n=(i=n)!=null?i:!r,!r&&n)return{...l,[t.id]:!0};if(r&&!n){const{[t.id]:a,...d}=l;return d}return o})},t.getIsExpanded=()=>{var n;const o=e.getState().expanded;return!!((n=e.options.getIsRowExpanded==null?void 0:e.options.getIsRowExpanded(t))!=null?n:o===!0||o!=null&&o[t.id])},t.getCanExpand=()=>{var n,o,i;return(n=e.options.getRowCanExpand==null?void 0:e.options.getRowCanExpand(t))!=null?n:((o=e.options.enableExpanding)!=null?o:!0)&&!!((i=t.subRows)!=null&&i.length)},t.getIsAllParentsExpanded=()=>{let n=!0,o=t;for(;n&&o.parentId;)o=e.getRow(o.parentId,!0),n=o.getIsExpanded();return n},t.getToggleExpandedHandler=()=>{const n=t.getCanExpand();return()=>{n&&t.toggleExpanded()}}}},bc=(t,e,n)=>{var o;const i=n.toLowerCase();return!!(!((o=t.getValue(e))==null||(o=o.toString())==null||(o=o.toLowerCase())==null)&&o.includes(i))};bc.autoRemove=t=>He(t);const $c=(t,e,n)=>{var o;return!!(!((o=t.getValue(e))==null||(o=o.toString())==null)&&o.includes(n))};$c.autoRemove=t=>He(t);const _c=(t,e,n)=>{var o;return((o=t.getValue(e))==null||(o=o.toString())==null?void 0:o.toLowerCase())===(n==null?void 0:n.toLowerCase())};_c.autoRemove=t=>He(t);const wc=(t,e,n)=>{var o;return(o=t.getValue(e))==null?void 0:o.includes(n)};wc.autoRemove=t=>He(t)||!(t!=null&&t.length);const Cc=(t,e,n)=>!n.some(o=>{var i;return!((i=t.getValue(e))!=null&&i.includes(o))});Cc.autoRemove=t=>He(t)||!(t!=null&&t.length);const xc=(t,e,n)=>n.some(o=>{var i;return(i=t.getValue(e))==null?void 0:i.includes(o)});xc.autoRemove=t=>He(t)||!(t!=null&&t.length);const kc=(t,e,n)=>t.getValue(e)===n;kc.autoRemove=t=>He(t);const Sc=(t,e,n)=>t.getValue(e)==n;Sc.autoRemove=t=>He(t);const js=(t,e,n)=>{let[o,i]=n;const r=t.getValue(e);return r>=o&&r<=i};js.resolveFilterValue=t=>{let[e,n]=t,o=typeof e!="number"?parseFloat(e):e,i=typeof n!="number"?parseFloat(n):n,r=e===null||Number.isNaN(o)?-1/0:o,l=n===null||Number.isNaN(i)?1/0:i;if(r>l){const a=r;r=l,l=a}return[r,l]},js.autoRemove=t=>He(t)||He(t[0])&&He(t[1]);const ct={includesString:bc,includesStringSensitive:$c,equalsString:_c,arrIncludes:wc,arrIncludesAll:Cc,arrIncludesSome:xc,equals:kc,weakEquals:Sc,inNumberRange:js};function He(t){return t==null||t===""}const n4={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:t=>({columnFilters:[],globalFilter:void 0,...t}),getDefaultOptions:t=>({onColumnFiltersChange:Re("columnFilters",t),onGlobalFilterChange:Re("globalFilter",t),filterFromLeafRows:!1,maxLeafRowFilterDepth:100,globalFilterFn:"auto",getColumnCanGlobalFilter:e=>{var n;const o=(n=t.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[e.id])==null?void 0:n.getValue();return typeof o=="string"||typeof o=="number"}}),createColumn:(t,e)=>{t.getAutoFilterFn=()=>{const n=e.getCoreRowModel().flatRows[0],o=n==null?void 0:n.getValue(t.id);return typeof o=="string"?ct.includesString:typeof o=="number"?ct.inNumberRange:typeof o=="boolean"||o!==null&&typeof o=="object"?ct.equals:Array.isArray(o)?ct.arrIncludes:ct.weakEquals},t.getFilterFn=()=>{var n,o;return ei(t.columnDef.filterFn)?t.columnDef.filterFn:t.columnDef.filterFn==="auto"?t.getAutoFilterFn():(n=(o=e.options.filterFns)==null?void 0:o[t.columnDef.filterFn])!=null?n:ct[t.columnDef.filterFn]},t.getCanFilter=()=>{var n,o,i;return((n=t.columnDef.enableColumnFilter)!=null?n:!0)&&((o=e.options.enableColumnFilters)!=null?o:!0)&&((i=e.options.enableFilters)!=null?i:!0)&&!!t.accessorFn},t.getCanGlobalFilter=()=>{var n,o,i,r;return((n=t.columnDef.enableGlobalFilter)!=null?n:!0)&&((o=e.options.enableGlobalFilter)!=null?o:!0)&&((i=e.options.enableFilters)!=null?i:!0)&&((r=e.options.getColumnCanGlobalFilter==null?void 0:e.options.getColumnCanGlobalFilter(t))!=null?r:!0)&&!!t.accessorFn},t.getIsFiltered=()=>t.getFilterIndex()>-1,t.getFilterValue=()=>{var n;return(n=e.getState().columnFilters)==null||(n=n.find(o=>o.id===t.id))==null?void 0:n.value},t.getFilterIndex=()=>{var n,o;return(n=(o=e.getState().columnFilters)==null?void 0:o.findIndex(i=>i.id===t.id))!=null?n:-1},t.setFilterValue=n=>{e.setColumnFilters(o=>{const i=t.getFilterFn(),r=o==null?void 0:o.find(u=>u.id===t.id),l=xt(n,r?r.value:void 0);if(vc(i,l,t)){var a;return(a=o==null?void 0:o.filter(u=>u.id!==t.id))!=null?a:[]}const d={id:t.id,value:l};if(r){var c;return(c=o==null?void 0:o.map(u=>u.id===t.id?d:u))!=null?c:[]}return o!=null&&o.length?[...o,d]:[d]})},t._getFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,t.id),t.getFacetedRowModel=()=>t._getFacetedRowModel?t._getFacetedRowModel():e.getPreFilteredRowModel(),t._getFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,t.id),t.getFacetedUniqueValues=()=>t._getFacetedUniqueValues?t._getFacetedUniqueValues():new Map,t._getFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,t.id),t.getFacetedMinMaxValues=()=>{if(t._getFacetedMinMaxValues)return t._getFacetedMinMaxValues()}},createRow:(t,e)=>{t.columnFilters={},t.columnFiltersMeta={}},createTable:t=>{t.getGlobalAutoFilterFn=()=>ct.includesString,t.getGlobalFilterFn=()=>{var e,n;const{globalFilterFn:o}=t.options;return ei(o)?o:o==="auto"?t.getGlobalAutoFilterFn():(e=(n=t.options.filterFns)==null?void 0:n[o])!=null?e:ct[o]},t.setColumnFilters=e=>{const n=t.getAllLeafColumns(),o=i=>{var r;return(r=xt(e,i))==null?void 0:r.filter(l=>{const a=n.find(d=>d.id===l.id);if(a){const d=a.getFilterFn();if(vc(d,l.value,a))return!1}return!0})};t.options.onColumnFiltersChange==null||t.options.onColumnFiltersChange(o)},t.setGlobalFilter=e=>{t.options.onGlobalFilterChange==null||t.options.onGlobalFilterChange(e)},t.resetGlobalFilter=e=>{t.setGlobalFilter(e?void 0:t.initialState.globalFilter)},t.resetColumnFilters=e=>{var n,o;t.setColumnFilters(e?[]:(n=(o=t.initialState)==null?void 0:o.columnFilters)!=null?n:[])},t.getPreFilteredRowModel=()=>t.getCoreRowModel(),t.getFilteredRowModel=()=>(!t._getFilteredRowModel&&t.options.getFilteredRowModel&&(t._getFilteredRowModel=t.options.getFilteredRowModel(t)),t.options.manualFiltering||!t._getFilteredRowModel?t.getPreFilteredRowModel():t._getFilteredRowModel()),t._getGlobalFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,"__global__"),t.getGlobalFacetedRowModel=()=>t.options.manualFiltering||!t._getGlobalFacetedRowModel?t.getPreFilteredRowModel():t._getGlobalFacetedRowModel(),t._getGlobalFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,"__global__"),t.getGlobalFacetedUniqueValues=()=>t._getGlobalFacetedUniqueValues?t._getGlobalFacetedUniqueValues():new Map,t._getGlobalFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,"__global__"),t.getGlobalFacetedMinMaxValues=()=>{if(t._getGlobalFacetedMinMaxValues)return t._getGlobalFacetedMinMaxValues()}}};function vc(t,e,n){return(t&&t.autoRemove?t.autoRemove(e,n):!1)||typeof e>"u"||typeof e=="string"&&!e}const Ws={sum:(t,e,n)=>n.reduce((o,i)=>{const r=i.getValue(t);return o+(typeof r=="number"?r:0)},0),min:(t,e,n)=>{let o;return n.forEach(i=>{const r=i.getValue(t);r!=null&&(o>r||o===void 0&&r>=r)&&(o=r)}),o},max:(t,e,n)=>{let o;return n.forEach(i=>{const r=i.getValue(t);r!=null&&(o<r||o===void 0&&r>=r)&&(o=r)}),o},extent:(t,e,n)=>{let o,i;return n.forEach(r=>{const l=r.getValue(t);l!=null&&(o===void 0?l>=l&&(o=i=l):(o>l&&(o=l),i<l&&(i=l)))}),[o,i]},mean:(t,e)=>{let n=0,o=0;if(e.forEach(i=>{let r=i.getValue(t);r!=null&&(r=+r)>=r&&(++n,o+=r)}),n)return o/n},median:(t,e)=>{if(!e.length)return;const n=e.map(r=>r.getValue(t));if(!X3(n))return;if(n.length===1)return n[0];const o=Math.floor(n.length/2),i=n.sort((r,l)=>r-l);return n.length%2!==0?i[o]:(i[o-1]+i[o])/2},unique:(t,e)=>Array.from(new Set(e.map(n=>n.getValue(t))).values()),uniqueCount:(t,e)=>new Set(e.map(n=>n.getValue(t))).size,count:(t,e)=>e.length},o4={getDefaultColumnDef:()=>({aggregatedCell:t=>{var e,n;return(e=(n=t.getValue())==null||n.toString==null?void 0:n.toString())!=null?e:null},aggregationFn:"auto"}),getInitialState:t=>({grouping:[],...t}),getDefaultOptions:t=>({onGroupingChange:Re("grouping",t),groupedColumnMode:"reorder"}),createColumn:(t,e)=>{t.toggleGrouping=()=>{e.setGrouping(n=>n!=null&&n.includes(t.id)?n.filter(o=>o!==t.id):[...n??[],t.id])},t.getCanGroup=()=>{var n,o,i,r;return(n=(o=(i=(r=t.columnDef.enableGrouping)!=null?r:!0)!=null?i:e.options.enableGrouping)!=null?o:!0)!=null?n:!!t.accessorFn},t.getIsGrouped=()=>{var n;return(n=e.getState().grouping)==null?void 0:n.includes(t.id)},t.getGroupedIndex=()=>{var n;return(n=e.getState().grouping)==null?void 0:n.indexOf(t.id)},t.getToggleGroupingHandler=()=>{const n=t.getCanGroup();return()=>{n&&t.toggleGrouping()}},t.getAutoAggregationFn=()=>{const n=e.getCoreRowModel().flatRows[0],o=n==null?void 0:n.getValue(t.id);if(typeof o=="number")return Ws.sum;if(Object.prototype.toString.call(o)==="[object Date]")return Ws.extent},t.getAggregationFn=()=>{var n,o;if(!t)throw new Error;return ei(t.columnDef.aggregationFn)?t.columnDef.aggregationFn:t.columnDef.aggregationFn==="auto"?t.getAutoAggregationFn():(n=(o=e.options.aggregationFns)==null?void 0:o[t.columnDef.aggregationFn])!=null?n:Ws[t.columnDef.aggregationFn]}},createTable:t=>{t.setGrouping=e=>t.options.onGroupingChange==null?void 0:t.options.onGroupingChange(e),t.resetGrouping=e=>{var n,o;t.setGrouping(e?[]:(n=(o=t.initialState)==null?void 0:o.grouping)!=null?n:[])},t.getPreGroupedRowModel=()=>t.getFilteredRowModel(),t.getGroupedRowModel=()=>(!t._getGroupedRowModel&&t.options.getGroupedRowModel&&(t._getGroupedRowModel=t.options.getGroupedRowModel(t)),t.options.manualGrouping||!t._getGroupedRowModel?t.getPreGroupedRowModel():t._getGroupedRowModel())},createRow:(t,e)=>{t.getIsGrouped=()=>!!t.groupingColumnId,t.getGroupingValue=n=>{if(t._groupingValuesCache.hasOwnProperty(n))return t._groupingValuesCache[n];const o=e.getColumn(n);return o!=null&&o.columnDef.getGroupingValue?(t._groupingValuesCache[n]=o.columnDef.getGroupingValue(t.original),t._groupingValuesCache[n]):t.getValue(n)},t._groupingValuesCache={}},createCell:(t,e,n,o)=>{t.getIsGrouped=()=>e.getIsGrouped()&&e.id===n.groupingColumnId,t.getIsPlaceholder=()=>!t.getIsGrouped()&&e.getIsGrouped(),t.getIsAggregated=()=>{var i;return!t.getIsGrouped()&&!t.getIsPlaceholder()&&!!((i=n.subRows)!=null&&i.length)}}};function i4(t,e,n){if(!(e!=null&&e.length)||!n)return t;const o=t.filter(r=>!e.includes(r.id));return n==="remove"?o:[...e.map(r=>t.find(l=>l.id===r)).filter(Boolean),...o]}const s4={getInitialState:t=>({columnOrder:[],...t}),getDefaultOptions:t=>({onColumnOrderChange:Re("columnOrder",t)}),createColumn:(t,e)=>{t.getIndex=z(n=>[qn(e,n)],n=>n.findIndex(o=>o.id===t.id),H(e.options,"debugColumns","getIndex")),t.getIsFirstColumn=n=>{var o;return((o=qn(e,n)[0])==null?void 0:o.id)===t.id},t.getIsLastColumn=n=>{var o;const i=qn(e,n);return((o=i[i.length-1])==null?void 0:o.id)===t.id}},createTable:t=>{t.setColumnOrder=e=>t.options.onColumnOrderChange==null?void 0:t.options.onColumnOrderChange(e),t.resetColumnOrder=e=>{var n;t.setColumnOrder(e?[]:(n=t.initialState.columnOrder)!=null?n:[])},t._getOrderColumnsFn=z(()=>[t.getState().columnOrder,t.getState().grouping,t.options.groupedColumnMode],(e,n,o)=>i=>{let r=[];if(!(e!=null&&e.length))r=i;else{const l=[...e],a=[...i];for(;a.length&&l.length;){const d=l.shift(),c=a.findIndex(u=>u.id===d);c>-1&&r.push(a.splice(c,1)[0])}r=[...r,...a]}return i4(r,n,o)},H(t.options,"debugTable","_getOrderColumnsFn"))}},Ys=0,Us=10,Gs=()=>({pageIndex:Ys,pageSize:Us}),r4={getInitialState:t=>({...t,pagination:{...Gs(),...t==null?void 0:t.pagination}}),getDefaultOptions:t=>({onPaginationChange:Re("pagination",t)}),createTable:t=>{let e=!1,n=!1;t._autoResetPageIndex=()=>{var o,i;if(!e){t._queue(()=>{e=!0});return}if((o=(i=t.options.autoResetAll)!=null?i:t.options.autoResetPageIndex)!=null?o:!t.options.manualPagination){if(n)return;n=!0,t._queue(()=>{t.resetPageIndex(),n=!1})}},t.setPagination=o=>{const i=r=>xt(o,r);return t.options.onPaginationChange==null?void 0:t.options.onPaginationChange(i)},t.resetPagination=o=>{var i;t.setPagination(o?Gs():(i=t.initialState.pagination)!=null?i:Gs())},t.setPageIndex=o=>{t.setPagination(i=>{let r=xt(o,i.pageIndex);const l=typeof t.options.pageCount>"u"||t.options.pageCount===-1?Number.MAX_SAFE_INTEGER:t.options.pageCount-1;return r=Math.max(0,Math.min(r,l)),{...i,pageIndex:r}})},t.resetPageIndex=o=>{var i,r;t.setPageIndex(o?Ys:(i=(r=t.initialState)==null||(r=r.pagination)==null?void 0:r.pageIndex)!=null?i:Ys)},t.resetPageSize=o=>{var i,r;t.setPageSize(o?Us:(i=(r=t.initialState)==null||(r=r.pagination)==null?void 0:r.pageSize)!=null?i:Us)},t.setPageSize=o=>{t.setPagination(i=>{const r=Math.max(1,xt(o,i.pageSize)),l=i.pageSize*i.pageIndex,a=Math.floor(l/r);return{...i,pageIndex:a,pageSize:r}})},t.setPageCount=o=>t.setPagination(i=>{var r;let l=xt(o,(r=t.options.pageCount)!=null?r:-1);return typeof l=="number"&&(l=Math.max(-1,l)),{...i,pageCount:l}}),t.getPageOptions=z(()=>[t.getPageCount()],o=>{let i=[];return o&&o>0&&(i=[...new Array(o)].fill(null).map((r,l)=>l)),i},H(t.options,"debugTable","getPageOptions")),t.getCanPreviousPage=()=>t.getState().pagination.pageIndex>0,t.getCanNextPage=()=>{const{pageIndex:o}=t.getState().pagination,i=t.getPageCount();return i===-1?!0:i===0?!1:o<i-1},t.previousPage=()=>t.setPageIndex(o=>o-1),t.nextPage=()=>t.setPageIndex(o=>o+1),t.firstPage=()=>t.setPageIndex(0),t.lastPage=()=>t.setPageIndex(t.getPageCount()-1),t.getPrePaginationRowModel=()=>t.getExpandedRowModel(),t.getPaginationRowModel=()=>(!t._getPaginationRowModel&&t.options.getPaginationRowModel&&(t._getPaginationRowModel=t.options.getPaginationRowModel(t)),t.options.manualPagination||!t._getPaginationRowModel?t.getPrePaginationRowModel():t._getPaginationRowModel()),t.getPageCount=()=>{var o;return(o=t.options.pageCount)!=null?o:Math.ceil(t.getRowCount()/t.getState().pagination.pageSize)},t.getRowCount=()=>{var o;return(o=t.options.rowCount)!=null?o:t.getPrePaginationRowModel().rows.length}}},qs=()=>({left:[],right:[]}),Xs=()=>({top:[],bottom:[]}),l4={getInitialState:t=>({columnPinning:qs(),rowPinning:Xs(),...t}),getDefaultOptions:t=>({onColumnPinningChange:Re("columnPinning",t),onRowPinningChange:Re("rowPinning",t)}),createColumn:(t,e)=>{t.pin=n=>{const o=t.getLeafColumns().map(i=>i.id).filter(Boolean);e.setColumnPinning(i=>{var r,l;if(n==="right"){var a,d;return{left:((a=i==null?void 0:i.left)!=null?a:[]).filter(f=>!(o!=null&&o.includes(f))),right:[...((d=i==null?void 0:i.right)!=null?d:[]).filter(f=>!(o!=null&&o.includes(f))),...o]}}if(n==="left"){var c,u;return{left:[...((c=i==null?void 0:i.left)!=null?c:[]).filter(f=>!(o!=null&&o.includes(f))),...o],right:((u=i==null?void 0:i.right)!=null?u:[]).filter(f=>!(o!=null&&o.includes(f)))}}return{left:((r=i==null?void 0:i.left)!=null?r:[]).filter(f=>!(o!=null&&o.includes(f))),right:((l=i==null?void 0:i.right)!=null?l:[]).filter(f=>!(o!=null&&o.includes(f)))}})},t.getCanPin=()=>t.getLeafColumns().some(o=>{var i,r,l;return((i=o.columnDef.enablePinning)!=null?i:!0)&&((r=(l=e.options.enableColumnPinning)!=null?l:e.options.enablePinning)!=null?r:!0)}),t.getIsPinned=()=>{const n=t.getLeafColumns().map(a=>a.id),{left:o,right:i}=e.getState().columnPinning,r=n.some(a=>o==null?void 0:o.includes(a)),l=n.some(a=>i==null?void 0:i.includes(a));return r?"left":l?"right":!1},t.getPinnedIndex=()=>{var n,o;const i=t.getIsPinned();return i?(n=(o=e.getState().columnPinning)==null||(o=o[i])==null?void 0:o.indexOf(t.id))!=null?n:-1:0}},createRow:(t,e)=>{t.pin=(n,o,i)=>{const r=o?t.getLeafRows().map(d=>{let{id:c}=d;return c}):[],l=i?t.getParentRows().map(d=>{let{id:c}=d;return c}):[],a=new Set([...l,t.id,...r]);e.setRowPinning(d=>{var c,u;if(n==="bottom"){var f,h;return{top:((f=d==null?void 0:d.top)!=null?f:[]).filter(g=>!(a!=null&&a.has(g))),bottom:[...((h=d==null?void 0:d.bottom)!=null?h:[]).filter(g=>!(a!=null&&a.has(g))),...Array.from(a)]}}if(n==="top"){var p,m;return{top:[...((p=d==null?void 0:d.top)!=null?p:[]).filter(g=>!(a!=null&&a.has(g))),...Array.from(a)],bottom:((m=d==null?void 0:d.bottom)!=null?m:[]).filter(g=>!(a!=null&&a.has(g)))}}return{top:((c=d==null?void 0:d.top)!=null?c:[]).filter(g=>!(a!=null&&a.has(g))),bottom:((u=d==null?void 0:d.bottom)!=null?u:[]).filter(g=>!(a!=null&&a.has(g)))}})},t.getCanPin=()=>{var n;const{enableRowPinning:o,enablePinning:i}=e.options;return typeof o=="function"?o(t):(n=o??i)!=null?n:!0},t.getIsPinned=()=>{const n=[t.id],{top:o,bottom:i}=e.getState().rowPinning,r=n.some(a=>o==null?void 0:o.includes(a)),l=n.some(a=>i==null?void 0:i.includes(a));return r?"top":l?"bottom":!1},t.getPinnedIndex=()=>{var n,o;const i=t.getIsPinned();if(!i)return-1;const r=(n=e._getPinnedRows(i))==null?void 0:n.map(l=>{let{id:a}=l;return a});return(o=r==null?void 0:r.indexOf(t.id))!=null?o:-1},t.getCenterVisibleCells=z(()=>[t._getAllVisibleCells(),e.getState().columnPinning.left,e.getState().columnPinning.right],(n,o,i)=>{const r=[...o??[],...i??[]];return n.filter(l=>!r.includes(l.column.id))},H(e.options,"debugRows","getCenterVisibleCells")),t.getLeftVisibleCells=z(()=>[t._getAllVisibleCells(),e.getState().columnPinning.left],(n,o)=>(o??[]).map(r=>n.find(l=>l.column.id===r)).filter(Boolean).map(r=>({...r,position:"left"})),H(e.options,"debugRows","getLeftVisibleCells")),t.getRightVisibleCells=z(()=>[t._getAllVisibleCells(),e.getState().columnPinning.right],(n,o)=>(o??[]).map(r=>n.find(l=>l.column.id===r)).filter(Boolean).map(r=>({...r,position:"right"})),H(e.options,"debugRows","getRightVisibleCells"))},createTable:t=>{t.setColumnPinning=e=>t.options.onColumnPinningChange==null?void 0:t.options.onColumnPinningChange(e),t.resetColumnPinning=e=>{var n,o;return t.setColumnPinning(e?qs():(n=(o=t.initialState)==null?void 0:o.columnPinning)!=null?n:qs())},t.getIsSomeColumnsPinned=e=>{var n;const o=t.getState().columnPinning;if(!e){var i,r;return!!((i=o.left)!=null&&i.length||(r=o.right)!=null&&r.length)}return!!((n=o[e])!=null&&n.length)},t.getLeftLeafColumns=z(()=>[t.getAllLeafColumns(),t.getState().columnPinning.left],(e,n)=>(n??[]).map(o=>e.find(i=>i.id===o)).filter(Boolean),H(t.options,"debugColumns","getLeftLeafColumns")),t.getRightLeafColumns=z(()=>[t.getAllLeafColumns(),t.getState().columnPinning.right],(e,n)=>(n??[]).map(o=>e.find(i=>i.id===o)).filter(Boolean),H(t.options,"debugColumns","getRightLeafColumns")),t.getCenterLeafColumns=z(()=>[t.getAllLeafColumns(),t.getState().columnPinning.left,t.getState().columnPinning.right],(e,n,o)=>{const i=[...n??[],...o??[]];return e.filter(r=>!i.includes(r.id))},H(t.options,"debugColumns","getCenterLeafColumns")),t.setRowPinning=e=>t.options.onRowPinningChange==null?void 0:t.options.onRowPinningChange(e),t.resetRowPinning=e=>{var n,o;return t.setRowPinning(e?Xs():(n=(o=t.initialState)==null?void 0:o.rowPinning)!=null?n:Xs())},t.getIsSomeRowsPinned=e=>{var n;const o=t.getState().rowPinning;if(!e){var i,r;return!!((i=o.top)!=null&&i.length||(r=o.bottom)!=null&&r.length)}return!!((n=o[e])!=null&&n.length)},t._getPinnedRows=z(e=>[t.getRowModel().rows,t.getState().rowPinning[e],e],(e,n,o)=>{var i;return((i=t.options.keepPinnedRows)==null||i?(n??[]).map(l=>{const a=t.getRow(l,!0);return a.getIsAllParentsExpanded()?a:null}):(n??[]).map(l=>e.find(a=>a.id===l))).filter(Boolean).map(l=>({...l,position:o}))},H(t.options,"debugRows","_getPinnedRows")),t.getTopRows=()=>t._getPinnedRows("top"),t.getBottomRows=()=>t._getPinnedRows("bottom"),t.getCenterRows=z(()=>[t.getRowModel().rows,t.getState().rowPinning.top,t.getState().rowPinning.bottom],(e,n,o)=>{const i=new Set([...n??[],...o??[]]);return e.filter(r=>!i.has(r.id))},H(t.options,"debugRows","getCenterRows"))}},a4={getInitialState:t=>({rowSelection:{},...t}),getDefaultOptions:t=>({onRowSelectionChange:Re("rowSelection",t),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:t=>{t.setRowSelection=e=>t.options.onRowSelectionChange==null?void 0:t.options.onRowSelectionChange(e),t.resetRowSelection=e=>{var n;return t.setRowSelection(e?{}:(n=t.initialState.rowSelection)!=null?n:{})},t.toggleAllRowsSelected=e=>{t.setRowSelection(n=>{e=typeof e<"u"?e:!t.getIsAllRowsSelected();const o={...n},i=t.getPreGroupedRowModel().flatRows;return e?i.forEach(r=>{r.getCanSelect()&&(o[r.id]=!0)}):i.forEach(r=>{delete o[r.id]}),o})},t.toggleAllPageRowsSelected=e=>t.setRowSelection(n=>{const o=typeof e<"u"?e:!t.getIsAllPageRowsSelected(),i={...n};return t.getRowModel().rows.forEach(r=>{Ks(i,r.id,o,!0,t)}),i}),t.getPreSelectedRowModel=()=>t.getCoreRowModel(),t.getSelectedRowModel=z(()=>[t.getState().rowSelection,t.getCoreRowModel()],(e,n)=>Object.keys(e).length?Zs(t,n):{rows:[],flatRows:[],rowsById:{}},H(t.options,"debugTable","getSelectedRowModel")),t.getFilteredSelectedRowModel=z(()=>[t.getState().rowSelection,t.getFilteredRowModel()],(e,n)=>Object.keys(e).length?Zs(t,n):{rows:[],flatRows:[],rowsById:{}},H(t.options,"debugTable","getFilteredSelectedRowModel")),t.getGroupedSelectedRowModel=z(()=>[t.getState().rowSelection,t.getSortedRowModel()],(e,n)=>Object.keys(e).length?Zs(t,n):{rows:[],flatRows:[],rowsById:{}},H(t.options,"debugTable","getGroupedSelectedRowModel")),t.getIsAllRowsSelected=()=>{const e=t.getFilteredRowModel().flatRows,{rowSelection:n}=t.getState();let o=!!(e.length&&Object.keys(n).length);return o&&e.some(i=>i.getCanSelect()&&!n[i.id])&&(o=!1),o},t.getIsAllPageRowsSelected=()=>{const e=t.getPaginationRowModel().flatRows.filter(i=>i.getCanSelect()),{rowSelection:n}=t.getState();let o=!!e.length;return o&&e.some(i=>!n[i.id])&&(o=!1),o},t.getIsSomeRowsSelected=()=>{var e;const n=Object.keys((e=t.getState().rowSelection)!=null?e:{}).length;return n>0&&n<t.getFilteredRowModel().flatRows.length},t.getIsSomePageRowsSelected=()=>{const e=t.getPaginationRowModel().flatRows;return t.getIsAllPageRowsSelected()?!1:e.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},t.getToggleAllRowsSelectedHandler=()=>e=>{t.toggleAllRowsSelected(e.target.checked)},t.getToggleAllPageRowsSelectedHandler=()=>e=>{t.toggleAllPageRowsSelected(e.target.checked)}},createRow:(t,e)=>{t.toggleSelected=(n,o)=>{const i=t.getIsSelected();e.setRowSelection(r=>{var l;if(n=typeof n<"u"?n:!i,t.getCanSelect()&&i===n)return r;const a={...r};return Ks(a,t.id,n,(l=o==null?void 0:o.selectChildren)!=null?l:!0,e),a})},t.getIsSelected=()=>{const{rowSelection:n}=e.getState();return Js(t,n)},t.getIsSomeSelected=()=>{const{rowSelection:n}=e.getState();return Qs(t,n)==="some"},t.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=e.getState();return Qs(t,n)==="all"},t.getCanSelect=()=>{var n;return typeof e.options.enableRowSelection=="function"?e.options.enableRowSelection(t):(n=e.options.enableRowSelection)!=null?n:!0},t.getCanSelectSubRows=()=>{var n;return typeof e.options.enableSubRowSelection=="function"?e.options.enableSubRowSelection(t):(n=e.options.enableSubRowSelection)!=null?n:!0},t.getCanMultiSelect=()=>{var n;return typeof e.options.enableMultiRowSelection=="function"?e.options.enableMultiRowSelection(t):(n=e.options.enableMultiRowSelection)!=null?n:!0},t.getToggleSelectedHandler=()=>{const n=t.getCanSelect();return o=>{var i;n&&t.toggleSelected((i=o.target)==null?void 0:i.checked)}}}},Ks=(t,e,n,o,i)=>{var r;const l=i.getRow(e,!0);n?(l.getCanMultiSelect()||Object.keys(t).forEach(a=>delete t[a]),l.getCanSelect()&&(t[e]=!0)):delete t[e],o&&(r=l.subRows)!=null&&r.length&&l.getCanSelectSubRows()&&l.subRows.forEach(a=>Ks(t,a.id,n,o,i))};function Zs(t,e){const n=t.getState().rowSelection,o=[],i={},r=function(l,a){return l.map(d=>{var c;const u=Js(d,n);if(u&&(o.push(d),i[d.id]=d),(c=d.subRows)!=null&&c.length&&(d={...d,subRows:r(d.subRows)}),u)return d}).filter(Boolean)};return{rows:r(e.rows),flatRows:o,rowsById:i}}function Js(t,e){var n;return(n=e[t.id])!=null?n:!1}function Qs(t,e,n){var o;if(!((o=t.subRows)!=null&&o.length))return!1;let i=!0,r=!1;return t.subRows.forEach(l=>{if(!(r&&!i)&&(l.getCanSelect()&&(Js(l,e)?r=!0:i=!1),l.subRows&&l.subRows.length)){const a=Qs(l,e);a==="all"?r=!0:(a==="some"&&(r=!0),i=!1)}}),i?"all":r?"some":!1}const er=/([0-9]+)/gm,d4=(t,e,n)=>Mc(kt(t.getValue(n)).toLowerCase(),kt(e.getValue(n)).toLowerCase()),c4=(t,e,n)=>Mc(kt(t.getValue(n)),kt(e.getValue(n))),u4=(t,e,n)=>tr(kt(t.getValue(n)).toLowerCase(),kt(e.getValue(n)).toLowerCase()),f4=(t,e,n)=>tr(kt(t.getValue(n)),kt(e.getValue(n))),h4=(t,e,n)=>{const o=t.getValue(n),i=e.getValue(n);return o>i?1:o<i?-1:0},p4=(t,e,n)=>tr(t.getValue(n),e.getValue(n));function tr(t,e){return t===e?0:t>e?1:-1}function kt(t){return typeof t=="number"?isNaN(t)||t===1/0||t===-1/0?"":String(t):typeof t=="string"?t:""}function Mc(t,e){const n=t.split(er).filter(Boolean),o=e.split(er).filter(Boolean);for(;n.length&&o.length;){const i=n.shift(),r=o.shift(),l=parseInt(i,10),a=parseInt(r,10),d=[l,a].sort();if(isNaN(d[0])){if(i>r)return 1;if(r>i)return-1;continue}if(isNaN(d[1]))return isNaN(l)?-1:1;if(l>a)return 1;if(a>l)return-1}return n.length-o.length}const Gn={alphanumeric:d4,alphanumericCaseSensitive:c4,text:u4,textCaseSensitive:f4,datetime:h4,basic:p4},m4={getInitialState:t=>({sorting:[],...t}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:t=>({onSortingChange:Re("sorting",t),isMultiSortEvent:e=>e.shiftKey}),createColumn:(t,e)=>{t.getAutoSortingFn=()=>{const n=e.getFilteredRowModel().flatRows.slice(10);let o=!1;for(const i of n){const r=i==null?void 0:i.getValue(t.id);if(Object.prototype.toString.call(r)==="[object Date]")return Gn.datetime;if(typeof r=="string"&&(o=!0,r.split(er).length>1))return Gn.alphanumeric}return o?Gn.text:Gn.basic},t.getAutoSortDir=()=>{const n=e.getFilteredRowModel().flatRows[0];return typeof(n==null?void 0:n.getValue(t.id))=="string"?"asc":"desc"},t.getSortingFn=()=>{var n,o;if(!t)throw new Error;return ei(t.columnDef.sortingFn)?t.columnDef.sortingFn:t.columnDef.sortingFn==="auto"?t.getAutoSortingFn():(n=(o=e.options.sortingFns)==null?void 0:o[t.columnDef.sortingFn])!=null?n:Gn[t.columnDef.sortingFn]},t.toggleSorting=(n,o)=>{const i=t.getNextSortingOrder(),r=typeof n<"u"&&n!==null;e.setSorting(l=>{const a=l==null?void 0:l.find(p=>p.id===t.id),d=l==null?void 0:l.findIndex(p=>p.id===t.id);let c=[],u,f=r?n:i==="desc";if(l!=null&&l.length&&t.getCanMultiSort()&&o?a?u="toggle":u="add":l!=null&&l.length&&d!==l.length-1?u="replace":a?u="toggle":u="replace",u==="toggle"&&(r||i||(u="remove")),u==="add"){var h;c=[...l,{id:t.id,desc:f}],c.splice(0,c.length-((h=e.options.maxMultiSortColCount)!=null?h:Number.MAX_SAFE_INTEGER))}else u==="toggle"?c=l.map(p=>p.id===t.id?{...p,desc:f}:p):u==="remove"?c=l.filter(p=>p.id!==t.id):c=[{id:t.id,desc:f}];return c})},t.getFirstSortDir=()=>{var n,o;return((n=(o=t.columnDef.sortDescFirst)!=null?o:e.options.sortDescFirst)!=null?n:t.getAutoSortDir()==="desc")?"desc":"asc"},t.getNextSortingOrder=n=>{var o,i;const r=t.getFirstSortDir(),l=t.getIsSorted();return l?l!==r&&((o=e.options.enableSortingRemoval)==null||o)&&(!(n&&(i=e.options.enableMultiRemove)!=null)||i)?!1:l==="desc"?"asc":"desc":r},t.getCanSort=()=>{var n,o;return((n=t.columnDef.enableSorting)!=null?n:!0)&&((o=e.options.enableSorting)!=null?o:!0)&&!!t.accessorFn},t.getCanMultiSort=()=>{var n,o;return(n=(o=t.columnDef.enableMultiSort)!=null?o:e.options.enableMultiSort)!=null?n:!!t.accessorFn},t.getIsSorted=()=>{var n;const o=(n=e.getState().sorting)==null?void 0:n.find(i=>i.id===t.id);return o?o.desc?"desc":"asc":!1},t.getSortIndex=()=>{var n,o;return(n=(o=e.getState().sorting)==null?void 0:o.findIndex(i=>i.id===t.id))!=null?n:-1},t.clearSorting=()=>{e.setSorting(n=>n!=null&&n.length?n.filter(o=>o.id!==t.id):[])},t.getToggleSortingHandler=()=>{const n=t.getCanSort();return o=>{n&&(o.persist==null||o.persist(),t.toggleSorting==null||t.toggleSorting(void 0,t.getCanMultiSort()?e.options.isMultiSortEvent==null?void 0:e.options.isMultiSortEvent(o):!1))}}},createTable:t=>{t.setSorting=e=>t.options.onSortingChange==null?void 0:t.options.onSortingChange(e),t.resetSorting=e=>{var n,o;t.setSorting(e?[]:(n=(o=t.initialState)==null?void 0:o.sorting)!=null?n:[])},t.getPreSortedRowModel=()=>t.getGroupedRowModel(),t.getSortedRowModel=()=>(!t._getSortedRowModel&&t.options.getSortedRowModel&&(t._getSortedRowModel=t.options.getSortedRowModel(t)),t.options.manualSorting||!t._getSortedRowModel?t.getPreSortedRowModel():t._getSortedRowModel())}},g4={getInitialState:t=>({columnVisibility:{},...t}),getDefaultOptions:t=>({onColumnVisibilityChange:Re("columnVisibility",t)}),createColumn:(t,e)=>{t.toggleVisibility=n=>{t.getCanHide()&&e.setColumnVisibility(o=>({...o,[t.id]:n??!t.getIsVisible()}))},t.getIsVisible=()=>{var n,o;const i=t.columns;return(n=i.length?i.some(r=>r.getIsVisible()):(o=e.getState().columnVisibility)==null?void 0:o[t.id])!=null?n:!0},t.getCanHide=()=>{var n,o;return((n=t.columnDef.enableHiding)!=null?n:!0)&&((o=e.options.enableHiding)!=null?o:!0)},t.getToggleVisibilityHandler=()=>n=>{t.toggleVisibility==null||t.toggleVisibility(n.target.checked)}},createRow:(t,e)=>{t._getAllVisibleCells=z(()=>[t.getAllCells(),e.getState().columnVisibility],n=>n.filter(o=>o.column.getIsVisible()),H(e.options,"debugRows","_getAllVisibleCells")),t.getVisibleCells=z(()=>[t.getLeftVisibleCells(),t.getCenterVisibleCells(),t.getRightVisibleCells()],(n,o,i)=>[...n,...o,...i],H(e.options,"debugRows","getVisibleCells"))},createTable:t=>{const e=(n,o)=>z(()=>[o(),o().filter(i=>i.getIsVisible()).map(i=>i.id).join("_")],i=>i.filter(r=>r.getIsVisible==null?void 0:r.getIsVisible()),H(t.options,"debugColumns",n));t.getVisibleFlatColumns=e("getVisibleFlatColumns",()=>t.getAllFlatColumns()),t.getVisibleLeafColumns=e("getVisibleLeafColumns",()=>t.getAllLeafColumns()),t.getLeftVisibleLeafColumns=e("getLeftVisibleLeafColumns",()=>t.getLeftLeafColumns()),t.getRightVisibleLeafColumns=e("getRightVisibleLeafColumns",()=>t.getRightLeafColumns()),t.getCenterVisibleLeafColumns=e("getCenterVisibleLeafColumns",()=>t.getCenterLeafColumns()),t.setColumnVisibility=n=>t.options.onColumnVisibilityChange==null?void 0:t.options.onColumnVisibilityChange(n),t.resetColumnVisibility=n=>{var o;t.setColumnVisibility(n?{}:(o=t.initialState.columnVisibility)!=null?o:{})},t.toggleAllColumnsVisible=n=>{var o;n=(o=n)!=null?o:!t.getIsAllColumnsVisible(),t.setColumnVisibility(t.getAllLeafColumns().reduce((i,r)=>({...i,[r.id]:n||!(r.getCanHide!=null&&r.getCanHide())}),{}))},t.getIsAllColumnsVisible=()=>!t.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),t.getIsSomeColumnsVisible=()=>t.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),t.getToggleAllColumnsVisibilityHandler=()=>n=>{var o;t.toggleAllColumnsVisible((o=n.target)==null?void 0:o.checked)}}};function qn(t,e){return e?e==="center"?t.getCenterVisibleLeafColumns():e==="left"?t.getLeftVisibleLeafColumns():t.getRightVisibleLeafColumns():t.getVisibleLeafColumns()}const Dc=[J3,g4,s4,l4,n4,m4,o4,t4,r4,a4,Q3];function y4(t){var e;(t.debugAll||t.debugTable)&&console.info("Creating Table Instance...");let n={_features:Dc};const o=n._features.reduce((u,f)=>Object.assign(u,f.getDefaultOptions==null?void 0:f.getDefaultOptions(n)),{}),i=u=>n.options.mergeOptions?n.options.mergeOptions(o,u):{...o,...u};let l={...{},...(e=t.initialState)!=null?e:{}};n._features.forEach(u=>{var f;l=(f=u.getInitialState==null?void 0:u.getInitialState(l))!=null?f:l});const a=[];let d=!1;const c={_features:Dc,options:{...o,...t},initialState:l,_queue:u=>{a.push(u),d||(d=!0,Promise.resolve().then(()=>{for(;a.length;)a.shift()();d=!1}).catch(f=>setTimeout(()=>{throw f})))},reset:()=>{n.setState(n.initialState)},setOptions:u=>{const f=xt(u,n.options);n.options=i(f)},getState:()=>n.options.state,setState:u=>{n.options.onStateChange==null||n.options.onStateChange(u)},_getRowId:(u,f,h)=>{var p;return(p=n.options.getRowId==null?void 0:n.options.getRowId(u,f,h))!=null?p:`${h?[h.id,f].join("."):f}`},getCoreRowModel:()=>(n._getCoreRowModel||(n._getCoreRowModel=n.options.getCoreRowModel(n)),n._getCoreRowModel()),getRowModel:()=>n.getPaginationRowModel(),getRow:(u,f)=>{let h=(f?n.getPrePaginationRowModel():n.getRowModel()).rowsById[u];if(!h&&(h=n.getCoreRowModel().rowsById[u],!h))throw process.env.NODE_ENV!=="production"?new Error(`getRow could not find row with ID: ${u}`):new Error;return h},_getDefaultColumnDef:z(()=>[n.options.defaultColumn],u=>{var f;return u=(f=u)!=null?f:{},{header:h=>{const p=h.header.column.columnDef;return p.accessorKey?p.accessorKey:p.accessorFn?p.id:null},cell:h=>{var p,m;return(p=(m=h.renderValue())==null||m.toString==null?void 0:m.toString())!=null?p:null},...n._features.reduce((h,p)=>Object.assign(h,p.getDefaultColumnDef==null?void 0:p.getDefaultColumnDef()),{}),...u}},H(t,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>n.options.columns,getAllColumns:z(()=>[n._getColumnDefs()],u=>{const f=function(h,p,m){return m===void 0&&(m=0),h.map(g=>{const y=Z3(n,g,m,p),b=g;return y.columns=b.columns?f(b.columns,y,m+1):[],y})};return f(u)},H(t,"debugColumns","getAllColumns")),getAllFlatColumns:z(()=>[n.getAllColumns()],u=>u.flatMap(f=>f.getFlatColumns()),H(t,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:z(()=>[n.getAllFlatColumns()],u=>u.reduce((f,h)=>(f[h.id]=h,f),{}),H(t,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:z(()=>[n.getAllColumns(),n._getOrderColumnsFn()],(u,f)=>{let h=u.flatMap(p=>p.getLeafColumns());return f(h)},H(t,"debugColumns","getAllLeafColumns")),getColumn:u=>{const f=n._getAllFlatColumnsById()[u];return process.env.NODE_ENV!=="production"&&!f&&console.error(`[Table] Column with id '${u}' does not exist.`),f}};Object.assign(n,c);for(let u=0;u<n._features.length;u++){const f=n._features[u];f==null||f.createTable==null||f.createTable(n)}return n}function b4(t,e,n,o){const i=()=>{var l;return(l=r.getValue())!=null?l:t.options.renderFallbackValue},r={id:`${e.id}_${n.id}`,row:e,column:n,getValue:()=>e.getValue(o),renderValue:i,getContext:z(()=>[t,n,e,r],(l,a,d,c)=>({table:l,column:a,row:d,cell:c,getValue:c.getValue,renderValue:c.renderValue}),H(t.options,"debugCells","cell.getContext"))};return t._features.forEach(l=>{l.createCell==null||l.createCell(r,n,e,t)},{}),r}const nr=(t,e,n,o,i,r,l)=>{let a={id:e,index:o,original:n,depth:i,parentId:l,_valuesCache:{},_uniqueValuesCache:{},getValue:d=>{if(a._valuesCache.hasOwnProperty(d))return a._valuesCache[d];const c=t.getColumn(d);if(c!=null&&c.accessorFn)return a._valuesCache[d]=c.accessorFn(a.original,o),a._valuesCache[d]},getUniqueValues:d=>{if(a._uniqueValuesCache.hasOwnProperty(d))return a._uniqueValuesCache[d];const c=t.getColumn(d);if(c!=null&&c.accessorFn)return c.columnDef.getUniqueValues?(a._uniqueValuesCache[d]=c.columnDef.getUniqueValues(a.original,o),a._uniqueValuesCache[d]):(a._uniqueValuesCache[d]=[a.getValue(d)],a._uniqueValuesCache[d])},renderValue:d=>{var c;return(c=a.getValue(d))!=null?c:t.options.renderFallbackValue},subRows:r??[],getLeafRows:()=>K3(a.subRows,d=>d.subRows),getParentRow:()=>a.parentId?t.getRow(a.parentId,!0):void 0,getParentRows:()=>{let d=[],c=a;for(;;){const u=c.getParentRow();if(!u)break;d.push(u),c=u}return d.reverse()},getAllCells:z(()=>[t.getAllLeafColumns()],d=>d.map(c=>b4(t,a,c,c.id)),H(t.options,"debugRows","getAllCells")),_getAllCellsByColumnId:z(()=>[a.getAllCells()],d=>d.reduce((c,u)=>(c[u.column.id]=u,c),{}),H(t.options,"debugRows","getAllCellsByColumnId"))};for(let d=0;d<t._features.length;d++){const c=t._features[d];c==null||c.createRow==null||c.createRow(a,t)}return a};function $4(){return t=>z(()=>[t.options.data],e=>{const n={rows:[],flatRows:[],rowsById:{}},o=function(i,r,l){r===void 0&&(r=0);const a=[];for(let c=0;c<i.length;c++){const u=nr(t,t._getRowId(i[c],c,l),i[c],c,r,void 0,l==null?void 0:l.id);if(n.flatRows.push(u),n.rowsById[u.id]=u,a.push(u),t.options.getSubRows){var d;u.originalSubRows=t.options.getSubRows(i[c],c),(d=u.originalSubRows)!=null&&d.length&&(u.subRows=o(u.originalSubRows,r+1,u))}}return a};return n.rows=o(e),n},H(t.options,"debugTable","getRowModel",()=>t._autoResetPageIndex()))}function _4(t,e,n){return n.options.filterFromLeafRows?w4(t,e,n):C4(t,e,n)}function w4(t,e,n){var o;const i=[],r={},l=(o=n.options.maxLeafRowFilterDepth)!=null?o:100,a=function(d,c){c===void 0&&(c=0);const u=[];for(let h=0;h<d.length;h++){var f;let p=d[h];const m=nr(n,p.id,p.original,p.index,p.depth,void 0,p.parentId);if(m.columnFilters=p.columnFilters,(f=p.subRows)!=null&&f.length&&c<l){if(m.subRows=a(p.subRows,c+1),p=m,e(p)&&!m.subRows.length){u.push(p),r[p.id]=p,i.push(p);continue}if(e(p)||m.subRows.length){u.push(p),r[p.id]=p,i.push(p);continue}}else p=m,e(p)&&(u.push(p),r[p.id]=p,i.push(p))}return u};return{rows:a(t),flatRows:i,rowsById:r}}function C4(t,e,n){var o;const i=[],r={},l=(o=n.options.maxLeafRowFilterDepth)!=null?o:100,a=function(d,c){c===void 0&&(c=0);const u=[];for(let h=0;h<d.length;h++){let p=d[h];if(e(p)){var f;if((f=p.subRows)!=null&&f.length&&c<l){const g=nr(n,p.id,p.original,p.index,p.depth,void 0,p.parentId);g.subRows=a(p.subRows,c+1),p=g}u.push(p),i.push(p),r[p.id]=p}}return u};return{rows:a(t),flatRows:i,rowsById:r}}function x4(){return t=>z(()=>[t.getPreFilteredRowModel(),t.getState().columnFilters,t.getState().globalFilter],(e,n,o)=>{if(!e.rows.length||!(n!=null&&n.length)&&!o){for(let h=0;h<e.flatRows.length;h++)e.flatRows[h].columnFilters={},e.flatRows[h].columnFiltersMeta={};return e}const i=[],r=[];(n??[]).forEach(h=>{var p;const m=t.getColumn(h.id);if(!m)return;const g=m.getFilterFn();if(!g){process.env.NODE_ENV!=="production"&&console.warn(`Could not find a valid 'column.filterFn' for column with the ID: ${m.id}.`);return}i.push({id:h.id,filterFn:g,resolvedValue:(p=g.resolveFilterValue==null?void 0:g.resolveFilterValue(h.value))!=null?p:h.value})});const l=n.map(h=>h.id),a=t.getGlobalFilterFn(),d=t.getAllLeafColumns().filter(h=>h.getCanGlobalFilter());o&&a&&d.length&&(l.push("__global__"),d.forEach(h=>{var p;r.push({id:h.id,filterFn:a,resolvedValue:(p=a.resolveFilterValue==null?void 0:a.resolveFilterValue(o))!=null?p:o})}));let c,u;for(let h=0;h<e.flatRows.length;h++){const p=e.flatRows[h];if(p.columnFilters={},i.length)for(let m=0;m<i.length;m++){c=i[m];const g=c.id;p.columnFilters[g]=c.filterFn(p,g,c.resolvedValue,y=>{p.columnFiltersMeta[g]=y})}if(r.length){for(let m=0;m<r.length;m++){u=r[m];const g=u.id;if(u.filterFn(p,g,u.resolvedValue,y=>{p.columnFiltersMeta[g]=y})){p.columnFilters.__global__=!0;break}}p.columnFilters.__global__!==!0&&(p.columnFilters.__global__=!1)}}const f=h=>{for(let p=0;p<l.length;p++)if(h.columnFilters[l[p]]===!1)return!1;return!0};return _4(e.rows,f,t)},H(t.options,"debugTable","getFilteredRowModel",()=>t._autoResetPageIndex()))}function k4(){return t=>z(()=>[t.getState().sorting,t.getPreSortedRowModel()],(e,n)=>{if(!n.rows.length||!(e!=null&&e.length))return n;const o=t.getState().sorting,i=[],r=o.filter(d=>{var c;return(c=t.getColumn(d.id))==null?void 0:c.getCanSort()}),l={};r.forEach(d=>{const c=t.getColumn(d.id);c&&(l[d.id]={sortUndefined:c.columnDef.sortUndefined,invertSorting:c.columnDef.invertSorting,sortingFn:c.getSortingFn()})});const a=d=>{const c=d.map(u=>({...u}));return c.sort((u,f)=>{for(let p=0;p<r.length;p+=1){var h;const m=r[p],g=l[m.id],y=(h=m==null?void 0:m.desc)!=null?h:!1;let b=0;if(g.sortUndefined){const $=u.getValue(m.id),w=f.getValue(m.id),S=$===void 0,x=w===void 0;(S||x)&&(b=S&&x?0:S?g.sortUndefined:-g.sortUndefined)}if(b===0&&(b=g.sortingFn(u,f,m.id)),b!==0)return y&&(b*=-1),g.invertSorting&&(b*=-1),b}return u.index-f.index}),c.forEach(u=>{var f;i.push(u),(f=u.subRows)!=null&&f.length&&(u.subRows=a(u.subRows))}),c};return{rows:a(n.rows),flatRows:i,rowsById:n.rowsById}},H(t.options,"debugTable","getSortedRowModel",()=>t._autoResetPageIndex()))}function S4(){return t=>z(()=>[t.getState().expanded,t.getPreExpandedRowModel(),t.options.paginateExpandedRows],(e,n,o)=>!n.rows.length||e!==!0&&!Object.keys(e??{}).length||!o?n:Ec(n),H(t.options,"debugTable","getExpandedRowModel"))}function Ec(t){const e=[],n=o=>{var i;e.push(o),(i=o.subRows)!=null&&i.length&&o.getIsExpanded()&&o.subRows.forEach(n)};return t.rows.forEach(n),{rows:e,flatRows:t.flatRows,rowsById:t.rowsById}}function v4(t){return e=>z(()=>[e.getState().pagination,e.getPrePaginationRowModel(),e.options.paginateExpandedRows?void 0:e.getState().expanded],(n,o)=>{if(!o.rows.length)return o;const{pageSize:i,pageIndex:r}=n;let{rows:l,flatRows:a,rowsById:d}=o;const c=i*r,u=c+i;l=l.slice(c,u);let f;e.options.paginateExpandedRows?f={rows:l,flatRows:a,rowsById:d}:f=Ec({rows:l,flatRows:a,rowsById:d}),f.flatRows=[];const h=p=>{f.flatRows.push(p),p.subRows.length&&p.subRows.forEach(h)};return f.rows.forEach(h),f},H(e.options,"debugTable","getPaginationRowModel"))}/**
46
46
  * vue-table
47
47
  *
48
48
  * Copyright (c) TanStack
@@ -51,5 +51,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
51
51
  * LICENSE.md file in the root directory of this source tree.
52
52
  *
53
53
  * @license MIT
54
- */function ii(){return!0}const V_=Symbol("merge-proxy"),P_={get(t,e,n){return e===V_?n:t.get(e)},has(t,e){return t.has(e)},set:ii,deleteProperty:ii,getOwnPropertyDescriptor(t,e){return{configurable:!0,enumerable:!0,get(){return t.get(e)},set:ii,deleteProperty:ii}},ownKeys(t){return t.keys()}};function os(t){return"value"in t?t.value:t}function ri(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return new Proxy({get(o){for(let i=e.length-1;i>=0;i--){const s=os(e[i])[o];if(s!==void 0)return s}},has(o){for(let i=e.length-1;i>=0;i--)if(o in os(e[i]))return!0;return!1},keys(){const o=[];for(let i=0;i<e.length;i++)o.push(...Object.keys(os(e[i])));return[...Array.from(new Set(o))]}},P_)}const Dc=r.defineComponent({props:["render","props"],setup:t=>()=>typeof t.render=="function"||typeof t.render=="object"?r.h(t.render,t.props):t.render});function R_(t){const e=ri({state:{},onStateChange:()=>{},renderFallbackValue:null,mergeOptions(i,s){return ri(i,s)}},t),n=w_(e),o=r.ref(n.initialState);return r.watchEffect(()=>{n.setOptions(i=>{var s;const l=new Proxy({},{get:(a,d)=>o.value[d]});return ri(i,t,{state:ri(l,(s=t.state)!=null?s:{}),onStateChange:a=>{a instanceof Function?o.value=a(o.value):o.value=a,t.onStateChange==null||t.onStateChange(a)}})})}),n}const F_=["checked","disabled","indeterminate"],Ec=K(r.defineComponent({__name:"FmTableCheckbox",props:{checked:{type:Boolean},disabled:{type:Boolean},indeterminate:{type:Boolean},onChange:{type:Function}},setup(t){const e=t,n=r.computed(()=>e.indeterminate&&!e.checked?"remove":e.checked?"check_small":"");return(o,i)=>(r.openBlock(),r.createElementBlock("div",{class:"fm-checkbox__input--container",onClick:i[0]||(i[0]=(...s)=>o.onChange&&o.onChange(...s))},[r.createElementVNode("input",{class:r.normalizeClass({"fm-checkbox__input--btn":!0,"fm-checkbox__input--btn--checked":o.checked}),type:"checkbox",checked:o.checked,disabled:o.disabled,indeterminate:o.indeterminate},null,10,F_),o.indeterminate||o.checked?(r.openBlock(),r.createBlock(j,{key:0,class:"fm-checkbox__input--checkmark",name:n.value,size:"md",color:"#FFFFFF"},null,8,["name"])):r.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-2508b8c4"]]),N_={class:"bg-fm-color-neutral-white flex flex-col max-h-[264px] overflow-y-auto px-4 py-12 rounded-md shadow-light-300 w-[75px]"},Bc=r.defineComponent({__name:"FmTableSelection",props:{modelValue:{},items:{}},emits:["update:modelValue"],setup(t){const n=Z(t,"modelValue"),o=r.ref(!1);return(i,s)=>(r.openBlock(),r.createBlock(Ct,{onMenuChanged:s[0]||(s[0]=l=>o.value=l)},{"menu-button":r.withCtx(()=>{var l;return[r.createVNode(J,{variant:"secondary",label:(l=i.items.find(a=>a.value===i.modelValue))==null?void 0:l.label,size:"md",icon:o.value?"expand_less":"expand_more","icon-position":"append"},null,8,["label","icon"])]}),"menu-wrapper":r.withCtx(()=>[r.createElementVNode("div",N_,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.items,l=>(r.openBlock(),r.createBlock(Pe,{key:l.value,"model-value":l.value===r.unref(n),label:l.label,value:l.value,"onUpdate:modelValue":a=>n.value=l.value},null,8,["model-value","label","value","onUpdate:modelValue"]))),128))])]),_:1}))}}),A_={class:"flex flex-col relative"},O_={class:"h-full overflow-auto"},I_={class:"w-full"},T_=["colSpan","onClick"],L_={class:"flex gap-8 items-center justify-between"},z_={class:"-translate-x-1/2 -translate-y-1/2 absolute flex flex-col gap-16 left-1/2 top-1/2"},H_=r.createElementVNode("span",{class:"text-fm-color-typo-secondary"},"Loading data...",-1),j_={class:"fm-typo-body-lg-400 line-clamp-2 w-full"},W_={className:"h-72 flex items-center justify-between px-24 xs:px-0 shrink-0"},Y_={class:"flex gap-24 items-center justify-between xs:hidden"},U_={class:"flex gap-8 items-center"},G_=r.createElementVNode("span",{class:"fm-typo-body-lg-400 text-fm-color-typo-primary"}," Items per page: ",-1),q_={class:"fm-typo-body-lg-400 text-fm-color-typo-secondary"},X_={class:"flex gap-8 items-center xs:w-full"},K_={class:"fm-typo-body-lg-400 text-fm-color-typo-primary xs:mx-auto"},Z_=r.defineComponent({__name:"FmTable",props:{modelValue:{default:{}},selection:{default:void 0},rowData:{default:()=>[]},columnDefs:{default:()=>[]},columnFilter:{default:void 0},searchValue:{default:""},pageCount:{default:0},rowCount:{default:void 0},fetchFn:{type:Function,default:void 0},pageSize:{default:10},loading:{type:Boolean,default:void 0},pinHeaderRow:{type:Boolean,default:!0}},setup(t){const e=t,n=Z(e,"modelValue"),o=Z(e,"searchValue"),i=()=>{const g=e.columnDefs;return e.selection&&g.unshift({id:"row-selection",header:({table:y})=>r.createVNode(Ec,{checked:y.getIsAllPageRowsSelected(),indeterminate:y.getIsSomePageRowsSelected(),onChange:y.getToggleAllPageRowsSelectedHandler()},null),cell:({row:y})=>r.createVNode(Ec,{checked:y.getIsSelected(),disabled:!y.getCanSelect(),onChange:y.getToggleSelectedHandler()},null),enableResizing:!1,meta:{headerClass:"py-4 pl-4 pr-16",cellClass:"py-16 pl-4 pr-16",width:"60px"}}),g},s=r.ref([]),l=r.ref({pageIndex:0,pageSize:e.pageSize}),a=R_({enableRowSelection:!!e.selection,enableMultiRowSelection:e.selection==="multiple",columns:i(),get data(){return e.rowData},state:{get pagination(){return typeof e.fetchFn=="function"?l.value:void 0},get globalFilter(){return o.value},get rowSelection(){return n.value},get sorting(){return s.value}},getCoreRowModel:x_(),getSortedRowModel:D_(),getFilteredRowModel:M_(),getPaginationRowModel:B_(),onRowSelectionChange:g=>{if(!f.value)return n.value=typeof g=="function"?g(n.value):g},onSortingChange:g=>{s.value=typeof g=="function"?g(s.value):g},onGlobalFilterChange:g=>{o.value=typeof g=="function"?g(o.value):g},manualPagination:typeof e.fetchFn=="function",...typeof e.fetchFn=="function"&&{onPaginationChange:g=>l.value=typeof g=="function"?g(l.value):g},pageCount:typeof e.fetchFn=="function"?e.pageCount:void 0,getSubRows:g=>g.subRows,getExpandedRowModel:E_()});r.watch(()=>l.value,g=>{u(g)});const d=r.ref(""),c=r.ref(!1);async function u(g){if(!e.fetchFn)return;c.value=!0;const y=`${Math.random()}`;d.value=y;try{await e.fetchFn(g)}catch{}finally{d.value===y&&(c.value=!1)}}const f=r.computed(()=>{const g=c.value;return typeof e.loading=="boolean"?e.loading:g});r.watch(()=>e.rowData,()=>{a.setOptions(g=>({...g,data:e.rowData})),setTimeout(()=>{m()})}),r.watch([()=>e.pageCount,()=>e.rowCount],()=>{a.setOptions(g=>({...g,pageCount:e.pageCount,rowCount:e.rowCount}))}),r.watch(()=>e.pageSize,()=>{a.setPageSize(e.pageSize)}),r.watch([()=>e.columnFilter],([g])=>{a.setColumnFilters(()=>g??[])}),r.watch(()=>e.columnDefs,()=>{a.setOptions(g=>({...g,columns:i()}))}),r.onMounted(()=>{e.fetchFn&&e.fetchFn(a.getState().pagination),a.setPageSize(e.pageSize)});const h=r.ref(),p=r.ref(380);function m(){var y;const g=((y=h.value)==null?void 0:y.scrollHeight)??0;p.value=Math.max(100,g)}return(g,y)=>(r.openBlock(),r.createElementBlock("div",A_,[r.createElementVNode("div",O_,[r.createElementVNode("table",I_,[r.createElementVNode("thead",{class:r.normalizeClass({"bg-fm-color-neutral-white sticky top-0 z-[1]":g.pinHeaderRow})},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(a).getHeaderGroups(),b=>(r.openBlock(),r.createElementBlock("tr",{key:b.id},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(b.headers,$=>{var x,S,C,V;return r.openBlock(),r.createElementBlock("th",{key:$.id,colSpan:$.colSpan,class:r.normalizeClass(["fm-typo-body-lg-700 text-fm-color-typo-secondary border-b border-fm-color-neutral-gray-100 h-24 hover:bg-fm-color-opacity-sm",$.column.getCanSort()?"cursor-pointer select-none":"",((x=$.column.columnDef.meta)==null?void 0:x.headerClass)??"px-16 py-12"]),style:r.normalizeStyle({width:`${(S=$.column.columnDef.meta)==null?void 0:S.width}`,maxWidth:(C=$.column.columnDef.meta)==null?void 0:C.maxWidth,textAlign:((V=$.column.columnDef.meta)==null?void 0:V.textAlign)??"left"}),onClick:E=>{var F;return(F=$.column.getToggleSortingHandler())==null?void 0:F(E)}},[r.createElementVNode("div",L_,[$.isPlaceholder?r.createCommentVNode("",!0):(r.openBlock(),r.createBlock(r.unref(Dc),{key:0,render:$.column.columnDef.header,props:$.getContext()},null,8,["render","props"])),$.column.getCanSort()?(r.openBlock(),r.createBlock(j,{key:1,color:"neutral-gray-400",name:{asc:"arrow_upward",desc:"arrow_downward"}[$.column.getIsSorted()]??"unfold_more"},null,8,["name"])):r.createCommentVNode("",!0)])],14,T_)}),128))]))),128))],2),r.renderSlot(g.$slots,"pin-top"),r.createElementVNode("tbody",{ref_key:"tableDataBody",ref:h},[f.value?(r.openBlock(),r.createElementBlock("div",{key:0,class:"pointer-events-none",style:r.normalizeStyle({height:`${p.value}px`})},[r.createElementVNode("div",z_,[r.createVNode(Wt),r.createVNode(ln,{size:"xl"}),r.createElementVNode("div",null,[r.renderSlot(g.$slots,"loading-text",{},()=>[H_])]),r.createVNode(Wt)])],4)):r.createCommentVNode("",!0),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(a).getRowModel().rows,b=>(r.openBlock(),r.createElementBlock("tr",{key:b.id,class:r.normalizeClass(["border-b border-fm-color-neutral-gray-100 hover:bg-fm-color-opacity-sm",{"bg-fm-color-neutral-gray-100":b.getIsSelected()}])},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(b.getVisibleCells(),$=>{var x,S,C,V;return r.openBlock(),r.createElementBlock("td",{key:$.id,class:r.normalizeClass([f.value?"hidden":"","h-48 px-16 py-12 text-fm-color-typo-primary",((x=$.column.columnDef.meta)==null?void 0:x.cellClass)??"px-16 py-12"]),style:r.normalizeStyle({width:(S=$.column.columnDef.meta)==null?void 0:S.width,maxWidth:(C=$.column.columnDef.meta)==null?void 0:C.maxWidth,textAlign:((V=$.column.columnDef.meta)==null?void 0:V.textAlign)??"left"})},[r.createElementVNode("span",j_,[r.createVNode(r.unref(Dc),{render:$.column.columnDef.cell,props:$.getContext()},null,8,["render","props"])])],6)}),128))],2))),128))],512)])]),r.createElementVNode("div",W_,[r.createElementVNode("div",Y_,[r.createElementVNode("div",U_,[G_,r.createVNode(Bc,{"model-value":r.unref(a).getState().pagination.pageSize,items:[...Array.from(Array(5),(b,$)=>($+1)*10).map(b=>({label:b.toString(),value:b})),{label:"All",value:e.rowData.length}],"onUpdate:modelValue":y[0]||(y[0]=b=>r.unref(a).setPageSize(b))},null,8,["model-value","items"])]),r.createElementVNode("span",q_,r.toDisplayString(e.rowData.length<r.unref(a).getState().pagination.pageSize?e.rowData.length:r.unref(a).getState().pagination.pageIndex*r.unref(a).getState().pagination.pageSize+1)+" - "+r.toDisplayString((r.unref(a).getState().pagination.pageIndex+1)*r.unref(a).getState().pagination.pageSize)+" of "+r.toDisplayString(e.rowCount??e.rowData.length)+" items ",1)]),r.createElementVNode("div",X_,[r.createVNode(Bc,{"model-value":r.unref(a).getState().pagination.pageIndex+1,items:Array.from(Array(r.unref(a).getPageCount()),(b,$)=>$+1).map(b=>({label:b.toString(),value:b})),"onUpdate:modelValue":y[1]||(y[1]=b=>r.unref(a).setPageIndex(b?b-1:0))},null,8,["model-value","items"]),r.createElementVNode("span",K_," of "+r.toDisplayString(r.unref(a).getPageCount())+" pages ",1),r.createVNode(J,{disabled:!r.unref(a).getCanPreviousPage(),icon:"chevron_left",variant:"tertiary","icon-color":"neutral-black",onClick:y[2]||(y[2]=()=>r.unref(a).previousPage())},null,8,["disabled"]),r.createVNode(J,{disabled:!r.unref(a).getCanNextPage(),icon:"chevron_right",variant:"tertiary","icon-color":"neutral-black",onClick:y[3]||(y[3]=()=>r.unref(a).nextPage())},null,8,["disabled"])])])]))}}),J_=r.createElementVNode("span",{class:"fm-typo-body-lg-400 text-fm-color-typo-secondary"}," More ",-1),Q_=r.defineComponent({__name:"FmTabs",props:{modelValue:{default:null},items:{},vertical:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},showMoreAt:{default:6}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=e,i=r.ref(!1),s=r.computed(()=>({vertical:n.vertical,disabled:n.disabled})),l=r.computed(()=>{const c=n.items.slice(0,n.showMoreAt-1),u=n.items.find(h=>{var p;return h.value===n.modelValue||((p=h.children)==null?void 0:p.find(m=>m.value===n.modelValue))}),f=c.map(h=>h.value);return u&&f.includes(u.value)?n.items.slice(0,n.showMoreAt):u?[...c,u]:c}),a=r.computed(()=>{const c=l.value.map(u=>u.value);return n.items.filter(u=>!c.includes(u.value))}),d=c=>{i.value=!1,o("update:modelValue",c)};return(c,u)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["flex",c.vertical?"flex-col":"flex-row items-center"])},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.value,f=>r.renderSlot(c.$slots,"default",r.normalizeProps(r.guardReactiveProps({...f,tabsProps:s.value})),()=>[r.createVNode(pc,r.mergeProps({"model-value":n.modelValue},{children:f.children,label:f.label,icon:f.icon,disabled:f.disabled,badge:f.badge,value:f.value,tabsProps:s.value},{disabled:f.disabled===void 0?c.disabled:f.disabled,vertical:c.vertical,"onUpdate:modelValue":u[0]||(u[0]=h=>o("update:modelValue",h))}),null,16,["model-value","disabled","vertical"])])),256)),a.value.length>0?(r.openBlock(),r.createBlock(Ct,{key:0,"show-menu":i.value,class:r.normalizeClass(["max-w-[360px] min-w-[90px] rounded-sm",{"w-full":c.vertical}]),placement:c.vertical?"right-start":"bottom-start",onMenuChanged:u[1]||(u[1]=f=>i.value=f)},{"menu-button":r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass(["flex gap-8 hover:bg-fm-color-opacity-sm items-center px-16 rounded-sm",[c.vertical?"h-40":"h-[46px]"]])},[r.createVNode(j,{name:"more_vert"}),J_],2)]),default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(a.value,f=>{var h;return r.openBlock(),r.createElementBlock(r.Fragment,{key:f.value},[(h=f.children)!=null&&h.length?(r.openBlock(),r.createBlock(Ct,{key:0,placement:"right-start"},{"menu-button":r.withCtx(()=>[r.createVNode(Pe,{"model-value":n.modelValue===f.value,label:f.label,icon:f.icon,disabled:f.disabled,expandable:""},{append:r.withCtx(()=>[f.badge?(r.openBlock(),r.createBlock(Mt,{key:0,value:f.badge,inline:"",variant:"numeric"},null,8,["value"])):r.createCommentVNode("",!0)]),_:2},1032,["model-value","label","icon","disabled"])]),default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(f.children,p=>(r.openBlock(),r.createBlock(Pe,{key:p.value,"model-value":n.modelValue===p.value,label:p.label,icon:p.icon,disabled:p.disabled,onClick:m=>d(p.value)},{append:r.withCtx(()=>[p.badge?(r.openBlock(),r.createBlock(Mt,{key:0,value:p.badge,inline:"",variant:"numeric"},null,8,["value"])):r.createCommentVNode("",!0)]),_:2},1032,["model-value","label","icon","disabled","onClick"]))),128))]),_:2},1024)):(r.openBlock(),r.createBlock(Pe,{key:1,"model-value":n.modelValue===f.value,label:f.label,icon:f.icon,disabled:f.disabled,onClick:p=>d(f.value)},{append:r.withCtx(()=>[f.badge?(r.openBlock(),r.createBlock(Mt,{key:0,value:f.badge,inline:"",variant:"numeric"},null,8,["value"])):r.createCommentVNode("",!0)]),_:2},1032,["model-value","label","icon","disabled","onClick"]))],64)}),128))]),_:1},8,["show-menu","class","placement"])):r.createCommentVNode("",!0)],2))}}),e4={class:"flex flex-col"},t4=["tabindex"],n4=r.defineComponent({__name:"FmCollapsibleTab",props:{modelValue:{default:void 0},label:{default:""},icon:{default:""},disabled:{type:Boolean,default:!1},badge:{default:0},value:{default:void 0},children:{default:()=>[]},indentation:{default:1},active:{type:Boolean,default:!1},expand:{type:Boolean,default:!1},focusable:{type:Boolean,default:void 0}},setup(t){const e=t,n=Z(e,"modelValue"),o=r.computed(()=>e.children.length>0),i=r.ref(!e.expand||e.disabled),s=r.computed(()=>{if(!o.value)return 0;function h(m){return m.children?[m,...m.children.flatMap(h)]:[m]}return 56*(e.children?e.children.flatMap(h):[]).length});function l(){if(!e.disabled){if(o.value){i.value=!i.value;return}n.value=e.value}}const a=r.computed(()=>typeof e.focusable=="boolean"?e.focusable:!e.disabled&&(!i.value||!o.value));function d(h){return h.children&&h.children.length?h.children.some(d):e.modelValue===h.value}const c=r.computed(()=>{const h=d(e);return o.value?h&&i.value:h}),u=r.computed(()=>e.children?e.children.map(({modelValue:h,indentation:p,active:m,focusable:g,...y})=>{const b=d(y);return{...y,expand:b,focusable:!y.disabled&&!i.value}}):[]),f=r.computed(()=>{switch(e.indentation){case 1:return 16;case 2:return 56;case 3:return 72;default:return 80}});return(h,p)=>{const m=r.resolveComponent("FmCollapsibleTab",!0),g=r.resolveDirective("wave");return r.openBlock(),r.createElementBlock("div",e4,[r.withDirectives((r.openBlock(),r.createElementBlock("button",{class:r.normalizeClass(["flex fm-corner-radius-lg gap-12 items-center px-24 py-16 focus-visible:outline-none",{"cursor-pointer focus-visible:bg-fm-color-opacity-md hover:bg-fm-color-opacity-sm ":!h.disabled,"cursor-not-allowed":h.disabled,"bg-fm-color-system-warning-100":c.value}]),style:r.normalizeStyle({paddingLeft:`${f.value}px`}),tabindex:a.value?"0":"-1",type:"button",onClick:l},[h.icon?(r.openBlock(),r.createBlock(j,{key:0,name:h.icon,class:r.normalizeClass({"text-fm-color-typo-disabled":h.disabled,"text-fm-color-typo-primary":!h.disabled&&!c.value,"text-fm-color-primary":!h.disabled&&c.value})},null,8,["name","class"])):r.createCommentVNode("",!0),r.createElementVNode("div",{class:r.normalizeClass(["flex-1 fm-typo-body-lg-700 text-left",{"text-fm-color-typo-primary":!h.disabled,"text-fm-color-typo-disabled":h.disabled}])},r.toDisplayString(h.label),3),h.badge?(r.openBlock(),r.createBlock(Mt,{key:1,value:h.badge,inline:"",variant:"numeric"},null,8,["value"])):r.createCommentVNode("",!0),o.value?(r.openBlock(),r.createElementBlock("div",{key:2,class:"flex h-24 items-center w-24",style:r.normalizeStyle({transformOrigin:"center",transform:`rotate(${i.value?"0":"180"}deg)`,transition:"transform ease-out 250ms"})},[r.createVNode(j,{class:r.normalizeClass({"text-fm-color-neutral-gray-300":!h.disabled,"text-fm-color-typo-disabled":h.disabled}),size:"md",name:"expand_more"},null,8,["class"])],4)):r.createCommentVNode("",!0)],14,t4)),[[g,!h.disabled]]),o.value?(r.openBlock(),r.createElementBlock("div",{key:0,class:"flex flex-col overflow-hidden",style:r.normalizeStyle({maxHeight:i.value?0:`${s.value}px`,transition:"max-height 250ms",transitionTimingFunction:i.value?"ease-out":"ease-in"})},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(u.value,(y,b)=>(r.openBlock(),r.createBlock(m,r.mergeProps({key:b},y,{"model-value":r.unref(n),"onUpdate:modelValue":p[0]||(p[0]=$=>r.isRef(n)?n.value=$:null),indentation:h.indentation+1}),null,16,["model-value","indentation"]))),128))],4)):r.createCommentVNode("",!0)])}}}),o4={class:"flex flex-col"},i4=r.defineComponent({__name:"FmCollapsibleTabs",props:{modelValue:{default:void 0},items:{default:()=>[]}},setup(t){const e=t,n=Z(e,"modelValue"),o=r.computed(()=>e.items?e.items.map(({modelValue:s,...l})=>l):[]);function i(s){function l(d){return d.children?d.children.flatMap(l):[d.value]}return(s.children?s.children.flatMap(l):[s.value]).includes(e.modelValue)}return(s,l)=>(r.openBlock(),r.createElementBlock("div",o4,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.value,(a,d)=>(r.openBlock(),r.createBlock(n4,r.mergeProps({key:d},a,{"model-value":r.unref(n),"onUpdate:modelValue":l[0]||(l[0]=c=>r.isRef(n)?n.value=c:null),active:i(a),expand:i(a)}),null,16,["model-value","active","expand"]))),128))]))}}),r4=r.defineComponent({__name:"FmAvatar",props:{initials:{default:()=>""},name:{default:()=>""},src:{default:void 0},size:{default:()=>"md"}},setup(t){const e=t,n=r.computed(()=>{if(e.initials)return e.initials.slice(0,2);if(e.name){const[o,i]=e.name.split(" ");return i?`${o[0]}${i[0]}`:o.slice(0,2)}return e.src?"":"?"});return(o,i)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["inline-flex items-center justify-center rounded-xxxl uppercase",{"w-24 h-24 fm-typo-body-sm-700":o.size==="sm","w-40 h-40 fm-typo-body-md-700":o.size==="md","w-48 h-48 fm-typo-body-lg-700":o.size==="lg","w-56 h-56 fm-typo-body-lg-700":o.size==="xl","bg-fm-color-neutral-gray-100":!e.src}]),style:r.normalizeStyle({background:e.src?`url(${e.src})`:void 0,backgroundSize:e.src?"cover":void 0,backgroundPosition:e.src?"center":void 0,backgroundRepeat:e.src?"no-repeat":void 0})},r.toDisplayString(n.value),7))}}),s4=r.defineComponent({__name:"FmThumbnail",props:{src:{default:void 0},icon:{default:t=>t.src?"":"image"},size:{default:()=>"md"}},setup(t){const e=t;return(n,o)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["inline-flex items-center justify-center fm-corner-radius-md border-1 border-fm-color-neutral-gray-300",{"w-24 h-24 fm-typo-body-sm-700":n.size==="sm","w-40 h-40 fm-typo-body-md-700":n.size==="md","w-56 h-56 fm-typo-body-lg-700":n.size==="lg","w-72 h-72 fm-typo-body-lg-700":n.size==="xl","text-fm-color-neutral-gray-300 bg-fm-color-neutral-gray-100":!e.src}]),style:r.normalizeStyle({background:e.src?`url(${e.src})`:void 0,backgroundSize:e.src?"cover":void 0,backgroundPosition:e.src?"center":void 0,backgroundRepeat:e.src?"no-repeat":void 0})},[n.icon?(r.openBlock(),r.createBlock(j,{key:0,name:n.icon},null,8,["name"])):r.createCommentVNode("",!0)],6))}}),l4={class:"bg-white flex gap-4 items-center"},a4={class:"flex gap-4 items-center xs:hidden"},d4={key:1,class:"hidden xs:flex"},c4={class:"absolute bottom-16 hidden right-16 xs:inline"},Vc={FmBadge:Mt,FmBottomSheet:gs,FmBreadcrumb:fu,FmButton:J,FmButtonGroup:Mu,FmCard:Du,FmCardActionArea:Eu,FmCardActions:Vu,FmCardHeader:Ru,FmCardMedia:Nu,FmCardSection:bi,FmCardSubtitle:ks,FmCardTitle:xs,FmChip:Ss,FmChipGroup:vs,FmDialog:Tu,FmDropField:Hu,FmDynamicDialog:Ms,FmLineChart:dg,FmPieChart:mg,FmBarChart:wg,FmCheckbox:Ga,FmDatePicker:j1,FmDatePickerMobile:bd,FmDateRangePicker:Z2,FmDateRangePickerMobile:Cd,FmField:ge,FmForm:J2,FmFormGroup:Ve,FmHelperText:Xa,FmLabel:en,FmPhoneNumber:u$,FmPinField:p$,FmRadio:w$,FmRadioGroup:C$,FmSearch:ic,FmGlobalSearch:X$,FmSelect:Wo,FmStepperField:J$,FmSwitch:Cr,FmTextField:Or,FmTextarea:e3,FmTimeInput:Qo,FmTimePicker:y3,FmTimeRangePicker:S3,FmIcon:j,FmList:uc,FmListItem:fc,FmMenu:Ct,FmMenuDeprecated:cc,FmMenuDivider:$d,FmMenuHeader:M3,FmMenuItem:Pe,FmCircularProgress:ln,FmLinearProgress:P3,FmSideSheet:I3,FmSnackbar:hc,FmSpacer:Wt,FmStep:W3,FmStepper:G3,FmTab:pc,FmTable:Z_,FmTabs:Q_,FmCollapsibleTabs:i4,FmTooltip:hd,FmAvatar:r4,FmThumbnail:s4,FmPageHead:r.defineComponent({__name:"FmPageHead",props:{title:{default:()=>""},description:{default:()=>""},backButton:{type:Boolean,default:()=>!1},actions:{default:()=>[]}},emits:["click:back","click:action"],setup(t,{emit:e}){const n=t,o=e,i=r.computed(()=>{const l=[...n.actions],a=l.findIndex(h=>h.isPrimary),d=l[a],[c,u,...f]=l.filter((h,p)=>p!==a);return{primaryAction:d,firstSecondaryAction:c,secondSecondaryAction:u,showMoreSecondary:f,bottomSheetActions:l.filter(h=>!h.isPrimary),fabActions:l.filter(h=>h.isPrimary)}}),s=r.ref(!1);return(l,a)=>(r.openBlock(),r.createElementBlock("div",l4,[l.backButton?(r.openBlock(),r.createBlock(J,{key:0,type:"button",size:"md",variant:"tertiary",icon:"arrow_back","icon-color":"black",onClick:a[0]||(a[0]=d=>o("click:back"))})):r.createCommentVNode("",!0),r.createVNode(Lr,{class:"flex-grow",title:l.title,description:l.description,"title-bold":""},null,8,["title","description"]),r.createElementVNode("div",a4,[i.value.firstSecondaryAction?(r.openBlock(),r.createBlock(J,{key:0,label:i.value.firstSecondaryAction.label,"prepend-icon":i.value.firstSecondaryAction.prependIcon,"append-icon":i.value.firstSecondaryAction.appendIcon,type:"button",variant:"tertiary",size:"md",onClick:a[1]||(a[1]=d=>o("click:action",i.value.firstSecondaryAction.value))},null,8,["label","prepend-icon","append-icon"])):r.createCommentVNode("",!0),i.value.secondSecondaryAction?(r.openBlock(),r.createBlock(J,{key:1,label:i.value.secondSecondaryAction.label,"prepend-icon":i.value.secondSecondaryAction.prependIcon,"append-icon":i.value.secondSecondaryAction.appendIcon,type:"button",variant:"tertiary",size:"md",onClick:a[2]||(a[2]=d=>o("click:action",i.value.secondSecondaryAction.value))},null,8,["label","prepend-icon","append-icon"])):r.createCommentVNode("",!0),i.value.showMoreSecondary.length>1?(r.openBlock(),r.createBlock(Ct,{key:2},{"menu-button":r.withCtx(()=>[r.createVNode(J,{label:"More","append-icon":"expand_more","icon-color":"black",type:"button",variant:"tertiary",size:"md"})]),default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.value.showMoreSecondary,d=>(r.openBlock(),r.createBlock(Pe,{key:d.value,label:d.label,icon:d.prependIcon,onClick:c=>o("click:action",d.value)},null,8,["label","icon","onClick"]))),128))]),_:1})):i.value.showMoreSecondary.length===1?(r.openBlock(),r.createBlock(J,{key:3,label:i.value.showMoreSecondary[0].label,"prepend-icon":i.value.showMoreSecondary[0].prependIcon,"append-icon":i.value.showMoreSecondary[0].appendIcon,type:"button",variant:"tertiary",size:"md",onClick:a[3]||(a[3]=d=>o("click:action",i.value.showMoreSecondary[0].value))},null,8,["label","prepend-icon","append-icon"])):r.createCommentVNode("",!0),i.value.primaryAction?(r.openBlock(),r.createBlock(J,{key:4,label:i.value.primaryAction.label,"prepend-icon":i.value.primaryAction.prependIcon,"append-icon":i.value.primaryAction.appendIcon,type:"button",variant:"primary",size:"md",onClick:a[4]||(a[4]=d=>o("click:action",i.value.primaryAction.value))},null,8,["label","prepend-icon","append-icon"])):r.createCommentVNode("",!0)]),n.actions.length>0?(r.openBlock(),r.createElementBlock("div",d4,[r.createVNode(J,{type:"button",size:"md",variant:"tertiary",icon:"more_vert","icon-color":"black",onClick:a[5]||(a[5]=d=>s.value=!0)})])):r.createCommentVNode("",!0),r.createVNode(gs,{"model-value":s.value,"onUpdate:modelValue":a[6]||(a[6]=d=>s.value=d),"dismiss-away":""},{default:r.withCtx(()=>[r.createVNode(uc,null,{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.value.bottomSheetActions,d=>(r.openBlock(),r.createBlock(fc,{key:d.value,class:"hover:bg-fm-color-neutral-gray-100",label:d.label,onClick:c=>{o("click:action",d.value),s.value=!1}},null,8,["label","onClick"]))),128))]),_:1})]),_:1},8,["model-value"]),(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createElementVNode("div",c4,[i.value.primaryAction?(r.openBlock(),r.createBlock(J,{key:0,class:"fm-shadow-light-100",label:i.value.primaryAction.label,"prepend-icon":i.value.primaryAction.prependIcon,"append-icon":i.value.primaryAction.appendIcon,type:"button",variant:"fab",size:"md",onClick:a[7]||(a[7]=d=>o("click:action",i.value.primaryAction.value))},null,8,["label","prepend-icon","append-icon"])):r.createCommentVNode("",!0)])]))]))}}),FmTopSheet:rc},u4=r.defineComponent({__name:"FmTooltipDirective",props:{reference:{},placement:{default:"top"},content:{default:""},disabled:{type:Boolean,default:!1},hideArrow:{type:Boolean,default:!1}},setup(t){const e=t,n=r.ref(!1),o=r.ref(null),i=r.ref(null),s=r.computed(()=>e.reference());let l;const{floatingStyles:a,middlewareData:d,placement:c}=Hn(s,o,{whileElementsMounted:Ln,placement:e.placement,middleware:[zn(),On({mainAxis:6}),cd({element:i})]}),u=r.computed(()=>{var m,g,y,b;const p={top:"bottom",right:"left",bottom:"top",left:"right"}[c.value];return{left:((m=d.value.arrow)==null?void 0:m.x)!=null?`${(g=d.value.arrow)==null?void 0:g.x}px`:"",top:((y=d.value.arrow)==null?void 0:y.y)!=null?`${(b=d.value.arrow)==null?void 0:b.y}px`:"",[p]:"-3px"}}),f=()=>{e.disabled||(l&&clearTimeout(l),l=setTimeout(()=>{n.value=!0},250))},h=()=>{e.disabled||(l&&clearTimeout(l),l=setTimeout(()=>{n.value=!1},250))};return r.onMounted(()=>{s.value.addEventListener("pointerdown",f),s.value.addEventListener("pointermove",p=>{p.pointerType!=="touch"&&f()}),s.value.addEventListener("pointerleave",h),s.value.addEventListener("pointerup",h)}),r.onBeforeUnmount(()=>{s.value.removeEventListener("pointerdown",f),s.value.removeEventListener("pointermove",p=>{p.pointerType!=="touch"&&f()}),s.value.removeEventListener("pointerleave",h),s.value.removeEventListener("pointerup",h)}),(p,m)=>n.value&&!p.disabled?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"tooltipContent",ref:o,class:"bg-fm-color-neutral-black fm-shadow-light-300 fm-typo-body-sm-400 max-w-[240px] px-16 py-12 rounded-lg text-fm-color-typo-white",style:r.normalizeStyle(r.unref(a))},[r.withDirectives(r.createElementVNode("div",{ref_key:"arrowEl",ref:i,class:"absolute bg-fm-color-neutral-black h-8 rotate-45 rounded-[2px] w-8",style:r.normalizeStyle(u.value)},null,4),[[r.vShow,!p.hideArrow]]),r.createTextVNode(" "+r.toDisplayString(p.content),1)],4)):r.createCommentVNode("",!0)}});let is;const St=r.ref([]);let Pc=0;const f4=()=>{if(is)return;const t=document.createElement("div");document.body.appendChild(t),is=r.createApp({render:()=>St.value.map(e=>r.h(u4,e))}),is.mount(t)},si=t=>{if(t){for(const e of["top","right","bottom","left"])if(t[e])return e}return"top"},Rc=(t,e)=>{const{value:n,modifiers:o}=e;f4(),t.$_fmTooltipId=Pc,Pc+=1,typeof n=="string"?St.value.push({id:t.$_fmTooltipId,reference:()=>t,content:n.toString(),placement:si(o),hideArrow:!1}):n&&typeof n=="object"&&St.value.push({id:t.$_fmTooltipId,reference:()=>t,content:n.content.toString(),placement:si(o),disabled:n.disabled??!1,hideArrow:n.hideArrow??!1})},h4={mounted:Rc,updated:(t,e)=>{const{value:n,modifiers:o}=e,i=St.value.findIndex(s=>s.id===t.$_fmTooltipId);if(i===-1){Rc(t,e);return}typeof n=="string"?St.value[i]={id:t.$_fmTooltipId,reference:()=>t,content:n.toString(),placement:si(o),hideArrow:!1}:n&&typeof n=="object"&&(St.value[i]={id:t.$_fmTooltipId,reference:()=>t,content:n.content.toString(),disabled:n.disabled??!1,placement:si(o),hideArrow:n.hideArrow??!1})},beforeUnmount:t=>{const e=St.value.findIndex(n=>n.id===t.$_fmTooltipId);e!==-1&&St.value.splice(e,1)}},li=16,p4=r.defineComponent({__name:"FmSnackbarToast",setup(t){const{breakpoints:e}=Ao(),n=r.inject(yi),o=r.computed(()=>{var l;return[...((l=n==null?void 0:n.store)==null?void 0:l.snackbars)??[]].reduce(({currentSum:a,tops:d},c)=>{d.push({id:c.id,accumulatedHeight:a});const u=c.mountStage===vt.EXPIRED?0:li+c.renderedHeight;return{currentSum:a+u,tops:d}},{currentSum:li,tops:new Array}).tops}),i=r.computed(()=>{var s,l;return(l=(s=n==null?void 0:n.store)==null?void 0:s.snackbars)==null?void 0:l.map(a=>{var c,u,f,h,p,m;let d=0;switch(a.mountStage){case vt.PREMOUNT:{d=e.value.xs?0:li;break}case vt.MOUNTED:{d=((f=(u=(c=o.value)==null?void 0:c.find)==null?void 0:u.call(c,g=>g.id===a.id))==null?void 0:f.accumulatedHeight)||li;break}case vt.EXPIRED:{d=((m=(p=(h=o.value)==null?void 0:h.find)==null?void 0:p.call(h,g=>g.id===a.id))==null?void 0:m.accumulatedHeight)||0,d=Math.max(0,d-a.renderedHeight);break}}return{...a,top:d}})});return(s,l)=>(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.value,a=>(r.openBlock(),r.createBlock(r.Teleport,{key:a.id,to:"body"},[r.createVNode(hc,{class:"fixed transition-all",variant:a.type,title:a.title,description:a.message,action:a.action,dismissable:a.dismissable,style:r.normalizeStyle(r.unref(e).xs?{bottom:`${a.top}px`,width:"calc(100vw - 32px)",right:"16px",opacity:a.mountStage===r.unref(vt).EXPIRED?0:1}:{top:`${a.top}px`,right:a.mountStage===r.unref(vt).PREMOUNT?"-20px":"16px",opacity:a.mountStage===r.unref(vt).EXPIRED?0:1}),onVnodeMounted:d=>{var c;return(c=r.unref(n))==null?void 0:c.onSnackbarMounted(a.id,d.el.scrollHeight)},onOnAction:()=>{var d,c;(d=a==null?void 0:a.onAction)==null||d.call(a),(c=r.unref(n))==null||c.close(a.id)},onOnDismiss:()=>{var d;return(d=r.unref(n))==null?void 0:d.close(a.id)}},null,8,["variant","title","description","action","dismissable","style","onVnodeMounted","onOnAction","onOnDismiss"])]))),128))}});var vt=(t=>(t.PREMOUNT="PREMOUNT",t.MOUNTED="MOUNTED",t.EXPIRED="EXPIRED",t))(vt||{});class m4{constructor(){I(this,"store",r.reactive({snackbars:new Array}))}open(e,n){const o=Math.random().toString(16).slice(2),i=[{...e,id:o,mountStage:"PREMOUNT",duration:n===null?null:n??5e3,renderedHeight:0,type:(e==null?void 0:e.type)??"info",dismissable:typeof(e==null?void 0:e.dismissable)=="boolean"?e.dismissable:!0},...this.store.snackbars];return this.store.snackbars=i,o}onSnackbarMounted(e,n){const o=this.store.snackbars.findIndex(s=>s.id===e);if(o===-1)return;const i=this.store.snackbars[o];this.store.snackbars[o]={...i,renderedHeight:n},setTimeout(()=>{const s=this.store.snackbars[o];this.store.snackbars[o]={...s,mountStage:"MOUNTED"}}),typeof i.duration=="number"&&setTimeout(()=>{this.close(e)},i.duration)}close(e){const n=this.store.snackbars.findIndex(i=>i.id===e);if(n===-1)return;const o=this.store.snackbars[n];this.store.snackbars[n]={...o,mountStage:"EXPIRED"},setTimeout(()=>{this.removeSnackbar(e)},500)}removeSnackbar(e){const n=this.store.snackbars.findIndex(o=>o.id===e);n!==-1&&this.store.snackbars.splice(n,1)}}const g4={install(t){t.provide(yi,new m4);const e=document.body,n=r.createVNode(p4);n.appContext=t._context,r.render(n,e)}};function y4(){var t=window.navigator.userAgent,e=t.indexOf("MSIE ");if(e>0)return parseInt(t.substring(e+5,t.indexOf(".",e)),10);var n=t.indexOf("Trident/");if(n>0){var o=t.indexOf("rv:");return parseInt(t.substring(o+3,t.indexOf(".",o)),10)}var i=t.indexOf("Edge/");return i>0?parseInt(t.substring(i+5,t.indexOf(".",i)),10):-1}let ai;function rs(){rs.init||(rs.init=!0,ai=y4()!==-1)}var di={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){rs(),r.nextTick(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const t=document.createElement("object");this._resizeObject=t,t.setAttribute("aria-hidden","true"),t.setAttribute("tabindex",-1),t.onload=this.addResizeHandlers,t.type="text/html",ai&&this.$el.appendChild(t),t.data="about:blank",ai||this.$el.appendChild(t)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit("notify",{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!ai&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const b4=r.withScopeId("data-v-b329ee4c");r.pushScopeId("data-v-b329ee4c");const $4={class:"resize-observer",tabindex:"-1"};r.popScopeId();const _4=b4((t,e,n,o,i,s)=>(r.openBlock(),r.createBlock("div",$4)));di.render=_4,di.__scopeId="data-v-b329ee4c",di.__file="src/components/ResizeObserver.vue";function ci(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ci=function(e){return typeof e}:ci=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ci(t)}function w4(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Fc(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function C4(t,e,n){return e&&Fc(t.prototype,e),n&&Fc(t,n),t}function Nc(t){return x4(t)||k4(t)||S4(t)||v4()}function x4(t){if(Array.isArray(t))return ss(t)}function k4(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function S4(t,e){if(t){if(typeof t=="string")return ss(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ss(t,e)}}function ss(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function v4(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
55
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function M4(t){var e;return typeof t=="function"?e={callback:t}:e=t,e}function D4(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,i,s,l=function(d){for(var c=arguments.length,u=new Array(c>1?c-1:0),f=1;f<c;f++)u[f-1]=arguments[f];if(s=u,!(o&&d===i)){var h=n.leading;typeof h=="function"&&(h=h(d,i)),(!o||d!==i)&&h&&t.apply(void 0,[d].concat(Nc(s))),i=d,clearTimeout(o),o=setTimeout(function(){t.apply(void 0,[d].concat(Nc(s))),o=0},e)}};return l._clear=function(){clearTimeout(o),o=null},l}function Ac(t,e){if(t===e)return!0;if(ci(t)==="object"){for(var n in t)if(!Ac(t[n],e[n]))return!1;return!0}return!1}var E4=function(){function t(e,n,o){w4(this,t),this.el=e,this.observer=null,this.frozen=!1,this.createObserver(n,o)}return C4(t,[{key:"createObserver",value:function(n,o){var i=this;if(this.observer&&this.destroyObserver(),!this.frozen){if(this.options=M4(n),this.callback=function(a,d){i.options.callback(a,d),a&&i.options.once&&(i.frozen=!0,i.destroyObserver())},this.callback&&this.options.throttle){var s=this.options.throttleOptions||{},l=s.leading;this.callback=D4(this.callback,this.options.throttle,{leading:function(d){return l==="both"||l==="visible"&&d||l==="hidden"&&!d}})}this.oldResult=void 0,this.observer=new IntersectionObserver(function(a){var d=a[0];if(a.length>1){var c=a.find(function(f){return f.isIntersecting});c&&(d=c)}if(i.callback){var u=d.isIntersecting&&d.intersectionRatio>=i.threshold;if(u===i.oldResult)return;i.oldResult=u,i.callback(u,d)}},this.options.intersection),r.nextTick(function(){i.observer&&i.observer.observe(i.el)})}}},{key:"destroyObserver",value:function(){this.observer&&(this.observer.disconnect(),this.observer=null),this.callback&&this.callback._clear&&(this.callback._clear(),this.callback=null)}},{key:"threshold",get:function(){return this.options.intersection&&typeof this.options.intersection.threshold=="number"?this.options.intersection.threshold:0}}]),t}();function Oc(t,e,n){var o=e.value;if(o)if(typeof IntersectionObserver>"u")console.warn("[vue-observe-visibility] IntersectionObserver API is not available in your browser. Please install this polyfill: https://github.com/w3c/IntersectionObserver/tree/master/polyfill");else{var i=new E4(t,o,n);t._vue_visibilityState=i}}function B4(t,e,n){var o=e.value,i=e.oldValue;if(!Ac(o,i)){var s=t._vue_visibilityState;if(!o){Ic(t);return}s?s.createObserver(o,n):Oc(t,{value:o},n)}}function Ic(t){var e=t._vue_visibilityState;e&&(e.destroyObserver(),delete t._vue_visibilityState)}var V4={beforeMount:Oc,updated:B4,unmounted:Ic};function P4(t){return{all:t=t||new Map,on:function(e,n){var o=t.get(e);o&&o.push(n)||t.set(e,[n])},off:function(e,n){var o=t.get(e);o&&o.splice(o.indexOf(n)>>>0,1)},emit:function(e,n){(t.get(e)||[]).slice().map(function(o){o(n)}),(t.get("*")||[]).slice().map(function(o){o(e,n)})}}}var Tc={itemsLimit:1e3},R4=/(auto|scroll)/;function Lc(t,e){return t.parentNode===null?e:Lc(t.parentNode,e.concat([t]))}var ls=function(e,n){return getComputedStyle(e,null).getPropertyValue(n)},F4=function(e){return ls(e,"overflow")+ls(e,"overflow-y")+ls(e,"overflow-x")},N4=function(e){return R4.test(F4(e))};function zc(t){if(t instanceof HTMLElement||t instanceof SVGElement){for(var e=Lc(t.parentNode,[]),n=0;n<e.length;n+=1)if(N4(e[n]))return e[n];return document.scrollingElement||document.documentElement}}function as(t){"@babel/helpers - typeof";return as=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},as(t)}var Hc={items:{type:Array,required:!0},keyField:{type:String,default:"id"},direction:{type:String,default:"vertical",validator:function(e){return["vertical","horizontal"].includes(e)}},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"}};function jc(){return this.items.length&&as(this.items[0])!=="object"}var ds=!1;if(typeof window<"u"){ds=!1;try{var A4=Object.defineProperty({},"passive",{get:function(){ds=!0}});window.addEventListener("test",null,A4)}catch{}}let O4=0;var Xn={name:"RecycleScroller",components:{ResizeObserver:di},directives:{ObserveVisibility:V4},props:{...Hc,itemSize:{type:Number,default:null},gridItems:{type:Number,default:void 0},itemSecondarySize:{type:Number,default:void 0},minItemSize:{type:[Number,String],default:null},sizeField:{type:String,default:"size"},typeField:{type:String,default:"type"},buffer:{type:Number,default:200},pageMode:{type:Boolean,default:!1},prerender:{type:Number,default:0},emitUpdate:{type:Boolean,default:!1},updateInterval:{type:Number,default:0},skipHover:{type:Boolean,default:!1},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"},listClass:{type:[String,Object,Array],default:""},itemClass:{type:[String,Object,Array],default:""}},emits:["resize","visible","hidden","update","scroll-start","scroll-end"],data(){return{pool:[],totalSize:0,ready:!1,hoverKey:null}},computed:{sizes(){if(this.itemSize===null){const t={"-1":{accumulator:0}},e=this.items,n=this.sizeField,o=this.minItemSize;let i=1e4,s=0,l;for(let a=0,d=e.length;a<d;a++)l=e[a][n]||o,l<i&&(i=l),s+=l,t[a]={accumulator:s,size:l};return this.$_computedMinItemSize=i,t}return[]},simpleArray:jc,itemIndexByKey(){const{keyField:t,items:e}=this,n={};for(let o=0,i=e.length;o<i;o++)n[e[o][t]]=o;return n}},watch:{items(){this.updateVisibleItems(!0)},pageMode(){this.applyPageMode(),this.updateVisibleItems(!1)},sizes:{handler(){this.updateVisibleItems(!1)},deep:!0},gridItems(){this.updateVisibleItems(!0)},itemSecondarySize(){this.updateVisibleItems(!0)}},created(){this.$_startIndex=0,this.$_endIndex=0,this.$_views=new Map,this.$_unusedViews=new Map,this.$_scrollDirty=!1,this.$_lastUpdateScrollPosition=0,this.prerender&&(this.$_prerender=!0,this.updateVisibleItems(!1)),this.gridItems&&!this.itemSize&&console.error("[vue-recycle-scroller] You must provide an itemSize when using gridItems")},mounted(){this.applyPageMode(),this.$nextTick(()=>{this.$_prerender=!1,this.updateVisibleItems(!0),this.ready=!0})},activated(){const t=this.$_lastUpdateScrollPosition;typeof t=="number"&&this.$nextTick(()=>{this.scrollToPosition(t)})},beforeUnmount(){this.removeListeners()},methods:{addView(t,e,n,o,i){const s=r.markRaw({id:O4++,index:e,used:!0,key:o,type:i}),l=r.shallowReactive({item:n,position:0,nr:s});return t.push(l),l},unuseView(t,e=!1){const n=this.$_unusedViews,o=t.nr.type;let i=n.get(o);i||(i=[],n.set(o,i)),i.push(t),e||(t.nr.used=!1,t.position=-9999)},handleResize(){this.$emit("resize"),this.ready&&this.updateVisibleItems(!1)},handleScroll(t){if(!this.$_scrollDirty){if(this.$_scrollDirty=!0,this.$_updateTimeout)return;const e=()=>requestAnimationFrame(()=>{this.$_scrollDirty=!1;const{continuous:n}=this.updateVisibleItems(!1,!0);n||(clearTimeout(this.$_refreshTimout),this.$_refreshTimout=setTimeout(this.handleScroll,this.updateInterval+100))});e(),this.updateInterval&&(this.$_updateTimeout=setTimeout(()=>{this.$_updateTimeout=0,this.$_scrollDirty&&e()},this.updateInterval))}},handleVisibilityChange(t,e){this.ready&&(t||e.boundingClientRect.width!==0||e.boundingClientRect.height!==0?(this.$emit("visible"),requestAnimationFrame(()=>{this.updateVisibleItems(!1)})):this.$emit("hidden"))},updateVisibleItems(t,e=!1){const n=this.itemSize,o=this.gridItems||1,i=this.itemSecondarySize||n,s=this.$_computedMinItemSize,l=this.typeField,a=this.simpleArray?null:this.keyField,d=this.items,c=d.length,u=this.sizes,f=this.$_views,h=this.$_unusedViews,p=this.pool,m=this.itemIndexByKey;let g,y,b,$,x;if(!c)g=y=$=x=b=0;else if(this.$_prerender)g=$=0,y=x=Math.min(this.prerender,d.length),b=null;else{const P=this.getScroll();if(e){let D=P.start-this.$_lastUpdateScrollPosition;if(D<0&&(D=-D),n===null&&D<s||D<n)return{continuous:!0}}this.$_lastUpdateScrollPosition=P.start;const w=this.buffer;P.start-=w,P.end+=w;let _=0;if(this.$refs.before&&(_=this.$refs.before.scrollHeight,P.start-=_),this.$refs.after){const D=this.$refs.after.scrollHeight;P.end+=D}if(n===null){let D,v=0,M=c-1,k=~~(c/2),B;do B=k,D=u[k].accumulator,D<P.start?v=k:k<c-1&&u[k+1].accumulator>P.start&&(M=k),k=~~((v+M)/2);while(k!==B);for(k<0&&(k=0),g=k,b=u[c-1].accumulator,y=k;y<c&&u[y].accumulator<P.end;y++);for(y===-1?y=d.length-1:(y++,y>c&&(y=c)),$=g;$<c&&_+u[$].accumulator<P.start;$++);for(x=$;x<c&&_+u[x].accumulator<P.end;x++);}else{g=~~(P.start/n*o);const D=g%o;g-=D,y=Math.ceil(P.end/n*o),$=Math.max(0,Math.floor((P.start-_)/n*o)),x=Math.floor((P.end-_)/n*o),g<0&&(g=0),y>c&&(y=c),$<0&&($=0),x>c&&(x=c),b=Math.ceil(c/o)*n}}y-g>Tc.itemsLimit&&this.itemsLimitError(),this.totalSize=b;let S;const C=g<=this.$_endIndex&&y>=this.$_startIndex;if(C)for(let P=0,w=p.length;P<w;P++)S=p[P],S.nr.used&&(t&&(S.nr.index=m[S.item[a]]),(S.nr.index==null||S.nr.index<g||S.nr.index>=y)&&this.unuseView(S));const V=C?null:new Map;let E,F,N;for(let P=g;P<y;P++){E=d[P];const w=a?E[a]:E;if(w==null)throw new Error(`Key is ${w} on item (keyField is '${a}')`);if(S=f.get(w),!n&&!u[P].size){S&&this.unuseView(S);continue}F=E[l];let _=h.get(F),D=!1;if(!S)C?_&&_.length?S=_.pop():S=this.addView(p,P,E,w,F):(N=V.get(F)||0,(!_||N>=_.length)&&(S=this.addView(p,P,E,w,F),this.unuseView(S,!0),_=h.get(F)),S=_[N],V.set(F,N+1)),f.delete(S.nr.key),S.nr.used=!0,S.nr.index=P,S.nr.key=w,S.nr.type=F,f.set(w,S),D=!0;else if(!S.nr.used&&(S.nr.used=!0,D=!0,_)){const v=_.indexOf(S);v!==-1&&_.splice(v,1)}S.item=E,D&&(P===d.length-1&&this.$emit("scroll-end"),P===0&&this.$emit("scroll-start")),n===null?(S.position=u[P-1].accumulator,S.offset=0):(S.position=Math.floor(P/o)*n,S.offset=P%o*i)}return this.$_startIndex=g,this.$_endIndex=y,this.emitUpdate&&this.$emit("update",g,y,$,x),clearTimeout(this.$_sortTimer),this.$_sortTimer=setTimeout(this.sortViews,this.updateInterval+300),{continuous:C}},getListenerTarget(){let t=zc(this.$el);return window.document&&(t===window.document.documentElement||t===window.document.body)&&(t=window),t},getScroll(){const{$el:t,direction:e}=this,n=e==="vertical";let o;if(this.pageMode){const i=t.getBoundingClientRect(),s=n?i.height:i.width;let l=-(n?i.top:i.left),a=n?window.innerHeight:window.innerWidth;l<0&&(a+=l,l=0),l+a>s&&(a=s-l),o={start:l,end:l+a}}else n?o={start:t.scrollTop,end:t.scrollTop+t.clientHeight}:o={start:t.scrollLeft,end:t.scrollLeft+t.clientWidth};return o},applyPageMode(){this.pageMode?this.addListeners():this.removeListeners()},addListeners(){this.listenerTarget=this.getListenerTarget(),this.listenerTarget.addEventListener("scroll",this.handleScroll,ds?{passive:!0}:!1),this.listenerTarget.addEventListener("resize",this.handleResize)},removeListeners(){this.listenerTarget&&(this.listenerTarget.removeEventListener("scroll",this.handleScroll),this.listenerTarget.removeEventListener("resize",this.handleResize),this.listenerTarget=null)},scrollToItem(t){let e;const n=this.gridItems||1;this.itemSize===null?e=t>0?this.sizes[t-1].accumulator:0:e=Math.floor(t/n)*this.itemSize,this.scrollToPosition(e)},scrollToPosition(t){const e=this.direction==="vertical"?{scroll:"scrollTop",start:"top"}:{scroll:"scrollLeft",start:"left"};let n,o,i;if(this.pageMode){const s=zc(this.$el),l=s.tagName==="HTML"?0:s[e.scroll],a=s.getBoundingClientRect(),c=this.$el.getBoundingClientRect()[e.start]-a[e.start];n=s,o=e.scroll,i=t+l+c}else n=this.$el,o=e.scroll,i=t;n[o]=i},itemsLimitError(){throw setTimeout(()=>{console.log("It seems the scroller element isn't scrolling, so it tries to render all the items at once.","Scroller:",this.$el),console.log("Make sure the scroller has a fixed height (or width) and 'overflow-y' (or 'overflow-x') set to 'auto' so it can scroll correctly and only render the items visible in the scroll viewport.")}),new Error("Rendered items limit reached")},sortViews(){this.pool.sort((t,e)=>t.nr.index-e.nr.index)}}};const I4={key:0,ref:"before",class:"vue-recycle-scroller__slot"},T4={key:1,ref:"after",class:"vue-recycle-scroller__slot"};function L4(t,e,n,o,i,s){const l=r.resolveComponent("ResizeObserver"),a=r.resolveDirective("observe-visibility");return r.withDirectives((r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["vue-recycle-scroller",{ready:i.ready,"page-mode":n.pageMode,[`direction-${t.direction}`]:!0}]),onScrollPassive:e[0]||(e[0]=(...d)=>s.handleScroll&&s.handleScroll(...d))},[t.$slots.before?(r.openBlock(),r.createElementBlock("div",I4,[r.renderSlot(t.$slots,"before")],512)):r.createCommentVNode("v-if",!0),(r.openBlock(),r.createBlock(r.resolveDynamicComponent(n.listTag),{ref:"wrapper",style:r.normalizeStyle({[t.direction==="vertical"?"minHeight":"minWidth"]:i.totalSize+"px"}),class:r.normalizeClass(["vue-recycle-scroller__item-wrapper",n.listClass])},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.pool,d=>(r.openBlock(),r.createBlock(r.resolveDynamicComponent(n.itemTag),r.mergeProps({key:d.nr.id,style:i.ready?{transform:`translate${t.direction==="vertical"?"Y":"X"}(${d.position}px) translate${t.direction==="vertical"?"X":"Y"}(${d.offset}px)`,width:n.gridItems?`${t.direction==="vertical"&&n.itemSecondarySize||n.itemSize}px`:void 0,height:n.gridItems?`${t.direction==="horizontal"&&n.itemSecondarySize||n.itemSize}px`:void 0}:null,class:["vue-recycle-scroller__item-view",[n.itemClass,{hover:!n.skipHover&&i.hoverKey===d.nr.key}]]},r.toHandlers(n.skipHover?{}:{mouseenter:()=>{i.hoverKey=d.nr.key},mouseleave:()=>{i.hoverKey=null}})),{default:r.withCtx(()=>[r.renderSlot(t.$slots,"default",{item:d.item,index:d.nr.index,active:d.nr.used})]),_:2},1040,["style","class"]))),128)),r.renderSlot(t.$slots,"empty")]),_:3},8,["style","class"])),t.$slots.after?(r.openBlock(),r.createElementBlock("div",T4,[r.renderSlot(t.$slots,"after")],512)):r.createCommentVNode("v-if",!0),r.createVNode(l,{onNotify:s.handleResize},null,8,["onNotify"])],34)),[[a,s.handleVisibilityChange]])}Xn.render=L4,Xn.__file="src/components/RecycleScroller.vue";var ui={name:"DynamicScroller",components:{RecycleScroller:Xn},provide(){return typeof ResizeObserver<"u"&&(this.$_resizeObserver=new ResizeObserver(t=>{requestAnimationFrame(()=>{if(Array.isArray(t)){for(const e of t)if(e.target&&e.target.$_vs_onResize){let n,o;if(e.borderBoxSize){const i=e.borderBoxSize[0];n=i.inlineSize,o=i.blockSize}else n=e.contentRect.width,o=e.contentRect.height;e.target.$_vs_onResize(e.target.$_vs_id,n,o)}}})})),{vscrollData:this.vscrollData,vscrollParent:this,vscrollResizeObserver:this.$_resizeObserver}},inheritAttrs:!1,props:{...Hc,minItemSize:{type:[Number,String],required:!0}},emits:["resize","visible"],data(){return{vscrollData:{active:!0,sizes:{},keyField:this.keyField,simpleArray:!1}}},computed:{simpleArray:jc,itemsWithSize(){const t=[],{items:e,keyField:n,simpleArray:o}=this,i=this.vscrollData.sizes,s=e.length;for(let l=0;l<s;l++){const a=e[l],d=o?l:a[n];let c=i[d];typeof c>"u"&&!this.$_undefinedMap[d]&&(c=0),t.push({item:a,id:d,size:c})}return t}},watch:{items(){this.forceUpdate()},simpleArray:{handler(t){this.vscrollData.simpleArray=t},immediate:!0},direction(t){this.forceUpdate(!0)},itemsWithSize(t,e){const n=this.$el.scrollTop;let o=0,i=0;const s=Math.min(t.length,e.length);for(let a=0;a<s&&!(o>=n);a++)o+=e[a].size||this.minItemSize,i+=t[a].size||this.minItemSize;const l=i-o;l!==0&&(this.$el.scrollTop+=l)}},beforeCreate(){this.$_updates=[],this.$_undefinedSizes=0,this.$_undefinedMap={},this.$_events=P4()},activated(){this.vscrollData.active=!0},deactivated(){this.vscrollData.active=!1},unmounted(){this.$_events.all.clear()},methods:{onScrollerResize(){this.$refs.scroller&&this.forceUpdate(),this.$emit("resize")},onScrollerVisible(){this.$_events.emit("vscroll:update",{force:!1}),this.$emit("visible")},forceUpdate(t=!1){(t||this.simpleArray)&&(this.vscrollData.sizes={}),this.$_events.emit("vscroll:update",{force:!0})},scrollToItem(t){const e=this.$refs.scroller;e&&e.scrollToItem(t)},getItemSize(t,e=void 0){const n=this.simpleArray?e??this.items.indexOf(t):t[this.keyField];return this.vscrollData.sizes[n]||0},scrollToBottom(){if(this.$_scrollingToBottom)return;this.$_scrollingToBottom=!0;const t=this.$el;this.$nextTick(()=>{t.scrollTop=t.scrollHeight+5e3;const e=()=>{t.scrollTop=t.scrollHeight+5e3,requestAnimationFrame(()=>{t.scrollTop=t.scrollHeight+5e3,this.$_undefinedSizes===0?this.$_scrollingToBottom=!1:requestAnimationFrame(e)})};requestAnimationFrame(e)})}}};function z4(t,e,n,o,i,s){const l=r.resolveComponent("RecycleScroller");return r.openBlock(),r.createBlock(l,r.mergeProps({ref:"scroller",items:s.itemsWithSize,"min-item-size":n.minItemSize,direction:t.direction,"key-field":"id","list-tag":t.listTag,"item-tag":t.itemTag},t.$attrs,{onResize:s.onScrollerResize,onVisible:s.onScrollerVisible}),{default:r.withCtx(({item:a,index:d,active:c})=>[r.renderSlot(t.$slots,"default",r.normalizeProps(r.guardReactiveProps({item:a.item,index:d,active:c,itemWithSize:a})))]),before:r.withCtx(()=>[r.renderSlot(t.$slots,"before")]),after:r.withCtx(()=>[r.renderSlot(t.$slots,"after")]),empty:r.withCtx(()=>[r.renderSlot(t.$slots,"empty")]),_:3},16,["items","min-item-size","direction","list-tag","item-tag","onResize","onVisible"])}ui.render=z4,ui.__file="src/components/DynamicScroller.vue";var cs={name:"DynamicScrollerItem",inject:["vscrollData","vscrollParent","vscrollResizeObserver"],props:{item:{required:!0},watchData:{type:Boolean,default:!1},active:{type:Boolean,required:!0},index:{type:Number,default:void 0},sizeDependencies:{type:[Array,Object],default:null},emitResize:{type:Boolean,default:!1},tag:{type:String,default:"div"}},emits:["resize"],computed:{id(){if(this.vscrollData.simpleArray)return this.index;if(this.vscrollData.keyField in this.item)return this.item[this.vscrollData.keyField];throw new Error(`keyField '${this.vscrollData.keyField}' not found in your item. You should set a valid keyField prop on your Scroller`)},size(){return this.vscrollData.sizes[this.id]||0},finalActive(){return this.active&&this.vscrollData.active}},watch:{watchData:"updateWatchData",id(t,e){if(this.$el.$_vs_id=this.id,this.size||this.onDataUpdate(),this.$_sizeObserved){const n=this.vscrollData.sizes[e],o=this.vscrollData.sizes[t];n!=null&&n!==o&&this.applySize(n)}},finalActive(t){this.size||(t?this.vscrollParent.$_undefinedMap[this.id]||(this.vscrollParent.$_undefinedSizes++,this.vscrollParent.$_undefinedMap[this.id]=!0):this.vscrollParent.$_undefinedMap[this.id]&&(this.vscrollParent.$_undefinedSizes--,this.vscrollParent.$_undefinedMap[this.id]=!1)),this.vscrollResizeObserver?t?this.observeSize():this.unobserveSize():t&&this.$_pendingVScrollUpdate===this.id&&this.updateSize()}},created(){if(!this.$isServer&&(this.$_forceNextVScrollUpdate=null,this.updateWatchData(),!this.vscrollResizeObserver)){for(const t in this.sizeDependencies)this.$watch(()=>this.sizeDependencies[t],this.onDataUpdate);this.vscrollParent.$_events.on("vscroll:update",this.onVscrollUpdate)}},mounted(){this.finalActive&&(this.updateSize(),this.observeSize())},beforeUnmount(){this.vscrollParent.$_events.off("vscroll:update",this.onVscrollUpdate),this.unobserveSize()},methods:{updateSize(){this.finalActive?this.$_pendingSizeUpdate!==this.id&&(this.$_pendingSizeUpdate=this.id,this.$_forceNextVScrollUpdate=null,this.$_pendingVScrollUpdate=null,this.computeSize(this.id)):this.$_forceNextVScrollUpdate=this.id},updateWatchData(){this.watchData&&!this.vscrollResizeObserver?this.$_watchData=this.$watch("item",()=>{this.onDataUpdate()},{deep:!0}):this.$_watchData&&(this.$_watchData(),this.$_watchData=null)},onVscrollUpdate({force:t}){!this.finalActive&&t&&(this.$_pendingVScrollUpdate=this.id),(this.$_forceNextVScrollUpdate===this.id||t||!this.size)&&this.updateSize()},onDataUpdate(){this.updateSize()},computeSize(t){this.$nextTick(()=>{if(this.id===t){const e=this.$el.offsetWidth,n=this.$el.offsetHeight;this.applyWidthHeight(e,n)}this.$_pendingSizeUpdate=null})},applyWidthHeight(t,e){const n=~~(this.vscrollParent.direction==="vertical"?e:t);n&&this.size!==n&&this.applySize(n)},applySize(t){this.vscrollParent.$_undefinedMap[this.id]&&(this.vscrollParent.$_undefinedSizes--,this.vscrollParent.$_undefinedMap[this.id]=void 0),this.vscrollData.sizes[this.id]=t,this.emitResize&&this.$emit("resize",this.id)},observeSize(){this.vscrollResizeObserver&&(this.$_sizeObserved||(this.vscrollResizeObserver.observe(this.$el),this.$el.$_vs_id=this.id,this.$el.$_vs_onResize=this.onResize,this.$_sizeObserved=!0))},unobserveSize(){this.vscrollResizeObserver&&this.$_sizeObserved&&(this.vscrollResizeObserver.unobserve(this.$el),this.$el.$_vs_onResize=void 0,this.$_sizeObserved=!1)},onResize(t,e,n){this.id===t&&this.applyWidthHeight(e,n)}},render(){return r.h(this.tag,this.$slots.default())}};cs.__file="src/components/DynamicScrollerItem.vue";function H4(t,e){t.component("".concat(e,"recycle-scroller"),Xn),t.component("".concat(e,"RecycleScroller"),Xn),t.component("".concat(e,"dynamic-scroller"),ui),t.component("".concat(e,"DynamicScroller"),ui),t.component("".concat(e,"dynamic-scroller-item"),cs),t.component("".concat(e,"DynamicScrollerItem"),cs)}var j4={version:"2.0.0-beta.8",install:function(e,n){var o=Object.assign({},{installComponents:!0,componentsPrefix:""},n);for(var i in o)typeof o[i]<"u"&&(Tc[i]=o[i]);o.installComponents&&H4(e,o.componentsPrefix)}};function W4(){const t=r.inject(_s);if(!t)throw new Error("No provider");return t}function Y4(){var t;return(t=r.getCurrentInstance())==null?void 0:t.emit}function U4(){const t=Y4();return{emitData(e){t==null||t("dialog:emit-data",e)}}}function G4(){return r.inject(yi)}const q4=t=>{t.use(Qc,{duration:.3,color:"var(--fm-color-opacity-sm)",initialOpacity:1,finalOpacity:.1,dissolveDuration:.6}),t.directive("tooltip",h4),t.use(Uu),t.use(g4),t.use(j4),Object.entries(Vc).forEach(([e,n])=>{t.component(e,n)})};ae.FeedMeUI=q4,ae.components=Vc,ae.useBreakpoints=Ao,ae.useDialog=W4,ae.useDialogChild=U4,ae.useFocus=jn,ae.useFormChild=md,ae.useProxiedModel=Z,ae.useSnackbar=G4,ae.useValidation=pd,Object.defineProperty(ae,Symbol.toStringTag,{value:"Module"})});
54
+ */function ii(){return!0}const M4=Symbol("merge-proxy"),D4={get(t,e,n){return e===M4?n:t.get(e)},has(t,e){return t.has(e)},set:ii,deleteProperty:ii,getOwnPropertyDescriptor(t,e){return{configurable:!0,enumerable:!0,get(){return t.get(e)},set:ii,deleteProperty:ii}},ownKeys(t){return t.keys()}};function or(t){return"value"in t?t.value:t}function si(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return new Proxy({get(o){for(let i=e.length-1;i>=0;i--){const r=or(e[i])[o];if(r!==void 0)return r}},has(o){for(let i=e.length-1;i>=0;i--)if(o in or(e[i]))return!0;return!1},keys(){const o=[];for(let i=0;i<e.length;i++)o.push(...Object.keys(or(e[i])));return[...Array.from(new Set(o))]}},D4)}const Bc=s.defineComponent({props:["render","props"],setup:t=>()=>typeof t.render=="function"||typeof t.render=="object"?s.h(t.render,t.props):t.render});function E4(t){const e=si({state:{},onStateChange:()=>{},renderFallbackValue:null,mergeOptions(i,r){return si(i,r)}},t),n=y4(e),o=s.ref(n.initialState);return s.watchEffect(()=>{n.setOptions(i=>{var r;const l=new Proxy({},{get:(a,d)=>o.value[d]});return si(i,t,{state:si(l,(r=t.state)!=null?r:{}),onStateChange:a=>{a instanceof Function?o.value=a(o.value):o.value=a,t.onStateChange==null||t.onStateChange(a)}})})}),n}const B4=["checked","disabled","indeterminate"],Vc=K(s.defineComponent({__name:"FmTableCheckbox",props:{checked:{type:Boolean},disabled:{type:Boolean},indeterminate:{type:Boolean},onChange:{type:Function}},setup(t){const e=t,n=s.computed(()=>e.indeterminate&&!e.checked?"remove":e.checked?"check_small":"");return(o,i)=>(s.openBlock(),s.createElementBlock("div",{class:"fm-checkbox__input--container",onClick:i[0]||(i[0]=(...r)=>o.onChange&&o.onChange(...r))},[s.createElementVNode("input",{class:s.normalizeClass({"fm-checkbox__input--btn":!0,"fm-checkbox__input--btn--checked":o.checked}),type:"checkbox",checked:o.checked,disabled:o.disabled,indeterminate:o.indeterminate},null,10,B4),o.indeterminate||o.checked?(s.openBlock(),s.createBlock(j,{key:0,class:"fm-checkbox__input--checkmark",name:n.value,size:"md",color:"#FFFFFF"},null,8,["name"])):s.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-2508b8c4"]]),V4={class:"bg-fm-color-neutral-white flex flex-col max-h-[264px] overflow-y-auto px-4 py-12 rounded-md shadow-light-300 w-[75px]"},Pc=s.defineComponent({__name:"FmTableSelection",props:{modelValue:{},items:{}},emits:["update:modelValue"],setup(t){const n=Z(t,"modelValue"),o=s.ref(!1);return(i,r)=>(s.openBlock(),s.createBlock(Ct,{onMenuChanged:r[0]||(r[0]=l=>o.value=l)},{"menu-button":s.withCtx(()=>{var l;return[s.createVNode(J,{variant:"secondary",label:(l=i.items.find(a=>a.value===i.modelValue))==null?void 0:l.label,size:"md",icon:o.value?"expand_less":"expand_more","icon-position":"append"},null,8,["label","icon"])]}),"menu-wrapper":s.withCtx(()=>[s.createElementVNode("div",V4,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.items,l=>(s.openBlock(),s.createBlock(Pe,{key:l.value,"model-value":l.value===s.unref(n),label:l.label,value:l.value,"onUpdate:modelValue":a=>n.value=l.value},null,8,["model-value","label","value","onUpdate:modelValue"]))),128))])]),_:1}))}}),P4={class:"flex flex-col relative"},R4={class:"h-full overflow-auto"},F4={class:"w-full"},N4=["colSpan","onClick"],A4={class:"flex gap-8 items-center justify-between"},O4={class:"-translate-x-1/2 -translate-y-1/2 absolute flex flex-col gap-16 left-1/2 top-1/2"},I4=s.createElementVNode("span",{class:"text-fm-color-typo-secondary"},"Loading data...",-1),T4={class:"fm-typo-body-lg-400 line-clamp-2 w-full"},L4={class:"flex h-72 items-center justify-between px-24 shrink-0 xs:px-0"},z4={class:"flex gap-24 items-center justify-between xs:hidden"},H4={class:"flex gap-8 items-center"},j4=s.createElementVNode("span",{class:"fm-typo-body-lg-400 text-fm-color-typo-primary"}," Items per page: ",-1),W4={class:"fm-typo-body-lg-400 text-fm-color-typo-secondary"},Y4={class:"flex gap-8 items-center xs:w-full"},U4={class:"fm-typo-body-lg-400 text-fm-color-typo-primary xs:mx-auto"},G4=s.defineComponent({__name:"FmTable",props:{modelValue:{default:{}},selection:{default:void 0},rowData:{default:()=>[]},columnDefs:{default:()=>[]},columnFilter:{default:void 0},searchValue:{default:""},pageCount:{default:0},rowCount:{default:void 0},fetchFn:{type:Function,default:void 0},pageSize:{default:10},loading:{type:Boolean,default:void 0},pinHeaderRow:{type:Boolean,default:!0}},setup(t){const e=t,n=Z(e,"modelValue"),o=Z(e,"searchValue"),i=s.ref(e.rowData),r=()=>{let y=e.columnDefs;return e.selection&&(y=[{id:"row-selection",header:({table:b})=>s.createVNode(Vc,{checked:b.getIsAllPageRowsSelected(),indeterminate:b.getIsSomePageRowsSelected(),onChange:b.getToggleAllPageRowsSelectedHandler()},null),cell:({row:b})=>s.createVNode(Vc,{checked:b.getIsSelected(),disabled:!b.getCanSelect(),onChange:b.getToggleSelectedHandler()},null),enableResizing:!1,meta:{headerClass:"py-4 pl-4 pr-16",cellClass:"py-16 pl-4 pr-16",width:"60px"}},...y]),y},l=s.ref([]);s.watch(()=>e.rowData,y=>{i.value=[...y]},{deep:!0});const a=s.ref({pageIndex:0,pageSize:e.pageSize}),d=E4({enableRowSelection:!!e.selection,enableMultiRowSelection:e.selection==="multiple",columns:r(),get data(){return i.value},state:{get pagination(){return typeof e.fetchFn=="function"?a.value:void 0},get globalFilter(){return o.value},get rowSelection(){return n.value},get sorting(){return l.value}},getCoreRowModel:$4(),getSortedRowModel:k4(),getFilteredRowModel:x4(),getPaginationRowModel:v4(),onRowSelectionChange:y=>{if(!h.value)return n.value=typeof y=="function"?y(n.value):y},onSortingChange:y=>{l.value=typeof y=="function"?y(l.value):y},onGlobalFilterChange:y=>{o.value=typeof y=="function"?y(o.value):y},manualPagination:typeof e.fetchFn=="function",...typeof e.fetchFn=="function"&&{onPaginationChange:y=>a.value=typeof y=="function"?y(a.value):y},pageCount:typeof e.fetchFn=="function"?e.pageCount:void 0,getSubRows:y=>y.subRows,getExpandedRowModel:S4()});s.watch(()=>a.value,y=>{f(y)});const c=s.ref(""),u=s.ref(!1);async function f(y){if(!e.fetchFn)return;u.value=!0;const b=`${Math.random()}`;c.value=b;try{await e.fetchFn(y)}catch{}finally{c.value===b&&(u.value=!1)}}const h=s.computed(()=>{const y=u.value;return typeof e.loading=="boolean"?e.loading:y});s.watch(()=>e.rowData,()=>{d.setOptions(y=>({...y,data:e.rowData})),setTimeout(()=>{g()})}),s.watch([()=>e.pageCount,()=>e.rowCount],()=>{d.setOptions(y=>({...y,pageCount:e.pageCount,rowCount:e.rowCount}))}),s.watch(()=>e.pageSize,()=>{d.setPageSize(e.pageSize)}),s.watch([()=>e.columnFilter],([y])=>{d.setColumnFilters(()=>y??[])}),s.watch(()=>e.columnDefs,()=>{d.setOptions(y=>({...y,columns:r()}))}),s.onMounted(()=>{e.fetchFn&&e.fetchFn(d.getState().pagination),d.setPageSize(e.pageSize)});const p=s.ref(),m=s.ref(380);function g(){var b;const y=((b=p.value)==null?void 0:b.scrollHeight)??0;m.value=Math.max(100,y)}return(y,b)=>(s.openBlock(),s.createElementBlock("div",P4,[s.createElementVNode("div",R4,[s.createElementVNode("table",F4,[s.createElementVNode("thead",{class:s.normalizeClass({"bg-fm-color-neutral-white sticky top-0 z-[1]":y.pinHeaderRow})},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(d).getHeaderGroups(),$=>(s.openBlock(),s.createElementBlock("tr",{key:$.id},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList($.headers,w=>{var S,x,V,D;return s.openBlock(),s.createElementBlock("th",{key:w.id,colSpan:w.colSpan,class:s.normalizeClass(["fm-typo-body-lg-700 text-fm-color-typo-secondary border-b border-fm-color-neutral-gray-100 h-24 hover:bg-fm-color-opacity-sm",w.column.getCanSort()?"cursor-pointer select-none":"",((S=w.column.columnDef.meta)==null?void 0:S.headerClass)??"px-16 py-12"]),style:s.normalizeStyle({width:`${(x=w.column.columnDef.meta)==null?void 0:x.width}`,maxWidth:(V=w.column.columnDef.meta)==null?void 0:V.maxWidth,textAlign:((D=w.column.columnDef.meta)==null?void 0:D.textAlign)??"left"}),onClick:F=>{var N;return(N=w.column.getToggleSortingHandler())==null?void 0:N(F)}},[s.createElementVNode("div",A4,[w.isPlaceholder?s.createCommentVNode("",!0):(s.openBlock(),s.createBlock(s.unref(Bc),{key:0,render:w.column.columnDef.header,props:w.getContext()},null,8,["render","props"])),w.column.getCanSort()?(s.openBlock(),s.createBlock(j,{key:1,color:"neutral-gray-400",name:{asc:"arrow_upward",desc:"arrow_downward"}[w.column.getIsSorted()]??"unfold_more"},null,8,["name"])):s.createCommentVNode("",!0)])],14,N4)}),128))]))),128))],2),s.renderSlot(y.$slots,"pin-top"),s.createElementVNode("tbody",{ref_key:"tableDataBody",ref:p},[h.value?(s.openBlock(),s.createElementBlock("div",{key:0,class:"pointer-events-none",style:s.normalizeStyle({height:`${m.value}px`})},[s.createElementVNode("div",O4,[s.createVNode(Wt),s.createVNode(ln,{size:"xl"}),s.createElementVNode("div",null,[s.renderSlot(y.$slots,"loading-text",{},()=>[I4])]),s.createVNode(Wt)])],4)):s.createCommentVNode("",!0),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(d).getRowModel().rows,$=>(s.openBlock(),s.createElementBlock("tr",{key:$.id,class:s.normalizeClass(["border-b border-fm-color-neutral-gray-100 hover:bg-fm-color-opacity-sm",{"bg-fm-color-neutral-gray-100":$.getIsSelected()}])},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList($.getVisibleCells(),w=>{var S,x,V,D;return s.openBlock(),s.createElementBlock("td",{key:w.id,class:s.normalizeClass([h.value?"hidden":"","h-48 px-16 py-12 text-fm-color-typo-primary",((S=w.column.columnDef.meta)==null?void 0:S.cellClass)??"px-16 py-12"]),style:s.normalizeStyle({width:(x=w.column.columnDef.meta)==null?void 0:x.width,maxWidth:(V=w.column.columnDef.meta)==null?void 0:V.maxWidth,textAlign:((D=w.column.columnDef.meta)==null?void 0:D.textAlign)??"left"})},[s.createElementVNode("span",T4,[s.createVNode(s.unref(Bc),{render:w.column.columnDef.cell,props:w.getContext()},null,8,["render","props"])])],6)}),128))],2))),128))],512)])]),s.createElementVNode("div",L4,[s.createElementVNode("div",z4,[s.createElementVNode("div",H4,[j4,s.createVNode(Pc,{"model-value":s.unref(d).getState().pagination.pageSize,items:[...Array.from(Array(5),($,w)=>(w+1)*10).map($=>({label:$.toString(),value:$})),{label:"All",value:e.rowData.length}],"onUpdate:modelValue":b[0]||(b[0]=$=>s.unref(d).setPageSize($))},null,8,["model-value","items"])]),s.createElementVNode("span",W4,s.toDisplayString(e.rowData.length<s.unref(d).getState().pagination.pageSize?e.rowData.length:s.unref(d).getState().pagination.pageIndex*s.unref(d).getState().pagination.pageSize+1)+" - "+s.toDisplayString((s.unref(d).getState().pagination.pageIndex+1)*s.unref(d).getState().pagination.pageSize)+" of "+s.toDisplayString(e.rowCount??e.rowData.length)+" items ",1)]),s.createElementVNode("div",Y4,[s.createVNode(Pc,{"model-value":s.unref(d).getState().pagination.pageIndex+1,items:Array.from(Array(s.unref(d).getPageCount()),($,w)=>w+1).map($=>({label:$.toString(),value:$})),"onUpdate:modelValue":b[1]||(b[1]=$=>s.unref(d).setPageIndex($?$-1:0))},null,8,["model-value","items"]),s.createElementVNode("span",U4," of "+s.toDisplayString(s.unref(d).getPageCount())+" pages ",1),s.createVNode(J,{disabled:!s.unref(d).getCanPreviousPage(),icon:"chevron_left",variant:"tertiary","icon-color":"neutral-black",onClick:b[2]||(b[2]=()=>s.unref(d).previousPage())},null,8,["disabled"]),s.createVNode(J,{disabled:!s.unref(d).getCanNextPage(),icon:"chevron_right",variant:"tertiary","icon-color":"neutral-black",onClick:b[3]||(b[3]=()=>s.unref(d).nextPage())},null,8,["disabled"])])])]))}}),q4=s.createElementVNode("span",{class:"fm-typo-body-lg-400 text-fm-color-typo-secondary"}," More ",-1),X4=s.defineComponent({__name:"FmTabs",props:{modelValue:{default:null},items:{},vertical:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},showMoreAt:{default:6}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=e,i=s.ref(!1),r=s.computed(()=>({vertical:n.vertical,disabled:n.disabled})),l=s.computed(()=>{const c=n.items.slice(0,n.showMoreAt-1),u=n.items.find(h=>{var p;return h.value===n.modelValue||((p=h.children)==null?void 0:p.find(m=>m.value===n.modelValue))}),f=c.map(h=>h.value);return u&&f.includes(u.value)?n.items.slice(0,n.showMoreAt):u?[...c,u]:c}),a=s.computed(()=>{const c=l.value.map(u=>u.value);return n.items.filter(u=>!c.includes(u.value))}),d=c=>{i.value=!1,o("update:modelValue",c)};return(c,u)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["flex",c.vertical?"flex-col":"flex-row items-center"])},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(l.value,f=>s.renderSlot(c.$slots,"default",s.normalizeProps(s.guardReactiveProps({...f,tabsProps:r.value})),()=>[s.createVNode(gc,s.mergeProps({"model-value":n.modelValue},{children:f.children,label:f.label,icon:f.icon,disabled:f.disabled,badge:f.badge,value:f.value,tabsProps:r.value},{disabled:f.disabled===void 0?c.disabled:f.disabled,vertical:c.vertical,"onUpdate:modelValue":u[0]||(u[0]=h=>o("update:modelValue",h))}),null,16,["model-value","disabled","vertical"])])),256)),a.value.length>0?(s.openBlock(),s.createBlock(Ct,{key:0,"show-menu":i.value,class:s.normalizeClass(["max-w-[360px] min-w-[90px] rounded-sm",{"w-full":c.vertical}]),placement:c.vertical?"right-start":"bottom-start",onMenuChanged:u[1]||(u[1]=f=>i.value=f)},{"menu-button":s.withCtx(()=>[s.createElementVNode("div",{class:s.normalizeClass(["flex gap-8 hover:bg-fm-color-opacity-sm items-center px-16 rounded-sm",[c.vertical?"h-40":"h-[46px]"]])},[s.createVNode(j,{name:"more_vert"}),q4],2)]),default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(a.value,f=>{var h;return s.openBlock(),s.createElementBlock(s.Fragment,{key:f.value},[(h=f.children)!=null&&h.length?(s.openBlock(),s.createBlock(Ct,{key:0,placement:"right-start"},{"menu-button":s.withCtx(()=>[s.createVNode(Pe,{"model-value":n.modelValue===f.value,label:f.label,icon:f.icon,disabled:f.disabled,expandable:""},{append:s.withCtx(()=>[f.badge?(s.openBlock(),s.createBlock(Mt,{key:0,value:f.badge,inline:"",variant:"numeric"},null,8,["value"])):s.createCommentVNode("",!0)]),_:2},1032,["model-value","label","icon","disabled"])]),default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(f.children,p=>(s.openBlock(),s.createBlock(Pe,{key:p.value,"model-value":n.modelValue===p.value,label:p.label,icon:p.icon,disabled:p.disabled,onClick:m=>d(p.value)},{append:s.withCtx(()=>[p.badge?(s.openBlock(),s.createBlock(Mt,{key:0,value:p.badge,inline:"",variant:"numeric"},null,8,["value"])):s.createCommentVNode("",!0)]),_:2},1032,["model-value","label","icon","disabled","onClick"]))),128))]),_:2},1024)):(s.openBlock(),s.createBlock(Pe,{key:1,"model-value":n.modelValue===f.value,label:f.label,icon:f.icon,disabled:f.disabled,onClick:p=>d(f.value)},{append:s.withCtx(()=>[f.badge?(s.openBlock(),s.createBlock(Mt,{key:0,value:f.badge,inline:"",variant:"numeric"},null,8,["value"])):s.createCommentVNode("",!0)]),_:2},1032,["model-value","label","icon","disabled","onClick"]))],64)}),128))]),_:1},8,["show-menu","class","placement"])):s.createCommentVNode("",!0)],2))}}),K4={class:"flex flex-col"},Z4=["tabindex"],J4=s.defineComponent({__name:"FmCollapsibleTab",props:{modelValue:{default:void 0},label:{default:""},icon:{default:""},disabled:{type:Boolean,default:!1},badge:{default:0},value:{default:void 0},children:{default:()=>[]},indentation:{default:1},active:{type:Boolean,default:!1},expand:{type:Boolean,default:!1},focusable:{type:Boolean,default:void 0}},setup(t){const e=t,n=Z(e,"modelValue"),o=s.computed(()=>e.children.length>0),i=s.ref(!e.expand||e.disabled),r=s.computed(()=>{if(!o.value)return 0;function h(m){return m.children?[m,...m.children.flatMap(h)]:[m]}return 56*(e.children?e.children.flatMap(h):[]).length});function l(){if(!e.disabled){if(o.value){i.value=!i.value;return}n.value=e.value}}const a=s.computed(()=>typeof e.focusable=="boolean"?e.focusable:!e.disabled&&(!i.value||!o.value));function d(h){return h.children&&h.children.length?h.children.some(d):e.modelValue===h.value}const c=s.computed(()=>{const h=d(e);return o.value?h&&i.value:h}),u=s.computed(()=>e.children?e.children.map(({modelValue:h,indentation:p,active:m,focusable:g,...y})=>{const b=d(y);return{...y,expand:b,focusable:!y.disabled&&!i.value}}):[]),f=s.computed(()=>{switch(e.indentation){case 1:return 16;case 2:return 56;case 3:return 72;default:return 80}});return(h,p)=>{const m=s.resolveComponent("FmCollapsibleTab",!0),g=s.resolveDirective("wave");return s.openBlock(),s.createElementBlock("div",K4,[s.withDirectives((s.openBlock(),s.createElementBlock("button",{class:s.normalizeClass(["flex fm-corner-radius-lg gap-12 items-center px-24 py-16 focus-visible:outline-none",{"cursor-pointer focus-visible:bg-fm-color-opacity-md hover:bg-fm-color-opacity-sm ":!h.disabled,"cursor-not-allowed":h.disabled,"bg-fm-color-system-warning-100":c.value}]),style:s.normalizeStyle({paddingLeft:`${f.value}px`}),tabindex:a.value?"0":"-1",type:"button",onClick:l},[h.icon?(s.openBlock(),s.createBlock(j,{key:0,name:h.icon,class:s.normalizeClass({"text-fm-color-typo-disabled":h.disabled,"text-fm-color-typo-primary":!h.disabled&&!c.value,"text-fm-color-primary":!h.disabled&&c.value})},null,8,["name","class"])):s.createCommentVNode("",!0),s.createElementVNode("div",{class:s.normalizeClass(["flex-1 fm-typo-body-lg-700 text-left",{"text-fm-color-typo-primary":!h.disabled,"text-fm-color-typo-disabled":h.disabled}])},s.toDisplayString(h.label),3),h.badge?(s.openBlock(),s.createBlock(Mt,{key:1,value:h.badge,inline:"",variant:"numeric"},null,8,["value"])):s.createCommentVNode("",!0),o.value?(s.openBlock(),s.createElementBlock("div",{key:2,class:"flex h-24 items-center w-24",style:s.normalizeStyle({transformOrigin:"center",transform:`rotate(${i.value?"0":"180"}deg)`,transition:"transform ease-out 250ms"})},[s.createVNode(j,{class:s.normalizeClass({"text-fm-color-neutral-gray-300":!h.disabled,"text-fm-color-typo-disabled":h.disabled}),size:"md",name:"expand_more"},null,8,["class"])],4)):s.createCommentVNode("",!0)],14,Z4)),[[g,!h.disabled]]),o.value?(s.openBlock(),s.createElementBlock("div",{key:0,class:"flex flex-col overflow-hidden",style:s.normalizeStyle({maxHeight:i.value?0:`${r.value}px`,transition:"max-height 250ms",transitionTimingFunction:i.value?"ease-out":"ease-in"})},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(u.value,(y,b)=>(s.openBlock(),s.createBlock(m,s.mergeProps({key:b},y,{"model-value":s.unref(n),"onUpdate:modelValue":p[0]||(p[0]=$=>s.isRef(n)?n.value=$:null),indentation:h.indentation+1}),null,16,["model-value","indentation"]))),128))],4)):s.createCommentVNode("",!0)])}}}),Q4={class:"flex flex-col"},e_=s.defineComponent({__name:"FmCollapsibleTabs",props:{modelValue:{default:void 0},items:{default:()=>[]}},setup(t){const e=t,n=Z(e,"modelValue"),o=s.computed(()=>e.items?e.items.map(({modelValue:r,...l})=>l):[]);function i(r){function l(d){return d.children?d.children.flatMap(l):[d.value]}return(r.children?r.children.flatMap(l):[r.value]).includes(e.modelValue)}return(r,l)=>(s.openBlock(),s.createElementBlock("div",Q4,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(o.value,(a,d)=>(s.openBlock(),s.createBlock(J4,s.mergeProps({key:d},a,{"model-value":s.unref(n),"onUpdate:modelValue":l[0]||(l[0]=c=>s.isRef(n)?n.value=c:null),active:i(a),expand:i(a)}),null,16,["model-value","active","expand"]))),128))]))}}),t_=s.defineComponent({__name:"FmAvatar",props:{initials:{default:()=>""},name:{default:()=>""},src:{default:void 0},size:{default:()=>"md"}},setup(t){const e=t,n=s.computed(()=>{if(e.initials)return e.initials.slice(0,2);if(e.name){const[o,i]=e.name.split(" ");return i?`${o[0]}${i[0]}`:o.slice(0,2)}return e.src?"":"?"});return(o,i)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["inline-flex items-center justify-center rounded-xxxl uppercase",{"w-24 h-24 fm-typo-body-sm-700":o.size==="sm","w-40 h-40 fm-typo-body-md-700":o.size==="md","w-48 h-48 fm-typo-body-lg-700":o.size==="lg","w-56 h-56 fm-typo-body-lg-700":o.size==="xl","bg-fm-color-neutral-gray-100":!e.src}]),style:s.normalizeStyle({background:e.src?`url(${e.src})`:void 0,backgroundSize:e.src?"cover":void 0,backgroundPosition:e.src?"center":void 0,backgroundRepeat:e.src?"no-repeat":void 0})},s.toDisplayString(n.value),7))}}),n_=s.defineComponent({__name:"FmThumbnail",props:{src:{default:void 0},icon:{default:t=>t.src?"":"image"},size:{default:()=>"md"}},setup(t){const e=t;return(n,o)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["inline-flex items-center justify-center fm-corner-radius-md border-1 border-fm-color-neutral-gray-300",{"w-24 h-24 fm-typo-body-sm-700":n.size==="sm","w-40 h-40 fm-typo-body-md-700":n.size==="md","w-56 h-56 fm-typo-body-lg-700":n.size==="lg","w-72 h-72 fm-typo-body-lg-700":n.size==="xl","text-fm-color-neutral-gray-300 bg-fm-color-neutral-gray-100":!e.src}]),style:s.normalizeStyle({background:e.src?`url(${e.src})`:void 0,backgroundSize:e.src?"cover":void 0,backgroundPosition:e.src?"center":void 0,backgroundRepeat:e.src?"no-repeat":void 0})},[n.icon?(s.openBlock(),s.createBlock(j,{key:0,name:n.icon},null,8,["name"])):s.createCommentVNode("",!0)],6))}}),o_={class:"bg-white flex gap-4 items-center"},i_={class:"flex gap-4 items-center xs:hidden"},s_={key:1,class:"hidden xs:flex"},r_={class:"absolute bottom-16 hidden right-16 xs:inline"},Rc={FmBadge:Mt,FmBottomSheet:gr,FmBreadcrumb:pu,FmButton:J,FmButtonGroup:Eu,FmCard:Bu,FmCardActionArea:Vu,FmCardActions:Ru,FmCardHeader:Nu,FmCardMedia:Ou,FmCardSection:bi,FmCardSubtitle:kr,FmCardTitle:xr,FmChip:Sr,FmChipGroup:vr,FmDialog:Tu,FmDropField:Hu,FmDynamicDialog:Dr,FmLineChart:rg,FmPieChart:fg,FmBarChart:bg,FmCheckbox:qa,FmDatePicker:L1,FmDatePickerMobile:_d,FmDateRangePicker:q2,FmDateRangePickerMobile:kd,FmField:ge,FmForm:X2,FmFormGroup:Ve,FmHelperText:Ka,FmLabel:en,FmPhoneNumber:l$,FmPinField:c$,FmRadio:y$,FmRadioGroup:b$,FmSearch:rc,FmGlobalSearch:Y$,FmSelect:Wo,FmStepperField:q$,FmSwitch:Cs,FmTextField:Os,FmTextarea:K$,FmTimeInput:Qo,FmTimePicker:h3,FmTimeRangePicker:w3,FmIcon:j,FmList:hc,FmListItem:pc,FmMenu:Ct,FmMenuDeprecated:fc,FmMenuDivider:wd,FmMenuHeader:x3,FmMenuItem:Pe,FmCircularProgress:ln,FmLinearProgress:D3,FmSideSheet:F3,FmSnackbar:mc,FmSpacer:Wt,FmStep:L3,FmStepper:j3,FmTab:gc,FmTable:G4,FmTabs:X4,FmCollapsibleTabs:e_,FmTooltip:md,FmAvatar:t_,FmThumbnail:n_,FmPageHead:s.defineComponent({__name:"FmPageHead",props:{title:{default:()=>""},description:{default:()=>""},backButton:{type:Boolean,default:()=>!1},actions:{default:()=>[]}},emits:["click:back","click:action"],setup(t,{emit:e}){const n=t,o=e,i=s.computed(()=>{const l=[...n.actions],a=l.findIndex(h=>h.isPrimary),d=l[a],[c,u,...f]=l.filter((h,p)=>p!==a);return{primaryAction:d,firstSecondaryAction:c,secondSecondaryAction:u,showMoreSecondary:f,bottomSheetActions:l.filter(h=>!h.isPrimary),fabActions:l.filter(h=>h.isPrimary)}}),r=s.ref(!1);return(l,a)=>(s.openBlock(),s.createElementBlock("div",o_,[l.backButton?(s.openBlock(),s.createBlock(J,{key:0,type:"button",size:"md",variant:"tertiary",icon:"arrow_back","icon-color":"black",onClick:a[0]||(a[0]=d=>o("click:back"))})):s.createCommentVNode("",!0),s.createVNode(Ls,{class:"flex-grow",title:l.title,description:l.description,"title-bold":""},null,8,["title","description"]),s.createElementVNode("div",i_,[i.value.firstSecondaryAction?(s.openBlock(),s.createBlock(J,{key:0,label:i.value.firstSecondaryAction.label,"prepend-icon":i.value.firstSecondaryAction.prependIcon,"append-icon":i.value.firstSecondaryAction.appendIcon,type:"button",variant:"tertiary",size:"md",onClick:a[1]||(a[1]=d=>o("click:action",i.value.firstSecondaryAction.value))},null,8,["label","prepend-icon","append-icon"])):s.createCommentVNode("",!0),i.value.secondSecondaryAction?(s.openBlock(),s.createBlock(J,{key:1,label:i.value.secondSecondaryAction.label,"prepend-icon":i.value.secondSecondaryAction.prependIcon,"append-icon":i.value.secondSecondaryAction.appendIcon,type:"button",variant:"tertiary",size:"md",onClick:a[2]||(a[2]=d=>o("click:action",i.value.secondSecondaryAction.value))},null,8,["label","prepend-icon","append-icon"])):s.createCommentVNode("",!0),i.value.showMoreSecondary.length>1?(s.openBlock(),s.createBlock(Ct,{key:2},{"menu-button":s.withCtx(()=>[s.createVNode(J,{label:"More","append-icon":"expand_more","icon-color":"black",type:"button",variant:"tertiary",size:"md"})]),default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.value.showMoreSecondary,d=>(s.openBlock(),s.createBlock(Pe,{key:d.value,label:d.label,icon:d.prependIcon,onClick:c=>o("click:action",d.value)},null,8,["label","icon","onClick"]))),128))]),_:1})):i.value.showMoreSecondary.length===1?(s.openBlock(),s.createBlock(J,{key:3,label:i.value.showMoreSecondary[0].label,"prepend-icon":i.value.showMoreSecondary[0].prependIcon,"append-icon":i.value.showMoreSecondary[0].appendIcon,type:"button",variant:"tertiary",size:"md",onClick:a[3]||(a[3]=d=>o("click:action",i.value.showMoreSecondary[0].value))},null,8,["label","prepend-icon","append-icon"])):s.createCommentVNode("",!0),i.value.primaryAction?(s.openBlock(),s.createBlock(J,{key:4,label:i.value.primaryAction.label,"prepend-icon":i.value.primaryAction.prependIcon,"append-icon":i.value.primaryAction.appendIcon,type:"button",variant:"primary",size:"md",onClick:a[4]||(a[4]=d=>o("click:action",i.value.primaryAction.value))},null,8,["label","prepend-icon","append-icon"])):s.createCommentVNode("",!0)]),n.actions.length>0?(s.openBlock(),s.createElementBlock("div",s_,[s.createVNode(J,{type:"button",size:"md",variant:"tertiary",icon:"more_vert","icon-color":"black",onClick:a[5]||(a[5]=d=>r.value=!0)})])):s.createCommentVNode("",!0),s.createVNode(gr,{"model-value":r.value,"onUpdate:modelValue":a[6]||(a[6]=d=>r.value=d),"dismiss-away":""},{default:s.withCtx(()=>[s.createVNode(hc,null,{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.value.bottomSheetActions,d=>(s.openBlock(),s.createBlock(pc,{key:d.value,class:"hover:bg-fm-color-neutral-gray-100",label:d.label,onClick:c=>{o("click:action",d.value),r.value=!1}},null,8,["label","onClick"]))),128))]),_:1})]),_:1},8,["model-value"]),(s.openBlock(),s.createBlock(s.Teleport,{to:"body"},[s.createElementVNode("div",r_,[i.value.primaryAction?(s.openBlock(),s.createBlock(J,{key:0,class:"fm-shadow-light-100",label:i.value.primaryAction.label,"prepend-icon":i.value.primaryAction.prependIcon,"append-icon":i.value.primaryAction.appendIcon,type:"button",variant:"fab",size:"md",onClick:a[7]||(a[7]=d=>o("click:action",i.value.primaryAction.value))},null,8,["label","prepend-icon","append-icon"])):s.createCommentVNode("",!0)])]))]))}}),FmTopSheet:lc},l_=s.defineComponent({__name:"FmTooltipDirective",props:{reference:{},placement:{default:"top"},content:{default:""},disabled:{type:Boolean,default:!1},hideArrow:{type:Boolean,default:!1}},setup(t){const e=t,n=s.ref(!1),o=s.ref(null),i=s.ref(null),r=s.computed(()=>e.reference());let l;const{floatingStyles:a,middlewareData:d,placement:c}=Hn(r,o,{whileElementsMounted:Ln,placement:e.placement,middleware:[zn(),On({mainAxis:6}),fd({element:i})]}),u=s.computed(()=>{var m,g,y,b;const p={top:"bottom",right:"left",bottom:"top",left:"right"}[c.value];return{left:((m=d.value.arrow)==null?void 0:m.x)!=null?`${(g=d.value.arrow)==null?void 0:g.x}px`:"",top:((y=d.value.arrow)==null?void 0:y.y)!=null?`${(b=d.value.arrow)==null?void 0:b.y}px`:"",[p]:"-3px"}}),f=()=>{e.disabled||(l&&clearTimeout(l),l=setTimeout(()=>{n.value=!0},250))},h=()=>{e.disabled||(l&&clearTimeout(l),l=setTimeout(()=>{n.value=!1},250))};return s.onMounted(()=>{r.value.addEventListener("pointerdown",f),r.value.addEventListener("pointermove",p=>{p.pointerType!=="touch"&&f()}),r.value.addEventListener("pointerleave",h),r.value.addEventListener("pointerup",h)}),s.onBeforeUnmount(()=>{r.value.removeEventListener("pointerdown",f),r.value.removeEventListener("pointermove",p=>{p.pointerType!=="touch"&&f()}),r.value.removeEventListener("pointerleave",h),r.value.removeEventListener("pointerup",h)}),(p,m)=>n.value&&!p.disabled?(s.openBlock(),s.createElementBlock("div",{key:0,ref_key:"tooltipContent",ref:o,class:"bg-fm-color-neutral-black fm-shadow-light-300 fm-typo-body-sm-400 max-w-[240px] px-16 py-12 rounded-lg text-fm-color-typo-white",style:s.normalizeStyle(s.unref(a))},[s.withDirectives(s.createElementVNode("div",{ref_key:"arrowEl",ref:i,class:"absolute bg-fm-color-neutral-black h-8 rotate-45 rounded-[2px] w-8",style:s.normalizeStyle(u.value)},null,4),[[s.vShow,!p.hideArrow]]),s.createTextVNode(" "+s.toDisplayString(p.content),1)],4)):s.createCommentVNode("",!0)}});let ir;const St=s.ref([]);let Fc=0;const a_=()=>{if(ir)return;const t=document.createElement("div");document.body.appendChild(t),ir=s.createApp({render:()=>St.value.map(e=>s.h(l_,e))}),ir.mount(t)},ri=t=>{if(t){for(const e of["top","right","bottom","left"])if(t[e])return e}return"top"},Nc=(t,e)=>{const{value:n,modifiers:o}=e;a_(),t.$_fmTooltipId=Fc,Fc+=1,typeof n=="string"?St.value.push({id:t.$_fmTooltipId,reference:()=>t,content:n.toString(),placement:ri(o),hideArrow:!1}):n&&typeof n=="object"&&St.value.push({id:t.$_fmTooltipId,reference:()=>t,content:n.content.toString(),placement:ri(o),disabled:n.disabled??!1,hideArrow:n.hideArrow??!1})},d_={mounted:Nc,updated:(t,e)=>{const{value:n,modifiers:o}=e,i=St.value.findIndex(r=>r.id===t.$_fmTooltipId);if(i===-1){Nc(t,e);return}typeof n=="string"?St.value[i]={id:t.$_fmTooltipId,reference:()=>t,content:n.toString(),placement:ri(o),hideArrow:!1}:n&&typeof n=="object"&&(St.value[i]={id:t.$_fmTooltipId,reference:()=>t,content:n.content.toString(),disabled:n.disabled??!1,placement:ri(o),hideArrow:n.hideArrow??!1})},beforeUnmount:t=>{const e=St.value.findIndex(n=>n.id===t.$_fmTooltipId);e!==-1&&St.value.splice(e,1)}},li=16,c_=s.defineComponent({__name:"FmSnackbarToast",setup(t){const{breakpoints:e}=Ao(),n=s.inject(yi),o=s.computed(()=>{var l;return[...((l=n==null?void 0:n.store)==null?void 0:l.snackbars)??[]].reduce(({currentSum:a,tops:d},c)=>{d.push({id:c.id,accumulatedHeight:a});const u=c.mountStage===vt.EXPIRED?0:li+c.renderedHeight;return{currentSum:a+u,tops:d}},{currentSum:li,tops:new Array}).tops}),i=s.computed(()=>{var r,l;return(l=(r=n==null?void 0:n.store)==null?void 0:r.snackbars)==null?void 0:l.map(a=>{var c,u,f,h,p,m;let d=0;switch(a.mountStage){case vt.PREMOUNT:{d=e.value.xs?0:li;break}case vt.MOUNTED:{d=((f=(u=(c=o.value)==null?void 0:c.find)==null?void 0:u.call(c,g=>g.id===a.id))==null?void 0:f.accumulatedHeight)||li;break}case vt.EXPIRED:{d=((m=(p=(h=o.value)==null?void 0:h.find)==null?void 0:p.call(h,g=>g.id===a.id))==null?void 0:m.accumulatedHeight)||0,d=Math.max(0,d-a.renderedHeight);break}}return{...a,top:d}})});return(r,l)=>(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.value,a=>(s.openBlock(),s.createBlock(s.Teleport,{key:a.id,to:"body"},[s.createVNode(mc,{class:"fixed transition-all",variant:a.type,title:a.title,description:a.message,action:a.action,dismissable:a.dismissable,style:s.normalizeStyle(s.unref(e).xs?{bottom:`${a.top}px`,width:"calc(100vw - 32px)",right:"16px",opacity:a.mountStage===s.unref(vt).EXPIRED?0:1}:{top:`${a.top}px`,right:a.mountStage===s.unref(vt).PREMOUNT?"-20px":"16px",opacity:a.mountStage===s.unref(vt).EXPIRED?0:1}),onVnodeMounted:d=>{var c;return(c=s.unref(n))==null?void 0:c.onSnackbarMounted(a.id,d.el.scrollHeight)},onOnAction:()=>{var d,c;(d=a==null?void 0:a.onAction)==null||d.call(a),(c=s.unref(n))==null||c.close(a.id)},onOnDismiss:()=>{var d;return(d=s.unref(n))==null?void 0:d.close(a.id)}},null,8,["variant","title","description","action","dismissable","style","onVnodeMounted","onOnAction","onOnDismiss"])]))),128))}});var vt=(t=>(t.PREMOUNT="PREMOUNT",t.MOUNTED="MOUNTED",t.EXPIRED="EXPIRED",t))(vt||{});class u_{constructor(){I(this,"store",s.reactive({snackbars:new Array}))}open(e,n){const o=Math.random().toString(16).slice(2),i=[{...e,id:o,mountStage:"PREMOUNT",duration:n===null?null:n??5e3,renderedHeight:0,type:(e==null?void 0:e.type)??"info",dismissable:typeof(e==null?void 0:e.dismissable)=="boolean"?e.dismissable:!0},...this.store.snackbars];return this.store.snackbars=i,o}onSnackbarMounted(e,n){const o=this.store.snackbars.findIndex(r=>r.id===e);if(o===-1)return;const i=this.store.snackbars[o];this.store.snackbars[o]={...i,renderedHeight:n},setTimeout(()=>{const r=this.store.snackbars[o];this.store.snackbars[o]={...r,mountStage:"MOUNTED"}}),typeof i.duration=="number"&&setTimeout(()=>{this.close(e)},i.duration)}close(e){const n=this.store.snackbars.findIndex(i=>i.id===e);if(n===-1)return;const o=this.store.snackbars[n];this.store.snackbars[n]={...o,mountStage:"EXPIRED"},setTimeout(()=>{this.removeSnackbar(e)},500)}removeSnackbar(e){const n=this.store.snackbars.findIndex(o=>o.id===e);n!==-1&&this.store.snackbars.splice(n,1)}}const f_={install(t){t.provide(yi,new u_);const e=document.body,n=s.createVNode(c_);n.appContext=t._context,s.render(n,e)}};function h_(){var t=window.navigator.userAgent,e=t.indexOf("MSIE ");if(e>0)return parseInt(t.substring(e+5,t.indexOf(".",e)),10);var n=t.indexOf("Trident/");if(n>0){var o=t.indexOf("rv:");return parseInt(t.substring(o+3,t.indexOf(".",o)),10)}var i=t.indexOf("Edge/");return i>0?parseInt(t.substring(i+5,t.indexOf(".",i)),10):-1}let ai;function sr(){sr.init||(sr.init=!0,ai=h_()!==-1)}var di={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){sr(),s.nextTick(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const t=document.createElement("object");this._resizeObject=t,t.setAttribute("aria-hidden","true"),t.setAttribute("tabindex",-1),t.onload=this.addResizeHandlers,t.type="text/html",ai&&this.$el.appendChild(t),t.data="about:blank",ai||this.$el.appendChild(t)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit("notify",{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!ai&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const p_=s.withScopeId("data-v-b329ee4c");s.pushScopeId("data-v-b329ee4c");const m_={class:"resize-observer",tabindex:"-1"};s.popScopeId();const g_=p_((t,e,n,o,i,r)=>(s.openBlock(),s.createBlock("div",m_)));di.render=g_,di.__scopeId="data-v-b329ee4c",di.__file="src/components/ResizeObserver.vue";function ci(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ci=function(e){return typeof e}:ci=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ci(t)}function y_(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ac(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function b_(t,e,n){return e&&Ac(t.prototype,e),n&&Ac(t,n),t}function Oc(t){return $_(t)||__(t)||w_(t)||C_()}function $_(t){if(Array.isArray(t))return rr(t)}function __(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function w_(t,e){if(t){if(typeof t=="string")return rr(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rr(t,e)}}function rr(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function C_(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
55
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function x_(t){var e;return typeof t=="function"?e={callback:t}:e=t,e}function k_(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,i,r,l=function(d){for(var c=arguments.length,u=new Array(c>1?c-1:0),f=1;f<c;f++)u[f-1]=arguments[f];if(r=u,!(o&&d===i)){var h=n.leading;typeof h=="function"&&(h=h(d,i)),(!o||d!==i)&&h&&t.apply(void 0,[d].concat(Oc(r))),i=d,clearTimeout(o),o=setTimeout(function(){t.apply(void 0,[d].concat(Oc(r))),o=0},e)}};return l._clear=function(){clearTimeout(o),o=null},l}function Ic(t,e){if(t===e)return!0;if(ci(t)==="object"){for(var n in t)if(!Ic(t[n],e[n]))return!1;return!0}return!1}var S_=function(){function t(e,n,o){y_(this,t),this.el=e,this.observer=null,this.frozen=!1,this.createObserver(n,o)}return b_(t,[{key:"createObserver",value:function(n,o){var i=this;if(this.observer&&this.destroyObserver(),!this.frozen){if(this.options=x_(n),this.callback=function(a,d){i.options.callback(a,d),a&&i.options.once&&(i.frozen=!0,i.destroyObserver())},this.callback&&this.options.throttle){var r=this.options.throttleOptions||{},l=r.leading;this.callback=k_(this.callback,this.options.throttle,{leading:function(d){return l==="both"||l==="visible"&&d||l==="hidden"&&!d}})}this.oldResult=void 0,this.observer=new IntersectionObserver(function(a){var d=a[0];if(a.length>1){var c=a.find(function(f){return f.isIntersecting});c&&(d=c)}if(i.callback){var u=d.isIntersecting&&d.intersectionRatio>=i.threshold;if(u===i.oldResult)return;i.oldResult=u,i.callback(u,d)}},this.options.intersection),s.nextTick(function(){i.observer&&i.observer.observe(i.el)})}}},{key:"destroyObserver",value:function(){this.observer&&(this.observer.disconnect(),this.observer=null),this.callback&&this.callback._clear&&(this.callback._clear(),this.callback=null)}},{key:"threshold",get:function(){return this.options.intersection&&typeof this.options.intersection.threshold=="number"?this.options.intersection.threshold:0}}]),t}();function Tc(t,e,n){var o=e.value;if(o)if(typeof IntersectionObserver>"u")console.warn("[vue-observe-visibility] IntersectionObserver API is not available in your browser. Please install this polyfill: https://github.com/w3c/IntersectionObserver/tree/master/polyfill");else{var i=new S_(t,o,n);t._vue_visibilityState=i}}function v_(t,e,n){var o=e.value,i=e.oldValue;if(!Ic(o,i)){var r=t._vue_visibilityState;if(!o){Lc(t);return}r?r.createObserver(o,n):Tc(t,{value:o},n)}}function Lc(t){var e=t._vue_visibilityState;e&&(e.destroyObserver(),delete t._vue_visibilityState)}var M_={beforeMount:Tc,updated:v_,unmounted:Lc};function D_(t){return{all:t=t||new Map,on:function(e,n){var o=t.get(e);o&&o.push(n)||t.set(e,[n])},off:function(e,n){var o=t.get(e);o&&o.splice(o.indexOf(n)>>>0,1)},emit:function(e,n){(t.get(e)||[]).slice().map(function(o){o(n)}),(t.get("*")||[]).slice().map(function(o){o(e,n)})}}}var zc={itemsLimit:1e3},E_=/(auto|scroll)/;function Hc(t,e){return t.parentNode===null?e:Hc(t.parentNode,e.concat([t]))}var lr=function(e,n){return getComputedStyle(e,null).getPropertyValue(n)},B_=function(e){return lr(e,"overflow")+lr(e,"overflow-y")+lr(e,"overflow-x")},V_=function(e){return E_.test(B_(e))};function jc(t){if(t instanceof HTMLElement||t instanceof SVGElement){for(var e=Hc(t.parentNode,[]),n=0;n<e.length;n+=1)if(V_(e[n]))return e[n];return document.scrollingElement||document.documentElement}}function ar(t){"@babel/helpers - typeof";return ar=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ar(t)}var Wc={items:{type:Array,required:!0},keyField:{type:String,default:"id"},direction:{type:String,default:"vertical",validator:function(e){return["vertical","horizontal"].includes(e)}},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"}};function Yc(){return this.items.length&&ar(this.items[0])!=="object"}var dr=!1;if(typeof window<"u"){dr=!1;try{var P_=Object.defineProperty({},"passive",{get:function(){dr=!0}});window.addEventListener("test",null,P_)}catch{}}let R_=0;var Xn={name:"RecycleScroller",components:{ResizeObserver:di},directives:{ObserveVisibility:M_},props:{...Wc,itemSize:{type:Number,default:null},gridItems:{type:Number,default:void 0},itemSecondarySize:{type:Number,default:void 0},minItemSize:{type:[Number,String],default:null},sizeField:{type:String,default:"size"},typeField:{type:String,default:"type"},buffer:{type:Number,default:200},pageMode:{type:Boolean,default:!1},prerender:{type:Number,default:0},emitUpdate:{type:Boolean,default:!1},updateInterval:{type:Number,default:0},skipHover:{type:Boolean,default:!1},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"},listClass:{type:[String,Object,Array],default:""},itemClass:{type:[String,Object,Array],default:""}},emits:["resize","visible","hidden","update","scroll-start","scroll-end"],data(){return{pool:[],totalSize:0,ready:!1,hoverKey:null}},computed:{sizes(){if(this.itemSize===null){const t={"-1":{accumulator:0}},e=this.items,n=this.sizeField,o=this.minItemSize;let i=1e4,r=0,l;for(let a=0,d=e.length;a<d;a++)l=e[a][n]||o,l<i&&(i=l),r+=l,t[a]={accumulator:r,size:l};return this.$_computedMinItemSize=i,t}return[]},simpleArray:Yc,itemIndexByKey(){const{keyField:t,items:e}=this,n={};for(let o=0,i=e.length;o<i;o++)n[e[o][t]]=o;return n}},watch:{items(){this.updateVisibleItems(!0)},pageMode(){this.applyPageMode(),this.updateVisibleItems(!1)},sizes:{handler(){this.updateVisibleItems(!1)},deep:!0},gridItems(){this.updateVisibleItems(!0)},itemSecondarySize(){this.updateVisibleItems(!0)}},created(){this.$_startIndex=0,this.$_endIndex=0,this.$_views=new Map,this.$_unusedViews=new Map,this.$_scrollDirty=!1,this.$_lastUpdateScrollPosition=0,this.prerender&&(this.$_prerender=!0,this.updateVisibleItems(!1)),this.gridItems&&!this.itemSize&&console.error("[vue-recycle-scroller] You must provide an itemSize when using gridItems")},mounted(){this.applyPageMode(),this.$nextTick(()=>{this.$_prerender=!1,this.updateVisibleItems(!0),this.ready=!0})},activated(){const t=this.$_lastUpdateScrollPosition;typeof t=="number"&&this.$nextTick(()=>{this.scrollToPosition(t)})},beforeUnmount(){this.removeListeners()},methods:{addView(t,e,n,o,i){const r=s.markRaw({id:R_++,index:e,used:!0,key:o,type:i}),l=s.shallowReactive({item:n,position:0,nr:r});return t.push(l),l},unuseView(t,e=!1){const n=this.$_unusedViews,o=t.nr.type;let i=n.get(o);i||(i=[],n.set(o,i)),i.push(t),e||(t.nr.used=!1,t.position=-9999)},handleResize(){this.$emit("resize"),this.ready&&this.updateVisibleItems(!1)},handleScroll(t){if(!this.$_scrollDirty){if(this.$_scrollDirty=!0,this.$_updateTimeout)return;const e=()=>requestAnimationFrame(()=>{this.$_scrollDirty=!1;const{continuous:n}=this.updateVisibleItems(!1,!0);n||(clearTimeout(this.$_refreshTimout),this.$_refreshTimout=setTimeout(this.handleScroll,this.updateInterval+100))});e(),this.updateInterval&&(this.$_updateTimeout=setTimeout(()=>{this.$_updateTimeout=0,this.$_scrollDirty&&e()},this.updateInterval))}},handleVisibilityChange(t,e){this.ready&&(t||e.boundingClientRect.width!==0||e.boundingClientRect.height!==0?(this.$emit("visible"),requestAnimationFrame(()=>{this.updateVisibleItems(!1)})):this.$emit("hidden"))},updateVisibleItems(t,e=!1){const n=this.itemSize,o=this.gridItems||1,i=this.itemSecondarySize||n,r=this.$_computedMinItemSize,l=this.typeField,a=this.simpleArray?null:this.keyField,d=this.items,c=d.length,u=this.sizes,f=this.$_views,h=this.$_unusedViews,p=this.pool,m=this.itemIndexByKey;let g,y,b,$,w;if(!c)g=y=$=w=b=0;else if(this.$_prerender)g=$=0,y=w=Math.min(this.prerender,d.length),b=null;else{const P=this.getScroll();if(e){let E=P.start-this.$_lastUpdateScrollPosition;if(E<0&&(E=-E),n===null&&E<r||E<n)return{continuous:!0}}this.$_lastUpdateScrollPosition=P.start;const C=this.buffer;P.start-=C,P.end+=C;let _=0;if(this.$refs.before&&(_=this.$refs.before.scrollHeight,P.start-=_),this.$refs.after){const E=this.$refs.after.scrollHeight;P.end+=E}if(n===null){let E,v=0,M=c-1,k=~~(c/2),B;do B=k,E=u[k].accumulator,E<P.start?v=k:k<c-1&&u[k+1].accumulator>P.start&&(M=k),k=~~((v+M)/2);while(k!==B);for(k<0&&(k=0),g=k,b=u[c-1].accumulator,y=k;y<c&&u[y].accumulator<P.end;y++);for(y===-1?y=d.length-1:(y++,y>c&&(y=c)),$=g;$<c&&_+u[$].accumulator<P.start;$++);for(w=$;w<c&&_+u[w].accumulator<P.end;w++);}else{g=~~(P.start/n*o);const E=g%o;g-=E,y=Math.ceil(P.end/n*o),$=Math.max(0,Math.floor((P.start-_)/n*o)),w=Math.floor((P.end-_)/n*o),g<0&&(g=0),y>c&&(y=c),$<0&&($=0),w>c&&(w=c),b=Math.ceil(c/o)*n}}y-g>zc.itemsLimit&&this.itemsLimitError(),this.totalSize=b;let S;const x=g<=this.$_endIndex&&y>=this.$_startIndex;if(x)for(let P=0,C=p.length;P<C;P++)S=p[P],S.nr.used&&(t&&(S.nr.index=m[S.item[a]]),(S.nr.index==null||S.nr.index<g||S.nr.index>=y)&&this.unuseView(S));const V=x?null:new Map;let D,F,N;for(let P=g;P<y;P++){D=d[P];const C=a?D[a]:D;if(C==null)throw new Error(`Key is ${C} on item (keyField is '${a}')`);if(S=f.get(C),!n&&!u[P].size){S&&this.unuseView(S);continue}F=D[l];let _=h.get(F),E=!1;if(!S)x?_&&_.length?S=_.pop():S=this.addView(p,P,D,C,F):(N=V.get(F)||0,(!_||N>=_.length)&&(S=this.addView(p,P,D,C,F),this.unuseView(S,!0),_=h.get(F)),S=_[N],V.set(F,N+1)),f.delete(S.nr.key),S.nr.used=!0,S.nr.index=P,S.nr.key=C,S.nr.type=F,f.set(C,S),E=!0;else if(!S.nr.used&&(S.nr.used=!0,E=!0,_)){const v=_.indexOf(S);v!==-1&&_.splice(v,1)}S.item=D,E&&(P===d.length-1&&this.$emit("scroll-end"),P===0&&this.$emit("scroll-start")),n===null?(S.position=u[P-1].accumulator,S.offset=0):(S.position=Math.floor(P/o)*n,S.offset=P%o*i)}return this.$_startIndex=g,this.$_endIndex=y,this.emitUpdate&&this.$emit("update",g,y,$,w),clearTimeout(this.$_sortTimer),this.$_sortTimer=setTimeout(this.sortViews,this.updateInterval+300),{continuous:x}},getListenerTarget(){let t=jc(this.$el);return window.document&&(t===window.document.documentElement||t===window.document.body)&&(t=window),t},getScroll(){const{$el:t,direction:e}=this,n=e==="vertical";let o;if(this.pageMode){const i=t.getBoundingClientRect(),r=n?i.height:i.width;let l=-(n?i.top:i.left),a=n?window.innerHeight:window.innerWidth;l<0&&(a+=l,l=0),l+a>r&&(a=r-l),o={start:l,end:l+a}}else n?o={start:t.scrollTop,end:t.scrollTop+t.clientHeight}:o={start:t.scrollLeft,end:t.scrollLeft+t.clientWidth};return o},applyPageMode(){this.pageMode?this.addListeners():this.removeListeners()},addListeners(){this.listenerTarget=this.getListenerTarget(),this.listenerTarget.addEventListener("scroll",this.handleScroll,dr?{passive:!0}:!1),this.listenerTarget.addEventListener("resize",this.handleResize)},removeListeners(){this.listenerTarget&&(this.listenerTarget.removeEventListener("scroll",this.handleScroll),this.listenerTarget.removeEventListener("resize",this.handleResize),this.listenerTarget=null)},scrollToItem(t){let e;const n=this.gridItems||1;this.itemSize===null?e=t>0?this.sizes[t-1].accumulator:0:e=Math.floor(t/n)*this.itemSize,this.scrollToPosition(e)},scrollToPosition(t){const e=this.direction==="vertical"?{scroll:"scrollTop",start:"top"}:{scroll:"scrollLeft",start:"left"};let n,o,i;if(this.pageMode){const r=jc(this.$el),l=r.tagName==="HTML"?0:r[e.scroll],a=r.getBoundingClientRect(),c=this.$el.getBoundingClientRect()[e.start]-a[e.start];n=r,o=e.scroll,i=t+l+c}else n=this.$el,o=e.scroll,i=t;n[o]=i},itemsLimitError(){throw setTimeout(()=>{console.log("It seems the scroller element isn't scrolling, so it tries to render all the items at once.","Scroller:",this.$el),console.log("Make sure the scroller has a fixed height (or width) and 'overflow-y' (or 'overflow-x') set to 'auto' so it can scroll correctly and only render the items visible in the scroll viewport.")}),new Error("Rendered items limit reached")},sortViews(){this.pool.sort((t,e)=>t.nr.index-e.nr.index)}}};const F_={key:0,ref:"before",class:"vue-recycle-scroller__slot"},N_={key:1,ref:"after",class:"vue-recycle-scroller__slot"};function A_(t,e,n,o,i,r){const l=s.resolveComponent("ResizeObserver"),a=s.resolveDirective("observe-visibility");return s.withDirectives((s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["vue-recycle-scroller",{ready:i.ready,"page-mode":n.pageMode,[`direction-${t.direction}`]:!0}]),onScrollPassive:e[0]||(e[0]=(...d)=>r.handleScroll&&r.handleScroll(...d))},[t.$slots.before?(s.openBlock(),s.createElementBlock("div",F_,[s.renderSlot(t.$slots,"before")],512)):s.createCommentVNode("v-if",!0),(s.openBlock(),s.createBlock(s.resolveDynamicComponent(n.listTag),{ref:"wrapper",style:s.normalizeStyle({[t.direction==="vertical"?"minHeight":"minWidth"]:i.totalSize+"px"}),class:s.normalizeClass(["vue-recycle-scroller__item-wrapper",n.listClass])},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.pool,d=>(s.openBlock(),s.createBlock(s.resolveDynamicComponent(n.itemTag),s.mergeProps({key:d.nr.id,style:i.ready?{transform:`translate${t.direction==="vertical"?"Y":"X"}(${d.position}px) translate${t.direction==="vertical"?"X":"Y"}(${d.offset}px)`,width:n.gridItems?`${t.direction==="vertical"&&n.itemSecondarySize||n.itemSize}px`:void 0,height:n.gridItems?`${t.direction==="horizontal"&&n.itemSecondarySize||n.itemSize}px`:void 0}:null,class:["vue-recycle-scroller__item-view",[n.itemClass,{hover:!n.skipHover&&i.hoverKey===d.nr.key}]]},s.toHandlers(n.skipHover?{}:{mouseenter:()=>{i.hoverKey=d.nr.key},mouseleave:()=>{i.hoverKey=null}})),{default:s.withCtx(()=>[s.renderSlot(t.$slots,"default",{item:d.item,index:d.nr.index,active:d.nr.used})]),_:2},1040,["style","class"]))),128)),s.renderSlot(t.$slots,"empty")]),_:3},8,["style","class"])),t.$slots.after?(s.openBlock(),s.createElementBlock("div",N_,[s.renderSlot(t.$slots,"after")],512)):s.createCommentVNode("v-if",!0),s.createVNode(l,{onNotify:r.handleResize},null,8,["onNotify"])],34)),[[a,r.handleVisibilityChange]])}Xn.render=A_,Xn.__file="src/components/RecycleScroller.vue";var ui={name:"DynamicScroller",components:{RecycleScroller:Xn},provide(){return typeof ResizeObserver<"u"&&(this.$_resizeObserver=new ResizeObserver(t=>{requestAnimationFrame(()=>{if(Array.isArray(t)){for(const e of t)if(e.target&&e.target.$_vs_onResize){let n,o;if(e.borderBoxSize){const i=e.borderBoxSize[0];n=i.inlineSize,o=i.blockSize}else n=e.contentRect.width,o=e.contentRect.height;e.target.$_vs_onResize(e.target.$_vs_id,n,o)}}})})),{vscrollData:this.vscrollData,vscrollParent:this,vscrollResizeObserver:this.$_resizeObserver}},inheritAttrs:!1,props:{...Wc,minItemSize:{type:[Number,String],required:!0}},emits:["resize","visible"],data(){return{vscrollData:{active:!0,sizes:{},keyField:this.keyField,simpleArray:!1}}},computed:{simpleArray:Yc,itemsWithSize(){const t=[],{items:e,keyField:n,simpleArray:o}=this,i=this.vscrollData.sizes,r=e.length;for(let l=0;l<r;l++){const a=e[l],d=o?l:a[n];let c=i[d];typeof c>"u"&&!this.$_undefinedMap[d]&&(c=0),t.push({item:a,id:d,size:c})}return t}},watch:{items(){this.forceUpdate()},simpleArray:{handler(t){this.vscrollData.simpleArray=t},immediate:!0},direction(t){this.forceUpdate(!0)},itemsWithSize(t,e){const n=this.$el.scrollTop;let o=0,i=0;const r=Math.min(t.length,e.length);for(let a=0;a<r&&!(o>=n);a++)o+=e[a].size||this.minItemSize,i+=t[a].size||this.minItemSize;const l=i-o;l!==0&&(this.$el.scrollTop+=l)}},beforeCreate(){this.$_updates=[],this.$_undefinedSizes=0,this.$_undefinedMap={},this.$_events=D_()},activated(){this.vscrollData.active=!0},deactivated(){this.vscrollData.active=!1},unmounted(){this.$_events.all.clear()},methods:{onScrollerResize(){this.$refs.scroller&&this.forceUpdate(),this.$emit("resize")},onScrollerVisible(){this.$_events.emit("vscroll:update",{force:!1}),this.$emit("visible")},forceUpdate(t=!1){(t||this.simpleArray)&&(this.vscrollData.sizes={}),this.$_events.emit("vscroll:update",{force:!0})},scrollToItem(t){const e=this.$refs.scroller;e&&e.scrollToItem(t)},getItemSize(t,e=void 0){const n=this.simpleArray?e??this.items.indexOf(t):t[this.keyField];return this.vscrollData.sizes[n]||0},scrollToBottom(){if(this.$_scrollingToBottom)return;this.$_scrollingToBottom=!0;const t=this.$el;this.$nextTick(()=>{t.scrollTop=t.scrollHeight+5e3;const e=()=>{t.scrollTop=t.scrollHeight+5e3,requestAnimationFrame(()=>{t.scrollTop=t.scrollHeight+5e3,this.$_undefinedSizes===0?this.$_scrollingToBottom=!1:requestAnimationFrame(e)})};requestAnimationFrame(e)})}}};function O_(t,e,n,o,i,r){const l=s.resolveComponent("RecycleScroller");return s.openBlock(),s.createBlock(l,s.mergeProps({ref:"scroller",items:r.itemsWithSize,"min-item-size":n.minItemSize,direction:t.direction,"key-field":"id","list-tag":t.listTag,"item-tag":t.itemTag},t.$attrs,{onResize:r.onScrollerResize,onVisible:r.onScrollerVisible}),{default:s.withCtx(({item:a,index:d,active:c})=>[s.renderSlot(t.$slots,"default",s.normalizeProps(s.guardReactiveProps({item:a.item,index:d,active:c,itemWithSize:a})))]),before:s.withCtx(()=>[s.renderSlot(t.$slots,"before")]),after:s.withCtx(()=>[s.renderSlot(t.$slots,"after")]),empty:s.withCtx(()=>[s.renderSlot(t.$slots,"empty")]),_:3},16,["items","min-item-size","direction","list-tag","item-tag","onResize","onVisible"])}ui.render=O_,ui.__file="src/components/DynamicScroller.vue";var cr={name:"DynamicScrollerItem",inject:["vscrollData","vscrollParent","vscrollResizeObserver"],props:{item:{required:!0},watchData:{type:Boolean,default:!1},active:{type:Boolean,required:!0},index:{type:Number,default:void 0},sizeDependencies:{type:[Array,Object],default:null},emitResize:{type:Boolean,default:!1},tag:{type:String,default:"div"}},emits:["resize"],computed:{id(){if(this.vscrollData.simpleArray)return this.index;if(this.vscrollData.keyField in this.item)return this.item[this.vscrollData.keyField];throw new Error(`keyField '${this.vscrollData.keyField}' not found in your item. You should set a valid keyField prop on your Scroller`)},size(){return this.vscrollData.sizes[this.id]||0},finalActive(){return this.active&&this.vscrollData.active}},watch:{watchData:"updateWatchData",id(t,e){if(this.$el.$_vs_id=this.id,this.size||this.onDataUpdate(),this.$_sizeObserved){const n=this.vscrollData.sizes[e],o=this.vscrollData.sizes[t];n!=null&&n!==o&&this.applySize(n)}},finalActive(t){this.size||(t?this.vscrollParent.$_undefinedMap[this.id]||(this.vscrollParent.$_undefinedSizes++,this.vscrollParent.$_undefinedMap[this.id]=!0):this.vscrollParent.$_undefinedMap[this.id]&&(this.vscrollParent.$_undefinedSizes--,this.vscrollParent.$_undefinedMap[this.id]=!1)),this.vscrollResizeObserver?t?this.observeSize():this.unobserveSize():t&&this.$_pendingVScrollUpdate===this.id&&this.updateSize()}},created(){if(!this.$isServer&&(this.$_forceNextVScrollUpdate=null,this.updateWatchData(),!this.vscrollResizeObserver)){for(const t in this.sizeDependencies)this.$watch(()=>this.sizeDependencies[t],this.onDataUpdate);this.vscrollParent.$_events.on("vscroll:update",this.onVscrollUpdate)}},mounted(){this.finalActive&&(this.updateSize(),this.observeSize())},beforeUnmount(){this.vscrollParent.$_events.off("vscroll:update",this.onVscrollUpdate),this.unobserveSize()},methods:{updateSize(){this.finalActive?this.$_pendingSizeUpdate!==this.id&&(this.$_pendingSizeUpdate=this.id,this.$_forceNextVScrollUpdate=null,this.$_pendingVScrollUpdate=null,this.computeSize(this.id)):this.$_forceNextVScrollUpdate=this.id},updateWatchData(){this.watchData&&!this.vscrollResizeObserver?this.$_watchData=this.$watch("item",()=>{this.onDataUpdate()},{deep:!0}):this.$_watchData&&(this.$_watchData(),this.$_watchData=null)},onVscrollUpdate({force:t}){!this.finalActive&&t&&(this.$_pendingVScrollUpdate=this.id),(this.$_forceNextVScrollUpdate===this.id||t||!this.size)&&this.updateSize()},onDataUpdate(){this.updateSize()},computeSize(t){this.$nextTick(()=>{if(this.id===t){const e=this.$el.offsetWidth,n=this.$el.offsetHeight;this.applyWidthHeight(e,n)}this.$_pendingSizeUpdate=null})},applyWidthHeight(t,e){const n=~~(this.vscrollParent.direction==="vertical"?e:t);n&&this.size!==n&&this.applySize(n)},applySize(t){this.vscrollParent.$_undefinedMap[this.id]&&(this.vscrollParent.$_undefinedSizes--,this.vscrollParent.$_undefinedMap[this.id]=void 0),this.vscrollData.sizes[this.id]=t,this.emitResize&&this.$emit("resize",this.id)},observeSize(){this.vscrollResizeObserver&&(this.$_sizeObserved||(this.vscrollResizeObserver.observe(this.$el),this.$el.$_vs_id=this.id,this.$el.$_vs_onResize=this.onResize,this.$_sizeObserved=!0))},unobserveSize(){this.vscrollResizeObserver&&this.$_sizeObserved&&(this.vscrollResizeObserver.unobserve(this.$el),this.$el.$_vs_onResize=void 0,this.$_sizeObserved=!1)},onResize(t,e,n){this.id===t&&this.applyWidthHeight(e,n)}},render(){return s.h(this.tag,this.$slots.default())}};cr.__file="src/components/DynamicScrollerItem.vue";function I_(t,e){t.component("".concat(e,"recycle-scroller"),Xn),t.component("".concat(e,"RecycleScroller"),Xn),t.component("".concat(e,"dynamic-scroller"),ui),t.component("".concat(e,"DynamicScroller"),ui),t.component("".concat(e,"dynamic-scroller-item"),cr),t.component("".concat(e,"DynamicScrollerItem"),cr)}var T_={version:"2.0.0-beta.8",install:function(e,n){var o=Object.assign({},{installComponents:!0,componentsPrefix:""},n);for(var i in o)typeof o[i]<"u"&&(zc[i]=o[i]);o.installComponents&&I_(e,o.componentsPrefix)}};function L_(){const t=s.inject(_r);if(!t)throw new Error("No provider");return t}function z_(){var t;return(t=s.getCurrentInstance())==null?void 0:t.emit}function H_(){const t=z_();return{emitData(e){t==null||t("dialog:emit-data",e)}}}function j_(){return s.inject(yi)}const W_=t=>{t.use(tu,{duration:.3,color:"var(--fm-color-opacity-sm)",initialOpacity:1,finalOpacity:.1,dissolveDuration:.6}),t.directive("tooltip",d_),t.use(Uu),t.use(f_),t.use(T_),Object.entries(Rc).forEach(([e,n])=>{t.component(e,n)})};ae.FeedMeUI=W_,ae.components=Rc,ae.useBreakpoints=Ao,ae.useDialog=L_,ae.useDialogChild=H_,ae.useFocus=jn,ae.useFormChild=yd,ae.useProxiedModel=Z,ae.useSnackbar=j_,ae.useValidation=gd,Object.defineProperty(ae,Symbol.toStringTag,{value:"Module"})});