lorgg-v2-components 0.0.112 → 0.0.114
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lorgg-components.cjs.js +5 -5
- package/dist/lorgg-components.css +1 -1
- package/dist/lorgg-components.es.js +3397 -3390
- package/dist/lorgg-components.umd.js +7 -7
- package/package.json +1 -1
|
@@ -807,7 +807,7 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
|
|
|
807
807
|
|
|
808
808
|
`,`1) content: element.innerHTML
|
|
809
809
|
`,"2) content: () => element.cloneNode(true)"].join(" "))}var o=a.reduce(function(l,c){var u=c&&QI(c,r);return u&&l.push(u),l},[]);return Co(e)?o[0]:o}At.defaultProps=kn;At.setDefaultProps=xI;At.currentInput=fr;Object.assign({},jw,{effect:function(t){var n=t.state,r={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(n.elements.popper.style,r.popper),n.styles=r,n.elements.arrow&&Object.assign(n.elements.arrow.style,r.arrow)}});At.setDefaultProps({render:db});const fb={cardProp:{type:Object,required:!1,default:void 0},cardCodeProp:{type:String,required:!1,default:void 0},isRoot:{type:Boolean,required:!0},quantityNeeded:{type:Number,required:!1,default:void 0},deckList:{type:Object,required:!1,default(){return{}}},isDeckBuilder:{type:Boolean,required:!1,default:!1},userCardQuantity:{type:Object,required:!1,default:void 0},showTippyLocation:{type:String,required:!1,default:null}},TI=["alt","src"],DI={key:0,class:"quantity-ticks-container"},LI={key:0},OI={key:0,class:"card-info-quantity-possessed"},MI={key:1,class:"line"},NI={class:"card-info-title"},PI={class:"card-info-text"},HI={key:2,class:"line"},RI={key:3,class:"card-info-text"},VI={key:1,class:"associated-card-container"},KI=i.defineComponent({__name:"CardItem",props:fb,setup(e){const t=e,n=i.ref(null),r=i.ref(null);let a=null;const A=i.ref(!1),s=Ro(t.cardProp,t.cardCodeProp),o=i.computed(()=>s.value===void 0?null:t.quantityNeeded!=null&&t.userCardQuantity!=null&&s.value.cardCode in t.userCardQuantity&&t.quantityNeeded>t.userCardQuantity[s.value.cardCode]?"bad":null),l=i.computed(()=>{if(s.value===void 0)return[];const y=[];if(t.isRoot)for(const g of s.value.associatedCardRefs)y.push(jt().cardJsonObject[g]);return y}),c=i.computed(()=>{if(s.value===void 0)return[];const y=[];for(const g of s.value.keywordRefs){const v=we().dataJson.keywords.find(_=>_.nameRef===g);v&&y.push(v)}return y}),u=i.computed(()=>t.isRoot&&(t.userCardQuantity!=null||s.value&&(s.value.keywordRefs.length>0||s.value.associatedCardRefs.length>0))),d=i.computed(()=>{var y;return t.userCardQuantity==null||s.value&&!(s.value.cardCode in t.userCardQuantity)?0:t.userCardQuantity[((y=s.value)==null?void 0:y.cardCode)??0]}),f=i.computed(()=>s.value===void 0?null:t.isDeckBuilder&&t.deckList[s.value.cardCode]===3?"disabled":null);i.watch(()=>t.showTippyLocation,y=>{a&&(y?(a.setProps({placement:y}),a.show()):a.hide())});function h(){window.addEventListener("keyup",y=>{y.key=="Shift"&&(A.value=!1)})}function p(){window.addEventListener("keydown",y=>{y.key=="Shift"&&(A.value=!0)})}function m(y){return s.value===void 0?null:t.isDeckBuilder?!(s.value.cardCode in t.deckList)||y>t.deckList[s.value.cardCode]?"disabled":null:y>d.value?"disabled":null}return i.onMounted(()=>{(s.value===void 0||t.userCardQuantity!=null||s.value.keywordRefs.length>0||s.value.associatedCardRefs.length>0)&&(a=At(n.value,{allowHTML:!0,content:r.value,placement:"right-start",duration:0,role:"card-info",maxWidth:"50vw",touch:!1})),(s.value===void 0||s.value.associatedCardRefs.length>0)&&(h(),p())}),(y,g)=>{var _,B,b;const v=i.resolveComponent("CardItem",!0);return i.openBlock(),i.createElementBlock("div",{class:"card-item-container",onMouseover:g[0]||(g[0]=w=>!0),onMouseleave:g[1]||(g[1]=w=>!1)},[i.createElementVNode("img",{ref_key:"cardItem",ref:n,alt:(_=i.unref(s))==null?void 0:_.name,class:i.normalizeClass(["card-item",f.value]),src:`https://lor.gg/storage/cards/card/en_us/${(B=i.unref(s))==null?void 0:B.cardCode}.webp`},null,10,TI),(y.isDeckBuilder||y.userCardQuantity!=null)&&((b=i.unref(s))!=null&&b.collectible)?(i.openBlock(),i.createElementBlock("div",DI,[(i.openBlock(),i.createElementBlock(i.Fragment,null,i.renderList(3,w=>i.createElementVNode("div",{key:w,class:i.normalizeClass(["quantity-tick",m(w)])},null,2)),64))])):i.createCommentVNode("",!0),i.createElementVNode("div",{ref_key:"cardInfo",ref:r,class:i.normalizeClass(A.value?null:"card-info")},[!A.value&&u.value&&i.unref(s)?(i.openBlock(),i.createElementBlock("div",LI,[d.value!==void 0?(i.openBlock(),i.createElementBlock("div",OI,[i.createTextVNode(i.toDisplayString("You have: ")+" "),i.createElementVNode("b",{class:i.normalizeClass(o.value)},i.toDisplayString(d.value+" / "+(y.quantityNeeded||3)),3)])):i.createCommentVNode("",!0),d.value!==void 0&&(i.unref(s).keywordRefs.length>0||i.unref(s).associatedCardRefs.length>0)?(i.openBlock(),i.createElementBlock("hr",MI)):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(c.value,w=>(i.openBlock(),i.createElementBlock("div",{key:w.nameRef,class:"card-info-section"},[i.createElementVNode("h4",NI,i.toDisplayString(w.name),1),i.createElementVNode("p",PI,i.toDisplayString(w.description),1)]))),128)),i.unref(s).keywordRefs.length>0&&i.unref(s).associatedCardRefs.length>0?(i.openBlock(),i.createElementBlock("hr",HI)):i.createCommentVNode("",!0),i.unref(s).associatedCardRefs.length>0?(i.openBlock(),i.createElementBlock("div",RI,i.toDisplayString("Hold Shift to see Associated Cards"))):i.createCommentVNode("",!0)])):(i.openBlock(),i.createElementBlock("div",VI,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(l.value,w=>(i.openBlock(),i.createBlock(v,{key:w.cardCode,"card-code-prop":w.cardCode,"is-deck-builder":!1,"is-root":!1,class:"associated-card"},null,8,["card-code-prop"]))),128))]))],2)],32)}}});const M=(e,t)=>{const n=e.__vccOpts||e;for(const[r,a]of t)n[r]=a;return n},Wa=M(KI,[["__scopeId","data-v-d8fb3406"]]),$I=i.defineComponent({__name:"RevealCarousel",props:Z5,setup(e){var o;const t=e,n=[G5],r=i.ref(null),a=i.ref((o=r.value)==null?void 0:o.clientWidth),A=i.computed(()=>a.value===void 0?!0:a.value<400);function s(){var l;a.value=(l=r.value)==null?void 0:l.clientWidth}return i.onMounted(()=>{window.addEventListener("resize",s),s()}),i.onUnmounted(()=>{window.removeEventListener("resize",s)}),(l,c)=>(i.openBlock(),i.createElementBlock("div",{ref_key:"revealCarousel",ref:r,class:"reveal-carousel"},[i.createVNode(i.unref($w),{"slides-per-view":"auto","space-between":15,"centered-slides":A.value,navigation:!0,modules:n},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(t.cardCodes,u=>(i.openBlock(),i.createBlock(i.unref(Ww),{key:u},{default:i.withCtx(()=>[i.createVNode(Wa,{class:"card-item-called","card-code-prop":u,"is-root":!0},null,8,["card-code-prop"])]),_:2},1024))),128))]),_:1},8,["centered-slides"])],512))}});const gg=M($I,[["__scopeId","data-v-430f2bb4"]]),hb={fetchSeachResult:{type:Function,required:!0,default:()=>[]}},WI={cardProp:{type:Object,required:!1,default:void 0},cardCodeProp:{type:String,required:!1,default:void 0},ignoreCardItem:{type:Boolean,required:!1,default:void 0},color:{type:String,required:!1,default:void 0},name:{type:String,required:!1,default:void 0},manaNumber:{type:Number,required:!1,default:void 0},routerLink:{type:Object,required:!1,default:"404"},quantityNumber:{type:Number,required:!1,default:void 0},maintainAspectRatio:{type:Boolean,required:!1,default:!0},showPlusMinus:{type:Boolean,required:!1,default:!1}},GI="data:image/svg+xml;base64,ICA8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDMxIDM2Ij4KICAgIDxkZWZzPgogICAgICA8bGluZWFyR3JhZGllbnQKICAgICAgICBpZD0iYSIKICAgICAgICB4MT0iLjA4IgogICAgICAgIHkxPSIuODIiCiAgICAgICAgeDI9IjEiCiAgICAgICAgeTI9Ii4xOSIKICAgICAgICBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIKICAgICAgPgogICAgICAgIDxzdG9wIG9mZnNldD0iMCIgc3RvcC1jb2xvcj0iIzA0NjZjOCIgLz4KICAgICAgICA8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiMwMDNhOWUiIC8+CiAgICAgIDwvbGluZWFyR3JhZGllbnQ+CiAgICA8L2RlZnM+CiAgICA8ZyB0cmFuc2Zvcm09InJvdGF0ZSg5MCAxNS41IDE1LjUpIiBmaWxsPSJ1cmwoI2EpIj4KICAgICAgPHBhdGgKICAgICAgICBkPSJNMjMuNTUgMzAuNWgtMTEuMWE1LjUyIDUuNTIgMCAwIDEtNC43NS0yLjc0bC01LjUyLTkuNWE1LjUxIDUuNTEgMCAwIDEgMC01LjUybDUuNTItOS41QTUuNTIgNS41MiAwIDAgMSAxMi40NS41aDExLjFhNS41MiA1LjUyIDAgMCAxIDQuNzUgMi43NGw1LjUyIDkuNWMuOTkgMS43Ljk5IDMuODIgMCA1LjUybC01LjUyIDkuNWE1LjUyIDUuNTIgMCAwIDEtNC43NSAyLjc0WiIKICAgICAgLz4KICAgICAgPHBhdGgKICAgICAgICBkPSJNMTIuNDUgMWMtMS43NyAwLTMuNDMuOTUtNC4zMiAyLjQ5bC01LjUyIDkuNWE1LjAxIDUuMDEgMCAwIDAgMCA1LjAybDUuNTIgOS41QTUuMDIgNS4wMiAwIDAgMCAxMi40NSAzMGgxMS4xYzEuNzcgMCAzLjQzLS45NSA0LjMyLTIuNDlsNS41Mi05LjVjLjktMS41NS45LTMuNDcgMC01LjAybC01LjUyLTkuNUE1LjAyIDUuMDIgMCAwIDAgMjMuNTUgMWgtMTEuMW0wLTFoMTEuMWE2IDYgMCAwIDEgNS4xOCAyLjk5bDUuNTIgOS41YTYgNiAwIDAgMSAwIDYuMDJsLTUuNTIgOS41QTYgNiAwIDAgMSAyMy41NSAzMWgtMTEuMWE2IDYgMCAwIDEtNS4xOC0yLjk5bC01LjUyLTkuNWE2IDYgMCAwIDEgMC02LjAybDUuNTItOS41QTYgNiAwIDAgMSAxMi40NSAwWiIKICAgICAgICBmaWxsPSIjZmZjNTNlIgogICAgICAvPgogICAgPC9nPgogIDwvc3ZnPg==",zI=["src"],jo=i.defineComponent({__name:"ManaHexagonIcon",setup(e){return(t,n)=>(i.openBlock(),i.createElementBlock("img",{src:i.unref(GI)},null,8,zI))}});function Av(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function qn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Av(Object(n),!0).forEach(function(r){on(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Av(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function au(e){"@babel/helpers - typeof";return au=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},au(e)}function on(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jI(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,A;for(A=0;A<r.length;A++)a=r[A],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function YI(e,t){if(e==null)return{};var n=jI(e,t),r,a;if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(e);for(a=0;a<A.length;a++)r=A[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Uh(e){return qI(e)||XI(e)||JI(e)||ZI()}function qI(e){if(Array.isArray(e))return Qh(e)}function XI(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function JI(e,t){if(e){if(typeof e=="string")return Qh(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Qh(e,t)}}function Qh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ZI(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
810
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var eU=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},pb={exports:{}};(function(e){(function(t){var n=function(g,v,_){if(!c(v)||d(v)||f(v)||h(v)||l(v))return v;var B,b=0,w=0;if(u(v))for(B=[],w=v.length;b<w;b++)B.push(n(g,v[b],_));else{B={};for(var C in v)Object.prototype.hasOwnProperty.call(v,C)&&(B[g(C,_)]=n(g,v[C],_))}return B},r=function(g,v){v=v||{};var _=v.separator||"_",B=v.split||/(?=[A-Z])/;return g.split(B).join(_)},a=function(g){return p(g)?g:(g=g.replace(/[\-_\s]+(.)?/g,function(v,_){return _?_.toUpperCase():""}),g.substr(0,1).toLowerCase()+g.substr(1))},A=function(g){var v=a(g);return v.substr(0,1).toUpperCase()+v.substr(1)},s=function(g,v){return r(g,v).toLowerCase()},o=Object.prototype.toString,l=function(g){return typeof g=="function"},c=function(g){return g===Object(g)},u=function(g){return o.call(g)=="[object Array]"},d=function(g){return o.call(g)=="[object Date]"},f=function(g){return o.call(g)=="[object RegExp]"},h=function(g){return o.call(g)=="[object Boolean]"},p=function(g){return g=g-0,g===g},m=function(g,v){var _=v&&"process"in v?v.process:v;return typeof _!="function"?g:function(B,b){return _(B,g,b)}},y={camelize:a,decamelize:s,pascalize:A,depascalize:s,camelizeKeys:function(g,v){return n(m(a,v),g)},decamelizeKeys:function(g,v){return n(m(s,v),g,v)},pascalizeKeys:function(g,v){return n(m(A,v),g)},depascalizeKeys:function(){return this.decamelizeKeys.apply(this,arguments)}};e.exports?e.exports=y:t.humps=y})(eU)})(pb);var tU=pb.exports,nU=["class","style"];function rU(e){return e.split(";").map(function(t){return t.trim()}).filter(function(t){return t}).reduce(function(t,n){var r=n.indexOf(":"),a=tU.camelize(n.slice(0,r)),A=n.slice(r+1).trim();return t[a]=A,t},{})}function aU(e){return e.split(/\s+/).reduce(function(t,n){return t[n]=!0,t},{})}function mg(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(typeof e=="string")return e;var r=(e.children||[]).map(function(l){return mg(l)}),a=Object.keys(e.attributes||{}).reduce(function(l,c){var u=e.attributes[c];switch(c){case"class":l.class=aU(u);break;case"style":l.style=rU(u);break;default:l.attrs[c]=u}return l},{attrs:{},class:{},style:{}});n.class;var A=n.style,s=A===void 0?{}:A,o=YI(n,nU);return i.h(e.tag,qn(qn(qn({},t),{},{class:a.class,style:qn(qn({},a.style),s)},a.attrs),o),r)}var gb=!1;try{gb=process.env.NODE_ENV==="production"}catch{}function AU(){if(!gb&&console&&typeof console.error=="function"){var e;(e=console).error.apply(e,arguments)}}function zi(e,t){return Array.isArray(t)&&t.length>0||!Array.isArray(t)&&t?on({},e,t):{}}function sU(e){var t,n=(t={"fa-spin":e.spin,"fa-pulse":e.pulse,"fa-fw":e.fixedWidth,"fa-border":e.border,"fa-li":e.listItem,"fa-inverse":e.inverse,"fa-flip":e.flip===!0,"fa-flip-horizontal":e.flip==="horizontal"||e.flip==="both","fa-flip-vertical":e.flip==="vertical"||e.flip==="both"},on(t,"fa-".concat(e.size),e.size!==null),on(t,"fa-rotate-".concat(e.rotation),e.rotation!==null),on(t,"fa-pull-".concat(e.pull),e.pull!==null),on(t,"fa-swap-opacity",e.swapOpacity),on(t,"fa-bounce",e.bounce),on(t,"fa-shake",e.shake),on(t,"fa-beat",e.beat),on(t,"fa-fade",e.fade),on(t,"fa-beat-fade",e.beatFade),on(t,"fa-flash",e.flash),on(t,"fa-spin-pulse",e.spinPulse),on(t,"fa-spin-reverse",e.spinReverse),t);return Object.keys(n).map(function(r){return n[r]?r:null}).filter(function(r){return r})}function sv(e){if(e&&au(e)==="object"&&e.prefix&&e.iconName&&e.icon)return e;if(eu.icon)return eu.icon(e);if(e===null)return null;if(au(e)==="object"&&e.prefix&&e.iconName)return e;if(Array.isArray(e)&&e.length===2)return{prefix:e[0],iconName:e[1]};if(typeof e=="string")return{prefix:"fas",iconName:e}}var Ue=i.defineComponent({name:"FontAwesomeIcon",props:{border:{type:Boolean,default:!1},fixedWidth:{type:Boolean,default:!1},flip:{type:[Boolean,String],default:!1,validator:function(t){return[!0,!1,"horizontal","vertical","both"].indexOf(t)>-1}},icon:{type:[Object,Array,String],required:!0},mask:{type:[Object,Array,String],default:null},listItem:{type:Boolean,default:!1},pull:{type:String,default:null,validator:function(t){return["right","left"].indexOf(t)>-1}},pulse:{type:Boolean,default:!1},rotation:{type:[String,Number],default:null,validator:function(t){return[90,180,270].indexOf(Number.parseInt(t,10))>-1}},swapOpacity:{type:Boolean,default:!1},size:{type:String,default:null,validator:function(t){return["2xs","xs","sm","lg","xl","2xl","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"].indexOf(t)>-1}},spin:{type:Boolean,default:!1},transform:{type:[String,Object],default:null},symbol:{type:[Boolean,String],default:!1},title:{type:String,default:null},inverse:{type:Boolean,default:!1},bounce:{type:Boolean,default:!1},shake:{type:Boolean,default:!1},beat:{type:Boolean,default:!1},fade:{type:Boolean,default:!1},beatFade:{type:Boolean,default:!1},flash:{type:Boolean,default:!1},spinPulse:{type:Boolean,default:!1},spinReverse:{type:Boolean,default:!1}},setup:function(t,n){var r=n.attrs,a=i.computed(function(){return sv(t.icon)}),A=i.computed(function(){return zi("classes",sU(t))}),s=i.computed(function(){return zi("transform",typeof t.transform=="string"?eu.transform(t.transform):t.transform)}),o=i.computed(function(){return zi("mask",sv(t.mask))}),l=i.computed(function(){return h8(a.value,qn(qn(qn(qn({},A.value),s.value),o.value),{},{symbol:t.symbol,title:t.title}))});i.watch(l,function(u){if(!u)return AU("Could not find one or more icon(s)",a.value,o.value)},{immediate:!0});var c=i.computed(function(){return l.value?mg(l.value.abstract[0],{},r):null});return function(){return c.value}}});i.defineComponent({name:"FontAwesomeLayers",props:{fixedWidth:{type:Boolean,default:!1}},setup:function(t,n){var r=n.slots,a=Uw.familyPrefix,A=i.computed(function(){return["".concat(a,"-layers")].concat(Uh(t.fixedWidth?["".concat(a,"-fw")]:[]))});return function(){return i.h("div",{class:A.value},r.default?r.default():[])}}});i.defineComponent({name:"FontAwesomeLayersText",props:{value:{type:[String,Number],default:""},transform:{type:[String,Object],default:null},counter:{type:Boolean,default:!1},position:{type:String,default:null,validator:function(t){return["bottom-left","bottom-right","top-left","top-right"].indexOf(t)>-1}}},setup:function(t,n){var r=n.attrs,a=Uw.familyPrefix,A=i.computed(function(){return zi("classes",[].concat(Uh(t.counter?["".concat(a,"-layers-counter")]:[]),Uh(t.position?["".concat(a,"-layers-").concat(t.position)]:[])))}),s=i.computed(function(){return zi("transform",typeof t.transform=="string"?eu.transform(t.transform):t.transform)}),o=i.computed(function(){var c=p8(t.value.toString(),qn(qn({},s.value),A.value)),u=c.abstract;return t.counter&&(u[0].attributes.class=u[0].attributes.class.replace("fa-layers-text","")),u[0]}),l=i.computed(function(){return mg(o.value,{},r)});return function(){return l.value}}});const iU={class:"card-slice"},oU={key:0,class:"mana-hexagon"},lU={class:"mana-number"},cU={class:"card-name"},uU={key:1,class:"quantity"},dU={class:"quantity-background"},fU={class:"num-quantity"},hU={class:"plus-minus-content"},pU={class:"plus-minus-quantity"},gU=i.defineComponent({__name:"CardSliceItem",props:WI,emits:["update:card-quantity"],setup(e,{emit:t}){const n=e,r=Ro(n.cardProp,n.cardCodeProp,!1),a=i.ref(null),A=i.ref(null),s=i.ref(null),o=i.ref(null),l=i.computed(()=>{let d=n.color;return!d&&r.value&&(d=pA(r.value,null,!0)),d||(d="var(--color-background-2-rgb)"),{"--color":d}}),c=i.computed(()=>r.value?"https://lor.gg/storage/cards/slice/"+r.value.cardCode+"-slice.webp":""),u=i.computed(()=>{const d=["card-slice-wrapper"];return n.maintainAspectRatio&&d.push("maintain-aspect-ratio"),d});return i.onMounted(()=>{n.ignoreCardItem||At(a.value,{content:s.value,placement:"right",arrow:!0,touch:!1,duration:0,role:"card-image",onShown:d=>{const f=d.popper.innerHTML.includes("right")?"right-start":"left-start";o.value=f},onHidden:()=>{o.value=null}})}),(d,f)=>{const h=i.resolveComponent("RouterLink");return i.openBlock(),i.createBlock(h,{to:n.routerLink},{default:i.withCtx(()=>{var p,m;return[i.createElementVNode("div",{ref_key:"cardSlice",ref:a,class:i.normalizeClass(u.value)},[i.createElementVNode("div",iU,[i.createElementVNode("div",{class:"card-image",style:i.normalizeStyle({backgroundImage:`url(${c.value})`})},null,4),i.createElementVNode("div",{class:"region-gradient",style:i.normalizeStyle(l.value)},null,4),i.unref(r)||n.manaNumber!==void 0&&n.manaNumber!==null?(i.openBlock(),i.createElementBlock("div",oU,[i.createVNode(jo,{class:"hexagon-icon"}),i.createElementVNode("div",lU,i.toDisplayString(n.manaNumber??((p=i.unref(r))==null?void 0:p.cost)),1)])):i.createCommentVNode("",!0),i.createElementVNode("div",cU,i.toDisplayString(n.name??((m=i.unref(r))==null?void 0:m.name)),1),n.quantityNumber!==void 0&&n.quantityNumber!==null?(i.openBlock(),i.createElementBlock("div",uU,[i.createElementVNode("div",dU,[i.createElementVNode("p",fU,i.toDisplayString(n.quantityNumber),1)])])):i.createCommentVNode("",!0),n.showPlusMinus?(i.openBlock(),i.createElementBlock("div",{key:2,class:"plus-minus",onClick:f[2]||(f[2]=i.withModifiers(()=>{},["prevent"]))},[i.createElementVNode("div",hU,[i.createElementVNode("div",{class:"plus-minus-icon",onClick:f[0]||(f[0]=i.withModifiers(y=>{var g;return t("update:card-quantity",{cardCode:((g=i.unref(r))==null?void 0:g.cardCode)??"",quantity:-1})},["prevent"]))},[i.createVNode(i.unref(Ue),{icon:"minus",class:"icon"})]),i.createElementVNode("div",{class:"plus-minus-icon",onClick:f[1]||(f[1]=i.withModifiers(y=>{var g;return t("update:card-quantity",{cardCode:((g=i.unref(r))==null?void 0:g.cardCode)??"",quantity:1})},["prevent"]))},[i.createVNode(i.unref(Ue),{icon:"plus",class:"icon"})]),i.createElementVNode("div",pU,i.toDisplayString(n.quantityNumber),1)])])):i.createCommentVNode("",!0)])],2),i.createElementVNode("div",{ref_key:"cardItemWrapper",ref:s,class:"card-item-container"},[i.unref(r)&&!d.ignoreCardItem?(i.openBlock(),i.createBlock(Wa,{key:0,ref_key:"cardItem",ref:A,"is-root":!0,"card-prop":i.unref(r),"quantity-needed":n.quantityNumber,"show-tippy-location":o.value,class:"card-image-hover"},null,8,["card-prop","quantity-needed","show-tippy-location"])):i.createCommentVNode("",!0)],512)]}),_:1},8,["to"])}}});const fn=M(gU,[["__scopeId","data-v-a1e91ff3"]]);function cr(e){return[null,void 0].indexOf(e)!==-1}function mU(e,t,n){const{object:r,valueProp:a,mode:A}=i.toRefs(e),s=i.getCurrentInstance().proxy,o=n.iv,l=(d,f=!0)=>{o.value=u(d);const h=c(d);t.emit("change",h,s),f&&(t.emit("input",h),t.emit("update:modelValue",h))},c=d=>r.value||cr(d)?d:Array.isArray(d)?d.map(f=>f[a.value]):d[a.value],u=d=>cr(d)?A.value==="single"?{}:[]:d;return{update:l}}function vU(e,t){const{value:n,modelValue:r,mode:a,valueProp:A}=i.toRefs(e),s=i.ref(a.value!=="single"?[]:{}),o=r&&r.value!==void 0?r:n,l=i.computed(()=>a.value==="single"?s.value[A.value]:s.value.map(u=>u[A.value])),c=i.computed(()=>a.value!=="single"?s.value.map(u=>u[A.value]).join(","):s.value[A.value]);return{iv:s,internalValue:s,ev:o,externalValue:o,textValue:c,plainValue:l}}function BU(e,t,n){const{regex:r}=i.toRefs(e),a=i.getCurrentInstance().proxy,A=n.isOpen,s=n.open,o=i.ref(null),l=i.ref(null),c=()=>{o.value=""},u=h=>{o.value=h.target.value},d=h=>{if(r&&r.value){let p=r.value;typeof p=="string"&&(p=new RegExp(p)),h.key.match(p)||h.preventDefault()}},f=h=>{if(r&&r.value){let m=(h.clipboardData||window.clipboardData).getData("Text"),y=r.value;typeof y=="string"&&(y=new RegExp(y)),m.split("").every(g=>!!g.match(y))||h.preventDefault()}t.emit("paste",h,a)};return i.watch(o,h=>{!A.value&&h&&s(),t.emit("search-change",h,a)}),{search:o,input:l,clearSearch:c,handleSearchInput:u,handleKeypress:d,handlePaste:f}}function yU(e,t,n){const{groupSelect:r,mode:a,groups:A,disabledProp:s}=i.toRefs(e),o=i.ref(null),l=u=>{u===void 0||u!==null&&u[s.value]||A.value&&u&&u.group&&(a.value==="single"||!r.value)||(o.value=u)};return{pointer:o,setPointer:l,clearPointer:()=>{l(null)}}}function uf(e,t=!0){return t?String(e).toLowerCase().trim():String(e).toLowerCase().normalize("NFD").trim().replace(new RegExp(/æ/g),"ae").replace(new RegExp(/œ/g),"oe").replace(new RegExp(/ø/g),"o").replace(/\p{Diacritic}/gu,"")}function wU(e){return Object.prototype.toString.call(e)==="[object Object]"}function bU(e,t){const n=t.slice().sort();return e.length===t.length&&e.slice().sort().every(function(r,a){return r===n[a]})}function _U(e,t,n){const{options:r,mode:a,trackBy:A,limit:s,hideSelected:o,createTag:l,createOption:c,label:u,appendNewTag:d,appendNewOption:f,multipleLabel:h,object:p,loading:m,delay:y,resolveOnLoad:g,minChars:v,filterResults:_,clearOnSearch:B,clearOnSelect:b,valueProp:w,allowAbsent:C,groupLabel:k,canDeselect:S,max:T,strict:U,closeOnSelect:F,closeOnDeselect:Q,groups:Y,reverse:X,infinite:j,groupOptions:K,groupHideEmpty:oe,groupSelect:$,onCreate:ae,disabledProp:ce,searchStart:me,searchFilter:Ee}=i.toRefs(e),fe=i.getCurrentInstance().proxy,ne=n.iv,N=n.ev,te=n.search,Pe=n.clearSearch,ot=n.update,xt=n.pointer,vt=n.clearPointer,Qn=n.focus,x=n.deactivate,E=n.close,D=n.localize,W=i.ref([]),ie=i.ref([]),he=i.ref(!1),Ft=i.ref(null),ht=i.ref(j.value&&s.value===-1?10:s.value),Bn=i.computed(()=>l.value||c.value||!1),$e=i.computed(()=>d.value!==void 0?d.value:f.value!==void 0?f.value:!0),O=i.computed(()=>{if(Y.value){let I=et.value||[],G=[];return I.forEach(xe=>{Wd(xe[K.value]).forEach(Bt=>{G.push(Object.assign({},Bt,xe[ce.value]?{[ce.value]:!0}:{}))})}),G}else{let I=Wd(ie.value||[]);return W.value.length&&(I=I.concat(W.value)),I}}),P=i.computed(()=>{let I=O.value;return X.value&&(I=I.reverse()),la.value.length&&(I=la.value.concat(I)),$d(I)}),Ze=i.computed(()=>{let I=P.value;return ht.value>0&&(I=I.slice(0,ht.value)),I}),et=i.computed(()=>{if(!Y.value)return[];let I=[],G=ie.value||[];return W.value.length&&I.push({[k.value]:" ",[K.value]:[...W.value],__CREATE__:!0}),I.concat(G)}),Ar=i.computed(()=>{let I=[...et.value].map(G=>({...G}));return la.value.length&&(I[0]&&I[0].__CREATE__?I[0][K.value]=[...la.value,...I[0][K.value]]:I=[{[k.value]:" ",[K.value]:[...la.value],__CREATE__:!0}].concat(I)),I}),Tn=i.computed(()=>{if(!Y.value)return[];let I=Ar.value;return aE((I||[]).map((G,xe)=>{const Bt=Wd(G[K.value]);return{...G,index:xe,group:!0,[K.value]:$d(Bt,!1).map(ci=>Object.assign({},ci,G[ce.value]?{[ce.value]:!0}:{})),__VISIBLE__:$d(Bt).map(ci=>Object.assign({},ci,G[ce.value]?{[ce.value]:!0}:{}))}}))}),Dn=i.computed(()=>{switch(a.value){case"single":return!cr(ne.value[w.value]);case"multiple":case"tags":return!cr(ne.value)&&ne.value.length>0}}),zn=i.computed(()=>h!==void 0&&h.value!==void 0?h.value(ne.value,fe):ne.value&&ne.value.length>1?`${ne.value.length} options selected`:"1 option selected"),ii=i.computed(()=>!O.value.length&&!he.value&&!la.value.length),JA=i.computed(()=>O.value.length>0&&Ze.value.length==0&&(te.value&&Y.value||!Y.value)),la=i.computed(()=>Bn.value===!1||!te.value?[]:tE(te.value)!==-1?[]:[{[w.value]:te.value,[L.value]:te.value,[u.value]:te.value,__CREATE__:!0}]),L=i.computed(()=>A.value||u.value),re=i.computed(()=>{switch(a.value){case"single":return null;case"multiple":case"tags":return[]}}),ue=i.computed(()=>m.value||he.value),Se=I=>{switch(typeof I!="object"&&(I=Ir(I)),a.value){case"single":ot(I);break;case"multiple":case"tags":ot(ne.value.concat(I));break}t.emit("select",Dt(I),I,fe)},ye=I=>{switch(typeof I!="object"&&(I=Ir(I)),a.value){case"single":oi();break;case"tags":case"multiple":ot(Array.isArray(I)?ne.value.filter(G=>I.map(xe=>xe[w.value]).indexOf(G[w.value])===-1):ne.value.filter(G=>G[w.value]!=I[w.value]));break}t.emit("deselect",Dt(I),I,fe)},Dt=I=>p.value?I:I[w.value],Xt=I=>{ye(I)},ca=(I,G)=>{if(G.button!==0){G.preventDefault();return}Xt(I)},oi=()=>{t.emit("clear",fe),ot(re.value)},Pt=I=>{if(I.group!==void 0)return a.value==="single"?!1:eE(I[K.value])&&I[K.value].length;switch(a.value){case"single":return!cr(ne.value)&&ne.value[w.value]==I[w.value];case"tags":case"multiple":return!cr(ne.value)&&ne.value.map(G=>G[w.value]).indexOf(I[w.value])!==-1}},AA=I=>I[ce.value]===!0,ua=()=>T===void 0||T.value===-1||!Dn.value&&T.value>0?!1:ne.value.length>=T.value,da=I=>{if(!AA(I)){if(ae&&ae.value&&!Pt(I)&&I.__CREATE__&&(I={...I},delete I.__CREATE__,I=ae.value(I,fe),I instanceof Promise)){he.value=!0,I.then(G=>{he.value=!1,yl(G)});return}yl(I)}},yl=I=>{switch(I.__CREATE__&&(I={...I},delete I.__CREATE__),a.value){case"single":if(I&&Pt(I)){S.value&&ye(I),Q.value&&(vt(),E());return}I&&fa(I),b.value&&Pe(),F.value&&(vt(),E()),I&&Se(I);break;case"multiple":if(I&&Pt(I)){ye(I),Q.value&&(vt(),E());return}if(ua()){t.emit("max",fe);return}I&&(fa(I),Se(I)),b.value&&Pe(),o.value&&vt(),F.value&&E();break;case"tags":if(I&&Pt(I)){ye(I),Q.value&&(vt(),E());return}if(ua()){t.emit("max",fe);return}I&&fa(I),b.value&&Pe(),I&&Se(I),o.value&&vt(),F.value&&E();break}F.value||Qn()},li=I=>{if(!(AA(I)||a.value==="single"||!$.value)){switch(a.value){case"multiple":case"tags":Z3(I[K.value])?ye(I[K.value]):Se(I[K.value].filter(G=>ne.value.map(xe=>xe[w.value]).indexOf(G[w.value])===-1).filter(G=>!G[ce.value]).filter((G,xe)=>ne.value.length+1+xe<=T.value||T.value===-1));break}F.value&&x()}},fa=I=>{Ir(I[w.value])===void 0&&Bn.value&&(t.emit("tag",I[w.value],fe),t.emit("option",I[w.value],fe),t.emit("create",I[w.value],fe),$e.value&&rE(I),Pe())},J3=()=>{a.value!=="single"&&Se(Ze.value.filter(I=>!I.disabled&&!Pt(I)))},Z3=I=>I.find(G=>!Pt(G)&&!G[ce.value])===void 0,eE=I=>I.find(G=>!Pt(G))===void 0,Ir=I=>O.value[O.value.map(G=>String(G[w.value])).indexOf(String(I))],tE=(I,G=!0)=>O.value.map(xe=>parseInt(xe[L.value])==xe[L.value]?parseInt(xe[L.value]):xe[L.value]).indexOf(parseInt(I)==I?parseInt(I):I),nE=I=>["tags","multiple"].indexOf(a.value)!==-1&&o.value&&Pt(I),rE=I=>{W.value.push(I)},aE=I=>oe.value?I.filter(G=>te.value?G.__VISIBLE__.length:G[K.value].length):I.filter(G=>te.value?G.__VISIBLE__.length:!0),$d=(I,G=!0)=>{let xe=I;if(te.value&&_.value){let Bt=Ee.value;Bt||(Bt=(ci,Toe)=>{let k1=uf(D(ci[L.value]),U.value);return me.value?k1.startsWith(uf(te.value,U.value)):k1.indexOf(uf(te.value,U.value))!==-1}),xe=xe.filter(Bt)}return o.value&&G&&(xe=xe.filter(Bt=>!nE(Bt))),xe},Wd=I=>{let G=I;return wU(G)&&(G=Object.keys(G).map(xe=>{let Bt=G[xe];return{[w.value]:xe,[L.value]:Bt,[u.value]:Bt}})),G=G.map(xe=>typeof xe=="object"?xe:{[w.value]:xe,[L.value]:xe,[u.value]:xe}),G},wl=()=>{cr(N.value)||(ne.value=_l(N.value))},bl=I=>(he.value=!0,new Promise((G,xe)=>{r.value(te.value,fe).then(Bt=>{ie.value=Bt||[],typeof I=="function"&&I(Bt),he.value=!1}).catch(Bt=>{console.error(Bt),ie.value=[],he.value=!1}).finally(()=>{G()})})),Gd=()=>{if(Dn.value)if(a.value==="single"){let I=Ir(ne.value[w.value]);if(I!==void 0){let G=I[u.value];ne.value[u.value]=G,p.value&&(N.value[u.value]=G)}}else ne.value.forEach((I,G)=>{let xe=Ir(ne.value[G][w.value]);if(xe!==void 0){let Bt=xe[u.value];ne.value[G][u.value]=Bt,p.value&&(N.value[G][u.value]=Bt)}})},AE=I=>{bl(I)},_l=I=>cr(I)?a.value==="single"?{}:[]:p.value?I:a.value==="single"?Ir(I)||(C.value?{[u.value]:I,[w.value]:I,[L.value]:I}:{}):I.filter(G=>!!Ir(G)||C.value).map(G=>Ir(G)||{[u.value]:G,[w.value]:G,[L.value]:G}),E1=()=>{Ft.value=i.watch(te,I=>{I.length<v.value||!I&&v.value!==0||(he.value=!0,B.value&&(ie.value=[]),setTimeout(()=>{I==te.value&&r.value(te.value,fe).then(G=>{(I==te.value||!te.value)&&(ie.value=G,xt.value=Ze.value.filter(xe=>xe[ce.value]!==!0)[0]||null,he.value=!1)}).catch(G=>{console.error(G)})},y.value))},{flush:"sync"})};if(a.value!=="single"&&!cr(N.value)&&!Array.isArray(N.value))throw new Error(`v-model must be an array when using "${a.value}" mode`);return r&&typeof r.value=="function"?g.value?bl(wl):p.value==!0&&wl():(ie.value=r.value,wl()),y.value>-1&&E1(),i.watch(y,(I,G)=>{Ft.value&&Ft.value(),I>=0&&E1()}),i.watch(N,I=>{if(cr(I)){ot(_l(I),!1);return}switch(a.value){case"single":(p.value?I[w.value]!=ne.value[w.value]:I!=ne.value[w.value])&&ot(_l(I),!1);break;case"multiple":case"tags":bU(p.value?I.map(G=>G[w.value]):I,ne.value.map(G=>G[w.value]))||ot(_l(I),!1);break}},{deep:!0}),i.watch(r,(I,G)=>{typeof e.options=="function"?g.value&&(!G||I&&I.toString()!==G.toString())&&bl():(ie.value=e.options,Object.keys(ne.value).length||wl(),Gd())}),i.watch(u,Gd),{pfo:P,fo:Ze,filteredOptions:Ze,hasSelected:Dn,multipleLabelText:zn,eo:O,extendedOptions:O,eg:et,extendedGroups:et,fg:Tn,filteredGroups:Tn,noOptions:ii,noResults:JA,resolving:he,busy:ue,offset:ht,select:Se,deselect:ye,remove:Xt,selectAll:J3,clear:oi,isSelected:Pt,isDisabled:AA,isMax:ua,getOption:Ir,handleOptionClick:da,handleGroupClick:li,handleTagRemove:ca,refreshOptions:AE,resolveOptions:bl,refreshLabels:Gd}}function CU(e,t,n){const{valueProp:r,showOptions:a,searchable:A,groupLabel:s,groups:o,mode:l,groupSelect:c,disabledProp:u,groupOptions:d}=i.toRefs(e),f=n.fo,h=n.fg,p=n.handleOptionClick,m=n.handleGroupClick,y=n.search,g=n.pointer,v=n.setPointer,_=n.clearPointer,B=n.multiselect,b=n.isOpen,w=i.computed(()=>f.value.filter(N=>!N[u.value])),C=i.computed(()=>h.value.filter(N=>!N[u.value])),k=i.computed(()=>l.value!=="single"&&c.value),S=i.computed(()=>g.value&&g.value.group),T=i.computed(()=>fe(g.value)),U=i.computed(()=>{const N=S.value?g.value:fe(g.value),te=C.value.map(ot=>ot[s.value]).indexOf(N[s.value]);let Pe=C.value[te-1];return Pe===void 0&&(Pe=Q.value),Pe}),F=i.computed(()=>{let N=C.value.map(te=>te.label).indexOf(S.value?g.value[s.value]:fe(g.value)[s.value])+1;return C.value.length<=N&&(N=0),C.value[N]}),Q=i.computed(()=>[...C.value].slice(-1)[0]),Y=i.computed(()=>g.value.__VISIBLE__.filter(N=>!N[u.value])[0]),X=i.computed(()=>{const N=T.value.__VISIBLE__.filter(te=>!te[u.value]);return N[N.map(te=>te[r.value]).indexOf(g.value[r.value])-1]}),j=i.computed(()=>{const N=fe(g.value).__VISIBLE__.filter(te=>!te[u.value]);return N[N.map(te=>te[r.value]).indexOf(g.value[r.value])+1]}),K=i.computed(()=>[...U.value.__VISIBLE__.filter(N=>!N[u.value])].slice(-1)[0]),oe=i.computed(()=>[...Q.value.__VISIBLE__.filter(N=>!N[u.value])].slice(-1)[0]),$=N=>g.value&&(!N.group&&g.value[r.value]===N[r.value]||N.group!==void 0&&g.value[s.value]===N[s.value])?!0:void 0,ae=()=>{v(w.value[0]||null)},ce=()=>{!g.value||g.value[u.value]===!0||(S.value?m(g.value):p(g.value))},me=()=>{if(g.value===null)v((o.value&&k.value?C.value[0].__CREATE__?w.value[0]:C.value[0]:w.value[0])||null);else if(o.value&&k.value){let N=S.value?Y.value:j.value;N===void 0&&(N=F.value,N.__CREATE__&&(N=N[d.value][0])),v(N||null)}else{let N=w.value.map(te=>te[r.value]).indexOf(g.value[r.value])+1;w.value.length<=N&&(N=0),v(w.value[N]||null)}i.nextTick(()=>{ne()})},Ee=()=>{if(g.value===null){let N=w.value[w.value.length-1];o.value&&k.value&&(N=oe.value,N===void 0&&(N=Q.value)),v(N||null)}else if(o.value&&k.value){let N=S.value?K.value:X.value;N===void 0&&(N=S.value?U.value:T.value,N.__CREATE__&&(N=K.value,N===void 0&&(N=U.value))),v(N||null)}else{let N=w.value.map(te=>te[r.value]).indexOf(g.value[r.value])-1;N<0&&(N=w.value.length-1),v(w.value[N]||null)}i.nextTick(()=>{ne()})},fe=N=>C.value.find(te=>te.__VISIBLE__.map(Pe=>Pe[r.value]).indexOf(N[r.value])!==-1),ne=()=>{let N=B.value.querySelector("[data-pointed]");if(!N)return;let te=N.parentElement.parentElement;o.value&&(te=S.value?N.parentElement.parentElement.parentElement:N.parentElement.parentElement.parentElement.parentElement),N.offsetTop+N.offsetHeight>te.clientHeight+te.scrollTop&&(te.scrollTop=N.offsetTop+N.offsetHeight-te.clientHeight),N.offsetTop<te.scrollTop&&(te.scrollTop=N.offsetTop)};return i.watch(y,N=>{A.value&&(N.length&&a.value?ae():_())}),i.watch(b,N=>{if(N){let te=B.value.querySelectorAll("[data-selected]")[0];if(!te)return;let Pe=te.parentElement.parentElement;i.nextTick(()=>{Pe.scrollTop>0||(Pe.scrollTop=te.offsetTop)})}}),{pointer:g,canPointGroups:k,isPointed:$,setPointerFirst:ae,selectPointer:ce,forwardPointer:me,backwardPointer:Ee}}function EU(e,t,n){const{disabled:r}=i.toRefs(e),a=i.getCurrentInstance().proxy,A=i.ref(!1);return{isOpen:A,open:()=>{A.value||r.value||(A.value=!0,t.emit("open",a))},close:()=>{A.value&&(A.value=!1,t.emit("close",a))}}}function kU(e,t,n){const{searchable:r,disabled:a,clearOnBlur:A}=i.toRefs(e),s=n.input,o=n.open,l=n.close,c=n.clearSearch,u=n.isOpen,d=i.ref(null),f=i.ref(null),h=i.ref(null),p=i.ref(!1),m=i.ref(!1),y=i.computed(()=>r.value||a.value?-1:0),g=()=>{r.value&&s.value.blur(),f.value.blur()},v=()=>{r.value&&!a.value&&s.value.focus()},_=(S=!0)=>{a.value||(p.value=!0,S&&o())},B=()=>{p.value=!1,setTimeout(()=>{p.value||(l(),A.value&&c())},1)};return{multiselect:d,wrapper:f,tags:h,tabindex:y,isActive:p,mouseClicked:m,blur:g,focus:v,activate:_,deactivate:B,handleFocusIn:S=>{S.target.closest("[data-tags]")&&S.target.nodeName!=="INPUT"||S.target.closest("[data-clear]")||_(m.value)},handleFocusOut:()=>{B()},handleCaretClick:()=>{B(),g()},handleMousedown:S=>{m.value=!0,u.value&&(S.target.isEqualNode(f.value)||S.target.isEqualNode(h.value))?setTimeout(()=>{B()},0):document.activeElement.isEqualNode(f.value)&&!u.value&&_(),setTimeout(()=>{m.value=!1},0)}}}function SU(e,t,n){const{mode:r,addTagOn:a,openDirection:A,searchable:s,showOptions:o,valueProp:l,groups:c,addOptionOn:u,createTag:d,createOption:f,reverse:h}=i.toRefs(e),p=i.getCurrentInstance().proxy,m=n.iv,y=n.update,g=n.search,v=n.setPointer,_=n.selectPointer,B=n.backwardPointer,b=n.forwardPointer,w=n.multiselect,C=n.wrapper,k=n.tags,S=n.isOpen,T=n.open,U=n.blur,F=n.fo,Q=i.computed(()=>d.value||f.value||!1),Y=i.computed(()=>a.value!==void 0?a.value:u.value!==void 0?u.value:["enter"]),X=()=>{r.value==="tags"&&!o.value&&Q.value&&s.value&&!c.value&&v(F.value[F.value.map($=>$[l.value]).indexOf(g.value)])},j=$=>{let ae=$.length-1;for(;ae>=0&&($[ae].remove===!1||$[ae].disabled);)ae--;return ae<0||$.splice(ae,1),$};return{handleKeydown:$=>{t.emit("keydown",$,p);let ae,ce;switch(["ArrowLeft","ArrowRight","Enter"].indexOf($.key)!==-1&&r.value==="tags"&&(ae=[...w.value.querySelectorAll("[data-tags] > *")].filter(me=>me!==k.value),ce=ae.findIndex(me=>me===document.activeElement)),$.key){case"Backspace":if(r.value==="single"||s.value&&[null,""].indexOf(g.value)===-1||m.value.length===0)return;y(j([...m.value]));break;case"Enter":if($.preventDefault(),$.keyCode===229)return;if(ce!==-1&&ce!==void 0){y([...m.value].filter((me,Ee)=>Ee!==ce)),ce===ae.length-1&&(ae.length-1?ae[ae.length-2].focus():s.value?k.value.querySelector("input").focus():C.value.focus());return}if(Y.value.indexOf("enter")===-1&&Q.value)return;X(),_();break;case" ":if(!Q.value&&!s.value){$.preventDefault(),X(),_();return}if(!Q.value)return!1;if(Y.value.indexOf("space")===-1&&Q.value)return;$.preventDefault(),X(),_();break;case"Tab":case";":case",":if(Y.value.indexOf($.key.toLowerCase())===-1||!Q.value)return;X(),_(),$.preventDefault();break;case"Escape":U();break;case"ArrowUp":if($.preventDefault(),!o.value)return;S.value||T(),B();break;case"ArrowDown":if($.preventDefault(),!o.value)return;S.value||T(),b();break;case"ArrowLeft":if(s.value&&k.value&&k.value.querySelector("input").selectionStart||$.shiftKey||r.value!=="tags"||!m.value||!m.value.length)return;$.preventDefault(),ce===-1?ae[ae.length-1].focus():ce>0&&ae[ce-1].focus();break;case"ArrowRight":if(ce===-1||$.shiftKey||r.value!=="tags"||!m.value||!m.value.length)return;$.preventDefault(),ae.length>ce+1?ae[ce+1].focus():s.value?k.value.querySelector("input").focus():s.value||C.value.focus();break}},handleKeyup:$=>{t.emit("keyup",$,p)},preparePointer:X}}function xU(e,t,n){const{classes:r,disabled:a,openDirection:A,showOptions:s}=i.toRefs(e),o=n.isOpen,l=n.isPointed,c=n.isSelected,u=n.isDisabled,d=n.isActive,f=n.canPointGroups,h=n.resolving,p=n.fo,m=i.computed(()=>({container:"multiselect",containerDisabled:"is-disabled",containerOpen:"is-open",containerOpenTop:"is-open-top",containerActive:"is-active",wrapper:"multiselect-wrapper",singleLabel:"multiselect-single-label",singleLabelText:"multiselect-single-label-text",multipleLabel:"multiselect-multiple-label",search:"multiselect-search",tags:"multiselect-tags",tag:"multiselect-tag",tagDisabled:"is-disabled",tagRemove:"multiselect-tag-remove",tagRemoveIcon:"multiselect-tag-remove-icon",tagsSearchWrapper:"multiselect-tags-search-wrapper",tagsSearch:"multiselect-tags-search",tagsSearchCopy:"multiselect-tags-search-copy",placeholder:"multiselect-placeholder",caret:"multiselect-caret",caretOpen:"is-open",clear:"multiselect-clear",clearIcon:"multiselect-clear-icon",spinner:"multiselect-spinner",inifinite:"multiselect-inifite",inifiniteSpinner:"multiselect-inifite-spinner",dropdown:"multiselect-dropdown",dropdownTop:"is-top",dropdownHidden:"is-hidden",options:"multiselect-options",optionsTop:"is-top",group:"multiselect-group",groupLabel:"multiselect-group-label",groupLabelPointable:"is-pointable",groupLabelPointed:"is-pointed",groupLabelSelected:"is-selected",groupLabelDisabled:"is-disabled",groupLabelSelectedPointed:"is-selected is-pointed",groupLabelSelectedDisabled:"is-selected is-disabled",groupOptions:"multiselect-group-options",option:"multiselect-option",optionPointed:"is-pointed",optionSelected:"is-selected",optionDisabled:"is-disabled",optionSelectedPointed:"is-selected is-pointed",optionSelectedDisabled:"is-selected is-disabled",noOptions:"multiselect-no-options",noResults:"multiselect-no-results",fakeInput:"multiselect-fake-input",assist:"multiselect-assistive-text",spacer:"multiselect-spacer",...r.value})),y=i.computed(()=>!!(o.value&&s.value&&(!h.value||h.value&&p.value.length)));return{classList:i.computed(()=>{const v=m.value;return{container:[v.container].concat(a.value?v.containerDisabled:[]).concat(y.value&&A.value==="top"?v.containerOpenTop:[]).concat(y.value&&A.value!=="top"?v.containerOpen:[]).concat(d.value?v.containerActive:[]),wrapper:v.wrapper,spacer:v.spacer,singleLabel:v.singleLabel,singleLabelText:v.singleLabelText,multipleLabel:v.multipleLabel,search:v.search,tags:v.tags,tag:[v.tag].concat(a.value?v.tagDisabled:[]),tagDisabled:v.tagDisabled,tagRemove:v.tagRemove,tagRemoveIcon:v.tagRemoveIcon,tagsSearchWrapper:v.tagsSearchWrapper,tagsSearch:v.tagsSearch,tagsSearchCopy:v.tagsSearchCopy,placeholder:v.placeholder,caret:[v.caret].concat(o.value?v.caretOpen:[]),clear:v.clear,clearIcon:v.clearIcon,spinner:v.spinner,inifinite:v.inifinite,inifiniteSpinner:v.inifiniteSpinner,dropdown:[v.dropdown].concat(A.value==="top"?v.dropdownTop:[]).concat(!o.value||!s.value||!y.value?v.dropdownHidden:[]),options:[v.options].concat(A.value==="top"?v.optionsTop:[]),group:v.group,groupLabel:_=>{let B=[v.groupLabel];return l(_)?B.push(c(_)?v.groupLabelSelectedPointed:v.groupLabelPointed):c(_)&&f.value?B.push(u(_)?v.groupLabelSelectedDisabled:v.groupLabelSelected):u(_)&&B.push(v.groupLabelDisabled),f.value&&B.push(v.groupLabelPointable),B},groupOptions:v.groupOptions,option:(_,B)=>{let b=[v.option];return l(_)?b.push(c(_)?v.optionSelectedPointed:v.optionPointed):c(_)?b.push(u(_)?v.optionSelectedDisabled:v.optionSelected):(u(_)||B&&u(B))&&b.push(v.optionDisabled),b},noOptions:v.noOptions,noResults:v.noResults,assist:v.assist,fakeInput:v.fakeInput}}),showDropdown:y}}function FU(e,t,n){const{limit:r,infinite:a}=i.toRefs(e),A=n.isOpen,s=n.offset,o=n.search,l=n.pfo,c=n.eo,u=i.ref(null),d=i.ref(null),f=i.computed(()=>s.value<l.value.length),h=m=>{const{isIntersecting:y,target:g}=m[0];if(y){const v=g.offsetParent,_=v.scrollTop;s.value+=r.value==-1?10:r.value,i.nextTick(()=>{v.scrollTop=_})}},p=()=>{A.value&&s.value<l.value.length?u.value.observe(d.value):!A.value&&u.value&&u.value.disconnect()};return i.watch(A,()=>{a.value&&p()}),i.watch(o,()=>{a.value&&(s.value=r.value,p())},{flush:"post"}),i.watch(c,()=>{a.value&&p()},{immediate:!1,flush:"post"}),i.onMounted(()=>{window&&window.IntersectionObserver&&(u.value=new IntersectionObserver(h))}),{hasMore:f,infiniteLoader:d}}function IU(e,t,n){const{placeholder:r,id:a,valueProp:A,label:s,mode:o,groupLabel:l,aria:c,searchable:u}=i.toRefs(e),d=n.pointer,f=n.iv,h=n.hasSelected,p=n.multipleLabelText,m=i.ref(null),y=i.computed(()=>{let F=[];return a&&a.value&&F.push(a.value),F.push("assist"),F.join("-")}),g=i.computed(()=>{let F=[];return a&&a.value&&F.push(a.value),F.push("multiselect-options"),F.join("-")}),v=i.computed(()=>{let F=[];if(a&&a.value&&F.push(a.value),d.value)return F.push(d.value.group?"multiselect-group":"multiselect-option"),F.push(d.value.group?d.value.index:d.value[A.value]),F.join("-")}),_=i.computed(()=>r.value),B=i.computed(()=>o.value!=="single"),b=i.computed(()=>{let F="";return o.value==="single"&&h.value&&(F+=f.value[s.value]),o.value==="multiple"&&h.value&&(F+=p.value),o.value==="tags"&&h.value&&(F+=f.value.map(Q=>Q[s.value]).join(", ")),F}),w=i.computed(()=>{let F={...c.value};return u.value&&(F["aria-labelledby"]=F["aria-labelledby"]?`${y.value} ${F["aria-labelledby"]}`:y.value,b.value&&F["aria-label"]&&(F["aria-label"]=`${b.value}, ${F["aria-label"]}`)),F}),C=F=>{let Q=[];return a&&a.value&&Q.push(a.value),Q.push("multiselect-option"),Q.push(F[A.value]),Q.join("-")},k=F=>{let Q=[];return a&&a.value&&Q.push(a.value),Q.push("multiselect-group"),Q.push(F.index),Q.join("-")},S=F=>{let Q=[];return Q.push(F),Q.join(" ")},T=F=>{let Q=[];return Q.push(F),Q.join(" ")},U=F=>`${F} ❎`;return i.onMounted(()=>{if(a&&a.value&&document&&document.querySelector){let F=document.querySelector(`[for="${a.value}"]`);m.value=F?F.innerText:null}}),{arias:w,ariaLabel:b,ariaAssist:y,ariaControls:g,ariaPlaceholder:_,ariaMultiselectable:B,ariaActiveDescendant:v,ariaOptionId:C,ariaOptionLabel:S,ariaGroupId:k,ariaGroupLabel:T,ariaTagLabel:U}}function UU(e,t,n){const{locale:r,fallbackLocale:a}=i.toRefs(e);return{localize:s=>!s||typeof s!="object"?s:s&&s[r.value]?s[r.value]:s&&r.value&&s[r.value.toUpperCase()]?s[r.value.toUpperCase()]:s&&s[a.value]?s[a.value]:s&&a.value&&s[a.value.toUpperCase()]?s[a.value.toUpperCase()]:s&&Object.keys(s)[0]?s[Object.keys(s)[0]]:""}}function QU(e,t,n,r={}){return n.forEach(a=>{a&&(r={...r,...a(e,t,r)})}),r}var Vt={name:"Multiselect",emits:["paste","open","close","select","deselect","input","search-change","tag","option","update:modelValue","change","clear","keydown","keyup","max","create"],props:{value:{required:!1},modelValue:{required:!1},options:{type:[Array,Object,Function],required:!1,default:()=>[]},id:{type:[String,Number],required:!1},name:{type:[String,Number],required:!1,default:"multiselect"},disabled:{type:Boolean,required:!1,default:!1},label:{type:String,required:!1,default:"label"},trackBy:{type:String,required:!1,default:void 0},valueProp:{type:String,required:!1,default:"value"},placeholder:{type:String,required:!1,default:null},mode:{type:String,required:!1,default:"single"},searchable:{type:Boolean,required:!1,default:!1},limit:{type:Number,required:!1,default:-1},hideSelected:{type:Boolean,required:!1,default:!0},createTag:{type:Boolean,required:!1,default:void 0},createOption:{type:Boolean,required:!1,default:void 0},appendNewTag:{type:Boolean,required:!1,default:void 0},appendNewOption:{type:Boolean,required:!1,default:void 0},addTagOn:{type:Array,required:!1,default:void 0},addOptionOn:{type:Array,required:!1,default:void 0},caret:{type:Boolean,required:!1,default:!0},loading:{type:Boolean,required:!1,default:!1},noOptionsText:{type:[String,Object],required:!1,default:"The list is empty"},noResultsText:{type:[String,Object],required:!1,default:"No results found"},multipleLabel:{type:Function,required:!1},object:{type:Boolean,required:!1,default:!1},delay:{type:Number,required:!1,default:-1},minChars:{type:Number,required:!1,default:0},resolveOnLoad:{type:Boolean,required:!1,default:!0},filterResults:{type:Boolean,required:!1,default:!0},clearOnSearch:{type:Boolean,required:!1,default:!1},clearOnSelect:{type:Boolean,required:!1,default:!0},canDeselect:{type:Boolean,required:!1,default:!0},canClear:{type:Boolean,required:!1,default:!0},max:{type:Number,required:!1,default:-1},showOptions:{type:Boolean,required:!1,default:!0},required:{type:Boolean,required:!1,default:!1},openDirection:{type:String,required:!1,default:"bottom"},nativeSupport:{type:Boolean,required:!1,default:!1},classes:{type:Object,required:!1,default:()=>({})},strict:{type:Boolean,required:!1,default:!0},closeOnSelect:{type:Boolean,required:!1,default:!0},closeOnDeselect:{type:Boolean,required:!1,default:!1},autocomplete:{type:String,required:!1},groups:{type:Boolean,required:!1,default:!1},groupLabel:{type:String,required:!1,default:"label"},groupOptions:{type:String,required:!1,default:"options"},groupHideEmpty:{type:Boolean,required:!1,default:!1},groupSelect:{type:Boolean,required:!1,default:!0},inputType:{type:String,required:!1,default:"text"},attrs:{required:!1,type:Object,default:()=>({})},onCreate:{required:!1,type:Function},disabledProp:{type:String,required:!1,default:"disabled"},searchStart:{type:Boolean,required:!1,default:!1},reverse:{type:Boolean,required:!1,default:!1},regex:{type:[Object,String,RegExp],required:!1,default:void 0},rtl:{type:Boolean,required:!1,default:!1},infinite:{type:Boolean,required:!1,default:!1},aria:{required:!1,type:Object,default:()=>({})},clearOnBlur:{required:!1,type:Boolean,default:!0},locale:{required:!1,type:String,default:null},fallbackLocale:{required:!1,type:String,default:"en"},searchFilter:{required:!1,type:Function,default:null},allowAbsent:{required:!1,type:Boolean,default:!1}},setup(e,t){return QU(e,t,[UU,vU,yU,EU,BU,mU,kU,_U,FU,CU,SU,xU,IU])}};const TU=["id","dir"],DU=["tabindex","aria-controls","aria-placeholder","aria-expanded","aria-activedescendant","aria-multiselectable","role"],LU=["type","modelValue","value","autocomplete","id","aria-controls","aria-placeholder","aria-expanded","aria-activedescendant","aria-multiselectable"],OU=["onKeyup","aria-label"],MU=["onClick"],NU=["type","modelValue","value","id","autocomplete","aria-controls","aria-placeholder","aria-expanded","aria-activedescendant","aria-multiselectable"],PU=["innerHTML"],HU=["id"],RU=["id","aria-label","aria-selected"],VU=["data-pointed","onMouseenter","onClick"],KU=["innerHTML"],$U=["aria-label"],WU=["data-pointed","data-selected","onMouseenter","onClick","id","aria-selected","aria-label"],GU=["data-pointed","data-selected","onMouseenter","onClick","id","aria-selected","aria-label"],zU=["innerHTML"],jU=["innerHTML"],YU=["value"],qU=["name","value"],XU=["name","value"],JU=["id"];function ZU(e,t,n,r,a,A){return i.openBlock(),i.createElementBlock("div",{ref:"multiselect",class:i.normalizeClass(e.classList.container),id:n.searchable?void 0:n.id,dir:n.rtl?"rtl":void 0,onFocusin:t[10]||(t[10]=(...s)=>e.handleFocusIn&&e.handleFocusIn(...s)),onFocusout:t[11]||(t[11]=(...s)=>e.handleFocusOut&&e.handleFocusOut(...s)),onKeyup:t[12]||(t[12]=(...s)=>e.handleKeyup&&e.handleKeyup(...s)),onKeydown:t[13]||(t[13]=(...s)=>e.handleKeydown&&e.handleKeydown(...s))},[i.createElementVNode("div",i.mergeProps({class:e.classList.wrapper,onMousedown:t[9]||(t[9]=(...s)=>e.handleMousedown&&e.handleMousedown(...s)),ref:"wrapper",tabindex:e.tabindex,"aria-controls":n.searchable?void 0:e.ariaControls,"aria-placeholder":n.searchable?void 0:e.ariaPlaceholder,"aria-expanded":n.searchable?void 0:e.isOpen,"aria-activedescendant":n.searchable?void 0:e.ariaActiveDescendant,"aria-multiselectable":n.searchable?void 0:e.ariaMultiselectable,role:n.searchable?void 0:"combobox"},n.searchable?{}:e.arias),[i.createCommentVNode(" Search "),n.mode!=="tags"&&n.searchable&&!n.disabled?(i.openBlock(),i.createElementBlock("input",i.mergeProps({key:0,type:n.inputType,modelValue:e.search,value:e.search,class:e.classList.search,autocomplete:n.autocomplete,id:n.searchable?n.id:void 0,onInput:t[0]||(t[0]=(...s)=>e.handleSearchInput&&e.handleSearchInput(...s)),onKeypress:t[1]||(t[1]=(...s)=>e.handleKeypress&&e.handleKeypress(...s)),onPaste:t[2]||(t[2]=i.withModifiers((...s)=>e.handlePaste&&e.handlePaste(...s),["stop"])),ref:"input","aria-controls":e.ariaControls,"aria-placeholder":e.ariaPlaceholder,"aria-expanded":e.isOpen,"aria-activedescendant":e.ariaActiveDescendant,"aria-multiselectable":e.ariaMultiselectable,role:"combobox"},{...n.attrs,...e.arias}),null,16,LU)):i.createCommentVNode("v-if",!0),i.createCommentVNode(" Tags (with search) "),n.mode=="tags"?(i.openBlock(),i.createElementBlock("div",{key:1,class:i.normalizeClass(e.classList.tags),"data-tags":""},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.iv,(s,o,l)=>i.renderSlot(e.$slots,"tag",{option:s,handleTagRemove:e.handleTagRemove,disabled:n.disabled},()=>[(i.openBlock(),i.createElementBlock("span",{class:i.normalizeClass([e.classList.tag,s.disabled?e.classList.tagDisabled:null]),tabindex:"-1",onKeyup:i.withKeys(c=>e.handleTagRemove(s,c),["enter"]),key:l,"aria-label":e.ariaTagLabel(e.localize(s[n.label]))},[i.createTextVNode(i.toDisplayString(e.localize(s[n.label]))+" ",1),!n.disabled&&!s.disabled?(i.openBlock(),i.createElementBlock("span",{key:0,class:i.normalizeClass(e.classList.tagRemove),onClick:i.withModifiers(c=>e.handleTagRemove(s,c),["stop"])},[i.createElementVNode("span",{class:i.normalizeClass(e.classList.tagRemoveIcon)},null,2)],10,MU)):i.createCommentVNode("v-if",!0)],42,OU))])),256)),i.createElementVNode("div",{class:i.normalizeClass(e.classList.tagsSearchWrapper),ref:"tags"},[i.createCommentVNode(" Used for measuring search width "),i.createElementVNode("span",{class:i.normalizeClass(e.classList.tagsSearchCopy)},i.toDisplayString(e.search),3),i.createCommentVNode(" Actual search input "),n.searchable&&!n.disabled?(i.openBlock(),i.createElementBlock("input",i.mergeProps({key:0,type:n.inputType,modelValue:e.search,value:e.search,class:e.classList.tagsSearch,id:n.searchable?n.id:void 0,autocomplete:n.autocomplete,onInput:t[3]||(t[3]=(...s)=>e.handleSearchInput&&e.handleSearchInput(...s)),onKeypress:t[4]||(t[4]=(...s)=>e.handleKeypress&&e.handleKeypress(...s)),onPaste:t[5]||(t[5]=i.withModifiers((...s)=>e.handlePaste&&e.handlePaste(...s),["stop"])),ref:"input","aria-controls":e.ariaControls,"aria-placeholder":e.ariaPlaceholder,"aria-expanded":e.isOpen,"aria-activedescendant":e.ariaActiveDescendant,"aria-multiselectable":e.ariaMultiselectable,role:"combobox"},{...n.attrs,...e.arias}),null,16,NU)):i.createCommentVNode("v-if",!0)],2)],2)):i.createCommentVNode("v-if",!0),i.createCommentVNode(" Single label "),n.mode=="single"&&e.hasSelected&&!e.search&&e.iv?i.renderSlot(e.$slots,"singlelabel",{key:2,value:e.iv},()=>[i.createElementVNode("div",{class:i.normalizeClass(e.classList.singleLabel)},[i.createElementVNode("span",{class:i.normalizeClass(e.classList.singleLabelText)},i.toDisplayString(e.localize(e.iv[n.label])),3)],2)]):i.createCommentVNode("v-if",!0),i.createCommentVNode(" Multiple label "),n.mode=="multiple"&&e.hasSelected&&!e.search?i.renderSlot(e.$slots,"multiplelabel",{key:3,values:e.iv},()=>[i.createElementVNode("div",{class:i.normalizeClass(e.classList.multipleLabel),innerHTML:e.multipleLabelText},null,10,PU)]):i.createCommentVNode("v-if",!0),i.createCommentVNode(" Placeholder "),n.placeholder&&!e.hasSelected&&!e.search?i.renderSlot(e.$slots,"placeholder",{key:4},()=>[i.createElementVNode("div",{class:i.normalizeClass(e.classList.placeholder),"aria-hidden":"true"},i.toDisplayString(n.placeholder),3)]):i.createCommentVNode("v-if",!0),i.createCommentVNode(" Spinner "),n.loading||e.resolving?i.renderSlot(e.$slots,"spinner",{key:5},()=>[i.createElementVNode("span",{class:i.normalizeClass(e.classList.spinner),"aria-hidden":"true"},null,2)]):i.createCommentVNode("v-if",!0),i.createCommentVNode(" Clear "),e.hasSelected&&!n.disabled&&n.canClear&&!e.busy?i.renderSlot(e.$slots,"clear",{key:6,clear:e.clear},()=>[i.createElementVNode("span",{"aria-hidden":"true",tabindex:"0",role:"button","data-clear":"","aria-roledescription":"❎",class:i.normalizeClass(e.classList.clear),onClick:t[6]||(t[6]=(...s)=>e.clear&&e.clear(...s)),onKeyup:t[7]||(t[7]=i.withKeys((...s)=>e.clear&&e.clear(...s),["enter"]))},[i.createElementVNode("span",{class:i.normalizeClass(e.classList.clearIcon)},null,2)],34)]):i.createCommentVNode("v-if",!0),i.createCommentVNode(" Caret "),n.caret&&n.showOptions?i.renderSlot(e.$slots,"caret",{key:7},()=>[i.createElementVNode("span",{class:i.normalizeClass(e.classList.caret),onClick:t[8]||(t[8]=(...s)=>e.handleCaretClick&&e.handleCaretClick(...s)),"aria-hidden":"true"},null,2)]):i.createCommentVNode("v-if",!0)],16,DU),i.createCommentVNode(" Options "),i.createElementVNode("div",{class:i.normalizeClass(e.classList.dropdown),tabindex:"-1"},[i.renderSlot(e.$slots,"beforelist",{options:e.fo}),i.createElementVNode("ul",{class:i.normalizeClass(e.classList.options),id:e.ariaControls,role:"listbox"},[n.groups?(i.openBlock(!0),i.createElementBlock(i.Fragment,{key:0},i.renderList(e.fg,(s,o,l)=>(i.openBlock(),i.createElementBlock("li",{class:i.normalizeClass(e.classList.group),key:l,id:e.ariaGroupId(s),"aria-label":e.ariaGroupLabel(e.localize(s[n.groupLabel])),"aria-selected":e.isSelected(s),role:"option"},[s.__CREATE__?i.createCommentVNode("v-if",!0):(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(e.classList.groupLabel(s)),"data-pointed":e.isPointed(s),onMouseenter:c=>e.setPointer(s,o),onClick:c=>e.handleGroupClick(s)},[i.renderSlot(e.$slots,"grouplabel",{group:s,isSelected:e.isSelected,isPointed:e.isPointed},()=>[i.createElementVNode("span",{innerHTML:e.localize(s[n.groupLabel])},null,8,KU)])],42,VU)),i.createElementVNode("ul",{class:i.normalizeClass(e.classList.groupOptions),"aria-label":e.ariaGroupLabel(e.localize(s[n.groupLabel])),role:"group"},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(s.__VISIBLE__,(c,u,d)=>(i.openBlock(),i.createElementBlock("li",{class:i.normalizeClass(e.classList.option(c,s)),"data-pointed":e.isPointed(c),"data-selected":e.isSelected(c)||void 0,key:d,onMouseenter:f=>e.setPointer(c),onClick:f=>e.handleOptionClick(c),id:e.ariaOptionId(c),"aria-selected":e.isSelected(c),"aria-label":e.ariaOptionLabel(e.localize(c[n.label])),role:"option"},[i.renderSlot(e.$slots,"option",{option:c,isSelected:e.isSelected,isPointed:e.isPointed,search:e.search},()=>[i.createElementVNode("span",null,i.toDisplayString(e.localize(c[n.label])),1)])],42,WU))),128))],10,$U)],10,RU))),128)):(i.openBlock(!0),i.createElementBlock(i.Fragment,{key:1},i.renderList(e.fo,(s,o,l)=>(i.openBlock(),i.createElementBlock("li",{class:i.normalizeClass(e.classList.option(s)),"data-pointed":e.isPointed(s),"data-selected":e.isSelected(s)||void 0,key:l,onMouseenter:c=>e.setPointer(s),onClick:c=>e.handleOptionClick(s),id:e.ariaOptionId(s),"aria-selected":e.isSelected(s),"aria-label":e.ariaOptionLabel(e.localize(s[n.label])),role:"option"},[i.renderSlot(e.$slots,"option",{option:s,isSelected:e.isSelected,isPointed:e.isPointed,search:e.search},()=>[i.createElementVNode("span",null,i.toDisplayString(e.localize(s[n.label])),1)])],42,GU))),128))],10,HU),e.noOptions?i.renderSlot(e.$slots,"nooptions",{key:0},()=>[i.createElementVNode("div",{class:i.normalizeClass(e.classList.noOptions),innerHTML:e.localize(n.noOptionsText)},null,10,zU)]):i.createCommentVNode("v-if",!0),e.noResults?i.renderSlot(e.$slots,"noresults",{key:1},()=>[i.createElementVNode("div",{class:i.normalizeClass(e.classList.noResults),innerHTML:e.localize(n.noResultsText)},null,10,jU)]):i.createCommentVNode("v-if",!0),n.infinite&&e.hasMore?(i.openBlock(),i.createElementBlock("div",{key:2,class:i.normalizeClass(e.classList.inifinite),ref:"infiniteLoader"},[i.renderSlot(e.$slots,"infinite",{},()=>[i.createElementVNode("span",{class:i.normalizeClass(e.classList.inifiniteSpinner)},null,2)])],2)):i.createCommentVNode("v-if",!0),i.renderSlot(e.$slots,"afterlist",{options:e.fo})],2),i.createCommentVNode(" Hacky input element to show HTML5 required warning "),n.required?(i.openBlock(),i.createElementBlock("input",{key:0,class:i.normalizeClass(e.classList.fakeInput),tabindex:"-1",value:e.textValue,required:""},null,10,YU)):i.createCommentVNode("v-if",!0),i.createCommentVNode(" Native input support "),n.nativeSupport?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[n.mode=="single"?(i.openBlock(),i.createElementBlock("input",{key:0,type:"hidden",name:n.name,value:e.plainValue!==void 0?e.plainValue:""},null,8,qU)):(i.openBlock(!0),i.createElementBlock(i.Fragment,{key:1},i.renderList(e.plainValue,(s,o)=>(i.openBlock(),i.createElementBlock("input",{type:"hidden",name:`${n.name}[]`,value:s,key:o},null,8,XU))),128))],64)):i.createCommentVNode("v-if",!0),i.createCommentVNode(" Screen reader assistive text "),n.searchable&&e.hasSelected?(i.openBlock(),i.createElementBlock("div",{key:2,class:i.normalizeClass(e.classList.assist),id:e.ariaAssist,"aria-hidden":"true"},i.toDisplayString(e.ariaLabel),11,JU)):i.createCommentVNode("v-if",!0),i.createCommentVNode(" Create height for empty input "),i.createElementVNode("div",{class:i.normalizeClass(e.classList.spacer)},null,2)],42,TU)}Vt.render=ZU;Vt.__file="src/Multiselect.vue";const eQ={class:"search-bar"},tQ=i.defineComponent({__name:"SearchBar",props:hb,setup(e){const t=e,n=i.ref(""),r=us.useRouter();function a(s,o,l){l.clear(),l.search=n.value,r.push(o.link)}function A(s){n.value=s}return(s,o)=>(i.openBlock(),i.createElementBlock("div",eQ,[i.createVNode(i.unref(Vt),{placeholder:"Search Cards or Players","value-prop":"link","clear-on-blur":!1,"clear-on-search":!1,"clear-on-select":!1,"close-on-select":!0,delay:0,"filter-results":!1,groups:!0,"min-chars":0,"resolve-on-load":!1,searchable:!0,options:t.fetchSeachResult,onOpen:o[0]||(o[0]=l=>{l.noOptions&&l.resolveOptions()}),onSearchChange:A,onSelect:a},{option:i.withCtx(({option:l})=>[l.type==="card"?(i.openBlock(),i.createBlock(fn,{key:`card-${l.card.cardCode}`,class:"card-slice-item","maintain-aspect-ratio":!0,"card-prop":l.card,"router-link":l.link},null,8,["card-prop","router-link"])):(i.openBlock(),i.createBlock(fn,{key:`player-${l.link}`,class:"card-slice-item","maintain-aspect-ratio":!0,"ignore-card-item":!0,"card-code-prop":l.cardCode,color:l.color,name:l.name,"mana-number":l.rank,"router-link":l.link},null,8,["card-code-prop","color","name","mana-number","router-link"]))]),_:1},8,["options"])]))}});const Yu=M(tQ,[["__scopeId","data-v-ca4e3b0d"]]),nQ={class:"social-links"},rQ=i.defineComponent({__name:"SocialLinks",setup(e){return(t,n)=>(i.openBlock(),i.createElementBlock("div",nQ,[i.createVNode(i.unref(Ue),{class:"icon",icon:"fa-brands fa-discord"}),i.createVNode(i.unref(Ue),{class:"icon",icon:"fa-brands fa-twitter"})]))}});const vg=M(rQ,[["__scopeId","data-v-5517438c"]]),aQ={showModal:{type:Boolean,required:!0,default:!1}},AQ=["onClick"],sQ=i.defineComponent({__name:"ModalItem",props:aQ,emits:["update:showModal"],setup(e,{emit:t}){const n=e,r=i.ref(null);function a(){t("update:showModal",!1)}return i.onBeforeUnmount(()=>{var A;(A=r.value)==null||A.remove()}),i.watch(()=>n.showModal,()=>{n.showModal&&i.nextTick(()=>{r.value&&document.body.appendChild(r.value)})}),(A,s)=>n.showModal?(i.openBlock(),i.createElementBlock("div",{key:0,ref_key:"modalItem",ref:r,class:"modal-item",onClick:i.withModifiers(a,["self"])},[i.renderSlot(A.$slots,"default",{},void 0,!0)],8,AQ)):i.createCommentVNode("",!0)}});const VA=M(sQ,[["__scopeId","data-v-5e715d99"]]),iQ={filterArray:{type:Array,required:!1,default:void 0},title:{type:String,required:!1,default:void 0}},oQ={class:"filter"},lQ={key:0,class:"top"},cQ={key:0,class:"title"},uQ=i.defineComponent({__name:"SidePanelSectionPane",props:iQ,emits:["clear:filterArray"],setup(e,{emit:t}){const n=e,r=i.computed(()=>n.filterArray&&n.filterArray.length>0?"clickable":null);function a(){t("clear:filterArray")}return(A,s)=>{const o=i.resolveDirective("t");return i.openBlock(),i.createElementBlock("div",oQ,[n.title||A.filterArray?(i.openBlock(),i.createElementBlock("div",lQ,[n.title?(i.openBlock(),i.createElementBlock("h2",cQ,i.toDisplayString(n.title),1)):i.createCommentVNode("",!0),A.filterArray?i.withDirectives((i.openBlock(),i.createElementBlock("p",{key:1,class:i.normalizeClass(["clear",r.value]),onClick:a},null,2)),[[o,"general.clear"]]):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0),i.renderSlot(A.$slots,"default",{},void 0,!0)])}}});const mt=M(uQ,[["__scopeId","data-v-741cceed"]]),dQ={filterArray:{type:Array,required:!0,default:[]}},fQ=["placeholder"],hQ=i.defineComponent({__name:"FilterSampleSize",props:dQ,emits:["update:filterArray"],setup(e,{emit:t}){const n=e,{t:r}=se(),a=i.ref(n.filterArray),A=i.ref("");let s=setTimeout(()=>{},0);a.value.length>0&&(A.value=a.value[0]),i.watch(a,()=>{t("update:filterArray",a.value)}),i.watch(A,()=>{s&&clearTimeout(s),s=setTimeout(()=>{a.value.splice(0),A.value&&a.value.push(A.value)},1e3)});function o(){a.value.splice(0),A.value=""}return(l,c)=>(i.openBlock(),i.createBlock(mt,{"filter-array":a.value,title:i.unref(r)("general.sampleSize"),"onClear:filterArray":o},{default:i.withCtx(()=>[i.withDirectives(i.createElementVNode("input",{"onUpdate:modelValue":c[0]||(c[0]=u=>A.value=u),placeholder:i.unref(r)("general.minimumMatches"),type:"number",min:"10",step:"10"},null,8,fQ),[[i.vModelText,A.value]])]),_:1},8,["filter-array","title"]))}});const Xs=M(hQ,[["__scopeId","data-v-d66d5f9d"]]),pQ={filterArray:{type:Array,required:!0,default:[]}},gQ={isSelected:{type:Boolean,required:!0,default:!1},icon:{type:String,required:!1,default:void 0},prompt:{type:String,required:!0,default:""}},mQ=["selected"],vQ={class:"checkbox-name"},BQ=i.defineComponent({__name:"CheckboxItem",props:gQ,emits:["update:isSelected"],setup(e,{emit:t}){const n=e,r=i.computed(()=>(console.log(n.icon),{content:n.icon}));function a(){t("update:isSelected",!n.isSelected)}return(A,s)=>(i.openBlock(),i.createElementBlock("button",{class:"checkbox-item",selected:n.isSelected,onClick:a},[n.icon?(i.openBlock(),i.createElementBlock("div",{key:0,class:"checkbox-icon",style:i.normalizeStyle(r.value)},null,4)):i.createCommentVNode("",!0),i.createElementVNode("div",vQ,i.toDisplayString(n.prompt),1)],8,mQ))}});const tn=M(BQ,[["__scopeId","data-v-a4c6109c"]]),yQ={selectedOption:{type:Number,required:!0,default:-1},options:{type:Array,required:!0,default:[]}},wQ=e=>(i.pushScopeId("data-v-d5d9745a"),e=e(),i.popScopeId(),e),bQ={class:"toggle-switch"},_Q=wQ(()=>i.createElementVNode("div",{class:"selection"},null,-1)),CQ=[_Q],EQ=["onClick"],kQ={class:"option flex-center"},SQ={class:"option-text"},xQ=i.defineComponent({__name:"ToggleSwitch",props:yQ,emits:["update:selectedOption"],setup(e,{emit:t}){const n=e,r=i.computed(()=>({left:`calc(var(--spacing-1) + (100% - calc(var(--spacing-1) * 2)) / ${n.options.length} * ${n.selectedOption})`,width:`calc((100% - calc(var(--spacing-1) * 2)) / ${n.options.length})`}));function a(s){return{cursor:n.selectedOption!=s?"pointer":"default",left:`calc(var(--spacing-1) + (100% - calc(var(--spacing-1) * 2)) / ${n.options.length} * ${s})`,width:`${1/n.options.length*100}%`}}function A(s){t("update:selectedOption",s)}return(s,o)=>(i.openBlock(),i.createElementBlock("div",bQ,[i.withDirectives(i.createElementVNode("div",{class:"selection-container",style:i.normalizeStyle(r.value)},CQ,4),[[i.vShow,s.selectedOption>-1]]),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.options,(l,c)=>(i.openBlock(),i.createElementBlock("div",{key:c,ref_for:!0,ref:"option-container",style:i.normalizeStyle(a(c)),class:"option-container",onClick:u=>A(c)},[i.createElementVNode("div",kQ,[i.createElementVNode("h1",SQ,i.toDisplayString(l),1)])],12,EQ))),128))]))}});const qu=M(xQ,[["__scopeId","data-v-d5d9745a"]]),FQ={class:"checkboxes-container"},IQ=i.defineComponent({__name:"FilterRanks",props:pQ,emits:["update:filterArray"],setup(e,{emit:t}){const n=e,{t:r}=se(),a=i.computed(()=>we().dataJson.ranks.sort((c,u)=>u.order-c.order)),A=i.reactive(n.filterArray),s=i.ref(0);i.watch(A,()=>{t("update:filterArray",A)}),i.watch(s,()=>{s.value===0?A.splice(0):s.value===1&&(A.splice(0),A.push("Platinum","Diamond","Masters"))});function o(){A.splice(0),s.value=0}function l(c){const u=A.indexOf(c);if(u===-1){A.push(c);return}A.splice(u,1)}return(c,u)=>(i.openBlock(),i.createBlock(mt,{"filter-array":A,title:i.unref(r)("general.ranks"),"onClear:filterArray":o},{default:i.withCtx(()=>[i.createElementVNode("div",FQ,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.value,d=>(i.openBlock(),i.createBlock(tn,{key:d.nameRef,icon:`url(${d.icon})`,prompt:d.name,"is-selected":A.includes(d.nameRef),"onUpdate:isSelected":f=>l(d.nameRef)},null,8,["icon","prompt","is-selected","onUpdate:isSelected"]))),128)),i.createVNode(qu,{"selected-option":s.value,"onUpdate:selectedOption":u[0]||(u[0]=d=>s.value=d),options:[i.unref(r)("general.allRanks"),i.unref(r)("general.platPlus")]},null,8,["selected-option","options"])])]),_:1},8,["filter-array","title"]))}});const mb=M(IQ,[["__scopeId","data-v-af7bc2a0"]]),UQ={filterArray:{type:Array,required:!0,default:[]}},QQ={isSelected:{type:Boolean,required:!0,default:!1},prompt:{type:Number,required:!0,default:""}},TQ=["selected"],DQ={class:"prompt"},LQ=i.defineComponent({__name:"CheckboxItemManaCost",props:QQ,emits:["update:isSelected"],setup(e,{emit:t}){const n=e;function r(){t("update:isSelected",!n.isSelected)}return(a,A)=>(i.openBlock(),i.createElementBlock("button",{class:"checkbox-item",selected:n.isSelected,onClick:r},[i.createVNode(jo),i.createElementVNode("div",DQ,i.toDisplayString(n.prompt===10?"+":n.prompt),1)],8,TQ))}});const Au=M(LQ,[["__scopeId","data-v-2c74c2ed"]]),OQ={class:"checkbox-rows-container"},MQ={class:"top-row checkbox-items-container"},NQ={class:"bottom-row checkbox-items-container"},PQ=i.defineComponent({__name:"FilterManaCost",props:UQ,emits:["update:filterArray"],setup(e,{emit:t}){const n=e,{t:r}=se(),a=Array(6).fill(1).map((l,c)=>c),A=Array(5).fill(1).map((l,c)=>c+6);function s(l){let c;n.filterArray.includes(l)?c=n.filterArray.filter(u=>u!==l):c=[...n.filterArray,l],t("update:filterArray",c)}function o(){t("update:filterArray",[])}return(l,c)=>(i.openBlock(),i.createBlock(mt,{"filter-array":n.filterArray,title:i.unref(r)("general.manaCost"),"onClear:filterArray":o},{default:i.withCtx(()=>[i.createElementVNode("div",OQ,[i.createElementVNode("div",MQ,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(a),u=>(i.openBlock(),i.createBlock(Au,{key:u,class:"checkbox-item-mana-cost",prompt:u,"is-selected":n.filterArray.includes(u),"onUpdate:isSelected":d=>s(u)},null,8,["prompt","is-selected","onUpdate:isSelected"]))),128))]),i.createElementVNode("div",NQ,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(A),u=>(i.openBlock(),i.createBlock(Au,{key:u,class:"checkbox-item-mana-cost",prompt:u,"is-selected":n.filterArray.includes(u),"onUpdate:isSelected":d=>s(u)},null,8,["prompt","is-selected","onUpdate:isSelected"]))),128))])])]),_:1},8,["filter-array","title"]))}});const Bg=M(PQ,[["__scopeId","data-v-a94d786a"]]),HQ={filterArray:{type:Array,required:!0,default:[]}},RQ={class:"checkboxes-container"},yg=i.defineComponent({__name:"FilterRarities",props:HQ,emits:["update:filterArray"],setup(e,{emit:t}){const n=e,{t:r}=se(),a=i.computed(()=>we().dataJson.rarities.filter(l=>l.nameRef!=="None")),A=i.reactive(n.filterArray);i.watch(A,()=>{t("update:filterArray",A)});function s(){A.splice(0)}function o(l){const c=A.indexOf(l);if(c===-1){A.push(l);return}A.splice(c,1)}return(l,c)=>(i.openBlock(),i.createBlock(mt,{"filter-array":A,title:i.unref(r)("general.rarities"),"onClear:filterArray":s},{default:i.withCtx(()=>[i.createElementVNode("div",RQ,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.value,u=>(i.openBlock(),i.createBlock(tn,{key:u.nameRef,icon:`url(${u.icon})`,prompt:u.name,"is-selected":A.includes(u.nameRef),"onUpdate:isSelected":d=>o(u.nameRef)},null,8,["icon","prompt","is-selected","onUpdate:isSelected"]))),128))])]),_:1},8,["filter-array","title"]))}}),VQ={filterArray:{type:Array,required:!0,default:[]}},KQ={class:"multiselect-tag",tabindex:"-1","aria-label":"{{option.name}} ❎"},$Q=["src"],WQ={class:"multiselect-tag-remove"},GQ=["onMousedown"],zQ=["src"],wg=i.defineComponent({__name:"FilterSets",props:VQ,emits:["update:filterArray"],setup(e,{emit:t}){const n=e,{t:r}=se(),a=i.ref(n.filterArray);i.watch(a,()=>{t("update:filterArray",a.value)});function A(){a.value.splice(0)}return(s,o)=>(i.openBlock(),i.createBlock(mt,{"filter-array":a.value,title:i.unref(r)("general.sets"),"onClear:filterArray":A},{default:i.withCtx(()=>[i.createVNode(i.unref(Vt),{modelValue:a.value,"onUpdate:modelValue":o[0]||(o[0]=l=>a.value=l),placeholder:i.unref(r)("general.sets"),class:"runeterra-select",mode:"tags",options:i.unref(we)().dataJson.sets,searchable:!0,label:"name","value-prop":"nameRef"},{tag:i.withCtx(({option:l,handleTagRemove:c})=>[i.createElementVNode("span",KQ,[i.createElementVNode("img",{class:"label-icon",src:l.icon},null,8,$Q),i.createElementVNode("span",WQ,[i.createElementVNode("span",{class:"multiselect-tag-remove-icon",onMousedown:i.withModifiers(u=>c(l,u),["prevent"])},null,40,GQ)])])]),option:i.withCtx(({option:l})=>[i.createElementVNode("img",{class:"label-icon",src:l.icon},null,8,zQ),i.createTextVNode(" "+i.toDisplayString(l.name),1)]),_:1},8,["modelValue","placeholder","options"])]),_:1},8,["filter-array","title"]))}}),jQ={filterArray:{type:Array,required:!0,default:[]}},YQ={class:"multiselect-tag",tabindex:"-1","aria-label":"{{option.name}} ❎"},qQ=["src"],XQ={class:"multiselect-tag-remove"},JQ=["onMousedown"],ZQ=["src"],bg=i.defineComponent({__name:"FilterKeywords",props:jQ,emits:["update:filterArray"],setup(e,{emit:t}){const n=e,{t:r}=se(),a=i.ref(n.filterArray),A=i.computed(()=>we().dataJson.keywords.filter(o=>o.showInFilter));i.watch(a,()=>{t("update:filterArray",a.value)});function s(){a.value.splice(0)}return(o,l)=>(i.openBlock(),i.createBlock(mt,{"filter-array":a.value,title:i.unref(r)("general.keywords"),"onClear:filterArray":s},{default:i.withCtx(()=>[i.createVNode(i.unref(Vt),{modelValue:a.value,"onUpdate:modelValue":l[0]||(l[0]=c=>a.value=c),placeholder:i.unref(r)("general.keywords"),class:"runeterra-select",mode:"tags",options:A.value,searchable:!0,label:"name","value-prop":"nameRef"},{tag:i.withCtx(({option:c,handleTagRemove:u})=>[i.createElementVNode("span",YQ,[i.createElementVNode("img",{class:"label-icon",src:c.icon},null,8,qQ),i.createElementVNode("span",XQ,[i.createElementVNode("span",{class:"multiselect-tag-remove-icon",onMousedown:i.withModifiers(d=>u(c,d),["prevent"])},null,40,JQ)])])]),option:i.withCtx(({option:c})=>[i.createElementVNode("img",{class:"label-icon",src:c.icon},null,8,ZQ),i.createTextVNode(" "+i.toDisplayString(c.name),1)]),_:1},8,["modelValue","placeholder","options"])]),_:1},8,["filter-array","title"]))}}),eT={filterArray:{type:Array,required:!0,default:[]}},tT={class:"checkboxes-container"},Js=i.defineComponent({__name:"FilterServers",props:eT,emits:["update:filterArray"],setup(e,{emit:t}){const n=e,{t:r}=se(),a=i.reactive(n.filterArray);i.watch(a,()=>{t("update:filterArray",a)});function A(){a.splice(0)}function s(o){const l=a.indexOf(o);if(l===-1){a.push(o);return}a.splice(l,1)}return(o,l)=>(i.openBlock(),i.createBlock(mt,{"filter-array":a,title:i.unref(r)("general.servers"),"onClear:filterArray":A},{default:i.withCtx(()=>[i.createElementVNode("div",tT,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(we)().dataJson.servers,c=>(i.openBlock(),i.createBlock(tn,{key:c.nameRef,prompt:c.name,"is-selected":a.includes(c.nameRef),"onUpdate:isSelected":u=>s(c.nameRef)},null,8,["prompt","is-selected","onUpdate:isSelected"]))),128))])]),_:1},8,["filter-array","title"]))}}),nT={filterArray:{type:Array,required:!0,default:[]},allowZero:{type:Boolean,required:!1,default:!1}},rT={class:"checkboxes-container"},aT=i.defineComponent({__name:"FilterTime",props:nT,emits:["update:filterArray"],setup(e,{emit:t}){const n=e,{t:r}=se(),a=i.reactive(n.filterArray),A=i.ref(null),s=i.ref(null),o=a.find(h=>h.startsWith("patch_"));o&&(A.value=o);const l=a.find(h=>h.startsWith("season_"));l&&(s.value=l);const c=i.computed(()=>n.allowZero&&a.filter(h=>h.startsWith("patch")).length>0||!n.allowZero&&a.filter(h=>!h.startsWith("patch")).length===0);i.watch(a,()=>{t("update:filterArray",a)}),i.watch(A,(h,p)=>{u(h,p)}),i.watch(s,(h,p)=>{u(h,p)});function u(h,p){console.log(p,h),p&&a.splice(a.indexOf(p),1),h&&a.push(h),console.log(a)}function d(){a.splice(0),A.value=null,s.value=null}function f(h){a.splice(0),(n.allowZero||h!=="patch")&&a.push(h),h==="patch"&&A.value&&a.push(A.value),h==="season"&&s.value&&a.push(s.value)}return(h,p)=>(i.openBlock(),i.createBlock(mt,{"filter-array":a,title:i.unref(r)("general.time"),"onClear:filterArray":d},{default:i.withCtx(()=>[i.createElementVNode("div",rT,[i.createVNode(tn,{prompt:i.unref(r)("general.patch"),"is-selected":c.value,"onUpdate:isSelected":p[0]||(p[0]=m=>f("patch"))},null,8,["prompt","is-selected"]),i.createVNode(tn,{prompt:i.unref(r)("general.season"),"is-selected":a.includes("season"),"onUpdate:isSelected":p[1]||(p[1]=m=>f("season"))},null,8,["prompt","is-selected"]),i.createVNode(tn,{prompt:i.unref(r)("general.pastDays",7),"is-selected":a.includes("past7days"),"onUpdate:isSelected":p[2]||(p[2]=m=>f("past7days"))},null,8,["prompt","is-selected"]),i.createVNode(tn,{prompt:i.unref(r)("general.pastDays",3),"is-selected":a.includes("past3days"),"onUpdate:isSelected":p[3]||(p[3]=m=>f("past3days"))},null,8,["prompt","is-selected"]),i.createVNode(tn,{prompt:i.unref(r)("general.pastHours",24),"is-selected":a.includes("past24hours"),"onUpdate:isSelected":p[4]||(p[4]=m=>f("past24hours"))},null,8,["prompt","is-selected"]),i.createVNode(tn,{prompt:i.unref(r)("general.pastHour"),"is-selected":a.includes("pastHour"),"onUpdate:isSelected":p[5]||(p[5]=m=>f("pastHour"))},null,8,["prompt","is-selected"]),c.value?(i.openBlock(),i.createBlock(i.unref(Vt),{key:0,modelValue:A.value,"onUpdate:modelValue":p[6]||(p[6]=m=>A.value=m),options:i.unref(we)().dataJson.patches,searchable:!0,label:"name","value-prop":"nameRef"},null,8,["modelValue","options"])):i.createCommentVNode("",!0),a.includes("season")?(i.openBlock(),i.createBlock(i.unref(Vt),{key:1,modelValue:s.value,"onUpdate:modelValue":p[7]||(p[7]=m=>s.value=m),options:i.unref(we)().dataJson.seasons,searchable:!0,label:"name","value-prop":"nameRef"},null,8,["modelValue","options"])):i.createCommentVNode("",!0)])]),_:1},8,["filter-array","title"]))}});const KA=M(aT,[["__scopeId","data-v-78ab671a"]]),AT={filterArray:{type:Array,required:!0,default:[]}},sT={cardCodes:{type:Array,required:!0,default:[]},filterCallback:{type:Function,required:!1,default:()=>!0},mode:{type:String,required:!1,default:"tags"}},iT=i.defineComponent({__name:"CardMultiselect",props:sT,emits:["update:cardCodes"],setup(e,{emit:t}){const n=e,{t:r}=se(),a=i.ref(n.cardCodes),A=i.computed(()=>{let s=Qw().cardJson.sort((o,l)=>o.name.localeCompare(l.name));return n.filterCallback&&(s=s.filter(n.filterCallback)),s});return i.watch(a,()=>{t("update:cardCodes",a.value)}),(s,o)=>(i.openBlock(),i.createBlock(i.unref(Vt),{modelValue:a.value,"onUpdate:modelValue":o[0]||(o[0]=l=>a.value=l),class:"multiselect",placeholder:i.unref(r)("cards.cards"),mode:n.mode,options:A.value,infinite:!0,limit:10,searchable:!0,label:"name","value-prop":"cardCode"},null,8,["modelValue","placeholder","mode","options"]))}});const _g=M(iT,[["__scopeId","data-v-968634df"]]),Xu=i.defineComponent({__name:"FilterCardCodes",props:AT,emits:["update:filterArray"],setup(e,{emit:t}){const n=e,{t:r}=se(),a=i.ref(n.filterArray);i.watch(a,()=>{console.log("watch(filterArray)",a.value),t("update:filterArray",a.value)});function A(){a.value.splice(0)}function s(o){return o.collectible}return(o,l)=>(i.openBlock(),i.createBlock(mt,{"filter-array":a.value,title:i.unref(r)("cards.cards"),"onClear:filterArray":A},{default:i.withCtx(()=>[i.createVNode(_g,{cardCodes:a.value,"onUpdate:cardCodes":l[0]||(l[0]=c=>a.value=c),mode:"tags","filter-callback":s},null,8,["cardCodes"])]),_:1},8,["filter-array","title"]))}}),oT={filterArray:{type:Array,required:!0,default:[]}},lT={class:"checkboxes-container"},cT=i.defineComponent({__name:"FilterRegions",props:oT,emits:["update:filterArray"],setup(e,{emit:t}){const n=e,{t:r}=se(),a=i.reactive(n.filterArray),A=i.ref([]);A.value.push(...a.filter(l=>uo(l))),i.watch(a,()=>{t("update:filterArray",a)}),i.watch(A,(l,c)=>{let u=l.find(d=>!c.includes(d));if(u||(u=c.find(d=>!l.includes(d)),u))return o(u)});function s(){a.splice(0),A.value.slice(0)}function o(l){const c=a.indexOf(l);if(c===-1){a.push(l),l==="Runeterra"&&a.push(...A.value);return}if(a.splice(c,1),l==="Runeterra")for(let u=0;u<a.length;u++)uo(a[u])&&a.splice(u--,1)}return(l,c)=>(i.openBlock(),i.createBlock(mt,{"filter-array":a,title:i.unref(r)("general.regions"),"onClear:filterArray":s},{default:i.withCtx(()=>[i.createElementVNode("div",lT,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(we)().dataJson.regions,u=>(i.openBlock(),i.createBlock(tn,{key:u.nameRef,icon:`url(${u.icon})`,prompt:u.name,"is-selected":a.includes(u.nameRef),"onUpdate:isSelected":d=>o(u.nameRef)},null,8,["icon","prompt","is-selected","onUpdate:isSelected"]))),128)),i.createVNode(tn,{class:"runeterra",prompt:"Runeterra","is-selected":a.includes("Runeterra"),"onUpdate:isSelected":c[0]||(c[0]=u=>o("Runeterra"))},null,8,["is-selected"]),a.includes("Runeterra")?(i.openBlock(),i.createBlock(i.unref(Vt),{key:0,modelValue:A.value,"onUpdate:modelValue":c[1]||(c[1]=u=>A.value=u),class:"runeterra-select",mode:"tags",options:i.unref(we)().dataJson.runeterraChampions,searchable:!0,label:"name","value-prop":"nameRef"},null,8,["modelValue","options"])):i.createCommentVNode("",!0)])]),_:1},8,["filter-array","title"]))}});const Yo=M(cT,[["__scopeId","data-v-c93a9e90"]]),uT={filters:{type:Object,required:!0,default:{cardFilters:[],regionFilters:[],sampleSizeFilters:[],serverFilters:[],timeFilters:[],formatFilters:[],queueFilters:[]}},includeDataFilters:{type:Boolean,required:!1,default:!0}},dT={filterArray:{type:Array,required:!0,default:[]},allowZero:{type:Boolean,required:!1,default:!1}},fT={class:"checkboxes-container"},hT=i.defineComponent({__name:"FilterFormat",props:dT,emits:["update:filterArray"],setup(e,{emit:t}){const n=e,{t:r}=se(),a=i.computed(()=>{const d=we().dataJson.queues;return Object.values(we().dataJson.formats).filter(f=>f.availableQueues.some(h=>!d[h].excludeInMassFilter))}),A=i.computed(()=>a.value.filter(d=>!d.inDropdown)),s=i.computed(()=>a.value.filter(d=>d.inDropdown)),o=i.reactive(n.filterArray),l=i.ref(null);i.onMounted(()=>{o.length>0&&s.value.map(d=>d.nameRef).includes(o[0])&&(l.value=o[0])}),i.watch(o,()=>{t("update:filterArray",o),o.length===0&&(l.value=null)}),i.watch(l,()=>{l.value&&(o.splice(0),o.push(l.value))});function c(d){l.value=null,o.splice(0),d!==Vr.Standard&&o.push(d)}function u(){o.splice(0)}return(d,f)=>(i.openBlock(),i.createBlock(mt,{"filter-array":o,title:i.unref(r)("general.format"),"onClear:filterArray":u},{default:i.withCtx(()=>[i.createElementVNode("div",fT,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(A.value,h=>(i.openBlock(),i.createBlock(tn,{prompt:h.name,"is-selected":o.includes(h.nameRef)||!n.allowZero&&h.nameRef==="Standard"&&o.length===0,"onUpdate:isSelected":p=>c(h.nameRef)},null,8,["prompt","is-selected","onUpdate:isSelected"]))),256)),s.value.length>0?(i.openBlock(),i.createBlock(i.unref(Vt),{key:0,modelValue:l.value,"onUpdate:modelValue":f[0]||(f[0]=h=>l.value=h),options:s.value,searchable:!1,placeholder:i.unref(r)("general.otherFormats"),label:"name","value-prop":"nameRef",onClear:u},null,8,["modelValue","options","placeholder"])):i.createCommentVNode("",!0)])]),_:1},8,["filter-array","title"]))}});const Cg=M(hT,[["__scopeId","data-v-22de9b40"]]),pT={filterArray:{type:Array,required:!0,default:[]},availableQueues:{type:Array,required:!0,default:[]}},Eg=i.defineComponent({__name:"FilterQueues",props:pT,emits:["update:filterArray"],setup(e,{emit:t}){const n=e,{t:r}=se(),a=i.ref(n.filterArray),A=i.computed(()=>Object.values(we().dataJson.queues).filter(o=>n.availableQueues.includes(o.nameRef)&&!o.excludeInMassFilter));i.watch(a,()=>{t("update:filterArray",a.value)});function s(){a.value.splice(0)}return(o,l)=>n.availableQueues.length>1?(i.openBlock(),i.createBlock(mt,{key:0,"filter-array":a.value,title:i.unref(r)("general.queues"),"onClear:filterArray":s},{default:i.withCtx(()=>{var c,u;return[i.createVNode(i.unref(Vt),{modelValue:a.value,"onUpdate:modelValue":l[0]||(l[0]=d=>a.value=d),placeholder:(u=(c=A.value)==null?void 0:c.find(d=>d.nameRef===i.unref(S2).Ranked))==null?void 0:u.name,class:"runeterra-select",mode:"tags",options:A.value,searchable:!0,label:"name","value-prop":"nameRef"},null,8,["modelValue","placeholder","options"])]}),_:1},8,["filter-array","title"])):i.createCommentVNode("",!0)}}),gT={filterObject:{type:Object,required:!1,default:void 0},showClearAll:{type:Boolean,required:!1,default:!0}},mT={class:"filter"},vT={key:0,class:"top"},BT=i.defineComponent({__name:"SidePanel",props:gT,emits:["clear:filterObject"],setup(e,{emit:t}){const n=e,r=i.computed(()=>n.filterObject&&Object.values(n.filterObject).some(A=>A.length>0)?"clickable":null);function a(){t("clear:filterObject")}return(A,s)=>{const o=i.resolveDirective("t");return i.openBlock(),i.createElementBlock("div",mT,[n.showClearAll&&n.filterObject?(i.openBlock(),i.createElementBlock("div",vT,[i.withDirectives(i.createElementVNode("p",{class:i.normalizeClass(["clear",r.value]),onClick:a},null,2),[[o,"general.clearAll"]])])):i.createCommentVNode("",!0),i.renderSlot(A.$slots,"default",{},void 0,!0)])}}});const Zs=M(BT,[["__scopeId","data-v-6a93fcc1"]]),vb=i.defineComponent({__name:"FilterDecks",props:uT,emits:["update:filters"],setup(e,{emit:t}){const n=e,r=i.reactive(n.filters);i.watch(r,()=>{t("update:filters",r)});const a=i.computed(()=>{var s;return(s=we().dataJson.formats[r.formatFilters[0]??"Standard"])==null?void 0:s.availableQueues});function A(){for(const[,s]of Object.entries(r))s.splice(0)}return(s,o)=>(i.openBlock(),i.createBlock(Zs,{"filter-object":n.filters,"onClear:filterObject":A},{default:i.withCtx(()=>[i.createVNode(Yo,{"filter-array":r.regionFilters,"onUpdate:filterArray":o[0]||(o[0]=l=>r.regionFilters=l)},null,8,["filter-array"]),i.createVNode(Xu,{"filter-array":r.cardFilters,"onUpdate:filterArray":o[1]||(o[1]=l=>r.cardFilters=l)},null,8,["filter-array"]),i.createVNode(Cg,{"filter-array":r.formatFilters,"onUpdate:filterArray":o[2]||(o[2]=l=>r.formatFilters=l)},null,8,["filter-array"]),n.includeDataFilters?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createVNode(Eg,{"filter-array":r.queueFilters,"onUpdate:filterArray":o[3]||(o[3]=l=>r.queueFilters=l),"available-queues":a.value},null,8,["filter-array","available-queues"]),i.createVNode(Xs,{"filter-array":r.sampleSizeFilters,"onUpdate:filterArray":o[4]||(o[4]=l=>r.sampleSizeFilters=l)},null,8,["filter-array"]),i.createVNode(KA,{"filter-array":r.timeFilters,"onUpdate:filterArray":o[5]||(o[5]=l=>r.timeFilters=l)},null,8,["filter-array"]),i.createVNode(Js,{"filter-array":r.serverFilters,"onUpdate:filterArray":o[6]||(o[6]=l=>r.serverFilters=l)},null,8,["filter-array"])],64)):i.createCommentVNode("",!0)]),_:1},8,["filter-object"]))}}),yT={filters:{type:Object,required:!0,default:{cardFilters:[],regionFilters:[],sampleSizeFilters:[],serverFilters:[],timeFilters:[],formatFilters:[],queueFilters:[]}},includeDataFilters:{type:Boolean,required:!1,default:!0}},wT={filterArray:{type:Array,required:!0,default:[]},placeholder:{type:String,required:!1},title:{type:String,required:!1,default:"Text"}},bT=["placeholder"],_T=i.defineComponent({__name:"FilterText",props:wT,emits:["update:filterArray"],setup(e,{emit:t}){const n=e,r=i.ref(n.filterArray),a=i.ref("");let A=setTimeout(()=>{},0);r.value.length>0&&(a.value=r.value[0]),i.watch(r,()=>{t("update:filterArray",r.value)}),i.watch(a,()=>{A&&clearTimeout(A),A=setTimeout(()=>{r.value.splice(0),a.value&&r.value.push(a.value)},1e3)});function s(){r.value.splice(0),a.value=""}return(o,l)=>(i.openBlock(),i.createBlock(mt,{"filter-array":r.value,title:n.title,"onClear:filterArray":s},{default:i.withCtx(()=>[i.withDirectives(i.createElementVNode("input",{"onUpdate:modelValue":l[0]||(l[0]=c=>a.value=c),placeholder:n.placeholder,type:"text"},null,8,bT),[[i.vModelText,a.value]])]),_:1},8,["filter-array","title"]))}});const su=M(_T,[["__scopeId","data-v-e9c34cae"]]),Bb=i.defineComponent({__name:"FilterProfile",props:yT,emits:["update:filters"],setup(e,{emit:t}){const n=e,{t:r}=se(),a=i.reactive(n.filters);i.watch(a,()=>{t("update:filters",a)});const A=i.computed(()=>{var o;return a.formatFilters.length===0?[]:(o=we().dataJson.formats[a.formatFilters[0]??"Standard"])==null?void 0:o.availableQueues});function s(){for(const[,o]of Object.entries(a))o.splice(0)}return(o,l)=>(i.openBlock(),i.createBlock(Zs,{"filter-object":n.filters,"onClear:filterObject":s},{default:i.withCtx(()=>[i.createVNode(Yo,{"filter-array":a.regionFilters,"onUpdate:filterArray":l[0]||(l[0]=c=>a.regionFilters=c)},null,8,["filter-array"]),i.createVNode(Xu,{"filter-array":a.cardFilters,"onUpdate:filterArray":l[1]||(l[1]=c=>a.cardFilters=c)},null,8,["filter-array"]),i.createVNode(su,{"filter-array":a.deckCodeFilters,"onUpdate:filterArray":l[2]||(l[2]=c=>a.deckCodeFilters=c),placeholder:i.unref(r)("general.deckCode"),title:i.unref(r)("general.deckCode")},null,8,["filter-array","placeholder","title"]),i.createVNode(su,{"filter-array":a.playerFilters,"onUpdate:filterArray":l[3]||(l[3]=c=>a.playerFilters=c),placeholder:i.unref(r)("general.players"),title:i.unref(r)("general.players")},null,8,["filter-array","placeholder","title"]),i.createVNode(Xs,{"filter-array":a.sampleSizeFilters,"onUpdate:filterArray":l[4]||(l[4]=c=>a.sampleSizeFilters=c)},null,8,["filter-array"]),i.createVNode(Cg,{"allow-zero":!0,"filter-array":a.formatFilters,"onUpdate:filterArray":l[5]||(l[5]=c=>a.formatFilters=c)},null,8,["filter-array"]),i.createVNode(Eg,{"filter-array":a.queueFilters,"onUpdate:filterArray":l[6]||(l[6]=c=>a.queueFilters=c),"available-queues":A.value},null,8,["filter-array","available-queues"]),i.createVNode(KA,{"allow-zero":!0,"filter-array":a.timeFilters,"onUpdate:filterArray":l[7]||(l[7]=c=>a.timeFilters=c)},null,8,["filter-array"])]),_:1},8,["filter-object"]))}}),CT={filterValue:{type:Object,required:!0,default:{attribute:"attack",equality:">",number:0}}},ET={class:"advanced-filter-item"},kT=["value"],ST=i.defineComponent({__name:"AdvancedFilterItem",props:CT,emits:["update:filterValue"],setup(e,{emit:t}){const n=e,{t:r}=se(),a=[{value:"attack",label:r("cards.attack")},{value:"health",label:r("cards.health")},{value:"cost",label:r("cards.cost")},{value:"quantityOwned",label:r("cards.quantityOwned")}],A=i.ref(n.filterValue.attribute);i.watch(A,()=>{t("update:filterValue",{attribute:A.value,equality:n.filterValue.equality,number:n.filterValue.number})});function s(){let l=">";n.filterValue.equality===">"?l="<":n.filterValue.equality==="<"&&(l="="),t("update:filterValue",{attribute:n.filterValue.attribute,equality:l,number:n.filterValue.number})}function o(l){t("update:filterValue",{attribute:n.filterValue.attribute,equality:n.filterValue.equality,number:Number(l.target.value)})}return(l,c)=>(i.openBlock(),i.createElementBlock("div",ET,[i.createVNode(i.unref(Vt),{modelValue:A.value,"onUpdate:modelValue":c[0]||(c[0]=u=>A.value=u),class:"advanced-attribute",options:a,"can-clear":!1,label:"label","value-prop":"value"},null,8,["modelValue"]),i.createElementVNode("div",{class:"equality-button",onClick:s},i.toDisplayString(n.filterValue.equality),1),i.createElementVNode("input",{type:"number",class:"equality-number",value:n.filterValue.number,onInput:o},null,40,kT)]))}});const kg=M(ST,[["__scopeId","data-v-eb2d535d"]]),xT={filterValue:{type:Array,required:!0,default:[]}},FT=i.defineComponent({__name:"FilterAdvanced",props:xT,emits:["update:filterValue"],setup(e,{emit:t}){const n=e,{t:r}=se(),a=i.reactive(n.filterValue);i.watch(a,()=>{t("update:filterValue",a)});function A(){a.splice(0)}function s(){a.push({attribute:"attack",equality:">",number:0})}return(o,l)=>(i.openBlock(),i.createBlock(mt,{class:"advanced-filters","filter-array":a,title:i.unref(r)("general.advanced"),"onClear:filterArray":A},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a,(c,u)=>(i.openBlock(),i.createBlock(kg,{key:u,"filter-value":a[u],"onUpdate:filterValue":d=>a[u]=d,class:"advanced-filter-item"},null,8,["filter-value","onUpdate:filterValue"]))),128)),i.createElementVNode("div",{class:"new-advanced-filter",onClick:s},i.toDisplayString(i.unref(r)("general.newAdvancedFilter")),1)]),_:1},8,["filter-array","title"]))}});const Sg=M(FT,[["__scopeId","data-v-6c23ee29"]]),IT={filterArray:{type:Array,required:!0,default:[]}},UT={class:"checkboxes-container"},xg=i.defineComponent({__name:"FilterTypes",props:IT,emits:["update:filterArray"],setup(e,{emit:t}){const n=e,{t:r}=se(),a=i.computed(()=>we().dataJson.types.filter(l=>["Unit","Spell","Landmark","Equipment"].includes(l.nameRef))),A=i.reactive(n.filterArray);i.watch(A,()=>{t("update:filterArray",A)});function s(){A.splice(0)}function o(l){const c=A.indexOf(l);if(c===-1){A.push(l);return}A.splice(c,1)}return(l,c)=>(i.openBlock(),i.createBlock(mt,{"filter-array":n.filterArray,title:i.unref(r)("general.types"),"onClear:filterArray":s},{default:i.withCtx(()=>[i.createElementVNode("div",UT,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.value,u=>(i.openBlock(),i.createBlock(tn,{key:u.nameRef,icon:`url(${u.icon})`,prompt:u.name,"is-selected":A.includes(u.nameRef),"onUpdate:isSelected":d=>o(u.nameRef)},null,8,["icon","prompt","is-selected","onUpdate:isSelected"]))),128))])]),_:1},8,["filter-array","title"]))}}),QT={filters:{type:Object,required:!0,default:{advancedFilters:[],regionFilters:[],manaCostFilters:[],typeFilters:[],rarityFilters:[],setFilters:[],keywordFilters:[]}}},yb=i.defineComponent({__name:"FilterCards",props:QT,emits:["update:filters"],setup(e,{emit:t}){const n=e,r=i.reactive(n.filters);i.watch(r,()=>{t("update:filters",r)});const a=i.computed(()=>{var s;return"formatFilters"in r?(s=we().dataJson.formats[r.formatFilters[0]??"Standard"])==null?void 0:s.availableQueues:[]});function A(){for(const[,s]of Object.entries(r))s.splice(0)}return(s,o)=>(i.openBlock(),i.createBlock(Zs,{"filter-object":n.filters,"onClear:filterObject":A},{default:i.withCtx(()=>[i.createVNode(Bg,{"filter-array":r.manaCostFilters,"onUpdate:filterArray":o[0]||(o[0]=l=>r.manaCostFilters=l)},null,8,["filter-array"]),i.createVNode(Yo,{"filter-array":r.regionFilters,"onUpdate:filterArray":o[1]||(o[1]=l=>r.regionFilters=l)},null,8,["filter-array"]),i.createVNode(xg,{"filter-array":r.typeFilters,"onUpdate:filterArray":o[2]||(o[2]=l=>r.typeFilters=l)},null,8,["filter-array"]),i.createVNode(yg,{"filter-array":r.rarityFilters,"onUpdate:filterArray":o[3]||(o[3]=l=>r.rarityFilters=l)},null,8,["filter-array"]),i.createVNode(wg,{"filter-array":r.setFilters,"onUpdate:filterArray":o[4]||(o[4]=l=>r.setFilters=l)},null,8,["filter-array"]),i.createVNode(bg,{"filter-array":r.keywordFilters,"onUpdate:filterArray":o[5]||(o[5]=l=>r.keywordFilters=l)},null,8,["filter-array"]),i.createVNode(Sg,{"filter-value":r.advancedFilters,"onUpdate:filterValue":o[6]||(o[6]=l=>r.advancedFilters=l)},null,8,["filter-value"]),"serverFilters"in r?(i.openBlock(),i.createBlock(i.unref(Js),{key:0,"filter-array":r.serverFilters,"onUpdate:filterArray":o[7]||(o[7]=l=>r.serverFilters=l)},null,8,["filter-array"])):i.createCommentVNode("",!0),"timeFilters"in r?(i.openBlock(),i.createBlock(KA,{key:1,"filter-array":r.timeFilters,"onUpdate:filterArray":o[8]||(o[8]=l=>r.timeFilters=l)},null,8,["filter-array"])):i.createCommentVNode("",!0),"formatFilters"in r?(i.openBlock(),i.createBlock(Cg,{key:2,"filter-array":r.formatFilters,"onUpdate:filterArray":o[9]||(o[9]=l=>r.formatFilters=l)},null,8,["filter-array"])):i.createCommentVNode("",!0),"queueFilters"in r?(i.openBlock(),i.createBlock(Eg,{key:3,"filter-array":r.queueFilters,"onUpdate:filterArray":o[10]||(o[10]=l=>r.queueFilters=l),"available-queues":a.value},null,8,["filter-array","available-queues"])):i.createCommentVNode("",!0)]),_:1},8,["filter-object"]))}}),TT={regionRef:{type:String,required:!0,default:"Ionia"}},DT={text:{type:String,required:!0,default:""}},LT=["innerHTML"],OT=i.defineComponent({__name:"TippyText",props:DT,setup(e){const t=e;return(n,r)=>(i.openBlock(),i.createElementBlock("div",{class:"tippy-text",innerHTML:t.text},null,8,LT))}});const Ju=M(OT,[["__scopeId","data-v-715107fe"]]),MT={class:"region-item"},NT=["alt","src"],PT=i.defineComponent({__name:"RegionItem",props:TT,setup(e){const t=e,n=i.ref(null),r=i.ref(null),a=i.computed(()=>we().dataJson.regions.find(A=>A.nameRef==t.regionRef)??we().dataJson.runeterraChampions.find(A=>A.nameRef===t.regionRef));return i.onMounted(()=>{At(n.value,{content:r.value,arrow:!0})}),(A,s)=>{var o,l,c;return i.openBlock(),i.createElementBlock("div",MT,[i.createElementVNode("img",{ref_key:"regionImg",ref:n,alt:(o=a.value)==null?void 0:o.name,src:(l=a.value)==null?void 0:l.icon,class:"region-img"},null,8,NT),i.createElementVNode("div",{ref_key:"regionTippy",ref:r},[i.createVNode(Ju,{text:(c=a.value)==null?void 0:c.name},null,8,["text"])],512)])}}});const qo=M(PT,[["__scopeId","data-v-3d756f50"]]),HT={deckCode:{type:String,required:!0,default:""},deck:{type:Object,required:!1},cards:{type:Array,required:!1},describeRegions:{type:Boolean,required:!1,default:!1}},RT={class:"regions-line"},VT={key:0,class:"describe-regions"},KT={class:"lines"},$T=i.defineComponent({__name:"RegionsLine",props:HT,setup(e){const t=e,{t:n}=se(),r=i.computed(()=>t.deck?t.deck:St(t.deckCode)),a=i.computed(()=>t.cards?t.cards:rn(r.value)),A=i.computed(()=>{const o={};for(const l of Ou(r.value))o[l]=0;for(const l of a.value)for(const c of l.regionRefs)c in o&&(o[c]+=r.value[l.cardCode]);return o});function s(o,l){return{flexGrow:o,backgroundColor:`var(--color-${l}, var(--color-Runeterra))`}}return(o,l)=>(i.openBlock(),i.createElementBlock("div",RT,[t.describeRegions?(i.openBlock(),i.createElementBlock("div",VT,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(A.value,(c,u)=>(i.openBlock(),i.createElementBlock("div",{key:u,class:"region-description"},[i.createVNode(qo,{"region-ref":u,class:"icon"},null,8,["region-ref"]),i.createElementVNode("span",null,i.toDisplayString(`${c} ${i.unref(n)("general.cards")}`),1)]))),128))])):i.createCommentVNode("",!0),i.createElementVNode("div",KT,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(A.value,(c,u)=>(i.openBlock(),i.createElementBlock("div",{key:u,style:i.normalizeStyle(s(c,u)),class:"region-line"},null,4))),128))])]))}});const Fg=M($T,[["__scopeId","data-v-f1f94f8b"]]),WT={routerLink:{type:Object,required:!0,default:{path:"/404"}},cardCode:{type:String,required:!0,default:"01IO001"},toggledStats:{type:Object,required:!0,default:{matches:!0,winrate:!0,inclusion:!0,avgCopies:!0,mulliganWinrate:!1,kept:!1,drawnWinrate:!1,turnsHeld:!1,turnPlayed:!1}},index:{type:Number,required:!0,default:1},matches:{type:Number,required:!0,default:1},region:{type:String,required:!0,default:""},wins:{type:Number,required:!0,default:1},inclusion:{type:Number,required:!0,default:.5},avgCopies:{type:Number,required:!0,default:1},mulliganWinrate:{type:Number,required:!1,default:void 0},keptInMulligan:{type:Number,required:!1,default:void 0},drawnWinrate:{type:Number,required:!1,default:void 0},turnsHeld:{type:Number,required:!1,default:void 0},turnPlayed:{type:Number,required:!1,default:void 0}},GT={class:"cards-row-background-wrapper"},zT={class:"cards-row-background"},jT={class:"cards-row wrapper"},YT={key:0,class:"column-content"},qT={key:2,class:"column-content"},XT={key:3,class:"column-content"},JT={key:5,class:"column-content"},ZT={key:7,class:"column-content"},eD={key:8,class:"column-content"},tD=i.defineComponent({__name:"CardsRow",props:WT,setup(e){const t=e,n=i.computed(()=>["",`https://lor.gg/storage/cards/banner/${t.cardCode}.png`]);return(r,a)=>{const A=i.resolveComponent("RouterLink");return i.openBlock(),i.createBlock(A,{to:t.routerLink,class:"wrapper"},{default:i.withCtx(()=>[i.createElementVNode("div",{class:"cards-row-wrapper wrapper",style:i.normalizeStyle({"--index":t.index})},[i.createElementVNode("div",GT,[i.createElementVNode("div",zT,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.value,s=>(i.openBlock(),i.createElementBlock("div",{key:s,class:"background-card",style:i.normalizeStyle({"--background-image":`url(${s})`})},null,4))),128))])]),i.createElementVNode("div",jT,[i.createElementVNode("div",{class:"column-content deck-highlight-wrapper",onClick:a[0]||(a[0]=i.withModifiers(()=>{},["stop","prevent"]))},[i.createVNode(fn,{class:"card-slice-item","card-code-prop":t.cardCode,"maintain-aspect-ratio":!0,color:`var(--color-${t.region}-rgb, var(--color-primary-2-rgb))`,"router-link":t.routerLink},null,8,["card-code-prop","color","router-link"])]),t.toggledStats.matches?(i.openBlock(),i.createElementBlock("div",YT,i.toDisplayString(i.unref(Te)(t.matches)),1)):i.createCommentVNode("",!0),t.toggledStats.winrate?(i.openBlock(),i.createElementBlock("div",{key:1,class:"column-content",style:i.normalizeStyle({color:`var(${i.unref(Zn)(t.wins/t.matches)})`})},i.toDisplayString(i.unref(Te)(t.wins/t.matches*100,2,3)+"%"),5)):i.createCommentVNode("",!0),t.toggledStats.inclusion?(i.openBlock(),i.createElementBlock("div",qT,i.toDisplayString(i.unref(Te)(t.inclusion*100,2,3)+"%"),1)):i.createCommentVNode("",!0),t.toggledStats.avgCopies?(i.openBlock(),i.createElementBlock("div",XT,i.toDisplayString(i.unref(Te)(t.avgCopies,2,3)),1)):i.createCommentVNode("",!0),t.toggledStats.mulliganWinrate?(i.openBlock(),i.createElementBlock("div",{key:4,class:"column-content",style:i.normalizeStyle({color:`var(${i.unref(Zn)(t.mulliganWinrate,t.wins/t.matches)})`})},i.toDisplayString(t.mulliganWinrate?i.unref(Te)(t.mulliganWinrate*100,2,3)+"%":"-"),5)):i.createCommentVNode("",!0),t.toggledStats.keptInMulligan?(i.openBlock(),i.createElementBlock("div",JT,i.toDisplayString(t.keptInMulligan?i.unref(Te)(t.keptInMulligan*100,2,3)+"%":"-"),1)):i.createCommentVNode("",!0),t.toggledStats.drawnWinrate?(i.openBlock(),i.createElementBlock("div",{key:6,class:"column-content",style:i.normalizeStyle({color:`var(${i.unref(Zn)(t.drawnWinrate,t.wins/t.matches)})`})},i.toDisplayString(t.drawnWinrate?i.unref(Te)(t.drawnWinrate*100,2,3)+"%":"-"),5)):i.createCommentVNode("",!0),t.toggledStats.turnPlayed?(i.openBlock(),i.createElementBlock("div",ZT,i.toDisplayString(t.turnPlayed?i.unref(Te)(t.turnPlayed,2,3):"-"),1)):i.createCommentVNode("",!0),t.toggledStats.turnsHeld?(i.openBlock(),i.createElementBlock("div",eD,i.toDisplayString(t.turnsHeld?i.unref(Te)(t.turnsHeld,2,3):"-"),1)):i.createCommentVNode("",!0)])],4)]),_:1},8,["to"])}}});const Ig=M(tD,[["__scopeId","data-v-69ecee4e"]]),nD={cardRows:{type:Array,required:!0,default:[]},cardsRowToggle:{type:Object,requied:!0,default:{card:!0,matches:!0,winrate:!0,inclusion:!0,avgCopies:!0,mulliganWinrate:!0,keptInMulligan:!0,drawnWinrate:!0,turnsHeld:!0,turnPlayed:!0}},loading:{type:Boolean,required:!1,default:!1}};var be=(e=>(e.UP="sort-up",e.DOWN="sort-down",e.NEITHER="sort-neither",e.NOT_SORTABLE="not-sortable",e))(be||{});const rD={headingItems:{type:Array,required:!0,default:[]},loading:{type:Boolean,required:!1,default:!1}};const aD={},AD={class:"loader"};function sD(e,t){return i.openBlock(),i.createElementBlock("div",AD)}const iD=M(aD,[["render",sD],["__scopeId","data-v-91218ab0"]]),Ug=e=>(i.pushScopeId("data-v-f0d8b380"),e=e(),i.popScopeId(),e),oD={class:"table-wrapper"},lD={class:"table no-scrollbar"},cD=Ug(()=>i.createElementVNode("div",{class:"heading-background-outer"},[i.createElementVNode("div",{class:"heading-background-absolute"}),i.createElementVNode("div",{class:"heading-background-inner"})],-1)),uD={class:"heading wrapper"},dD=["onClick"],fD={class:"sort-icons"},hD={key:0,class:"no-content loading"},pD={key:1,class:"no-content no-results"},gD=Ug(()=>i.createElementVNode("h2",null," No Results ",-1)),mD=Ug(()=>i.createElementVNode("h4",null," Adjust filters and try again. ",-1)),vD=[gD,mD],BD=i.defineComponent({__name:"LargeTable",props:rD,emits:["toggleSort"],setup(e,{emit:t}){const n=e,r=i.computed(()=>n.headingItems.filter(A=>A.isShown)),a=i.computed(()=>!!i.useSlots().default);return(A,s)=>(i.openBlock(),i.createElementBlock("div",oD,[i.createElementVNode("div",lD,[cD,i.createElementVNode("div",uD,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.value,o=>(i.openBlock(),i.createElementBlock("div",{key:o.title,class:i.normalizeClass(["heading-cell column-content",o.sortDirection]),onClick:l=>t("toggleSort",o.id)},[i.createElementVNode("div",null,i.toDisplayString(o.title),1),i.createElementVNode("div",fD,[i.createVNode(i.unref(Ue),{icon:"sort-up",class:"sort-icon"}),i.createVNode(i.unref(Ue),{icon:"sort-down",class:"sort-icon"})])],10,dD))),128))]),i.renderSlot(A.$slots,"default",{},void 0,!0)]),n.loading&&!a.value?(i.openBlock(),i.createElementBlock("div",hD,[i.createVNode(iD)])):!n.loading&&!a.value?(i.openBlock(),i.createElementBlock("div",pD,vD)):i.createCommentVNode("",!0)]))}});const tA=M(BD,[["__scopeId","data-v-f0d8b380"]]);function ei(e,t){const n=t.value.find(a=>a.id===e);if(!n||n.sortDirection===be.NOT_SORTABLE)return null;const r=n.sortDirection;return yD(t),r===be.NEITHER?n.sortDirection=be.DOWN:r===be.DOWN?n.sortDirection=be.UP:n.sortDirection=be.DOWN,n}function yD(e){e.value.forEach(t=>{t.sortDirection!==be.NOT_SORTABLE&&(t.sortDirection=be.NEITHER)})}const wD=i.defineComponent({__name:"CardsTable",props:nD,emits:["sort-updated"],setup(e,{emit:t}){const n=e,{t:r}=se(),a=[{id:"card",isAlwaysShown:!0,isSortable:!1,title:r("general.card")},{id:"matches",isAlwaysShown:!1,isSortable:!0,title:r("general.matches")},{id:"winrate",isAlwaysShown:!1,isSortable:!0,title:r("general.winrate")},{id:"inclusion",isAlwaysShown:!1,isSortable:!0,title:r("general.inclusion")},{id:"avgCopies",isAlwaysShown:!1,isSortable:!0,title:r("general.avgCopies")},{id:"mulliganWinrate",isAlwaysShown:!1,isSortable:!0,title:r("general.mulliganWinrate")},{id:"keptInMulligan",isAlwaysShown:!1,isSortable:!0,title:r("general.keptInMulligan")},{id:"drawnWinrate",isAlwaysShown:!1,isSortable:!0,title:r("general.drawnWinrate")},{id:"turnsHeld",isAlwaysShown:!1,isSortable:!0,title:r("general.turnsHeld")},{id:"turnPlayed",isAlwaysShown:!1,isSortable:!0,title:r("general.turnPlayed")}];let A=!1;const s=i.ref(a.map(c=>{let u=be.NEITHER;return c.isSortable||(u=be.NOT_SORTABLE),!A&&c.isSortable&&(u=be.DOWN,A=!0),{id:c.id,isShown:n.cardsRowToggle[c.id],sortDirection:u,title:c.title}})),o=i.computed(()=>({"--table-grid-template-columns":`repeat(${Object.values(n.cardsRowToggle).reduce((u,d)=>d?u+1:u,0)}, 1fr)`}));function l(c){const u=ei(c,s);u&&t("sort-updated",u)}return(c,u)=>(i.openBlock(),i.createBlock(tA,{class:"large-table","heading-items":s.value,style:i.normalizeStyle(o.value),onToggleSort:l},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.cardRows,(d,f)=>(i.openBlock(),i.createBlock(Ig,{key:d.cardCode+d.region,"card-code":d.cardCode,matches:d.matches,wins:d.wins,index:f+2,"avg-copies":d.avgCopies,"drawn-winrate":d.drawnWinrate,"kept-in-mulligan":d.keptInMulligan,"mulligan-winrate":d.mulliganWinrate,inclusion:d.inclusion,"turns-held":d.turnsHeld,"turn-played":d.turnPlayed,"toggled-stats":n.cardsRowToggle,region:d.region,"router-link":i.unref(nn)().callbacks.cardCodeRouterLinkCallback(d.cardCode)},null,8,["card-code","matches","wins","index","avg-copies","drawn-winrate","kept-in-mulligan","mulligan-winrate","inclusion","turns-held","turn-played","toggled-stats","region","router-link"]))),128))]),_:1},8,["heading-items","style"]))}});const wb=M(wD,[["__scopeId","data-v-03110c92"]]),bD={regions:{type:Array,required:!0,default:[]}},_D={class:"deck-highlight-regions"},CD=i.defineComponent({__name:"DeckHighlightRegions",props:bD,setup(e){const t=e;return(n,r)=>(i.openBlock(),i.createElementBlock("div",_D,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(t.regions,a=>(i.openBlock(),i.createElementBlock("div",{key:a,class:"region-item-wrapper"},[i.createVNode(qo,{class:"region-item","region-ref":a},null,8,["region-ref"])]))),128))]))}});const Xo=M(CD,[["__scopeId","data-v-d28f95f4"]]),ED={},kD={xmlns:"http://www.w3.org/2000/svg",viewBox:"215.7 48.9 276.9 496"},SD=i.createStaticVNode('<path fill="#146743" d="m271 136-54 90 150 316 14-50 29-312-51-130-88 86Z"></path><path fill="#419a4a" d="m356 121-75 105 86 316 14-50 29-312-54-59Z"></path><path fill="#baffb6" d="M410 180 359 50l-3 71 54 59Z"></path><path fill="#437f41" d="m359 50-88 86 10 90 75-105 3-71ZM281 360l86 182-86-316v134Z"></path><path fill="#419a4a" d="m454 332 28 33-33 85-4-13-8-85 17-20Z"></path>',5),xD=[SD];function FD(e,t){return i.openBlock(),i.createElementBlock("svg",kD,xD)}const Qg=M(ED,[["render",FD]]),ID={deck:{type:Object,required:!0,default:{}}},UD=e=>(i.pushScopeId("data-v-25f680e9"),e=e(),i.popScopeId(),e),QD={class:"gems-text"},TD={class:"gems-cost-title"},DD={class:"gems-cost-value"},LD=UD(()=>i.createElementVNode("hr",{class:"divider"},null,-1)),OD={class:"gems-cost-title"},MD={class:"gems-cost-value"},ND=i.defineComponent({__name:"GemsCost",props:ID,setup(e){const t=e,{t:n}=se(),r=i.ref(null),a=i.ref(null),A=i.computed(()=>Yc(t.deck,!1)),s=i.computed(()=>Yc(t.deck,!0));return i.onMounted(()=>{At(r.value,{content:a.value,arrow:!0,duration:0})}),(o,l)=>{var c,u,d;return i.openBlock(),i.createElementBlock("div",{ref_key:"gemsCostDiv",ref:r,class:"gems-cost"},[i.createVNode(Qg,{class:"shards-icon"}),i.createElementVNode("div",QD,i.toDisplayString((c=s.value!==null?s.value:A.value)==null?void 0:c.toLocaleString()),1),i.createElementVNode("div",{ref_key:"gemsCostTippyDiv",ref:a,class:"gems-cost-tippy"},[s.value?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createElementVNode("div",TD,i.toDisplayString(i.unref(n)("deck.personalCost")),1),i.createElementVNode("div",DD,i.toDisplayString((u=s.value)==null?void 0:u.toLocaleString()),1),LD],64)):i.createCommentVNode("",!0),i.createElementVNode("div",OD,i.toDisplayString(i.unref(n)("deck.originalCost")),1),i.createElementVNode("div",MD,i.toDisplayString((d=A.value)==null?void 0:d.toLocaleString()),1)],512)],512)}}});const Tg=M(ND,[["__scopeId","data-v-25f680e9"]]),PD={class:"language-selection"},HD=["value"],RD=i.defineComponent({__name:"LanguageSelection",setup(e){const t=i.ref(!1);function n(){t.value=!0}return(r,a)=>(i.openBlock(),i.createElementBlock("div",PD,[i.createVNode(i.unref(Ue),{ref:"languageIcon",icon:"language",class:"icon",onClick:n},null,512),i.createVNode(VA,{"show-modal":t.value,"onUpdate:showModal":a[1]||(a[1]=A=>t.value=A)},{default:i.withCtx(()=>[i.withDirectives(i.createElementVNode("select",{"onUpdate:modelValue":a[0]||(a[0]=A=>r.$i18n.locale=A)},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.$i18n.availableLocales,A=>(i.openBlock(),i.createElementBlock("option",{key:`locale-${A}`,value:A},i.toDisplayString(A),9,HD))),128))],512),[[i.vModelSelect,r.$i18n.locale]])]),_:1},8,["show-modal"])]))}});const Dg=M(RD,[["__scopeId","data-v-741580c8"]]),VD={cardCodes:{type:Array,required:!0,default:[]},regions:{type:Array,required:!0,default:[]}},bb={routerLink:{type:Object,required:!0,default:{path:"/404"}},cardProp:{type:Object,required:!1,default:void 0},cardCodeProp:{type:String,required:!1,default:void 0},ignoreCardItem:{type:Boolean,required:!1},regions:{type:Array,required:!1,default:void 0},colorOverride:{type:String,required:!1,default:void 0}},KD={class:"circle-card-item"},$D=["alt","src"],WD=i.defineComponent({__name:"CircleCardItem",props:bb,setup(e){const t=e,n=Ro(t.cardProp,t.cardCodeProp,!0),r=i.ref(null),a=i.ref(null),A=i.ref(null),s=i.ref(null),o=i.computed(()=>{var c;return"https://lor.gg/storage/cards/icon/"+((c=n.value)==null?void 0:c.cardCode)+"-icon.webp"}),l=i.computed(()=>n.value===void 0?"--color-primary-2":pA(n.value,t.regions));return i.onMounted(()=>{t.ignoreCardItem||At(r.value,{content:a.value,placement:"right",arrow:!0,touch:"hold",duration:0,role:"card-image",onShown:c=>{const u=c.popper.innerHTML.includes("right")?"right-start":"left-start";s.value=u},onHidden:()=>{s.value=null}})}),(c,u)=>{const d=i.resolveComponent("RouterLink");return i.openBlock(),i.createElementBlock("div",KD,[i.createVNode(d,{to:t.routerLink,class:"circle-card-link",onClick:u[0]||(u[0]=i.withModifiers(()=>{},["stop","prevent"]))},{default:i.withCtx(()=>{var f;return[i.createElementVNode("img",{ref_key:"circleCardImg",ref:r,alt:(f=i.unref(n))==null?void 0:f.name,src:o.value,class:"circle-card-img",style:i.normalizeStyle({borderColor:t.colorOverride??l.value})},null,12,$D)]}),_:1},8,["to"]),i.createElementVNode("div",{ref_key:"circleCardTippy",ref:a,class:"circle-card-tippy"},[!c.ignoreCardItem&&i.unref(n)?(i.openBlock(),i.createBlock(Wa,{key:0,ref_key:"cardItem",ref:A,"card-code-prop":i.unref(n).cardCode,"is-deck-builder":!1,"is-root":!0,"show-tippy-location":s.value},null,8,["card-code-prop","show-tippy-location"])):i.createCommentVNode("",!0)],512)])}}});const nA=M(WD,[["__scopeId","data-v-b1598a69"]]),GD={cards:{type:Array,required:!1,default:void 0},cardCodes:{type:Array,required:!1,default:void 0},regions:{type:Array,required:!1,default:[]}},zD={class:"deck-highlight-cards"},jD=i.defineComponent({__name:"DeckHighlightCards",props:GD,setup(e){const t=e,n=i.computed(()=>{if(t.cards)return t.cards;if(t.cardCodes)return t.cardCodes.map(r=>jt().cardJsonObject[r]).filter(r=>r!==void 0);throw new Error("Cards or CardCodes must be defined.")});return(r,a)=>(i.openBlock(),i.createElementBlock("div",zD,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.value,(A,s)=>(i.openBlock(),i.createElementBlock("div",{key:A.cardCode??s,class:"circle-card-item-wrapper"},[i.createVNode(nA,{class:"circle-card-item","card-prop":A,regions:t.regions,"router-link":i.unref(nn)().callbacks.cardCodeRouterLinkCallback(A.cardCode)},null,8,["card-prop","regions","router-link"])]))),128))]))}});const Jo=M(jD,[["__scopeId","data-v-021c3530"]]),YD=i.defineComponent({__name:"ArchetypeSidePanelHighlight",props:VD,setup(e){const t=e;return(n,r)=>(i.openBlock(),i.createBlock(mt,{class:"archetype-side-panel-highlight"},{default:i.withCtx(()=>[i.createVNode(Xo,{class:"deck-highlight-regions",regions:t.regions},null,8,["regions"]),i.createVNode(Jo,{class:i.normalizeClass(["deck-highlight-cards",t.cardCodes.length===1?"single":""]),"card-codes":t.cardCodes},null,8,["class","card-codes"])]),_:1}))}});const Zu=M(YD,[["__scopeId","data-v-ff538f6f"]]),qD={deckcode:{type:String,required:!0,default:""},filters:{type:Object,required:!0,default:{sampleSizeFilters:[],serverFilters:[],timeFilters:[]}}},XD={deckCode:{type:String,required:!0,default:""},info:{type:String,required:!0,default:"typeRef"}};/*!
|
|
810
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var eU=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},pb={exports:{}};(function(e){(function(t){var n=function(g,v,_){if(!c(v)||d(v)||f(v)||h(v)||l(v))return v;var B,b=0,w=0;if(u(v))for(B=[],w=v.length;b<w;b++)B.push(n(g,v[b],_));else{B={};for(var C in v)Object.prototype.hasOwnProperty.call(v,C)&&(B[g(C,_)]=n(g,v[C],_))}return B},r=function(g,v){v=v||{};var _=v.separator||"_",B=v.split||/(?=[A-Z])/;return g.split(B).join(_)},a=function(g){return p(g)?g:(g=g.replace(/[\-_\s]+(.)?/g,function(v,_){return _?_.toUpperCase():""}),g.substr(0,1).toLowerCase()+g.substr(1))},A=function(g){var v=a(g);return v.substr(0,1).toUpperCase()+v.substr(1)},s=function(g,v){return r(g,v).toLowerCase()},o=Object.prototype.toString,l=function(g){return typeof g=="function"},c=function(g){return g===Object(g)},u=function(g){return o.call(g)=="[object Array]"},d=function(g){return o.call(g)=="[object Date]"},f=function(g){return o.call(g)=="[object RegExp]"},h=function(g){return o.call(g)=="[object Boolean]"},p=function(g){return g=g-0,g===g},m=function(g,v){var _=v&&"process"in v?v.process:v;return typeof _!="function"?g:function(B,b){return _(B,g,b)}},y={camelize:a,decamelize:s,pascalize:A,depascalize:s,camelizeKeys:function(g,v){return n(m(a,v),g)},decamelizeKeys:function(g,v){return n(m(s,v),g,v)},pascalizeKeys:function(g,v){return n(m(A,v),g)},depascalizeKeys:function(){return this.decamelizeKeys.apply(this,arguments)}};e.exports?e.exports=y:t.humps=y})(eU)})(pb);var tU=pb.exports,nU=["class","style"];function rU(e){return e.split(";").map(function(t){return t.trim()}).filter(function(t){return t}).reduce(function(t,n){var r=n.indexOf(":"),a=tU.camelize(n.slice(0,r)),A=n.slice(r+1).trim();return t[a]=A,t},{})}function aU(e){return e.split(/\s+/).reduce(function(t,n){return t[n]=!0,t},{})}function mg(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(typeof e=="string")return e;var r=(e.children||[]).map(function(l){return mg(l)}),a=Object.keys(e.attributes||{}).reduce(function(l,c){var u=e.attributes[c];switch(c){case"class":l.class=aU(u);break;case"style":l.style=rU(u);break;default:l.attrs[c]=u}return l},{attrs:{},class:{},style:{}});n.class;var A=n.style,s=A===void 0?{}:A,o=YI(n,nU);return i.h(e.tag,qn(qn(qn({},t),{},{class:a.class,style:qn(qn({},a.style),s)},a.attrs),o),r)}var gb=!1;try{gb=process.env.NODE_ENV==="production"}catch{}function AU(){if(!gb&&console&&typeof console.error=="function"){var e;(e=console).error.apply(e,arguments)}}function zi(e,t){return Array.isArray(t)&&t.length>0||!Array.isArray(t)&&t?on({},e,t):{}}function sU(e){var t,n=(t={"fa-spin":e.spin,"fa-pulse":e.pulse,"fa-fw":e.fixedWidth,"fa-border":e.border,"fa-li":e.listItem,"fa-inverse":e.inverse,"fa-flip":e.flip===!0,"fa-flip-horizontal":e.flip==="horizontal"||e.flip==="both","fa-flip-vertical":e.flip==="vertical"||e.flip==="both"},on(t,"fa-".concat(e.size),e.size!==null),on(t,"fa-rotate-".concat(e.rotation),e.rotation!==null),on(t,"fa-pull-".concat(e.pull),e.pull!==null),on(t,"fa-swap-opacity",e.swapOpacity),on(t,"fa-bounce",e.bounce),on(t,"fa-shake",e.shake),on(t,"fa-beat",e.beat),on(t,"fa-fade",e.fade),on(t,"fa-beat-fade",e.beatFade),on(t,"fa-flash",e.flash),on(t,"fa-spin-pulse",e.spinPulse),on(t,"fa-spin-reverse",e.spinReverse),t);return Object.keys(n).map(function(r){return n[r]?r:null}).filter(function(r){return r})}function sv(e){if(e&&au(e)==="object"&&e.prefix&&e.iconName&&e.icon)return e;if(eu.icon)return eu.icon(e);if(e===null)return null;if(au(e)==="object"&&e.prefix&&e.iconName)return e;if(Array.isArray(e)&&e.length===2)return{prefix:e[0],iconName:e[1]};if(typeof e=="string")return{prefix:"fas",iconName:e}}var Ue=i.defineComponent({name:"FontAwesomeIcon",props:{border:{type:Boolean,default:!1},fixedWidth:{type:Boolean,default:!1},flip:{type:[Boolean,String],default:!1,validator:function(t){return[!0,!1,"horizontal","vertical","both"].indexOf(t)>-1}},icon:{type:[Object,Array,String],required:!0},mask:{type:[Object,Array,String],default:null},listItem:{type:Boolean,default:!1},pull:{type:String,default:null,validator:function(t){return["right","left"].indexOf(t)>-1}},pulse:{type:Boolean,default:!1},rotation:{type:[String,Number],default:null,validator:function(t){return[90,180,270].indexOf(Number.parseInt(t,10))>-1}},swapOpacity:{type:Boolean,default:!1},size:{type:String,default:null,validator:function(t){return["2xs","xs","sm","lg","xl","2xl","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"].indexOf(t)>-1}},spin:{type:Boolean,default:!1},transform:{type:[String,Object],default:null},symbol:{type:[Boolean,String],default:!1},title:{type:String,default:null},inverse:{type:Boolean,default:!1},bounce:{type:Boolean,default:!1},shake:{type:Boolean,default:!1},beat:{type:Boolean,default:!1},fade:{type:Boolean,default:!1},beatFade:{type:Boolean,default:!1},flash:{type:Boolean,default:!1},spinPulse:{type:Boolean,default:!1},spinReverse:{type:Boolean,default:!1}},setup:function(t,n){var r=n.attrs,a=i.computed(function(){return sv(t.icon)}),A=i.computed(function(){return zi("classes",sU(t))}),s=i.computed(function(){return zi("transform",typeof t.transform=="string"?eu.transform(t.transform):t.transform)}),o=i.computed(function(){return zi("mask",sv(t.mask))}),l=i.computed(function(){return h8(a.value,qn(qn(qn(qn({},A.value),s.value),o.value),{},{symbol:t.symbol,title:t.title}))});i.watch(l,function(u){if(!u)return AU("Could not find one or more icon(s)",a.value,o.value)},{immediate:!0});var c=i.computed(function(){return l.value?mg(l.value.abstract[0],{},r):null});return function(){return c.value}}});i.defineComponent({name:"FontAwesomeLayers",props:{fixedWidth:{type:Boolean,default:!1}},setup:function(t,n){var r=n.slots,a=Uw.familyPrefix,A=i.computed(function(){return["".concat(a,"-layers")].concat(Uh(t.fixedWidth?["".concat(a,"-fw")]:[]))});return function(){return i.h("div",{class:A.value},r.default?r.default():[])}}});i.defineComponent({name:"FontAwesomeLayersText",props:{value:{type:[String,Number],default:""},transform:{type:[String,Object],default:null},counter:{type:Boolean,default:!1},position:{type:String,default:null,validator:function(t){return["bottom-left","bottom-right","top-left","top-right"].indexOf(t)>-1}}},setup:function(t,n){var r=n.attrs,a=Uw.familyPrefix,A=i.computed(function(){return zi("classes",[].concat(Uh(t.counter?["".concat(a,"-layers-counter")]:[]),Uh(t.position?["".concat(a,"-layers-").concat(t.position)]:[])))}),s=i.computed(function(){return zi("transform",typeof t.transform=="string"?eu.transform(t.transform):t.transform)}),o=i.computed(function(){var c=p8(t.value.toString(),qn(qn({},s.value),A.value)),u=c.abstract;return t.counter&&(u[0].attributes.class=u[0].attributes.class.replace("fa-layers-text","")),u[0]}),l=i.computed(function(){return mg(o.value,{},r)});return function(){return l.value}}});const iU={class:"card-slice"},oU={key:0,class:"mana-hexagon"},lU={class:"mana-number"},cU={class:"card-name"},uU={key:1,class:"quantity"},dU={class:"quantity-background"},fU={class:"num-quantity"},hU={class:"plus-minus-content"},pU={class:"plus-minus-quantity"},gU=i.defineComponent({__name:"CardSliceItem",props:WI,emits:["update:card-quantity"],setup(e,{emit:t}){const n=e,r=Ro(n.cardProp,n.cardCodeProp,!1),a=i.ref(null),A=i.ref(null),s=i.ref(null),o=i.ref(null),l=i.computed(()=>{let d=n.color;return!d&&r.value&&(d=pA(r.value,null,!0)),d||(d="var(--color-background-2-rgb)"),{"--color":d}}),c=i.computed(()=>r.value?"https://lor.gg/storage/cards/slice/"+r.value.cardCode+"-slice.webp":""),u=i.computed(()=>{const d=["card-slice-wrapper"];return n.maintainAspectRatio&&d.push("maintain-aspect-ratio"),d});return i.onMounted(()=>{n.ignoreCardItem||At(a.value,{content:s.value,placement:"right",arrow:!0,touch:!1,duration:0,role:"card-image",onShown:d=>{const f=d.popper.innerHTML.includes("right")?"right-start":"left-start";o.value=f},onHidden:()=>{o.value=null}})}),(d,f)=>{const h=i.resolveComponent("RouterLink");return i.openBlock(),i.createBlock(h,{to:n.routerLink},{default:i.withCtx(()=>{var p,m;return[i.createElementVNode("div",{ref_key:"cardSlice",ref:a,class:i.normalizeClass(u.value)},[i.createElementVNode("div",iU,[i.createElementVNode("div",{class:"card-image",style:i.normalizeStyle({backgroundImage:`url(${c.value})`})},null,4),i.createElementVNode("div",{class:"region-gradient",style:i.normalizeStyle(l.value)},null,4),i.unref(r)||n.manaNumber!==void 0&&n.manaNumber!==null?(i.openBlock(),i.createElementBlock("div",oU,[i.createVNode(jo,{class:"hexagon-icon"}),i.createElementVNode("div",lU,i.toDisplayString(n.manaNumber??((p=i.unref(r))==null?void 0:p.cost)),1)])):i.createCommentVNode("",!0),i.createElementVNode("div",cU,i.toDisplayString(n.name??((m=i.unref(r))==null?void 0:m.name)),1),n.quantityNumber!==void 0&&n.quantityNumber!==null?(i.openBlock(),i.createElementBlock("div",uU,[i.createElementVNode("div",dU,[i.createElementVNode("p",fU,i.toDisplayString(n.quantityNumber),1)])])):i.createCommentVNode("",!0),n.showPlusMinus?(i.openBlock(),i.createElementBlock("div",{key:2,class:"plus-minus",onClick:f[2]||(f[2]=i.withModifiers(()=>{},["prevent"]))},[i.createElementVNode("div",hU,[i.createElementVNode("div",{class:"plus-minus-icon",onClick:f[0]||(f[0]=i.withModifiers(y=>{var g;return t("update:card-quantity",{cardCode:((g=i.unref(r))==null?void 0:g.cardCode)??"",quantity:-1})},["prevent"]))},[i.createVNode(i.unref(Ue),{icon:"minus",class:"icon"})]),i.createElementVNode("div",{class:"plus-minus-icon",onClick:f[1]||(f[1]=i.withModifiers(y=>{var g;return t("update:card-quantity",{cardCode:((g=i.unref(r))==null?void 0:g.cardCode)??"",quantity:1})},["prevent"]))},[i.createVNode(i.unref(Ue),{icon:"plus",class:"icon"})]),i.createElementVNode("div",pU,i.toDisplayString(n.quantityNumber),1)])])):i.createCommentVNode("",!0)])],2),i.createElementVNode("div",{ref_key:"cardItemWrapper",ref:s,class:"card-item-container"},[i.unref(r)&&!d.ignoreCardItem?(i.openBlock(),i.createBlock(Wa,{key:0,ref_key:"cardItem",ref:A,"is-root":!0,"card-prop":i.unref(r),"quantity-needed":n.quantityNumber,"show-tippy-location":o.value,class:"card-image-hover"},null,8,["card-prop","quantity-needed","show-tippy-location"])):i.createCommentVNode("",!0)],512)]}),_:1},8,["to"])}}});const fn=M(gU,[["__scopeId","data-v-a1e91ff3"]]);function cr(e){return[null,void 0].indexOf(e)!==-1}function mU(e,t,n){const{object:r,valueProp:a,mode:A}=i.toRefs(e),s=i.getCurrentInstance().proxy,o=n.iv,l=(d,f=!0)=>{o.value=u(d);const h=c(d);t.emit("change",h,s),f&&(t.emit("input",h),t.emit("update:modelValue",h))},c=d=>r.value||cr(d)?d:Array.isArray(d)?d.map(f=>f[a.value]):d[a.value],u=d=>cr(d)?A.value==="single"?{}:[]:d;return{update:l}}function vU(e,t){const{value:n,modelValue:r,mode:a,valueProp:A}=i.toRefs(e),s=i.ref(a.value!=="single"?[]:{}),o=r&&r.value!==void 0?r:n,l=i.computed(()=>a.value==="single"?s.value[A.value]:s.value.map(u=>u[A.value])),c=i.computed(()=>a.value!=="single"?s.value.map(u=>u[A.value]).join(","):s.value[A.value]);return{iv:s,internalValue:s,ev:o,externalValue:o,textValue:c,plainValue:l}}function BU(e,t,n){const{regex:r}=i.toRefs(e),a=i.getCurrentInstance().proxy,A=n.isOpen,s=n.open,o=i.ref(null),l=i.ref(null),c=()=>{o.value=""},u=h=>{o.value=h.target.value},d=h=>{if(r&&r.value){let p=r.value;typeof p=="string"&&(p=new RegExp(p)),h.key.match(p)||h.preventDefault()}},f=h=>{if(r&&r.value){let m=(h.clipboardData||window.clipboardData).getData("Text"),y=r.value;typeof y=="string"&&(y=new RegExp(y)),m.split("").every(g=>!!g.match(y))||h.preventDefault()}t.emit("paste",h,a)};return i.watch(o,h=>{!A.value&&h&&s(),t.emit("search-change",h,a)}),{search:o,input:l,clearSearch:c,handleSearchInput:u,handleKeypress:d,handlePaste:f}}function yU(e,t,n){const{groupSelect:r,mode:a,groups:A,disabledProp:s}=i.toRefs(e),o=i.ref(null),l=u=>{u===void 0||u!==null&&u[s.value]||A.value&&u&&u.group&&(a.value==="single"||!r.value)||(o.value=u)};return{pointer:o,setPointer:l,clearPointer:()=>{l(null)}}}function uf(e,t=!0){return t?String(e).toLowerCase().trim():String(e).toLowerCase().normalize("NFD").trim().replace(new RegExp(/æ/g),"ae").replace(new RegExp(/œ/g),"oe").replace(new RegExp(/ø/g),"o").replace(/\p{Diacritic}/gu,"")}function wU(e){return Object.prototype.toString.call(e)==="[object Object]"}function bU(e,t){const n=t.slice().sort();return e.length===t.length&&e.slice().sort().every(function(r,a){return r===n[a]})}function _U(e,t,n){const{options:r,mode:a,trackBy:A,limit:s,hideSelected:o,createTag:l,createOption:c,label:u,appendNewTag:d,appendNewOption:f,multipleLabel:h,object:p,loading:m,delay:y,resolveOnLoad:g,minChars:v,filterResults:_,clearOnSearch:B,clearOnSelect:b,valueProp:w,allowAbsent:C,groupLabel:k,canDeselect:S,max:T,strict:U,closeOnSelect:F,closeOnDeselect:Q,groups:Y,reverse:X,infinite:j,groupOptions:K,groupHideEmpty:oe,groupSelect:$,onCreate:ae,disabledProp:ce,searchStart:me,searchFilter:Ee}=i.toRefs(e),fe=i.getCurrentInstance().proxy,ne=n.iv,N=n.ev,te=n.search,Pe=n.clearSearch,ot=n.update,xt=n.pointer,vt=n.clearPointer,Qn=n.focus,x=n.deactivate,E=n.close,D=n.localize,W=i.ref([]),ie=i.ref([]),he=i.ref(!1),Ft=i.ref(null),ht=i.ref(j.value&&s.value===-1?10:s.value),Bn=i.computed(()=>l.value||c.value||!1),$e=i.computed(()=>d.value!==void 0?d.value:f.value!==void 0?f.value:!0),O=i.computed(()=>{if(Y.value){let I=et.value||[],G=[];return I.forEach(xe=>{Wd(xe[K.value]).forEach(Bt=>{G.push(Object.assign({},Bt,xe[ce.value]?{[ce.value]:!0}:{}))})}),G}else{let I=Wd(ie.value||[]);return W.value.length&&(I=I.concat(W.value)),I}}),P=i.computed(()=>{let I=O.value;return X.value&&(I=I.reverse()),la.value.length&&(I=la.value.concat(I)),$d(I)}),Ze=i.computed(()=>{let I=P.value;return ht.value>0&&(I=I.slice(0,ht.value)),I}),et=i.computed(()=>{if(!Y.value)return[];let I=[],G=ie.value||[];return W.value.length&&I.push({[k.value]:" ",[K.value]:[...W.value],__CREATE__:!0}),I.concat(G)}),Ar=i.computed(()=>{let I=[...et.value].map(G=>({...G}));return la.value.length&&(I[0]&&I[0].__CREATE__?I[0][K.value]=[...la.value,...I[0][K.value]]:I=[{[k.value]:" ",[K.value]:[...la.value],__CREATE__:!0}].concat(I)),I}),Tn=i.computed(()=>{if(!Y.value)return[];let I=Ar.value;return aE((I||[]).map((G,xe)=>{const Bt=Wd(G[K.value]);return{...G,index:xe,group:!0,[K.value]:$d(Bt,!1).map(ci=>Object.assign({},ci,G[ce.value]?{[ce.value]:!0}:{})),__VISIBLE__:$d(Bt).map(ci=>Object.assign({},ci,G[ce.value]?{[ce.value]:!0}:{}))}}))}),Dn=i.computed(()=>{switch(a.value){case"single":return!cr(ne.value[w.value]);case"multiple":case"tags":return!cr(ne.value)&&ne.value.length>0}}),zn=i.computed(()=>h!==void 0&&h.value!==void 0?h.value(ne.value,fe):ne.value&&ne.value.length>1?`${ne.value.length} options selected`:"1 option selected"),ii=i.computed(()=>!O.value.length&&!he.value&&!la.value.length),JA=i.computed(()=>O.value.length>0&&Ze.value.length==0&&(te.value&&Y.value||!Y.value)),la=i.computed(()=>Bn.value===!1||!te.value?[]:tE(te.value)!==-1?[]:[{[w.value]:te.value,[L.value]:te.value,[u.value]:te.value,__CREATE__:!0}]),L=i.computed(()=>A.value||u.value),re=i.computed(()=>{switch(a.value){case"single":return null;case"multiple":case"tags":return[]}}),ue=i.computed(()=>m.value||he.value),Se=I=>{switch(typeof I!="object"&&(I=Ir(I)),a.value){case"single":ot(I);break;case"multiple":case"tags":ot(ne.value.concat(I));break}t.emit("select",Dt(I),I,fe)},ye=I=>{switch(typeof I!="object"&&(I=Ir(I)),a.value){case"single":oi();break;case"tags":case"multiple":ot(Array.isArray(I)?ne.value.filter(G=>I.map(xe=>xe[w.value]).indexOf(G[w.value])===-1):ne.value.filter(G=>G[w.value]!=I[w.value]));break}t.emit("deselect",Dt(I),I,fe)},Dt=I=>p.value?I:I[w.value],Xt=I=>{ye(I)},ca=(I,G)=>{if(G.button!==0){G.preventDefault();return}Xt(I)},oi=()=>{t.emit("clear",fe),ot(re.value)},Pt=I=>{if(I.group!==void 0)return a.value==="single"?!1:eE(I[K.value])&&I[K.value].length;switch(a.value){case"single":return!cr(ne.value)&&ne.value[w.value]==I[w.value];case"tags":case"multiple":return!cr(ne.value)&&ne.value.map(G=>G[w.value]).indexOf(I[w.value])!==-1}},AA=I=>I[ce.value]===!0,ua=()=>T===void 0||T.value===-1||!Dn.value&&T.value>0?!1:ne.value.length>=T.value,da=I=>{if(!AA(I)){if(ae&&ae.value&&!Pt(I)&&I.__CREATE__&&(I={...I},delete I.__CREATE__,I=ae.value(I,fe),I instanceof Promise)){he.value=!0,I.then(G=>{he.value=!1,yl(G)});return}yl(I)}},yl=I=>{switch(I.__CREATE__&&(I={...I},delete I.__CREATE__),a.value){case"single":if(I&&Pt(I)){S.value&&ye(I),Q.value&&(vt(),E());return}I&&fa(I),b.value&&Pe(),F.value&&(vt(),E()),I&&Se(I);break;case"multiple":if(I&&Pt(I)){ye(I),Q.value&&(vt(),E());return}if(ua()){t.emit("max",fe);return}I&&(fa(I),Se(I)),b.value&&Pe(),o.value&&vt(),F.value&&E();break;case"tags":if(I&&Pt(I)){ye(I),Q.value&&(vt(),E());return}if(ua()){t.emit("max",fe);return}I&&fa(I),b.value&&Pe(),I&&Se(I),o.value&&vt(),F.value&&E();break}F.value||Qn()},li=I=>{if(!(AA(I)||a.value==="single"||!$.value)){switch(a.value){case"multiple":case"tags":Z3(I[K.value])?ye(I[K.value]):Se(I[K.value].filter(G=>ne.value.map(xe=>xe[w.value]).indexOf(G[w.value])===-1).filter(G=>!G[ce.value]).filter((G,xe)=>ne.value.length+1+xe<=T.value||T.value===-1));break}F.value&&x()}},fa=I=>{Ir(I[w.value])===void 0&&Bn.value&&(t.emit("tag",I[w.value],fe),t.emit("option",I[w.value],fe),t.emit("create",I[w.value],fe),$e.value&&rE(I),Pe())},J3=()=>{a.value!=="single"&&Se(Ze.value.filter(I=>!I.disabled&&!Pt(I)))},Z3=I=>I.find(G=>!Pt(G)&&!G[ce.value])===void 0,eE=I=>I.find(G=>!Pt(G))===void 0,Ir=I=>O.value[O.value.map(G=>String(G[w.value])).indexOf(String(I))],tE=(I,G=!0)=>O.value.map(xe=>parseInt(xe[L.value])==xe[L.value]?parseInt(xe[L.value]):xe[L.value]).indexOf(parseInt(I)==I?parseInt(I):I),nE=I=>["tags","multiple"].indexOf(a.value)!==-1&&o.value&&Pt(I),rE=I=>{W.value.push(I)},aE=I=>oe.value?I.filter(G=>te.value?G.__VISIBLE__.length:G[K.value].length):I.filter(G=>te.value?G.__VISIBLE__.length:!0),$d=(I,G=!0)=>{let xe=I;if(te.value&&_.value){let Bt=Ee.value;Bt||(Bt=(ci,Toe)=>{let k1=uf(D(ci[L.value]),U.value);return me.value?k1.startsWith(uf(te.value,U.value)):k1.indexOf(uf(te.value,U.value))!==-1}),xe=xe.filter(Bt)}return o.value&&G&&(xe=xe.filter(Bt=>!nE(Bt))),xe},Wd=I=>{let G=I;return wU(G)&&(G=Object.keys(G).map(xe=>{let Bt=G[xe];return{[w.value]:xe,[L.value]:Bt,[u.value]:Bt}})),G=G.map(xe=>typeof xe=="object"?xe:{[w.value]:xe,[L.value]:xe,[u.value]:xe}),G},wl=()=>{cr(N.value)||(ne.value=_l(N.value))},bl=I=>(he.value=!0,new Promise((G,xe)=>{r.value(te.value,fe).then(Bt=>{ie.value=Bt||[],typeof I=="function"&&I(Bt),he.value=!1}).catch(Bt=>{console.error(Bt),ie.value=[],he.value=!1}).finally(()=>{G()})})),Gd=()=>{if(Dn.value)if(a.value==="single"){let I=Ir(ne.value[w.value]);if(I!==void 0){let G=I[u.value];ne.value[u.value]=G,p.value&&(N.value[u.value]=G)}}else ne.value.forEach((I,G)=>{let xe=Ir(ne.value[G][w.value]);if(xe!==void 0){let Bt=xe[u.value];ne.value[G][u.value]=Bt,p.value&&(N.value[G][u.value]=Bt)}})},AE=I=>{bl(I)},_l=I=>cr(I)?a.value==="single"?{}:[]:p.value?I:a.value==="single"?Ir(I)||(C.value?{[u.value]:I,[w.value]:I,[L.value]:I}:{}):I.filter(G=>!!Ir(G)||C.value).map(G=>Ir(G)||{[u.value]:G,[w.value]:G,[L.value]:G}),E1=()=>{Ft.value=i.watch(te,I=>{I.length<v.value||!I&&v.value!==0||(he.value=!0,B.value&&(ie.value=[]),setTimeout(()=>{I==te.value&&r.value(te.value,fe).then(G=>{(I==te.value||!te.value)&&(ie.value=G,xt.value=Ze.value.filter(xe=>xe[ce.value]!==!0)[0]||null,he.value=!1)}).catch(G=>{console.error(G)})},y.value))},{flush:"sync"})};if(a.value!=="single"&&!cr(N.value)&&!Array.isArray(N.value))throw new Error(`v-model must be an array when using "${a.value}" mode`);return r&&typeof r.value=="function"?g.value?bl(wl):p.value==!0&&wl():(ie.value=r.value,wl()),y.value>-1&&E1(),i.watch(y,(I,G)=>{Ft.value&&Ft.value(),I>=0&&E1()}),i.watch(N,I=>{if(cr(I)){ot(_l(I),!1);return}switch(a.value){case"single":(p.value?I[w.value]!=ne.value[w.value]:I!=ne.value[w.value])&&ot(_l(I),!1);break;case"multiple":case"tags":bU(p.value?I.map(G=>G[w.value]):I,ne.value.map(G=>G[w.value]))||ot(_l(I),!1);break}},{deep:!0}),i.watch(r,(I,G)=>{typeof e.options=="function"?g.value&&(!G||I&&I.toString()!==G.toString())&&bl():(ie.value=e.options,Object.keys(ne.value).length||wl(),Gd())}),i.watch(u,Gd),{pfo:P,fo:Ze,filteredOptions:Ze,hasSelected:Dn,multipleLabelText:zn,eo:O,extendedOptions:O,eg:et,extendedGroups:et,fg:Tn,filteredGroups:Tn,noOptions:ii,noResults:JA,resolving:he,busy:ue,offset:ht,select:Se,deselect:ye,remove:Xt,selectAll:J3,clear:oi,isSelected:Pt,isDisabled:AA,isMax:ua,getOption:Ir,handleOptionClick:da,handleGroupClick:li,handleTagRemove:ca,refreshOptions:AE,resolveOptions:bl,refreshLabels:Gd}}function CU(e,t,n){const{valueProp:r,showOptions:a,searchable:A,groupLabel:s,groups:o,mode:l,groupSelect:c,disabledProp:u,groupOptions:d}=i.toRefs(e),f=n.fo,h=n.fg,p=n.handleOptionClick,m=n.handleGroupClick,y=n.search,g=n.pointer,v=n.setPointer,_=n.clearPointer,B=n.multiselect,b=n.isOpen,w=i.computed(()=>f.value.filter(N=>!N[u.value])),C=i.computed(()=>h.value.filter(N=>!N[u.value])),k=i.computed(()=>l.value!=="single"&&c.value),S=i.computed(()=>g.value&&g.value.group),T=i.computed(()=>fe(g.value)),U=i.computed(()=>{const N=S.value?g.value:fe(g.value),te=C.value.map(ot=>ot[s.value]).indexOf(N[s.value]);let Pe=C.value[te-1];return Pe===void 0&&(Pe=Q.value),Pe}),F=i.computed(()=>{let N=C.value.map(te=>te.label).indexOf(S.value?g.value[s.value]:fe(g.value)[s.value])+1;return C.value.length<=N&&(N=0),C.value[N]}),Q=i.computed(()=>[...C.value].slice(-1)[0]),Y=i.computed(()=>g.value.__VISIBLE__.filter(N=>!N[u.value])[0]),X=i.computed(()=>{const N=T.value.__VISIBLE__.filter(te=>!te[u.value]);return N[N.map(te=>te[r.value]).indexOf(g.value[r.value])-1]}),j=i.computed(()=>{const N=fe(g.value).__VISIBLE__.filter(te=>!te[u.value]);return N[N.map(te=>te[r.value]).indexOf(g.value[r.value])+1]}),K=i.computed(()=>[...U.value.__VISIBLE__.filter(N=>!N[u.value])].slice(-1)[0]),oe=i.computed(()=>[...Q.value.__VISIBLE__.filter(N=>!N[u.value])].slice(-1)[0]),$=N=>g.value&&(!N.group&&g.value[r.value]===N[r.value]||N.group!==void 0&&g.value[s.value]===N[s.value])?!0:void 0,ae=()=>{v(w.value[0]||null)},ce=()=>{!g.value||g.value[u.value]===!0||(S.value?m(g.value):p(g.value))},me=()=>{if(g.value===null)v((o.value&&k.value?C.value[0].__CREATE__?w.value[0]:C.value[0]:w.value[0])||null);else if(o.value&&k.value){let N=S.value?Y.value:j.value;N===void 0&&(N=F.value,N.__CREATE__&&(N=N[d.value][0])),v(N||null)}else{let N=w.value.map(te=>te[r.value]).indexOf(g.value[r.value])+1;w.value.length<=N&&(N=0),v(w.value[N]||null)}i.nextTick(()=>{ne()})},Ee=()=>{if(g.value===null){let N=w.value[w.value.length-1];o.value&&k.value&&(N=oe.value,N===void 0&&(N=Q.value)),v(N||null)}else if(o.value&&k.value){let N=S.value?K.value:X.value;N===void 0&&(N=S.value?U.value:T.value,N.__CREATE__&&(N=K.value,N===void 0&&(N=U.value))),v(N||null)}else{let N=w.value.map(te=>te[r.value]).indexOf(g.value[r.value])-1;N<0&&(N=w.value.length-1),v(w.value[N]||null)}i.nextTick(()=>{ne()})},fe=N=>C.value.find(te=>te.__VISIBLE__.map(Pe=>Pe[r.value]).indexOf(N[r.value])!==-1),ne=()=>{let N=B.value.querySelector("[data-pointed]");if(!N)return;let te=N.parentElement.parentElement;o.value&&(te=S.value?N.parentElement.parentElement.parentElement:N.parentElement.parentElement.parentElement.parentElement),N.offsetTop+N.offsetHeight>te.clientHeight+te.scrollTop&&(te.scrollTop=N.offsetTop+N.offsetHeight-te.clientHeight),N.offsetTop<te.scrollTop&&(te.scrollTop=N.offsetTop)};return i.watch(y,N=>{A.value&&(N.length&&a.value?ae():_())}),i.watch(b,N=>{if(N){let te=B.value.querySelectorAll("[data-selected]")[0];if(!te)return;let Pe=te.parentElement.parentElement;i.nextTick(()=>{Pe.scrollTop>0||(Pe.scrollTop=te.offsetTop)})}}),{pointer:g,canPointGroups:k,isPointed:$,setPointerFirst:ae,selectPointer:ce,forwardPointer:me,backwardPointer:Ee}}function EU(e,t,n){const{disabled:r}=i.toRefs(e),a=i.getCurrentInstance().proxy,A=i.ref(!1);return{isOpen:A,open:()=>{A.value||r.value||(A.value=!0,t.emit("open",a))},close:()=>{A.value&&(A.value=!1,t.emit("close",a))}}}function kU(e,t,n){const{searchable:r,disabled:a,clearOnBlur:A}=i.toRefs(e),s=n.input,o=n.open,l=n.close,c=n.clearSearch,u=n.isOpen,d=i.ref(null),f=i.ref(null),h=i.ref(null),p=i.ref(!1),m=i.ref(!1),y=i.computed(()=>r.value||a.value?-1:0),g=()=>{r.value&&s.value.blur(),f.value.blur()},v=()=>{r.value&&!a.value&&s.value.focus()},_=(S=!0)=>{a.value||(p.value=!0,S&&o())},B=()=>{p.value=!1,setTimeout(()=>{p.value||(l(),A.value&&c())},1)};return{multiselect:d,wrapper:f,tags:h,tabindex:y,isActive:p,mouseClicked:m,blur:g,focus:v,activate:_,deactivate:B,handleFocusIn:S=>{S.target.closest("[data-tags]")&&S.target.nodeName!=="INPUT"||S.target.closest("[data-clear]")||_(m.value)},handleFocusOut:()=>{B()},handleCaretClick:()=>{B(),g()},handleMousedown:S=>{m.value=!0,u.value&&(S.target.isEqualNode(f.value)||S.target.isEqualNode(h.value))?setTimeout(()=>{B()},0):document.activeElement.isEqualNode(f.value)&&!u.value&&_(),setTimeout(()=>{m.value=!1},0)}}}function SU(e,t,n){const{mode:r,addTagOn:a,openDirection:A,searchable:s,showOptions:o,valueProp:l,groups:c,addOptionOn:u,createTag:d,createOption:f,reverse:h}=i.toRefs(e),p=i.getCurrentInstance().proxy,m=n.iv,y=n.update,g=n.search,v=n.setPointer,_=n.selectPointer,B=n.backwardPointer,b=n.forwardPointer,w=n.multiselect,C=n.wrapper,k=n.tags,S=n.isOpen,T=n.open,U=n.blur,F=n.fo,Q=i.computed(()=>d.value||f.value||!1),Y=i.computed(()=>a.value!==void 0?a.value:u.value!==void 0?u.value:["enter"]),X=()=>{r.value==="tags"&&!o.value&&Q.value&&s.value&&!c.value&&v(F.value[F.value.map($=>$[l.value]).indexOf(g.value)])},j=$=>{let ae=$.length-1;for(;ae>=0&&($[ae].remove===!1||$[ae].disabled);)ae--;return ae<0||$.splice(ae,1),$};return{handleKeydown:$=>{t.emit("keydown",$,p);let ae,ce;switch(["ArrowLeft","ArrowRight","Enter"].indexOf($.key)!==-1&&r.value==="tags"&&(ae=[...w.value.querySelectorAll("[data-tags] > *")].filter(me=>me!==k.value),ce=ae.findIndex(me=>me===document.activeElement)),$.key){case"Backspace":if(r.value==="single"||s.value&&[null,""].indexOf(g.value)===-1||m.value.length===0)return;y(j([...m.value]));break;case"Enter":if($.preventDefault(),$.keyCode===229)return;if(ce!==-1&&ce!==void 0){y([...m.value].filter((me,Ee)=>Ee!==ce)),ce===ae.length-1&&(ae.length-1?ae[ae.length-2].focus():s.value?k.value.querySelector("input").focus():C.value.focus());return}if(Y.value.indexOf("enter")===-1&&Q.value)return;X(),_();break;case" ":if(!Q.value&&!s.value){$.preventDefault(),X(),_();return}if(!Q.value)return!1;if(Y.value.indexOf("space")===-1&&Q.value)return;$.preventDefault(),X(),_();break;case"Tab":case";":case",":if(Y.value.indexOf($.key.toLowerCase())===-1||!Q.value)return;X(),_(),$.preventDefault();break;case"Escape":U();break;case"ArrowUp":if($.preventDefault(),!o.value)return;S.value||T(),B();break;case"ArrowDown":if($.preventDefault(),!o.value)return;S.value||T(),b();break;case"ArrowLeft":if(s.value&&k.value&&k.value.querySelector("input").selectionStart||$.shiftKey||r.value!=="tags"||!m.value||!m.value.length)return;$.preventDefault(),ce===-1?ae[ae.length-1].focus():ce>0&&ae[ce-1].focus();break;case"ArrowRight":if(ce===-1||$.shiftKey||r.value!=="tags"||!m.value||!m.value.length)return;$.preventDefault(),ae.length>ce+1?ae[ce+1].focus():s.value?k.value.querySelector("input").focus():s.value||C.value.focus();break}},handleKeyup:$=>{t.emit("keyup",$,p)},preparePointer:X}}function xU(e,t,n){const{classes:r,disabled:a,openDirection:A,showOptions:s}=i.toRefs(e),o=n.isOpen,l=n.isPointed,c=n.isSelected,u=n.isDisabled,d=n.isActive,f=n.canPointGroups,h=n.resolving,p=n.fo,m=i.computed(()=>({container:"multiselect",containerDisabled:"is-disabled",containerOpen:"is-open",containerOpenTop:"is-open-top",containerActive:"is-active",wrapper:"multiselect-wrapper",singleLabel:"multiselect-single-label",singleLabelText:"multiselect-single-label-text",multipleLabel:"multiselect-multiple-label",search:"multiselect-search",tags:"multiselect-tags",tag:"multiselect-tag",tagDisabled:"is-disabled",tagRemove:"multiselect-tag-remove",tagRemoveIcon:"multiselect-tag-remove-icon",tagsSearchWrapper:"multiselect-tags-search-wrapper",tagsSearch:"multiselect-tags-search",tagsSearchCopy:"multiselect-tags-search-copy",placeholder:"multiselect-placeholder",caret:"multiselect-caret",caretOpen:"is-open",clear:"multiselect-clear",clearIcon:"multiselect-clear-icon",spinner:"multiselect-spinner",inifinite:"multiselect-inifite",inifiniteSpinner:"multiselect-inifite-spinner",dropdown:"multiselect-dropdown",dropdownTop:"is-top",dropdownHidden:"is-hidden",options:"multiselect-options",optionsTop:"is-top",group:"multiselect-group",groupLabel:"multiselect-group-label",groupLabelPointable:"is-pointable",groupLabelPointed:"is-pointed",groupLabelSelected:"is-selected",groupLabelDisabled:"is-disabled",groupLabelSelectedPointed:"is-selected is-pointed",groupLabelSelectedDisabled:"is-selected is-disabled",groupOptions:"multiselect-group-options",option:"multiselect-option",optionPointed:"is-pointed",optionSelected:"is-selected",optionDisabled:"is-disabled",optionSelectedPointed:"is-selected is-pointed",optionSelectedDisabled:"is-selected is-disabled",noOptions:"multiselect-no-options",noResults:"multiselect-no-results",fakeInput:"multiselect-fake-input",assist:"multiselect-assistive-text",spacer:"multiselect-spacer",...r.value})),y=i.computed(()=>!!(o.value&&s.value&&(!h.value||h.value&&p.value.length)));return{classList:i.computed(()=>{const v=m.value;return{container:[v.container].concat(a.value?v.containerDisabled:[]).concat(y.value&&A.value==="top"?v.containerOpenTop:[]).concat(y.value&&A.value!=="top"?v.containerOpen:[]).concat(d.value?v.containerActive:[]),wrapper:v.wrapper,spacer:v.spacer,singleLabel:v.singleLabel,singleLabelText:v.singleLabelText,multipleLabel:v.multipleLabel,search:v.search,tags:v.tags,tag:[v.tag].concat(a.value?v.tagDisabled:[]),tagDisabled:v.tagDisabled,tagRemove:v.tagRemove,tagRemoveIcon:v.tagRemoveIcon,tagsSearchWrapper:v.tagsSearchWrapper,tagsSearch:v.tagsSearch,tagsSearchCopy:v.tagsSearchCopy,placeholder:v.placeholder,caret:[v.caret].concat(o.value?v.caretOpen:[]),clear:v.clear,clearIcon:v.clearIcon,spinner:v.spinner,inifinite:v.inifinite,inifiniteSpinner:v.inifiniteSpinner,dropdown:[v.dropdown].concat(A.value==="top"?v.dropdownTop:[]).concat(!o.value||!s.value||!y.value?v.dropdownHidden:[]),options:[v.options].concat(A.value==="top"?v.optionsTop:[]),group:v.group,groupLabel:_=>{let B=[v.groupLabel];return l(_)?B.push(c(_)?v.groupLabelSelectedPointed:v.groupLabelPointed):c(_)&&f.value?B.push(u(_)?v.groupLabelSelectedDisabled:v.groupLabelSelected):u(_)&&B.push(v.groupLabelDisabled),f.value&&B.push(v.groupLabelPointable),B},groupOptions:v.groupOptions,option:(_,B)=>{let b=[v.option];return l(_)?b.push(c(_)?v.optionSelectedPointed:v.optionPointed):c(_)?b.push(u(_)?v.optionSelectedDisabled:v.optionSelected):(u(_)||B&&u(B))&&b.push(v.optionDisabled),b},noOptions:v.noOptions,noResults:v.noResults,assist:v.assist,fakeInput:v.fakeInput}}),showDropdown:y}}function FU(e,t,n){const{limit:r,infinite:a}=i.toRefs(e),A=n.isOpen,s=n.offset,o=n.search,l=n.pfo,c=n.eo,u=i.ref(null),d=i.ref(null),f=i.computed(()=>s.value<l.value.length),h=m=>{const{isIntersecting:y,target:g}=m[0];if(y){const v=g.offsetParent,_=v.scrollTop;s.value+=r.value==-1?10:r.value,i.nextTick(()=>{v.scrollTop=_})}},p=()=>{A.value&&s.value<l.value.length?u.value.observe(d.value):!A.value&&u.value&&u.value.disconnect()};return i.watch(A,()=>{a.value&&p()}),i.watch(o,()=>{a.value&&(s.value=r.value,p())},{flush:"post"}),i.watch(c,()=>{a.value&&p()},{immediate:!1,flush:"post"}),i.onMounted(()=>{window&&window.IntersectionObserver&&(u.value=new IntersectionObserver(h))}),{hasMore:f,infiniteLoader:d}}function IU(e,t,n){const{placeholder:r,id:a,valueProp:A,label:s,mode:o,groupLabel:l,aria:c,searchable:u}=i.toRefs(e),d=n.pointer,f=n.iv,h=n.hasSelected,p=n.multipleLabelText,m=i.ref(null),y=i.computed(()=>{let F=[];return a&&a.value&&F.push(a.value),F.push("assist"),F.join("-")}),g=i.computed(()=>{let F=[];return a&&a.value&&F.push(a.value),F.push("multiselect-options"),F.join("-")}),v=i.computed(()=>{let F=[];if(a&&a.value&&F.push(a.value),d.value)return F.push(d.value.group?"multiselect-group":"multiselect-option"),F.push(d.value.group?d.value.index:d.value[A.value]),F.join("-")}),_=i.computed(()=>r.value),B=i.computed(()=>o.value!=="single"),b=i.computed(()=>{let F="";return o.value==="single"&&h.value&&(F+=f.value[s.value]),o.value==="multiple"&&h.value&&(F+=p.value),o.value==="tags"&&h.value&&(F+=f.value.map(Q=>Q[s.value]).join(", ")),F}),w=i.computed(()=>{let F={...c.value};return u.value&&(F["aria-labelledby"]=F["aria-labelledby"]?`${y.value} ${F["aria-labelledby"]}`:y.value,b.value&&F["aria-label"]&&(F["aria-label"]=`${b.value}, ${F["aria-label"]}`)),F}),C=F=>{let Q=[];return a&&a.value&&Q.push(a.value),Q.push("multiselect-option"),Q.push(F[A.value]),Q.join("-")},k=F=>{let Q=[];return a&&a.value&&Q.push(a.value),Q.push("multiselect-group"),Q.push(F.index),Q.join("-")},S=F=>{let Q=[];return Q.push(F),Q.join(" ")},T=F=>{let Q=[];return Q.push(F),Q.join(" ")},U=F=>`${F} ❎`;return i.onMounted(()=>{if(a&&a.value&&document&&document.querySelector){let F=document.querySelector(`[for="${a.value}"]`);m.value=F?F.innerText:null}}),{arias:w,ariaLabel:b,ariaAssist:y,ariaControls:g,ariaPlaceholder:_,ariaMultiselectable:B,ariaActiveDescendant:v,ariaOptionId:C,ariaOptionLabel:S,ariaGroupId:k,ariaGroupLabel:T,ariaTagLabel:U}}function UU(e,t,n){const{locale:r,fallbackLocale:a}=i.toRefs(e);return{localize:s=>!s||typeof s!="object"?s:s&&s[r.value]?s[r.value]:s&&r.value&&s[r.value.toUpperCase()]?s[r.value.toUpperCase()]:s&&s[a.value]?s[a.value]:s&&a.value&&s[a.value.toUpperCase()]?s[a.value.toUpperCase()]:s&&Object.keys(s)[0]?s[Object.keys(s)[0]]:""}}function QU(e,t,n,r={}){return n.forEach(a=>{a&&(r={...r,...a(e,t,r)})}),r}var Vt={name:"Multiselect",emits:["paste","open","close","select","deselect","input","search-change","tag","option","update:modelValue","change","clear","keydown","keyup","max","create"],props:{value:{required:!1},modelValue:{required:!1},options:{type:[Array,Object,Function],required:!1,default:()=>[]},id:{type:[String,Number],required:!1},name:{type:[String,Number],required:!1,default:"multiselect"},disabled:{type:Boolean,required:!1,default:!1},label:{type:String,required:!1,default:"label"},trackBy:{type:String,required:!1,default:void 0},valueProp:{type:String,required:!1,default:"value"},placeholder:{type:String,required:!1,default:null},mode:{type:String,required:!1,default:"single"},searchable:{type:Boolean,required:!1,default:!1},limit:{type:Number,required:!1,default:-1},hideSelected:{type:Boolean,required:!1,default:!0},createTag:{type:Boolean,required:!1,default:void 0},createOption:{type:Boolean,required:!1,default:void 0},appendNewTag:{type:Boolean,required:!1,default:void 0},appendNewOption:{type:Boolean,required:!1,default:void 0},addTagOn:{type:Array,required:!1,default:void 0},addOptionOn:{type:Array,required:!1,default:void 0},caret:{type:Boolean,required:!1,default:!0},loading:{type:Boolean,required:!1,default:!1},noOptionsText:{type:[String,Object],required:!1,default:"The list is empty"},noResultsText:{type:[String,Object],required:!1,default:"No results found"},multipleLabel:{type:Function,required:!1},object:{type:Boolean,required:!1,default:!1},delay:{type:Number,required:!1,default:-1},minChars:{type:Number,required:!1,default:0},resolveOnLoad:{type:Boolean,required:!1,default:!0},filterResults:{type:Boolean,required:!1,default:!0},clearOnSearch:{type:Boolean,required:!1,default:!1},clearOnSelect:{type:Boolean,required:!1,default:!0},canDeselect:{type:Boolean,required:!1,default:!0},canClear:{type:Boolean,required:!1,default:!0},max:{type:Number,required:!1,default:-1},showOptions:{type:Boolean,required:!1,default:!0},required:{type:Boolean,required:!1,default:!1},openDirection:{type:String,required:!1,default:"bottom"},nativeSupport:{type:Boolean,required:!1,default:!1},classes:{type:Object,required:!1,default:()=>({})},strict:{type:Boolean,required:!1,default:!0},closeOnSelect:{type:Boolean,required:!1,default:!0},closeOnDeselect:{type:Boolean,required:!1,default:!1},autocomplete:{type:String,required:!1},groups:{type:Boolean,required:!1,default:!1},groupLabel:{type:String,required:!1,default:"label"},groupOptions:{type:String,required:!1,default:"options"},groupHideEmpty:{type:Boolean,required:!1,default:!1},groupSelect:{type:Boolean,required:!1,default:!0},inputType:{type:String,required:!1,default:"text"},attrs:{required:!1,type:Object,default:()=>({})},onCreate:{required:!1,type:Function},disabledProp:{type:String,required:!1,default:"disabled"},searchStart:{type:Boolean,required:!1,default:!1},reverse:{type:Boolean,required:!1,default:!1},regex:{type:[Object,String,RegExp],required:!1,default:void 0},rtl:{type:Boolean,required:!1,default:!1},infinite:{type:Boolean,required:!1,default:!1},aria:{required:!1,type:Object,default:()=>({})},clearOnBlur:{required:!1,type:Boolean,default:!0},locale:{required:!1,type:String,default:null},fallbackLocale:{required:!1,type:String,default:"en"},searchFilter:{required:!1,type:Function,default:null},allowAbsent:{required:!1,type:Boolean,default:!1}},setup(e,t){return QU(e,t,[UU,vU,yU,EU,BU,mU,kU,_U,FU,CU,SU,xU,IU])}};const TU=["id","dir"],DU=["tabindex","aria-controls","aria-placeholder","aria-expanded","aria-activedescendant","aria-multiselectable","role"],LU=["type","modelValue","value","autocomplete","id","aria-controls","aria-placeholder","aria-expanded","aria-activedescendant","aria-multiselectable"],OU=["onKeyup","aria-label"],MU=["onClick"],NU=["type","modelValue","value","id","autocomplete","aria-controls","aria-placeholder","aria-expanded","aria-activedescendant","aria-multiselectable"],PU=["innerHTML"],HU=["id"],RU=["id","aria-label","aria-selected"],VU=["data-pointed","onMouseenter","onClick"],KU=["innerHTML"],$U=["aria-label"],WU=["data-pointed","data-selected","onMouseenter","onClick","id","aria-selected","aria-label"],GU=["data-pointed","data-selected","onMouseenter","onClick","id","aria-selected","aria-label"],zU=["innerHTML"],jU=["innerHTML"],YU=["value"],qU=["name","value"],XU=["name","value"],JU=["id"];function ZU(e,t,n,r,a,A){return i.openBlock(),i.createElementBlock("div",{ref:"multiselect",class:i.normalizeClass(e.classList.container),id:n.searchable?void 0:n.id,dir:n.rtl?"rtl":void 0,onFocusin:t[10]||(t[10]=(...s)=>e.handleFocusIn&&e.handleFocusIn(...s)),onFocusout:t[11]||(t[11]=(...s)=>e.handleFocusOut&&e.handleFocusOut(...s)),onKeyup:t[12]||(t[12]=(...s)=>e.handleKeyup&&e.handleKeyup(...s)),onKeydown:t[13]||(t[13]=(...s)=>e.handleKeydown&&e.handleKeydown(...s))},[i.createElementVNode("div",i.mergeProps({class:e.classList.wrapper,onMousedown:t[9]||(t[9]=(...s)=>e.handleMousedown&&e.handleMousedown(...s)),ref:"wrapper",tabindex:e.tabindex,"aria-controls":n.searchable?void 0:e.ariaControls,"aria-placeholder":n.searchable?void 0:e.ariaPlaceholder,"aria-expanded":n.searchable?void 0:e.isOpen,"aria-activedescendant":n.searchable?void 0:e.ariaActiveDescendant,"aria-multiselectable":n.searchable?void 0:e.ariaMultiselectable,role:n.searchable?void 0:"combobox"},n.searchable?{}:e.arias),[i.createCommentVNode(" Search "),n.mode!=="tags"&&n.searchable&&!n.disabled?(i.openBlock(),i.createElementBlock("input",i.mergeProps({key:0,type:n.inputType,modelValue:e.search,value:e.search,class:e.classList.search,autocomplete:n.autocomplete,id:n.searchable?n.id:void 0,onInput:t[0]||(t[0]=(...s)=>e.handleSearchInput&&e.handleSearchInput(...s)),onKeypress:t[1]||(t[1]=(...s)=>e.handleKeypress&&e.handleKeypress(...s)),onPaste:t[2]||(t[2]=i.withModifiers((...s)=>e.handlePaste&&e.handlePaste(...s),["stop"])),ref:"input","aria-controls":e.ariaControls,"aria-placeholder":e.ariaPlaceholder,"aria-expanded":e.isOpen,"aria-activedescendant":e.ariaActiveDescendant,"aria-multiselectable":e.ariaMultiselectable,role:"combobox"},{...n.attrs,...e.arias}),null,16,LU)):i.createCommentVNode("v-if",!0),i.createCommentVNode(" Tags (with search) "),n.mode=="tags"?(i.openBlock(),i.createElementBlock("div",{key:1,class:i.normalizeClass(e.classList.tags),"data-tags":""},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.iv,(s,o,l)=>i.renderSlot(e.$slots,"tag",{option:s,handleTagRemove:e.handleTagRemove,disabled:n.disabled},()=>[(i.openBlock(),i.createElementBlock("span",{class:i.normalizeClass([e.classList.tag,s.disabled?e.classList.tagDisabled:null]),tabindex:"-1",onKeyup:i.withKeys(c=>e.handleTagRemove(s,c),["enter"]),key:l,"aria-label":e.ariaTagLabel(e.localize(s[n.label]))},[i.createTextVNode(i.toDisplayString(e.localize(s[n.label]))+" ",1),!n.disabled&&!s.disabled?(i.openBlock(),i.createElementBlock("span",{key:0,class:i.normalizeClass(e.classList.tagRemove),onClick:i.withModifiers(c=>e.handleTagRemove(s,c),["stop"])},[i.createElementVNode("span",{class:i.normalizeClass(e.classList.tagRemoveIcon)},null,2)],10,MU)):i.createCommentVNode("v-if",!0)],42,OU))])),256)),i.createElementVNode("div",{class:i.normalizeClass(e.classList.tagsSearchWrapper),ref:"tags"},[i.createCommentVNode(" Used for measuring search width "),i.createElementVNode("span",{class:i.normalizeClass(e.classList.tagsSearchCopy)},i.toDisplayString(e.search),3),i.createCommentVNode(" Actual search input "),n.searchable&&!n.disabled?(i.openBlock(),i.createElementBlock("input",i.mergeProps({key:0,type:n.inputType,modelValue:e.search,value:e.search,class:e.classList.tagsSearch,id:n.searchable?n.id:void 0,autocomplete:n.autocomplete,onInput:t[3]||(t[3]=(...s)=>e.handleSearchInput&&e.handleSearchInput(...s)),onKeypress:t[4]||(t[4]=(...s)=>e.handleKeypress&&e.handleKeypress(...s)),onPaste:t[5]||(t[5]=i.withModifiers((...s)=>e.handlePaste&&e.handlePaste(...s),["stop"])),ref:"input","aria-controls":e.ariaControls,"aria-placeholder":e.ariaPlaceholder,"aria-expanded":e.isOpen,"aria-activedescendant":e.ariaActiveDescendant,"aria-multiselectable":e.ariaMultiselectable,role:"combobox"},{...n.attrs,...e.arias}),null,16,NU)):i.createCommentVNode("v-if",!0)],2)],2)):i.createCommentVNode("v-if",!0),i.createCommentVNode(" Single label "),n.mode=="single"&&e.hasSelected&&!e.search&&e.iv?i.renderSlot(e.$slots,"singlelabel",{key:2,value:e.iv},()=>[i.createElementVNode("div",{class:i.normalizeClass(e.classList.singleLabel)},[i.createElementVNode("span",{class:i.normalizeClass(e.classList.singleLabelText)},i.toDisplayString(e.localize(e.iv[n.label])),3)],2)]):i.createCommentVNode("v-if",!0),i.createCommentVNode(" Multiple label "),n.mode=="multiple"&&e.hasSelected&&!e.search?i.renderSlot(e.$slots,"multiplelabel",{key:3,values:e.iv},()=>[i.createElementVNode("div",{class:i.normalizeClass(e.classList.multipleLabel),innerHTML:e.multipleLabelText},null,10,PU)]):i.createCommentVNode("v-if",!0),i.createCommentVNode(" Placeholder "),n.placeholder&&!e.hasSelected&&!e.search?i.renderSlot(e.$slots,"placeholder",{key:4},()=>[i.createElementVNode("div",{class:i.normalizeClass(e.classList.placeholder),"aria-hidden":"true"},i.toDisplayString(n.placeholder),3)]):i.createCommentVNode("v-if",!0),i.createCommentVNode(" Spinner "),n.loading||e.resolving?i.renderSlot(e.$slots,"spinner",{key:5},()=>[i.createElementVNode("span",{class:i.normalizeClass(e.classList.spinner),"aria-hidden":"true"},null,2)]):i.createCommentVNode("v-if",!0),i.createCommentVNode(" Clear "),e.hasSelected&&!n.disabled&&n.canClear&&!e.busy?i.renderSlot(e.$slots,"clear",{key:6,clear:e.clear},()=>[i.createElementVNode("span",{"aria-hidden":"true",tabindex:"0",role:"button","data-clear":"","aria-roledescription":"❎",class:i.normalizeClass(e.classList.clear),onClick:t[6]||(t[6]=(...s)=>e.clear&&e.clear(...s)),onKeyup:t[7]||(t[7]=i.withKeys((...s)=>e.clear&&e.clear(...s),["enter"]))},[i.createElementVNode("span",{class:i.normalizeClass(e.classList.clearIcon)},null,2)],34)]):i.createCommentVNode("v-if",!0),i.createCommentVNode(" Caret "),n.caret&&n.showOptions?i.renderSlot(e.$slots,"caret",{key:7},()=>[i.createElementVNode("span",{class:i.normalizeClass(e.classList.caret),onClick:t[8]||(t[8]=(...s)=>e.handleCaretClick&&e.handleCaretClick(...s)),"aria-hidden":"true"},null,2)]):i.createCommentVNode("v-if",!0)],16,DU),i.createCommentVNode(" Options "),i.createElementVNode("div",{class:i.normalizeClass(e.classList.dropdown),tabindex:"-1"},[i.renderSlot(e.$slots,"beforelist",{options:e.fo}),i.createElementVNode("ul",{class:i.normalizeClass(e.classList.options),id:e.ariaControls,role:"listbox"},[n.groups?(i.openBlock(!0),i.createElementBlock(i.Fragment,{key:0},i.renderList(e.fg,(s,o,l)=>(i.openBlock(),i.createElementBlock("li",{class:i.normalizeClass(e.classList.group),key:l,id:e.ariaGroupId(s),"aria-label":e.ariaGroupLabel(e.localize(s[n.groupLabel])),"aria-selected":e.isSelected(s),role:"option"},[s.__CREATE__?i.createCommentVNode("v-if",!0):(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(e.classList.groupLabel(s)),"data-pointed":e.isPointed(s),onMouseenter:c=>e.setPointer(s,o),onClick:c=>e.handleGroupClick(s)},[i.renderSlot(e.$slots,"grouplabel",{group:s,isSelected:e.isSelected,isPointed:e.isPointed},()=>[i.createElementVNode("span",{innerHTML:e.localize(s[n.groupLabel])},null,8,KU)])],42,VU)),i.createElementVNode("ul",{class:i.normalizeClass(e.classList.groupOptions),"aria-label":e.ariaGroupLabel(e.localize(s[n.groupLabel])),role:"group"},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(s.__VISIBLE__,(c,u,d)=>(i.openBlock(),i.createElementBlock("li",{class:i.normalizeClass(e.classList.option(c,s)),"data-pointed":e.isPointed(c),"data-selected":e.isSelected(c)||void 0,key:d,onMouseenter:f=>e.setPointer(c),onClick:f=>e.handleOptionClick(c),id:e.ariaOptionId(c),"aria-selected":e.isSelected(c),"aria-label":e.ariaOptionLabel(e.localize(c[n.label])),role:"option"},[i.renderSlot(e.$slots,"option",{option:c,isSelected:e.isSelected,isPointed:e.isPointed,search:e.search},()=>[i.createElementVNode("span",null,i.toDisplayString(e.localize(c[n.label])),1)])],42,WU))),128))],10,$U)],10,RU))),128)):(i.openBlock(!0),i.createElementBlock(i.Fragment,{key:1},i.renderList(e.fo,(s,o,l)=>(i.openBlock(),i.createElementBlock("li",{class:i.normalizeClass(e.classList.option(s)),"data-pointed":e.isPointed(s),"data-selected":e.isSelected(s)||void 0,key:l,onMouseenter:c=>e.setPointer(s),onClick:c=>e.handleOptionClick(s),id:e.ariaOptionId(s),"aria-selected":e.isSelected(s),"aria-label":e.ariaOptionLabel(e.localize(s[n.label])),role:"option"},[i.renderSlot(e.$slots,"option",{option:s,isSelected:e.isSelected,isPointed:e.isPointed,search:e.search},()=>[i.createElementVNode("span",null,i.toDisplayString(e.localize(s[n.label])),1)])],42,GU))),128))],10,HU),e.noOptions?i.renderSlot(e.$slots,"nooptions",{key:0},()=>[i.createElementVNode("div",{class:i.normalizeClass(e.classList.noOptions),innerHTML:e.localize(n.noOptionsText)},null,10,zU)]):i.createCommentVNode("v-if",!0),e.noResults?i.renderSlot(e.$slots,"noresults",{key:1},()=>[i.createElementVNode("div",{class:i.normalizeClass(e.classList.noResults),innerHTML:e.localize(n.noResultsText)},null,10,jU)]):i.createCommentVNode("v-if",!0),n.infinite&&e.hasMore?(i.openBlock(),i.createElementBlock("div",{key:2,class:i.normalizeClass(e.classList.inifinite),ref:"infiniteLoader"},[i.renderSlot(e.$slots,"infinite",{},()=>[i.createElementVNode("span",{class:i.normalizeClass(e.classList.inifiniteSpinner)},null,2)])],2)):i.createCommentVNode("v-if",!0),i.renderSlot(e.$slots,"afterlist",{options:e.fo})],2),i.createCommentVNode(" Hacky input element to show HTML5 required warning "),n.required?(i.openBlock(),i.createElementBlock("input",{key:0,class:i.normalizeClass(e.classList.fakeInput),tabindex:"-1",value:e.textValue,required:""},null,10,YU)):i.createCommentVNode("v-if",!0),i.createCommentVNode(" Native input support "),n.nativeSupport?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[n.mode=="single"?(i.openBlock(),i.createElementBlock("input",{key:0,type:"hidden",name:n.name,value:e.plainValue!==void 0?e.plainValue:""},null,8,qU)):(i.openBlock(!0),i.createElementBlock(i.Fragment,{key:1},i.renderList(e.plainValue,(s,o)=>(i.openBlock(),i.createElementBlock("input",{type:"hidden",name:`${n.name}[]`,value:s,key:o},null,8,XU))),128))],64)):i.createCommentVNode("v-if",!0),i.createCommentVNode(" Screen reader assistive text "),n.searchable&&e.hasSelected?(i.openBlock(),i.createElementBlock("div",{key:2,class:i.normalizeClass(e.classList.assist),id:e.ariaAssist,"aria-hidden":"true"},i.toDisplayString(e.ariaLabel),11,JU)):i.createCommentVNode("v-if",!0),i.createCommentVNode(" Create height for empty input "),i.createElementVNode("div",{class:i.normalizeClass(e.classList.spacer)},null,2)],42,TU)}Vt.render=ZU;Vt.__file="src/Multiselect.vue";const eQ={class:"search-bar"},tQ=i.defineComponent({__name:"SearchBar",props:hb,setup(e){const t=e,n=i.ref(""),r=us.useRouter();function a(s,o,l){l.clear(),l.search=n.value,r.push(o.link)}function A(s){n.value=s}return(s,o)=>(i.openBlock(),i.createElementBlock("div",eQ,[i.createVNode(i.unref(Vt),{placeholder:"Search Cards or Players","value-prop":"link","clear-on-blur":!1,"clear-on-search":!1,"clear-on-select":!1,"close-on-select":!0,delay:0,"filter-results":!1,groups:!0,"min-chars":0,"resolve-on-load":!1,searchable:!0,options:t.fetchSeachResult,onOpen:o[0]||(o[0]=l=>{l.noOptions&&l.resolveOptions()}),onSearchChange:A,onSelect:a},{option:i.withCtx(({option:l})=>[l.type==="card"?(i.openBlock(),i.createBlock(fn,{key:`card-${l.card.cardCode}`,class:"card-slice-item","maintain-aspect-ratio":!0,"card-prop":l.card,"router-link":l.link},null,8,["card-prop","router-link"])):(i.openBlock(),i.createBlock(fn,{key:`player-${l.link}`,class:"card-slice-item","maintain-aspect-ratio":!0,"ignore-card-item":!0,"card-code-prop":l.cardCode,color:l.color,name:l.name,"mana-number":l.rank,"router-link":l.link},null,8,["card-code-prop","color","name","mana-number","router-link"]))]),_:1},8,["options"])]))}});const Yu=M(tQ,[["__scopeId","data-v-ca4e3b0d"]]),nQ={class:"social-links"},rQ=i.defineComponent({__name:"SocialLinks",setup(e){return(t,n)=>(i.openBlock(),i.createElementBlock("div",nQ,[i.createVNode(i.unref(Ue),{class:"icon",icon:"fa-brands fa-discord"}),i.createVNode(i.unref(Ue),{class:"icon",icon:"fa-brands fa-twitter"})]))}});const vg=M(rQ,[["__scopeId","data-v-5517438c"]]),aQ={showModal:{type:Boolean,required:!0,default:!1}},AQ=["onClick"],sQ=i.defineComponent({__name:"ModalItem",props:aQ,emits:["update:showModal"],setup(e,{emit:t}){const n=e,r=i.ref(null);function a(){t("update:showModal",!1)}return i.onBeforeUnmount(()=>{var A;(A=r.value)==null||A.remove()}),i.watch(()=>n.showModal,()=>{n.showModal&&i.nextTick(()=>{r.value&&document.body.appendChild(r.value)})}),(A,s)=>n.showModal?(i.openBlock(),i.createElementBlock("div",{key:0,ref_key:"modalItem",ref:r,class:"modal-item",onClick:i.withModifiers(a,["self"])},[i.renderSlot(A.$slots,"default",{},void 0,!0)],8,AQ)):i.createCommentVNode("",!0)}});const VA=M(sQ,[["__scopeId","data-v-5e715d99"]]),iQ={filterArray:{type:Array,required:!1,default:void 0},title:{type:String,required:!1,default:void 0}},oQ={class:"filter"},lQ={key:0,class:"top"},cQ={key:0,class:"title"},uQ=i.defineComponent({__name:"SidePanelSectionPane",props:iQ,emits:["clear:filterArray"],setup(e,{emit:t}){const n=e,r=i.computed(()=>n.filterArray&&n.filterArray.length>0?"clickable":null);function a(){t("clear:filterArray")}return(A,s)=>{const o=i.resolveDirective("t");return i.openBlock(),i.createElementBlock("div",oQ,[n.title||A.filterArray?(i.openBlock(),i.createElementBlock("div",lQ,[n.title?(i.openBlock(),i.createElementBlock("h2",cQ,i.toDisplayString(n.title),1)):i.createCommentVNode("",!0),A.filterArray?i.withDirectives((i.openBlock(),i.createElementBlock("p",{key:1,class:i.normalizeClass(["clear",r.value]),onClick:a},null,2)),[[o,"general.clear"]]):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0),i.renderSlot(A.$slots,"default",{},void 0,!0)])}}});const mt=M(uQ,[["__scopeId","data-v-741cceed"]]),dQ={filterArray:{type:Array,required:!0,default:[]}},fQ=["placeholder"],hQ=i.defineComponent({__name:"FilterSampleSize",props:dQ,emits:["update:filterArray"],setup(e,{emit:t}){const n=e,{t:r}=se(),a=i.ref(n.filterArray),A=i.ref("");let s=setTimeout(()=>{},0);a.value.length>0&&(A.value=a.value[0]),i.watch(a,()=>{t("update:filterArray",a.value)}),i.watch(A,()=>{s&&clearTimeout(s),s=setTimeout(()=>{a.value.splice(0),A.value&&a.value.push(A.value)},1e3)});function o(){a.value.splice(0),A.value=""}return(l,c)=>(i.openBlock(),i.createBlock(mt,{"filter-array":a.value,title:i.unref(r)("general.sampleSize"),"onClear:filterArray":o},{default:i.withCtx(()=>[i.withDirectives(i.createElementVNode("input",{"onUpdate:modelValue":c[0]||(c[0]=u=>A.value=u),placeholder:i.unref(r)("general.minimumMatches"),type:"number",min:"10",step:"10"},null,8,fQ),[[i.vModelText,A.value]])]),_:1},8,["filter-array","title"]))}});const Xs=M(hQ,[["__scopeId","data-v-d66d5f9d"]]),pQ={filterArray:{type:Array,required:!0,default:[]}},gQ={isSelected:{type:Boolean,required:!0,default:!1},icon:{type:String,required:!1,default:void 0},prompt:{type:String,required:!0,default:""}},mQ=["selected"],vQ={class:"checkbox-name"},BQ=i.defineComponent({__name:"CheckboxItem",props:gQ,emits:["update:isSelected"],setup(e,{emit:t}){const n=e,r=i.computed(()=>(console.log(n.icon),{content:n.icon}));function a(){t("update:isSelected",!n.isSelected)}return(A,s)=>(i.openBlock(),i.createElementBlock("button",{class:"checkbox-item",selected:n.isSelected,onClick:a},[n.icon?(i.openBlock(),i.createElementBlock("div",{key:0,class:"checkbox-icon",style:i.normalizeStyle(r.value)},null,4)):i.createCommentVNode("",!0),i.createElementVNode("div",vQ,i.toDisplayString(n.prompt),1)],8,mQ))}});const tn=M(BQ,[["__scopeId","data-v-a4c6109c"]]),yQ={selectedOption:{type:Number,required:!0,default:-1},options:{type:Array,required:!0,default:[]}},wQ=e=>(i.pushScopeId("data-v-d5d9745a"),e=e(),i.popScopeId(),e),bQ={class:"toggle-switch"},_Q=wQ(()=>i.createElementVNode("div",{class:"selection"},null,-1)),CQ=[_Q],EQ=["onClick"],kQ={class:"option flex-center"},SQ={class:"option-text"},xQ=i.defineComponent({__name:"ToggleSwitch",props:yQ,emits:["update:selectedOption"],setup(e,{emit:t}){const n=e,r=i.computed(()=>({left:`calc(var(--spacing-1) + (100% - calc(var(--spacing-1) * 2)) / ${n.options.length} * ${n.selectedOption})`,width:`calc((100% - calc(var(--spacing-1) * 2)) / ${n.options.length})`}));function a(s){return{cursor:n.selectedOption!=s?"pointer":"default",left:`calc(var(--spacing-1) + (100% - calc(var(--spacing-1) * 2)) / ${n.options.length} * ${s})`,width:`${1/n.options.length*100}%`}}function A(s){t("update:selectedOption",s)}return(s,o)=>(i.openBlock(),i.createElementBlock("div",bQ,[i.withDirectives(i.createElementVNode("div",{class:"selection-container",style:i.normalizeStyle(r.value)},CQ,4),[[i.vShow,s.selectedOption>-1]]),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.options,(l,c)=>(i.openBlock(),i.createElementBlock("div",{key:c,ref_for:!0,ref:"option-container",style:i.normalizeStyle(a(c)),class:"option-container",onClick:u=>A(c)},[i.createElementVNode("div",kQ,[i.createElementVNode("h1",SQ,i.toDisplayString(l),1)])],12,EQ))),128))]))}});const qu=M(xQ,[["__scopeId","data-v-d5d9745a"]]),FQ={class:"checkboxes-container"},IQ=i.defineComponent({__name:"FilterRanks",props:pQ,emits:["update:filterArray"],setup(e,{emit:t}){const n=e,{t:r}=se(),a=i.computed(()=>we().dataJson.ranks.sort((c,u)=>u.order-c.order)),A=i.reactive(n.filterArray),s=i.ref(0);i.watch(A,()=>{t("update:filterArray",A)}),i.watch(s,()=>{s.value===0?A.splice(0):s.value===1&&(A.splice(0),A.push("Platinum","Diamond","Masters"))});function o(){A.splice(0),s.value=0}function l(c){const u=A.indexOf(c);if(u===-1){A.push(c);return}A.splice(u,1)}return(c,u)=>(i.openBlock(),i.createBlock(mt,{"filter-array":A,title:i.unref(r)("general.ranks"),"onClear:filterArray":o},{default:i.withCtx(()=>[i.createElementVNode("div",FQ,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.value,d=>(i.openBlock(),i.createBlock(tn,{key:d.nameRef,icon:`url(${d.icon})`,prompt:d.name,"is-selected":A.includes(d.nameRef),"onUpdate:isSelected":f=>l(d.nameRef)},null,8,["icon","prompt","is-selected","onUpdate:isSelected"]))),128)),i.createVNode(qu,{"selected-option":s.value,"onUpdate:selectedOption":u[0]||(u[0]=d=>s.value=d),options:[i.unref(r)("general.allRanks"),i.unref(r)("general.platPlus")]},null,8,["selected-option","options"])])]),_:1},8,["filter-array","title"]))}});const mb=M(IQ,[["__scopeId","data-v-af7bc2a0"]]),UQ={filterArray:{type:Array,required:!0,default:[]}},QQ={isSelected:{type:Boolean,required:!0,default:!1},prompt:{type:Number,required:!0,default:""}},TQ=["selected"],DQ={class:"prompt"},LQ=i.defineComponent({__name:"CheckboxItemManaCost",props:QQ,emits:["update:isSelected"],setup(e,{emit:t}){const n=e;function r(){t("update:isSelected",!n.isSelected)}return(a,A)=>(i.openBlock(),i.createElementBlock("button",{class:"checkbox-item",selected:n.isSelected,onClick:r},[i.createVNode(jo),i.createElementVNode("div",DQ,i.toDisplayString(n.prompt===10?"+":n.prompt),1)],8,TQ))}});const Au=M(LQ,[["__scopeId","data-v-2c74c2ed"]]),OQ={class:"checkbox-rows-container"},MQ={class:"top-row checkbox-items-container"},NQ={class:"bottom-row checkbox-items-container"},PQ=i.defineComponent({__name:"FilterManaCost",props:UQ,emits:["update:filterArray"],setup(e,{emit:t}){const n=e,{t:r}=se(),a=Array(6).fill(1).map((l,c)=>c),A=Array(5).fill(1).map((l,c)=>c+6);function s(l){let c;n.filterArray.includes(l)?c=n.filterArray.filter(u=>u!==l):c=[...n.filterArray,l],t("update:filterArray",c)}function o(){t("update:filterArray",[])}return(l,c)=>(i.openBlock(),i.createBlock(mt,{"filter-array":n.filterArray,title:i.unref(r)("general.manaCost"),"onClear:filterArray":o},{default:i.withCtx(()=>[i.createElementVNode("div",OQ,[i.createElementVNode("div",MQ,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(a),u=>(i.openBlock(),i.createBlock(Au,{key:u,class:"checkbox-item-mana-cost",prompt:u,"is-selected":n.filterArray.includes(u),"onUpdate:isSelected":d=>s(u)},null,8,["prompt","is-selected","onUpdate:isSelected"]))),128))]),i.createElementVNode("div",NQ,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(A),u=>(i.openBlock(),i.createBlock(Au,{key:u,class:"checkbox-item-mana-cost",prompt:u,"is-selected":n.filterArray.includes(u),"onUpdate:isSelected":d=>s(u)},null,8,["prompt","is-selected","onUpdate:isSelected"]))),128))])])]),_:1},8,["filter-array","title"]))}});const Bg=M(PQ,[["__scopeId","data-v-a94d786a"]]),HQ={filterArray:{type:Array,required:!0,default:[]}},RQ={class:"checkboxes-container"},yg=i.defineComponent({__name:"FilterRarities",props:HQ,emits:["update:filterArray"],setup(e,{emit:t}){const n=e,{t:r}=se(),a=i.computed(()=>we().dataJson.rarities.filter(l=>l.nameRef!=="None")),A=i.reactive(n.filterArray);i.watch(A,()=>{t("update:filterArray",A)});function s(){A.splice(0)}function o(l){const c=A.indexOf(l);if(c===-1){A.push(l);return}A.splice(c,1)}return(l,c)=>(i.openBlock(),i.createBlock(mt,{"filter-array":A,title:i.unref(r)("general.rarities"),"onClear:filterArray":s},{default:i.withCtx(()=>[i.createElementVNode("div",RQ,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.value,u=>(i.openBlock(),i.createBlock(tn,{key:u.nameRef,icon:`url(${u.icon})`,prompt:u.name,"is-selected":A.includes(u.nameRef),"onUpdate:isSelected":d=>o(u.nameRef)},null,8,["icon","prompt","is-selected","onUpdate:isSelected"]))),128))])]),_:1},8,["filter-array","title"]))}}),VQ={filterArray:{type:Array,required:!0,default:[]}},KQ={class:"multiselect-tag",tabindex:"-1","aria-label":"{{option.name}} ❎"},$Q=["src"],WQ={class:"multiselect-tag-remove"},GQ=["onMousedown"],zQ=["src"],wg=i.defineComponent({__name:"FilterSets",props:VQ,emits:["update:filterArray"],setup(e,{emit:t}){const n=e,{t:r}=se(),a=i.ref(n.filterArray);i.watch(a,()=>{t("update:filterArray",a.value)});function A(){a.value.splice(0)}return(s,o)=>(i.openBlock(),i.createBlock(mt,{"filter-array":a.value,title:i.unref(r)("general.sets"),"onClear:filterArray":A},{default:i.withCtx(()=>[i.createVNode(i.unref(Vt),{modelValue:a.value,"onUpdate:modelValue":o[0]||(o[0]=l=>a.value=l),placeholder:i.unref(r)("general.sets"),class:"runeterra-select",mode:"tags",options:i.unref(we)().dataJson.sets,searchable:!0,label:"name","value-prop":"nameRef"},{tag:i.withCtx(({option:l,handleTagRemove:c})=>[i.createElementVNode("span",KQ,[i.createElementVNode("img",{class:"label-icon",src:l.icon},null,8,$Q),i.createElementVNode("span",WQ,[i.createElementVNode("span",{class:"multiselect-tag-remove-icon",onMousedown:i.withModifiers(u=>c(l,u),["prevent"])},null,40,GQ)])])]),option:i.withCtx(({option:l})=>[i.createElementVNode("img",{class:"label-icon",src:l.icon},null,8,zQ),i.createTextVNode(" "+i.toDisplayString(l.name),1)]),_:1},8,["modelValue","placeholder","options"])]),_:1},8,["filter-array","title"]))}}),jQ={filterArray:{type:Array,required:!0,default:[]}},YQ={class:"multiselect-tag",tabindex:"-1","aria-label":"{{option.name}} ❎"},qQ=["src"],XQ={class:"multiselect-tag-remove"},JQ=["onMousedown"],ZQ=["src"],bg=i.defineComponent({__name:"FilterKeywords",props:jQ,emits:["update:filterArray"],setup(e,{emit:t}){const n=e,{t:r}=se(),a=i.ref(n.filterArray),A=i.computed(()=>we().dataJson.keywords.filter(o=>o.showInFilter));i.watch(a,()=>{t("update:filterArray",a.value)});function s(){a.value.splice(0)}return(o,l)=>(i.openBlock(),i.createBlock(mt,{"filter-array":a.value,title:i.unref(r)("general.keywords"),"onClear:filterArray":s},{default:i.withCtx(()=>[i.createVNode(i.unref(Vt),{modelValue:a.value,"onUpdate:modelValue":l[0]||(l[0]=c=>a.value=c),placeholder:i.unref(r)("general.keywords"),class:"runeterra-select",mode:"tags",options:A.value,searchable:!0,label:"name","value-prop":"nameRef"},{tag:i.withCtx(({option:c,handleTagRemove:u})=>[i.createElementVNode("span",YQ,[i.createElementVNode("img",{class:"label-icon",src:c.icon},null,8,qQ),i.createElementVNode("span",XQ,[i.createElementVNode("span",{class:"multiselect-tag-remove-icon",onMousedown:i.withModifiers(d=>u(c,d),["prevent"])},null,40,JQ)])])]),option:i.withCtx(({option:c})=>[i.createElementVNode("img",{class:"label-icon",src:c.icon},null,8,ZQ),i.createTextVNode(" "+i.toDisplayString(c.name),1)]),_:1},8,["modelValue","placeholder","options"])]),_:1},8,["filter-array","title"]))}}),eT={filterArray:{type:Array,required:!0,default:[]}},tT={class:"checkboxes-container"},Js=i.defineComponent({__name:"FilterServers",props:eT,emits:["update:filterArray"],setup(e,{emit:t}){const n=e,{t:r}=se(),a=i.reactive(n.filterArray);i.watch(a,()=>{t("update:filterArray",a)});function A(){a.splice(0)}function s(o){const l=a.indexOf(o);if(l===-1){a.push(o);return}a.splice(l,1)}return(o,l)=>(i.openBlock(),i.createBlock(mt,{"filter-array":a,title:i.unref(r)("general.servers"),"onClear:filterArray":A},{default:i.withCtx(()=>[i.createElementVNode("div",tT,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(we)().dataJson.servers,c=>(i.openBlock(),i.createBlock(tn,{key:c.nameRef,prompt:c.name,"is-selected":a.includes(c.nameRef),"onUpdate:isSelected":u=>s(c.nameRef)},null,8,["prompt","is-selected","onUpdate:isSelected"]))),128))])]),_:1},8,["filter-array","title"]))}}),nT={filterArray:{type:Array,required:!0,default:[]},allowZero:{type:Boolean,required:!1,default:!1}},rT={class:"checkboxes-container"},aT=i.defineComponent({__name:"FilterTime",props:nT,emits:["update:filterArray"],setup(e,{emit:t}){const n=e,{t:r}=se(),a=i.reactive(n.filterArray),A=i.ref(null),s=i.ref(null),o=a.find(h=>h.startsWith("patch_"));o&&(A.value=o);const l=a.find(h=>h.startsWith("season_"));l&&(s.value=l);const c=i.computed(()=>n.allowZero&&a.filter(h=>h.startsWith("patch")).length>0||!n.allowZero&&a.filter(h=>!h.startsWith("patch")).length===0);i.watch(a,()=>{t("update:filterArray",a)}),i.watch(A,(h,p)=>{u(h,p)}),i.watch(s,(h,p)=>{u(h,p)});function u(h,p){console.log(p,h),p&&a.splice(a.indexOf(p),1),h&&a.push(h),console.log(a)}function d(){a.splice(0),A.value=null,s.value=null}function f(h){a.splice(0),(n.allowZero||h!=="patch")&&a.push(h),h==="patch"&&A.value&&a.push(A.value),h==="season"&&s.value&&a.push(s.value)}return(h,p)=>(i.openBlock(),i.createBlock(mt,{"filter-array":a,title:i.unref(r)("general.time"),"onClear:filterArray":d},{default:i.withCtx(()=>[i.createElementVNode("div",rT,[i.createVNode(tn,{prompt:i.unref(r)("general.patch"),"is-selected":c.value,"onUpdate:isSelected":p[0]||(p[0]=m=>f("patch"))},null,8,["prompt","is-selected"]),i.createVNode(tn,{prompt:i.unref(r)("general.season"),"is-selected":a.includes("season"),"onUpdate:isSelected":p[1]||(p[1]=m=>f("season"))},null,8,["prompt","is-selected"]),i.createVNode(tn,{prompt:i.unref(r)("general.pastDays",7),"is-selected":a.includes("past7days"),"onUpdate:isSelected":p[2]||(p[2]=m=>f("past7days"))},null,8,["prompt","is-selected"]),i.createVNode(tn,{prompt:i.unref(r)("general.pastDays",3),"is-selected":a.includes("past3days"),"onUpdate:isSelected":p[3]||(p[3]=m=>f("past3days"))},null,8,["prompt","is-selected"]),i.createVNode(tn,{prompt:i.unref(r)("general.pastHours",24),"is-selected":a.includes("past24hours"),"onUpdate:isSelected":p[4]||(p[4]=m=>f("past24hours"))},null,8,["prompt","is-selected"]),i.createVNode(tn,{prompt:i.unref(r)("general.pastHour"),"is-selected":a.includes("pastHour"),"onUpdate:isSelected":p[5]||(p[5]=m=>f("pastHour"))},null,8,["prompt","is-selected"]),c.value?(i.openBlock(),i.createBlock(i.unref(Vt),{key:0,modelValue:A.value,"onUpdate:modelValue":p[6]||(p[6]=m=>A.value=m),options:i.unref(we)().dataJson.patches,searchable:!0,label:"name","value-prop":"nameRef"},null,8,["modelValue","options"])):i.createCommentVNode("",!0),a.includes("season")?(i.openBlock(),i.createBlock(i.unref(Vt),{key:1,modelValue:s.value,"onUpdate:modelValue":p[7]||(p[7]=m=>s.value=m),options:i.unref(we)().dataJson.seasons,searchable:!0,label:"name","value-prop":"nameRef"},null,8,["modelValue","options"])):i.createCommentVNode("",!0)])]),_:1},8,["filter-array","title"]))}});const KA=M(aT,[["__scopeId","data-v-78ab671a"]]),AT={filterArray:{type:Array,required:!0,default:[]}},sT={cardCodes:{type:Array,required:!0,default:[]},filterCallback:{type:Function,required:!1,default:()=>!0},mode:{type:String,required:!1,default:"tags"}},iT=i.defineComponent({__name:"CardMultiselect",props:sT,emits:["update:cardCodes"],setup(e,{emit:t}){const n=e,{t:r}=se(),a=i.ref(n.cardCodes),A=i.computed(()=>{let s=Qw().cardJson.sort((o,l)=>o.name.localeCompare(l.name));return n.filterCallback&&(s=s.filter(n.filterCallback)),s});return i.watch(a,()=>{t("update:cardCodes",a.value)}),(s,o)=>(i.openBlock(),i.createBlock(i.unref(Vt),{modelValue:a.value,"onUpdate:modelValue":o[0]||(o[0]=l=>a.value=l),class:"multiselect",placeholder:i.unref(r)("cards.cards"),mode:n.mode,options:A.value,infinite:!0,limit:10,searchable:!0,label:"name","value-prop":"cardCode"},null,8,["modelValue","placeholder","mode","options"]))}});const _g=M(iT,[["__scopeId","data-v-968634df"]]),Xu=i.defineComponent({__name:"FilterCardCodes",props:AT,emits:["update:filterArray"],setup(e,{emit:t}){const n=e,{t:r}=se(),a=i.ref(n.filterArray);i.watch(a,()=>{console.log("watch(filterArray)",a.value),t("update:filterArray",a.value)});function A(){a.value.splice(0)}function s(o){return o.collectible}return(o,l)=>(i.openBlock(),i.createBlock(mt,{"filter-array":a.value,title:i.unref(r)("cards.cards"),"onClear:filterArray":A},{default:i.withCtx(()=>[i.createVNode(_g,{cardCodes:a.value,"onUpdate:cardCodes":l[0]||(l[0]=c=>a.value=c),mode:"tags","filter-callback":s},null,8,["cardCodes"])]),_:1},8,["filter-array","title"]))}}),oT={filterArray:{type:Array,required:!0,default:[]}},lT={class:"checkboxes-container"},cT=i.defineComponent({__name:"FilterRegions",props:oT,emits:["update:filterArray"],setup(e,{emit:t}){const n=e,{t:r}=se(),a=i.reactive(n.filterArray),A=i.ref([]);A.value.push(...a.filter(l=>uo(l))),i.watch(a,()=>{t("update:filterArray",a)}),i.watch(A,(l,c)=>{let u=l.find(d=>!c.includes(d));if(u||(u=c.find(d=>!l.includes(d)),u))return o(u)});function s(){a.splice(0),A.value.slice(0)}function o(l){const c=a.indexOf(l);if(c===-1){a.push(l),l==="Runeterra"&&a.push(...A.value);return}if(a.splice(c,1),l==="Runeterra")for(let u=0;u<a.length;u++)uo(a[u])&&a.splice(u--,1)}return(l,c)=>(i.openBlock(),i.createBlock(mt,{"filter-array":a,title:i.unref(r)("general.regions"),"onClear:filterArray":s},{default:i.withCtx(()=>[i.createElementVNode("div",lT,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(we)().dataJson.regions,u=>(i.openBlock(),i.createBlock(tn,{key:u.nameRef,icon:`url(${u.icon})`,prompt:u.name,"is-selected":a.includes(u.nameRef),"onUpdate:isSelected":d=>o(u.nameRef)},null,8,["icon","prompt","is-selected","onUpdate:isSelected"]))),128)),i.createVNode(tn,{class:"runeterra",prompt:"Runeterra","is-selected":a.includes("Runeterra"),"onUpdate:isSelected":c[0]||(c[0]=u=>o("Runeterra"))},null,8,["is-selected"]),a.includes("Runeterra")?(i.openBlock(),i.createBlock(i.unref(Vt),{key:0,modelValue:A.value,"onUpdate:modelValue":c[1]||(c[1]=u=>A.value=u),class:"runeterra-select",mode:"tags",options:i.unref(we)().dataJson.runeterraChampions,searchable:!0,label:"name","value-prop":"nameRef"},null,8,["modelValue","options"])):i.createCommentVNode("",!0)])]),_:1},8,["filter-array","title"]))}});const Yo=M(cT,[["__scopeId","data-v-c93a9e90"]]),uT={filters:{type:Object,required:!0,default:{cardFilters:[],regionFilters:[],sampleSizeFilters:[],serverFilters:[],timeFilters:[],formatFilters:[],queueFilters:[]}},includeDataFilters:{type:Boolean,required:!1,default:!0}},dT={filterArray:{type:Array,required:!0,default:[]},allowZero:{type:Boolean,required:!1,default:!1}},fT={class:"checkboxes-container"},hT=i.defineComponent({__name:"FilterFormat",props:dT,emits:["update:filterArray"],setup(e,{emit:t}){const n=e,{t:r}=se(),a=i.computed(()=>{const d=we().dataJson.queues;return Object.values(we().dataJson.formats).filter(f=>f.availableQueues.some(h=>!d[h].excludeInMassFilter))}),A=i.computed(()=>a.value.filter(d=>!d.inDropdown)),s=i.computed(()=>a.value.filter(d=>d.inDropdown)),o=i.reactive(n.filterArray),l=i.ref(null);i.onMounted(()=>{o.length>0&&s.value.map(d=>d.nameRef).includes(o[0])&&(l.value=o[0])}),i.watch(o,()=>{t("update:filterArray",o),o.length===0&&(l.value=null)}),i.watch(l,()=>{l.value&&(o.splice(0),o.push(l.value))});function c(d){l.value=null,o.splice(0),d!==Vr.Standard&&o.push(d)}function u(){o.splice(0)}return(d,f)=>(i.openBlock(),i.createBlock(mt,{"filter-array":o,title:i.unref(r)("general.format"),"onClear:filterArray":u},{default:i.withCtx(()=>[i.createElementVNode("div",fT,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(A.value,h=>(i.openBlock(),i.createBlock(tn,{prompt:h.name,"is-selected":o.includes(h.nameRef)||!n.allowZero&&h.nameRef==="Standard"&&o.length===0,"onUpdate:isSelected":p=>c(h.nameRef)},null,8,["prompt","is-selected","onUpdate:isSelected"]))),256)),s.value.length>0?(i.openBlock(),i.createBlock(i.unref(Vt),{key:0,modelValue:l.value,"onUpdate:modelValue":f[0]||(f[0]=h=>l.value=h),options:s.value,searchable:!1,placeholder:i.unref(r)("general.otherFormats"),label:"name","value-prop":"nameRef",onClear:u},null,8,["modelValue","options","placeholder"])):i.createCommentVNode("",!0)])]),_:1},8,["filter-array","title"]))}});const Cg=M(hT,[["__scopeId","data-v-22de9b40"]]),pT={filterArray:{type:Array,required:!0,default:[]},availableQueues:{type:Array,required:!0,default:[]}},Eg=i.defineComponent({__name:"FilterQueues",props:pT,emits:["update:filterArray"],setup(e,{emit:t}){const n=e,{t:r}=se(),a=i.ref(n.filterArray),A=i.computed(()=>Object.values(we().dataJson.queues).filter(o=>n.availableQueues.includes(o.nameRef)&&!o.excludeInMassFilter));i.watch(a,()=>{t("update:filterArray",a.value)});function s(){a.value.splice(0)}return(o,l)=>n.availableQueues.length>1?(i.openBlock(),i.createBlock(mt,{key:0,"filter-array":a.value,title:i.unref(r)("general.queues"),"onClear:filterArray":s},{default:i.withCtx(()=>{var c,u;return[i.createVNode(i.unref(Vt),{modelValue:a.value,"onUpdate:modelValue":l[0]||(l[0]=d=>a.value=d),placeholder:(u=(c=A.value)==null?void 0:c.find(d=>d.nameRef===i.unref(S2).Ranked))==null?void 0:u.name,class:"runeterra-select",mode:"tags",options:A.value,searchable:!0,label:"name","value-prop":"nameRef"},null,8,["modelValue","placeholder","options"])]}),_:1},8,["filter-array","title"])):i.createCommentVNode("",!0)}}),gT={filterObject:{type:Object,required:!1,default:void 0},showClearAll:{type:Boolean,required:!1,default:!0}},mT={class:"filter"},vT={key:0,class:"top"},BT=i.defineComponent({__name:"SidePanel",props:gT,emits:["clear:filterObject"],setup(e,{emit:t}){const n=e,r=i.computed(()=>n.filterObject&&Object.values(n.filterObject).some(A=>A.length>0)?"clickable":null);function a(){t("clear:filterObject")}return(A,s)=>{const o=i.resolveDirective("t");return i.openBlock(),i.createElementBlock("div",mT,[n.showClearAll&&n.filterObject?(i.openBlock(),i.createElementBlock("div",vT,[i.withDirectives(i.createElementVNode("p",{class:i.normalizeClass(["clear",r.value]),onClick:a},null,2),[[o,"general.clearAll"]])])):i.createCommentVNode("",!0),i.renderSlot(A.$slots,"default",{},void 0,!0)])}}});const Zs=M(BT,[["__scopeId","data-v-6a93fcc1"]]),vb=i.defineComponent({__name:"FilterDecks",props:uT,emits:["update:filters"],setup(e,{emit:t}){const n=e,r=i.reactive(n.filters);i.watch(r,()=>{t("update:filters",r)});const a=i.computed(()=>{var s;return(s=we().dataJson.formats[r.formatFilters[0]??"Standard"])==null?void 0:s.availableQueues});function A(){for(const[,s]of Object.entries(r))s.splice(0)}return(s,o)=>(i.openBlock(),i.createBlock(Zs,{"filter-object":n.filters,"onClear:filterObject":A},{default:i.withCtx(()=>[i.createVNode(Yo,{"filter-array":r.regionFilters,"onUpdate:filterArray":o[0]||(o[0]=l=>r.regionFilters=l)},null,8,["filter-array"]),i.createVNode(Xu,{"filter-array":r.cardFilters,"onUpdate:filterArray":o[1]||(o[1]=l=>r.cardFilters=l)},null,8,["filter-array"]),i.createVNode(Cg,{"filter-array":r.formatFilters,"onUpdate:filterArray":o[2]||(o[2]=l=>r.formatFilters=l)},null,8,["filter-array"]),n.includeDataFilters?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createVNode(Eg,{"filter-array":r.queueFilters,"onUpdate:filterArray":o[3]||(o[3]=l=>r.queueFilters=l),"available-queues":a.value},null,8,["filter-array","available-queues"]),i.createVNode(Xs,{"filter-array":r.sampleSizeFilters,"onUpdate:filterArray":o[4]||(o[4]=l=>r.sampleSizeFilters=l)},null,8,["filter-array"]),i.createVNode(KA,{"filter-array":r.timeFilters,"onUpdate:filterArray":o[5]||(o[5]=l=>r.timeFilters=l)},null,8,["filter-array"]),i.createVNode(Js,{"filter-array":r.serverFilters,"onUpdate:filterArray":o[6]||(o[6]=l=>r.serverFilters=l)},null,8,["filter-array"])],64)):i.createCommentVNode("",!0)]),_:1},8,["filter-object"]))}}),yT={filters:{type:Object,required:!0,default:{cardFilters:[],regionFilters:[],sampleSizeFilters:[],serverFilters:[],timeFilters:[],formatFilters:[],queueFilters:[]}},includeDataFilters:{type:Boolean,required:!1,default:!0}},wT={filterArray:{type:Array,required:!0,default:[]},placeholder:{type:String,required:!1},title:{type:String,required:!1,default:"Text"}},bT=["placeholder"],_T=i.defineComponent({__name:"FilterText",props:wT,emits:["update:filterArray"],setup(e,{emit:t}){const n=e,r=i.ref(n.filterArray),a=i.ref("");let A=setTimeout(()=>{},0);r.value.length>0&&(a.value=r.value[0]),i.watch(r,()=>{t("update:filterArray",r.value)}),i.watch(a,()=>{A&&clearTimeout(A),A=setTimeout(()=>{r.value.splice(0),a.value&&r.value.push(a.value)},1e3)});function s(){r.value.splice(0),a.value=""}return(o,l)=>(i.openBlock(),i.createBlock(mt,{"filter-array":r.value,title:n.title,"onClear:filterArray":s},{default:i.withCtx(()=>[i.withDirectives(i.createElementVNode("input",{"onUpdate:modelValue":l[0]||(l[0]=c=>a.value=c),placeholder:n.placeholder,type:"text"},null,8,bT),[[i.vModelText,a.value]])]),_:1},8,["filter-array","title"]))}});const su=M(_T,[["__scopeId","data-v-e9c34cae"]]),Bb=i.defineComponent({__name:"FilterProfile",props:yT,emits:["update:filters"],setup(e,{emit:t}){const n=e,{t:r}=se(),a=i.reactive(n.filters);i.watch(a,()=>{t("update:filters",a)});const A=i.computed(()=>{var o;return a.formatFilters.length===0?[]:(o=we().dataJson.formats[a.formatFilters[0]??"Standard"])==null?void 0:o.availableQueues});function s(){for(const[,o]of Object.entries(a))o.splice(0)}return(o,l)=>(i.openBlock(),i.createBlock(Zs,{"filter-object":n.filters,"onClear:filterObject":s},{default:i.withCtx(()=>[i.createVNode(Yo,{"filter-array":a.regionFilters,"onUpdate:filterArray":l[0]||(l[0]=c=>a.regionFilters=c)},null,8,["filter-array"]),i.createVNode(Xu,{"filter-array":a.cardFilters,"onUpdate:filterArray":l[1]||(l[1]=c=>a.cardFilters=c)},null,8,["filter-array"]),i.createVNode(su,{"filter-array":a.deckCodeFilters,"onUpdate:filterArray":l[2]||(l[2]=c=>a.deckCodeFilters=c),placeholder:i.unref(r)("general.deckCode"),title:i.unref(r)("general.deckCode")},null,8,["filter-array","placeholder","title"]),i.createVNode(su,{"filter-array":a.playerFilters,"onUpdate:filterArray":l[3]||(l[3]=c=>a.playerFilters=c),placeholder:i.unref(r)("general.players"),title:i.unref(r)("general.players")},null,8,["filter-array","placeholder","title"]),i.createVNode(Xs,{"filter-array":a.sampleSizeFilters,"onUpdate:filterArray":l[4]||(l[4]=c=>a.sampleSizeFilters=c)},null,8,["filter-array"]),i.createVNode(Cg,{"allow-zero":!0,"filter-array":a.formatFilters,"onUpdate:filterArray":l[5]||(l[5]=c=>a.formatFilters=c)},null,8,["filter-array"]),i.createVNode(Eg,{"filter-array":a.queueFilters,"onUpdate:filterArray":l[6]||(l[6]=c=>a.queueFilters=c),"available-queues":A.value},null,8,["filter-array","available-queues"]),i.createVNode(KA,{"allow-zero":!0,"filter-array":a.timeFilters,"onUpdate:filterArray":l[7]||(l[7]=c=>a.timeFilters=c)},null,8,["filter-array"])]),_:1},8,["filter-object"]))}}),CT={filterValue:{type:Object,required:!0,default:{attribute:"attack",equality:">",number:0}}},ET={class:"advanced-filter-item"},kT=["value"],ST=i.defineComponent({__name:"AdvancedFilterItem",props:CT,emits:["update:filterValue"],setup(e,{emit:t}){const n=e,{t:r}=se(),a=[{value:"attack",label:r("cards.attack")},{value:"health",label:r("cards.health")},{value:"cost",label:r("cards.cost")},{value:"quantityOwned",label:r("cards.quantityOwned")}],A=i.ref(n.filterValue.attribute);i.watch(A,()=>{t("update:filterValue",{attribute:A.value,equality:n.filterValue.equality,number:n.filterValue.number})});function s(){let l=">";n.filterValue.equality===">"?l="<":n.filterValue.equality==="<"&&(l="="),t("update:filterValue",{attribute:n.filterValue.attribute,equality:l,number:n.filterValue.number})}function o(l){t("update:filterValue",{attribute:n.filterValue.attribute,equality:n.filterValue.equality,number:Number(l.target.value)})}return(l,c)=>(i.openBlock(),i.createElementBlock("div",ET,[i.createVNode(i.unref(Vt),{modelValue:A.value,"onUpdate:modelValue":c[0]||(c[0]=u=>A.value=u),class:"advanced-attribute",options:a,"can-clear":!1,label:"label","value-prop":"value"},null,8,["modelValue"]),i.createElementVNode("div",{class:"equality-button",onClick:s},i.toDisplayString(n.filterValue.equality),1),i.createElementVNode("input",{type:"number",class:"equality-number",value:n.filterValue.number,onInput:o},null,40,kT)]))}});const kg=M(ST,[["__scopeId","data-v-eb2d535d"]]),xT={filterValue:{type:Array,required:!0,default:[]}},FT=i.defineComponent({__name:"FilterAdvanced",props:xT,emits:["update:filterValue"],setup(e,{emit:t}){const n=e,{t:r}=se(),a=i.reactive(n.filterValue);i.watch(a,()=>{t("update:filterValue",a)});function A(){a.splice(0)}function s(){a.push({attribute:"attack",equality:">",number:0})}return(o,l)=>(i.openBlock(),i.createBlock(mt,{class:"advanced-filters","filter-array":a,title:i.unref(r)("general.advanced"),"onClear:filterArray":A},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a,(c,u)=>(i.openBlock(),i.createBlock(kg,{key:u,"filter-value":a[u],"onUpdate:filterValue":d=>a[u]=d,class:"advanced-filter-item"},null,8,["filter-value","onUpdate:filterValue"]))),128)),i.createElementVNode("div",{class:"new-advanced-filter",onClick:s},i.toDisplayString(i.unref(r)("general.newAdvancedFilter")),1)]),_:1},8,["filter-array","title"]))}});const Sg=M(FT,[["__scopeId","data-v-6c23ee29"]]),IT={filterArray:{type:Array,required:!0,default:[]}},UT={class:"checkboxes-container"},xg=i.defineComponent({__name:"FilterTypes",props:IT,emits:["update:filterArray"],setup(e,{emit:t}){const n=e,{t:r}=se(),a=i.computed(()=>we().dataJson.types.filter(l=>["Unit","Spell","Landmark","Equipment"].includes(l.nameRef))),A=i.reactive(n.filterArray);i.watch(A,()=>{t("update:filterArray",A)});function s(){A.splice(0)}function o(l){const c=A.indexOf(l);if(c===-1){A.push(l);return}A.splice(c,1)}return(l,c)=>(i.openBlock(),i.createBlock(mt,{"filter-array":n.filterArray,title:i.unref(r)("general.types"),"onClear:filterArray":s},{default:i.withCtx(()=>[i.createElementVNode("div",UT,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.value,u=>(i.openBlock(),i.createBlock(tn,{key:u.nameRef,icon:`url(${u.icon})`,prompt:u.name,"is-selected":A.includes(u.nameRef),"onUpdate:isSelected":d=>o(u.nameRef)},null,8,["icon","prompt","is-selected","onUpdate:isSelected"]))),128))])]),_:1},8,["filter-array","title"]))}}),QT={filters:{type:Object,required:!0,default:{advancedFilters:[],regionFilters:[],manaCostFilters:[],typeFilters:[],rarityFilters:[],setFilters:[],keywordFilters:[]}}},yb=i.defineComponent({__name:"FilterCards",props:QT,emits:["update:filters"],setup(e,{emit:t}){const n=e,r=i.reactive(n.filters);i.watch(r,()=>{t("update:filters",r)});const a=i.computed(()=>{var s;return"formatFilters"in r?(s=we().dataJson.formats[r.formatFilters[0]??"Standard"])==null?void 0:s.availableQueues:[]});function A(){for(const[,s]of Object.entries(r))s.splice(0)}return(s,o)=>(i.openBlock(),i.createBlock(Zs,{"filter-object":n.filters,"onClear:filterObject":A},{default:i.withCtx(()=>[i.createVNode(Bg,{"filter-array":r.manaCostFilters,"onUpdate:filterArray":o[0]||(o[0]=l=>r.manaCostFilters=l)},null,8,["filter-array"]),i.createVNode(Yo,{"filter-array":r.regionFilters,"onUpdate:filterArray":o[1]||(o[1]=l=>r.regionFilters=l)},null,8,["filter-array"]),i.createVNode(xg,{"filter-array":r.typeFilters,"onUpdate:filterArray":o[2]||(o[2]=l=>r.typeFilters=l)},null,8,["filter-array"]),i.createVNode(yg,{"filter-array":r.rarityFilters,"onUpdate:filterArray":o[3]||(o[3]=l=>r.rarityFilters=l)},null,8,["filter-array"]),i.createVNode(wg,{"filter-array":r.setFilters,"onUpdate:filterArray":o[4]||(o[4]=l=>r.setFilters=l)},null,8,["filter-array"]),i.createVNode(bg,{"filter-array":r.keywordFilters,"onUpdate:filterArray":o[5]||(o[5]=l=>r.keywordFilters=l)},null,8,["filter-array"]),i.createVNode(Sg,{"filter-value":r.advancedFilters,"onUpdate:filterValue":o[6]||(o[6]=l=>r.advancedFilters=l)},null,8,["filter-value"]),"serverFilters"in r?(i.openBlock(),i.createBlock(i.unref(Js),{key:0,"filter-array":r.serverFilters,"onUpdate:filterArray":o[7]||(o[7]=l=>r.serverFilters=l)},null,8,["filter-array"])):i.createCommentVNode("",!0),"timeFilters"in r?(i.openBlock(),i.createBlock(KA,{key:1,"filter-array":r.timeFilters,"onUpdate:filterArray":o[8]||(o[8]=l=>r.timeFilters=l)},null,8,["filter-array"])):i.createCommentVNode("",!0),"formatFilters"in r?(i.openBlock(),i.createBlock(Cg,{key:2,"filter-array":r.formatFilters,"onUpdate:filterArray":o[9]||(o[9]=l=>r.formatFilters=l)},null,8,["filter-array"])):i.createCommentVNode("",!0),"queueFilters"in r?(i.openBlock(),i.createBlock(Eg,{key:3,"filter-array":r.queueFilters,"onUpdate:filterArray":o[10]||(o[10]=l=>r.queueFilters=l),"available-queues":a.value},null,8,["filter-array","available-queues"])):i.createCommentVNode("",!0)]),_:1},8,["filter-object"]))}}),TT={regionRef:{type:String,required:!0,default:"Ionia"}},DT={text:{type:String,required:!0,default:""}},LT=["innerHTML"],OT=i.defineComponent({__name:"TippyText",props:DT,setup(e){const t=e;return(n,r)=>(i.openBlock(),i.createElementBlock("div",{class:"tippy-text",innerHTML:t.text},null,8,LT))}});const Ju=M(OT,[["__scopeId","data-v-715107fe"]]),MT={class:"region-item"},NT=["alt","src"],PT=i.defineComponent({__name:"RegionItem",props:TT,setup(e){const t=e,n=i.ref(null),r=i.ref(null),a=i.computed(()=>we().dataJson.regions.find(A=>A.nameRef==t.regionRef)??we().dataJson.runeterraChampions.find(A=>A.nameRef===t.regionRef));return i.onMounted(()=>{At(n.value,{content:r.value,arrow:!0})}),(A,s)=>{var o,l,c;return i.openBlock(),i.createElementBlock("div",MT,[i.createElementVNode("img",{ref_key:"regionImg",ref:n,alt:(o=a.value)==null?void 0:o.name,src:(l=a.value)==null?void 0:l.icon,class:"region-img"},null,8,NT),i.createElementVNode("div",{ref_key:"regionTippy",ref:r},[i.createVNode(Ju,{text:(c=a.value)==null?void 0:c.name},null,8,["text"])],512)])}}});const qo=M(PT,[["__scopeId","data-v-3d756f50"]]),HT={deckCode:{type:String,required:!0,default:""},deck:{type:Object,required:!1},cards:{type:Array,required:!1},describeRegions:{type:Boolean,required:!1,default:!1}},RT={class:"regions-line"},VT={key:0,class:"describe-regions"},KT={class:"lines"},$T=i.defineComponent({__name:"RegionsLine",props:HT,setup(e){const t=e,{t:n}=se(),r=i.computed(()=>t.deck?t.deck:St(t.deckCode)),a=i.computed(()=>t.cards?t.cards:rn(r.value)),A=i.computed(()=>{const o={};for(const l of Ou(r.value))o[l]=0;for(const l of a.value)for(const c of l.regionRefs)c in o&&(o[c]+=r.value[l.cardCode]);return o});function s(o,l){return{flexGrow:o,backgroundColor:`var(--color-${l}, var(--color-Runeterra))`}}return(o,l)=>(i.openBlock(),i.createElementBlock("div",RT,[t.describeRegions?(i.openBlock(),i.createElementBlock("div",VT,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(A.value,(c,u)=>(i.openBlock(),i.createElementBlock("div",{key:u,class:"region-description"},[i.createVNode(qo,{"region-ref":u,class:"icon"},null,8,["region-ref"]),i.createElementVNode("span",null,i.toDisplayString(`${c} ${i.unref(n)("general.cards")}`),1)]))),128))])):i.createCommentVNode("",!0),i.createElementVNode("div",KT,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(A.value,(c,u)=>(i.openBlock(),i.createElementBlock("div",{key:u,style:i.normalizeStyle(s(c,u)),class:"region-line"},null,4))),128))])]))}});const Fg=M($T,[["__scopeId","data-v-f1f94f8b"]]),WT={routerLink:{type:Object,required:!0,default:{path:"/404"}},cardCode:{type:String,required:!0,default:"01IO001"},toggledStats:{type:Object,required:!0,default:{matches:!0,winrate:!0,inclusion:!0,avgCopies:!0,mulliganWinrate:!1,kept:!1,drawnWinrate:!1,turnsHeld:!1,turnPlayed:!1}},index:{type:Number,required:!0,default:1},matches:{type:Number,required:!0,default:1},region:{type:String,required:!0,default:""},wins:{type:Number,required:!0,default:1},inclusion:{type:Number,required:!0,default:.5},avgCopies:{type:Number,required:!0,default:1},mulliganWinrate:{type:Number,required:!1,default:void 0},keptInMulligan:{type:Number,required:!1,default:void 0},drawnWinrate:{type:Number,required:!1,default:void 0},turnsHeld:{type:Number,required:!1,default:void 0},turnPlayed:{type:Number,required:!1,default:void 0}},GT={class:"cards-row-background-wrapper"},zT={class:"cards-row-background"},jT={class:"cards-row wrapper"},YT={key:0,class:"column-content"},qT={key:2,class:"column-content"},XT={key:3,class:"column-content"},JT={key:5,class:"column-content"},ZT={key:7,class:"column-content"},eD={key:8,class:"column-content"},tD=i.defineComponent({__name:"CardsRow",props:WT,setup(e){const t=e,n=i.computed(()=>["",`https://lor.gg/storage/cards/banner/${t.cardCode}.png`]);return(r,a)=>{const A=i.resolveComponent("RouterLink");return i.openBlock(),i.createBlock(A,{to:t.routerLink,class:"wrapper"},{default:i.withCtx(()=>[i.createElementVNode("div",{class:"cards-row-wrapper wrapper",style:i.normalizeStyle({"--index":t.index})},[i.createElementVNode("div",GT,[i.createElementVNode("div",zT,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.value,s=>(i.openBlock(),i.createElementBlock("div",{key:s,class:"background-card",style:i.normalizeStyle({"--background-image":`url(${s})`})},null,4))),128))])]),i.createElementVNode("div",jT,[i.createElementVNode("div",{class:"column-content deck-highlight-wrapper",onClick:a[0]||(a[0]=i.withModifiers(()=>{},["stop","prevent"]))},[i.createVNode(fn,{class:"card-slice-item","card-code-prop":t.cardCode,"maintain-aspect-ratio":!0,color:`var(--color-${t.region}-rgb, var(--color-primary-2-rgb))`,"router-link":t.routerLink},null,8,["card-code-prop","color","router-link"])]),t.toggledStats.matches?(i.openBlock(),i.createElementBlock("div",YT,i.toDisplayString(i.unref(Te)(t.matches)),1)):i.createCommentVNode("",!0),t.toggledStats.winrate?(i.openBlock(),i.createElementBlock("div",{key:1,class:"column-content",style:i.normalizeStyle({color:`var(${i.unref(Zn)(t.wins/t.matches)})`})},i.toDisplayString(i.unref(Te)(t.wins/t.matches*100,2,3)+"%"),5)):i.createCommentVNode("",!0),t.toggledStats.inclusion?(i.openBlock(),i.createElementBlock("div",qT,i.toDisplayString(i.unref(Te)(t.inclusion*100,2,3)+"%"),1)):i.createCommentVNode("",!0),t.toggledStats.avgCopies?(i.openBlock(),i.createElementBlock("div",XT,i.toDisplayString(i.unref(Te)(t.avgCopies,2,3)),1)):i.createCommentVNode("",!0),t.toggledStats.mulliganWinrate?(i.openBlock(),i.createElementBlock("div",{key:4,class:"column-content",style:i.normalizeStyle({color:`var(${i.unref(Zn)(t.mulliganWinrate,t.wins/t.matches)})`})},i.toDisplayString(t.mulliganWinrate?i.unref(Te)(t.mulliganWinrate*100,2,3)+"%":"-"),5)):i.createCommentVNode("",!0),t.toggledStats.keptInMulligan?(i.openBlock(),i.createElementBlock("div",JT,i.toDisplayString(t.keptInMulligan?i.unref(Te)(t.keptInMulligan*100,2,3)+"%":"-"),1)):i.createCommentVNode("",!0),t.toggledStats.drawnWinrate?(i.openBlock(),i.createElementBlock("div",{key:6,class:"column-content",style:i.normalizeStyle({color:`var(${i.unref(Zn)(t.drawnWinrate,t.wins/t.matches)})`})},i.toDisplayString(t.drawnWinrate?i.unref(Te)(t.drawnWinrate*100,2,3)+"%":"-"),5)):i.createCommentVNode("",!0),t.toggledStats.turnPlayed?(i.openBlock(),i.createElementBlock("div",ZT,i.toDisplayString(t.turnPlayed?i.unref(Te)(t.turnPlayed,2,3):"-"),1)):i.createCommentVNode("",!0),t.toggledStats.turnsHeld?(i.openBlock(),i.createElementBlock("div",eD,i.toDisplayString(t.turnsHeld?i.unref(Te)(t.turnsHeld,2,3):"-"),1)):i.createCommentVNode("",!0)])],4)]),_:1},8,["to"])}}});const Ig=M(tD,[["__scopeId","data-v-69ecee4e"]]),nD={cardRows:{type:Array,required:!0,default:[]},cardsRowToggle:{type:Object,requied:!0,default:{card:!0,matches:!0,winrate:!0,inclusion:!0,avgCopies:!0,mulliganWinrate:!0,keptInMulligan:!0,drawnWinrate:!0,turnsHeld:!0,turnPlayed:!0}},loading:{type:Boolean,required:!1,default:!1}};var be=(e=>(e.UP="sort-up",e.DOWN="sort-down",e.NEITHER="sort-neither",e.NOT_SORTABLE="not-sortable",e))(be||{});const rD={headingItems:{type:Array,required:!0,default:[]},loading:{type:Boolean,required:!1,default:!1}};const aD={},AD={class:"loader"};function sD(e,t){return i.openBlock(),i.createElementBlock("div",AD)}const iD=M(aD,[["render",sD],["__scopeId","data-v-91218ab0"]]),Ug=e=>(i.pushScopeId("data-v-778b82f1"),e=e(),i.popScopeId(),e),oD={class:"table-wrapper"},lD={class:"table no-scrollbar"},cD=Ug(()=>i.createElementVNode("div",{class:"heading-background-outer"},[i.createElementVNode("div",{class:"heading-background-absolute"}),i.createElementVNode("div",{class:"heading-background-inner"})],-1)),uD={class:"heading wrapper"},dD=["onClick"],fD={class:"sort-icons"},hD={key:0,class:"no-content loading"},pD={key:1,class:"no-content no-results"},gD=Ug(()=>i.createElementVNode("h2",null," No Results ",-1)),mD=Ug(()=>i.createElementVNode("h4",null," Adjust filters and try again. ",-1)),vD=[gD,mD],BD=i.defineComponent({__name:"LargeTable",props:rD,emits:["toggleSort"],setup(e,{emit:t}){const n=e,r=i.computed(()=>n.headingItems.filter(a=>a.isShown));return(a,A)=>(i.openBlock(),i.createElementBlock("div",oD,[i.createElementVNode("div",lD,[cD,i.createElementVNode("div",uD,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.value,s=>(i.openBlock(),i.createElementBlock("div",{key:s.title,class:i.normalizeClass(["heading-cell column-content",s.sortDirection]),onClick:o=>t("toggleSort",s.id)},[i.createElementVNode("div",null,i.toDisplayString(s.title),1),i.createElementVNode("div",fD,[i.createVNode(i.unref(Ue),{icon:"sort-up",class:"sort-icon"}),i.createVNode(i.unref(Ue),{icon:"sort-down",class:"sort-icon"})])],10,dD))),128))]),i.renderSlot(a.$slots,"default",{},()=>[n.loading?(i.openBlock(),i.createElementBlock("div",hD,[i.createVNode(iD)])):(i.openBlock(),i.createElementBlock("div",pD,vD))],!0)])]))}});const tA=M(BD,[["__scopeId","data-v-778b82f1"]]);function ei(e,t){const n=t.value.find(a=>a.id===e);if(!n||n.sortDirection===be.NOT_SORTABLE)return null;const r=n.sortDirection;return yD(t),r===be.NEITHER?n.sortDirection=be.DOWN:r===be.DOWN?n.sortDirection=be.UP:n.sortDirection=be.DOWN,n}function yD(e){e.value.forEach(t=>{t.sortDirection!==be.NOT_SORTABLE&&(t.sortDirection=be.NEITHER)})}const wD=i.defineComponent({__name:"CardsTable",props:nD,emits:["sort-updated"],setup(e,{emit:t}){const n=e,{t:r}=se(),a=[{id:"card",isAlwaysShown:!0,isSortable:!1,title:r("general.card")},{id:"matches",isAlwaysShown:!1,isSortable:!0,title:r("general.matches")},{id:"winrate",isAlwaysShown:!1,isSortable:!0,title:r("general.winrate")},{id:"inclusion",isAlwaysShown:!1,isSortable:!0,title:r("general.inclusion")},{id:"avgCopies",isAlwaysShown:!1,isSortable:!0,title:r("general.avgCopies")},{id:"mulliganWinrate",isAlwaysShown:!1,isSortable:!0,title:r("general.mulliganWinrate")},{id:"keptInMulligan",isAlwaysShown:!1,isSortable:!0,title:r("general.keptInMulligan")},{id:"drawnWinrate",isAlwaysShown:!1,isSortable:!0,title:r("general.drawnWinrate")},{id:"turnsHeld",isAlwaysShown:!1,isSortable:!0,title:r("general.turnsHeld")},{id:"turnPlayed",isAlwaysShown:!1,isSortable:!0,title:r("general.turnPlayed")}];let A=!1;const s=i.ref(a.map(c=>{let u=be.NEITHER;return c.isSortable||(u=be.NOT_SORTABLE),!A&&c.isSortable&&(u=be.DOWN,A=!0),{id:c.id,isShown:n.cardsRowToggle[c.id],sortDirection:u,title:c.title}})),o=i.computed(()=>({"--table-grid-template-columns":`repeat(${Object.values(n.cardsRowToggle).reduce((u,d)=>d?u+1:u,0)}, 1fr)`}));function l(c){const u=ei(c,s);u&&t("sort-updated",u)}return(c,u)=>(i.openBlock(),i.createBlock(tA,{class:"large-table",loading:n.loading,"heading-items":s.value,style:i.normalizeStyle(o.value),onToggleSort:l},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.cardRows,(d,f)=>(i.openBlock(),i.createBlock(Ig,{key:d.cardCode+d.region,"card-code":d.cardCode,matches:d.matches,wins:d.wins,index:f+2,"avg-copies":d.avgCopies,"drawn-winrate":d.drawnWinrate,"kept-in-mulligan":d.keptInMulligan,"mulligan-winrate":d.mulliganWinrate,inclusion:d.inclusion,"turns-held":d.turnsHeld,"turn-played":d.turnPlayed,"toggled-stats":n.cardsRowToggle,region:d.region,"router-link":i.unref(nn)().callbacks.cardCodeRouterLinkCallback(d.cardCode)},null,8,["card-code","matches","wins","index","avg-copies","drawn-winrate","kept-in-mulligan","mulligan-winrate","inclusion","turns-held","turn-played","toggled-stats","region","router-link"]))),128))]),_:1},8,["loading","heading-items","style"]))}});const wb=M(wD,[["__scopeId","data-v-1894b267"]]),bD={regions:{type:Array,required:!0,default:[]}},_D={class:"deck-highlight-regions"},CD=i.defineComponent({__name:"DeckHighlightRegions",props:bD,setup(e){const t=e;return(n,r)=>(i.openBlock(),i.createElementBlock("div",_D,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(t.regions,a=>(i.openBlock(),i.createElementBlock("div",{key:a,class:"region-item-wrapper"},[i.createVNode(qo,{class:"region-item","region-ref":a},null,8,["region-ref"])]))),128))]))}});const Xo=M(CD,[["__scopeId","data-v-d28f95f4"]]),ED={},kD={xmlns:"http://www.w3.org/2000/svg",viewBox:"215.7 48.9 276.9 496"},SD=i.createStaticVNode('<path fill="#146743" d="m271 136-54 90 150 316 14-50 29-312-51-130-88 86Z"></path><path fill="#419a4a" d="m356 121-75 105 86 316 14-50 29-312-54-59Z"></path><path fill="#baffb6" d="M410 180 359 50l-3 71 54 59Z"></path><path fill="#437f41" d="m359 50-88 86 10 90 75-105 3-71ZM281 360l86 182-86-316v134Z"></path><path fill="#419a4a" d="m454 332 28 33-33 85-4-13-8-85 17-20Z"></path>',5),xD=[SD];function FD(e,t){return i.openBlock(),i.createElementBlock("svg",kD,xD)}const Qg=M(ED,[["render",FD]]),ID={deck:{type:Object,required:!0,default:{}}},UD=e=>(i.pushScopeId("data-v-25f680e9"),e=e(),i.popScopeId(),e),QD={class:"gems-text"},TD={class:"gems-cost-title"},DD={class:"gems-cost-value"},LD=UD(()=>i.createElementVNode("hr",{class:"divider"},null,-1)),OD={class:"gems-cost-title"},MD={class:"gems-cost-value"},ND=i.defineComponent({__name:"GemsCost",props:ID,setup(e){const t=e,{t:n}=se(),r=i.ref(null),a=i.ref(null),A=i.computed(()=>Yc(t.deck,!1)),s=i.computed(()=>Yc(t.deck,!0));return i.onMounted(()=>{At(r.value,{content:a.value,arrow:!0,duration:0})}),(o,l)=>{var c,u,d;return i.openBlock(),i.createElementBlock("div",{ref_key:"gemsCostDiv",ref:r,class:"gems-cost"},[i.createVNode(Qg,{class:"shards-icon"}),i.createElementVNode("div",QD,i.toDisplayString((c=s.value!==null?s.value:A.value)==null?void 0:c.toLocaleString()),1),i.createElementVNode("div",{ref_key:"gemsCostTippyDiv",ref:a,class:"gems-cost-tippy"},[s.value?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createElementVNode("div",TD,i.toDisplayString(i.unref(n)("deck.personalCost")),1),i.createElementVNode("div",DD,i.toDisplayString((u=s.value)==null?void 0:u.toLocaleString()),1),LD],64)):i.createCommentVNode("",!0),i.createElementVNode("div",OD,i.toDisplayString(i.unref(n)("deck.originalCost")),1),i.createElementVNode("div",MD,i.toDisplayString((d=A.value)==null?void 0:d.toLocaleString()),1)],512)],512)}}});const Tg=M(ND,[["__scopeId","data-v-25f680e9"]]),PD={class:"language-selection"},HD=["value"],RD=i.defineComponent({__name:"LanguageSelection",setup(e){const t=i.ref(!1);function n(){t.value=!0}return(r,a)=>(i.openBlock(),i.createElementBlock("div",PD,[i.createVNode(i.unref(Ue),{ref:"languageIcon",icon:"language",class:"icon",onClick:n},null,512),i.createVNode(VA,{"show-modal":t.value,"onUpdate:showModal":a[1]||(a[1]=A=>t.value=A)},{default:i.withCtx(()=>[i.withDirectives(i.createElementVNode("select",{"onUpdate:modelValue":a[0]||(a[0]=A=>r.$i18n.locale=A)},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.$i18n.availableLocales,A=>(i.openBlock(),i.createElementBlock("option",{key:`locale-${A}`,value:A},i.toDisplayString(A),9,HD))),128))],512),[[i.vModelSelect,r.$i18n.locale]])]),_:1},8,["show-modal"])]))}});const Dg=M(RD,[["__scopeId","data-v-741580c8"]]),VD={cardCodes:{type:Array,required:!0,default:[]},regions:{type:Array,required:!0,default:[]}},bb={routerLink:{type:Object,required:!0,default:{path:"/404"}},cardProp:{type:Object,required:!1,default:void 0},cardCodeProp:{type:String,required:!1,default:void 0},ignoreCardItem:{type:Boolean,required:!1},regions:{type:Array,required:!1,default:void 0},colorOverride:{type:String,required:!1,default:void 0}},KD={class:"circle-card-item"},$D=["alt","src"],WD=i.defineComponent({__name:"CircleCardItem",props:bb,setup(e){const t=e,n=Ro(t.cardProp,t.cardCodeProp,!0),r=i.ref(null),a=i.ref(null),A=i.ref(null),s=i.ref(null),o=i.computed(()=>{var c;return"https://lor.gg/storage/cards/icon/"+((c=n.value)==null?void 0:c.cardCode)+"-icon.webp"}),l=i.computed(()=>n.value===void 0?"--color-primary-2":pA(n.value,t.regions));return i.onMounted(()=>{t.ignoreCardItem||At(r.value,{content:a.value,placement:"right",arrow:!0,touch:"hold",duration:0,role:"card-image",onShown:c=>{const u=c.popper.innerHTML.includes("right")?"right-start":"left-start";s.value=u},onHidden:()=>{s.value=null}})}),(c,u)=>{const d=i.resolveComponent("RouterLink");return i.openBlock(),i.createElementBlock("div",KD,[i.createVNode(d,{to:t.routerLink,class:"circle-card-link",onClick:u[0]||(u[0]=i.withModifiers(()=>{},["stop","prevent"]))},{default:i.withCtx(()=>{var f;return[i.createElementVNode("img",{ref_key:"circleCardImg",ref:r,alt:(f=i.unref(n))==null?void 0:f.name,src:o.value,class:"circle-card-img",style:i.normalizeStyle({borderColor:t.colorOverride??l.value})},null,12,$D)]}),_:1},8,["to"]),i.createElementVNode("div",{ref_key:"circleCardTippy",ref:a,class:"circle-card-tippy"},[!c.ignoreCardItem&&i.unref(n)?(i.openBlock(),i.createBlock(Wa,{key:0,ref_key:"cardItem",ref:A,"card-code-prop":i.unref(n).cardCode,"is-deck-builder":!1,"is-root":!0,"show-tippy-location":s.value},null,8,["card-code-prop","show-tippy-location"])):i.createCommentVNode("",!0)],512)])}}});const nA=M(WD,[["__scopeId","data-v-b1598a69"]]),GD={cards:{type:Array,required:!1,default:void 0},cardCodes:{type:Array,required:!1,default:void 0},regions:{type:Array,required:!1,default:[]}},zD={class:"deck-highlight-cards"},jD=i.defineComponent({__name:"DeckHighlightCards",props:GD,setup(e){const t=e,n=i.computed(()=>{if(t.cards)return t.cards;if(t.cardCodes)return t.cardCodes.map(r=>jt().cardJsonObject[r]).filter(r=>r!==void 0);throw new Error("Cards or CardCodes must be defined.")});return(r,a)=>(i.openBlock(),i.createElementBlock("div",zD,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.value,(A,s)=>(i.openBlock(),i.createElementBlock("div",{key:A.cardCode??s,class:"circle-card-item-wrapper"},[i.createVNode(nA,{class:"circle-card-item","card-prop":A,regions:t.regions,"router-link":i.unref(nn)().callbacks.cardCodeRouterLinkCallback(A.cardCode)},null,8,["card-prop","regions","router-link"])]))),128))]))}});const Jo=M(jD,[["__scopeId","data-v-021c3530"]]),YD=i.defineComponent({__name:"ArchetypeSidePanelHighlight",props:VD,setup(e){const t=e;return(n,r)=>(i.openBlock(),i.createBlock(mt,{class:"archetype-side-panel-highlight"},{default:i.withCtx(()=>[i.createVNode(Xo,{class:"deck-highlight-regions",regions:t.regions},null,8,["regions"]),i.createVNode(Jo,{class:i.normalizeClass(["deck-highlight-cards",t.cardCodes.length===1?"single":""]),"card-codes":t.cardCodes},null,8,["class","card-codes"])]),_:1}))}});const Zu=M(YD,[["__scopeId","data-v-ff538f6f"]]),qD={deckcode:{type:String,required:!0,default:""},filters:{type:Object,required:!0,default:{sampleSizeFilters:[],serverFilters:[],timeFilters:[]}}},XD={deckCode:{type:String,required:!0,default:""},info:{type:String,required:!0,default:"typeRef"}};/*!
|
|
811
811
|
* @kurkle/color v0.3.2
|
|
812
812
|
* https://github.com/kurkle/color#readme
|
|
813
813
|
* (c) 2023 Jukka Kurkela
|
|
@@ -822,9 +822,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
822
822
|
* https://www.chartjs.org
|
|
823
823
|
* (c) 2023 Chart.js Contributors
|
|
824
824
|
* Released under the MIT License
|
|
825
|
-
*/class OO{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,n,r,a){const A=n.listeners[a],s=n.duration;A.forEach(o=>o({chart:t,initial:n.initial,numSteps:s,currentStep:Math.min(r-n.start,s)}))}_refresh(){this._request||(this._running=!0,this._request=Qb.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((r,a)=>{if(!r.running||!r.items.length)return;const A=r.items;let s=A.length-1,o=!1,l;for(;s>=0;--s)l=A[s],l._active?(l._total>r.duration&&(r.duration=l._total),l.tick(t),o=!0):(A[s]=A[A.length-1],A.pop());o&&(a.draw(),this._notify(a,r,t,"progress")),A.length||(r.running=!1,this._notify(a,r,t,"complete"),r.initial=!1),n+=A.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let r=n.get(t);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,r)),r}listen(t,n,r){this._getAnims(t).listeners[n].push(r)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((r,a)=>Math.max(r,a._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const r=n.items;let a=r.length-1;for(;a>=0;--a)r[a].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var Mr=new OO;const xv="transparent",MO={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const r=vv(e||xv),a=r.valid&&vv(t||xv);return a&&a.valid?a.mix(r,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class NO{constructor(t,n,r,a){const A=n[r];a=tt([t.to,a,A,t.from]);const s=tt([t.from,A,a]);this._active=!0,this._fn=t.fn||MO[t.type||typeof s],this._easing=qi[t.easing]||qi.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=r,this._from=s,this._to=a,this._promises=void 0}active(){return this._active}update(t,n,r){if(this._active){this._notify(!1);const a=this._target[this._prop],A=r-this._start,s=this._duration-A;this._start=r,this._duration=Math.floor(Math.max(s,t.duration)),this._total+=A,this._loop=!!t.loop,this._to=tt([t.to,n,a,t.from]),this._from=tt([t.from,a,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,r=this._duration,a=this._prop,A=this._from,s=this._loop,o=this._to;let l;if(this._active=A!==o&&(s||n<r),!this._active){this._target[a]=o,this._notify(!0);return}if(n<0){this._target[a]=A;return}l=n/r%2,l=s&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[a]=this._fn(A,o,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,r)=>{t.push({res:n,rej:r})})}_notify(t){const n=t?"res":"rej",r=this._promises||[];for(let a=0;a<r.length;a++)r[a][n]()}}class jg{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!ve(t))return;const n=Object.keys(dt.animation),r=this._properties;Object.getOwnPropertyNames(t).forEach(a=>{const A=t[a];if(!ve(A))return;const s={};for(const o of n)s[o]=A[o];(Oe(A.properties)&&A.properties||[a]).forEach(o=>{(o===a||!r.has(o))&&r.set(o,s)})})}_animateOptions(t,n){const r=n.options,a=HO(t,r);if(!a)return[];const A=this._createAnimations(a,r);return r.$shared&&PO(t.options.$animations,r).then(()=>{t.options=r},()=>{}),A}_createAnimations(t,n){const r=this._properties,a=[],A=t.$animations||(t.$animations={}),s=Object.keys(n),o=Date.now();let l;for(l=s.length-1;l>=0;--l){const c=s[l];if(c.charAt(0)==="$")continue;if(c==="options"){a.push(...this._animateOptions(t,n));continue}const u=n[c];let d=A[c];const f=r.get(c);if(d)if(f&&d.active()){d.update(f,u,o);continue}else d.cancel();if(!f||!f.duration){t[c]=u;continue}A[c]=d=new NO(f,t,c,u),a.push(d)}return a}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const r=this._createAnimations(t,n);if(r.length)return Mr.add(this._chart,r),!0}}function PO(e,t){const n=[],r=Object.keys(t);for(let a=0;a<r.length;a++){const A=e[r[a]];A&&A.active()&&n.push(A.wait())}return Promise.all(n)}function HO(e,t){if(!t)return;let n=e.options;if(!n){e.options=t;return}return n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function Fv(e,t){const n=e&&e.options||{},r=n.reverse,a=n.min===void 0?t:0,A=n.max===void 0?t:0;return{start:r?A:a,end:r?a:A}}function RO(e,t,n){if(n===!1)return!1;const r=Fv(e,n),a=Fv(t,n);return{top:a.end,right:r.end,bottom:a.start,left:r.start}}function VO(e){let t,n,r,a;return ve(e)?(t=e.top,n=e.right,r=e.bottom,a=e.left):t=n=r=a=e,{top:t,right:n,bottom:r,left:a,disabled:e===!1}}function Xb(e,t){const n=[],r=e._getSortedDatasetMetas(t);let a,A;for(a=0,A=r.length;a<A;++a)n.push(r[a].index);return n}function Iv(e,t,n,r={}){const a=e.keys,A=r.mode==="single";let s,o,l,c;if(t!==null){for(s=0,o=a.length;s<o;++s){if(l=+a[s],l===n){if(r.all)continue;break}c=e.values[l],ut(c)&&(A||t===0||vr(t)===vr(c))&&(t+=c)}return t}}function KO(e){const t=Object.keys(e),n=new Array(t.length);let r,a,A;for(r=0,a=t.length;r<a;++r)A=t[r],n[r]={x:A,y:e[A]};return n}function Uv(e,t){const n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function $O(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}function WO(e){const{min:t,max:n,minDefined:r,maxDefined:a}=e.getUserBounds();return{min:r?t:Number.NEGATIVE_INFINITY,max:a?n:Number.POSITIVE_INFINITY}}function GO(e,t,n){const r=e[t]||(e[t]={});return r[n]||(r[n]={})}function Qv(e,t,n,r){for(const a of t.getMatchingVisibleMetas(r).reverse()){const A=e[a.index];if(n&&A>0||!n&&A<0)return a.index}return null}function Tv(e,t){const{chart:n,_cachedMeta:r}=e,a=n._stacks||(n._stacks={}),{iScale:A,vScale:s,index:o}=r,l=A.axis,c=s.axis,u=$O(A,s,r),d=t.length;let f;for(let h=0;h<d;++h){const p=t[h],{[l]:m,[c]:y}=p,g=p._stacks||(p._stacks={});f=g[c]=GO(a,u,m),f[o]=y,f._top=Qv(f,s,!0,r.type),f._bottom=Qv(f,s,!1,r.type);const v=f._visualValues||(f._visualValues={});v[o]=y}}function pf(e,t){const n=e.scales;return Object.keys(n).filter(r=>n[r].axis===t).shift()}function zO(e,t){return rA(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function jO(e,t,n){return rA(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function fi(e,t){const n=e.controller.index,r=e.vScale&&e.vScale.axis;if(r){t=t||e._parsed;for(const a of t){const A=a._stacks;if(!A||A[r]===void 0||A[r][n]===void 0)return;delete A[r][n],A[r]._visualValues!==void 0&&A[r]._visualValues[n]!==void 0&&delete A[r]._visualValues[n]}}}const gf=e=>e==="reset"||e==="none",Dv=(e,t)=>t?e:Object.assign({},e),YO=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:Xb(n,!0),values:null};class er{constructor(t,n){this.chart=t,this._ctx=t.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 t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Uv(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&fi(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,r=this.getDataset(),a=(d,f,h,p)=>d==="x"?f:d==="r"?p:h,A=n.xAxisID=de(r.xAxisID,pf(t,"x")),s=n.yAxisID=de(r.yAxisID,pf(t,"y")),o=n.rAxisID=de(r.rAxisID,pf(t,"r")),l=n.indexAxis,c=n.iAxisID=a(l,A,s,o),u=n.vAxisID=a(l,s,A,o);n.xScale=this.getScaleForId(A),n.yScale=this.getScaleForId(s),n.rScale=this.getScaleForId(o),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(t){return this.chart.scales[t]}_getOtherScale(t){const n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&pv(this._data,this),t._stacked&&fi(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),r=this._data;if(ve(n))this._data=KO(n);else if(r!==n){if(r){pv(r,this);const a=this._cachedMeta;fi(a),a._parsed=[]}n&&Object.isExtensible(n)&&DL(n,this),this._syncList=[],this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const n=this._cachedMeta,r=this.getDataset();let a=!1;this._dataCheck();const A=n._stacked;n._stacked=Uv(n.vScale,n),n.stack!==r.stack&&(a=!0,fi(n),n.stack=r.stack),this._resyncElements(t),(a||A!==n._stacked)&&Tv(this,n._parsed)}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),r=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:r,_data:a}=this,{iScale:A,_stacked:s}=r,o=A.axis;let l=t===0&&n===a.length?!0:r._sorted,c=t>0&&r._parsed[t-1],u,d,f;if(this._parsing===!1)r._parsed=a,r._sorted=!0,f=a;else{Oe(a[t])?f=this.parseArrayData(r,a,t,n):ve(a[t])?f=this.parseObjectData(r,a,t,n):f=this.parsePrimitiveData(r,a,t,n);const h=()=>d[o]===null||c&&d[o]<c[o];for(u=0;u<n;++u)r._parsed[u+t]=d=f[u],l&&(h()&&(l=!1),c=d);r._sorted=l}s&&Tv(this,f)}parsePrimitiveData(t,n,r,a){const{iScale:A,vScale:s}=t,o=A.axis,l=s.axis,c=A.getLabels(),u=A===s,d=new Array(a);let f,h,p;for(f=0,h=a;f<h;++f)p=f+r,d[f]={[o]:u||A.parse(c[p],p),[l]:s.parse(n[p],p)};return d}parseArrayData(t,n,r,a){const{xScale:A,yScale:s}=t,o=new Array(a);let l,c,u,d;for(l=0,c=a;l<c;++l)u=l+r,d=n[u],o[l]={x:A.parse(d[0],u),y:s.parse(d[1],u)};return o}parseObjectData(t,n,r,a){const{xScale:A,yScale:s}=t,{xAxisKey:o="x",yAxisKey:l="y"}=this._parsing,c=new Array(a);let u,d,f,h;for(u=0,d=a;u<d;++u)f=u+r,h=n[f],c[u]={x:A.parse(Ga(h,o),f),y:s.parse(Ga(h,l),f)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,n,r){const a=this.chart,A=this._cachedMeta,s=n[t.axis],o={keys:Xb(a,!0),values:n._stacks[t.axis]._visualValues};return Iv(o,s,A.index,{mode:r})}updateRangeFromParsed(t,n,r,a){const A=r[n.axis];let s=A===null?NaN:A;const o=a&&r._stacks[n.axis];a&&o&&(a.values=o,s=Iv(a,A,this._cachedMeta.index)),t.min=Math.min(t.min,s),t.max=Math.max(t.max,s)}getMinMax(t,n){const r=this._cachedMeta,a=r._parsed,A=r._sorted&&t===r.iScale,s=a.length,o=this._getOtherScale(t),l=YO(n,r,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:d}=WO(o);let f,h;function p(){h=a[f];const m=h[o.axis];return!ut(h[t.axis])||u>m||d<m}for(f=0;f<s&&!(!p()&&(this.updateRangeFromParsed(c,t,h,l),A));++f);if(A){for(f=s-1;f>=0;--f)if(!p()){this.updateRangeFromParsed(c,t,h,l);break}}return c}getAllParsedValues(t){const n=this._cachedMeta._parsed,r=[];let a,A,s;for(a=0,A=n.length;a<A;++a)s=n[a][t.axis],ut(s)&&r.push(s);return r}getMaxOverflow(){return!1}getLabelAndValue(t){const n=this._cachedMeta,r=n.iScale,a=n.vScale,A=this.getParsed(t);return{label:r?""+r.getLabelForValue(A[r.axis]):"",value:a?""+a.getLabelForValue(A[a.axis]):""}}_update(t){const n=this._cachedMeta;this.update(t||"default"),n._clip=VO(de(this.options.clip,RO(n.xScale,n.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,n=this.chart,r=this._cachedMeta,a=r.data||[],A=n.chartArea,s=[],o=this._drawStart||0,l=this._drawCount||a.length-o,c=this.options.drawActiveElementsOnTop;let u;for(r.dataset&&r.dataset.draw(t,A,o,l),u=o;u<o+l;++u){const d=a[u];d.hidden||(d.active&&c?s.push(d):d.draw(t,A))}for(u=0;u<s.length;++u)s[u].draw(t,A)}getStyle(t,n){const r=n?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(r):this.resolveDataElementOptions(t||0,r)}getContext(t,n,r){const a=this.getDataset();let A;if(t>=0&&t<this._cachedMeta.data.length){const s=this._cachedMeta.data[t];A=s.$context||(s.$context=jO(this.getContext(),t,s)),A.parsed=this.getParsed(t),A.raw=a.data[t],A.index=A.dataIndex=t}else A=this.$context||(this.$context=zO(this.chart.getContext(),this.index)),A.dataset=a,A.index=A.datasetIndex=this.index;return A.active=!!n,A.mode=r,A}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,n){return this._resolveElementOptions(this.dataElementType.id,n,t)}_resolveElementOptions(t,n="default",r){const a=n==="active",A=this._cachedDataOpts,s=t+"-"+n,o=A[s],l=this.enableOptionSharing&&vn(r);if(o)return Dv(o,l);const c=this.chart.config,u=c.datasetElementScopeKeys(this._type,t),d=a?[`${t}Hover`,"hover",t,""]:[t,""],f=c.getOptionScopes(this.getDataset(),u),h=Object.keys(dt.elements[t]),p=()=>this.getContext(r,a,n),m=c.resolveNamedOptions(f,h,p,d);return m.$shared&&(m.$shared=l,A[s]=Object.freeze(Dv(m,l))),m}_resolveAnimations(t,n,r){const a=this.chart,A=this._cachedDataOpts,s=`animation-${n}`,o=A[s];if(o)return o;let l;if(a.options.animation!==!1){const u=this.chart.config,d=u.datasetAnimationScopeKeys(this._type,n),f=u.getOptionScopes(this.getDataset(),d);l=u.createResolver(f,this.getContext(t,r,n))}const c=new jg(a,l&&l.animations);return l&&l._cacheable&&(A[s]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||gf(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const r=this.resolveDataElementOptions(t,n),a=this._sharedOptions,A=this.getSharedOptions(r),s=this.includeOptions(n,A)||A!==a;return this.updateSharedOptions(A,n,r),{sharedOptions:A,includeOptions:s}}updateElement(t,n,r,a){gf(a)?Object.assign(t,r):this._resolveAnimations(n,a).update(t,r)}updateSharedOptions(t,n,r){t&&!gf(n)&&this._resolveAnimations(void 0,n).update(t,r)}_setStyle(t,n,r,a){t.active=a;const A=this.getStyle(n,a);this._resolveAnimations(n,r,a).update(t,{options:!a&&this.getSharedOptions(A)||A})}removeHoverStyle(t,n,r){this._setStyle(t,r,"active",!1)}setHoverStyle(t,n,r){this._setStyle(t,r,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const n=this._data,r=this._cachedMeta.data;for(const[o,l,c]of this._syncList)this[o](l,c);this._syncList=[];const a=r.length,A=n.length,s=Math.min(A,a);s&&this.parse(0,s),A>a?this._insertElements(a,A-a,t):A<a&&this._removeElements(A,a-A)}_insertElements(t,n,r=!0){const a=this._cachedMeta,A=a.data,s=t+n;let o;const l=c=>{for(c.length+=n,o=c.length-1;o>=s;o--)c[o]=c[o-n]};for(l(A),o=t;o<s;++o)A[o]=new this.dataElementType;this._parsing&&l(a._parsed),this.parse(t,n),r&&this.updateElements(A,t,n,"reset")}updateElements(t,n,r,a){}_removeElements(t,n){const r=this._cachedMeta;if(this._parsing){const a=r._parsed.splice(t,n);r._stacked&&fi(r,a)}r.data.splice(t,n)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[n,r,a]=t;this[n](r,a)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,n){n&&this._sync(["_removeElements",t,n]);const r=arguments.length-2;r&&this._sync(["_insertElements",t,r])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}R(er,"defaults",{}),R(er,"datasetElementType",null),R(er,"dataElementType",null);function qO(e,t){if(!e._cache.$bar){const n=e.getMatchingVisibleMetas(t);let r=[];for(let a=0,A=n.length;a<A;a++)r=r.concat(n[a].controller.getAllParsedValues(e));e._cache.$bar=Ub(r.sort((a,A)=>a-A))}return e._cache.$bar}function XO(e){const t=e.iScale,n=qO(t,e.type);let r=t._length,a,A,s,o;const l=()=>{s===32767||s===-32768||(vn(o)&&(r=Math.min(r,Math.abs(s-o)||r)),o=s)};for(a=0,A=n.length;a<A;++a)s=t.getPixelForValue(n[a]),l();for(o=void 0,a=0,A=t.ticks.length;a<A;++a)s=t.getPixelForTick(a),l();return r}function JO(e,t,n,r){const a=n.barThickness;let A,s;return _e(a)?(A=t.min*n.categoryPercentage,s=n.barPercentage):(A=a*r,s=1),{chunk:A/r,ratio:s,start:t.pixels[e]-A/2}}function ZO(e,t,n,r){const a=t.pixels,A=a[e];let s=e>0?a[e-1]:null,o=e<a.length-1?a[e+1]:null;const l=n.categoryPercentage;s===null&&(s=A-(o===null?t.end-t.start:o-A)),o===null&&(o=A+A-s);const c=A-(A-Math.min(s,o))/2*l;return{chunk:Math.abs(o-s)/2*l/r,ratio:n.barPercentage,start:c}}function eM(e,t,n,r){const a=n.parse(e[0],r),A=n.parse(e[1],r),s=Math.min(a,A),o=Math.max(a,A);let l=s,c=o;Math.abs(s)>Math.abs(o)&&(l=o,c=s),t[n.axis]=c,t._custom={barStart:l,barEnd:c,start:a,end:A,min:s,max:o}}function Jb(e,t,n,r){return Oe(e)?eM(e,t,n,r):t[n.axis]=n.parse(e,r),t}function Lv(e,t,n,r){const a=e.iScale,A=e.vScale,s=a.getLabels(),o=a===A,l=[];let c,u,d,f;for(c=n,u=n+r;c<u;++c)f=t[c],d={},d[a.axis]=o||a.parse(s[c],c),l.push(Jb(f,d,A,c));return l}function mf(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function tM(e,t,n){return e!==0?vr(e):(t.isHorizontal()?1:-1)*(t.min>=n?1:-1)}function nM(e){let t,n,r,a,A;return e.horizontal?(t=e.base>e.x,n="left",r="right"):(t=e.base<e.y,n="bottom",r="top"),t?(a="end",A="start"):(a="start",A="end"),{start:n,end:r,reverse:t,top:a,bottom:A}}function rM(e,t,n,r){let a=t.borderSkipped;const A={};if(!a){e.borderSkipped=A;return}if(a===!0){e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:s,end:o,reverse:l,top:c,bottom:u}=nM(e);a==="middle"&&n&&(e.enableBorderRadius=!0,(n._top||0)===r?a=c:(n._bottom||0)===r?a=u:(A[Ov(u,s,o,l)]=!0,a=c)),A[Ov(a,s,o,l)]=!0,e.borderSkipped=A}function Ov(e,t,n,r){return r?(e=aM(e,t,n),e=Mv(e,n,t)):e=Mv(e,t,n),e}function aM(e,t,n){return e===t?n:e===n?t:e}function Mv(e,t,n){return e==="start"?t:e==="end"?n:e}function AM(e,{inflateAmount:t},n){e.inflateAmount=t==="auto"?n===1?.33:0:t}class Tc extends er{parsePrimitiveData(t,n,r,a){return Lv(t,n,r,a)}parseArrayData(t,n,r,a){return Lv(t,n,r,a)}parseObjectData(t,n,r,a){const{iScale:A,vScale:s}=t,{xAxisKey:o="x",yAxisKey:l="y"}=this._parsing,c=A.axis==="x"?o:l,u=s.axis==="x"?o:l,d=[];let f,h,p,m;for(f=r,h=r+a;f<h;++f)m=n[f],p={},p[A.axis]=A.parse(Ga(m,c),f),d.push(Jb(Ga(m,u),p,s,f));return d}updateRangeFromParsed(t,n,r,a){super.updateRangeFromParsed(t,n,r,a);const A=r._custom;A&&n===this._cachedMeta.vScale&&(t.min=Math.min(t.min,A.min),t.max=Math.max(t.max,A.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const n=this._cachedMeta,{iScale:r,vScale:a}=n,A=this.getParsed(t),s=A._custom,o=mf(s)?"["+s.start+", "+s.end+"]":""+a.getLabelForValue(A[a.axis]);return{label:""+r.getLabelForValue(A[r.axis]),value:o}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,t)}updateElements(t,n,r,a){const A=a==="reset",{index:s,_cachedMeta:{vScale:o}}=this,l=o.getBasePixel(),c=o.isHorizontal(),u=this._getRuler(),{sharedOptions:d,includeOptions:f}=this._getSharedOptions(n,a);for(let h=n;h<n+r;h++){const p=this.getParsed(h),m=A||_e(p[o.axis])?{base:l,head:l}:this._calculateBarValuePixels(h),y=this._calculateBarIndexPixels(h,u),g=(p._stacks||{})[o.axis],v={horizontal:c,base:m.base,enableBorderRadius:!g||mf(p._custom)||s===g._top||s===g._bottom,x:c?m.head:y.center,y:c?y.center:m.head,height:c?y.size:Math.abs(m.size),width:c?Math.abs(m.size):y.size};f&&(v.options=d||this.resolveDataElementOptions(h,t[h].active?"active":a));const _=v.options||t[h].options;rM(v,_,g,s),AM(v,_,u.ratio),this.updateElement(t[h],h,v,a)}}_getStacks(t,n){const{iScale:r}=this._cachedMeta,a=r.getMatchingVisibleMetas(this._type).filter(l=>l.controller.options.grouped),A=r.options.stacked,s=[],o=l=>{const c=l.controller.getParsed(n),u=c&&c[l.vScale.axis];if(_e(u)||isNaN(u))return!0};for(const l of a)if(!(n!==void 0&&o(l))&&((A===!1||s.indexOf(l.stack)===-1||A===void 0&&l.stack===void 0)&&s.push(l.stack),l.index===t))break;return s.length||s.push(void 0),s}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,n,r){const a=this._getStacks(t,r),A=n!==void 0?a.indexOf(n):-1;return A===-1?a.length-1:A}_getRuler(){const t=this.options,n=this._cachedMeta,r=n.iScale,a=[];let A,s;for(A=0,s=n.data.length;A<s;++A)a.push(r.getPixelForValue(this.getParsed(A)[r.axis],A));const o=t.barThickness;return{min:o||XO(n),pixels:a,start:r._startPixel,end:r._endPixel,stackCount:this._getStackCount(),scale:r,grouped:t.grouped,ratio:o?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:n,_stacked:r,index:a},options:{base:A,minBarLength:s}}=this,o=A||0,l=this.getParsed(t),c=l._custom,u=mf(c);let d=l[n.axis],f=0,h=r?this.applyStack(n,l,r):d,p,m;h!==d&&(f=h-d,h=d),u&&(d=c.barStart,h=c.barEnd-c.barStart,d!==0&&vr(d)!==vr(c.barEnd)&&(f=0),f+=d);const y=!_e(A)&&!u?A:f;let g=n.getPixelForValue(y);if(this.chart.getDataVisibility(t)?p=n.getPixelForValue(f+h):p=g,m=p-g,Math.abs(m)<s){m=tM(m,n,o)*s,d===o&&(g-=m/2);const v=n.getPixelForDecimal(0),_=n.getPixelForDecimal(1),B=Math.min(v,_),b=Math.max(v,_);g=Math.max(Math.min(g,b),B),p=g+m,r&&!u&&(l._stacks[n.axis]._visualValues[a]=n.getValueForPixel(p)-n.getValueForPixel(g))}if(g===n.getPixelForValue(o)){const v=vr(m)*n.getLineWidthForValue(o)/2;g+=v,m-=v}return{size:m,base:g,head:p,center:p+m/2}}_calculateBarIndexPixels(t,n){const r=n.scale,a=this.options,A=a.skipNull,s=de(a.maxBarThickness,1/0);let o,l;if(n.grouped){const c=A?this._getStackCount(t):n.stackCount,u=a.barThickness==="flex"?ZO(t,n,a,c):JO(t,n,a,c),d=this._getStackIndex(this.index,this._cachedMeta.stack,A?t:void 0);o=u.start+u.chunk*d+u.chunk/2,l=Math.min(s,u.chunk*u.ratio)}else o=r.getPixelForValue(this.getParsed(t)[r.axis],t),l=Math.min(s,n.min*n.ratio);return{base:o-l/2,head:o+l/2,center:o,size:l}}draw(){const t=this._cachedMeta,n=t.vScale,r=t.data,a=r.length;let A=0;for(;A<a;++A)this.getParsed(A)[n.axis]!==null&&r[A].draw(this._ctx)}}R(Tc,"id","bar"),R(Tc,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),R(Tc,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class Dc extends er{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,n,r,a){const A=super.parsePrimitiveData(t,n,r,a);for(let s=0;s<A.length;s++)A[s]._custom=this.resolveDataElementOptions(s+r).radius;return A}parseArrayData(t,n,r,a){const A=super.parseArrayData(t,n,r,a);for(let s=0;s<A.length;s++){const o=n[r+s];A[s]._custom=de(o[2],this.resolveDataElementOptions(s+r).radius)}return A}parseObjectData(t,n,r,a){const A=super.parseObjectData(t,n,r,a);for(let s=0;s<A.length;s++){const o=n[r+s];A[s]._custom=de(o&&o.r&&+o.r,this.resolveDataElementOptions(s+r).radius)}return A}getMaxOverflow(){const t=this._cachedMeta.data;let n=0;for(let r=t.length-1;r>=0;--r)n=Math.max(n,t[r].size(this.resolveDataElementOptions(r))/2);return n>0&&n}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart.data.labels||[],{xScale:a,yScale:A}=n,s=this.getParsed(t),o=a.getLabelForValue(s.x),l=A.getLabelForValue(s.y),c=s._custom;return{label:r[t]||"",value:"("+o+", "+l+(c?", "+c:"")+")"}}update(t){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,t)}updateElements(t,n,r,a){const A=a==="reset",{iScale:s,vScale:o}=this._cachedMeta,{sharedOptions:l,includeOptions:c}=this._getSharedOptions(n,a),u=s.axis,d=o.axis;for(let f=n;f<n+r;f++){const h=t[f],p=!A&&this.getParsed(f),m={},y=m[u]=A?s.getPixelForDecimal(.5):s.getPixelForValue(p[u]),g=m[d]=A?o.getBasePixel():o.getPixelForValue(p[d]);m.skip=isNaN(y)||isNaN(g),c&&(m.options=l||this.resolveDataElementOptions(f,h.active?"active":a),A&&(m.options.radius=0)),this.updateElement(h,f,m,a)}}resolveDataElementOptions(t,n){const r=this.getParsed(t);let a=super.resolveDataElementOptions(t,n);a.$shared&&(a=Object.assign({},a,{$shared:!1}));const A=a.radius;return n!=="active"&&(a.radius=0),a.radius+=de(r&&r._custom,A),a}}R(Dc,"id","bubble"),R(Dc,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),R(Dc,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function sM(e,t,n){let r=1,a=1,A=0,s=0;if(t<Xe){const o=e,l=o+t,c=Math.cos(o),u=Math.sin(o),d=Math.cos(l),f=Math.sin(l),h=(_,B,b)=>So(_,o,l,!0)?1:Math.max(B,B*n,b,b*n),p=(_,B,b)=>So(_,o,l,!0)?-1:Math.min(B,B*n,b,b*n),m=h(0,c,d),y=h(Je,u,f),g=p(Qe,c,d),v=p(Qe+Je,u,f);r=(m-g)/2,a=(y-v)/2,A=-(m+g)/2,s=-(y+v)/2}return{ratioX:r,ratioY:a,offsetX:A,offsetY:s}}class BA extends er{constructor(t,n){super(t,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,n){const r=this.getDataset().data,a=this._cachedMeta;if(this._parsing===!1)a._parsed=r;else{let A=l=>+r[l];if(ve(r[t])){const{key:l="value"}=this._parsing;A=c=>+Ga(r[c],l)}let s,o;for(s=t,o=t+n;s<o;++s)a._parsed[s]=A(s)}}_getRotation(){return Et(this.options.rotation-90)}_getCircumference(){return Et(this.options.circumference)}_getRotationExtents(){let t=Xe,n=-Xe;for(let r=0;r<this.chart.data.datasets.length;++r)if(this.chart.isDatasetVisible(r)&&this.chart.getDatasetMeta(r).type===this._type){const a=this.chart.getDatasetMeta(r).controller,A=a._getRotation(),s=a._getCircumference();t=Math.min(t,A),n=Math.max(n,A+s)}return{rotation:t,circumference:n-t}}update(t){const n=this.chart,{chartArea:r}=n,a=this._cachedMeta,A=a.data,s=this.getMaxBorderWidth()+this.getMaxOffset(A)+this.options.spacing,o=Math.max((Math.min(r.width,r.height)-s)/2,0),l=Math.min(wL(this.options.cutout,o),1),c=this._getRingWeight(this.index),{circumference:u,rotation:d}=this._getRotationExtents(),{ratioX:f,ratioY:h,offsetX:p,offsetY:m}=sM(d,u,l),y=(r.width-s)/f,g=(r.height-s)/h,v=Math.max(Math.min(y,g)/2,0),_=kb(this.options.radius,v),B=Math.max(_*l,0),b=(_-B)/this._getVisibleDatasetWeightTotal();this.offsetX=p*_,this.offsetY=m*_,a.total=this.calculateTotal(),this.outerRadius=_-b*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-b*c,0),this.updateElements(A,0,A.length,t)}_circumference(t,n){const r=this.options,a=this._cachedMeta,A=this._getCircumference();return n&&r.animation.animateRotate||!this.chart.getDataVisibility(t)||a._parsed[t]===null||a.data[t].hidden?0:this.calculateCircumference(a._parsed[t]*A/Xe)}updateElements(t,n,r,a){const A=a==="reset",s=this.chart,o=s.chartArea,c=s.options.animation,u=(o.left+o.right)/2,d=(o.top+o.bottom)/2,f=A&&c.animateScale,h=f?0:this.innerRadius,p=f?0:this.outerRadius,{sharedOptions:m,includeOptions:y}=this._getSharedOptions(n,a);let g=this._getRotation(),v;for(v=0;v<n;++v)g+=this._circumference(v,A);for(v=n;v<n+r;++v){const _=this._circumference(v,A),B=t[v],b={x:u+this.offsetX,y:d+this.offsetY,startAngle:g,endAngle:g+_,circumference:_,outerRadius:p,innerRadius:h};y&&(b.options=m||this.resolveDataElementOptions(v,B.active?"active":a)),g+=_,this.updateElement(B,v,b,a)}}calculateTotal(){const t=this._cachedMeta,n=t.data;let r=0,a;for(a=0;a<n.length;a++){const A=t._parsed[a];A!==null&&!isNaN(A)&&this.chart.getDataVisibility(a)&&!n[a].hidden&&(r+=Math.abs(A))}return r}calculateCircumference(t){const n=this._cachedMeta.total;return n>0&&!isNaN(t)?Xe*(Math.abs(t)/n):0}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart,a=r.data.labels||[],A=el(n._parsed[t],r.options.locale);return{label:a[t]||"",value:A}}getMaxBorderWidth(t){let n=0;const r=this.chart;let a,A,s,o,l;if(!t){for(a=0,A=r.data.datasets.length;a<A;++a)if(r.isDatasetVisible(a)){s=r.getDatasetMeta(a),t=s.data,o=s.controller;break}}if(!t)return 0;for(a=0,A=t.length;a<A;++a)l=o.resolveDataElementOptions(a),l.borderAlign!=="inner"&&(n=Math.max(n,l.borderWidth||0,l.hoverBorderWidth||0));return n}getMaxOffset(t){let n=0;for(let r=0,a=t.length;r<a;++r){const A=this.resolveDataElementOptions(r);n=Math.max(n,A.offset||0,A.hoverOffset||0)}return n}_getRingWeightOffset(t){let n=0;for(let r=0;r<t;++r)this.chart.isDatasetVisible(r)&&(n+=this._getRingWeight(r));return n}_getRingWeight(t){return Math.max(de(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}R(BA,"id","doughnut"),R(BA,"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"}),R(BA,"descriptors",{_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),R(BA,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:r,color:a}}=t.legend.options;return n.labels.map((A,s)=>{const l=t.getDatasetMeta(0).controller.getStyle(s);return{text:A,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:a,lineWidth:l.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(s),index:s}})}return[]}},onClick(t,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}}});class Lc extends er{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const n=this._cachedMeta,{dataset:r,data:a=[],_dataset:A}=n,s=this.chart._animationsDisabled;let{start:o,count:l}=Db(n,a,s);this._drawStart=o,this._drawCount=l,Lb(n)&&(o=0,l=a.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!A._decimated,r.points=a;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(r,void 0,{animated:!s,options:c},t),this.updateElements(a,o,l,t)}updateElements(t,n,r,a){const A=a==="reset",{iScale:s,vScale:o,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:u,includeOptions:d}=this._getSharedOptions(n,a),f=s.axis,h=o.axis,{spanGaps:p,segment:m}=this.options,y=za(p)?p:Number.POSITIVE_INFINITY,g=this.chart._animationsDisabled||A||a==="none",v=n+r,_=t.length;let B=n>0&&this.getParsed(n-1);for(let b=0;b<_;++b){const w=t[b],C=g?w:{};if(b<n||b>=v){C.skip=!0;continue}const k=this.getParsed(b),S=_e(k[h]),T=C[f]=s.getPixelForValue(k[f],b),U=C[h]=A||S?o.getBasePixel():o.getPixelForValue(l?this.applyStack(o,k,l):k[h],b);C.skip=isNaN(T)||isNaN(U)||S,C.stop=b>0&&Math.abs(k[f]-B[f])>y,m&&(C.parsed=k,C.raw=c.data[b]),d&&(C.options=u||this.resolveDataElementOptions(b,w.active?"active":a)),g||this.updateElement(w,b,C,a),B=k}}getMaxOverflow(){const t=this._cachedMeta,n=t.dataset,r=n.options&&n.options.borderWidth||0,a=t.data||[];if(!a.length)return r;const A=a[0].size(this.resolveDataElementOptions(0)),s=a[a.length-1].size(this.resolveDataElementOptions(a.length-1));return Math.max(r,A,s)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}R(Lc,"id","line"),R(Lc,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),R(Lc,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class Ji extends er{constructor(t,n){super(t,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart,a=r.data.labels||[],A=el(n._parsed[t].r,r.options.locale);return{label:a[t]||"",value:A}}parseObjectData(t,n,r,a){return Kb.bind(this)(t,n,r,a)}update(t){const n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,t)}getMinMax(){const t=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((r,a)=>{const A=this.getParsed(a).r;!isNaN(A)&&this.chart.getDataVisibility(a)&&(A<n.min&&(n.min=A),A>n.max&&(n.max=A))}),n}_updateRadius(){const t=this.chart,n=t.chartArea,r=t.options,a=Math.min(n.right-n.left,n.bottom-n.top),A=Math.max(a/2,0),s=Math.max(r.cutoutPercentage?A/100*r.cutoutPercentage:1,0),o=(A-s)/t.getVisibleDatasetCount();this.outerRadius=A-o*this.index,this.innerRadius=this.outerRadius-o}updateElements(t,n,r,a){const A=a==="reset",s=this.chart,l=s.options.animation,c=this._cachedMeta.rScale,u=c.xCenter,d=c.yCenter,f=c.getIndexAngle(0)-.5*Qe;let h=f,p;const m=360/this.countVisibleElements();for(p=0;p<n;++p)h+=this._computeAngle(p,a,m);for(p=n;p<n+r;p++){const y=t[p];let g=h,v=h+this._computeAngle(p,a,m),_=s.getDataVisibility(p)?c.getDistanceFromCenterForValue(this.getParsed(p).r):0;h=v,A&&(l.animateScale&&(_=0),l.animateRotate&&(g=v=f));const B={x:u,y:d,innerRadius:0,outerRadius:_,startAngle:g,endAngle:v,options:this.resolveDataElementOptions(p,y.active?"active":a)};this.updateElement(y,p,B,a)}}countVisibleElements(){const t=this._cachedMeta;let n=0;return t.data.forEach((r,a)=>{!isNaN(this.getParsed(a).r)&&this.chart.getDataVisibility(a)&&n++}),n}_computeAngle(t,n,r){return this.chart.getDataVisibility(t)?Et(this.resolveDataElementOptions(t,n).angle||r):0}}R(Ji,"id","polarArea"),R(Ji,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),R(Ji,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:r,color:a}}=t.legend.options;return n.labels.map((A,s)=>{const l=t.getDatasetMeta(0).controller.getStyle(s);return{text:A,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:a,lineWidth:l.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(s),index:s}})}return[]}},onClick(t,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class Oh extends BA{}R(Oh,"id","pie"),R(Oh,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class Oc extends er{getLabelAndValue(t){const n=this._cachedMeta.vScale,r=this.getParsed(t);return{label:n.getLabels()[t],value:""+n.getLabelForValue(r[n.axis])}}parseObjectData(t,n,r,a){return Kb.bind(this)(t,n,r,a)}update(t){const n=this._cachedMeta,r=n.dataset,a=n.data||[],A=n.iScale.getLabels();if(r.points=a,t!=="resize"){const s=this.resolveDatasetElementOptions(t);this.options.showLine||(s.borderWidth=0);const o={_loop:!0,_fullLoop:A.length===a.length,options:s};this.updateElement(r,void 0,o,t)}this.updateElements(a,0,a.length,t)}updateElements(t,n,r,a){const A=this._cachedMeta.rScale,s=a==="reset";for(let o=n;o<n+r;o++){const l=t[o],c=this.resolveDataElementOptions(o,l.active?"active":a),u=A.getPointPositionForValue(o,this.getParsed(o).r),d=s?A.xCenter:u.x,f=s?A.yCenter:u.y,h={x:d,y:f,angle:u.angle,skip:isNaN(d)||isNaN(f),options:c};this.updateElement(l,o,h,a)}}}R(Oc,"id","radar"),R(Oc,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),R(Oc,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class Mc extends er{getLabelAndValue(t){const n=this._cachedMeta,r=this.chart.data.labels||[],{xScale:a,yScale:A}=n,s=this.getParsed(t),o=a.getLabelForValue(s.x),l=A.getLabelForValue(s.y);return{label:r[t]||"",value:"("+o+", "+l+")"}}update(t){const n=this._cachedMeta,{data:r=[]}=n,a=this.chart._animationsDisabled;let{start:A,count:s}=Db(n,r,a);if(this._drawStart=A,this._drawCount=s,Lb(n)&&(A=0,s=r.length),this.options.showLine){const{dataset:o,_dataset:l}=n;o._chart=this.chart,o._datasetIndex=this.index,o._decimated=!!l._decimated,o.points=r;const c=this.resolveDatasetElementOptions(t);c.segment=this.options.segment,this.updateElement(o,void 0,{animated:!a,options:c},t)}this.updateElements(r,A,s,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,n,r,a){const A=a==="reset",{iScale:s,vScale:o,_stacked:l,_dataset:c}=this._cachedMeta,u=this.resolveDataElementOptions(n,a),d=this.getSharedOptions(u),f=this.includeOptions(a,d),h=s.axis,p=o.axis,{spanGaps:m,segment:y}=this.options,g=za(m)?m:Number.POSITIVE_INFINITY,v=this.chart._animationsDisabled||A||a==="none";let _=n>0&&this.getParsed(n-1);for(let B=n;B<n+r;++B){const b=t[B],w=this.getParsed(B),C=v?b:{},k=_e(w[p]),S=C[h]=s.getPixelForValue(w[h],B),T=C[p]=A||k?o.getBasePixel():o.getPixelForValue(l?this.applyStack(o,w,l):w[p],B);C.skip=isNaN(S)||isNaN(T)||k,C.stop=B>0&&Math.abs(w[h]-_[h])>g,y&&(C.parsed=w,C.raw=c.data[B]),f&&(C.options=d||this.resolveDataElementOptions(B,b.active?"active":a)),v||this.updateElement(b,B,C,a),_=w}this.updateSharedOptions(d,a,u)}getMaxOverflow(){const t=this._cachedMeta,n=t.data||[];if(!this.options.showLine){let o=0;for(let l=n.length-1;l>=0;--l)o=Math.max(o,n[l].size(this.resolveDataElementOptions(l))/2);return o>0&&o}const r=t.dataset,a=r.options&&r.options.borderWidth||0;if(!n.length)return a;const A=n[0].size(this.resolveDataElementOptions(0)),s=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(a,A,s)/2}}R(Mc,"id","scatter"),R(Mc,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),R(Mc,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var iM=Object.freeze({__proto__:null,BarController:Tc,BubbleController:Dc,DoughnutController:BA,LineController:Lc,PieController:Oh,PolarAreaController:Ji,RadarController:Oc,ScatterController:Mc});function iA(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Yg{constructor(t){R(this,"options");this.options=t||{}}static override(t){Object.assign(Yg.prototype,t)}init(){}formats(){return iA()}parse(){return iA()}format(){return iA()}add(){return iA()}diff(){return iA()}startOf(){return iA()}endOf(){return iA()}}var Zb={_date:Yg};function oM(e,t,n,r){const{controller:a,data:A,_sorted:s}=e,o=a._cachedMeta.iScale;if(o&&t===o.axis&&t!=="r"&&s&&A.length){const l=o._reversePixels?QL:Wr;if(r){if(a._sharedOptions){const c=A[0],u=typeof c.getRange=="function"&&c.getRange(t);if(u){const d=l(A,t,n-u),f=l(A,t,n+u);return{lo:d.lo,hi:f.hi}}}}else return l(A,t,n)}return{lo:0,hi:A.length-1}}function rl(e,t,n,r,a){const A=e.getSortedVisibleDatasetMetas(),s=n[t];for(let o=0,l=A.length;o<l;++o){const{index:c,data:u}=A[o],{lo:d,hi:f}=oM(A[o],t,s,a);for(let h=d;h<=f;++h){const p=u[h];p.skip||r(p,c,h)}}}function lM(e){const t=e.indexOf("x")!==-1,n=e.indexOf("y")!==-1;return function(r,a){const A=t?Math.abs(r.x-a.x):0,s=n?Math.abs(r.y-a.y):0;return Math.sqrt(Math.pow(A,2)+Math.pow(s,2))}}function vf(e,t,n,r,a){const A=[];return!a&&!e.isPointInArea(t)||rl(e,n,t,function(o,l,c){!a&&!Gr(o,e.chartArea,0)||o.inRange(t.x,t.y,r)&&A.push({element:o,datasetIndex:l,index:c})},!0),A}function cM(e,t,n,r){let a=[];function A(s,o,l){const{startAngle:c,endAngle:u}=s.getProps(["startAngle","endAngle"],r),{angle:d}=Fb(s,{x:t.x,y:t.y});So(d,c,u)&&a.push({element:s,datasetIndex:o,index:l})}return rl(e,n,t,A),a}function uM(e,t,n,r,a,A){let s=[];const o=lM(n);let l=Number.POSITIVE_INFINITY;function c(u,d,f){const h=u.inRange(t.x,t.y,a);if(r&&!h)return;const p=u.getCenterPoint(a);if(!(!!A||e.isPointInArea(p))&&!h)return;const y=o(t,p);y<l?(s=[{element:u,datasetIndex:d,index:f}],l=y):y===l&&s.push({element:u,datasetIndex:d,index:f})}return rl(e,n,t,c),s}function Bf(e,t,n,r,a,A){return!A&&!e.isPointInArea(t)?[]:n==="r"&&!r?cM(e,t,n,a):uM(e,t,n,r,a,A)}function Nv(e,t,n,r,a){const A=[],s=n==="x"?"inXRange":"inYRange";let o=!1;return rl(e,n,t,(l,c,u)=>{l[s](t[n],a)&&(A.push({element:l,datasetIndex:c,index:u}),o=o||l.inRange(t.x,t.y,a))}),r&&!o?[]:A}var dM={evaluateInteractionItems:rl,modes:{index(e,t,n,r){const a=dA(t,e),A=n.axis||"x",s=n.includeInvisible||!1,o=n.intersect?vf(e,a,A,r,s):Bf(e,a,A,!1,r,s),l=[];return o.length?(e.getSortedVisibleDatasetMetas().forEach(c=>{const u=o[0].index,d=c.data[u];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:u})}),l):[]},dataset(e,t,n,r){const a=dA(t,e),A=n.axis||"xy",s=n.includeInvisible||!1;let o=n.intersect?vf(e,a,A,r,s):Bf(e,a,A,!1,r,s);if(o.length>0){const l=o[0].datasetIndex,c=e.getDatasetMeta(l).data;o=[];for(let u=0;u<c.length;++u)o.push({element:c[u],datasetIndex:l,index:u})}return o},point(e,t,n,r){const a=dA(t,e),A=n.axis||"xy",s=n.includeInvisible||!1;return vf(e,a,A,r,s)},nearest(e,t,n,r){const a=dA(t,e),A=n.axis||"xy",s=n.includeInvisible||!1;return Bf(e,a,A,n.intersect,r,s)},x(e,t,n,r){const a=dA(t,e);return Nv(e,a,"x",n.intersect,r)},y(e,t,n,r){const a=dA(t,e);return Nv(e,a,"y",n.intersect,r)}}};const e_=["left","top","right","bottom"];function hi(e,t){return e.filter(n=>n.pos===t)}function Pv(e,t){return e.filter(n=>e_.indexOf(n.pos)===-1&&n.box.axis===t)}function pi(e,t){return e.sort((n,r)=>{const a=t?r:n,A=t?n:r;return a.weight===A.weight?a.index-A.index:a.weight-A.weight})}function fM(e){const t=[];let n,r,a,A,s,o;for(n=0,r=(e||[]).length;n<r;++n)a=e[n],{position:A,options:{stack:s,stackWeight:o=1}}=a,t.push({index:n,box:a,pos:A,horizontal:a.isHorizontal(),weight:a.weight,stack:s&&A+s,stackWeight:o});return t}function hM(e){const t={};for(const n of e){const{stack:r,pos:a,stackWeight:A}=n;if(!r||!e_.includes(a))continue;const s=t[r]||(t[r]={count:0,placed:0,weight:0,size:0});s.count++,s.weight+=A}return t}function pM(e,t){const n=hM(e),{vBoxMaxWidth:r,hBoxMaxHeight:a}=t;let A,s,o;for(A=0,s=e.length;A<s;++A){o=e[A];const{fullSize:l}=o.box,c=n[o.stack],u=c&&o.stackWeight/c.weight;o.horizontal?(o.width=u?u*r:l&&t.availableWidth,o.height=a):(o.width=r,o.height=u?u*a:l&&t.availableHeight)}return n}function gM(e){const t=fM(e),n=pi(t.filter(c=>c.box.fullSize),!0),r=pi(hi(t,"left"),!0),a=pi(hi(t,"right")),A=pi(hi(t,"top"),!0),s=pi(hi(t,"bottom")),o=Pv(t,"x"),l=Pv(t,"y");return{fullSize:n,leftAndTop:r.concat(A),rightAndBottom:a.concat(l).concat(s).concat(o),chartArea:hi(t,"chartArea"),vertical:r.concat(a).concat(l),horizontal:A.concat(s).concat(o)}}function Hv(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function t_(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function mM(e,t,n,r){const{pos:a,box:A}=n,s=e.maxPadding;if(!ve(a)){n.size&&(e[a]-=n.size);const d=r[n.stack]||{size:0,count:1};d.size=Math.max(d.size,n.horizontal?A.height:A.width),n.size=d.size/d.count,e[a]+=n.size}A.getPadding&&t_(s,A.getPadding());const o=Math.max(0,t.outerWidth-Hv(s,e,"left","right")),l=Math.max(0,t.outerHeight-Hv(s,e,"top","bottom")),c=o!==e.w,u=l!==e.h;return e.w=o,e.h=l,n.horizontal?{same:c,other:u}:{same:u,other:c}}function vM(e){const t=e.maxPadding;function n(r){const a=Math.max(t[r]-e[r],0);return e[r]+=a,a}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function BM(e,t){const n=t.maxPadding;function r(a){const A={left:0,top:0,right:0,bottom:0};return a.forEach(s=>{A[s]=Math.max(t[s],n[s])}),A}return r(e?["left","right"]:["top","bottom"])}function Fi(e,t,n,r){const a=[];let A,s,o,l,c,u;for(A=0,s=e.length,c=0;A<s;++A){o=e[A],l=o.box,l.update(o.width||t.w,o.height||t.h,BM(o.horizontal,t));const{same:d,other:f}=mM(t,n,o,r);c|=d&&a.length,u=u||f,l.fullSize||a.push(o)}return c&&Fi(a,t,n,r)||u}function $l(e,t,n,r,a){e.top=n,e.left=t,e.right=t+r,e.bottom=n+a,e.width=r,e.height=a}function Rv(e,t,n,r){const a=n.padding;let{x:A,y:s}=t;for(const o of e){const l=o.box,c=r[o.stack]||{count:1,placed:0,weight:1},u=o.stackWeight/c.weight||1;if(o.horizontal){const d=t.w*u,f=c.size||l.height;vn(c.start)&&(s=c.start),l.fullSize?$l(l,a.left,s,n.outerWidth-a.right-a.left,f):$l(l,t.left+c.placed,s,d,f),c.start=s,c.placed+=d,s=l.bottom}else{const d=t.h*u,f=c.size||l.width;vn(c.start)&&(A=c.start),l.fullSize?$l(l,A,a.top,f,n.outerHeight-a.bottom-a.top):$l(l,A,t.top+c.placed,f,d),c.start=A,c.placed+=d,A=l.right}}t.x=A,t.y=s}var Gt={addBox(e,t){e.boxes||(e.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(n){t.draw(n)}}]},e.boxes.push(t)},removeBox(e,t){const n=e.boxes?e.boxes.indexOf(t):-1;n!==-1&&e.boxes.splice(n,1)},configure(e,t,n){t.fullSize=n.fullSize,t.position=n.position,t.weight=n.weight},update(e,t,n,r){if(!e)return;const a=_t(e.options.layout.padding),A=Math.max(t-a.width,0),s=Math.max(n-a.height,0),o=gM(e.boxes),l=o.vertical,c=o.horizontal;Ve(e.boxes,m=>{typeof m.beforeLayout=="function"&&m.beforeLayout()});const u=l.reduce((m,y)=>y.box.options&&y.box.options.display===!1?m:m+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:n,padding:a,availableWidth:A,availableHeight:s,vBoxMaxWidth:A/2/u,hBoxMaxHeight:s/2}),f=Object.assign({},a);t_(f,_t(r));const h=Object.assign({maxPadding:f,w:A,h:s,x:a.left,y:a.top},a),p=pM(l.concat(c),d);Fi(o.fullSize,h,d,p),Fi(l,h,d,p),Fi(c,h,d,p)&&Fi(l,h,d,p),vM(h),Rv(o.leftAndTop,h,d,p),h.x+=h.w,h.y+=h.h,Rv(o.rightAndBottom,h,d,p),e.chartArea={left:h.left,top:h.top,right:h.left+h.w,bottom:h.top+h.h,height:h.h,width:h.w},Ve(o.chartArea,m=>{const y=m.box;Object.assign(y,e.chartArea),y.update(h.w,h.h,{left:0,top:0,right:0,bottom:0})})}};class n_{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,r){}removeEventListener(t,n,r){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,r,a){return n=Math.max(0,n||t.width),r=r||t.height,{width:n,height:Math.max(0,a?Math.floor(n/a):r)}}isAttached(t){return!0}updateConfig(t){}}class yM extends n_{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Nc="$chartjs",wM={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Vv=e=>e===null||e==="";function bM(e,t){const n=e.style,r=e.getAttribute("height"),a=e.getAttribute("width");if(e[Nc]={initial:{height:r,width:a,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",Vv(a)){const A=Cv(e,"width");A!==void 0&&(e.width=A)}if(Vv(r))if(e.style.height==="")e.height=e.width/(t||2);else{const A=Cv(e,"height");A!==void 0&&(e.height=A)}return e}const r_=EO?{passive:!0}:!1;function _M(e,t,n){e.addEventListener(t,n,r_)}function CM(e,t,n){e.canvas.removeEventListener(t,n,r_)}function EM(e,t){const n=wM[e.type]||e.type,{x:r,y:a}=dA(e,t);return{type:n,chart:t,native:e,x:r!==void 0?r:null,y:a!==void 0?a:null}}function fu(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function kM(e,t,n){const r=e.canvas,a=new MutationObserver(A=>{let s=!1;for(const o of A)s=s||fu(o.addedNodes,r),s=s&&!fu(o.removedNodes,r);s&&n()});return a.observe(document,{childList:!0,subtree:!0}),a}function SM(e,t,n){const r=e.canvas,a=new MutationObserver(A=>{let s=!1;for(const o of A)s=s||fu(o.removedNodes,r),s=s&&!fu(o.addedNodes,r);s&&n()});return a.observe(document,{childList:!0,subtree:!0}),a}const xo=new Map;let Kv=0;function a_(){const e=window.devicePixelRatio;e!==Kv&&(Kv=e,xo.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function xM(e,t){xo.size||window.addEventListener("resize",a_),xo.set(e,t)}function FM(e){xo.delete(e),xo.size||window.removeEventListener("resize",a_)}function IM(e,t,n){const r=e.canvas,a=r&&zg(r);if(!a)return;const A=Tb((o,l)=>{const c=a.clientWidth;n(o,l),c<a.clientWidth&&n()},window),s=new ResizeObserver(o=>{const l=o[0],c=l.contentRect.width,u=l.contentRect.height;c===0&&u===0||A(c,u)});return s.observe(a),xM(e,A),s}function yf(e,t,n){n&&n.disconnect(),t==="resize"&&FM(e)}function UM(e,t,n){const r=e.canvas,a=Tb(A=>{e.ctx!==null&&n(EM(A,e))},e);return _M(r,t,a),a}class QM extends n_{acquireContext(t,n){const r=t&&t.getContext&&t.getContext("2d");return r&&r.canvas===t?(bM(t,n),r):null}releaseContext(t){const n=t.canvas;if(!n[Nc])return!1;const r=n[Nc].initial;["height","width"].forEach(A=>{const s=r[A];_e(s)?n.removeAttribute(A):n.setAttribute(A,s)});const a=r.style||{};return Object.keys(a).forEach(A=>{n.style[A]=a[A]}),n.width=n.width,delete n[Nc],!0}addEventListener(t,n,r){this.removeEventListener(t,n);const a=t.$proxies||(t.$proxies={}),s={attach:kM,detach:SM,resize:IM}[n]||UM;a[n]=s(t,n,r)}removeEventListener(t,n){const r=t.$proxies||(t.$proxies={}),a=r[n];if(!a)return;({attach:yf,detach:yf,resize:yf}[n]||CM)(t,n,a),r[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,r,a){return CO(t,n,r,a)}isAttached(t){const n=zg(t);return!!(n&&n.isConnected)}}function TM(e){return!Wb()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?yM:QM}var xc;let an=(xc=class{constructor(){R(this,"x");R(this,"y");R(this,"active",!1);R(this,"options");R(this,"$animations")}tooltipPosition(t){const{x:n,y:r}=this.getProps(["x","y"],t);return{x:n,y:r}}hasValue(){return za(this.x)&&za(this.y)}getProps(t,n){const r=this.$animations;if(!n||!r)return this;const a={};return t.forEach(A=>{a[A]=r[A]&&r[A].active()?r[A]._to:this[A]}),a}},R(xc,"defaults",{}),R(xc,"defaultRoutes"),xc);function DM(e,t){const n=e.options.ticks,r=LM(e),a=Math.min(n.maxTicksLimit||r,r),A=n.major.enabled?MM(t):[],s=A.length,o=A[0],l=A[s-1],c=[];if(s>a)return NM(t,c,A,s/a),c;const u=OM(A,t,a);if(s>0){let d,f;const h=s>1?Math.round((l-o)/(s-1)):null;for(Wl(t,c,u,_e(h)?0:o-h,o),d=0,f=s-1;d<f;d++)Wl(t,c,u,A[d],A[d+1]);return Wl(t,c,u,l,_e(h)?t.length:l+h),c}return Wl(t,c,u),c}function LM(e){const t=e.options.offset,n=e._tickSize(),r=e._length/n+(t?0:1),a=e._maxLength/n;return Math.floor(Math.min(r,a))}function OM(e,t,n){const r=PM(e),a=t.length/n;if(!r)return Math.max(a,1);const A=xL(r);for(let s=0,o=A.length-1;s<o;s++){const l=A[s];if(l>a)return l}return Math.max(a,1)}function MM(e){const t=[];let n,r;for(n=0,r=e.length;n<r;n++)e[n].major&&t.push(n);return t}function NM(e,t,n,r){let a=0,A=n[0],s;for(r=Math.ceil(r),s=0;s<e.length;s++)s===A&&(t.push(e[s]),a++,A=n[a*r])}function Wl(e,t,n,r,a){const A=de(r,0),s=Math.min(de(a,e.length),e.length);let o=0,l,c,u;for(n=Math.ceil(n),a&&(l=a-r,n=l/Math.floor(l/n)),u=A;u<0;)o++,u=Math.round(A+o*n);for(c=Math.max(A,0);c<s;c++)c===u&&(t.push(e[c]),o++,u=Math.round(A+o*n))}function PM(e){const t=e.length;let n,r;if(t<2)return!1;for(r=e[0],n=1;n<t;++n)if(e[n]-e[n-1]!==r)return!1;return r}const HM=e=>e==="left"?"right":e==="right"?"left":e,$v=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,Wv=(e,t)=>Math.min(t||e,e);function Gv(e,t){const n=[],r=e.length/t,a=e.length;let A=0;for(;A<a;A+=r)n.push(e[Math.floor(A)]);return n}function RM(e,t,n){const r=e.ticks.length,a=Math.min(t,r-1),A=e._startPixel,s=e._endPixel,o=1e-6;let l=e.getPixelForTick(a),c;if(!(n&&(r===1?c=Math.max(l-A,s-l):t===0?c=(e.getPixelForTick(1)-l)/2:c=(l-e.getPixelForTick(a-1))/2,l+=a<t?c:-c,l<A-o||l>s+o)))return l}function VM(e,t){Ve(e,n=>{const r=n.gc,a=r.length/2;let A;if(a>t){for(A=0;A<a;++A)delete n.data[r[A]];r.splice(0,a)}})}function gi(e){return e.drawTicks?e.tickLength:0}function zv(e,t){if(!e.display)return 0;const n=ft(e.font,t),r=_t(e.padding);return(Oe(e.text)?e.text.length:1)*n.lineHeight+r.height}function KM(e,t){return rA(e,{scale:t,type:"scale"})}function $M(e,t,n){return rA(e,{tick:n,index:t,type:"tick"})}function WM(e,t,n){let r=Rg(e);return(n&&t!=="right"||!n&&t==="right")&&(r=HM(r)),r}function GM(e,t,n,r){const{top:a,left:A,bottom:s,right:o,chart:l}=e,{chartArea:c,scales:u}=l;let d=0,f,h,p;const m=s-a,y=o-A;if(e.isHorizontal()){if(h=$t(r,A,o),ve(n)){const g=Object.keys(n)[0],v=n[g];p=u[g].getPixelForValue(v)+m-t}else n==="center"?p=(c.bottom+c.top)/2+m-t:p=$v(e,n,t);f=o-A}else{if(ve(n)){const g=Object.keys(n)[0],v=n[g];h=u[g].getPixelForValue(v)-y+t}else n==="center"?h=(c.left+c.right)/2-y+t:h=$v(e,n,t);p=$t(r,s,a),d=n==="left"?-Je:Je}return{titleX:h,titleY:p,maxWidth:f,rotation:d}}class $A extends an{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,n){return t}getUserBounds(){let{_userMin:t,_userMax:n,_suggestedMin:r,_suggestedMax:a}=this;return t=wn(t,Number.POSITIVE_INFINITY),n=wn(n,Number.NEGATIVE_INFINITY),r=wn(r,Number.POSITIVE_INFINITY),a=wn(a,Number.NEGATIVE_INFINITY),{min:wn(t,r),max:wn(n,a),minDefined:ut(t),maxDefined:ut(n)}}getMinMax(t){let{min:n,max:r,minDefined:a,maxDefined:A}=this.getUserBounds(),s;if(a&&A)return{min:n,max:r};const o=this.getMatchingVisibleMetas();for(let l=0,c=o.length;l<c;++l)s=o[l].controller.getMinMax(this,t),a||(n=Math.min(n,s.min)),A||(r=Math.max(r,s.max));return n=A&&n>r?r:n,r=a&&n>r?n:r,{min:wn(n,wn(r,n)),max:wn(r,wn(n,r))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){He(this.options.beforeUpdate,[this])}update(t,n,r){const{beginAtZero:a,grace:A,ticks:s}=this.options,o=s.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=nO(this,A,a),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=o<this.ticks.length;this._convertTicksToLabels(l?Gv(this.ticks,o):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),s.display&&(s.autoSkip||s.source==="auto")&&(this.ticks=DM(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,n,r;this.isHorizontal()?(n=this.left,r=this.right):(n=this.top,r=this.bottom,t=!t),this._startPixel=n,this._endPixel=r,this._reversePixels=t,this._length=r-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){He(this.options.afterUpdate,[this])}beforeSetDimensions(){He(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(){He(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),He(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){He(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const n=this.options.ticks;let r,a,A;for(r=0,a=t.length;r<a;r++)A=t[r],A.label=He(n.callback,[A.value,r,t],this)}afterTickToLabelConversion(){He(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){He(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,n=t.ticks,r=Wv(this.ticks.length,t.ticks.maxTicksLimit),a=n.minRotation||0,A=n.maxRotation;let s=a,o,l,c;if(!this._isVisible()||!n.display||a>=A||r<=1||!this.isHorizontal()){this.labelRotation=a;return}const u=this._getLabelSizes(),d=u.widest.width,f=u.highest.height,h=Mt(this.chart.width-d,0,this.maxWidth);o=t.offset?this.maxWidth/r:h/(r-1),d+6>o&&(o=h/(r-(t.offset?.5:1)),l=this.maxHeight-gi(t.grid)-n.padding-zv(t.title,this.chart.options.font),c=Math.sqrt(d*d+f*f),s=ed(Math.min(Math.asin(Mt((u.highest.height+6)/o,-1,1)),Math.asin(Mt(l/c,-1,1))-Math.asin(Mt(f/c,-1,1)))),s=Math.max(a,Math.min(A,s))),this.labelRotation=s}afterCalculateLabelRotation(){He(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){He(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:r,title:a,grid:A}}=this,s=this._isVisible(),o=this.isHorizontal();if(s){const l=zv(a,n.options.font);if(o?(t.width=this.maxWidth,t.height=gi(A)+l):(t.height=this.maxHeight,t.width=gi(A)+l),r.display&&this.ticks.length){const{first:c,last:u,widest:d,highest:f}=this._getLabelSizes(),h=r.padding*2,p=Et(this.labelRotation),m=Math.cos(p),y=Math.sin(p);if(o){const g=r.mirror?0:y*d.width+m*f.height;t.height=Math.min(this.maxHeight,t.height+g+h)}else{const g=r.mirror?0:m*d.width+y*f.height;t.width=Math.min(this.maxWidth,t.width+g+h)}this._calculatePadding(c,u,y,m)}}this._handleMargins(),o?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,r,a){const{ticks:{align:A,padding:s},position:o}=this.options,l=this.labelRotation!==0,c=o!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let f=0,h=0;l?c?(f=a*t.width,h=r*n.height):(f=r*t.height,h=a*n.width):A==="start"?h=n.width:A==="end"?f=t.width:A!=="inner"&&(f=t.width/2,h=n.width/2),this.paddingLeft=Math.max((f-u+s)*this.width/(this.width-u),0),this.paddingRight=Math.max((h-d+s)*this.width/(this.width-d),0)}else{let u=n.height/2,d=t.height/2;A==="start"?(u=0,d=t.height):A==="end"&&(u=n.height,d=0),this.paddingTop=u+s,this.paddingBottom=d+s}}_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(){He(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,r;for(n=0,r=t.length;n<r;n++)_e(t[n].label)&&(t.splice(n,1),r--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const n=this.options.ticks.sampleSize;let r=this.ticks;n<r.length&&(r=Gv(r,n)),this._labelSizes=t=this._computeLabelSizes(r,r.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,n,r){const{ctx:a,_longestTextCache:A}=this,s=[],o=[],l=Math.floor(n/Wv(n,r));let c=0,u=0,d,f,h,p,m,y,g,v,_,B,b;for(d=0;d<n;d+=l){if(p=t[d].label,m=this._resolveTickFontOptions(d),a.font=y=m.string,g=A[y]=A[y]||{data:{},gc:[]},v=m.lineHeight,_=B=0,!_e(p)&&!Oe(p))_=uu(a,g.data,g.gc,_,p),B=v;else if(Oe(p))for(f=0,h=p.length;f<h;++f)b=p[f],!_e(b)&&!Oe(b)&&(_=uu(a,g.data,g.gc,_,b),B+=v);s.push(_),o.push(B),c=Math.max(_,c),u=Math.max(B,u)}VM(A,n);const w=s.indexOf(c),C=o.indexOf(u),k=S=>({width:s[S]||0,height:o[S]||0});return{first:k(0),last:k(n-1),widest:k(w),highest:k(C),widths:s,heights:o}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const n=this._startPixel+t*this._length;return UL(this._alignToPixels?sA(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&t<n.length){const r=n[t];return r.$context||(r.$context=$M(this.getContext(),t,r))}return this.$context||(this.$context=KM(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,n=Et(this.labelRotation),r=Math.abs(Math.cos(n)),a=Math.abs(Math.sin(n)),A=this._getLabelSizes(),s=t.autoSkipPadding||0,o=A?A.widest.width+s:0,l=A?A.highest.height+s:0;return this.isHorizontal()?l*r>o*a?o/r:l/a:l*a<o*r?l/r:o/a}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const n=this.axis,r=this.chart,a=this.options,{grid:A,position:s,border:o}=a,l=A.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),f=gi(A),h=[],p=o.setContext(this.getContext()),m=p.display?p.width:0,y=m/2,g=function(j){return sA(r,j,m)};let v,_,B,b,w,C,k,S,T,U,F,Q;if(s==="top")v=g(this.bottom),C=this.bottom-f,S=v-y,U=g(t.top)+y,Q=t.bottom;else if(s==="bottom")v=g(this.top),U=t.top,Q=g(t.bottom)-y,C=v+y,S=this.top+f;else if(s==="left")v=g(this.right),w=this.right-f,k=v-y,T=g(t.left)+y,F=t.right;else if(s==="right")v=g(this.left),T=t.left,F=g(t.right)-y,w=v+y,k=this.left+f;else if(n==="x"){if(s==="center")v=g((t.top+t.bottom)/2+.5);else if(ve(s)){const j=Object.keys(s)[0],K=s[j];v=g(this.chart.scales[j].getPixelForValue(K))}U=t.top,Q=t.bottom,C=v+y,S=C+f}else if(n==="y"){if(s==="center")v=g((t.left+t.right)/2);else if(ve(s)){const j=Object.keys(s)[0],K=s[j];v=g(this.chart.scales[j].getPixelForValue(K))}w=v-y,k=w-f,T=t.left,F=t.right}const Y=de(a.ticks.maxTicksLimit,d),X=Math.max(1,Math.ceil(d/Y));for(_=0;_<d;_+=X){const j=this.getContext(_),K=A.setContext(j),oe=o.setContext(j),$=K.lineWidth,ae=K.color,ce=oe.dash||[],me=oe.dashOffset,Ee=K.tickWidth,fe=K.tickColor,ne=K.tickBorderDash||[],N=K.tickBorderDashOffset;B=RM(this,_,l),B!==void 0&&(b=sA(r,B,$),c?w=k=T=F=b:C=S=U=Q=b,h.push({tx1:w,ty1:C,tx2:k,ty2:S,x1:T,y1:U,x2:F,y2:Q,width:$,color:ae,borderDash:ce,borderDashOffset:me,tickWidth:Ee,tickColor:fe,tickBorderDash:ne,tickBorderDashOffset:N}))}return this._ticksLength=d,this._borderValue=v,h}_computeLabelItems(t){const n=this.axis,r=this.options,{position:a,ticks:A}=r,s=this.isHorizontal(),o=this.ticks,{align:l,crossAlign:c,padding:u,mirror:d}=A,f=gi(r.grid),h=f+u,p=d?-u:h,m=-Et(this.labelRotation),y=[];let g,v,_,B,b,w,C,k,S,T,U,F,Q="middle";if(a==="top")w=this.bottom-p,C=this._getXAxisLabelAlignment();else if(a==="bottom")w=this.top+p,C=this._getXAxisLabelAlignment();else if(a==="left"){const X=this._getYAxisLabelAlignment(f);C=X.textAlign,b=X.x}else if(a==="right"){const X=this._getYAxisLabelAlignment(f);C=X.textAlign,b=X.x}else if(n==="x"){if(a==="center")w=(t.top+t.bottom)/2+h;else if(ve(a)){const X=Object.keys(a)[0],j=a[X];w=this.chart.scales[X].getPixelForValue(j)+h}C=this._getXAxisLabelAlignment()}else if(n==="y"){if(a==="center")b=(t.left+t.right)/2-h;else if(ve(a)){const X=Object.keys(a)[0],j=a[X];b=this.chart.scales[X].getPixelForValue(j)}C=this._getYAxisLabelAlignment(f).textAlign}n==="y"&&(l==="start"?Q="top":l==="end"&&(Q="bottom"));const Y=this._getLabelSizes();for(g=0,v=o.length;g<v;++g){_=o[g],B=_.label;const X=A.setContext(this.getContext(g));k=this.getPixelForTick(g)+A.labelOffset,S=this._resolveTickFontOptions(g),T=S.lineHeight,U=Oe(B)?B.length:1;const j=U/2,K=X.color,oe=X.textStrokeColor,$=X.textStrokeWidth;let ae=C;s?(b=k,C==="inner"&&(g===v-1?ae=this.options.reverse?"left":"right":g===0?ae=this.options.reverse?"right":"left":ae="center"),a==="top"?c==="near"||m!==0?F=-U*T+T/2:c==="center"?F=-Y.highest.height/2-j*T+T:F=-Y.highest.height+T/2:c==="near"||m!==0?F=T/2:c==="center"?F=Y.highest.height/2-j*T:F=Y.highest.height-U*T,d&&(F*=-1),m!==0&&!X.showLabelBackdrop&&(b+=T/2*Math.sin(m))):(w=k,F=(1-U)*T/2);let ce;if(X.showLabelBackdrop){const me=_t(X.backdropPadding),Ee=Y.heights[g],fe=Y.widths[g];let ne=F-me.top,N=0-me.left;switch(Q){case"middle":ne-=Ee/2;break;case"bottom":ne-=Ee;break}switch(C){case"center":N-=fe/2;break;case"right":N-=fe;break}ce={left:N,top:ne,width:fe+me.width,height:Ee+me.height,color:X.backdropColor}}y.push({label:B,font:S,textOffset:F,options:{rotation:m,color:K,strokeColor:oe,strokeWidth:$,textAlign:ae,textBaseline:Q,translation:[b,w],backdrop:ce}})}return y}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;if(-Et(this.labelRotation))return t==="top"?"left":"right";let a="center";return n.align==="start"?a="left":n.align==="end"?a="right":n.align==="inner"&&(a="inner"),a}_getYAxisLabelAlignment(t){const{position:n,ticks:{crossAlign:r,mirror:a,padding:A}}=this.options,s=this._getLabelSizes(),o=t+A,l=s.widest.width;let c,u;return n==="left"?a?(u=this.right+A,r==="near"?c="left":r==="center"?(c="center",u+=l/2):(c="right",u+=l)):(u=this.right-o,r==="near"?c="right":r==="center"?(c="center",u-=l/2):(c="left",u=this.left)):n==="right"?a?(u=this.left+A,r==="near"?c="right":r==="center"?(c="center",u-=l/2):(c="left",u-=l)):(u=this.left+o,r==="near"?c="left":r==="center"?(c="center",u+=l/2):(c="right",u=this.right)):c="right",{textAlign:c,x:u}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:n},left:r,top:a,width:A,height:s}=this;n&&(t.save(),t.fillStyle=n,t.fillRect(r,a,A,s),t.restore())}getLineWidthForValue(t){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const a=this.ticks.findIndex(A=>A.value===t);return a>=0?n.setContext(this.getContext(a)).lineWidth:0}drawGrid(t){const n=this.options.grid,r=this.ctx,a=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let A,s;const o=(l,c,u)=>{!u.width||!u.color||(r.save(),r.lineWidth=u.width,r.strokeStyle=u.color,r.setLineDash(u.borderDash||[]),r.lineDashOffset=u.borderDashOffset,r.beginPath(),r.moveTo(l.x,l.y),r.lineTo(c.x,c.y),r.stroke(),r.restore())};if(n.display)for(A=0,s=a.length;A<s;++A){const l=a[A];n.drawOnChartArea&&o({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),n.drawTicks&&o({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:n,options:{border:r,grid:a}}=this,A=r.setContext(this.getContext()),s=r.display?A.width:0;if(!s)return;const o=a.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let c,u,d,f;this.isHorizontal()?(c=sA(t,this.left,s)-s/2,u=sA(t,this.right,o)+o/2,d=f=l):(d=sA(t,this.top,s)-s/2,f=sA(t,this.bottom,o)+o/2,c=u=l),n.save(),n.lineWidth=A.width,n.strokeStyle=A.color,n.beginPath(),n.moveTo(c,d),n.lineTo(u,f),n.stroke(),n.restore()}drawLabels(t){if(!this.options.ticks.display)return;const r=this.ctx,a=this._computeLabelArea();a&&tl(r,a);const A=this.getLabelItems(t);for(const s of A){const o=s.options,l=s.font,c=s.label,u=s.textOffset;OA(r,c,0,u,l,o)}a&&nl(r)}drawTitle(){const{ctx:t,options:{position:n,title:r,reverse:a}}=this;if(!r.display)return;const A=ft(r.font),s=_t(r.padding),o=r.align;let l=A.lineHeight/2;n==="bottom"||n==="center"||ve(n)?(l+=s.bottom,Oe(r.text)&&(l+=A.lineHeight*(r.text.length-1))):l+=s.top;const{titleX:c,titleY:u,maxWidth:d,rotation:f}=GM(this,l,n,o);OA(t,r.text,0,0,A,{color:r.color,maxWidth:d,rotation:f,textAlign:WM(o,n,a),textBaseline:"middle",translation:[c,u]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,n=t.ticks&&t.ticks.z||0,r=de(t.grid&&t.grid.z,-1),a=de(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==$A.prototype.draw?[{z:n,draw:A=>{this.draw(A)}}]:[{z:r,draw:A=>{this.drawBackground(),this.drawGrid(A),this.drawTitle()}},{z:a,draw:()=>{this.drawBorder()}},{z:n,draw:A=>{this.drawLabels(A)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",a=[];let A,s;for(A=0,s=n.length;A<s;++A){const o=n[A];o[r]===this.id&&(!t||o.type===t)&&a.push(o)}return a}_resolveTickFontOptions(t){const n=this.options.ticks.setContext(this.getContext(t));return ft(n.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Gl{constructor(t,n,r){this.type=t,this.scope=n,this.override=r,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const n=Object.getPrototypeOf(t);let r;YM(n)&&(r=this.register(n));const a=this.items,A=t.id,s=this.scope+"."+A;if(!A)throw new Error("class does not have id: "+t);return A in a||(a[A]=t,zM(t,s,r),this.override&&dt.override(t.id,t.overrides)),s}get(t){return this.items[t]}unregister(t){const n=this.items,r=t.id,a=this.scope;r in n&&delete n[r],a&&r in dt[a]&&(delete dt[a][r],this.override&&delete LA[r])}}function zM(e,t,n){const r=wr(Object.create(null),[n?dt.get(n):{},dt.get(t),e.defaults]);dt.set(t,r),e.defaultRoutes&&jM(t,e.defaultRoutes),e.descriptors&&dt.describe(t,e.descriptors)}function jM(e,t){Object.keys(t).forEach(n=>{const r=n.split("."),a=r.pop(),A=[e].concat(r).join("."),s=t[n].split("."),o=s.pop(),l=s.join(".");dt.route(A,a,l,o)})}function YM(e){return"id"in e&&"defaults"in e}class qM{constructor(){this.controllers=new Gl(er,"datasets",!0),this.elements=new Gl(an,"elements"),this.plugins=new Gl(Object,"plugins"),this.scales=new Gl($A,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,n,r){[...n].forEach(a=>{const A=r||this._getRegistryForType(a);r||A.isForType(a)||A===this.plugins&&a.id?this._exec(t,A,a):Ve(a,s=>{const o=r||this._getRegistryForType(s);this._exec(t,o,s)})})}_exec(t,n,r){const a=Ng(t);He(r["before"+a],[],r),n[t](r),He(r["after"+a],[],r)}_getRegistryForType(t){for(let n=0;n<this._typedRegistries.length;n++){const r=this._typedRegistries[n];if(r.isForType(t))return r}return this.plugins}_get(t,n,r){const a=n.get(t);if(a===void 0)throw new Error('"'+t+'" is not a registered '+r+".");return a}}var ur=new qM;class XM{constructor(){this._init=[]}notify(t,n,r,a){n==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const A=a?this._descriptors(t).filter(a):this._descriptors(t),s=this._notify(A,t,n,r);return n==="afterDestroy"&&(this._notify(A,t,"stop"),this._notify(this._init,t,"uninstall")),s}_notify(t,n,r,a){a=a||{};for(const A of t){const s=A.plugin,o=s[r],l=[n,a,A.options];if(He(o,l,s)===!1&&a.cancelable)return!1}return!0}invalidate(){_e(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),n}_createDescriptors(t,n){const r=t&&t.config,a=de(r.options&&r.options.plugins,{}),A=JM(r);return a===!1&&!n?[]:e7(t,A,a,n)}_notifyStateChanges(t){const n=this._oldCache||[],r=this._cache,a=(A,s)=>A.filter(o=>!s.some(l=>o.plugin.id===l.plugin.id));this._notify(a(n,r),t,"stop"),this._notify(a(r,n),t,"start")}}function JM(e){const t={},n=[],r=Object.keys(ur.plugins.items);for(let A=0;A<r.length;A++)n.push(ur.getPlugin(r[A]));const a=e.plugins||[];for(let A=0;A<a.length;A++){const s=a[A];n.indexOf(s)===-1&&(n.push(s),t[s.id]=!0)}return{plugins:n,localIds:t}}function ZM(e,t){return!t&&e===!1?null:e===!0?{}:e}function e7(e,{plugins:t,localIds:n},r,a){const A=[],s=e.getContext();for(const o of t){const l=o.id,c=ZM(r[l],a);c!==null&&A.push({plugin:o,options:t7(e.config,{plugin:o,local:n[l]},c,s)})}return A}function t7(e,{plugin:t,local:n},r,a){const A=e.pluginScopeKeys(t),s=e.getOptionScopes(r,A);return n&&t.defaults&&s.push(t.defaults),e.createResolver(s,a,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Mh(e,t){const n=dt.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function n7(e,t){let n=e;return e==="_index_"?n=t:e==="_value_"&&(n=t==="x"?"y":"x"),n}function r7(e,t){return e===t?"_index_":"_value_"}function jv(e){if(e==="x"||e==="y"||e==="r")return e}function a7(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function Nh(e,...t){if(jv(e))return e;for(const n of t){const r=n.axis||a7(n.position)||e.length>1&&jv(e[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function Yv(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function A7(e,t){if(t.data&&t.data.datasets){const n=t.data.datasets.filter(r=>r.xAxisID===e||r.yAxisID===e);if(n.length)return Yv(e,"x",n[0])||Yv(e,"y",n[0])}return{}}function s7(e,t){const n=LA[e.type]||{scales:{}},r=t.scales||{},a=Mh(e.type,t),A=Object.create(null);return Object.keys(r).forEach(s=>{const o=r[s];if(!ve(o))return console.error(`Invalid scale configuration for scale: ${s}`);if(o._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${s}`);const l=Nh(s,o,A7(s,e),dt.scales[o.type]),c=r7(l,a),u=n.scales||{};A[s]=ji(Object.create(null),[{axis:l},o,u[l],u[c]])}),e.data.datasets.forEach(s=>{const o=s.type||e.type,l=s.indexAxis||Mh(o,t),u=(LA[o]||{}).scales||{};Object.keys(u).forEach(d=>{const f=n7(d,l),h=s[f+"AxisID"]||f;A[h]=A[h]||Object.create(null),ji(A[h],[{axis:f},r[h],u[d]])})}),Object.keys(A).forEach(s=>{const o=A[s];ji(o,[dt.scales[o.type],dt.scale])}),A}function A_(e){const t=e.options||(e.options={});t.plugins=de(t.plugins,{}),t.scales=s7(e,t)}function s_(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function i7(e){return e=e||{},e.data=s_(e.data),A_(e),e}const qv=new Map,i_=new Set;function zl(e,t){let n=qv.get(e);return n||(n=t(),qv.set(e,n),i_.add(n)),n}const mi=(e,t,n)=>{const r=Ga(t,n);r!==void 0&&e.add(r)};class o7{constructor(t){this._config=i7(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=s_(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),A_(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return zl(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return zl(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return zl(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,r=this.type;return zl(`${r}-plugin-${n}`,()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const r=this._scopeCache;let a=r.get(t);return(!a||n)&&(a=new Map,r.set(t,a)),a}getOptionScopes(t,n,r){const{options:a,type:A}=this,s=this._cachedScopes(t,r),o=s.get(n);if(o)return o;const l=new Set;n.forEach(u=>{t&&(l.add(t),u.forEach(d=>mi(l,t,d))),u.forEach(d=>mi(l,a,d)),u.forEach(d=>mi(l,LA[A]||{},d)),u.forEach(d=>mi(l,dt,d)),u.forEach(d=>mi(l,Dh,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),i_.has(n)&&s.set(n,c),c}chartOptionScopes(){const{options:t,type:n}=this;return[t,LA[n]||{},dt.datasets[n]||{},{type:n},dt,Dh]}resolveNamedOptions(t,n,r,a=[""]){const A={$shared:!0},{resolver:s,subPrefixes:o}=Xv(this._resolverCache,t,a);let l=s;if(c7(s,n)){A.$shared=!1,r=mn(r)?r():r;const c=this.createResolver(t,r,o);l=Vs(s,r,c)}for(const c of n)A[c]=l[c];return A}createResolver(t,n,r=[""],a){const{resolver:A}=Xv(this._resolverCache,t,r);return ve(n)?Vs(A,n,void 0,a):A}}function Xv(e,t,n){let r=e.get(t);r||(r=new Map,e.set(t,r));const a=n.join();let A=r.get(a);return A||(A={resolver:$g(t,n),subPrefixes:n.filter(o=>!o.toLowerCase().includes("hover"))},r.set(a,A)),A}const l7=e=>ve(e)&&Object.getOwnPropertyNames(e).reduce((t,n)=>t||mn(e[n]),!1);function c7(e,t){const{isScriptable:n,isIndexable:r}=Pb(e);for(const a of t){const A=n(a),s=r(a),o=(s||A)&&e[a];if(A&&(mn(o)||l7(o))||s&&Oe(o))return!0}return!1}var u7="4.3.0";const d7=["top","bottom","left","right","chartArea"];function Jv(e,t){return e==="top"||e==="bottom"||d7.indexOf(e)===-1&&t==="x"}function Zv(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function eB(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),He(n&&n.onComplete,[e],t)}function f7(e){const t=e.chart,n=t.options.animation;He(n&&n.onProgress,[e],t)}function o_(e){return Wb()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const Pc={},tB=e=>{const t=o_(e);return Object.values(Pc).filter(n=>n.canvas===t).pop()};function h7(e,t,n){const r=Object.keys(e);for(const a of r){const A=+a;if(A>=t){const s=e[a];delete e[a],(n>0||A>t)&&(e[A+n]=s)}}}function p7(e,t,n,r){return!n||e.type==="mouseout"?null:r?t:e}function g7(e){const{xScale:t,yScale:n}=e;if(t&&n)return{left:t.left,right:t.right,top:n.top,bottom:n.bottom}}class Le{static register(...t){ur.add(...t),nB()}static unregister(...t){ur.remove(...t),nB()}constructor(t,n){const r=this.config=new o7(n),a=o_(t),A=tB(a);if(A)throw new Error("Canvas is already in use. Chart with ID '"+A.id+"' must be destroyed before the canvas with ID '"+A.canvas.id+"' can be reused.");const s=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||TM(a)),this.platform.updateConfig(r);const o=this.platform.acquireContext(a,s.aspectRatio),l=o&&o.canvas,c=l&&l.height,u=l&&l.width;if(this.id=yL(),this.ctx=o,this.canvas=l,this.width=u,this.height=c,this._options=s,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 XM,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=LL(d=>this.update(d),s.resizeDelay||0),this._dataChanges=[],Pc[this.id]=this,!o||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Mr.listen(this,"complete",eB),Mr.listen(this,"progress",f7),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:r,height:a,_aspectRatio:A}=this;return _e(t)?n&&A?A:a?r/a:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return ur}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():_v(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return yv(this.canvas,this.ctx),this}stop(){return Mr.stop(this),this}resize(t,n){Mr.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const r=this.options,a=this.canvas,A=r.maintainAspectRatio&&this.aspectRatio,s=this.platform.getMaximumSize(a,t,n,A),o=r.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,_v(this,o,!0)&&(this.notifyPlugins("resize",{size:s}),He(r.onResize,[this,s],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};Ve(n,(r,a)=>{r.id=a})}buildOrUpdateScales(){const t=this.options,n=t.scales,r=this.scales,a=Object.keys(r).reduce((s,o)=>(s[o]=!1,s),{});let A=[];n&&(A=A.concat(Object.keys(n).map(s=>{const o=n[s],l=Nh(s,o),c=l==="r",u=l==="x";return{options:o,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),Ve(A,s=>{const o=s.options,l=o.id,c=Nh(l,o),u=de(o.type,s.dtype);(o.position===void 0||Jv(o.position,c)!==Jv(s.dposition))&&(o.position=s.dposition),a[l]=!0;let d=null;if(l in r&&r[l].type===u)d=r[l];else{const f=ur.getScale(u);d=new f({id:l,type:u,ctx:this.ctx,chart:this}),r[d.id]=d}d.init(o,t)}),Ve(a,(s,o)=>{s||delete r[o]}),Ve(r,s=>{Gt.configure(this,s,s.options),Gt.addBox(this,s)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,r=t.length;if(t.sort((a,A)=>a.index-A.index),r>n){for(let a=n;a<r;++a)this._destroyDatasetMeta(a);t.splice(n,r-n)}this._sortedMetasets=t.slice(0).sort(Zv("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:n}}=this;t.length>n.length&&delete this._stacks,t.forEach((r,a)=>{n.filter(A=>A===r._dataset).length===0&&this._destroyDatasetMeta(a)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let r,a;for(this._removeUnreferencedMetasets(),r=0,a=n.length;r<a;r++){const A=n[r];let s=this.getDatasetMeta(r);const o=A.type||this.config.type;if(s.type&&s.type!==o&&(this._destroyDatasetMeta(r),s=this.getDatasetMeta(r)),s.type=o,s.indexAxis=A.indexAxis||Mh(o,this.options),s.order=A.order||0,s.index=r,s.label=""+A.label,s.visible=this.isDatasetVisible(r),s.controller)s.controller.updateIndex(r),s.controller.linkScales();else{const l=ur.getController(o),{datasetElementType:c,dataElementType:u}=dt.datasets[o];Object.assign(l,{dataElementType:ur.getElement(u),datasetElementType:c&&ur.getElement(c)}),s.controller=new l(this,r),t.push(s.controller)}}return this._updateMetasets(),t}_resetElements(){Ve(this.data.datasets,(t,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const r=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),a=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const A=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let s=0;for(let c=0,u=this.data.datasets.length;c<u;c++){const{controller:d}=this.getDatasetMeta(c),f=!a&&A.indexOf(d)===-1;d.buildOrUpdateElements(f),s=Math.max(+d.getMaxOverflow(),s)}s=this._minPadding=r.layout.autoPadding?s:0,this._updateLayout(s),a||Ve(A,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Zv("z","_idx"));const{_active:o,_lastEvent:l}=this;l?this._eventHandler(l,!0):o.length&&this._updateHoverStyles(o,o,!0),this.render()}_updateScales(){Ve(this.scales,t=>{Gt.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!dv(n,r)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:r,start:a,count:A}of n){const s=r==="_removeElements"?-A:A;h7(t,a,s)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,r=A=>new Set(t.filter(s=>s[0]===A).map((s,o)=>o+","+s.splice(1).join(","))),a=r(0);for(let A=1;A<n;A++)if(!dv(a,r(A)))return;return Array.from(a).map(A=>A.split(",")).map(A=>({method:A[1],start:+A[2],count:+A[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Gt.update(this,this.width,this.height,t);const n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],Ve(this.boxes,a=>{r&&a.position==="chartArea"||(a.configure&&a.configure(),this._layers.push(...a._layers()))},this),this._layers.forEach((a,A)=>{a._idx=A}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,r=this.data.datasets.length;n<r;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,r=this.data.datasets.length;n<r;++n)this._updateDataset(n,mn(t)?t({datasetIndex:n}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,n){const r=this.getDatasetMeta(t),a={meta:r,index:t,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",a)!==!1&&(r.controller._update(n),a.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",a))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Mr.has(this)?this.attached&&!Mr.running(this)&&Mr.start(this):(this.draw(),eB({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:r,height:a}=this._resizeBeforeDraw;this._resize(r,a),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(t=0;t<n.length&&n[t].z<=0;++t)n[t].draw(this.chartArea);for(this._drawDatasets();t<n.length;++t)n[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const n=this._sortedMetasets,r=[];let a,A;for(a=0,A=n.length;a<A;++a){const s=n[a];(!t||s.visible)&&r.push(s)}return r}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let n=t.length-1;n>=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx,r=t._clip,a=!r.disabled,A=g7(t)||this.chartArea,s={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",s)!==!1&&(a&&tl(n,{left:r.left===!1?0:A.left-r.left,right:r.right===!1?this.width:A.right+r.right,top:r.top===!1?0:A.top-r.top,bottom:r.bottom===!1?this.height:A.bottom+r.bottom}),t.controller.draw(),a&&nl(n),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(t){return Gr(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,r,a){const A=dM.modes[n];return typeof A=="function"?A(this,t,r,a):[]}getDatasetMeta(t){const n=this.data.datasets[t],r=this._metasets;let a=r.filter(A=>A&&A._dataset===n).pop();return a||(a={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},r.push(a)),a}getContext(){return this.$context||(this.$context=rA(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const r=this.getDatasetMeta(t);return typeof r.hidden=="boolean"?!r.hidden:!n.hidden}setDatasetVisibility(t,n){const r=this.getDatasetMeta(t);r.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,r){const a=r?"show":"hide",A=this.getDatasetMeta(t),s=A.controller._resolveAnimations(void 0,a);vn(n)?(A.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(t,r),s.update(A,{visible:r}),this.update(o=>o.datasetIndex===t?a:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){const n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),Mr.remove(this),t=0,n=this.data.datasets.length;t<n;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:n}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),yv(t,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete Pc[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,n=this.platform,r=(A,s)=>{n.addEventListener(this,A,s),t[A]=s},a=(A,s,o)=>{A.offsetX=s,A.offsetY=o,this._eventHandler(A)};Ve(this.options.events,A=>r(A,a))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,r=(l,c)=>{n.addEventListener(this,l,c),t[l]=c},a=(l,c)=>{t[l]&&(n.removeEventListener(this,l,c),delete t[l])},A=(l,c)=>{this.canvas&&this.resize(l,c)};let s;const o=()=>{a("attach",o),this.attached=!0,this.resize(),r("resize",A),r("detach",s)};s=()=>{this.attached=!1,a("resize",A),this._stop(),this._resize(0,0),r("attach",o)},n.isAttached(this.canvas)?o():s()}unbindEvents(){Ve(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},Ve(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,r){const a=r?"set":"remove";let A,s,o,l;for(n==="dataset"&&(A=this.getDatasetMeta(t[0].datasetIndex),A.controller["_"+a+"DatasetHoverStyle"]()),o=0,l=t.length;o<l;++o){s=t[o];const c=s&&this.getDatasetMeta(s.datasetIndex).controller;c&&c[a+"HoverStyle"](s.element,s.datasetIndex,s.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const n=this._active||[],r=t.map(({datasetIndex:A,index:s})=>{const o=this.getDatasetMeta(A);if(!o)throw new Error("No dataset found at index "+A);return{datasetIndex:A,element:o.data[s],index:s}});!iu(r,n)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,n))}notifyPlugins(t,n,r){return this._plugins.notify(this,t,n,r)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,r){const a=this.options.hover,A=(l,c)=>l.filter(u=>!c.some(d=>u.datasetIndex===d.datasetIndex&&u.index===d.index)),s=A(n,t),o=r?t:A(t,n);s.length&&this.updateHoverStyle(s,a.mode,!1),o.length&&a.mode&&this.updateHoverStyle(o,a.mode,!0)}_eventHandler(t,n){const r={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},a=s=>(s.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",r,a)===!1)return;const A=this._handleEvent(t,n,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,a),(A||r.changed)&&this.render(),this}_handleEvent(t,n,r){const{_active:a=[],options:A}=this,s=n,o=this._getActiveElements(t,a,r,s),l=kL(t),c=p7(t,this._lastEvent,r,l);r&&(this._lastEvent=null,He(A.onHover,[t,o,this],this),l&&He(A.onClick,[t,o,this],this));const u=!iu(o,a);return(u||n)&&(this._active=o,this._updateHoverStyles(o,a,n)),this._lastEvent=c,u}_getActiveElements(t,n,r,a){if(t.type==="mouseout")return[];if(!r)return n;const A=this.options.hover;return this.getElementsAtEventForMode(t,A.mode,A,a)}}R(Le,"defaults",dt),R(Le,"instances",Pc),R(Le,"overrides",LA),R(Le,"registry",ur),R(Le,"version",u7),R(Le,"getChart",tB);function nB(){return Ve(Le.instances,e=>e._plugins.invalidate())}function m7(e,t,n){const{startAngle:r,pixelMargin:a,x:A,y:s,outerRadius:o,innerRadius:l}=t;let c=a/o;e.beginPath(),e.arc(A,s,o,r-c,n+c),l>a?(c=a/l,e.arc(A,s,l,n+c,r-c,!0)):e.arc(A,s,a,n+Je,r-Je),e.closePath(),e.clip()}function v7(e){return Kg(e,["outerStart","outerEnd","innerStart","innerEnd"])}function B7(e,t,n,r){const a=v7(e.options.borderRadius),A=(n-t)/2,s=Math.min(A,r*t/2),o=l=>{const c=(n-Math.min(A,l))*r/2;return Mt(l,0,Math.min(A,c))};return{outerStart:o(a.outerStart),outerEnd:o(a.outerEnd),innerStart:Mt(a.innerStart,0,s),innerEnd:Mt(a.innerEnd,0,s)}}function rs(e,t,n,r){return{x:n+e*Math.cos(t),y:r+e*Math.sin(t)}}function hu(e,t,n,r,a,A){const{x:s,y:o,startAngle:l,pixelMargin:c,innerRadius:u}=t,d=Math.max(t.outerRadius+r+n-c,0),f=u>0?u+r+n+c:0;let h=0;const p=a-l;if(r){const X=u>0?u-r:0,j=d>0?d-r:0,K=(X+j)/2,oe=K!==0?p*K/(K+r):p;h=(p-oe)/2}const m=Math.max(.001,p*d-n/Qe)/d,y=(p-m)/2,g=l+y+h,v=a-y-h,{outerStart:_,outerEnd:B,innerStart:b,innerEnd:w}=B7(t,f,d,v-g),C=d-_,k=d-B,S=g+_/C,T=v-B/k,U=f+b,F=f+w,Q=g+b/U,Y=v-w/F;if(e.beginPath(),A){const X=(S+T)/2;if(e.arc(s,o,d,S,X),e.arc(s,o,d,X,T),B>0){const $=rs(k,T,s,o);e.arc($.x,$.y,B,T,v+Je)}const j=rs(F,v,s,o);if(e.lineTo(j.x,j.y),w>0){const $=rs(F,Y,s,o);e.arc($.x,$.y,w,v+Je,Y+Math.PI)}const K=(v-w/f+(g+b/f))/2;if(e.arc(s,o,f,v-w/f,K,!0),e.arc(s,o,f,K,g+b/f,!0),b>0){const $=rs(U,Q,s,o);e.arc($.x,$.y,b,Q+Math.PI,g-Je)}const oe=rs(C,g,s,o);if(e.lineTo(oe.x,oe.y),_>0){const $=rs(C,S,s,o);e.arc($.x,$.y,_,g-Je,S)}}else{e.moveTo(s,o);const X=Math.cos(S)*d+s,j=Math.sin(S)*d+o;e.lineTo(X,j);const K=Math.cos(T)*d+s,oe=Math.sin(T)*d+o;e.lineTo(K,oe)}e.closePath()}function y7(e,t,n,r,a){const{fullCircles:A,startAngle:s,circumference:o}=t;let l=t.endAngle;if(A){hu(e,t,n,r,l,a);for(let c=0;c<A;++c)e.fill();isNaN(o)||(l=s+(o%Xe||Xe))}return hu(e,t,n,r,l,a),e.fill(),l}function w7(e,t,n,r,a){const{fullCircles:A,startAngle:s,circumference:o,options:l}=t,{borderWidth:c,borderJoinStyle:u,borderDash:d,borderDashOffset:f}=l,h=l.borderAlign==="inner";if(!c)return;e.setLineDash(d||[]),e.lineDashOffset=f,h?(e.lineWidth=c*2,e.lineJoin=u||"round"):(e.lineWidth=c,e.lineJoin=u||"bevel");let p=t.endAngle;if(A){hu(e,t,n,r,p,a);for(let m=0;m<A;++m)e.stroke();isNaN(o)||(p=s+(o%Xe||Xe))}h&&m7(e,t,p),A||(hu(e,t,n,r,p,a),e.stroke())}class ys extends an{constructor(n){super();R(this,"circumference");R(this,"endAngle");R(this,"fullCircles");R(this,"innerRadius");R(this,"outerRadius");R(this,"pixelMargin");R(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,r,a){const A=this.getProps(["x","y"],a),{angle:s,distance:o}=Fb(A,{x:n,y:r}),{startAngle:l,endAngle:c,innerRadius:u,outerRadius:d,circumference:f}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],a),h=(this.options.spacing+this.options.borderWidth)/2,m=de(f,c-l)>=Xe||So(s,l,c),y=$r(o,u+h,d+h);return m&&y}getCenterPoint(n){const{x:r,y:a,startAngle:A,endAngle:s,innerRadius:o,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],n),{offset:c,spacing:u}=this.options,d=(A+s)/2,f=(o+l+u+c)/2;return{x:r+Math.cos(d)*f,y:a+Math.sin(d)*f}}tooltipPosition(n){return this.getCenterPoint(n)}draw(n){const{options:r,circumference:a}=this,A=(r.offset||0)/4,s=(r.spacing||0)/2,o=r.circular;if(this.pixelMargin=r.borderAlign==="inner"?.33:0,this.fullCircles=a>Xe?Math.floor(a/Xe):0,a===0||this.innerRadius<0||this.outerRadius<0)return;n.save();const l=(this.startAngle+this.endAngle)/2;n.translate(Math.cos(l)*A,Math.sin(l)*A);const c=1-Math.sin(Math.min(Qe,a||0)),u=A*c;n.fillStyle=r.backgroundColor,n.strokeStyle=r.borderColor,y7(n,this,u,s,o),w7(n,this,u,s,o),n.restore()}}R(ys,"id","arc"),R(ys,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),R(ys,"defaultRoutes",{backgroundColor:"backgroundColor"}),R(ys,"descriptors",{_scriptable:!0,_indexable:n=>n!=="borderDash"});function l_(e,t,n=t){e.lineCap=de(n.borderCapStyle,t.borderCapStyle),e.setLineDash(de(n.borderDash,t.borderDash)),e.lineDashOffset=de(n.borderDashOffset,t.borderDashOffset),e.lineJoin=de(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=de(n.borderWidth,t.borderWidth),e.strokeStyle=de(n.borderColor,t.borderColor)}function b7(e,t,n){e.lineTo(n.x,n.y)}function _7(e){return e.stepped?zL:e.tension||e.cubicInterpolationMode==="monotone"?jL:b7}function c_(e,t,n={}){const r=e.length,{start:a=0,end:A=r-1}=n,{start:s,end:o}=t,l=Math.max(a,s),c=Math.min(A,o),u=a<s&&A<s||a>o&&A>o;return{count:r,start:l,loop:t.loop,ilen:c<l&&!u?r+c-l:c-l}}function C7(e,t,n,r){const{points:a,options:A}=t,{count:s,start:o,loop:l,ilen:c}=c_(a,n,r),u=_7(A);let{move:d=!0,reverse:f}=r||{},h,p,m;for(h=0;h<=c;++h)p=a[(o+(f?c-h:h))%s],!p.skip&&(d?(e.moveTo(p.x,p.y),d=!1):u(e,m,p,f,A.stepped),m=p);return l&&(p=a[(o+(f?c:0))%s],u(e,m,p,f,A.stepped)),!!l}function E7(e,t,n,r){const a=t.points,{count:A,start:s,ilen:o}=c_(a,n,r),{move:l=!0,reverse:c}=r||{};let u=0,d=0,f,h,p,m,y,g;const v=B=>(s+(c?o-B:B))%A,_=()=>{m!==y&&(e.lineTo(u,y),e.lineTo(u,m),e.lineTo(u,g))};for(l&&(h=a[v(0)],e.moveTo(h.x,h.y)),f=0;f<=o;++f){if(h=a[v(f)],h.skip)continue;const B=h.x,b=h.y,w=B|0;w===p?(b<m?m=b:b>y&&(y=b),u=(d*u+B)/++d):(_(),e.lineTo(B,b),p=w,d=0,m=y=b),g=b}_()}function Ph(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?E7:C7}function k7(e){return e.stepped?kO:e.tension||e.cubicInterpolationMode==="monotone"?SO:fA}function S7(e,t,n,r){let a=t._path;a||(a=t._path=new Path2D,t.path(a,n,r)&&a.closePath()),l_(e,t.options),e.stroke(a)}function x7(e,t,n,r){const{segments:a,options:A}=t,s=Ph(t);for(const o of a)l_(e,A,o.style),e.beginPath(),s(e,t,o,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}const F7=typeof Path2D=="function";function I7(e,t,n,r){F7&&!t.options.segment?S7(e,t,n,r):x7(e,t,n,r)}class ka extends an{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,n){const r=this.options;if((r.tension||r.cubicInterpolationMode==="monotone")&&!r.stepped&&!this._pointsUpdated){const a=r.spanGaps?this._loop:this._fullLoop;vO(this._points,r,t,a,n),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=TO(this,this.options.segment))}first(){const t=this.segments,n=this.points;return t.length&&n[t[0].start]}last(){const t=this.segments,n=this.points,r=t.length;return r&&n[t[r-1].end]}interpolate(t,n){const r=this.options,a=t[n],A=this.points,s=qb(this,{property:n,start:a,end:a});if(!s.length)return;const o=[],l=k7(r);let c,u;for(c=0,u=s.length;c<u;++c){const{start:d,end:f}=s[c],h=A[d],p=A[f];if(h===p){o.push(h);continue}const m=Math.abs((a-h[n])/(p[n]-h[n])),y=l(h,p,m,r.stepped);y[n]=t[n],o.push(y)}return o.length===1?o[0]:o}pathSegment(t,n,r){return Ph(this)(t,this,n,r)}path(t,n,r){const a=this.segments,A=Ph(this);let s=this._loop;n=n||0,r=r||this.points.length-n;for(const o of a)s&=A(t,this,o,{start:n,end:n+r-1});return!!s}draw(t,n,r,a){const A=this.options||{};(this.points||[]).length&&A.borderWidth&&(t.save(),I7(t,this,r,a),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}R(ka,"id","line"),R(ka,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),R(ka,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),R(ka,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});function rB(e,t,n,r){const a=e.options,{[n]:A}=e.getProps([n],r);return Math.abs(t-A)<a.radius+a.hitRadius}class Zi extends an{constructor(n){super();R(this,"parsed");R(this,"skip");R(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,r,a){const A=this.options,{x:s,y:o}=this.getProps(["x","y"],a);return Math.pow(n-s,2)+Math.pow(r-o,2)<Math.pow(A.hitRadius+A.radius,2)}inXRange(n,r){return rB(this,n,"x",r)}inYRange(n,r){return rB(this,n,"y",r)}getCenterPoint(n){const{x:r,y:a}=this.getProps(["x","y"],n);return{x:r,y:a}}size(n){n=n||this.options||{};let r=n.radius||0;r=Math.max(r,r&&n.hoverRadius||0);const a=r&&n.borderWidth||0;return(r+a)*2}draw(n,r){const a=this.options;this.skip||a.radius<.1||!Gr(this,r,this.size(a)/2)||(n.strokeStyle=a.borderColor,n.lineWidth=a.borderWidth,n.fillStyle=a.backgroundColor,Lh(n,a,this.x,this.y))}getRange(){const n=this.options||{};return n.radius+n.hitRadius}}R(Zi,"id","point"),R(Zi,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),R(Zi,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function u_(e,t){const{x:n,y:r,base:a,width:A,height:s}=e.getProps(["x","y","base","width","height"],t);let o,l,c,u,d;return e.horizontal?(d=s/2,o=Math.min(n,a),l=Math.max(n,a),c=r-d,u=r+d):(d=A/2,o=n-d,l=n+d,c=Math.min(r,a),u=Math.max(r,a)),{left:o,top:c,right:l,bottom:u}}function Sa(e,t,n,r){return e?0:Mt(t,n,r)}function U7(e,t,n){const r=e.options.borderWidth,a=e.borderSkipped,A=Nb(r);return{t:Sa(a.top,A.top,0,n),r:Sa(a.right,A.right,0,t),b:Sa(a.bottom,A.bottom,0,n),l:Sa(a.left,A.left,0,t)}}function Q7(e,t,n){const{enableBorderRadius:r}=e.getProps(["enableBorderRadius"]),a=e.options.borderRadius,A=Da(a),s=Math.min(t,n),o=e.borderSkipped,l=r||ve(a);return{topLeft:Sa(!l||o.top||o.left,A.topLeft,0,s),topRight:Sa(!l||o.top||o.right,A.topRight,0,s),bottomLeft:Sa(!l||o.bottom||o.left,A.bottomLeft,0,s),bottomRight:Sa(!l||o.bottom||o.right,A.bottomRight,0,s)}}function T7(e){const t=u_(e),n=t.right-t.left,r=t.bottom-t.top,a=U7(e,n/2,r/2),A=Q7(e,n/2,r/2);return{outer:{x:t.left,y:t.top,w:n,h:r,radius:A},inner:{x:t.left+a.l,y:t.top+a.t,w:n-a.l-a.r,h:r-a.t-a.b,radius:{topLeft:Math.max(0,A.topLeft-Math.max(a.t,a.l)),topRight:Math.max(0,A.topRight-Math.max(a.t,a.r)),bottomLeft:Math.max(0,A.bottomLeft-Math.max(a.b,a.l)),bottomRight:Math.max(0,A.bottomRight-Math.max(a.b,a.r))}}}}function wf(e,t,n,r){const a=t===null,A=n===null,o=e&&!(a&&A)&&u_(e,r);return o&&(a||$r(t,o.left,o.right))&&(A||$r(n,o.top,o.bottom))}function D7(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function L7(e,t){e.rect(t.x,t.y,t.w,t.h)}function bf(e,t,n={}){const r=e.x!==n.x?-t:0,a=e.y!==n.y?-t:0,A=(e.x+e.w!==n.x+n.w?t:0)-r,s=(e.y+e.h!==n.y+n.h?t:0)-a;return{x:e.x+r,y:e.y+a,w:e.w+A,h:e.h+s,radius:e.radius}}class eo extends an{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:n,options:{borderColor:r,backgroundColor:a}}=this,{inner:A,outer:s}=T7(this),o=D7(s.radius)?Rs:L7;t.save(),(s.w!==A.w||s.h!==A.h)&&(t.beginPath(),o(t,bf(s,n,A)),t.clip(),o(t,bf(A,-n,s)),t.fillStyle=r,t.fill("evenodd")),t.beginPath(),o(t,bf(A,n)),t.fillStyle=a,t.fill(),t.restore()}inRange(t,n,r){return wf(this,t,n,r)}inXRange(t,n){return wf(this,t,null,n)}inYRange(t,n){return wf(this,null,t,n)}getCenterPoint(t){const{x:n,y:r,base:a,horizontal:A}=this.getProps(["x","y","base","horizontal"],t);return{x:A?(n+a)/2:n,y:A?r:(r+a)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}R(eo,"id","bar"),R(eo,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),R(eo,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var O7=Object.freeze({__proto__:null,ArcElement:ys,BarElement:eo,LineElement:ka,PointElement:Zi});const Hh=["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)"],aB=Hh.map(e=>e.replace("rgb(","rgba(").replace(")",", 0.5)"));function d_(e){return Hh[e%Hh.length]}function f_(e){return aB[e%aB.length]}function M7(e,t){return e.borderColor=d_(t),e.backgroundColor=f_(t),++t}function N7(e,t){return e.backgroundColor=e.data.map(()=>d_(t++)),t}function P7(e,t){return e.backgroundColor=e.data.map(()=>f_(t++)),t}function H7(e){let t=0;return(n,r)=>{const a=e.getDatasetMeta(r).controller;a instanceof BA?t=N7(n,t):a instanceof Ji?t=P7(n,t):a&&(t=M7(n,t))}}function AB(e){let t;for(t in e)if(e[t].borderColor||e[t].backgroundColor)return!0;return!1}function R7(e){return e&&(e.borderColor||e.backgroundColor)}var V7={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(e,t,n){if(!n.enabled)return;const{data:{datasets:r},options:a}=e.config,{elements:A}=a;if(!n.forceOverride&&(AB(r)||R7(a)||A&&AB(A)))return;const s=H7(e);r.forEach(s)}};function K7(e,t,n,r,a){const A=a.samples||r;if(A>=n)return e.slice(t,t+n);const s=[],o=(n-2)/(A-2);let l=0;const c=t+n-1;let u=t,d,f,h,p,m;for(s[l++]=e[u],d=0;d<A-2;d++){let y=0,g=0,v;const _=Math.floor((d+1)*o)+1+t,B=Math.min(Math.floor((d+2)*o)+1,n)+t,b=B-_;for(v=_;v<B;v++)y+=e[v].x,g+=e[v].y;y/=b,g/=b;const w=Math.floor(d*o)+1+t,C=Math.min(Math.floor((d+1)*o)+1,n)+t,{x:k,y:S}=e[u];for(h=p=-1,v=w;v<C;v++)p=.5*Math.abs((k-y)*(e[v].y-S)-(k-e[v].x)*(g-S)),p>h&&(h=p,f=e[v],m=v);s[l++]=f,u=m}return s[l++]=e[c],s}function $7(e,t,n,r){let a=0,A=0,s,o,l,c,u,d,f,h,p,m;const y=[],g=t+n-1,v=e[t].x,B=e[g].x-v;for(s=t;s<t+n;++s){o=e[s],l=(o.x-v)/B*r,c=o.y;const b=l|0;if(b===u)c<p?(p=c,d=s):c>m&&(m=c,f=s),a=(A*a+o.x)/++A;else{const w=s-1;if(!_e(d)&&!_e(f)){const C=Math.min(d,f),k=Math.max(d,f);C!==h&&C!==w&&y.push({...e[C],x:a}),k!==h&&k!==w&&y.push({...e[k],x:a})}s>0&&w!==h&&y.push(e[w]),y.push(o),u=b,A=0,p=m=c,d=f=h=s}}return y}function h_(e){if(e._decimated){const t=e._data;delete e._decimated,delete e._data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,writable:!0,value:t})}}function sB(e){e.data.datasets.forEach(t=>{h_(t)})}function W7(e,t){const n=t.length;let r=0,a;const{iScale:A}=e,{min:s,max:o,minDefined:l,maxDefined:c}=A.getUserBounds();return l&&(r=Mt(Wr(t,A.axis,s).lo,0,n-1)),c?a=Mt(Wr(t,A.axis,o).hi+1,r,n)-r:a=n-r,{start:r,count:a}}var G7={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(e,t,n)=>{if(!n.enabled){sB(e);return}const r=e.width;e.data.datasets.forEach((a,A)=>{const{_data:s,indexAxis:o}=a,l=e.getDatasetMeta(A),c=s||a.data;if(tt([o,e.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;const u=e.scales[l.xAxisID];if(u.type!=="linear"&&u.type!=="time"||e.options.parsing)return;let{start:d,count:f}=W7(l,c);const h=n.threshold||4*r;if(f<=h){h_(a);return}_e(s)&&(a._data=c,delete a.data,Object.defineProperty(a,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(m){this._data=m}}));let p;switch(n.algorithm){case"lttb":p=K7(c,d,f,r,n);break;case"min-max":p=$7(c,d,f,r);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}a._decimated=p})},destroy(e){sB(e)}};function z7(e,t,n){const r=e.segments,a=e.points,A=t.points,s=[];for(const o of r){let{start:l,end:c}=o;c=qg(l,c,a);const u=Rh(n,a[l],a[c],o.loop);if(!t.segments){s.push({source:o,target:u,start:a[l],end:a[c]});continue}const d=qb(t,u);for(const f of d){const h=Rh(n,A[f.start],A[f.end],f.loop),p=Yb(o,a,h);for(const m of p)s.push({source:m,target:f,start:{[n]:iB(u,h,"start",Math.max)},end:{[n]:iB(u,h,"end",Math.min)}})}}return s}function Rh(e,t,n,r){if(r)return;let a=t[e],A=n[e];return e==="angle"&&(a=_n(a),A=_n(A)),{property:e,start:a,end:A}}function j7(e,t){const{x:n=null,y:r=null}=e||{},a=t.points,A=[];return t.segments.forEach(({start:s,end:o})=>{o=qg(s,o,a);const l=a[s],c=a[o];r!==null?(A.push({x:l.x,y:r}),A.push({x:c.x,y:r})):n!==null&&(A.push({x:n,y:l.y}),A.push({x:n,y:c.y}))}),A}function qg(e,t,n){for(;t>e;t--){const r=n[t];if(!isNaN(r.x)&&!isNaN(r.y))break}return t}function iB(e,t,n,r){return e&&t?r(e[n],t[n]):e?e[n]:t?t[n]:0}function p_(e,t){let n=[],r=!1;return Oe(e)?(r=!0,n=e):n=j7(e,t),n.length?new ka({points:n,options:{tension:0},_loop:r,_fullLoop:r}):null}function oB(e){return e&&e.fill!==!1}function Y7(e,t,n){let a=e[t].fill;const A=[t];let s;if(!n)return a;for(;a!==!1&&A.indexOf(a)===-1;){if(!ut(a))return a;if(s=e[a],!s)return!1;if(s.visible)return a;A.push(a),a=s.fill}return!1}function q7(e,t,n){const r=e9(e);if(ve(r))return isNaN(r.value)?!1:r;let a=parseFloat(r);return ut(a)&&Math.floor(a)===a?X7(r[0],t,a,n):["origin","start","end","stack","shape"].indexOf(r)>=0&&r}function X7(e,t,n,r){return(e==="-"||e==="+")&&(n=t+n),n===t||n<0||n>=r?!1:n}function J7(e,t){let n=null;return e==="start"?n=t.bottom:e==="end"?n=t.top:ve(e)?n=t.getPixelForValue(e.value):t.getBasePixel&&(n=t.getBasePixel()),n}function Z7(e,t,n){let r;return e==="start"?r=n:e==="end"?r=t.options.reverse?t.min:t.max:ve(e)?r=e.value:r=t.getBaseValue(),r}function e9(e){const t=e.options,n=t.fill;let r=de(n&&n.target,n);return r===void 0&&(r=!!t.backgroundColor),r===!1||r===null?!1:r===!0?"origin":r}function t9(e){const{scale:t,index:n,line:r}=e,a=[],A=r.segments,s=r.points,o=n9(t,n);o.push(p_({x:null,y:t.bottom},r));for(let l=0;l<A.length;l++){const c=A[l];for(let u=c.start;u<=c.end;u++)r9(a,s[u],o)}return new ka({points:a,options:{}})}function n9(e,t){const n=[],r=e.getMatchingVisibleMetas("line");for(let a=0;a<r.length;a++){const A=r[a];if(A.index===t)break;A.hidden||n.unshift(A.dataset)}return n}function r9(e,t,n){const r=[];for(let a=0;a<n.length;a++){const A=n[a],{first:s,last:o,point:l}=a9(A,t,"x");if(!(!l||s&&o)){if(s)r.unshift(l);else if(e.push(l),!o)break}}e.push(...r)}function a9(e,t,n){const r=e.interpolate(t,n);if(!r)return{};const a=r[n],A=e.segments,s=e.points;let o=!1,l=!1;for(let c=0;c<A.length;c++){const u=A[c],d=s[u.start][n],f=s[u.end][n];if($r(a,d,f)){o=a===d,l=a===f;break}}return{first:o,last:l,point:r}}class g_{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,n,r){const{x:a,y:A,radius:s}=this;return n=n||{start:0,end:Xe},t.arc(a,A,s,n.end,n.start,!0),!r.bounds}interpolate(t){const{x:n,y:r,radius:a}=this,A=t.angle;return{x:n+Math.cos(A)*a,y:r+Math.sin(A)*a,angle:A}}}function A9(e){const{chart:t,fill:n,line:r}=e;if(ut(n))return s9(t,n);if(n==="stack")return t9(e);if(n==="shape")return!0;const a=i9(e);return a instanceof g_?a:p_(a,r)}function s9(e,t){const n=e.getDatasetMeta(t);return n&&e.isDatasetVisible(t)?n.dataset:null}function i9(e){return(e.scale||{}).getPointPositionForValue?l9(e):o9(e)}function o9(e){const{scale:t={},fill:n}=e,r=J7(n,t);if(ut(r)){const a=t.isHorizontal();return{x:a?r:null,y:a?null:r}}return null}function l9(e){const{scale:t,fill:n}=e,r=t.options,a=t.getLabels().length,A=r.reverse?t.max:t.min,s=Z7(n,t,A),o=[];if(r.grid.circular){const l=t.getPointPositionForValue(0,A);return new g_({x:l.x,y:l.y,radius:t.getDistanceFromCenterForValue(s)})}for(let l=0;l<a;++l)o.push(t.getPointPositionForValue(l,s));return o}function _f(e,t,n){const r=A9(t),{line:a,scale:A,axis:s}=t,o=a.options,l=o.fill,c=o.backgroundColor,{above:u=c,below:d=c}=l||{};r&&a.points.length&&(tl(e,n),c9(e,{line:a,target:r,above:u,below:d,area:n,scale:A,axis:s}),nl(e))}function c9(e,t){const{line:n,target:r,above:a,below:A,area:s,scale:o}=t,l=n._loop?"angle":t.axis;e.save(),l==="x"&&A!==a&&(lB(e,r,s.top),cB(e,{line:n,target:r,color:a,scale:o,property:l}),e.restore(),e.save(),lB(e,r,s.bottom)),cB(e,{line:n,target:r,color:A,scale:o,property:l}),e.restore()}function lB(e,t,n){const{segments:r,points:a}=t;let A=!0,s=!1;e.beginPath();for(const o of r){const{start:l,end:c}=o,u=a[l],d=a[qg(l,c,a)];A?(e.moveTo(u.x,u.y),A=!1):(e.lineTo(u.x,n),e.lineTo(u.x,u.y)),s=!!t.pathSegment(e,o,{move:s}),s?e.closePath():e.lineTo(d.x,n)}e.lineTo(t.first().x,n),e.closePath(),e.clip()}function cB(e,t){const{line:n,target:r,property:a,color:A,scale:s}=t,o=z7(n,r,a);for(const{source:l,target:c,start:u,end:d}of o){const{style:{backgroundColor:f=A}={}}=l,h=r!==!0;e.save(),e.fillStyle=f,u9(e,s,h&&Rh(a,u,d)),e.beginPath();const p=!!n.pathSegment(e,l);let m;if(h){p?e.closePath():uB(e,r,d,a);const y=!!r.pathSegment(e,c,{move:p,reverse:!0});m=p&&y,m||uB(e,r,u,a)}e.closePath(),e.fill(m?"evenodd":"nonzero"),e.restore()}}function u9(e,t,n){const{top:r,bottom:a}=t.chart.chartArea,{property:A,start:s,end:o}=n||{};A==="x"&&(e.beginPath(),e.rect(s,r,o-s,a-r),e.clip())}function uB(e,t,n,r){const a=t.interpolate(n,r);a&&e.lineTo(a.x,a.y)}var d9={id:"filler",afterDatasetsUpdate(e,t,n){const r=(e.data.datasets||[]).length,a=[];let A,s,o,l;for(s=0;s<r;++s)A=e.getDatasetMeta(s),o=A.dataset,l=null,o&&o.options&&o instanceof ka&&(l={visible:e.isDatasetVisible(s),index:s,fill:q7(o,s,r),chart:e,axis:A.controller.options.indexAxis,scale:A.vScale,line:o}),A.$filler=l,a.push(l);for(s=0;s<r;++s)l=a[s],!(!l||l.fill===!1)&&(l.fill=Y7(a,s,n.propagate))},beforeDraw(e,t,n){const r=n.drawTime==="beforeDraw",a=e.getSortedVisibleDatasetMetas(),A=e.chartArea;for(let s=a.length-1;s>=0;--s){const o=a[s].$filler;o&&(o.line.updateControlPoints(A,o.axis),r&&o.fill&&_f(e.ctx,o,A))}},beforeDatasetsDraw(e,t,n){if(n.drawTime!=="beforeDatasetsDraw")return;const r=e.getSortedVisibleDatasetMetas();for(let a=r.length-1;a>=0;--a){const A=r[a].$filler;oB(A)&&_f(e.ctx,A,e.chartArea)}},beforeDatasetDraw(e,t,n){const r=t.meta.$filler;!oB(r)||n.drawTime!=="beforeDatasetDraw"||_f(e.ctx,r,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const dB=(e,t)=>{let{boxHeight:n=t,boxWidth:r=t}=e;return e.usePointStyle&&(n=Math.min(n,t),r=e.pointStyleWidth||Math.min(r,t)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(t,n)}},f9=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class fB extends an{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n,r){this.maxWidth=t,this.maxHeight=n,this._margins=r,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let n=He(t.generateLabels,[this.chart],this)||[];t.filter&&(n=n.filter(r=>t.filter(r,this.chart.data))),t.sort&&(n=n.sort((r,a)=>t.sort(r,a,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:t,ctx:n}=this;if(!t.display){this.width=this.height=0;return}const r=t.labels,a=ft(r.font),A=a.size,s=this._computeTitleHeight(),{boxWidth:o,itemHeight:l}=dB(r,A);let c,u;n.font=a.string,this.isHorizontal()?(c=this.maxWidth,u=this._fitRows(s,A,o,l)+10):(u=this.maxHeight,c=this._fitCols(s,a,o,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(u,t.maxHeight||this.maxHeight)}_fitRows(t,n,r,a){const{ctx:A,maxWidth:s,options:{labels:{padding:o}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],u=a+o;let d=t;A.textAlign="left",A.textBaseline="middle";let f=-1,h=-u;return this.legendItems.forEach((p,m)=>{const y=r+n/2+A.measureText(p.text).width;(m===0||c[c.length-1]+y+2*o>s)&&(d+=u,c[c.length-(m>0?0:1)]=0,h+=u,f++),l[m]={left:0,top:h,row:f,width:y,height:a},c[c.length-1]+=y+o}),d}_fitCols(t,n,r,a){const{ctx:A,maxHeight:s,options:{labels:{padding:o}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],u=s-t;let d=o,f=0,h=0,p=0,m=0;return this.legendItems.forEach((y,g)=>{const{itemWidth:v,itemHeight:_}=h9(r,n,A,y,a);g>0&&h+_+2*o>u&&(d+=f+o,c.push({width:f,height:h}),p+=f+o,m++,f=h=0),l[g]={left:p,top:h,col:m,width:v,height:_},f=Math.max(f,v),h+=_+o}),d+=f,c.push({width:f,height:h}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:r,labels:{padding:a},rtl:A}}=this,s=Cs(A,this.left,this.width);if(this.isHorizontal()){let o=0,l=$t(r,this.left+a,this.right-this.lineWidths[o]);for(const c of n)o!==c.row&&(o=c.row,l=$t(r,this.left+a,this.right-this.lineWidths[o])),c.top+=this.top+t+a,c.left=s.leftForLtr(s.x(l),c.width),l+=c.width+a}else{let o=0,l=$t(r,this.top+t+a,this.bottom-this.columnSizes[o].height);for(const c of n)c.col!==o&&(o=c.col,l=$t(r,this.top+t+a,this.bottom-this.columnSizes[o].height)),c.top=l,c.left+=this.left+a,c.left=s.leftForLtr(s.x(c.left),c.width),l+=c.height+a}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;tl(t,this),this._draw(),nl(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:r,ctx:a}=this,{align:A,labels:s}=t,o=dt.color,l=Cs(t.rtl,this.left,this.width),c=ft(s.font),{padding:u}=s,d=c.size,f=d/2;let h;this.drawTitle(),a.textAlign=l.textAlign("left"),a.textBaseline="middle",a.lineWidth=.5,a.font=c.string;const{boxWidth:p,boxHeight:m,itemHeight:y}=dB(s,d),g=function(w,C,k){if(isNaN(p)||p<=0||isNaN(m)||m<0)return;a.save();const S=de(k.lineWidth,1);if(a.fillStyle=de(k.fillStyle,o),a.lineCap=de(k.lineCap,"butt"),a.lineDashOffset=de(k.lineDashOffset,0),a.lineJoin=de(k.lineJoin,"miter"),a.lineWidth=S,a.strokeStyle=de(k.strokeStyle,o),a.setLineDash(de(k.lineDash,[])),s.usePointStyle){const T={radius:m*Math.SQRT2/2,pointStyle:k.pointStyle,rotation:k.rotation,borderWidth:S},U=l.xPlus(w,p/2),F=C+f;Mb(a,T,U,F,s.pointStyleWidth&&p)}else{const T=C+Math.max((d-m)/2,0),U=l.leftForLtr(w,p),F=Da(k.borderRadius);a.beginPath(),Object.values(F).some(Q=>Q!==0)?Rs(a,{x:U,y:T,w:p,h:m,radius:F}):a.rect(U,T,p,m),a.fill(),S!==0&&a.stroke()}a.restore()},v=function(w,C,k){OA(a,k.text,w,C+y/2,c,{strikethrough:k.hidden,textAlign:l.textAlign(k.textAlign)})},_=this.isHorizontal(),B=this._computeTitleHeight();_?h={x:$t(A,this.left+u,this.right-r[0]),y:this.top+u+B,line:0}:h={x:this.left+u,y:$t(A,this.top+B+u,this.bottom-n[0].height),line:0},Gb(this.ctx,t.textDirection);const b=y+u;this.legendItems.forEach((w,C)=>{a.strokeStyle=w.fontColor,a.fillStyle=w.fontColor;const k=a.measureText(w.text).width,S=l.textAlign(w.textAlign||(w.textAlign=s.textAlign)),T=p+f+k;let U=h.x,F=h.y;l.setWidth(this.width),_?C>0&&U+T+u>this.right&&(F=h.y+=b,h.line++,U=h.x=$t(A,this.left+u,this.right-r[h.line])):C>0&&F+b>this.bottom&&(U=h.x=U+n[h.line].width+u,h.line++,F=h.y=$t(A,this.top+B+u,this.bottom-n[h.line].height));const Q=l.x(U);if(g(Q,F,w),U=OL(S,U+p+f,_?U+T:this.right,t.rtl),v(l.x(U),F,w),_)h.x+=T+u;else if(typeof w.text!="string"){const Y=c.lineHeight;h.y+=m_(w,Y)}else h.y+=b}),zb(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,r=ft(n.font),a=_t(n.padding);if(!n.display)return;const A=Cs(t.rtl,this.left,this.width),s=this.ctx,o=n.position,l=r.size/2,c=a.top+l;let u,d=this.left,f=this.width;if(this.isHorizontal())f=Math.max(...this.lineWidths),u=this.top+c,d=$t(t.align,d,this.right-f);else{const p=this.columnSizes.reduce((m,y)=>Math.max(m,y.height),0);u=c+$t(t.align,this.top,this.bottom-p-t.labels.padding-this._computeTitleHeight())}const h=$t(o,d,d+f);s.textAlign=A.textAlign(Rg(o)),s.textBaseline="middle",s.strokeStyle=n.color,s.fillStyle=n.color,s.font=r.string,OA(s,n.text,h,u,r)}_computeTitleHeight(){const t=this.options.title,n=ft(t.font),r=_t(t.padding);return t.display?n.lineHeight+r.height:0}_getLegendItemAt(t,n){let r,a,A;if($r(t,this.left,this.right)&&$r(n,this.top,this.bottom)){for(A=this.legendHitBoxes,r=0;r<A.length;++r)if(a=A[r],$r(t,a.left,a.left+a.width)&&$r(n,a.top,a.top+a.height))return this.legendItems[r]}return null}handleEvent(t){const n=this.options;if(!m9(t.type,n))return;const r=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const a=this._hoveredItem,A=f9(a,r);a&&!A&&He(n.onLeave,[t,a,this],this),this._hoveredItem=r,r&&!A&&He(n.onHover,[t,r,this],this)}else r&&He(n.onClick,[t,r,this],this)}}function h9(e,t,n,r,a){const A=p9(r,e,t,n),s=g9(a,r,t.lineHeight);return{itemWidth:A,itemHeight:s}}function p9(e,t,n,r){let a=e.text;return a&&typeof a!="string"&&(a=a.reduce((A,s)=>A.length>s.length?A:s)),t+n.size/2+r.measureText(a).width}function g9(e,t,n){let r=e;return typeof t.text!="string"&&(r=m_(t,n)),r}function m_(e,t){const n=e.text?e.text.length+.5:0;return t*n}function m9(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var v9={id:"legend",_element:fB,start(e,t,n){const r=e.legend=new fB({ctx:e.ctx,options:n,chart:e});Gt.configure(e,r,n),Gt.addBox(e,r)},stop(e){Gt.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const r=e.legend;Gt.configure(e,r,n),r.options=n},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){const r=t.datasetIndex,a=n.chart;a.isDatasetVisible(r)?(a.hide(r),t.hidden=!0):(a.show(r),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:a,color:A,useBorderRadius:s,borderRadius:o}}=e.legend.options;return e._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(n?0:void 0),u=_t(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:A,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:c.borderColor,pointStyle:r||c.pointStyle,rotation:c.rotation,textAlign:a||c.textAlign,borderRadius:s&&(o||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};class Xg extends an{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n){const r=this.options;if(this.left=0,this.top=0,!r.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=n;const a=Oe(r.text)?r.text.length:1;this._padding=_t(r.padding);const A=a*ft(r.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=A:this.width=A}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:n,left:r,bottom:a,right:A,options:s}=this,o=s.align;let l=0,c,u,d;return this.isHorizontal()?(u=$t(o,r,A),d=n+t,c=A-r):(s.position==="left"?(u=r+t,d=$t(o,a,n),l=Qe*-.5):(u=A-t,d=$t(o,n,a),l=Qe*.5),c=a-n),{titleX:u,titleY:d,maxWidth:c,rotation:l}}draw(){const t=this.ctx,n=this.options;if(!n.display)return;const r=ft(n.font),A=r.lineHeight/2+this._padding.top,{titleX:s,titleY:o,maxWidth:l,rotation:c}=this._drawArgs(A);OA(t,n.text,0,0,r,{color:n.color,maxWidth:l,rotation:c,textAlign:Rg(n.align),textBaseline:"middle",translation:[s,o]})}}function B9(e,t){const n=new Xg({ctx:e.ctx,options:t,chart:e});Gt.configure(e,n,t),Gt.addBox(e,n),e.titleBlock=n}var y9={id:"title",_element:Xg,start(e,t,n){B9(e,n)},stop(e){const t=e.titleBlock;Gt.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){const r=e.titleBlock;Gt.configure(e,r,n),r.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 jl=new WeakMap;var w9={id:"subtitle",start(e,t,n){const r=new Xg({ctx:e.ctx,options:n,chart:e});Gt.configure(e,r,n),Gt.addBox(e,r),jl.set(e,r)},stop(e){Gt.removeBox(e,jl.get(e)),jl.delete(e)},beforeUpdate(e,t,n){const r=jl.get(e);Gt.configure(e,r,n),r.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 Ii={average(e){if(!e.length)return!1;let t,n,r=0,a=0,A=0;for(t=0,n=e.length;t<n;++t){const s=e[t].element;if(s&&s.hasValue()){const o=s.tooltipPosition();r+=o.x,a+=o.y,++A}}return{x:r/A,y:a/A}},nearest(e,t){if(!e.length)return!1;let n=t.x,r=t.y,a=Number.POSITIVE_INFINITY,A,s,o;for(A=0,s=e.length;A<s;++A){const l=e[A].element;if(l&&l.hasValue()){const c=l.getCenterPoint(),u=Hs(t,c);u<a&&(a=u,o=l)}}if(o){const l=o.tooltipPosition();n=l.x,r=l.y}return{x:n,y:r}}};function lr(e,t){return t&&(Oe(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function Nr(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
|
|
825
|
+
*/class OO{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,n,r,a){const A=n.listeners[a],s=n.duration;A.forEach(o=>o({chart:t,initial:n.initial,numSteps:s,currentStep:Math.min(r-n.start,s)}))}_refresh(){this._request||(this._running=!0,this._request=Qb.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((r,a)=>{if(!r.running||!r.items.length)return;const A=r.items;let s=A.length-1,o=!1,l;for(;s>=0;--s)l=A[s],l._active?(l._total>r.duration&&(r.duration=l._total),l.tick(t),o=!0):(A[s]=A[A.length-1],A.pop());o&&(a.draw(),this._notify(a,r,t,"progress")),A.length||(r.running=!1,this._notify(a,r,t,"complete"),r.initial=!1),n+=A.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let r=n.get(t);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,r)),r}listen(t,n,r){this._getAnims(t).listeners[n].push(r)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((r,a)=>Math.max(r,a._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const r=n.items;let a=r.length-1;for(;a>=0;--a)r[a].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var Mr=new OO;const xv="transparent",MO={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const r=vv(e||xv),a=r.valid&&vv(t||xv);return a&&a.valid?a.mix(r,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class NO{constructor(t,n,r,a){const A=n[r];a=tt([t.to,a,A,t.from]);const s=tt([t.from,A,a]);this._active=!0,this._fn=t.fn||MO[t.type||typeof s],this._easing=qi[t.easing]||qi.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=r,this._from=s,this._to=a,this._promises=void 0}active(){return this._active}update(t,n,r){if(this._active){this._notify(!1);const a=this._target[this._prop],A=r-this._start,s=this._duration-A;this._start=r,this._duration=Math.floor(Math.max(s,t.duration)),this._total+=A,this._loop=!!t.loop,this._to=tt([t.to,n,a,t.from]),this._from=tt([t.from,a,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,r=this._duration,a=this._prop,A=this._from,s=this._loop,o=this._to;let l;if(this._active=A!==o&&(s||n<r),!this._active){this._target[a]=o,this._notify(!0);return}if(n<0){this._target[a]=A;return}l=n/r%2,l=s&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[a]=this._fn(A,o,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,r)=>{t.push({res:n,rej:r})})}_notify(t){const n=t?"res":"rej",r=this._promises||[];for(let a=0;a<r.length;a++)r[a][n]()}}class jg{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!ve(t))return;const n=Object.keys(dt.animation),r=this._properties;Object.getOwnPropertyNames(t).forEach(a=>{const A=t[a];if(!ve(A))return;const s={};for(const o of n)s[o]=A[o];(Oe(A.properties)&&A.properties||[a]).forEach(o=>{(o===a||!r.has(o))&&r.set(o,s)})})}_animateOptions(t,n){const r=n.options,a=HO(t,r);if(!a)return[];const A=this._createAnimations(a,r);return r.$shared&&PO(t.options.$animations,r).then(()=>{t.options=r},()=>{}),A}_createAnimations(t,n){const r=this._properties,a=[],A=t.$animations||(t.$animations={}),s=Object.keys(n),o=Date.now();let l;for(l=s.length-1;l>=0;--l){const c=s[l];if(c.charAt(0)==="$")continue;if(c==="options"){a.push(...this._animateOptions(t,n));continue}const u=n[c];let d=A[c];const f=r.get(c);if(d)if(f&&d.active()){d.update(f,u,o);continue}else d.cancel();if(!f||!f.duration){t[c]=u;continue}A[c]=d=new NO(f,t,c,u),a.push(d)}return a}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const r=this._createAnimations(t,n);if(r.length)return Mr.add(this._chart,r),!0}}function PO(e,t){const n=[],r=Object.keys(t);for(let a=0;a<r.length;a++){const A=e[r[a]];A&&A.active()&&n.push(A.wait())}return Promise.all(n)}function HO(e,t){if(!t)return;let n=e.options;if(!n){e.options=t;return}return n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function Fv(e,t){const n=e&&e.options||{},r=n.reverse,a=n.min===void 0?t:0,A=n.max===void 0?t:0;return{start:r?A:a,end:r?a:A}}function RO(e,t,n){if(n===!1)return!1;const r=Fv(e,n),a=Fv(t,n);return{top:a.end,right:r.end,bottom:a.start,left:r.start}}function VO(e){let t,n,r,a;return ve(e)?(t=e.top,n=e.right,r=e.bottom,a=e.left):t=n=r=a=e,{top:t,right:n,bottom:r,left:a,disabled:e===!1}}function Xb(e,t){const n=[],r=e._getSortedDatasetMetas(t);let a,A;for(a=0,A=r.length;a<A;++a)n.push(r[a].index);return n}function Iv(e,t,n,r={}){const a=e.keys,A=r.mode==="single";let s,o,l,c;if(t!==null){for(s=0,o=a.length;s<o;++s){if(l=+a[s],l===n){if(r.all)continue;break}c=e.values[l],ut(c)&&(A||t===0||vr(t)===vr(c))&&(t+=c)}return t}}function KO(e){const t=Object.keys(e),n=new Array(t.length);let r,a,A;for(r=0,a=t.length;r<a;++r)A=t[r],n[r]={x:A,y:e[A]};return n}function Uv(e,t){const n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function $O(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}function WO(e){const{min:t,max:n,minDefined:r,maxDefined:a}=e.getUserBounds();return{min:r?t:Number.NEGATIVE_INFINITY,max:a?n:Number.POSITIVE_INFINITY}}function GO(e,t,n){const r=e[t]||(e[t]={});return r[n]||(r[n]={})}function Qv(e,t,n,r){for(const a of t.getMatchingVisibleMetas(r).reverse()){const A=e[a.index];if(n&&A>0||!n&&A<0)return a.index}return null}function Tv(e,t){const{chart:n,_cachedMeta:r}=e,a=n._stacks||(n._stacks={}),{iScale:A,vScale:s,index:o}=r,l=A.axis,c=s.axis,u=$O(A,s,r),d=t.length;let f;for(let h=0;h<d;++h){const p=t[h],{[l]:m,[c]:y}=p,g=p._stacks||(p._stacks={});f=g[c]=GO(a,u,m),f[o]=y,f._top=Qv(f,s,!0,r.type),f._bottom=Qv(f,s,!1,r.type);const v=f._visualValues||(f._visualValues={});v[o]=y}}function pf(e,t){const n=e.scales;return Object.keys(n).filter(r=>n[r].axis===t).shift()}function zO(e,t){return rA(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function jO(e,t,n){return rA(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function fi(e,t){const n=e.controller.index,r=e.vScale&&e.vScale.axis;if(r){t=t||e._parsed;for(const a of t){const A=a._stacks;if(!A||A[r]===void 0||A[r][n]===void 0)return;delete A[r][n],A[r]._visualValues!==void 0&&A[r]._visualValues[n]!==void 0&&delete A[r]._visualValues[n]}}}const gf=e=>e==="reset"||e==="none",Dv=(e,t)=>t?e:Object.assign({},e),YO=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:Xb(n,!0),values:null};class er{constructor(t,n){this.chart=t,this._ctx=t.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 t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Uv(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&fi(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,r=this.getDataset(),a=(d,f,h,p)=>d==="x"?f:d==="r"?p:h,A=n.xAxisID=de(r.xAxisID,pf(t,"x")),s=n.yAxisID=de(r.yAxisID,pf(t,"y")),o=n.rAxisID=de(r.rAxisID,pf(t,"r")),l=n.indexAxis,c=n.iAxisID=a(l,A,s,o),u=n.vAxisID=a(l,s,A,o);n.xScale=this.getScaleForId(A),n.yScale=this.getScaleForId(s),n.rScale=this.getScaleForId(o),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(t){return this.chart.scales[t]}_getOtherScale(t){const n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&pv(this._data,this),t._stacked&&fi(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),r=this._data;if(ve(n))this._data=KO(n);else if(r!==n){if(r){pv(r,this);const a=this._cachedMeta;fi(a),a._parsed=[]}n&&Object.isExtensible(n)&&DL(n,this),this._syncList=[],this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const n=this._cachedMeta,r=this.getDataset();let a=!1;this._dataCheck();const A=n._stacked;n._stacked=Uv(n.vScale,n),n.stack!==r.stack&&(a=!0,fi(n),n.stack=r.stack),this._resyncElements(t),(a||A!==n._stacked)&&Tv(this,n._parsed)}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),r=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:r,_data:a}=this,{iScale:A,_stacked:s}=r,o=A.axis;let l=t===0&&n===a.length?!0:r._sorted,c=t>0&&r._parsed[t-1],u,d,f;if(this._parsing===!1)r._parsed=a,r._sorted=!0,f=a;else{Oe(a[t])?f=this.parseArrayData(r,a,t,n):ve(a[t])?f=this.parseObjectData(r,a,t,n):f=this.parsePrimitiveData(r,a,t,n);const h=()=>d[o]===null||c&&d[o]<c[o];for(u=0;u<n;++u)r._parsed[u+t]=d=f[u],l&&(h()&&(l=!1),c=d);r._sorted=l}s&&Tv(this,f)}parsePrimitiveData(t,n,r,a){const{iScale:A,vScale:s}=t,o=A.axis,l=s.axis,c=A.getLabels(),u=A===s,d=new Array(a);let f,h,p;for(f=0,h=a;f<h;++f)p=f+r,d[f]={[o]:u||A.parse(c[p],p),[l]:s.parse(n[p],p)};return d}parseArrayData(t,n,r,a){const{xScale:A,yScale:s}=t,o=new Array(a);let l,c,u,d;for(l=0,c=a;l<c;++l)u=l+r,d=n[u],o[l]={x:A.parse(d[0],u),y:s.parse(d[1],u)};return o}parseObjectData(t,n,r,a){const{xScale:A,yScale:s}=t,{xAxisKey:o="x",yAxisKey:l="y"}=this._parsing,c=new Array(a);let u,d,f,h;for(u=0,d=a;u<d;++u)f=u+r,h=n[f],c[u]={x:A.parse(Ga(h,o),f),y:s.parse(Ga(h,l),f)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,n,r){const a=this.chart,A=this._cachedMeta,s=n[t.axis],o={keys:Xb(a,!0),values:n._stacks[t.axis]._visualValues};return Iv(o,s,A.index,{mode:r})}updateRangeFromParsed(t,n,r,a){const A=r[n.axis];let s=A===null?NaN:A;const o=a&&r._stacks[n.axis];a&&o&&(a.values=o,s=Iv(a,A,this._cachedMeta.index)),t.min=Math.min(t.min,s),t.max=Math.max(t.max,s)}getMinMax(t,n){const r=this._cachedMeta,a=r._parsed,A=r._sorted&&t===r.iScale,s=a.length,o=this._getOtherScale(t),l=YO(n,r,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:d}=WO(o);let f,h;function p(){h=a[f];const m=h[o.axis];return!ut(h[t.axis])||u>m||d<m}for(f=0;f<s&&!(!p()&&(this.updateRangeFromParsed(c,t,h,l),A));++f);if(A){for(f=s-1;f>=0;--f)if(!p()){this.updateRangeFromParsed(c,t,h,l);break}}return c}getAllParsedValues(t){const n=this._cachedMeta._parsed,r=[];let a,A,s;for(a=0,A=n.length;a<A;++a)s=n[a][t.axis],ut(s)&&r.push(s);return r}getMaxOverflow(){return!1}getLabelAndValue(t){const n=this._cachedMeta,r=n.iScale,a=n.vScale,A=this.getParsed(t);return{label:r?""+r.getLabelForValue(A[r.axis]):"",value:a?""+a.getLabelForValue(A[a.axis]):""}}_update(t){const n=this._cachedMeta;this.update(t||"default"),n._clip=VO(de(this.options.clip,RO(n.xScale,n.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,n=this.chart,r=this._cachedMeta,a=r.data||[],A=n.chartArea,s=[],o=this._drawStart||0,l=this._drawCount||a.length-o,c=this.options.drawActiveElementsOnTop;let u;for(r.dataset&&r.dataset.draw(t,A,o,l),u=o;u<o+l;++u){const d=a[u];d.hidden||(d.active&&c?s.push(d):d.draw(t,A))}for(u=0;u<s.length;++u)s[u].draw(t,A)}getStyle(t,n){const r=n?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(r):this.resolveDataElementOptions(t||0,r)}getContext(t,n,r){const a=this.getDataset();let A;if(t>=0&&t<this._cachedMeta.data.length){const s=this._cachedMeta.data[t];A=s.$context||(s.$context=jO(this.getContext(),t,s)),A.parsed=this.getParsed(t),A.raw=a.data[t],A.index=A.dataIndex=t}else A=this.$context||(this.$context=zO(this.chart.getContext(),this.index)),A.dataset=a,A.index=A.datasetIndex=this.index;return A.active=!!n,A.mode=r,A}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,n){return this._resolveElementOptions(this.dataElementType.id,n,t)}_resolveElementOptions(t,n="default",r){const a=n==="active",A=this._cachedDataOpts,s=t+"-"+n,o=A[s],l=this.enableOptionSharing&&vn(r);if(o)return Dv(o,l);const c=this.chart.config,u=c.datasetElementScopeKeys(this._type,t),d=a?[`${t}Hover`,"hover",t,""]:[t,""],f=c.getOptionScopes(this.getDataset(),u),h=Object.keys(dt.elements[t]),p=()=>this.getContext(r,a,n),m=c.resolveNamedOptions(f,h,p,d);return m.$shared&&(m.$shared=l,A[s]=Object.freeze(Dv(m,l))),m}_resolveAnimations(t,n,r){const a=this.chart,A=this._cachedDataOpts,s=`animation-${n}`,o=A[s];if(o)return o;let l;if(a.options.animation!==!1){const u=this.chart.config,d=u.datasetAnimationScopeKeys(this._type,n),f=u.getOptionScopes(this.getDataset(),d);l=u.createResolver(f,this.getContext(t,r,n))}const c=new jg(a,l&&l.animations);return l&&l._cacheable&&(A[s]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||gf(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const r=this.resolveDataElementOptions(t,n),a=this._sharedOptions,A=this.getSharedOptions(r),s=this.includeOptions(n,A)||A!==a;return this.updateSharedOptions(A,n,r),{sharedOptions:A,includeOptions:s}}updateElement(t,n,r,a){gf(a)?Object.assign(t,r):this._resolveAnimations(n,a).update(t,r)}updateSharedOptions(t,n,r){t&&!gf(n)&&this._resolveAnimations(void 0,n).update(t,r)}_setStyle(t,n,r,a){t.active=a;const A=this.getStyle(n,a);this._resolveAnimations(n,r,a).update(t,{options:!a&&this.getSharedOptions(A)||A})}removeHoverStyle(t,n,r){this._setStyle(t,r,"active",!1)}setHoverStyle(t,n,r){this._setStyle(t,r,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const n=this._data,r=this._cachedMeta.data;for(const[o,l,c]of this._syncList)this[o](l,c);this._syncList=[];const a=r.length,A=n.length,s=Math.min(A,a);s&&this.parse(0,s),A>a?this._insertElements(a,A-a,t):A<a&&this._removeElements(A,a-A)}_insertElements(t,n,r=!0){const a=this._cachedMeta,A=a.data,s=t+n;let o;const l=c=>{for(c.length+=n,o=c.length-1;o>=s;o--)c[o]=c[o-n]};for(l(A),o=t;o<s;++o)A[o]=new this.dataElementType;this._parsing&&l(a._parsed),this.parse(t,n),r&&this.updateElements(A,t,n,"reset")}updateElements(t,n,r,a){}_removeElements(t,n){const r=this._cachedMeta;if(this._parsing){const a=r._parsed.splice(t,n);r._stacked&&fi(r,a)}r.data.splice(t,n)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[n,r,a]=t;this[n](r,a)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,n){n&&this._sync(["_removeElements",t,n]);const r=arguments.length-2;r&&this._sync(["_insertElements",t,r])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}R(er,"defaults",{}),R(er,"datasetElementType",null),R(er,"dataElementType",null);function qO(e,t){if(!e._cache.$bar){const n=e.getMatchingVisibleMetas(t);let r=[];for(let a=0,A=n.length;a<A;a++)r=r.concat(n[a].controller.getAllParsedValues(e));e._cache.$bar=Ub(r.sort((a,A)=>a-A))}return e._cache.$bar}function XO(e){const t=e.iScale,n=qO(t,e.type);let r=t._length,a,A,s,o;const l=()=>{s===32767||s===-32768||(vn(o)&&(r=Math.min(r,Math.abs(s-o)||r)),o=s)};for(a=0,A=n.length;a<A;++a)s=t.getPixelForValue(n[a]),l();for(o=void 0,a=0,A=t.ticks.length;a<A;++a)s=t.getPixelForTick(a),l();return r}function JO(e,t,n,r){const a=n.barThickness;let A,s;return _e(a)?(A=t.min*n.categoryPercentage,s=n.barPercentage):(A=a*r,s=1),{chunk:A/r,ratio:s,start:t.pixels[e]-A/2}}function ZO(e,t,n,r){const a=t.pixels,A=a[e];let s=e>0?a[e-1]:null,o=e<a.length-1?a[e+1]:null;const l=n.categoryPercentage;s===null&&(s=A-(o===null?t.end-t.start:o-A)),o===null&&(o=A+A-s);const c=A-(A-Math.min(s,o))/2*l;return{chunk:Math.abs(o-s)/2*l/r,ratio:n.barPercentage,start:c}}function e7(e,t,n,r){const a=n.parse(e[0],r),A=n.parse(e[1],r),s=Math.min(a,A),o=Math.max(a,A);let l=s,c=o;Math.abs(s)>Math.abs(o)&&(l=o,c=s),t[n.axis]=c,t._custom={barStart:l,barEnd:c,start:a,end:A,min:s,max:o}}function Jb(e,t,n,r){return Oe(e)?e7(e,t,n,r):t[n.axis]=n.parse(e,r),t}function Lv(e,t,n,r){const a=e.iScale,A=e.vScale,s=a.getLabels(),o=a===A,l=[];let c,u,d,f;for(c=n,u=n+r;c<u;++c)f=t[c],d={},d[a.axis]=o||a.parse(s[c],c),l.push(Jb(f,d,A,c));return l}function mf(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function t7(e,t,n){return e!==0?vr(e):(t.isHorizontal()?1:-1)*(t.min>=n?1:-1)}function n7(e){let t,n,r,a,A;return e.horizontal?(t=e.base>e.x,n="left",r="right"):(t=e.base<e.y,n="bottom",r="top"),t?(a="end",A="start"):(a="start",A="end"),{start:n,end:r,reverse:t,top:a,bottom:A}}function r7(e,t,n,r){let a=t.borderSkipped;const A={};if(!a){e.borderSkipped=A;return}if(a===!0){e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:s,end:o,reverse:l,top:c,bottom:u}=n7(e);a==="middle"&&n&&(e.enableBorderRadius=!0,(n._top||0)===r?a=c:(n._bottom||0)===r?a=u:(A[Ov(u,s,o,l)]=!0,a=c)),A[Ov(a,s,o,l)]=!0,e.borderSkipped=A}function Ov(e,t,n,r){return r?(e=a7(e,t,n),e=Mv(e,n,t)):e=Mv(e,t,n),e}function a7(e,t,n){return e===t?n:e===n?t:e}function Mv(e,t,n){return e==="start"?t:e==="end"?n:e}function A7(e,{inflateAmount:t},n){e.inflateAmount=t==="auto"?n===1?.33:0:t}class Tc extends er{parsePrimitiveData(t,n,r,a){return Lv(t,n,r,a)}parseArrayData(t,n,r,a){return Lv(t,n,r,a)}parseObjectData(t,n,r,a){const{iScale:A,vScale:s}=t,{xAxisKey:o="x",yAxisKey:l="y"}=this._parsing,c=A.axis==="x"?o:l,u=s.axis==="x"?o:l,d=[];let f,h,p,m;for(f=r,h=r+a;f<h;++f)m=n[f],p={},p[A.axis]=A.parse(Ga(m,c),f),d.push(Jb(Ga(m,u),p,s,f));return d}updateRangeFromParsed(t,n,r,a){super.updateRangeFromParsed(t,n,r,a);const A=r._custom;A&&n===this._cachedMeta.vScale&&(t.min=Math.min(t.min,A.min),t.max=Math.max(t.max,A.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const n=this._cachedMeta,{iScale:r,vScale:a}=n,A=this.getParsed(t),s=A._custom,o=mf(s)?"["+s.start+", "+s.end+"]":""+a.getLabelForValue(A[a.axis]);return{label:""+r.getLabelForValue(A[r.axis]),value:o}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,t)}updateElements(t,n,r,a){const A=a==="reset",{index:s,_cachedMeta:{vScale:o}}=this,l=o.getBasePixel(),c=o.isHorizontal(),u=this._getRuler(),{sharedOptions:d,includeOptions:f}=this._getSharedOptions(n,a);for(let h=n;h<n+r;h++){const p=this.getParsed(h),m=A||_e(p[o.axis])?{base:l,head:l}:this._calculateBarValuePixels(h),y=this._calculateBarIndexPixels(h,u),g=(p._stacks||{})[o.axis],v={horizontal:c,base:m.base,enableBorderRadius:!g||mf(p._custom)||s===g._top||s===g._bottom,x:c?m.head:y.center,y:c?y.center:m.head,height:c?y.size:Math.abs(m.size),width:c?Math.abs(m.size):y.size};f&&(v.options=d||this.resolveDataElementOptions(h,t[h].active?"active":a));const _=v.options||t[h].options;r7(v,_,g,s),A7(v,_,u.ratio),this.updateElement(t[h],h,v,a)}}_getStacks(t,n){const{iScale:r}=this._cachedMeta,a=r.getMatchingVisibleMetas(this._type).filter(l=>l.controller.options.grouped),A=r.options.stacked,s=[],o=l=>{const c=l.controller.getParsed(n),u=c&&c[l.vScale.axis];if(_e(u)||isNaN(u))return!0};for(const l of a)if(!(n!==void 0&&o(l))&&((A===!1||s.indexOf(l.stack)===-1||A===void 0&&l.stack===void 0)&&s.push(l.stack),l.index===t))break;return s.length||s.push(void 0),s}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,n,r){const a=this._getStacks(t,r),A=n!==void 0?a.indexOf(n):-1;return A===-1?a.length-1:A}_getRuler(){const t=this.options,n=this._cachedMeta,r=n.iScale,a=[];let A,s;for(A=0,s=n.data.length;A<s;++A)a.push(r.getPixelForValue(this.getParsed(A)[r.axis],A));const o=t.barThickness;return{min:o||XO(n),pixels:a,start:r._startPixel,end:r._endPixel,stackCount:this._getStackCount(),scale:r,grouped:t.grouped,ratio:o?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:n,_stacked:r,index:a},options:{base:A,minBarLength:s}}=this,o=A||0,l=this.getParsed(t),c=l._custom,u=mf(c);let d=l[n.axis],f=0,h=r?this.applyStack(n,l,r):d,p,m;h!==d&&(f=h-d,h=d),u&&(d=c.barStart,h=c.barEnd-c.barStart,d!==0&&vr(d)!==vr(c.barEnd)&&(f=0),f+=d);const y=!_e(A)&&!u?A:f;let g=n.getPixelForValue(y);if(this.chart.getDataVisibility(t)?p=n.getPixelForValue(f+h):p=g,m=p-g,Math.abs(m)<s){m=t7(m,n,o)*s,d===o&&(g-=m/2);const v=n.getPixelForDecimal(0),_=n.getPixelForDecimal(1),B=Math.min(v,_),b=Math.max(v,_);g=Math.max(Math.min(g,b),B),p=g+m,r&&!u&&(l._stacks[n.axis]._visualValues[a]=n.getValueForPixel(p)-n.getValueForPixel(g))}if(g===n.getPixelForValue(o)){const v=vr(m)*n.getLineWidthForValue(o)/2;g+=v,m-=v}return{size:m,base:g,head:p,center:p+m/2}}_calculateBarIndexPixels(t,n){const r=n.scale,a=this.options,A=a.skipNull,s=de(a.maxBarThickness,1/0);let o,l;if(n.grouped){const c=A?this._getStackCount(t):n.stackCount,u=a.barThickness==="flex"?ZO(t,n,a,c):JO(t,n,a,c),d=this._getStackIndex(this.index,this._cachedMeta.stack,A?t:void 0);o=u.start+u.chunk*d+u.chunk/2,l=Math.min(s,u.chunk*u.ratio)}else o=r.getPixelForValue(this.getParsed(t)[r.axis],t),l=Math.min(s,n.min*n.ratio);return{base:o-l/2,head:o+l/2,center:o,size:l}}draw(){const t=this._cachedMeta,n=t.vScale,r=t.data,a=r.length;let A=0;for(;A<a;++A)this.getParsed(A)[n.axis]!==null&&r[A].draw(this._ctx)}}R(Tc,"id","bar"),R(Tc,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),R(Tc,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class Dc extends er{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,n,r,a){const A=super.parsePrimitiveData(t,n,r,a);for(let s=0;s<A.length;s++)A[s]._custom=this.resolveDataElementOptions(s+r).radius;return A}parseArrayData(t,n,r,a){const A=super.parseArrayData(t,n,r,a);for(let s=0;s<A.length;s++){const o=n[r+s];A[s]._custom=de(o[2],this.resolveDataElementOptions(s+r).radius)}return A}parseObjectData(t,n,r,a){const A=super.parseObjectData(t,n,r,a);for(let s=0;s<A.length;s++){const o=n[r+s];A[s]._custom=de(o&&o.r&&+o.r,this.resolveDataElementOptions(s+r).radius)}return A}getMaxOverflow(){const t=this._cachedMeta.data;let n=0;for(let r=t.length-1;r>=0;--r)n=Math.max(n,t[r].size(this.resolveDataElementOptions(r))/2);return n>0&&n}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart.data.labels||[],{xScale:a,yScale:A}=n,s=this.getParsed(t),o=a.getLabelForValue(s.x),l=A.getLabelForValue(s.y),c=s._custom;return{label:r[t]||"",value:"("+o+", "+l+(c?", "+c:"")+")"}}update(t){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,t)}updateElements(t,n,r,a){const A=a==="reset",{iScale:s,vScale:o}=this._cachedMeta,{sharedOptions:l,includeOptions:c}=this._getSharedOptions(n,a),u=s.axis,d=o.axis;for(let f=n;f<n+r;f++){const h=t[f],p=!A&&this.getParsed(f),m={},y=m[u]=A?s.getPixelForDecimal(.5):s.getPixelForValue(p[u]),g=m[d]=A?o.getBasePixel():o.getPixelForValue(p[d]);m.skip=isNaN(y)||isNaN(g),c&&(m.options=l||this.resolveDataElementOptions(f,h.active?"active":a),A&&(m.options.radius=0)),this.updateElement(h,f,m,a)}}resolveDataElementOptions(t,n){const r=this.getParsed(t);let a=super.resolveDataElementOptions(t,n);a.$shared&&(a=Object.assign({},a,{$shared:!1}));const A=a.radius;return n!=="active"&&(a.radius=0),a.radius+=de(r&&r._custom,A),a}}R(Dc,"id","bubble"),R(Dc,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),R(Dc,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function s7(e,t,n){let r=1,a=1,A=0,s=0;if(t<Xe){const o=e,l=o+t,c=Math.cos(o),u=Math.sin(o),d=Math.cos(l),f=Math.sin(l),h=(_,B,b)=>So(_,o,l,!0)?1:Math.max(B,B*n,b,b*n),p=(_,B,b)=>So(_,o,l,!0)?-1:Math.min(B,B*n,b,b*n),m=h(0,c,d),y=h(Je,u,f),g=p(Qe,c,d),v=p(Qe+Je,u,f);r=(m-g)/2,a=(y-v)/2,A=-(m+g)/2,s=-(y+v)/2}return{ratioX:r,ratioY:a,offsetX:A,offsetY:s}}class BA extends er{constructor(t,n){super(t,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,n){const r=this.getDataset().data,a=this._cachedMeta;if(this._parsing===!1)a._parsed=r;else{let A=l=>+r[l];if(ve(r[t])){const{key:l="value"}=this._parsing;A=c=>+Ga(r[c],l)}let s,o;for(s=t,o=t+n;s<o;++s)a._parsed[s]=A(s)}}_getRotation(){return Et(this.options.rotation-90)}_getCircumference(){return Et(this.options.circumference)}_getRotationExtents(){let t=Xe,n=-Xe;for(let r=0;r<this.chart.data.datasets.length;++r)if(this.chart.isDatasetVisible(r)&&this.chart.getDatasetMeta(r).type===this._type){const a=this.chart.getDatasetMeta(r).controller,A=a._getRotation(),s=a._getCircumference();t=Math.min(t,A),n=Math.max(n,A+s)}return{rotation:t,circumference:n-t}}update(t){const n=this.chart,{chartArea:r}=n,a=this._cachedMeta,A=a.data,s=this.getMaxBorderWidth()+this.getMaxOffset(A)+this.options.spacing,o=Math.max((Math.min(r.width,r.height)-s)/2,0),l=Math.min(wL(this.options.cutout,o),1),c=this._getRingWeight(this.index),{circumference:u,rotation:d}=this._getRotationExtents(),{ratioX:f,ratioY:h,offsetX:p,offsetY:m}=s7(d,u,l),y=(r.width-s)/f,g=(r.height-s)/h,v=Math.max(Math.min(y,g)/2,0),_=kb(this.options.radius,v),B=Math.max(_*l,0),b=(_-B)/this._getVisibleDatasetWeightTotal();this.offsetX=p*_,this.offsetY=m*_,a.total=this.calculateTotal(),this.outerRadius=_-b*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-b*c,0),this.updateElements(A,0,A.length,t)}_circumference(t,n){const r=this.options,a=this._cachedMeta,A=this._getCircumference();return n&&r.animation.animateRotate||!this.chart.getDataVisibility(t)||a._parsed[t]===null||a.data[t].hidden?0:this.calculateCircumference(a._parsed[t]*A/Xe)}updateElements(t,n,r,a){const A=a==="reset",s=this.chart,o=s.chartArea,c=s.options.animation,u=(o.left+o.right)/2,d=(o.top+o.bottom)/2,f=A&&c.animateScale,h=f?0:this.innerRadius,p=f?0:this.outerRadius,{sharedOptions:m,includeOptions:y}=this._getSharedOptions(n,a);let g=this._getRotation(),v;for(v=0;v<n;++v)g+=this._circumference(v,A);for(v=n;v<n+r;++v){const _=this._circumference(v,A),B=t[v],b={x:u+this.offsetX,y:d+this.offsetY,startAngle:g,endAngle:g+_,circumference:_,outerRadius:p,innerRadius:h};y&&(b.options=m||this.resolveDataElementOptions(v,B.active?"active":a)),g+=_,this.updateElement(B,v,b,a)}}calculateTotal(){const t=this._cachedMeta,n=t.data;let r=0,a;for(a=0;a<n.length;a++){const A=t._parsed[a];A!==null&&!isNaN(A)&&this.chart.getDataVisibility(a)&&!n[a].hidden&&(r+=Math.abs(A))}return r}calculateCircumference(t){const n=this._cachedMeta.total;return n>0&&!isNaN(t)?Xe*(Math.abs(t)/n):0}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart,a=r.data.labels||[],A=el(n._parsed[t],r.options.locale);return{label:a[t]||"",value:A}}getMaxBorderWidth(t){let n=0;const r=this.chart;let a,A,s,o,l;if(!t){for(a=0,A=r.data.datasets.length;a<A;++a)if(r.isDatasetVisible(a)){s=r.getDatasetMeta(a),t=s.data,o=s.controller;break}}if(!t)return 0;for(a=0,A=t.length;a<A;++a)l=o.resolveDataElementOptions(a),l.borderAlign!=="inner"&&(n=Math.max(n,l.borderWidth||0,l.hoverBorderWidth||0));return n}getMaxOffset(t){let n=0;for(let r=0,a=t.length;r<a;++r){const A=this.resolveDataElementOptions(r);n=Math.max(n,A.offset||0,A.hoverOffset||0)}return n}_getRingWeightOffset(t){let n=0;for(let r=0;r<t;++r)this.chart.isDatasetVisible(r)&&(n+=this._getRingWeight(r));return n}_getRingWeight(t){return Math.max(de(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}R(BA,"id","doughnut"),R(BA,"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"}),R(BA,"descriptors",{_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),R(BA,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:r,color:a}}=t.legend.options;return n.labels.map((A,s)=>{const l=t.getDatasetMeta(0).controller.getStyle(s);return{text:A,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:a,lineWidth:l.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(s),index:s}})}return[]}},onClick(t,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}}});class Lc extends er{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const n=this._cachedMeta,{dataset:r,data:a=[],_dataset:A}=n,s=this.chart._animationsDisabled;let{start:o,count:l}=Db(n,a,s);this._drawStart=o,this._drawCount=l,Lb(n)&&(o=0,l=a.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!A._decimated,r.points=a;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(r,void 0,{animated:!s,options:c},t),this.updateElements(a,o,l,t)}updateElements(t,n,r,a){const A=a==="reset",{iScale:s,vScale:o,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:u,includeOptions:d}=this._getSharedOptions(n,a),f=s.axis,h=o.axis,{spanGaps:p,segment:m}=this.options,y=za(p)?p:Number.POSITIVE_INFINITY,g=this.chart._animationsDisabled||A||a==="none",v=n+r,_=t.length;let B=n>0&&this.getParsed(n-1);for(let b=0;b<_;++b){const w=t[b],C=g?w:{};if(b<n||b>=v){C.skip=!0;continue}const k=this.getParsed(b),S=_e(k[h]),T=C[f]=s.getPixelForValue(k[f],b),U=C[h]=A||S?o.getBasePixel():o.getPixelForValue(l?this.applyStack(o,k,l):k[h],b);C.skip=isNaN(T)||isNaN(U)||S,C.stop=b>0&&Math.abs(k[f]-B[f])>y,m&&(C.parsed=k,C.raw=c.data[b]),d&&(C.options=u||this.resolveDataElementOptions(b,w.active?"active":a)),g||this.updateElement(w,b,C,a),B=k}}getMaxOverflow(){const t=this._cachedMeta,n=t.dataset,r=n.options&&n.options.borderWidth||0,a=t.data||[];if(!a.length)return r;const A=a[0].size(this.resolveDataElementOptions(0)),s=a[a.length-1].size(this.resolveDataElementOptions(a.length-1));return Math.max(r,A,s)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}R(Lc,"id","line"),R(Lc,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),R(Lc,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class Ji extends er{constructor(t,n){super(t,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart,a=r.data.labels||[],A=el(n._parsed[t].r,r.options.locale);return{label:a[t]||"",value:A}}parseObjectData(t,n,r,a){return Kb.bind(this)(t,n,r,a)}update(t){const n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,t)}getMinMax(){const t=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((r,a)=>{const A=this.getParsed(a).r;!isNaN(A)&&this.chart.getDataVisibility(a)&&(A<n.min&&(n.min=A),A>n.max&&(n.max=A))}),n}_updateRadius(){const t=this.chart,n=t.chartArea,r=t.options,a=Math.min(n.right-n.left,n.bottom-n.top),A=Math.max(a/2,0),s=Math.max(r.cutoutPercentage?A/100*r.cutoutPercentage:1,0),o=(A-s)/t.getVisibleDatasetCount();this.outerRadius=A-o*this.index,this.innerRadius=this.outerRadius-o}updateElements(t,n,r,a){const A=a==="reset",s=this.chart,l=s.options.animation,c=this._cachedMeta.rScale,u=c.xCenter,d=c.yCenter,f=c.getIndexAngle(0)-.5*Qe;let h=f,p;const m=360/this.countVisibleElements();for(p=0;p<n;++p)h+=this._computeAngle(p,a,m);for(p=n;p<n+r;p++){const y=t[p];let g=h,v=h+this._computeAngle(p,a,m),_=s.getDataVisibility(p)?c.getDistanceFromCenterForValue(this.getParsed(p).r):0;h=v,A&&(l.animateScale&&(_=0),l.animateRotate&&(g=v=f));const B={x:u,y:d,innerRadius:0,outerRadius:_,startAngle:g,endAngle:v,options:this.resolveDataElementOptions(p,y.active?"active":a)};this.updateElement(y,p,B,a)}}countVisibleElements(){const t=this._cachedMeta;let n=0;return t.data.forEach((r,a)=>{!isNaN(this.getParsed(a).r)&&this.chart.getDataVisibility(a)&&n++}),n}_computeAngle(t,n,r){return this.chart.getDataVisibility(t)?Et(this.resolveDataElementOptions(t,n).angle||r):0}}R(Ji,"id","polarArea"),R(Ji,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),R(Ji,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:r,color:a}}=t.legend.options;return n.labels.map((A,s)=>{const l=t.getDatasetMeta(0).controller.getStyle(s);return{text:A,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:a,lineWidth:l.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(s),index:s}})}return[]}},onClick(t,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class Oh extends BA{}R(Oh,"id","pie"),R(Oh,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class Oc extends er{getLabelAndValue(t){const n=this._cachedMeta.vScale,r=this.getParsed(t);return{label:n.getLabels()[t],value:""+n.getLabelForValue(r[n.axis])}}parseObjectData(t,n,r,a){return Kb.bind(this)(t,n,r,a)}update(t){const n=this._cachedMeta,r=n.dataset,a=n.data||[],A=n.iScale.getLabels();if(r.points=a,t!=="resize"){const s=this.resolveDatasetElementOptions(t);this.options.showLine||(s.borderWidth=0);const o={_loop:!0,_fullLoop:A.length===a.length,options:s};this.updateElement(r,void 0,o,t)}this.updateElements(a,0,a.length,t)}updateElements(t,n,r,a){const A=this._cachedMeta.rScale,s=a==="reset";for(let o=n;o<n+r;o++){const l=t[o],c=this.resolveDataElementOptions(o,l.active?"active":a),u=A.getPointPositionForValue(o,this.getParsed(o).r),d=s?A.xCenter:u.x,f=s?A.yCenter:u.y,h={x:d,y:f,angle:u.angle,skip:isNaN(d)||isNaN(f),options:c};this.updateElement(l,o,h,a)}}}R(Oc,"id","radar"),R(Oc,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),R(Oc,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class Mc extends er{getLabelAndValue(t){const n=this._cachedMeta,r=this.chart.data.labels||[],{xScale:a,yScale:A}=n,s=this.getParsed(t),o=a.getLabelForValue(s.x),l=A.getLabelForValue(s.y);return{label:r[t]||"",value:"("+o+", "+l+")"}}update(t){const n=this._cachedMeta,{data:r=[]}=n,a=this.chart._animationsDisabled;let{start:A,count:s}=Db(n,r,a);if(this._drawStart=A,this._drawCount=s,Lb(n)&&(A=0,s=r.length),this.options.showLine){const{dataset:o,_dataset:l}=n;o._chart=this.chart,o._datasetIndex=this.index,o._decimated=!!l._decimated,o.points=r;const c=this.resolveDatasetElementOptions(t);c.segment=this.options.segment,this.updateElement(o,void 0,{animated:!a,options:c},t)}this.updateElements(r,A,s,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,n,r,a){const A=a==="reset",{iScale:s,vScale:o,_stacked:l,_dataset:c}=this._cachedMeta,u=this.resolveDataElementOptions(n,a),d=this.getSharedOptions(u),f=this.includeOptions(a,d),h=s.axis,p=o.axis,{spanGaps:m,segment:y}=this.options,g=za(m)?m:Number.POSITIVE_INFINITY,v=this.chart._animationsDisabled||A||a==="none";let _=n>0&&this.getParsed(n-1);for(let B=n;B<n+r;++B){const b=t[B],w=this.getParsed(B),C=v?b:{},k=_e(w[p]),S=C[h]=s.getPixelForValue(w[h],B),T=C[p]=A||k?o.getBasePixel():o.getPixelForValue(l?this.applyStack(o,w,l):w[p],B);C.skip=isNaN(S)||isNaN(T)||k,C.stop=B>0&&Math.abs(w[h]-_[h])>g,y&&(C.parsed=w,C.raw=c.data[B]),f&&(C.options=d||this.resolveDataElementOptions(B,b.active?"active":a)),v||this.updateElement(b,B,C,a),_=w}this.updateSharedOptions(d,a,u)}getMaxOverflow(){const t=this._cachedMeta,n=t.data||[];if(!this.options.showLine){let o=0;for(let l=n.length-1;l>=0;--l)o=Math.max(o,n[l].size(this.resolveDataElementOptions(l))/2);return o>0&&o}const r=t.dataset,a=r.options&&r.options.borderWidth||0;if(!n.length)return a;const A=n[0].size(this.resolveDataElementOptions(0)),s=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(a,A,s)/2}}R(Mc,"id","scatter"),R(Mc,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),R(Mc,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var i7=Object.freeze({__proto__:null,BarController:Tc,BubbleController:Dc,DoughnutController:BA,LineController:Lc,PieController:Oh,PolarAreaController:Ji,RadarController:Oc,ScatterController:Mc});function iA(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Yg{constructor(t){R(this,"options");this.options=t||{}}static override(t){Object.assign(Yg.prototype,t)}init(){}formats(){return iA()}parse(){return iA()}format(){return iA()}add(){return iA()}diff(){return iA()}startOf(){return iA()}endOf(){return iA()}}var Zb={_date:Yg};function o7(e,t,n,r){const{controller:a,data:A,_sorted:s}=e,o=a._cachedMeta.iScale;if(o&&t===o.axis&&t!=="r"&&s&&A.length){const l=o._reversePixels?QL:Wr;if(r){if(a._sharedOptions){const c=A[0],u=typeof c.getRange=="function"&&c.getRange(t);if(u){const d=l(A,t,n-u),f=l(A,t,n+u);return{lo:d.lo,hi:f.hi}}}}else return l(A,t,n)}return{lo:0,hi:A.length-1}}function rl(e,t,n,r,a){const A=e.getSortedVisibleDatasetMetas(),s=n[t];for(let o=0,l=A.length;o<l;++o){const{index:c,data:u}=A[o],{lo:d,hi:f}=o7(A[o],t,s,a);for(let h=d;h<=f;++h){const p=u[h];p.skip||r(p,c,h)}}}function l7(e){const t=e.indexOf("x")!==-1,n=e.indexOf("y")!==-1;return function(r,a){const A=t?Math.abs(r.x-a.x):0,s=n?Math.abs(r.y-a.y):0;return Math.sqrt(Math.pow(A,2)+Math.pow(s,2))}}function vf(e,t,n,r,a){const A=[];return!a&&!e.isPointInArea(t)||rl(e,n,t,function(o,l,c){!a&&!Gr(o,e.chartArea,0)||o.inRange(t.x,t.y,r)&&A.push({element:o,datasetIndex:l,index:c})},!0),A}function c7(e,t,n,r){let a=[];function A(s,o,l){const{startAngle:c,endAngle:u}=s.getProps(["startAngle","endAngle"],r),{angle:d}=Fb(s,{x:t.x,y:t.y});So(d,c,u)&&a.push({element:s,datasetIndex:o,index:l})}return rl(e,n,t,A),a}function u7(e,t,n,r,a,A){let s=[];const o=l7(n);let l=Number.POSITIVE_INFINITY;function c(u,d,f){const h=u.inRange(t.x,t.y,a);if(r&&!h)return;const p=u.getCenterPoint(a);if(!(!!A||e.isPointInArea(p))&&!h)return;const y=o(t,p);y<l?(s=[{element:u,datasetIndex:d,index:f}],l=y):y===l&&s.push({element:u,datasetIndex:d,index:f})}return rl(e,n,t,c),s}function Bf(e,t,n,r,a,A){return!A&&!e.isPointInArea(t)?[]:n==="r"&&!r?c7(e,t,n,a):u7(e,t,n,r,a,A)}function Nv(e,t,n,r,a){const A=[],s=n==="x"?"inXRange":"inYRange";let o=!1;return rl(e,n,t,(l,c,u)=>{l[s](t[n],a)&&(A.push({element:l,datasetIndex:c,index:u}),o=o||l.inRange(t.x,t.y,a))}),r&&!o?[]:A}var d7={evaluateInteractionItems:rl,modes:{index(e,t,n,r){const a=dA(t,e),A=n.axis||"x",s=n.includeInvisible||!1,o=n.intersect?vf(e,a,A,r,s):Bf(e,a,A,!1,r,s),l=[];return o.length?(e.getSortedVisibleDatasetMetas().forEach(c=>{const u=o[0].index,d=c.data[u];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:u})}),l):[]},dataset(e,t,n,r){const a=dA(t,e),A=n.axis||"xy",s=n.includeInvisible||!1;let o=n.intersect?vf(e,a,A,r,s):Bf(e,a,A,!1,r,s);if(o.length>0){const l=o[0].datasetIndex,c=e.getDatasetMeta(l).data;o=[];for(let u=0;u<c.length;++u)o.push({element:c[u],datasetIndex:l,index:u})}return o},point(e,t,n,r){const a=dA(t,e),A=n.axis||"xy",s=n.includeInvisible||!1;return vf(e,a,A,r,s)},nearest(e,t,n,r){const a=dA(t,e),A=n.axis||"xy",s=n.includeInvisible||!1;return Bf(e,a,A,n.intersect,r,s)},x(e,t,n,r){const a=dA(t,e);return Nv(e,a,"x",n.intersect,r)},y(e,t,n,r){const a=dA(t,e);return Nv(e,a,"y",n.intersect,r)}}};const e_=["left","top","right","bottom"];function hi(e,t){return e.filter(n=>n.pos===t)}function Pv(e,t){return e.filter(n=>e_.indexOf(n.pos)===-1&&n.box.axis===t)}function pi(e,t){return e.sort((n,r)=>{const a=t?r:n,A=t?n:r;return a.weight===A.weight?a.index-A.index:a.weight-A.weight})}function f7(e){const t=[];let n,r,a,A,s,o;for(n=0,r=(e||[]).length;n<r;++n)a=e[n],{position:A,options:{stack:s,stackWeight:o=1}}=a,t.push({index:n,box:a,pos:A,horizontal:a.isHorizontal(),weight:a.weight,stack:s&&A+s,stackWeight:o});return t}function h7(e){const t={};for(const n of e){const{stack:r,pos:a,stackWeight:A}=n;if(!r||!e_.includes(a))continue;const s=t[r]||(t[r]={count:0,placed:0,weight:0,size:0});s.count++,s.weight+=A}return t}function p7(e,t){const n=h7(e),{vBoxMaxWidth:r,hBoxMaxHeight:a}=t;let A,s,o;for(A=0,s=e.length;A<s;++A){o=e[A];const{fullSize:l}=o.box,c=n[o.stack],u=c&&o.stackWeight/c.weight;o.horizontal?(o.width=u?u*r:l&&t.availableWidth,o.height=a):(o.width=r,o.height=u?u*a:l&&t.availableHeight)}return n}function g7(e){const t=f7(e),n=pi(t.filter(c=>c.box.fullSize),!0),r=pi(hi(t,"left"),!0),a=pi(hi(t,"right")),A=pi(hi(t,"top"),!0),s=pi(hi(t,"bottom")),o=Pv(t,"x"),l=Pv(t,"y");return{fullSize:n,leftAndTop:r.concat(A),rightAndBottom:a.concat(l).concat(s).concat(o),chartArea:hi(t,"chartArea"),vertical:r.concat(a).concat(l),horizontal:A.concat(s).concat(o)}}function Hv(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function t_(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function m7(e,t,n,r){const{pos:a,box:A}=n,s=e.maxPadding;if(!ve(a)){n.size&&(e[a]-=n.size);const d=r[n.stack]||{size:0,count:1};d.size=Math.max(d.size,n.horizontal?A.height:A.width),n.size=d.size/d.count,e[a]+=n.size}A.getPadding&&t_(s,A.getPadding());const o=Math.max(0,t.outerWidth-Hv(s,e,"left","right")),l=Math.max(0,t.outerHeight-Hv(s,e,"top","bottom")),c=o!==e.w,u=l!==e.h;return e.w=o,e.h=l,n.horizontal?{same:c,other:u}:{same:u,other:c}}function v7(e){const t=e.maxPadding;function n(r){const a=Math.max(t[r]-e[r],0);return e[r]+=a,a}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function B7(e,t){const n=t.maxPadding;function r(a){const A={left:0,top:0,right:0,bottom:0};return a.forEach(s=>{A[s]=Math.max(t[s],n[s])}),A}return r(e?["left","right"]:["top","bottom"])}function Fi(e,t,n,r){const a=[];let A,s,o,l,c,u;for(A=0,s=e.length,c=0;A<s;++A){o=e[A],l=o.box,l.update(o.width||t.w,o.height||t.h,B7(o.horizontal,t));const{same:d,other:f}=m7(t,n,o,r);c|=d&&a.length,u=u||f,l.fullSize||a.push(o)}return c&&Fi(a,t,n,r)||u}function $l(e,t,n,r,a){e.top=n,e.left=t,e.right=t+r,e.bottom=n+a,e.width=r,e.height=a}function Rv(e,t,n,r){const a=n.padding;let{x:A,y:s}=t;for(const o of e){const l=o.box,c=r[o.stack]||{count:1,placed:0,weight:1},u=o.stackWeight/c.weight||1;if(o.horizontal){const d=t.w*u,f=c.size||l.height;vn(c.start)&&(s=c.start),l.fullSize?$l(l,a.left,s,n.outerWidth-a.right-a.left,f):$l(l,t.left+c.placed,s,d,f),c.start=s,c.placed+=d,s=l.bottom}else{const d=t.h*u,f=c.size||l.width;vn(c.start)&&(A=c.start),l.fullSize?$l(l,A,a.top,f,n.outerHeight-a.bottom-a.top):$l(l,A,t.top+c.placed,f,d),c.start=A,c.placed+=d,A=l.right}}t.x=A,t.y=s}var Gt={addBox(e,t){e.boxes||(e.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(n){t.draw(n)}}]},e.boxes.push(t)},removeBox(e,t){const n=e.boxes?e.boxes.indexOf(t):-1;n!==-1&&e.boxes.splice(n,1)},configure(e,t,n){t.fullSize=n.fullSize,t.position=n.position,t.weight=n.weight},update(e,t,n,r){if(!e)return;const a=_t(e.options.layout.padding),A=Math.max(t-a.width,0),s=Math.max(n-a.height,0),o=g7(e.boxes),l=o.vertical,c=o.horizontal;Ve(e.boxes,m=>{typeof m.beforeLayout=="function"&&m.beforeLayout()});const u=l.reduce((m,y)=>y.box.options&&y.box.options.display===!1?m:m+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:n,padding:a,availableWidth:A,availableHeight:s,vBoxMaxWidth:A/2/u,hBoxMaxHeight:s/2}),f=Object.assign({},a);t_(f,_t(r));const h=Object.assign({maxPadding:f,w:A,h:s,x:a.left,y:a.top},a),p=p7(l.concat(c),d);Fi(o.fullSize,h,d,p),Fi(l,h,d,p),Fi(c,h,d,p)&&Fi(l,h,d,p),v7(h),Rv(o.leftAndTop,h,d,p),h.x+=h.w,h.y+=h.h,Rv(o.rightAndBottom,h,d,p),e.chartArea={left:h.left,top:h.top,right:h.left+h.w,bottom:h.top+h.h,height:h.h,width:h.w},Ve(o.chartArea,m=>{const y=m.box;Object.assign(y,e.chartArea),y.update(h.w,h.h,{left:0,top:0,right:0,bottom:0})})}};class n_{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,r){}removeEventListener(t,n,r){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,r,a){return n=Math.max(0,n||t.width),r=r||t.height,{width:n,height:Math.max(0,a?Math.floor(n/a):r)}}isAttached(t){return!0}updateConfig(t){}}class y7 extends n_{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Nc="$chartjs",w7={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Vv=e=>e===null||e==="";function b7(e,t){const n=e.style,r=e.getAttribute("height"),a=e.getAttribute("width");if(e[Nc]={initial:{height:r,width:a,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",Vv(a)){const A=Cv(e,"width");A!==void 0&&(e.width=A)}if(Vv(r))if(e.style.height==="")e.height=e.width/(t||2);else{const A=Cv(e,"height");A!==void 0&&(e.height=A)}return e}const r_=EO?{passive:!0}:!1;function _7(e,t,n){e.addEventListener(t,n,r_)}function C7(e,t,n){e.canvas.removeEventListener(t,n,r_)}function E7(e,t){const n=w7[e.type]||e.type,{x:r,y:a}=dA(e,t);return{type:n,chart:t,native:e,x:r!==void 0?r:null,y:a!==void 0?a:null}}function fu(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function k7(e,t,n){const r=e.canvas,a=new MutationObserver(A=>{let s=!1;for(const o of A)s=s||fu(o.addedNodes,r),s=s&&!fu(o.removedNodes,r);s&&n()});return a.observe(document,{childList:!0,subtree:!0}),a}function S7(e,t,n){const r=e.canvas,a=new MutationObserver(A=>{let s=!1;for(const o of A)s=s||fu(o.removedNodes,r),s=s&&!fu(o.addedNodes,r);s&&n()});return a.observe(document,{childList:!0,subtree:!0}),a}const xo=new Map;let Kv=0;function a_(){const e=window.devicePixelRatio;e!==Kv&&(Kv=e,xo.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function x7(e,t){xo.size||window.addEventListener("resize",a_),xo.set(e,t)}function F7(e){xo.delete(e),xo.size||window.removeEventListener("resize",a_)}function I7(e,t,n){const r=e.canvas,a=r&&zg(r);if(!a)return;const A=Tb((o,l)=>{const c=a.clientWidth;n(o,l),c<a.clientWidth&&n()},window),s=new ResizeObserver(o=>{const l=o[0],c=l.contentRect.width,u=l.contentRect.height;c===0&&u===0||A(c,u)});return s.observe(a),x7(e,A),s}function yf(e,t,n){n&&n.disconnect(),t==="resize"&&F7(e)}function U7(e,t,n){const r=e.canvas,a=Tb(A=>{e.ctx!==null&&n(E7(A,e))},e);return _7(r,t,a),a}class Q7 extends n_{acquireContext(t,n){const r=t&&t.getContext&&t.getContext("2d");return r&&r.canvas===t?(b7(t,n),r):null}releaseContext(t){const n=t.canvas;if(!n[Nc])return!1;const r=n[Nc].initial;["height","width"].forEach(A=>{const s=r[A];_e(s)?n.removeAttribute(A):n.setAttribute(A,s)});const a=r.style||{};return Object.keys(a).forEach(A=>{n.style[A]=a[A]}),n.width=n.width,delete n[Nc],!0}addEventListener(t,n,r){this.removeEventListener(t,n);const a=t.$proxies||(t.$proxies={}),s={attach:k7,detach:S7,resize:I7}[n]||U7;a[n]=s(t,n,r)}removeEventListener(t,n){const r=t.$proxies||(t.$proxies={}),a=r[n];if(!a)return;({attach:yf,detach:yf,resize:yf}[n]||C7)(t,n,a),r[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,r,a){return CO(t,n,r,a)}isAttached(t){const n=zg(t);return!!(n&&n.isConnected)}}function T7(e){return!Wb()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?y7:Q7}var xc;let an=(xc=class{constructor(){R(this,"x");R(this,"y");R(this,"active",!1);R(this,"options");R(this,"$animations")}tooltipPosition(t){const{x:n,y:r}=this.getProps(["x","y"],t);return{x:n,y:r}}hasValue(){return za(this.x)&&za(this.y)}getProps(t,n){const r=this.$animations;if(!n||!r)return this;const a={};return t.forEach(A=>{a[A]=r[A]&&r[A].active()?r[A]._to:this[A]}),a}},R(xc,"defaults",{}),R(xc,"defaultRoutes"),xc);function D7(e,t){const n=e.options.ticks,r=L7(e),a=Math.min(n.maxTicksLimit||r,r),A=n.major.enabled?M7(t):[],s=A.length,o=A[0],l=A[s-1],c=[];if(s>a)return N7(t,c,A,s/a),c;const u=O7(A,t,a);if(s>0){let d,f;const h=s>1?Math.round((l-o)/(s-1)):null;for(Wl(t,c,u,_e(h)?0:o-h,o),d=0,f=s-1;d<f;d++)Wl(t,c,u,A[d],A[d+1]);return Wl(t,c,u,l,_e(h)?t.length:l+h),c}return Wl(t,c,u),c}function L7(e){const t=e.options.offset,n=e._tickSize(),r=e._length/n+(t?0:1),a=e._maxLength/n;return Math.floor(Math.min(r,a))}function O7(e,t,n){const r=P7(e),a=t.length/n;if(!r)return Math.max(a,1);const A=xL(r);for(let s=0,o=A.length-1;s<o;s++){const l=A[s];if(l>a)return l}return Math.max(a,1)}function M7(e){const t=[];let n,r;for(n=0,r=e.length;n<r;n++)e[n].major&&t.push(n);return t}function N7(e,t,n,r){let a=0,A=n[0],s;for(r=Math.ceil(r),s=0;s<e.length;s++)s===A&&(t.push(e[s]),a++,A=n[a*r])}function Wl(e,t,n,r,a){const A=de(r,0),s=Math.min(de(a,e.length),e.length);let o=0,l,c,u;for(n=Math.ceil(n),a&&(l=a-r,n=l/Math.floor(l/n)),u=A;u<0;)o++,u=Math.round(A+o*n);for(c=Math.max(A,0);c<s;c++)c===u&&(t.push(e[c]),o++,u=Math.round(A+o*n))}function P7(e){const t=e.length;let n,r;if(t<2)return!1;for(r=e[0],n=1;n<t;++n)if(e[n]-e[n-1]!==r)return!1;return r}const H7=e=>e==="left"?"right":e==="right"?"left":e,$v=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,Wv=(e,t)=>Math.min(t||e,e);function Gv(e,t){const n=[],r=e.length/t,a=e.length;let A=0;for(;A<a;A+=r)n.push(e[Math.floor(A)]);return n}function R7(e,t,n){const r=e.ticks.length,a=Math.min(t,r-1),A=e._startPixel,s=e._endPixel,o=1e-6;let l=e.getPixelForTick(a),c;if(!(n&&(r===1?c=Math.max(l-A,s-l):t===0?c=(e.getPixelForTick(1)-l)/2:c=(l-e.getPixelForTick(a-1))/2,l+=a<t?c:-c,l<A-o||l>s+o)))return l}function V7(e,t){Ve(e,n=>{const r=n.gc,a=r.length/2;let A;if(a>t){for(A=0;A<a;++A)delete n.data[r[A]];r.splice(0,a)}})}function gi(e){return e.drawTicks?e.tickLength:0}function zv(e,t){if(!e.display)return 0;const n=ft(e.font,t),r=_t(e.padding);return(Oe(e.text)?e.text.length:1)*n.lineHeight+r.height}function K7(e,t){return rA(e,{scale:t,type:"scale"})}function $7(e,t,n){return rA(e,{tick:n,index:t,type:"tick"})}function W7(e,t,n){let r=Rg(e);return(n&&t!=="right"||!n&&t==="right")&&(r=H7(r)),r}function G7(e,t,n,r){const{top:a,left:A,bottom:s,right:o,chart:l}=e,{chartArea:c,scales:u}=l;let d=0,f,h,p;const m=s-a,y=o-A;if(e.isHorizontal()){if(h=$t(r,A,o),ve(n)){const g=Object.keys(n)[0],v=n[g];p=u[g].getPixelForValue(v)+m-t}else n==="center"?p=(c.bottom+c.top)/2+m-t:p=$v(e,n,t);f=o-A}else{if(ve(n)){const g=Object.keys(n)[0],v=n[g];h=u[g].getPixelForValue(v)-y+t}else n==="center"?h=(c.left+c.right)/2-y+t:h=$v(e,n,t);p=$t(r,s,a),d=n==="left"?-Je:Je}return{titleX:h,titleY:p,maxWidth:f,rotation:d}}class $A extends an{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,n){return t}getUserBounds(){let{_userMin:t,_userMax:n,_suggestedMin:r,_suggestedMax:a}=this;return t=wn(t,Number.POSITIVE_INFINITY),n=wn(n,Number.NEGATIVE_INFINITY),r=wn(r,Number.POSITIVE_INFINITY),a=wn(a,Number.NEGATIVE_INFINITY),{min:wn(t,r),max:wn(n,a),minDefined:ut(t),maxDefined:ut(n)}}getMinMax(t){let{min:n,max:r,minDefined:a,maxDefined:A}=this.getUserBounds(),s;if(a&&A)return{min:n,max:r};const o=this.getMatchingVisibleMetas();for(let l=0,c=o.length;l<c;++l)s=o[l].controller.getMinMax(this,t),a||(n=Math.min(n,s.min)),A||(r=Math.max(r,s.max));return n=A&&n>r?r:n,r=a&&n>r?n:r,{min:wn(n,wn(r,n)),max:wn(r,wn(n,r))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){He(this.options.beforeUpdate,[this])}update(t,n,r){const{beginAtZero:a,grace:A,ticks:s}=this.options,o=s.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=nO(this,A,a),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=o<this.ticks.length;this._convertTicksToLabels(l?Gv(this.ticks,o):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),s.display&&(s.autoSkip||s.source==="auto")&&(this.ticks=D7(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,n,r;this.isHorizontal()?(n=this.left,r=this.right):(n=this.top,r=this.bottom,t=!t),this._startPixel=n,this._endPixel=r,this._reversePixels=t,this._length=r-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){He(this.options.afterUpdate,[this])}beforeSetDimensions(){He(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(){He(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),He(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){He(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const n=this.options.ticks;let r,a,A;for(r=0,a=t.length;r<a;r++)A=t[r],A.label=He(n.callback,[A.value,r,t],this)}afterTickToLabelConversion(){He(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){He(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,n=t.ticks,r=Wv(this.ticks.length,t.ticks.maxTicksLimit),a=n.minRotation||0,A=n.maxRotation;let s=a,o,l,c;if(!this._isVisible()||!n.display||a>=A||r<=1||!this.isHorizontal()){this.labelRotation=a;return}const u=this._getLabelSizes(),d=u.widest.width,f=u.highest.height,h=Mt(this.chart.width-d,0,this.maxWidth);o=t.offset?this.maxWidth/r:h/(r-1),d+6>o&&(o=h/(r-(t.offset?.5:1)),l=this.maxHeight-gi(t.grid)-n.padding-zv(t.title,this.chart.options.font),c=Math.sqrt(d*d+f*f),s=ed(Math.min(Math.asin(Mt((u.highest.height+6)/o,-1,1)),Math.asin(Mt(l/c,-1,1))-Math.asin(Mt(f/c,-1,1)))),s=Math.max(a,Math.min(A,s))),this.labelRotation=s}afterCalculateLabelRotation(){He(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){He(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:r,title:a,grid:A}}=this,s=this._isVisible(),o=this.isHorizontal();if(s){const l=zv(a,n.options.font);if(o?(t.width=this.maxWidth,t.height=gi(A)+l):(t.height=this.maxHeight,t.width=gi(A)+l),r.display&&this.ticks.length){const{first:c,last:u,widest:d,highest:f}=this._getLabelSizes(),h=r.padding*2,p=Et(this.labelRotation),m=Math.cos(p),y=Math.sin(p);if(o){const g=r.mirror?0:y*d.width+m*f.height;t.height=Math.min(this.maxHeight,t.height+g+h)}else{const g=r.mirror?0:m*d.width+y*f.height;t.width=Math.min(this.maxWidth,t.width+g+h)}this._calculatePadding(c,u,y,m)}}this._handleMargins(),o?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,r,a){const{ticks:{align:A,padding:s},position:o}=this.options,l=this.labelRotation!==0,c=o!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let f=0,h=0;l?c?(f=a*t.width,h=r*n.height):(f=r*t.height,h=a*n.width):A==="start"?h=n.width:A==="end"?f=t.width:A!=="inner"&&(f=t.width/2,h=n.width/2),this.paddingLeft=Math.max((f-u+s)*this.width/(this.width-u),0),this.paddingRight=Math.max((h-d+s)*this.width/(this.width-d),0)}else{let u=n.height/2,d=t.height/2;A==="start"?(u=0,d=t.height):A==="end"&&(u=n.height,d=0),this.paddingTop=u+s,this.paddingBottom=d+s}}_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(){He(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,r;for(n=0,r=t.length;n<r;n++)_e(t[n].label)&&(t.splice(n,1),r--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const n=this.options.ticks.sampleSize;let r=this.ticks;n<r.length&&(r=Gv(r,n)),this._labelSizes=t=this._computeLabelSizes(r,r.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,n,r){const{ctx:a,_longestTextCache:A}=this,s=[],o=[],l=Math.floor(n/Wv(n,r));let c=0,u=0,d,f,h,p,m,y,g,v,_,B,b;for(d=0;d<n;d+=l){if(p=t[d].label,m=this._resolveTickFontOptions(d),a.font=y=m.string,g=A[y]=A[y]||{data:{},gc:[]},v=m.lineHeight,_=B=0,!_e(p)&&!Oe(p))_=uu(a,g.data,g.gc,_,p),B=v;else if(Oe(p))for(f=0,h=p.length;f<h;++f)b=p[f],!_e(b)&&!Oe(b)&&(_=uu(a,g.data,g.gc,_,b),B+=v);s.push(_),o.push(B),c=Math.max(_,c),u=Math.max(B,u)}V7(A,n);const w=s.indexOf(c),C=o.indexOf(u),k=S=>({width:s[S]||0,height:o[S]||0});return{first:k(0),last:k(n-1),widest:k(w),highest:k(C),widths:s,heights:o}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const n=this._startPixel+t*this._length;return UL(this._alignToPixels?sA(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&t<n.length){const r=n[t];return r.$context||(r.$context=$7(this.getContext(),t,r))}return this.$context||(this.$context=K7(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,n=Et(this.labelRotation),r=Math.abs(Math.cos(n)),a=Math.abs(Math.sin(n)),A=this._getLabelSizes(),s=t.autoSkipPadding||0,o=A?A.widest.width+s:0,l=A?A.highest.height+s:0;return this.isHorizontal()?l*r>o*a?o/r:l/a:l*a<o*r?l/r:o/a}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const n=this.axis,r=this.chart,a=this.options,{grid:A,position:s,border:o}=a,l=A.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),f=gi(A),h=[],p=o.setContext(this.getContext()),m=p.display?p.width:0,y=m/2,g=function(j){return sA(r,j,m)};let v,_,B,b,w,C,k,S,T,U,F,Q;if(s==="top")v=g(this.bottom),C=this.bottom-f,S=v-y,U=g(t.top)+y,Q=t.bottom;else if(s==="bottom")v=g(this.top),U=t.top,Q=g(t.bottom)-y,C=v+y,S=this.top+f;else if(s==="left")v=g(this.right),w=this.right-f,k=v-y,T=g(t.left)+y,F=t.right;else if(s==="right")v=g(this.left),T=t.left,F=g(t.right)-y,w=v+y,k=this.left+f;else if(n==="x"){if(s==="center")v=g((t.top+t.bottom)/2+.5);else if(ve(s)){const j=Object.keys(s)[0],K=s[j];v=g(this.chart.scales[j].getPixelForValue(K))}U=t.top,Q=t.bottom,C=v+y,S=C+f}else if(n==="y"){if(s==="center")v=g((t.left+t.right)/2);else if(ve(s)){const j=Object.keys(s)[0],K=s[j];v=g(this.chart.scales[j].getPixelForValue(K))}w=v-y,k=w-f,T=t.left,F=t.right}const Y=de(a.ticks.maxTicksLimit,d),X=Math.max(1,Math.ceil(d/Y));for(_=0;_<d;_+=X){const j=this.getContext(_),K=A.setContext(j),oe=o.setContext(j),$=K.lineWidth,ae=K.color,ce=oe.dash||[],me=oe.dashOffset,Ee=K.tickWidth,fe=K.tickColor,ne=K.tickBorderDash||[],N=K.tickBorderDashOffset;B=R7(this,_,l),B!==void 0&&(b=sA(r,B,$),c?w=k=T=F=b:C=S=U=Q=b,h.push({tx1:w,ty1:C,tx2:k,ty2:S,x1:T,y1:U,x2:F,y2:Q,width:$,color:ae,borderDash:ce,borderDashOffset:me,tickWidth:Ee,tickColor:fe,tickBorderDash:ne,tickBorderDashOffset:N}))}return this._ticksLength=d,this._borderValue=v,h}_computeLabelItems(t){const n=this.axis,r=this.options,{position:a,ticks:A}=r,s=this.isHorizontal(),o=this.ticks,{align:l,crossAlign:c,padding:u,mirror:d}=A,f=gi(r.grid),h=f+u,p=d?-u:h,m=-Et(this.labelRotation),y=[];let g,v,_,B,b,w,C,k,S,T,U,F,Q="middle";if(a==="top")w=this.bottom-p,C=this._getXAxisLabelAlignment();else if(a==="bottom")w=this.top+p,C=this._getXAxisLabelAlignment();else if(a==="left"){const X=this._getYAxisLabelAlignment(f);C=X.textAlign,b=X.x}else if(a==="right"){const X=this._getYAxisLabelAlignment(f);C=X.textAlign,b=X.x}else if(n==="x"){if(a==="center")w=(t.top+t.bottom)/2+h;else if(ve(a)){const X=Object.keys(a)[0],j=a[X];w=this.chart.scales[X].getPixelForValue(j)+h}C=this._getXAxisLabelAlignment()}else if(n==="y"){if(a==="center")b=(t.left+t.right)/2-h;else if(ve(a)){const X=Object.keys(a)[0],j=a[X];b=this.chart.scales[X].getPixelForValue(j)}C=this._getYAxisLabelAlignment(f).textAlign}n==="y"&&(l==="start"?Q="top":l==="end"&&(Q="bottom"));const Y=this._getLabelSizes();for(g=0,v=o.length;g<v;++g){_=o[g],B=_.label;const X=A.setContext(this.getContext(g));k=this.getPixelForTick(g)+A.labelOffset,S=this._resolveTickFontOptions(g),T=S.lineHeight,U=Oe(B)?B.length:1;const j=U/2,K=X.color,oe=X.textStrokeColor,$=X.textStrokeWidth;let ae=C;s?(b=k,C==="inner"&&(g===v-1?ae=this.options.reverse?"left":"right":g===0?ae=this.options.reverse?"right":"left":ae="center"),a==="top"?c==="near"||m!==0?F=-U*T+T/2:c==="center"?F=-Y.highest.height/2-j*T+T:F=-Y.highest.height+T/2:c==="near"||m!==0?F=T/2:c==="center"?F=Y.highest.height/2-j*T:F=Y.highest.height-U*T,d&&(F*=-1),m!==0&&!X.showLabelBackdrop&&(b+=T/2*Math.sin(m))):(w=k,F=(1-U)*T/2);let ce;if(X.showLabelBackdrop){const me=_t(X.backdropPadding),Ee=Y.heights[g],fe=Y.widths[g];let ne=F-me.top,N=0-me.left;switch(Q){case"middle":ne-=Ee/2;break;case"bottom":ne-=Ee;break}switch(C){case"center":N-=fe/2;break;case"right":N-=fe;break}ce={left:N,top:ne,width:fe+me.width,height:Ee+me.height,color:X.backdropColor}}y.push({label:B,font:S,textOffset:F,options:{rotation:m,color:K,strokeColor:oe,strokeWidth:$,textAlign:ae,textBaseline:Q,translation:[b,w],backdrop:ce}})}return y}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;if(-Et(this.labelRotation))return t==="top"?"left":"right";let a="center";return n.align==="start"?a="left":n.align==="end"?a="right":n.align==="inner"&&(a="inner"),a}_getYAxisLabelAlignment(t){const{position:n,ticks:{crossAlign:r,mirror:a,padding:A}}=this.options,s=this._getLabelSizes(),o=t+A,l=s.widest.width;let c,u;return n==="left"?a?(u=this.right+A,r==="near"?c="left":r==="center"?(c="center",u+=l/2):(c="right",u+=l)):(u=this.right-o,r==="near"?c="right":r==="center"?(c="center",u-=l/2):(c="left",u=this.left)):n==="right"?a?(u=this.left+A,r==="near"?c="right":r==="center"?(c="center",u-=l/2):(c="left",u-=l)):(u=this.left+o,r==="near"?c="left":r==="center"?(c="center",u+=l/2):(c="right",u=this.right)):c="right",{textAlign:c,x:u}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:n},left:r,top:a,width:A,height:s}=this;n&&(t.save(),t.fillStyle=n,t.fillRect(r,a,A,s),t.restore())}getLineWidthForValue(t){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const a=this.ticks.findIndex(A=>A.value===t);return a>=0?n.setContext(this.getContext(a)).lineWidth:0}drawGrid(t){const n=this.options.grid,r=this.ctx,a=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let A,s;const o=(l,c,u)=>{!u.width||!u.color||(r.save(),r.lineWidth=u.width,r.strokeStyle=u.color,r.setLineDash(u.borderDash||[]),r.lineDashOffset=u.borderDashOffset,r.beginPath(),r.moveTo(l.x,l.y),r.lineTo(c.x,c.y),r.stroke(),r.restore())};if(n.display)for(A=0,s=a.length;A<s;++A){const l=a[A];n.drawOnChartArea&&o({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),n.drawTicks&&o({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:n,options:{border:r,grid:a}}=this,A=r.setContext(this.getContext()),s=r.display?A.width:0;if(!s)return;const o=a.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let c,u,d,f;this.isHorizontal()?(c=sA(t,this.left,s)-s/2,u=sA(t,this.right,o)+o/2,d=f=l):(d=sA(t,this.top,s)-s/2,f=sA(t,this.bottom,o)+o/2,c=u=l),n.save(),n.lineWidth=A.width,n.strokeStyle=A.color,n.beginPath(),n.moveTo(c,d),n.lineTo(u,f),n.stroke(),n.restore()}drawLabels(t){if(!this.options.ticks.display)return;const r=this.ctx,a=this._computeLabelArea();a&&tl(r,a);const A=this.getLabelItems(t);for(const s of A){const o=s.options,l=s.font,c=s.label,u=s.textOffset;OA(r,c,0,u,l,o)}a&&nl(r)}drawTitle(){const{ctx:t,options:{position:n,title:r,reverse:a}}=this;if(!r.display)return;const A=ft(r.font),s=_t(r.padding),o=r.align;let l=A.lineHeight/2;n==="bottom"||n==="center"||ve(n)?(l+=s.bottom,Oe(r.text)&&(l+=A.lineHeight*(r.text.length-1))):l+=s.top;const{titleX:c,titleY:u,maxWidth:d,rotation:f}=G7(this,l,n,o);OA(t,r.text,0,0,A,{color:r.color,maxWidth:d,rotation:f,textAlign:W7(o,n,a),textBaseline:"middle",translation:[c,u]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,n=t.ticks&&t.ticks.z||0,r=de(t.grid&&t.grid.z,-1),a=de(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==$A.prototype.draw?[{z:n,draw:A=>{this.draw(A)}}]:[{z:r,draw:A=>{this.drawBackground(),this.drawGrid(A),this.drawTitle()}},{z:a,draw:()=>{this.drawBorder()}},{z:n,draw:A=>{this.drawLabels(A)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",a=[];let A,s;for(A=0,s=n.length;A<s;++A){const o=n[A];o[r]===this.id&&(!t||o.type===t)&&a.push(o)}return a}_resolveTickFontOptions(t){const n=this.options.ticks.setContext(this.getContext(t));return ft(n.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Gl{constructor(t,n,r){this.type=t,this.scope=n,this.override=r,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const n=Object.getPrototypeOf(t);let r;Y7(n)&&(r=this.register(n));const a=this.items,A=t.id,s=this.scope+"."+A;if(!A)throw new Error("class does not have id: "+t);return A in a||(a[A]=t,z7(t,s,r),this.override&&dt.override(t.id,t.overrides)),s}get(t){return this.items[t]}unregister(t){const n=this.items,r=t.id,a=this.scope;r in n&&delete n[r],a&&r in dt[a]&&(delete dt[a][r],this.override&&delete LA[r])}}function z7(e,t,n){const r=wr(Object.create(null),[n?dt.get(n):{},dt.get(t),e.defaults]);dt.set(t,r),e.defaultRoutes&&j7(t,e.defaultRoutes),e.descriptors&&dt.describe(t,e.descriptors)}function j7(e,t){Object.keys(t).forEach(n=>{const r=n.split("."),a=r.pop(),A=[e].concat(r).join("."),s=t[n].split("."),o=s.pop(),l=s.join(".");dt.route(A,a,l,o)})}function Y7(e){return"id"in e&&"defaults"in e}class q7{constructor(){this.controllers=new Gl(er,"datasets",!0),this.elements=new Gl(an,"elements"),this.plugins=new Gl(Object,"plugins"),this.scales=new Gl($A,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,n,r){[...n].forEach(a=>{const A=r||this._getRegistryForType(a);r||A.isForType(a)||A===this.plugins&&a.id?this._exec(t,A,a):Ve(a,s=>{const o=r||this._getRegistryForType(s);this._exec(t,o,s)})})}_exec(t,n,r){const a=Ng(t);He(r["before"+a],[],r),n[t](r),He(r["after"+a],[],r)}_getRegistryForType(t){for(let n=0;n<this._typedRegistries.length;n++){const r=this._typedRegistries[n];if(r.isForType(t))return r}return this.plugins}_get(t,n,r){const a=n.get(t);if(a===void 0)throw new Error('"'+t+'" is not a registered '+r+".");return a}}var ur=new q7;class X7{constructor(){this._init=[]}notify(t,n,r,a){n==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const A=a?this._descriptors(t).filter(a):this._descriptors(t),s=this._notify(A,t,n,r);return n==="afterDestroy"&&(this._notify(A,t,"stop"),this._notify(this._init,t,"uninstall")),s}_notify(t,n,r,a){a=a||{};for(const A of t){const s=A.plugin,o=s[r],l=[n,a,A.options];if(He(o,l,s)===!1&&a.cancelable)return!1}return!0}invalidate(){_e(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),n}_createDescriptors(t,n){const r=t&&t.config,a=de(r.options&&r.options.plugins,{}),A=J7(r);return a===!1&&!n?[]:eM(t,A,a,n)}_notifyStateChanges(t){const n=this._oldCache||[],r=this._cache,a=(A,s)=>A.filter(o=>!s.some(l=>o.plugin.id===l.plugin.id));this._notify(a(n,r),t,"stop"),this._notify(a(r,n),t,"start")}}function J7(e){const t={},n=[],r=Object.keys(ur.plugins.items);for(let A=0;A<r.length;A++)n.push(ur.getPlugin(r[A]));const a=e.plugins||[];for(let A=0;A<a.length;A++){const s=a[A];n.indexOf(s)===-1&&(n.push(s),t[s.id]=!0)}return{plugins:n,localIds:t}}function Z7(e,t){return!t&&e===!1?null:e===!0?{}:e}function eM(e,{plugins:t,localIds:n},r,a){const A=[],s=e.getContext();for(const o of t){const l=o.id,c=Z7(r[l],a);c!==null&&A.push({plugin:o,options:tM(e.config,{plugin:o,local:n[l]},c,s)})}return A}function tM(e,{plugin:t,local:n},r,a){const A=e.pluginScopeKeys(t),s=e.getOptionScopes(r,A);return n&&t.defaults&&s.push(t.defaults),e.createResolver(s,a,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Mh(e,t){const n=dt.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function nM(e,t){let n=e;return e==="_index_"?n=t:e==="_value_"&&(n=t==="x"?"y":"x"),n}function rM(e,t){return e===t?"_index_":"_value_"}function jv(e){if(e==="x"||e==="y"||e==="r")return e}function aM(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function Nh(e,...t){if(jv(e))return e;for(const n of t){const r=n.axis||aM(n.position)||e.length>1&&jv(e[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function Yv(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function AM(e,t){if(t.data&&t.data.datasets){const n=t.data.datasets.filter(r=>r.xAxisID===e||r.yAxisID===e);if(n.length)return Yv(e,"x",n[0])||Yv(e,"y",n[0])}return{}}function sM(e,t){const n=LA[e.type]||{scales:{}},r=t.scales||{},a=Mh(e.type,t),A=Object.create(null);return Object.keys(r).forEach(s=>{const o=r[s];if(!ve(o))return console.error(`Invalid scale configuration for scale: ${s}`);if(o._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${s}`);const l=Nh(s,o,AM(s,e),dt.scales[o.type]),c=rM(l,a),u=n.scales||{};A[s]=ji(Object.create(null),[{axis:l},o,u[l],u[c]])}),e.data.datasets.forEach(s=>{const o=s.type||e.type,l=s.indexAxis||Mh(o,t),u=(LA[o]||{}).scales||{};Object.keys(u).forEach(d=>{const f=nM(d,l),h=s[f+"AxisID"]||f;A[h]=A[h]||Object.create(null),ji(A[h],[{axis:f},r[h],u[d]])})}),Object.keys(A).forEach(s=>{const o=A[s];ji(o,[dt.scales[o.type],dt.scale])}),A}function A_(e){const t=e.options||(e.options={});t.plugins=de(t.plugins,{}),t.scales=sM(e,t)}function s_(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function iM(e){return e=e||{},e.data=s_(e.data),A_(e),e}const qv=new Map,i_=new Set;function zl(e,t){let n=qv.get(e);return n||(n=t(),qv.set(e,n),i_.add(n)),n}const mi=(e,t,n)=>{const r=Ga(t,n);r!==void 0&&e.add(r)};class oM{constructor(t){this._config=iM(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=s_(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),A_(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return zl(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return zl(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return zl(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,r=this.type;return zl(`${r}-plugin-${n}`,()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const r=this._scopeCache;let a=r.get(t);return(!a||n)&&(a=new Map,r.set(t,a)),a}getOptionScopes(t,n,r){const{options:a,type:A}=this,s=this._cachedScopes(t,r),o=s.get(n);if(o)return o;const l=new Set;n.forEach(u=>{t&&(l.add(t),u.forEach(d=>mi(l,t,d))),u.forEach(d=>mi(l,a,d)),u.forEach(d=>mi(l,LA[A]||{},d)),u.forEach(d=>mi(l,dt,d)),u.forEach(d=>mi(l,Dh,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),i_.has(n)&&s.set(n,c),c}chartOptionScopes(){const{options:t,type:n}=this;return[t,LA[n]||{},dt.datasets[n]||{},{type:n},dt,Dh]}resolveNamedOptions(t,n,r,a=[""]){const A={$shared:!0},{resolver:s,subPrefixes:o}=Xv(this._resolverCache,t,a);let l=s;if(cM(s,n)){A.$shared=!1,r=mn(r)?r():r;const c=this.createResolver(t,r,o);l=Vs(s,r,c)}for(const c of n)A[c]=l[c];return A}createResolver(t,n,r=[""],a){const{resolver:A}=Xv(this._resolverCache,t,r);return ve(n)?Vs(A,n,void 0,a):A}}function Xv(e,t,n){let r=e.get(t);r||(r=new Map,e.set(t,r));const a=n.join();let A=r.get(a);return A||(A={resolver:$g(t,n),subPrefixes:n.filter(o=>!o.toLowerCase().includes("hover"))},r.set(a,A)),A}const lM=e=>ve(e)&&Object.getOwnPropertyNames(e).reduce((t,n)=>t||mn(e[n]),!1);function cM(e,t){const{isScriptable:n,isIndexable:r}=Pb(e);for(const a of t){const A=n(a),s=r(a),o=(s||A)&&e[a];if(A&&(mn(o)||lM(o))||s&&Oe(o))return!0}return!1}var uM="4.3.0";const dM=["top","bottom","left","right","chartArea"];function Jv(e,t){return e==="top"||e==="bottom"||dM.indexOf(e)===-1&&t==="x"}function Zv(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function eB(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),He(n&&n.onComplete,[e],t)}function fM(e){const t=e.chart,n=t.options.animation;He(n&&n.onProgress,[e],t)}function o_(e){return Wb()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const Pc={},tB=e=>{const t=o_(e);return Object.values(Pc).filter(n=>n.canvas===t).pop()};function hM(e,t,n){const r=Object.keys(e);for(const a of r){const A=+a;if(A>=t){const s=e[a];delete e[a],(n>0||A>t)&&(e[A+n]=s)}}}function pM(e,t,n,r){return!n||e.type==="mouseout"?null:r?t:e}function gM(e){const{xScale:t,yScale:n}=e;if(t&&n)return{left:t.left,right:t.right,top:n.top,bottom:n.bottom}}class Le{static register(...t){ur.add(...t),nB()}static unregister(...t){ur.remove(...t),nB()}constructor(t,n){const r=this.config=new oM(n),a=o_(t),A=tB(a);if(A)throw new Error("Canvas is already in use. Chart with ID '"+A.id+"' must be destroyed before the canvas with ID '"+A.canvas.id+"' can be reused.");const s=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||T7(a)),this.platform.updateConfig(r);const o=this.platform.acquireContext(a,s.aspectRatio),l=o&&o.canvas,c=l&&l.height,u=l&&l.width;if(this.id=yL(),this.ctx=o,this.canvas=l,this.width=u,this.height=c,this._options=s,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 X7,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=LL(d=>this.update(d),s.resizeDelay||0),this._dataChanges=[],Pc[this.id]=this,!o||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Mr.listen(this,"complete",eB),Mr.listen(this,"progress",fM),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:r,height:a,_aspectRatio:A}=this;return _e(t)?n&&A?A:a?r/a:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return ur}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():_v(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return yv(this.canvas,this.ctx),this}stop(){return Mr.stop(this),this}resize(t,n){Mr.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const r=this.options,a=this.canvas,A=r.maintainAspectRatio&&this.aspectRatio,s=this.platform.getMaximumSize(a,t,n,A),o=r.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,_v(this,o,!0)&&(this.notifyPlugins("resize",{size:s}),He(r.onResize,[this,s],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};Ve(n,(r,a)=>{r.id=a})}buildOrUpdateScales(){const t=this.options,n=t.scales,r=this.scales,a=Object.keys(r).reduce((s,o)=>(s[o]=!1,s),{});let A=[];n&&(A=A.concat(Object.keys(n).map(s=>{const o=n[s],l=Nh(s,o),c=l==="r",u=l==="x";return{options:o,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),Ve(A,s=>{const o=s.options,l=o.id,c=Nh(l,o),u=de(o.type,s.dtype);(o.position===void 0||Jv(o.position,c)!==Jv(s.dposition))&&(o.position=s.dposition),a[l]=!0;let d=null;if(l in r&&r[l].type===u)d=r[l];else{const f=ur.getScale(u);d=new f({id:l,type:u,ctx:this.ctx,chart:this}),r[d.id]=d}d.init(o,t)}),Ve(a,(s,o)=>{s||delete r[o]}),Ve(r,s=>{Gt.configure(this,s,s.options),Gt.addBox(this,s)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,r=t.length;if(t.sort((a,A)=>a.index-A.index),r>n){for(let a=n;a<r;++a)this._destroyDatasetMeta(a);t.splice(n,r-n)}this._sortedMetasets=t.slice(0).sort(Zv("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:n}}=this;t.length>n.length&&delete this._stacks,t.forEach((r,a)=>{n.filter(A=>A===r._dataset).length===0&&this._destroyDatasetMeta(a)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let r,a;for(this._removeUnreferencedMetasets(),r=0,a=n.length;r<a;r++){const A=n[r];let s=this.getDatasetMeta(r);const o=A.type||this.config.type;if(s.type&&s.type!==o&&(this._destroyDatasetMeta(r),s=this.getDatasetMeta(r)),s.type=o,s.indexAxis=A.indexAxis||Mh(o,this.options),s.order=A.order||0,s.index=r,s.label=""+A.label,s.visible=this.isDatasetVisible(r),s.controller)s.controller.updateIndex(r),s.controller.linkScales();else{const l=ur.getController(o),{datasetElementType:c,dataElementType:u}=dt.datasets[o];Object.assign(l,{dataElementType:ur.getElement(u),datasetElementType:c&&ur.getElement(c)}),s.controller=new l(this,r),t.push(s.controller)}}return this._updateMetasets(),t}_resetElements(){Ve(this.data.datasets,(t,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const r=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),a=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const A=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let s=0;for(let c=0,u=this.data.datasets.length;c<u;c++){const{controller:d}=this.getDatasetMeta(c),f=!a&&A.indexOf(d)===-1;d.buildOrUpdateElements(f),s=Math.max(+d.getMaxOverflow(),s)}s=this._minPadding=r.layout.autoPadding?s:0,this._updateLayout(s),a||Ve(A,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Zv("z","_idx"));const{_active:o,_lastEvent:l}=this;l?this._eventHandler(l,!0):o.length&&this._updateHoverStyles(o,o,!0),this.render()}_updateScales(){Ve(this.scales,t=>{Gt.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!dv(n,r)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:r,start:a,count:A}of n){const s=r==="_removeElements"?-A:A;hM(t,a,s)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,r=A=>new Set(t.filter(s=>s[0]===A).map((s,o)=>o+","+s.splice(1).join(","))),a=r(0);for(let A=1;A<n;A++)if(!dv(a,r(A)))return;return Array.from(a).map(A=>A.split(",")).map(A=>({method:A[1],start:+A[2],count:+A[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Gt.update(this,this.width,this.height,t);const n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],Ve(this.boxes,a=>{r&&a.position==="chartArea"||(a.configure&&a.configure(),this._layers.push(...a._layers()))},this),this._layers.forEach((a,A)=>{a._idx=A}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,r=this.data.datasets.length;n<r;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,r=this.data.datasets.length;n<r;++n)this._updateDataset(n,mn(t)?t({datasetIndex:n}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,n){const r=this.getDatasetMeta(t),a={meta:r,index:t,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",a)!==!1&&(r.controller._update(n),a.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",a))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Mr.has(this)?this.attached&&!Mr.running(this)&&Mr.start(this):(this.draw(),eB({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:r,height:a}=this._resizeBeforeDraw;this._resize(r,a),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(t=0;t<n.length&&n[t].z<=0;++t)n[t].draw(this.chartArea);for(this._drawDatasets();t<n.length;++t)n[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const n=this._sortedMetasets,r=[];let a,A;for(a=0,A=n.length;a<A;++a){const s=n[a];(!t||s.visible)&&r.push(s)}return r}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let n=t.length-1;n>=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx,r=t._clip,a=!r.disabled,A=gM(t)||this.chartArea,s={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",s)!==!1&&(a&&tl(n,{left:r.left===!1?0:A.left-r.left,right:r.right===!1?this.width:A.right+r.right,top:r.top===!1?0:A.top-r.top,bottom:r.bottom===!1?this.height:A.bottom+r.bottom}),t.controller.draw(),a&&nl(n),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(t){return Gr(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,r,a){const A=d7.modes[n];return typeof A=="function"?A(this,t,r,a):[]}getDatasetMeta(t){const n=this.data.datasets[t],r=this._metasets;let a=r.filter(A=>A&&A._dataset===n).pop();return a||(a={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},r.push(a)),a}getContext(){return this.$context||(this.$context=rA(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const r=this.getDatasetMeta(t);return typeof r.hidden=="boolean"?!r.hidden:!n.hidden}setDatasetVisibility(t,n){const r=this.getDatasetMeta(t);r.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,r){const a=r?"show":"hide",A=this.getDatasetMeta(t),s=A.controller._resolveAnimations(void 0,a);vn(n)?(A.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(t,r),s.update(A,{visible:r}),this.update(o=>o.datasetIndex===t?a:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){const n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),Mr.remove(this),t=0,n=this.data.datasets.length;t<n;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:n}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),yv(t,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete Pc[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,n=this.platform,r=(A,s)=>{n.addEventListener(this,A,s),t[A]=s},a=(A,s,o)=>{A.offsetX=s,A.offsetY=o,this._eventHandler(A)};Ve(this.options.events,A=>r(A,a))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,r=(l,c)=>{n.addEventListener(this,l,c),t[l]=c},a=(l,c)=>{t[l]&&(n.removeEventListener(this,l,c),delete t[l])},A=(l,c)=>{this.canvas&&this.resize(l,c)};let s;const o=()=>{a("attach",o),this.attached=!0,this.resize(),r("resize",A),r("detach",s)};s=()=>{this.attached=!1,a("resize",A),this._stop(),this._resize(0,0),r("attach",o)},n.isAttached(this.canvas)?o():s()}unbindEvents(){Ve(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},Ve(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,r){const a=r?"set":"remove";let A,s,o,l;for(n==="dataset"&&(A=this.getDatasetMeta(t[0].datasetIndex),A.controller["_"+a+"DatasetHoverStyle"]()),o=0,l=t.length;o<l;++o){s=t[o];const c=s&&this.getDatasetMeta(s.datasetIndex).controller;c&&c[a+"HoverStyle"](s.element,s.datasetIndex,s.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const n=this._active||[],r=t.map(({datasetIndex:A,index:s})=>{const o=this.getDatasetMeta(A);if(!o)throw new Error("No dataset found at index "+A);return{datasetIndex:A,element:o.data[s],index:s}});!iu(r,n)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,n))}notifyPlugins(t,n,r){return this._plugins.notify(this,t,n,r)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,r){const a=this.options.hover,A=(l,c)=>l.filter(u=>!c.some(d=>u.datasetIndex===d.datasetIndex&&u.index===d.index)),s=A(n,t),o=r?t:A(t,n);s.length&&this.updateHoverStyle(s,a.mode,!1),o.length&&a.mode&&this.updateHoverStyle(o,a.mode,!0)}_eventHandler(t,n){const r={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},a=s=>(s.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",r,a)===!1)return;const A=this._handleEvent(t,n,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,a),(A||r.changed)&&this.render(),this}_handleEvent(t,n,r){const{_active:a=[],options:A}=this,s=n,o=this._getActiveElements(t,a,r,s),l=kL(t),c=pM(t,this._lastEvent,r,l);r&&(this._lastEvent=null,He(A.onHover,[t,o,this],this),l&&He(A.onClick,[t,o,this],this));const u=!iu(o,a);return(u||n)&&(this._active=o,this._updateHoverStyles(o,a,n)),this._lastEvent=c,u}_getActiveElements(t,n,r,a){if(t.type==="mouseout")return[];if(!r)return n;const A=this.options.hover;return this.getElementsAtEventForMode(t,A.mode,A,a)}}R(Le,"defaults",dt),R(Le,"instances",Pc),R(Le,"overrides",LA),R(Le,"registry",ur),R(Le,"version",uM),R(Le,"getChart",tB);function nB(){return Ve(Le.instances,e=>e._plugins.invalidate())}function mM(e,t,n){const{startAngle:r,pixelMargin:a,x:A,y:s,outerRadius:o,innerRadius:l}=t;let c=a/o;e.beginPath(),e.arc(A,s,o,r-c,n+c),l>a?(c=a/l,e.arc(A,s,l,n+c,r-c,!0)):e.arc(A,s,a,n+Je,r-Je),e.closePath(),e.clip()}function vM(e){return Kg(e,["outerStart","outerEnd","innerStart","innerEnd"])}function BM(e,t,n,r){const a=vM(e.options.borderRadius),A=(n-t)/2,s=Math.min(A,r*t/2),o=l=>{const c=(n-Math.min(A,l))*r/2;return Mt(l,0,Math.min(A,c))};return{outerStart:o(a.outerStart),outerEnd:o(a.outerEnd),innerStart:Mt(a.innerStart,0,s),innerEnd:Mt(a.innerEnd,0,s)}}function rs(e,t,n,r){return{x:n+e*Math.cos(t),y:r+e*Math.sin(t)}}function hu(e,t,n,r,a,A){const{x:s,y:o,startAngle:l,pixelMargin:c,innerRadius:u}=t,d=Math.max(t.outerRadius+r+n-c,0),f=u>0?u+r+n+c:0;let h=0;const p=a-l;if(r){const X=u>0?u-r:0,j=d>0?d-r:0,K=(X+j)/2,oe=K!==0?p*K/(K+r):p;h=(p-oe)/2}const m=Math.max(.001,p*d-n/Qe)/d,y=(p-m)/2,g=l+y+h,v=a-y-h,{outerStart:_,outerEnd:B,innerStart:b,innerEnd:w}=BM(t,f,d,v-g),C=d-_,k=d-B,S=g+_/C,T=v-B/k,U=f+b,F=f+w,Q=g+b/U,Y=v-w/F;if(e.beginPath(),A){const X=(S+T)/2;if(e.arc(s,o,d,S,X),e.arc(s,o,d,X,T),B>0){const $=rs(k,T,s,o);e.arc($.x,$.y,B,T,v+Je)}const j=rs(F,v,s,o);if(e.lineTo(j.x,j.y),w>0){const $=rs(F,Y,s,o);e.arc($.x,$.y,w,v+Je,Y+Math.PI)}const K=(v-w/f+(g+b/f))/2;if(e.arc(s,o,f,v-w/f,K,!0),e.arc(s,o,f,K,g+b/f,!0),b>0){const $=rs(U,Q,s,o);e.arc($.x,$.y,b,Q+Math.PI,g-Je)}const oe=rs(C,g,s,o);if(e.lineTo(oe.x,oe.y),_>0){const $=rs(C,S,s,o);e.arc($.x,$.y,_,g-Je,S)}}else{e.moveTo(s,o);const X=Math.cos(S)*d+s,j=Math.sin(S)*d+o;e.lineTo(X,j);const K=Math.cos(T)*d+s,oe=Math.sin(T)*d+o;e.lineTo(K,oe)}e.closePath()}function yM(e,t,n,r,a){const{fullCircles:A,startAngle:s,circumference:o}=t;let l=t.endAngle;if(A){hu(e,t,n,r,l,a);for(let c=0;c<A;++c)e.fill();isNaN(o)||(l=s+(o%Xe||Xe))}return hu(e,t,n,r,l,a),e.fill(),l}function wM(e,t,n,r,a){const{fullCircles:A,startAngle:s,circumference:o,options:l}=t,{borderWidth:c,borderJoinStyle:u,borderDash:d,borderDashOffset:f}=l,h=l.borderAlign==="inner";if(!c)return;e.setLineDash(d||[]),e.lineDashOffset=f,h?(e.lineWidth=c*2,e.lineJoin=u||"round"):(e.lineWidth=c,e.lineJoin=u||"bevel");let p=t.endAngle;if(A){hu(e,t,n,r,p,a);for(let m=0;m<A;++m)e.stroke();isNaN(o)||(p=s+(o%Xe||Xe))}h&&mM(e,t,p),A||(hu(e,t,n,r,p,a),e.stroke())}class ys extends an{constructor(n){super();R(this,"circumference");R(this,"endAngle");R(this,"fullCircles");R(this,"innerRadius");R(this,"outerRadius");R(this,"pixelMargin");R(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,r,a){const A=this.getProps(["x","y"],a),{angle:s,distance:o}=Fb(A,{x:n,y:r}),{startAngle:l,endAngle:c,innerRadius:u,outerRadius:d,circumference:f}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],a),h=(this.options.spacing+this.options.borderWidth)/2,m=de(f,c-l)>=Xe||So(s,l,c),y=$r(o,u+h,d+h);return m&&y}getCenterPoint(n){const{x:r,y:a,startAngle:A,endAngle:s,innerRadius:o,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],n),{offset:c,spacing:u}=this.options,d=(A+s)/2,f=(o+l+u+c)/2;return{x:r+Math.cos(d)*f,y:a+Math.sin(d)*f}}tooltipPosition(n){return this.getCenterPoint(n)}draw(n){const{options:r,circumference:a}=this,A=(r.offset||0)/4,s=(r.spacing||0)/2,o=r.circular;if(this.pixelMargin=r.borderAlign==="inner"?.33:0,this.fullCircles=a>Xe?Math.floor(a/Xe):0,a===0||this.innerRadius<0||this.outerRadius<0)return;n.save();const l=(this.startAngle+this.endAngle)/2;n.translate(Math.cos(l)*A,Math.sin(l)*A);const c=1-Math.sin(Math.min(Qe,a||0)),u=A*c;n.fillStyle=r.backgroundColor,n.strokeStyle=r.borderColor,yM(n,this,u,s,o),wM(n,this,u,s,o),n.restore()}}R(ys,"id","arc"),R(ys,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),R(ys,"defaultRoutes",{backgroundColor:"backgroundColor"}),R(ys,"descriptors",{_scriptable:!0,_indexable:n=>n!=="borderDash"});function l_(e,t,n=t){e.lineCap=de(n.borderCapStyle,t.borderCapStyle),e.setLineDash(de(n.borderDash,t.borderDash)),e.lineDashOffset=de(n.borderDashOffset,t.borderDashOffset),e.lineJoin=de(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=de(n.borderWidth,t.borderWidth),e.strokeStyle=de(n.borderColor,t.borderColor)}function bM(e,t,n){e.lineTo(n.x,n.y)}function _M(e){return e.stepped?zL:e.tension||e.cubicInterpolationMode==="monotone"?jL:bM}function c_(e,t,n={}){const r=e.length,{start:a=0,end:A=r-1}=n,{start:s,end:o}=t,l=Math.max(a,s),c=Math.min(A,o),u=a<s&&A<s||a>o&&A>o;return{count:r,start:l,loop:t.loop,ilen:c<l&&!u?r+c-l:c-l}}function CM(e,t,n,r){const{points:a,options:A}=t,{count:s,start:o,loop:l,ilen:c}=c_(a,n,r),u=_M(A);let{move:d=!0,reverse:f}=r||{},h,p,m;for(h=0;h<=c;++h)p=a[(o+(f?c-h:h))%s],!p.skip&&(d?(e.moveTo(p.x,p.y),d=!1):u(e,m,p,f,A.stepped),m=p);return l&&(p=a[(o+(f?c:0))%s],u(e,m,p,f,A.stepped)),!!l}function EM(e,t,n,r){const a=t.points,{count:A,start:s,ilen:o}=c_(a,n,r),{move:l=!0,reverse:c}=r||{};let u=0,d=0,f,h,p,m,y,g;const v=B=>(s+(c?o-B:B))%A,_=()=>{m!==y&&(e.lineTo(u,y),e.lineTo(u,m),e.lineTo(u,g))};for(l&&(h=a[v(0)],e.moveTo(h.x,h.y)),f=0;f<=o;++f){if(h=a[v(f)],h.skip)continue;const B=h.x,b=h.y,w=B|0;w===p?(b<m?m=b:b>y&&(y=b),u=(d*u+B)/++d):(_(),e.lineTo(B,b),p=w,d=0,m=y=b),g=b}_()}function Ph(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?EM:CM}function kM(e){return e.stepped?kO:e.tension||e.cubicInterpolationMode==="monotone"?SO:fA}function SM(e,t,n,r){let a=t._path;a||(a=t._path=new Path2D,t.path(a,n,r)&&a.closePath()),l_(e,t.options),e.stroke(a)}function xM(e,t,n,r){const{segments:a,options:A}=t,s=Ph(t);for(const o of a)l_(e,A,o.style),e.beginPath(),s(e,t,o,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}const FM=typeof Path2D=="function";function IM(e,t,n,r){FM&&!t.options.segment?SM(e,t,n,r):xM(e,t,n,r)}class ka extends an{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,n){const r=this.options;if((r.tension||r.cubicInterpolationMode==="monotone")&&!r.stepped&&!this._pointsUpdated){const a=r.spanGaps?this._loop:this._fullLoop;vO(this._points,r,t,a,n),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=TO(this,this.options.segment))}first(){const t=this.segments,n=this.points;return t.length&&n[t[0].start]}last(){const t=this.segments,n=this.points,r=t.length;return r&&n[t[r-1].end]}interpolate(t,n){const r=this.options,a=t[n],A=this.points,s=qb(this,{property:n,start:a,end:a});if(!s.length)return;const o=[],l=kM(r);let c,u;for(c=0,u=s.length;c<u;++c){const{start:d,end:f}=s[c],h=A[d],p=A[f];if(h===p){o.push(h);continue}const m=Math.abs((a-h[n])/(p[n]-h[n])),y=l(h,p,m,r.stepped);y[n]=t[n],o.push(y)}return o.length===1?o[0]:o}pathSegment(t,n,r){return Ph(this)(t,this,n,r)}path(t,n,r){const a=this.segments,A=Ph(this);let s=this._loop;n=n||0,r=r||this.points.length-n;for(const o of a)s&=A(t,this,o,{start:n,end:n+r-1});return!!s}draw(t,n,r,a){const A=this.options||{};(this.points||[]).length&&A.borderWidth&&(t.save(),IM(t,this,r,a),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}R(ka,"id","line"),R(ka,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),R(ka,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),R(ka,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});function rB(e,t,n,r){const a=e.options,{[n]:A}=e.getProps([n],r);return Math.abs(t-A)<a.radius+a.hitRadius}class Zi extends an{constructor(n){super();R(this,"parsed");R(this,"skip");R(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,r,a){const A=this.options,{x:s,y:o}=this.getProps(["x","y"],a);return Math.pow(n-s,2)+Math.pow(r-o,2)<Math.pow(A.hitRadius+A.radius,2)}inXRange(n,r){return rB(this,n,"x",r)}inYRange(n,r){return rB(this,n,"y",r)}getCenterPoint(n){const{x:r,y:a}=this.getProps(["x","y"],n);return{x:r,y:a}}size(n){n=n||this.options||{};let r=n.radius||0;r=Math.max(r,r&&n.hoverRadius||0);const a=r&&n.borderWidth||0;return(r+a)*2}draw(n,r){const a=this.options;this.skip||a.radius<.1||!Gr(this,r,this.size(a)/2)||(n.strokeStyle=a.borderColor,n.lineWidth=a.borderWidth,n.fillStyle=a.backgroundColor,Lh(n,a,this.x,this.y))}getRange(){const n=this.options||{};return n.radius+n.hitRadius}}R(Zi,"id","point"),R(Zi,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),R(Zi,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function u_(e,t){const{x:n,y:r,base:a,width:A,height:s}=e.getProps(["x","y","base","width","height"],t);let o,l,c,u,d;return e.horizontal?(d=s/2,o=Math.min(n,a),l=Math.max(n,a),c=r-d,u=r+d):(d=A/2,o=n-d,l=n+d,c=Math.min(r,a),u=Math.max(r,a)),{left:o,top:c,right:l,bottom:u}}function Sa(e,t,n,r){return e?0:Mt(t,n,r)}function UM(e,t,n){const r=e.options.borderWidth,a=e.borderSkipped,A=Nb(r);return{t:Sa(a.top,A.top,0,n),r:Sa(a.right,A.right,0,t),b:Sa(a.bottom,A.bottom,0,n),l:Sa(a.left,A.left,0,t)}}function QM(e,t,n){const{enableBorderRadius:r}=e.getProps(["enableBorderRadius"]),a=e.options.borderRadius,A=Da(a),s=Math.min(t,n),o=e.borderSkipped,l=r||ve(a);return{topLeft:Sa(!l||o.top||o.left,A.topLeft,0,s),topRight:Sa(!l||o.top||o.right,A.topRight,0,s),bottomLeft:Sa(!l||o.bottom||o.left,A.bottomLeft,0,s),bottomRight:Sa(!l||o.bottom||o.right,A.bottomRight,0,s)}}function TM(e){const t=u_(e),n=t.right-t.left,r=t.bottom-t.top,a=UM(e,n/2,r/2),A=QM(e,n/2,r/2);return{outer:{x:t.left,y:t.top,w:n,h:r,radius:A},inner:{x:t.left+a.l,y:t.top+a.t,w:n-a.l-a.r,h:r-a.t-a.b,radius:{topLeft:Math.max(0,A.topLeft-Math.max(a.t,a.l)),topRight:Math.max(0,A.topRight-Math.max(a.t,a.r)),bottomLeft:Math.max(0,A.bottomLeft-Math.max(a.b,a.l)),bottomRight:Math.max(0,A.bottomRight-Math.max(a.b,a.r))}}}}function wf(e,t,n,r){const a=t===null,A=n===null,o=e&&!(a&&A)&&u_(e,r);return o&&(a||$r(t,o.left,o.right))&&(A||$r(n,o.top,o.bottom))}function DM(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function LM(e,t){e.rect(t.x,t.y,t.w,t.h)}function bf(e,t,n={}){const r=e.x!==n.x?-t:0,a=e.y!==n.y?-t:0,A=(e.x+e.w!==n.x+n.w?t:0)-r,s=(e.y+e.h!==n.y+n.h?t:0)-a;return{x:e.x+r,y:e.y+a,w:e.w+A,h:e.h+s,radius:e.radius}}class eo extends an{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:n,options:{borderColor:r,backgroundColor:a}}=this,{inner:A,outer:s}=TM(this),o=DM(s.radius)?Rs:LM;t.save(),(s.w!==A.w||s.h!==A.h)&&(t.beginPath(),o(t,bf(s,n,A)),t.clip(),o(t,bf(A,-n,s)),t.fillStyle=r,t.fill("evenodd")),t.beginPath(),o(t,bf(A,n)),t.fillStyle=a,t.fill(),t.restore()}inRange(t,n,r){return wf(this,t,n,r)}inXRange(t,n){return wf(this,t,null,n)}inYRange(t,n){return wf(this,null,t,n)}getCenterPoint(t){const{x:n,y:r,base:a,horizontal:A}=this.getProps(["x","y","base","horizontal"],t);return{x:A?(n+a)/2:n,y:A?r:(r+a)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}R(eo,"id","bar"),R(eo,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),R(eo,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var OM=Object.freeze({__proto__:null,ArcElement:ys,BarElement:eo,LineElement:ka,PointElement:Zi});const Hh=["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)"],aB=Hh.map(e=>e.replace("rgb(","rgba(").replace(")",", 0.5)"));function d_(e){return Hh[e%Hh.length]}function f_(e){return aB[e%aB.length]}function MM(e,t){return e.borderColor=d_(t),e.backgroundColor=f_(t),++t}function NM(e,t){return e.backgroundColor=e.data.map(()=>d_(t++)),t}function PM(e,t){return e.backgroundColor=e.data.map(()=>f_(t++)),t}function HM(e){let t=0;return(n,r)=>{const a=e.getDatasetMeta(r).controller;a instanceof BA?t=NM(n,t):a instanceof Ji?t=PM(n,t):a&&(t=MM(n,t))}}function AB(e){let t;for(t in e)if(e[t].borderColor||e[t].backgroundColor)return!0;return!1}function RM(e){return e&&(e.borderColor||e.backgroundColor)}var VM={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(e,t,n){if(!n.enabled)return;const{data:{datasets:r},options:a}=e.config,{elements:A}=a;if(!n.forceOverride&&(AB(r)||RM(a)||A&&AB(A)))return;const s=HM(e);r.forEach(s)}};function KM(e,t,n,r,a){const A=a.samples||r;if(A>=n)return e.slice(t,t+n);const s=[],o=(n-2)/(A-2);let l=0;const c=t+n-1;let u=t,d,f,h,p,m;for(s[l++]=e[u],d=0;d<A-2;d++){let y=0,g=0,v;const _=Math.floor((d+1)*o)+1+t,B=Math.min(Math.floor((d+2)*o)+1,n)+t,b=B-_;for(v=_;v<B;v++)y+=e[v].x,g+=e[v].y;y/=b,g/=b;const w=Math.floor(d*o)+1+t,C=Math.min(Math.floor((d+1)*o)+1,n)+t,{x:k,y:S}=e[u];for(h=p=-1,v=w;v<C;v++)p=.5*Math.abs((k-y)*(e[v].y-S)-(k-e[v].x)*(g-S)),p>h&&(h=p,f=e[v],m=v);s[l++]=f,u=m}return s[l++]=e[c],s}function $M(e,t,n,r){let a=0,A=0,s,o,l,c,u,d,f,h,p,m;const y=[],g=t+n-1,v=e[t].x,B=e[g].x-v;for(s=t;s<t+n;++s){o=e[s],l=(o.x-v)/B*r,c=o.y;const b=l|0;if(b===u)c<p?(p=c,d=s):c>m&&(m=c,f=s),a=(A*a+o.x)/++A;else{const w=s-1;if(!_e(d)&&!_e(f)){const C=Math.min(d,f),k=Math.max(d,f);C!==h&&C!==w&&y.push({...e[C],x:a}),k!==h&&k!==w&&y.push({...e[k],x:a})}s>0&&w!==h&&y.push(e[w]),y.push(o),u=b,A=0,p=m=c,d=f=h=s}}return y}function h_(e){if(e._decimated){const t=e._data;delete e._decimated,delete e._data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,writable:!0,value:t})}}function sB(e){e.data.datasets.forEach(t=>{h_(t)})}function WM(e,t){const n=t.length;let r=0,a;const{iScale:A}=e,{min:s,max:o,minDefined:l,maxDefined:c}=A.getUserBounds();return l&&(r=Mt(Wr(t,A.axis,s).lo,0,n-1)),c?a=Mt(Wr(t,A.axis,o).hi+1,r,n)-r:a=n-r,{start:r,count:a}}var GM={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(e,t,n)=>{if(!n.enabled){sB(e);return}const r=e.width;e.data.datasets.forEach((a,A)=>{const{_data:s,indexAxis:o}=a,l=e.getDatasetMeta(A),c=s||a.data;if(tt([o,e.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;const u=e.scales[l.xAxisID];if(u.type!=="linear"&&u.type!=="time"||e.options.parsing)return;let{start:d,count:f}=WM(l,c);const h=n.threshold||4*r;if(f<=h){h_(a);return}_e(s)&&(a._data=c,delete a.data,Object.defineProperty(a,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(m){this._data=m}}));let p;switch(n.algorithm){case"lttb":p=KM(c,d,f,r,n);break;case"min-max":p=$M(c,d,f,r);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}a._decimated=p})},destroy(e){sB(e)}};function zM(e,t,n){const r=e.segments,a=e.points,A=t.points,s=[];for(const o of r){let{start:l,end:c}=o;c=qg(l,c,a);const u=Rh(n,a[l],a[c],o.loop);if(!t.segments){s.push({source:o,target:u,start:a[l],end:a[c]});continue}const d=qb(t,u);for(const f of d){const h=Rh(n,A[f.start],A[f.end],f.loop),p=Yb(o,a,h);for(const m of p)s.push({source:m,target:f,start:{[n]:iB(u,h,"start",Math.max)},end:{[n]:iB(u,h,"end",Math.min)}})}}return s}function Rh(e,t,n,r){if(r)return;let a=t[e],A=n[e];return e==="angle"&&(a=_n(a),A=_n(A)),{property:e,start:a,end:A}}function jM(e,t){const{x:n=null,y:r=null}=e||{},a=t.points,A=[];return t.segments.forEach(({start:s,end:o})=>{o=qg(s,o,a);const l=a[s],c=a[o];r!==null?(A.push({x:l.x,y:r}),A.push({x:c.x,y:r})):n!==null&&(A.push({x:n,y:l.y}),A.push({x:n,y:c.y}))}),A}function qg(e,t,n){for(;t>e;t--){const r=n[t];if(!isNaN(r.x)&&!isNaN(r.y))break}return t}function iB(e,t,n,r){return e&&t?r(e[n],t[n]):e?e[n]:t?t[n]:0}function p_(e,t){let n=[],r=!1;return Oe(e)?(r=!0,n=e):n=jM(e,t),n.length?new ka({points:n,options:{tension:0},_loop:r,_fullLoop:r}):null}function oB(e){return e&&e.fill!==!1}function YM(e,t,n){let a=e[t].fill;const A=[t];let s;if(!n)return a;for(;a!==!1&&A.indexOf(a)===-1;){if(!ut(a))return a;if(s=e[a],!s)return!1;if(s.visible)return a;A.push(a),a=s.fill}return!1}function qM(e,t,n){const r=e9(e);if(ve(r))return isNaN(r.value)?!1:r;let a=parseFloat(r);return ut(a)&&Math.floor(a)===a?XM(r[0],t,a,n):["origin","start","end","stack","shape"].indexOf(r)>=0&&r}function XM(e,t,n,r){return(e==="-"||e==="+")&&(n=t+n),n===t||n<0||n>=r?!1:n}function JM(e,t){let n=null;return e==="start"?n=t.bottom:e==="end"?n=t.top:ve(e)?n=t.getPixelForValue(e.value):t.getBasePixel&&(n=t.getBasePixel()),n}function ZM(e,t,n){let r;return e==="start"?r=n:e==="end"?r=t.options.reverse?t.min:t.max:ve(e)?r=e.value:r=t.getBaseValue(),r}function e9(e){const t=e.options,n=t.fill;let r=de(n&&n.target,n);return r===void 0&&(r=!!t.backgroundColor),r===!1||r===null?!1:r===!0?"origin":r}function t9(e){const{scale:t,index:n,line:r}=e,a=[],A=r.segments,s=r.points,o=n9(t,n);o.push(p_({x:null,y:t.bottom},r));for(let l=0;l<A.length;l++){const c=A[l];for(let u=c.start;u<=c.end;u++)r9(a,s[u],o)}return new ka({points:a,options:{}})}function n9(e,t){const n=[],r=e.getMatchingVisibleMetas("line");for(let a=0;a<r.length;a++){const A=r[a];if(A.index===t)break;A.hidden||n.unshift(A.dataset)}return n}function r9(e,t,n){const r=[];for(let a=0;a<n.length;a++){const A=n[a],{first:s,last:o,point:l}=a9(A,t,"x");if(!(!l||s&&o)){if(s)r.unshift(l);else if(e.push(l),!o)break}}e.push(...r)}function a9(e,t,n){const r=e.interpolate(t,n);if(!r)return{};const a=r[n],A=e.segments,s=e.points;let o=!1,l=!1;for(let c=0;c<A.length;c++){const u=A[c],d=s[u.start][n],f=s[u.end][n];if($r(a,d,f)){o=a===d,l=a===f;break}}return{first:o,last:l,point:r}}class g_{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,n,r){const{x:a,y:A,radius:s}=this;return n=n||{start:0,end:Xe},t.arc(a,A,s,n.end,n.start,!0),!r.bounds}interpolate(t){const{x:n,y:r,radius:a}=this,A=t.angle;return{x:n+Math.cos(A)*a,y:r+Math.sin(A)*a,angle:A}}}function A9(e){const{chart:t,fill:n,line:r}=e;if(ut(n))return s9(t,n);if(n==="stack")return t9(e);if(n==="shape")return!0;const a=i9(e);return a instanceof g_?a:p_(a,r)}function s9(e,t){const n=e.getDatasetMeta(t);return n&&e.isDatasetVisible(t)?n.dataset:null}function i9(e){return(e.scale||{}).getPointPositionForValue?l9(e):o9(e)}function o9(e){const{scale:t={},fill:n}=e,r=JM(n,t);if(ut(r)){const a=t.isHorizontal();return{x:a?r:null,y:a?null:r}}return null}function l9(e){const{scale:t,fill:n}=e,r=t.options,a=t.getLabels().length,A=r.reverse?t.max:t.min,s=ZM(n,t,A),o=[];if(r.grid.circular){const l=t.getPointPositionForValue(0,A);return new g_({x:l.x,y:l.y,radius:t.getDistanceFromCenterForValue(s)})}for(let l=0;l<a;++l)o.push(t.getPointPositionForValue(l,s));return o}function _f(e,t,n){const r=A9(t),{line:a,scale:A,axis:s}=t,o=a.options,l=o.fill,c=o.backgroundColor,{above:u=c,below:d=c}=l||{};r&&a.points.length&&(tl(e,n),c9(e,{line:a,target:r,above:u,below:d,area:n,scale:A,axis:s}),nl(e))}function c9(e,t){const{line:n,target:r,above:a,below:A,area:s,scale:o}=t,l=n._loop?"angle":t.axis;e.save(),l==="x"&&A!==a&&(lB(e,r,s.top),cB(e,{line:n,target:r,color:a,scale:o,property:l}),e.restore(),e.save(),lB(e,r,s.bottom)),cB(e,{line:n,target:r,color:A,scale:o,property:l}),e.restore()}function lB(e,t,n){const{segments:r,points:a}=t;let A=!0,s=!1;e.beginPath();for(const o of r){const{start:l,end:c}=o,u=a[l],d=a[qg(l,c,a)];A?(e.moveTo(u.x,u.y),A=!1):(e.lineTo(u.x,n),e.lineTo(u.x,u.y)),s=!!t.pathSegment(e,o,{move:s}),s?e.closePath():e.lineTo(d.x,n)}e.lineTo(t.first().x,n),e.closePath(),e.clip()}function cB(e,t){const{line:n,target:r,property:a,color:A,scale:s}=t,o=zM(n,r,a);for(const{source:l,target:c,start:u,end:d}of o){const{style:{backgroundColor:f=A}={}}=l,h=r!==!0;e.save(),e.fillStyle=f,u9(e,s,h&&Rh(a,u,d)),e.beginPath();const p=!!n.pathSegment(e,l);let m;if(h){p?e.closePath():uB(e,r,d,a);const y=!!r.pathSegment(e,c,{move:p,reverse:!0});m=p&&y,m||uB(e,r,u,a)}e.closePath(),e.fill(m?"evenodd":"nonzero"),e.restore()}}function u9(e,t,n){const{top:r,bottom:a}=t.chart.chartArea,{property:A,start:s,end:o}=n||{};A==="x"&&(e.beginPath(),e.rect(s,r,o-s,a-r),e.clip())}function uB(e,t,n,r){const a=t.interpolate(n,r);a&&e.lineTo(a.x,a.y)}var d9={id:"filler",afterDatasetsUpdate(e,t,n){const r=(e.data.datasets||[]).length,a=[];let A,s,o,l;for(s=0;s<r;++s)A=e.getDatasetMeta(s),o=A.dataset,l=null,o&&o.options&&o instanceof ka&&(l={visible:e.isDatasetVisible(s),index:s,fill:qM(o,s,r),chart:e,axis:A.controller.options.indexAxis,scale:A.vScale,line:o}),A.$filler=l,a.push(l);for(s=0;s<r;++s)l=a[s],!(!l||l.fill===!1)&&(l.fill=YM(a,s,n.propagate))},beforeDraw(e,t,n){const r=n.drawTime==="beforeDraw",a=e.getSortedVisibleDatasetMetas(),A=e.chartArea;for(let s=a.length-1;s>=0;--s){const o=a[s].$filler;o&&(o.line.updateControlPoints(A,o.axis),r&&o.fill&&_f(e.ctx,o,A))}},beforeDatasetsDraw(e,t,n){if(n.drawTime!=="beforeDatasetsDraw")return;const r=e.getSortedVisibleDatasetMetas();for(let a=r.length-1;a>=0;--a){const A=r[a].$filler;oB(A)&&_f(e.ctx,A,e.chartArea)}},beforeDatasetDraw(e,t,n){const r=t.meta.$filler;!oB(r)||n.drawTime!=="beforeDatasetDraw"||_f(e.ctx,r,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const dB=(e,t)=>{let{boxHeight:n=t,boxWidth:r=t}=e;return e.usePointStyle&&(n=Math.min(n,t),r=e.pointStyleWidth||Math.min(r,t)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(t,n)}},f9=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class fB extends an{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n,r){this.maxWidth=t,this.maxHeight=n,this._margins=r,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let n=He(t.generateLabels,[this.chart],this)||[];t.filter&&(n=n.filter(r=>t.filter(r,this.chart.data))),t.sort&&(n=n.sort((r,a)=>t.sort(r,a,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:t,ctx:n}=this;if(!t.display){this.width=this.height=0;return}const r=t.labels,a=ft(r.font),A=a.size,s=this._computeTitleHeight(),{boxWidth:o,itemHeight:l}=dB(r,A);let c,u;n.font=a.string,this.isHorizontal()?(c=this.maxWidth,u=this._fitRows(s,A,o,l)+10):(u=this.maxHeight,c=this._fitCols(s,a,o,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(u,t.maxHeight||this.maxHeight)}_fitRows(t,n,r,a){const{ctx:A,maxWidth:s,options:{labels:{padding:o}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],u=a+o;let d=t;A.textAlign="left",A.textBaseline="middle";let f=-1,h=-u;return this.legendItems.forEach((p,m)=>{const y=r+n/2+A.measureText(p.text).width;(m===0||c[c.length-1]+y+2*o>s)&&(d+=u,c[c.length-(m>0?0:1)]=0,h+=u,f++),l[m]={left:0,top:h,row:f,width:y,height:a},c[c.length-1]+=y+o}),d}_fitCols(t,n,r,a){const{ctx:A,maxHeight:s,options:{labels:{padding:o}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],u=s-t;let d=o,f=0,h=0,p=0,m=0;return this.legendItems.forEach((y,g)=>{const{itemWidth:v,itemHeight:_}=h9(r,n,A,y,a);g>0&&h+_+2*o>u&&(d+=f+o,c.push({width:f,height:h}),p+=f+o,m++,f=h=0),l[g]={left:p,top:h,col:m,width:v,height:_},f=Math.max(f,v),h+=_+o}),d+=f,c.push({width:f,height:h}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:r,labels:{padding:a},rtl:A}}=this,s=Cs(A,this.left,this.width);if(this.isHorizontal()){let o=0,l=$t(r,this.left+a,this.right-this.lineWidths[o]);for(const c of n)o!==c.row&&(o=c.row,l=$t(r,this.left+a,this.right-this.lineWidths[o])),c.top+=this.top+t+a,c.left=s.leftForLtr(s.x(l),c.width),l+=c.width+a}else{let o=0,l=$t(r,this.top+t+a,this.bottom-this.columnSizes[o].height);for(const c of n)c.col!==o&&(o=c.col,l=$t(r,this.top+t+a,this.bottom-this.columnSizes[o].height)),c.top=l,c.left+=this.left+a,c.left=s.leftForLtr(s.x(c.left),c.width),l+=c.height+a}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;tl(t,this),this._draw(),nl(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:r,ctx:a}=this,{align:A,labels:s}=t,o=dt.color,l=Cs(t.rtl,this.left,this.width),c=ft(s.font),{padding:u}=s,d=c.size,f=d/2;let h;this.drawTitle(),a.textAlign=l.textAlign("left"),a.textBaseline="middle",a.lineWidth=.5,a.font=c.string;const{boxWidth:p,boxHeight:m,itemHeight:y}=dB(s,d),g=function(w,C,k){if(isNaN(p)||p<=0||isNaN(m)||m<0)return;a.save();const S=de(k.lineWidth,1);if(a.fillStyle=de(k.fillStyle,o),a.lineCap=de(k.lineCap,"butt"),a.lineDashOffset=de(k.lineDashOffset,0),a.lineJoin=de(k.lineJoin,"miter"),a.lineWidth=S,a.strokeStyle=de(k.strokeStyle,o),a.setLineDash(de(k.lineDash,[])),s.usePointStyle){const T={radius:m*Math.SQRT2/2,pointStyle:k.pointStyle,rotation:k.rotation,borderWidth:S},U=l.xPlus(w,p/2),F=C+f;Mb(a,T,U,F,s.pointStyleWidth&&p)}else{const T=C+Math.max((d-m)/2,0),U=l.leftForLtr(w,p),F=Da(k.borderRadius);a.beginPath(),Object.values(F).some(Q=>Q!==0)?Rs(a,{x:U,y:T,w:p,h:m,radius:F}):a.rect(U,T,p,m),a.fill(),S!==0&&a.stroke()}a.restore()},v=function(w,C,k){OA(a,k.text,w,C+y/2,c,{strikethrough:k.hidden,textAlign:l.textAlign(k.textAlign)})},_=this.isHorizontal(),B=this._computeTitleHeight();_?h={x:$t(A,this.left+u,this.right-r[0]),y:this.top+u+B,line:0}:h={x:this.left+u,y:$t(A,this.top+B+u,this.bottom-n[0].height),line:0},Gb(this.ctx,t.textDirection);const b=y+u;this.legendItems.forEach((w,C)=>{a.strokeStyle=w.fontColor,a.fillStyle=w.fontColor;const k=a.measureText(w.text).width,S=l.textAlign(w.textAlign||(w.textAlign=s.textAlign)),T=p+f+k;let U=h.x,F=h.y;l.setWidth(this.width),_?C>0&&U+T+u>this.right&&(F=h.y+=b,h.line++,U=h.x=$t(A,this.left+u,this.right-r[h.line])):C>0&&F+b>this.bottom&&(U=h.x=U+n[h.line].width+u,h.line++,F=h.y=$t(A,this.top+B+u,this.bottom-n[h.line].height));const Q=l.x(U);if(g(Q,F,w),U=OL(S,U+p+f,_?U+T:this.right,t.rtl),v(l.x(U),F,w),_)h.x+=T+u;else if(typeof w.text!="string"){const Y=c.lineHeight;h.y+=m_(w,Y)}else h.y+=b}),zb(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,r=ft(n.font),a=_t(n.padding);if(!n.display)return;const A=Cs(t.rtl,this.left,this.width),s=this.ctx,o=n.position,l=r.size/2,c=a.top+l;let u,d=this.left,f=this.width;if(this.isHorizontal())f=Math.max(...this.lineWidths),u=this.top+c,d=$t(t.align,d,this.right-f);else{const p=this.columnSizes.reduce((m,y)=>Math.max(m,y.height),0);u=c+$t(t.align,this.top,this.bottom-p-t.labels.padding-this._computeTitleHeight())}const h=$t(o,d,d+f);s.textAlign=A.textAlign(Rg(o)),s.textBaseline="middle",s.strokeStyle=n.color,s.fillStyle=n.color,s.font=r.string,OA(s,n.text,h,u,r)}_computeTitleHeight(){const t=this.options.title,n=ft(t.font),r=_t(t.padding);return t.display?n.lineHeight+r.height:0}_getLegendItemAt(t,n){let r,a,A;if($r(t,this.left,this.right)&&$r(n,this.top,this.bottom)){for(A=this.legendHitBoxes,r=0;r<A.length;++r)if(a=A[r],$r(t,a.left,a.left+a.width)&&$r(n,a.top,a.top+a.height))return this.legendItems[r]}return null}handleEvent(t){const n=this.options;if(!m9(t.type,n))return;const r=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const a=this._hoveredItem,A=f9(a,r);a&&!A&&He(n.onLeave,[t,a,this],this),this._hoveredItem=r,r&&!A&&He(n.onHover,[t,r,this],this)}else r&&He(n.onClick,[t,r,this],this)}}function h9(e,t,n,r,a){const A=p9(r,e,t,n),s=g9(a,r,t.lineHeight);return{itemWidth:A,itemHeight:s}}function p9(e,t,n,r){let a=e.text;return a&&typeof a!="string"&&(a=a.reduce((A,s)=>A.length>s.length?A:s)),t+n.size/2+r.measureText(a).width}function g9(e,t,n){let r=e;return typeof t.text!="string"&&(r=m_(t,n)),r}function m_(e,t){const n=e.text?e.text.length+.5:0;return t*n}function m9(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var v9={id:"legend",_element:fB,start(e,t,n){const r=e.legend=new fB({ctx:e.ctx,options:n,chart:e});Gt.configure(e,r,n),Gt.addBox(e,r)},stop(e){Gt.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const r=e.legend;Gt.configure(e,r,n),r.options=n},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){const r=t.datasetIndex,a=n.chart;a.isDatasetVisible(r)?(a.hide(r),t.hidden=!0):(a.show(r),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:a,color:A,useBorderRadius:s,borderRadius:o}}=e.legend.options;return e._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(n?0:void 0),u=_t(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:A,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:c.borderColor,pointStyle:r||c.pointStyle,rotation:c.rotation,textAlign:a||c.textAlign,borderRadius:s&&(o||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};class Xg extends an{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n){const r=this.options;if(this.left=0,this.top=0,!r.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=n;const a=Oe(r.text)?r.text.length:1;this._padding=_t(r.padding);const A=a*ft(r.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=A:this.width=A}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:n,left:r,bottom:a,right:A,options:s}=this,o=s.align;let l=0,c,u,d;return this.isHorizontal()?(u=$t(o,r,A),d=n+t,c=A-r):(s.position==="left"?(u=r+t,d=$t(o,a,n),l=Qe*-.5):(u=A-t,d=$t(o,n,a),l=Qe*.5),c=a-n),{titleX:u,titleY:d,maxWidth:c,rotation:l}}draw(){const t=this.ctx,n=this.options;if(!n.display)return;const r=ft(n.font),A=r.lineHeight/2+this._padding.top,{titleX:s,titleY:o,maxWidth:l,rotation:c}=this._drawArgs(A);OA(t,n.text,0,0,r,{color:n.color,maxWidth:l,rotation:c,textAlign:Rg(n.align),textBaseline:"middle",translation:[s,o]})}}function B9(e,t){const n=new Xg({ctx:e.ctx,options:t,chart:e});Gt.configure(e,n,t),Gt.addBox(e,n),e.titleBlock=n}var y9={id:"title",_element:Xg,start(e,t,n){B9(e,n)},stop(e){const t=e.titleBlock;Gt.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){const r=e.titleBlock;Gt.configure(e,r,n),r.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 jl=new WeakMap;var w9={id:"subtitle",start(e,t,n){const r=new Xg({ctx:e.ctx,options:n,chart:e});Gt.configure(e,r,n),Gt.addBox(e,r),jl.set(e,r)},stop(e){Gt.removeBox(e,jl.get(e)),jl.delete(e)},beforeUpdate(e,t,n){const r=jl.get(e);Gt.configure(e,r,n),r.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 Ii={average(e){if(!e.length)return!1;let t,n,r=0,a=0,A=0;for(t=0,n=e.length;t<n;++t){const s=e[t].element;if(s&&s.hasValue()){const o=s.tooltipPosition();r+=o.x,a+=o.y,++A}}return{x:r/A,y:a/A}},nearest(e,t){if(!e.length)return!1;let n=t.x,r=t.y,a=Number.POSITIVE_INFINITY,A,s,o;for(A=0,s=e.length;A<s;++A){const l=e[A].element;if(l&&l.hasValue()){const c=l.getCenterPoint(),u=Hs(t,c);u<a&&(a=u,o=l)}}if(o){const l=o.tooltipPosition();n=l.x,r=l.y}return{x:n,y:r}}};function lr(e,t){return t&&(Oe(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function Nr(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
|
|
826
826
|
`)>-1?e.split(`
|
|
827
|
-
`):e}function b9(e,t){const{element:n,datasetIndex:r,index:a}=t,A=e.getDatasetMeta(r).controller,{label:s,value:o}=A.getLabelAndValue(a);return{chart:e,label:s,parsed:A.getParsed(a),raw:e.data.datasets[r].data[a],formattedValue:o,dataset:A.getDataset(),dataIndex:a,datasetIndex:r,element:n}}function hB(e,t){const n=e.chart.ctx,{body:r,footer:a,title:A}=e,{boxWidth:s,boxHeight:o}=t,l=ft(t.bodyFont),c=ft(t.titleFont),u=ft(t.footerFont),d=A.length,f=a.length,h=r.length,p=_t(t.padding);let m=p.height,y=0,g=r.reduce((B,b)=>B+b.before.length+b.lines.length+b.after.length,0);if(g+=e.beforeBody.length+e.afterBody.length,d&&(m+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),g){const B=t.displayColors?Math.max(o,l.lineHeight):l.lineHeight;m+=h*B+(g-h)*l.lineHeight+(g-1)*t.bodySpacing}f&&(m+=t.footerMarginTop+f*u.lineHeight+(f-1)*t.footerSpacing);let v=0;const _=function(B){y=Math.max(y,n.measureText(B).width+v)};return n.save(),n.font=c.string,Ve(e.title,_),n.font=l.string,Ve(e.beforeBody.concat(e.afterBody),_),v=t.displayColors?s+2+t.boxPadding:0,Ve(r,B=>{Ve(B.before,_),Ve(B.lines,_),Ve(B.after,_)}),v=0,n.font=u.string,Ve(e.footer,_),n.restore(),y+=p.width,{width:y,height:m}}function _9(e,t){const{y:n,height:r}=t;return n<r/2?"top":n>e.height-r/2?"bottom":"center"}function C9(e,t,n,r){const{x:a,width:A}=r,s=n.caretSize+n.caretPadding;if(e==="left"&&a+A+s>t.width||e==="right"&&a-A-s<0)return!0}function E9(e,t,n,r){const{x:a,width:A}=n,{width:s,chartArea:{left:o,right:l}}=e;let c="center";return r==="center"?c=a<=(o+l)/2?"left":"right":a<=A/2?c="left":a>=s-A/2&&(c="right"),C9(c,e,t,n)&&(c="center"),c}function pB(e,t,n){const r=n.yAlign||t.yAlign||_9(e,n);return{xAlign:n.xAlign||t.xAlign||E9(e,t,n,r),yAlign:r}}function k9(e,t){let{x:n,width:r}=e;return t==="right"?n-=r:t==="center"&&(n-=r/2),n}function S9(e,t,n){let{y:r,height:a}=e;return t==="top"?r+=n:t==="bottom"?r-=a+n:r-=a/2,r}function gB(e,t,n,r){const{caretSize:a,caretPadding:A,cornerRadius:s}=e,{xAlign:o,yAlign:l}=n,c=a+A,{topLeft:u,topRight:d,bottomLeft:f,bottomRight:h}=Da(s);let p=k9(t,o);const m=S9(t,l,c);return l==="center"?o==="left"?p+=c:o==="right"&&(p-=c):o==="left"?p-=Math.max(u,f)+a:o==="right"&&(p+=Math.max(d,h)+a),{x:Mt(p,0,r.width-t.width),y:Mt(m,0,r.height-t.height)}}function Yl(e,t,n){const r=_t(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function mB(e){return lr([],Nr(e))}function x9(e,t,n){return rA(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function vB(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const v_={beforeTitle:Qr,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex<r)return n[t.dataIndex]}return""},afterTitle:Qr,beforeBody:Qr,beforeLabel:Qr,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const n=e.formattedValue;return _e(n)||(t+=n),t},labelColor(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.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(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:Qr,afterBody:Qr,beforeFooter:Qr,footer:Qr,afterFooter:Qr};function sn(e,t,n,r){const a=e[t].call(n,r);return typeof a>"u"?v_[t].call(n,r):a}class Vh extends an{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const n=this.chart,r=this.options.setContext(this.getContext()),a=r.enabled&&n.options.animation&&r.animations,A=new jg(this.chart,a);return a._cacheable&&(this._cachedAnimations=Object.freeze(A)),A}getContext(){return this.$context||(this.$context=x9(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:r}=n,a=sn(r,"beforeTitle",this,t),A=sn(r,"title",this,t),s=sn(r,"afterTitle",this,t);let o=[];return o=lr(o,Nr(a)),o=lr(o,Nr(A)),o=lr(o,Nr(s)),o}getBeforeBody(t,n){return mB(sn(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:r}=n,a=[];return Ve(t,A=>{const s={before:[],lines:[],after:[]},o=vB(r,A);lr(s.before,Nr(sn(o,"beforeLabel",this,A))),lr(s.lines,sn(o,"label",this,A)),lr(s.after,Nr(sn(o,"afterLabel",this,A))),a.push(s)}),a}getAfterBody(t,n){return mB(sn(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:r}=n,a=sn(r,"beforeFooter",this,t),A=sn(r,"footer",this,t),s=sn(r,"afterFooter",this,t);let o=[];return o=lr(o,Nr(a)),o=lr(o,Nr(A)),o=lr(o,Nr(s)),o}_createItems(t){const n=this._active,r=this.chart.data,a=[],A=[],s=[];let o=[],l,c;for(l=0,c=n.length;l<c;++l)o.push(b9(this.chart,n[l]));return t.filter&&(o=o.filter((u,d,f)=>t.filter(u,d,f,r))),t.itemSort&&(o=o.sort((u,d)=>t.itemSort(u,d,r))),Ve(o,u=>{const d=vB(t.callbacks,u);a.push(sn(d,"labelColor",this,u)),A.push(sn(d,"labelPointStyle",this,u)),s.push(sn(d,"labelTextColor",this,u))}),this.labelColors=a,this.labelPointStyles=A,this.labelTextColors=s,this.dataPoints=o,o}update(t,n){const r=this.options.setContext(this.getContext()),a=this._active;let A,s=[];if(!a.length)this.opacity!==0&&(A={opacity:0});else{const o=Ii[r.position].call(this,a,this._eventPosition);s=this._createItems(r),this.title=this.getTitle(s,r),this.beforeBody=this.getBeforeBody(s,r),this.body=this.getBody(s,r),this.afterBody=this.getAfterBody(s,r),this.footer=this.getFooter(s,r);const l=this._size=hB(this,r),c=Object.assign({},o,l),u=pB(this.chart,r,c),d=gB(r,c,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,A={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:o.x,caretY:o.y}}this._tooltipItems=s,this.$context=void 0,A&&this._resolveAnimations().update(this,A),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,r,a){const A=this.getCaretPosition(t,r,a);n.lineTo(A.x1,A.y1),n.lineTo(A.x2,A.y2),n.lineTo(A.x3,A.y3)}getCaretPosition(t,n,r){const{xAlign:a,yAlign:A}=this,{caretSize:s,cornerRadius:o}=r,{topLeft:l,topRight:c,bottomLeft:u,bottomRight:d}=Da(o),{x:f,y:h}=t,{width:p,height:m}=n;let y,g,v,_,B,b;return A==="center"?(B=h+m/2,a==="left"?(y=f,g=y-s,_=B+s,b=B-s):(y=f+p,g=y+s,_=B-s,b=B+s),v=y):(a==="left"?g=f+Math.max(l,u)+s:a==="right"?g=f+p-Math.max(c,d)-s:g=this.caretX,A==="top"?(_=h,B=_-s,y=g-s,v=g+s):(_=h+m,B=_+s,y=g+s,v=g-s),b=_),{x1:y,x2:g,x3:v,y1:_,y2:B,y3:b}}drawTitle(t,n,r){const a=this.title,A=a.length;let s,o,l;if(A){const c=Cs(r.rtl,this.x,this.width);for(t.x=Yl(this,r.titleAlign,r),n.textAlign=c.textAlign(r.titleAlign),n.textBaseline="middle",s=ft(r.titleFont),o=r.titleSpacing,n.fillStyle=r.titleColor,n.font=s.string,l=0;l<A;++l)n.fillText(a[l],c.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+o,l+1===A&&(t.y+=r.titleMarginBottom-o)}}_drawColorBox(t,n,r,a,A){const s=this.labelColors[r],o=this.labelPointStyles[r],{boxHeight:l,boxWidth:c}=A,u=ft(A.bodyFont),d=Yl(this,"left",A),f=a.x(d),h=l<u.lineHeight?(u.lineHeight-l)/2:0,p=n.y+h;if(A.usePointStyle){const m={radius:Math.min(c,l)/2,pointStyle:o.pointStyle,rotation:o.rotation,borderWidth:1},y=a.leftForLtr(f,c)+c/2,g=p+l/2;t.strokeStyle=A.multiKeyBackground,t.fillStyle=A.multiKeyBackground,Lh(t,m,y,g),t.strokeStyle=s.borderColor,t.fillStyle=s.backgroundColor,Lh(t,m,y,g)}else{t.lineWidth=ve(s.borderWidth)?Math.max(...Object.values(s.borderWidth)):s.borderWidth||1,t.strokeStyle=s.borderColor,t.setLineDash(s.borderDash||[]),t.lineDashOffset=s.borderDashOffset||0;const m=a.leftForLtr(f,c),y=a.leftForLtr(a.xPlus(f,1),c-2),g=Da(s.borderRadius);Object.values(g).some(v=>v!==0)?(t.beginPath(),t.fillStyle=A.multiKeyBackground,Rs(t,{x:m,y:p,w:c,h:l,radius:g}),t.fill(),t.stroke(),t.fillStyle=s.backgroundColor,t.beginPath(),Rs(t,{x:y,y:p+1,w:c-2,h:l-2,radius:g}),t.fill()):(t.fillStyle=A.multiKeyBackground,t.fillRect(m,p,c,l),t.strokeRect(m,p,c,l),t.fillStyle=s.backgroundColor,t.fillRect(y,p+1,c-2,l-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,n,r){const{body:a}=this,{bodySpacing:A,bodyAlign:s,displayColors:o,boxHeight:l,boxWidth:c,boxPadding:u}=r,d=ft(r.bodyFont);let f=d.lineHeight,h=0;const p=Cs(r.rtl,this.x,this.width),m=function(k){n.fillText(k,p.x(t.x+h),t.y+f/2),t.y+=f+A},y=p.textAlign(s);let g,v,_,B,b,w,C;for(n.textAlign=s,n.textBaseline="middle",n.font=d.string,t.x=Yl(this,y,r),n.fillStyle=r.bodyColor,Ve(this.beforeBody,m),h=o&&y!=="right"?s==="center"?c/2+u:c+2+u:0,B=0,w=a.length;B<w;++B){for(g=a[B],v=this.labelTextColors[B],n.fillStyle=v,Ve(g.before,m),_=g.lines,o&&_.length&&(this._drawColorBox(n,t,B,p,r),f=Math.max(d.lineHeight,l)),b=0,C=_.length;b<C;++b)m(_[b]),f=d.lineHeight;Ve(g.after,m)}h=0,f=d.lineHeight,Ve(this.afterBody,m),t.y-=A}drawFooter(t,n,r){const a=this.footer,A=a.length;let s,o;if(A){const l=Cs(r.rtl,this.x,this.width);for(t.x=Yl(this,r.footerAlign,r),t.y+=r.footerMarginTop,n.textAlign=l.textAlign(r.footerAlign),n.textBaseline="middle",s=ft(r.footerFont),n.fillStyle=r.footerColor,n.font=s.string,o=0;o<A;++o)n.fillText(a[o],l.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+r.footerSpacing}}drawBackground(t,n,r,a){const{xAlign:A,yAlign:s}=this,{x:o,y:l}=t,{width:c,height:u}=r,{topLeft:d,topRight:f,bottomLeft:h,bottomRight:p}=Da(a.cornerRadius);n.fillStyle=a.backgroundColor,n.strokeStyle=a.borderColor,n.lineWidth=a.borderWidth,n.beginPath(),n.moveTo(o+d,l),s==="top"&&this.drawCaret(t,n,r,a),n.lineTo(o+c-f,l),n.quadraticCurveTo(o+c,l,o+c,l+f),s==="center"&&A==="right"&&this.drawCaret(t,n,r,a),n.lineTo(o+c,l+u-p),n.quadraticCurveTo(o+c,l+u,o+c-p,l+u),s==="bottom"&&this.drawCaret(t,n,r,a),n.lineTo(o+h,l+u),n.quadraticCurveTo(o,l+u,o,l+u-h),s==="center"&&A==="left"&&this.drawCaret(t,n,r,a),n.lineTo(o,l+d),n.quadraticCurveTo(o,l,o+d,l),n.closePath(),n.fill(),a.borderWidth>0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,r=this.$animations,a=r&&r.x,A=r&&r.y;if(a||A){const s=Ii[t.position].call(this,this._active,this._eventPosition);if(!s)return;const o=this._size=hB(this,t),l=Object.assign({},s,this._size),c=pB(n,t,l),u=gB(t,l,c,n);(a._to!==u.x||A._to!==u.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=o.width,this.height=o.height,this.caretX=s.x,this.caretY=s.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(n);const a={width:this.width,height:this.height},A={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const s=_t(n.padding),o=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&o&&(t.save(),t.globalAlpha=r,this.drawBackground(A,t,a,n),Gb(t,n.textDirection),A.y+=s.top,this.drawTitle(A,t,n),this.drawBody(A,t,n),this.drawFooter(A,t,n),zb(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const r=this._active,a=t.map(({datasetIndex:o,index:l})=>{const c=this.chart.getDatasetMeta(o);if(!c)throw new Error("Cannot find a dataset at index "+o);return{datasetIndex:o,element:c.data[l],index:l}}),A=!iu(r,a),s=this._positionChanged(a,n);(A||s)&&(this._active=a,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const a=this.options,A=this._active||[],s=this._getActiveElements(t,A,n,r),o=this._positionChanged(s,t),l=n||!iu(s,A)||o;return l&&(this._active=s,(a.enabled||a.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),l}_getActiveElements(t,n,r,a){const A=this.options;if(t.type==="mouseout")return[];if(!a)return n;const s=this.chart.getElementsAtEventForMode(t,A.mode,A,r);return A.reverse&&s.reverse(),s}_positionChanged(t,n){const{caretX:r,caretY:a,options:A}=this,s=Ii[A.position].call(this,t,n);return s!==!1&&(r!==s.x||a!==s.y)}}R(Vh,"positioners",Ii);var F9={id:"tooltip",_element:Vh,positioners:Ii,afterInit(e,t,n){n&&(e.tooltip=new Vh({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const n={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){const n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:v_},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},I9=Object.freeze({__proto__:null,Colors:V7,Decimation:G7,Filler:d9,Legend:v9,SubTitle:w9,Title:y9,Tooltip:F9});const U9=(e,t,n,r)=>(typeof t=="string"?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function Q9(e,t,n,r){const a=e.indexOf(t);if(a===-1)return U9(e,t,n,r);const A=e.lastIndexOf(t);return a!==A?n:a}const T9=(e,t)=>e===null?null:Mt(Math.round(e),0,t);function BB(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class Kh extends $A{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const n=this._addedLabels;if(n.length){const r=this.getLabels();for(const{index:a,label:A}of n)r[a]===A&&r.splice(a,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(_e(t))return null;const r=this.getLabels();return n=isFinite(n)&&r[n]===t?n:Q9(r,t,de(n,t),this._addedLabels),T9(n,r.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:r,max:a}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(r=0),n||(a=this.getLabels().length-1)),this.min=r,this.max=a}buildTicks(){const t=this.min,n=this.max,r=this.options.offset,a=[];let A=this.getLabels();A=t===0&&n===A.length-1?A:A.slice(t,n+1),this._valueRange=Math.max(A.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let s=t;s<=n;s++)a.push({value:s});return a}getLabelForValue(t){return BB.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}R(Kh,"id","category"),R(Kh,"defaults",{ticks:{callback:BB}});function D9(e,t){const n=[],{bounds:a,step:A,min:s,max:o,precision:l,count:c,maxTicks:u,maxDigits:d,includeBounds:f}=e,h=A||1,p=u-1,{min:m,max:y}=t,g=!_e(s),v=!_e(o),_=!_e(c),B=(y-m)/(d+1);let b=fv((y-m)/p/h)*h,w,C,k,S;if(b<1e-14&&!g&&!v)return[{value:m},{value:y}];S=Math.ceil(y/b)-Math.floor(m/b),S>p&&(b=fv(S*b/p/h)*h),_e(l)||(w=Math.pow(10,l),b=Math.ceil(b*w)/w),a==="ticks"?(C=Math.floor(m/b)*b,k=Math.ceil(y/b)*b):(C=m,k=y),g&&v&&A&&FL((o-s)/A,b/1e3)?(S=Math.round(Math.min((o-s)/b,u)),b=(o-s)/S,C=s,k=o):_?(C=g?s:C,k=v?o:k,S=c-1,b=(k-C)/S):(S=(k-C)/b,Yi(S,Math.round(S),b/1e3)?S=Math.round(S):S=Math.ceil(S));const T=Math.max(hv(b),hv(C));w=Math.pow(10,_e(l)?T:l),C=Math.round(C*w)/w,k=Math.round(k*w)/w;let U=0;for(g&&(f&&C!==s?(n.push({value:s}),C<s&&U++,Yi(Math.round((C+U*b)*w)/w,s,yB(s,B,e))&&U++):C<s&&U++);U<S;++U){const F=Math.round((C+U*b)*w)/w;if(v&&F>o)break;n.push({value:F})}return v&&f&&k!==o?n.length&&Yi(n[n.length-1].value,o,yB(o,B,e))?n[n.length-1].value=o:n.push({value:o}):(!v||k===o)&&n.push({value:k}),n}function yB(e,t,{horizontal:n,minRotation:r}){const a=Et(r),A=(n?Math.sin(a):Math.cos(a))||.001,s=.75*t*(""+e).length;return Math.min(t/A,s)}class pu extends $A{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,n){return _e(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:r}=this.getUserBounds();let{min:a,max:A}=this;const s=l=>a=n?a:l,o=l=>A=r?A:l;if(t){const l=vr(a),c=vr(A);l<0&&c<0?o(0):l>0&&c>0&&s(0)}if(a===A){let l=A===0?1:Math.abs(A*.05);o(A+l),t||s(a-l)}this.min=a,this.max=A}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:r}=t,a;return r?(a=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,a>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${a} ticks. Limiting to 1000.`),a=1e3)):(a=this.computeTickLimit(),n=n||11),n&&(a=Math.min(n,a)),a}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=t.ticks;let r=this.getTickLimit();r=Math.max(2,r);const a={maxTicks:r,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},A=this._range||this,s=D9(a,A);return t.bounds==="ticks"&&xb(s,this,"value"),t.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}configure(){const t=this.ticks;let n=this.min,r=this.max;if(super.configure(),this.options.offset&&t.length){const a=(r-n)/Math.max(t.length-1,1)/2;n-=a,r+=a}this._startValue=n,this._endValue=r,this._valueRange=r-n}getLabelForValue(t){return el(t,this.chart.options.locale,this.options.ticks.format)}}class $h extends pu{determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=ut(t)?t:0,this.max=ut(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,r=Et(this.options.ticks.minRotation),a=(t?Math.sin(r):Math.cos(r))||.001,A=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,A.lineHeight/a))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}R($h,"id","linear"),R($h,"defaults",{ticks:{callback:td.formatters.numeric}});const Fo=e=>Math.floor(Ea(e)),oA=(e,t)=>Math.pow(10,Fo(e)+t);function wB(e){return e/Math.pow(10,Fo(e))===1}function bB(e,t,n){const r=Math.pow(10,n),a=Math.floor(e/r);return Math.ceil(t/r)-a}function L9(e,t){const n=t-e;let r=Fo(n);for(;bB(e,t,r)>10;)r++;for(;bB(e,t,r)<10;)r--;return Math.min(r,Fo(e))}function O9(e,{min:t,max:n}){t=wn(e.min,t);const r=[],a=Fo(t);let A=L9(t,n),s=A<0?Math.pow(10,Math.abs(A)):1;const o=Math.pow(10,A),l=a>A?Math.pow(10,a):0,c=Math.round((t-l)*s)/s,u=Math.floor((t-l)/o/10)*o*10;let d=Math.floor((c-u)/Math.pow(10,A)),f=wn(e.min,Math.round((l+u+d*Math.pow(10,A))*s)/s);for(;f<n;)r.push({value:f,major:wB(f),significand:d}),d>=10?d=d<15?15:20:d++,d>=20&&(A++,d=2,s=A>=0?1:s),f=Math.round((l+u+d*Math.pow(10,A))*s)/s;const h=wn(e.max,f);return r.push({value:h,major:wB(h),significand:d}),r}class Wh extends $A{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,n){const r=pu.prototype.parse.apply(this,[t,n]);if(r===0){this._zero=!0;return}return ut(r)&&r>0?r:null}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=ut(t)?Math.max(0,t):null,this.max=ut(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!ut(this._userMin)&&(this.min=t===oA(this.min,0)?oA(this.min,-1):oA(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let r=this.min,a=this.max;const A=o=>r=t?r:o,s=o=>a=n?a:o;r===a&&(r<=0?(A(1),s(10)):(A(oA(r,-1)),s(oA(a,1)))),r<=0&&A(oA(a,-1)),a<=0&&s(oA(r,1)),this.min=r,this.max=a}buildTicks(){const t=this.options,n={min:this._userMin,max:this._userMax},r=O9(n,this);return t.bounds==="ticks"&&xb(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}getLabelForValue(t){return t===void 0?"0":el(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=Ea(t),this._valueRange=Ea(this.max)-Ea(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(Ea(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const n=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+n*this._valueRange)}}R(Wh,"id","logarithmic"),R(Wh,"defaults",{ticks:{callback:td.formatters.logarithmic,major:{enabled:!0}}});function Gh(e){const t=e.ticks;if(t.display&&e.display){const n=_t(t.backdropPadding);return de(t.font&&t.font.size,dt.font.size)+n.height}return 0}function M9(e,t,n){return n=Oe(n)?n:[n],{w:GL(e,t.string,n),h:n.length*t.lineHeight}}function _B(e,t,n,r,a){return e===r||e===a?{start:t-n/2,end:t+n/2}:e<r||e>a?{start:t-n,end:t}:{start:t,end:t+n}}function N9(e){const t={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},n=Object.assign({},t),r=[],a=[],A=e._pointLabels.length,s=e.options.pointLabels,o=s.centerPointLabels?Qe/A:0;for(let l=0;l<A;l++){const c=s.setContext(e.getPointLabelContext(l));a[l]=c.padding;const u=e.getPointPosition(l,e.drawingArea+a[l],o),d=ft(c.font),f=M9(e.ctx,d,e._pointLabels[l]);r[l]=f;const h=_n(e.getIndexAngle(l)+o),p=Math.round(ed(h)),m=_B(p,u.x,f.w,0,180),y=_B(p,u.y,f.h,90,270);P9(n,t,h,m,y)}e.setCenterPoint(t.l-n.l,n.r-t.r,t.t-n.t,n.b-t.b),e._pointLabelItems=V9(e,r,a)}function P9(e,t,n,r,a){const A=Math.abs(Math.sin(n)),s=Math.abs(Math.cos(n));let o=0,l=0;r.start<t.l?(o=(t.l-r.start)/A,e.l=Math.min(e.l,t.l-o)):r.end>t.r&&(o=(r.end-t.r)/A,e.r=Math.max(e.r,t.r+o)),a.start<t.t?(l=(t.t-a.start)/s,e.t=Math.min(e.t,t.t-l)):a.end>t.b&&(l=(a.end-t.b)/s,e.b=Math.max(e.b,t.b+l))}function H9(e,t,n){const r=e.drawingArea,{extra:a,additionalAngle:A,padding:s,size:o}=n,l=e.getPointPosition(t,r+a+s,A),c=Math.round(ed(_n(l.angle+Je))),u=W9(l.y,o.h,c),d=K9(c),f=$9(l.x,o.w,d);return{visible:!0,x:l.x,y:u,textAlign:d,left:f,top:u,right:f+o.w,bottom:u+o.h}}function R9(e,t){if(!t)return!0;const{left:n,top:r,right:a,bottom:A}=e;return!(Gr({x:n,y:r},t)||Gr({x:n,y:A},t)||Gr({x:a,y:r},t)||Gr({x:a,y:A},t))}function V9(e,t,n){const r=[],a=e._pointLabels.length,A=e.options,{centerPointLabels:s,display:o}=A.pointLabels,l={extra:Gh(A)/2,additionalAngle:s?Qe/a:0};let c;for(let u=0;u<a;u++){l.padding=n[u],l.size=t[u];const d=H9(e,u,l);r.push(d),o==="auto"&&(d.visible=R9(d,c),d.visible&&(c=d))}return r}function K9(e){return e===0||e===180?"center":e<180?"left":"right"}function $9(e,t,n){return n==="right"?e-=t:n==="center"&&(e-=t/2),e}function W9(e,t,n){return n===90||n===270?e-=t/2:(n>270||n<90)&&(e-=t),e}function G9(e,t,n){const{left:r,top:a,right:A,bottom:s}=n,{backdropColor:o}=t;if(!_e(o)){const l=Da(t.borderRadius),c=_t(t.backdropPadding);e.fillStyle=o;const u=r-c.left,d=a-c.top,f=A-r+c.width,h=s-a+c.height;Object.values(l).some(p=>p!==0)?(e.beginPath(),Rs(e,{x:u,y:d,w:f,h,radius:l}),e.fill()):e.fillRect(u,d,f,h)}}function z9(e,t){const{ctx:n,options:{pointLabels:r}}=e;for(let a=t-1;a>=0;a--){const A=e._pointLabelItems[a];if(!A.visible)continue;const s=r.setContext(e.getPointLabelContext(a));G9(n,s,A);const o=ft(s.font),{x:l,y:c,textAlign:u}=A;OA(n,e._pointLabels[a],l,c+o.lineHeight/2,o,{color:s.color,textAlign:u,textBaseline:"middle"})}}function B_(e,t,n,r){const{ctx:a}=e;if(n)a.arc(e.xCenter,e.yCenter,t,0,Xe);else{let A=e.getPointPosition(0,t);a.moveTo(A.x,A.y);for(let s=1;s<r;s++)A=e.getPointPosition(s,t),a.lineTo(A.x,A.y)}}function j9(e,t,n,r,a){const A=e.ctx,s=t.circular,{color:o,lineWidth:l}=t;!s&&!r||!o||!l||n<0||(A.save(),A.strokeStyle=o,A.lineWidth=l,A.setLineDash(a.dash),A.lineDashOffset=a.dashOffset,A.beginPath(),B_(e,n,s,r),A.closePath(),A.stroke(),A.restore())}function Y9(e,t,n){return rA(e,{label:n,index:t,type:"pointLabel"})}class Ui extends pu{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=_t(Gh(this.options)/2),n=this.width=this.maxWidth-t.width,r=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+n/2+t.left),this.yCenter=Math.floor(this.top+r/2+t.top),this.drawingArea=Math.floor(Math.min(n,r)/2)}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!1);this.min=ut(t)&&!isNaN(t)?t:0,this.max=ut(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Gh(this.options))}generateTickLabels(t){pu.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((n,r)=>{const a=He(this.options.pointLabels.callback,[n,r],this);return a||a===0?a:""}).filter((n,r)=>this.chart.getDataVisibility(r))}fit(){const t=this.options;t.display&&t.pointLabels.display?N9(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,n,r,a){this.xCenter+=Math.floor((t-n)/2),this.yCenter+=Math.floor((r-a)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,n,r,a))}getIndexAngle(t){const n=Xe/(this._pointLabels.length||1),r=this.options.startAngle||0;return _n(t*n+Et(r))}getDistanceFromCenterForValue(t){if(_e(t))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*n:(t-this.min)*n}getValueForDistanceFromCenter(t){if(_e(t))return NaN;const n=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(t){const n=this._pointLabels||[];if(t>=0&&t<n.length){const r=n[t];return Y9(this.getContext(),t,r)}}getPointPosition(t,n,r=0){const a=this.getIndexAngle(t)-Je+r;return{x:Math.cos(a)*n+this.xCenter,y:Math.sin(a)*n+this.yCenter,angle:a}}getPointPositionForValue(t,n){return this.getPointPosition(t,this.getDistanceFromCenterForValue(n))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:n,top:r,right:a,bottom:A}=this._pointLabelItems[t];return{left:n,top:r,right:a,bottom:A}}drawBackground(){const{backgroundColor:t,grid:{circular:n}}=this.options;if(t){const r=this.ctx;r.save(),r.beginPath(),B_(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length),r.closePath(),r.fillStyle=t,r.fill(),r.restore()}}drawGrid(){const t=this.ctx,n=this.options,{angleLines:r,grid:a,border:A}=n,s=this._pointLabels.length;let o,l,c;if(n.pointLabels.display&&z9(this,s),a.display&&this.ticks.forEach((u,d)=>{if(d!==0){l=this.getDistanceFromCenterForValue(u.value);const f=this.getContext(d),h=a.setContext(f),p=A.setContext(f);j9(this,h,l,s,p)}}),r.display){for(t.save(),o=s-1;o>=0;o--){const u=r.setContext(this.getPointLabelContext(o)),{color:d,lineWidth:f}=u;!f||!d||(t.lineWidth=f,t.strokeStyle=d,t.setLineDash(u.borderDash),t.lineDashOffset=u.borderDashOffset,l=this.getDistanceFromCenterForValue(n.ticks.reverse?this.min:this.max),c=this.getPointPosition(o,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(c.x,c.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,n=this.options,r=n.ticks;if(!r.display)return;const a=this.getIndexAngle(0);let A,s;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(a),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((o,l)=>{if(l===0&&!n.reverse)return;const c=r.setContext(this.getContext(l)),u=ft(c.font);if(A=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){t.font=u.string,s=t.measureText(o.label).width,t.fillStyle=c.backdropColor;const d=_t(c.backdropPadding);t.fillRect(-s/2-d.left,-A-u.size/2-d.top,s+d.width,u.size+d.height)}OA(t,o.label,0,-A,u,{color:c.color})}),t.restore()}drawTitle(){}}R(Ui,"id","radialLinear"),R(Ui,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:td.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),R(Ui,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),R(Ui,"descriptors",{angleLines:{_fallback:"grid"}});const rd={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}},hn=Object.keys(rd);function q9(e,t){return e-t}function CB(e,t){if(_e(t))return null;const n=e._adapter,{parser:r,round:a,isoWeekday:A}=e._parseOpts;let s=t;return typeof r=="function"&&(s=r(s)),ut(s)||(s=typeof r=="string"?n.parse(s,r):n.parse(s)),s===null?null:(a&&(s=a==="week"&&(za(A)||A===!0)?n.startOf(s,"isoWeek",A):n.startOf(s,a)),+s)}function EB(e,t,n,r){const a=hn.length;for(let A=hn.indexOf(e);A<a-1;++A){const s=rd[hn[A]],o=s.steps?s.steps:Number.MAX_SAFE_INTEGER;if(s.common&&Math.ceil((n-t)/(o*s.size))<=r)return hn[A]}return hn[a-1]}function X9(e,t,n,r,a){for(let A=hn.length-1;A>=hn.indexOf(n);A--){const s=hn[A];if(rd[s].common&&e._adapter.diff(a,r,s)>=t-1)return s}return hn[n?hn.indexOf(n):0]}function J9(e){for(let t=hn.indexOf(e)+1,n=hn.length;t<n;++t)if(rd[hn[t]].common)return hn[t]}function kB(e,t,n){if(!n)e[t]=!0;else if(n.length){const{lo:r,hi:a}=Hg(n,t),A=n[r]>=t?n[r]:n[a];e[A]=!0}}function Z9(e,t,n,r){const a=e._adapter,A=+a.startOf(t[0].value,r),s=t[t.length-1].value;let o,l;for(o=A;o<=s;o=+a.add(o,1,r))l=n[o],l>=0&&(t[l].major=!0);return t}function SB(e,t,n){const r=[],a={},A=t.length;let s,o;for(s=0;s<A;++s)o=t[s],a[o]=s,r.push({value:o,major:!1});return A===0||!n?r:Z9(e,r,a,n)}class Io extends $A{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,n={}){const r=t.time||(t.time={}),a=this._adapter=new Zb._date(t.adapters.date);a.init(n),ji(r.displayFormats,a.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return t===void 0?null:CB(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,n=this._adapter,r=t.time.unit||"day";let{min:a,max:A,minDefined:s,maxDefined:o}=this.getUserBounds();function l(c){!s&&!isNaN(c.min)&&(a=Math.min(a,c.min)),!o&&!isNaN(c.max)&&(A=Math.max(A,c.max))}(!s||!o)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),a=ut(a)&&!isNaN(a)?a:+n.startOf(Date.now(),r),A=ut(A)&&!isNaN(A)?A:+n.endOf(Date.now(),r)+1,this.min=Math.min(a,A-1),this.max=Math.max(a+1,A)}_getLabelBounds(){const t=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],r=t[t.length-1]),{min:n,max:r}}buildTicks(){const t=this.options,n=t.time,r=t.ticks,a=r.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&a.length&&(this.min=this._userMin||a[0],this.max=this._userMax||a[a.length-1]);const A=this.min,s=this.max,o=TL(a,A,s);return this._unit=n.unit||(r.autoSkip?EB(n.minUnit,this.min,this.max,this._getLabelCapacity(A)):X9(this,o.length,n.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:J9(this._unit),this.initOffsets(a),t.reverse&&o.reverse(),SB(this,o,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let n=0,r=0,a,A;this.options.offset&&t.length&&(a=this.getDecimalForValue(t[0]),t.length===1?n=1-a:n=(this.getDecimalForValue(t[1])-a)/2,A=this.getDecimalForValue(t[t.length-1]),t.length===1?r=A:r=(A-this.getDecimalForValue(t[t.length-2]))/2);const s=t.length<3?.5:.25;n=Mt(n,0,s),r=Mt(r,0,s),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const t=this._adapter,n=this.min,r=this.max,a=this.options,A=a.time,s=A.unit||EB(A.minUnit,n,r,this._getLabelCapacity(n)),o=de(a.ticks.stepSize,1),l=s==="week"?A.isoWeekday:!1,c=za(l)||l===!0,u={};let d=n,f,h;if(c&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,c?"day":s),t.diff(r,n,s)>1e5*o)throw new Error(n+" and "+r+" are too far apart with stepSize of "+o+" "+s);const p=a.ticks.source==="data"&&this.getDataTimestamps();for(f=d,h=0;f<r;f=+t.add(f,o,s),h++)kB(u,f,p);return(f===r||a.bounds==="ticks"||h===1)&&kB(u,f,p),Object.keys(u).sort((m,y)=>m-y).map(m=>+m)}getLabelForValue(t){const n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(t,r.tooltipFormat):n.format(t,r.displayFormats.datetime)}format(t,n){const a=this.options.time.displayFormats,A=this._unit,s=n||a[A];return this._adapter.format(t,s)}_tickFormatFunction(t,n,r,a){const A=this.options,s=A.ticks.callback;if(s)return He(s,[t,n,r],this);const o=A.time.displayFormats,l=this._unit,c=this._majorUnit,u=l&&o[l],d=c&&o[c],f=r[n],h=c&&d&&f&&f.major;return this._adapter.format(t,a||(h?d:u))}generateTickLabels(t){let n,r,a;for(n=0,r=t.length;n<r;++n)a=t[n],a.label=this._tickFormatFunction(a.value,n,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const n=this._offsets,r=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+r)*n.factor)}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+r*(this.max-this.min)}_getLabelSize(t){const n=this.options.ticks,r=this.ctx.measureText(t).width,a=Et(this.isHorizontal()?n.maxRotation:n.minRotation),A=Math.cos(a),s=Math.sin(a),o=this._resolveTickFontOptions(0).size;return{w:r*A+o*s,h:r*s+o*A}}_getLabelCapacity(t){const n=this.options.time,r=n.displayFormats,a=r[n.unit]||r.millisecond,A=this._tickFormatFunction(t,0,SB(this,[t],this._majorUnit),a),s=this._getLabelSize(A),o=Math.floor(this.isHorizontal()?this.width/s.w:this.height/s.h)-1;return o>0?o:1}getDataTimestamps(){let t=this._cache.data||[],n,r;if(t.length)return t;const a=this.getMatchingVisibleMetas();if(this._normalized&&a.length)return this._cache.data=a[0].controller.getAllParsedValues(this);for(n=0,r=a.length;n<r;++n)t=t.concat(a[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let n,r;if(t.length)return t;const a=this.getLabels();for(n=0,r=a.length;n<r;++n)t.push(CB(this,a[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return Ub(t.sort(q9))}}R(Io,"id","time"),R(Io,"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 ql(e,t,n){let r=0,a=e.length-1,A,s,o,l;n?(t>=e[r].pos&&t<=e[a].pos&&({lo:r,hi:a}=Wr(e,"pos",t)),{pos:A,time:o}=e[r],{pos:s,time:l}=e[a]):(t>=e[r].time&&t<=e[a].time&&({lo:r,hi:a}=Wr(e,"time",t)),{time:A,pos:o}=e[r],{time:s,pos:l}=e[a]);const c=s-A;return c?o+(l-o)*(t-A)/c:o}class zh extends Io{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=ql(n,this.min),this._tableRange=ql(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:r}=this,a=[],A=[];let s,o,l,c,u;for(s=0,o=t.length;s<o;++s)c=t[s],c>=n&&c<=r&&a.push(c);if(a.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(s=0,o=a.length;s<o;++s)u=a[s+1],l=a[s-1],c=a[s],Math.round((u+l)/2)!==c&&A.push({time:c,pos:s/(o-1)});return A}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),r=this.getLabelTimestamps();return n.length&&r.length?t=this.normalize(n.concat(r)):t=n.length?n:r,t=this._cache.all=t,t}getDecimalForValue(t){return(ql(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return ql(this._table,r*this._tableRange+this._minPos,!0)}}R(zh,"id","timeseries"),R(zh,"defaults",Io.defaults);var eN=Object.freeze({__proto__:null,CategoryScale:Kh,LinearScale:$h,LogarithmicScale:Wh,RadialLinearScale:Ui,TimeScale:Io,TimeSeriesScale:zh});const Cr=[iM,O7,I9,eN];var tN=typeof global=="object"&&global&&global.Object===Object&&global;const y_=tN;var nN=typeof self=="object"&&self&&self.Object===Object&&self,rN=y_||nN||Function("return this")();const Er=rN;var aN=Er.Symbol;const ja=aN;var w_=Object.prototype,AN=w_.hasOwnProperty,sN=w_.toString,vi=ja?ja.toStringTag:void 0;function iN(e){var t=AN.call(e,vi),n=e[vi];try{e[vi]=void 0;var r=!0}catch{}var a=sN.call(e);return r&&(t?e[vi]=n:delete e[vi]),a}var oN=Object.prototype,lN=oN.toString;function cN(e){return lN.call(e)}var uN="[object Null]",dN="[object Undefined]",xB=ja?ja.toStringTag:void 0;function al(e){return e==null?e===void 0?dN:uN:xB&&xB in Object(e)?iN(e):cN(e)}function MA(e){return e!=null&&typeof e=="object"}var fN=Array.isArray;const $s=fN;function Al(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var hN="[object AsyncFunction]",pN="[object Function]",gN="[object GeneratorFunction]",mN="[object Proxy]";function b_(e){if(!Al(e))return!1;var t=al(e);return t==pN||t==gN||t==hN||t==mN}var vN=Er["__core-js_shared__"];const Cf=vN;var FB=function(){var e=/[^.]+$/.exec(Cf&&Cf.keys&&Cf.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function BN(e){return!!FB&&FB in e}var yN=Function.prototype,wN=yN.toString;function WA(e){if(e!=null){try{return wN.call(e)}catch{}try{return e+""}catch{}}return""}var bN=/[\\^$.*+?()[\]{}|]/g,_N=/^\[object .+?Constructor\]$/,CN=Function.prototype,EN=Object.prototype,kN=CN.toString,SN=EN.hasOwnProperty,xN=RegExp("^"+kN.call(SN).replace(bN,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function FN(e){if(!Al(e)||BN(e))return!1;var t=b_(e)?xN:_N;return t.test(WA(e))}function IN(e,t){return e==null?void 0:e[t]}function GA(e,t){var n=IN(e,t);return FN(n)?n:void 0}var UN=GA(Er,"WeakMap");const jh=UN;var IB=Object.create,QN=function(){function e(){}return function(t){if(!Al(t))return{};if(IB)return IB(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();const TN=QN;function DN(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var LN=function(){try{var e=GA(Object,"defineProperty");return e({},"",{}),e}catch{}}();const UB=LN;function ON(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var MN=9007199254740991,NN=/^(?:0|[1-9]\d*)$/;function PN(e,t){var n=typeof e;return t=t??MN,!!t&&(n=="number"||n!="symbol"&&NN.test(e))&&e>-1&&e%1==0&&e<t}function __(e,t,n){t=="__proto__"&&UB?UB(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Jg(e,t){return e===t||e!==e&&t!==t}var HN=Object.prototype,RN=HN.hasOwnProperty;function C_(e,t,n){var r=e[t];(!(RN.call(e,t)&&Jg(r,n))||n===void 0&&!(t in e))&&__(e,t,n)}function ad(e,t,n,r){var a=!n;n||(n={});for(var A=-1,s=t.length;++A<s;){var o=t[A],l=r?r(n[o],e[o],o,n,e):void 0;l===void 0&&(l=e[o]),a?__(n,o,l):C_(n,o,l)}return n}var VN=9007199254740991;function E_(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=VN}function Zg(e){return e!=null&&E_(e.length)&&!b_(e)}var KN=Object.prototype;function Ad(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||KN;return e===n}function $N(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var WN="[object Arguments]";function QB(e){return MA(e)&&al(e)==WN}var k_=Object.prototype,GN=k_.hasOwnProperty,zN=k_.propertyIsEnumerable,jN=QB(function(){return arguments}())?QB:function(e){return MA(e)&&GN.call(e,"callee")&&!zN.call(e,"callee")};const S_=jN;function YN(){return!1}var x_=typeof exports=="object"&&exports&&!exports.nodeType&&exports,TB=x_&&typeof module=="object"&&module&&!module.nodeType&&module,qN=TB&&TB.exports===x_,DB=qN?Er.Buffer:void 0,XN=DB?DB.isBuffer:void 0,JN=XN||YN;const Uo=JN;var ZN="[object Arguments]",eP="[object Array]",tP="[object Boolean]",nP="[object Date]",rP="[object Error]",aP="[object Function]",AP="[object Map]",sP="[object Number]",iP="[object Object]",oP="[object RegExp]",lP="[object Set]",cP="[object String]",uP="[object WeakMap]",dP="[object ArrayBuffer]",fP="[object DataView]",hP="[object Float32Array]",pP="[object Float64Array]",gP="[object Int8Array]",mP="[object Int16Array]",vP="[object Int32Array]",BP="[object Uint8Array]",yP="[object Uint8ClampedArray]",wP="[object Uint16Array]",bP="[object Uint32Array]",nt={};nt[hP]=nt[pP]=nt[gP]=nt[mP]=nt[vP]=nt[BP]=nt[yP]=nt[wP]=nt[bP]=!0;nt[ZN]=nt[eP]=nt[dP]=nt[tP]=nt[fP]=nt[nP]=nt[rP]=nt[aP]=nt[AP]=nt[sP]=nt[iP]=nt[oP]=nt[lP]=nt[cP]=nt[uP]=!1;function _P(e){return MA(e)&&E_(e.length)&&!!nt[al(e)]}function em(e){return function(t){return e(t)}}var F_=typeof exports=="object"&&exports&&!exports.nodeType&&exports,to=F_&&typeof module=="object"&&module&&!module.nodeType&&module,CP=to&&to.exports===F_,Ef=CP&&y_.process,EP=function(){try{var e=to&&to.require&&to.require("util").types;return e||Ef&&Ef.binding&&Ef.binding("util")}catch{}}();const Ws=EP;var LB=Ws&&Ws.isTypedArray,kP=LB?em(LB):_P;const tm=kP;var SP=Object.prototype,xP=SP.hasOwnProperty;function I_(e,t){var n=$s(e),r=!n&&S_(e),a=!n&&!r&&Uo(e),A=!n&&!r&&!a&&tm(e),s=n||r||a||A,o=s?$N(e.length,String):[],l=o.length;for(var c in e)(t||xP.call(e,c))&&!(s&&(c=="length"||a&&(c=="offset"||c=="parent")||A&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||PN(c,l)))&&o.push(c);return o}function U_(e,t){return function(n){return e(t(n))}}var FP=U_(Object.keys,Object);const IP=FP;var UP=Object.prototype,QP=UP.hasOwnProperty;function Q_(e){if(!Ad(e))return IP(e);var t=[];for(var n in Object(e))QP.call(e,n)&&n!="constructor"&&t.push(n);return t}function nm(e){return Zg(e)?I_(e):Q_(e)}function TP(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var DP=Object.prototype,LP=DP.hasOwnProperty;function OP(e){if(!Al(e))return TP(e);var t=Ad(e),n=[];for(var r in e)r=="constructor"&&(t||!LP.call(e,r))||n.push(r);return n}function rm(e){return Zg(e)?I_(e,!0):OP(e)}var MP=GA(Object,"create");const Qo=MP;function NP(){this.__data__=Qo?Qo(null):{},this.size=0}function PP(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var HP="__lodash_hash_undefined__",RP=Object.prototype,VP=RP.hasOwnProperty;function KP(e){var t=this.__data__;if(Qo){var n=t[e];return n===HP?void 0:n}return VP.call(t,e)?t[e]:void 0}var $P=Object.prototype,WP=$P.hasOwnProperty;function GP(e){var t=this.__data__;return Qo?t[e]!==void 0:WP.call(t,e)}var zP="__lodash_hash_undefined__";function jP(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Qo&&t===void 0?zP:t,this}function NA(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}NA.prototype.clear=NP;NA.prototype.delete=PP;NA.prototype.get=KP;NA.prototype.has=GP;NA.prototype.set=jP;function YP(){this.__data__=[],this.size=0}function sd(e,t){for(var n=e.length;n--;)if(Jg(e[n][0],t))return n;return-1}var qP=Array.prototype,XP=qP.splice;function JP(e){var t=this.__data__,n=sd(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():XP.call(t,n,1),--this.size,!0}function ZP(e){var t=this.__data__,n=sd(t,e);return n<0?void 0:t[n][1]}function eH(e){return sd(this.__data__,e)>-1}function tH(e,t){var n=this.__data__,r=sd(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function sa(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}sa.prototype.clear=YP;sa.prototype.delete=JP;sa.prototype.get=ZP;sa.prototype.has=eH;sa.prototype.set=tH;var nH=GA(Er,"Map");const To=nH;function rH(){this.size=0,this.__data__={hash:new NA,map:new(To||sa),string:new NA}}function aH(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function id(e,t){var n=e.__data__;return aH(t)?n[typeof t=="string"?"string":"hash"]:n.map}function AH(e){var t=id(this,e).delete(e);return this.size-=t?1:0,t}function sH(e){return id(this,e).get(e)}function iH(e){return id(this,e).has(e)}function oH(e,t){var n=id(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function zA(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}zA.prototype.clear=rH;zA.prototype.delete=AH;zA.prototype.get=sH;zA.prototype.has=iH;zA.prototype.set=oH;function T_(e,t){for(var n=-1,r=t.length,a=e.length;++n<r;)e[a+n]=t[n];return e}var lH=U_(Object.getPrototypeOf,Object);const D_=lH;function cH(){this.__data__=new sa,this.size=0}function uH(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function dH(e){return this.__data__.get(e)}function fH(e){return this.__data__.has(e)}var hH=200;function pH(e,t){var n=this.__data__;if(n instanceof sa){var r=n.__data__;if(!To||r.length<hH-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new zA(r)}return n.set(e,t),this.size=n.size,this}function qr(e){var t=this.__data__=new sa(e);this.size=t.size}qr.prototype.clear=cH;qr.prototype.delete=uH;qr.prototype.get=dH;qr.prototype.has=fH;qr.prototype.set=pH;function gH(e,t){return e&&ad(t,nm(t),e)}function mH(e,t){return e&&ad(t,rm(t),e)}var L_=typeof exports=="object"&&exports&&!exports.nodeType&&exports,OB=L_&&typeof module=="object"&&module&&!module.nodeType&&module,vH=OB&&OB.exports===L_,MB=vH?Er.Buffer:void 0,NB=MB?MB.allocUnsafe:void 0;function BH(e,t){if(t)return e.slice();var n=e.length,r=NB?NB(n):new e.constructor(n);return e.copy(r),r}function yH(e,t){for(var n=-1,r=e==null?0:e.length,a=0,A=[];++n<r;){var s=e[n];t(s,n,e)&&(A[a++]=s)}return A}function O_(){return[]}var wH=Object.prototype,bH=wH.propertyIsEnumerable,PB=Object.getOwnPropertySymbols,_H=PB?function(e){return e==null?[]:(e=Object(e),yH(PB(e),function(t){return bH.call(e,t)}))}:O_;const am=_H;function CH(e,t){return ad(e,am(e),t)}var EH=Object.getOwnPropertySymbols,kH=EH?function(e){for(var t=[];e;)T_(t,am(e)),e=D_(e);return t}:O_;const M_=kH;function SH(e,t){return ad(e,M_(e),t)}function N_(e,t,n){var r=t(e);return $s(e)?r:T_(r,n(e))}function Yh(e){return N_(e,nm,am)}function xH(e){return N_(e,rm,M_)}var FH=GA(Er,"DataView");const qh=FH;var IH=GA(Er,"Promise");const Xh=IH;var UH=GA(Er,"Set");const Jh=UH;var HB="[object Map]",QH="[object Object]",RB="[object Promise]",VB="[object Set]",KB="[object WeakMap]",$B="[object DataView]",TH=WA(qh),DH=WA(To),LH=WA(Xh),OH=WA(Jh),MH=WA(jh),hA=al;(qh&&hA(new qh(new ArrayBuffer(1)))!=$B||To&&hA(new To)!=HB||Xh&&hA(Xh.resolve())!=RB||Jh&&hA(new Jh)!=VB||jh&&hA(new jh)!=KB)&&(hA=function(e){var t=al(e),n=t==QH?e.constructor:void 0,r=n?WA(n):"";if(r)switch(r){case TH:return $B;case DH:return HB;case LH:return RB;case OH:return VB;case MH:return KB}return t});const Gs=hA;var NH=Object.prototype,PH=NH.hasOwnProperty;function HH(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&PH.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var RH=Er.Uint8Array;const gu=RH;function Am(e){var t=new e.constructor(e.byteLength);return new gu(t).set(new gu(e)),t}function VH(e,t){var n=t?Am(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var KH=/\w*$/;function $H(e){var t=new e.constructor(e.source,KH.exec(e));return t.lastIndex=e.lastIndex,t}var WB=ja?ja.prototype:void 0,GB=WB?WB.valueOf:void 0;function WH(e){return GB?Object(GB.call(e)):{}}function GH(e,t){var n=t?Am(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var zH="[object Boolean]",jH="[object Date]",YH="[object Map]",qH="[object Number]",XH="[object RegExp]",JH="[object Set]",ZH="[object String]",eR="[object Symbol]",tR="[object ArrayBuffer]",nR="[object DataView]",rR="[object Float32Array]",aR="[object Float64Array]",AR="[object Int8Array]",sR="[object Int16Array]",iR="[object Int32Array]",oR="[object Uint8Array]",lR="[object Uint8ClampedArray]",cR="[object Uint16Array]",uR="[object Uint32Array]";function dR(e,t,n){var r=e.constructor;switch(t){case tR:return Am(e);case zH:case jH:return new r(+e);case nR:return VH(e,n);case rR:case aR:case AR:case sR:case iR:case oR:case lR:case cR:case uR:return GH(e,n);case YH:return new r;case qH:case ZH:return new r(e);case XH:return $H(e);case JH:return new r;case eR:return WH(e)}}function fR(e){return typeof e.constructor=="function"&&!Ad(e)?TN(D_(e)):{}}var hR="[object Map]";function pR(e){return MA(e)&&Gs(e)==hR}var zB=Ws&&Ws.isMap,gR=zB?em(zB):pR;const mR=gR;var vR="[object Set]";function BR(e){return MA(e)&&Gs(e)==vR}var jB=Ws&&Ws.isSet,yR=jB?em(jB):BR;const wR=yR;var bR=1,_R=2,CR=4,P_="[object Arguments]",ER="[object Array]",kR="[object Boolean]",SR="[object Date]",xR="[object Error]",H_="[object Function]",FR="[object GeneratorFunction]",IR="[object Map]",UR="[object Number]",R_="[object Object]",QR="[object RegExp]",TR="[object Set]",DR="[object String]",LR="[object Symbol]",OR="[object WeakMap]",MR="[object ArrayBuffer]",NR="[object DataView]",PR="[object Float32Array]",HR="[object Float64Array]",RR="[object Int8Array]",VR="[object Int16Array]",KR="[object Int32Array]",$R="[object Uint8Array]",WR="[object Uint8ClampedArray]",GR="[object Uint16Array]",zR="[object Uint32Array]",Ye={};Ye[P_]=Ye[ER]=Ye[MR]=Ye[NR]=Ye[kR]=Ye[SR]=Ye[PR]=Ye[HR]=Ye[RR]=Ye[VR]=Ye[KR]=Ye[IR]=Ye[UR]=Ye[R_]=Ye[QR]=Ye[TR]=Ye[DR]=Ye[LR]=Ye[$R]=Ye[WR]=Ye[GR]=Ye[zR]=!0;Ye[xR]=Ye[H_]=Ye[OR]=!1;function Hc(e,t,n,r,a,A){var s,o=t&bR,l=t&_R,c=t&CR;if(n&&(s=a?n(e,r,a,A):n(e)),s!==void 0)return s;if(!Al(e))return e;var u=$s(e);if(u){if(s=HH(e),!o)return DN(e,s)}else{var d=Gs(e),f=d==H_||d==FR;if(Uo(e))return BH(e,o);if(d==R_||d==P_||f&&!a){if(s=l||f?{}:fR(e),!o)return l?SH(e,mH(s,e)):CH(e,gH(s,e))}else{if(!Ye[d])return a?e:{};s=dR(e,d,o)}}A||(A=new qr);var h=A.get(e);if(h)return h;A.set(e,s),wR(e)?e.forEach(function(y){s.add(Hc(y,t,n,y,e,A))}):mR(e)&&e.forEach(function(y,g){s.set(g,Hc(y,t,n,g,e,A))});var p=c?l?xH:Yh:l?rm:nm,m=u?void 0:p(e);return ON(m||e,function(y,g){m&&(g=y,y=e[g]),C_(s,g,Hc(y,t,n,g,e,A))}),s}var jR=1,YR=4;function Bi(e){return Hc(e,jR|YR)}var qR="__lodash_hash_undefined__";function XR(e){return this.__data__.set(e,qR),this}function JR(e){return this.__data__.has(e)}function mu(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new zA;++t<n;)this.add(e[t])}mu.prototype.add=mu.prototype.push=XR;mu.prototype.has=JR;function ZR(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function eV(e,t){return e.has(t)}var tV=1,nV=2;function V_(e,t,n,r,a,A){var s=n&tV,o=e.length,l=t.length;if(o!=l&&!(s&&l>o))return!1;var c=A.get(e),u=A.get(t);if(c&&u)return c==t&&u==e;var d=-1,f=!0,h=n&nV?new mu:void 0;for(A.set(e,t),A.set(t,e);++d<o;){var p=e[d],m=t[d];if(r)var y=s?r(m,p,d,t,e,A):r(p,m,d,e,t,A);if(y!==void 0){if(y)continue;f=!1;break}if(h){if(!ZR(t,function(g,v){if(!eV(h,v)&&(p===g||a(p,g,n,r,A)))return h.push(v)})){f=!1;break}}else if(!(p===m||a(p,m,n,r,A))){f=!1;break}}return A.delete(e),A.delete(t),f}function rV(e){var t=-1,n=Array(e.size);return e.forEach(function(r,a){n[++t]=[a,r]}),n}function aV(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var AV=1,sV=2,iV="[object Boolean]",oV="[object Date]",lV="[object Error]",cV="[object Map]",uV="[object Number]",dV="[object RegExp]",fV="[object Set]",hV="[object String]",pV="[object Symbol]",gV="[object ArrayBuffer]",mV="[object DataView]",YB=ja?ja.prototype:void 0,kf=YB?YB.valueOf:void 0;function vV(e,t,n,r,a,A,s){switch(n){case mV:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case gV:return!(e.byteLength!=t.byteLength||!A(new gu(e),new gu(t)));case iV:case oV:case uV:return Jg(+e,+t);case lV:return e.name==t.name&&e.message==t.message;case dV:case hV:return e==t+"";case cV:var o=rV;case fV:var l=r&AV;if(o||(o=aV),e.size!=t.size&&!l)return!1;var c=s.get(e);if(c)return c==t;r|=sV,s.set(e,t);var u=V_(o(e),o(t),r,a,A,s);return s.delete(e),u;case pV:if(kf)return kf.call(e)==kf.call(t)}return!1}var BV=1,yV=Object.prototype,wV=yV.hasOwnProperty;function bV(e,t,n,r,a,A){var s=n&BV,o=Yh(e),l=o.length,c=Yh(t),u=c.length;if(l!=u&&!s)return!1;for(var d=l;d--;){var f=o[d];if(!(s?f in t:wV.call(t,f)))return!1}var h=A.get(e),p=A.get(t);if(h&&p)return h==t&&p==e;var m=!0;A.set(e,t),A.set(t,e);for(var y=s;++d<l;){f=o[d];var g=e[f],v=t[f];if(r)var _=s?r(v,g,f,t,e,A):r(g,v,f,e,t,A);if(!(_===void 0?g===v||a(g,v,n,r,A):_)){m=!1;break}y||(y=f=="constructor")}if(m&&!y){var B=e.constructor,b=t.constructor;B!=b&&"constructor"in e&&"constructor"in t&&!(typeof B=="function"&&B instanceof B&&typeof b=="function"&&b instanceof b)&&(m=!1)}return A.delete(e),A.delete(t),m}var _V=1,qB="[object Arguments]",XB="[object Array]",Xl="[object Object]",CV=Object.prototype,JB=CV.hasOwnProperty;function EV(e,t,n,r,a,A){var s=$s(e),o=$s(t),l=s?XB:Gs(e),c=o?XB:Gs(t);l=l==qB?Xl:l,c=c==qB?Xl:c;var u=l==Xl,d=c==Xl,f=l==c;if(f&&Uo(e)){if(!Uo(t))return!1;s=!0,u=!1}if(f&&!u)return A||(A=new qr),s||tm(e)?V_(e,t,n,r,a,A):vV(e,t,l,n,r,a,A);if(!(n&_V)){var h=u&&JB.call(e,"__wrapped__"),p=d&&JB.call(t,"__wrapped__");if(h||p){var m=h?e.value():e,y=p?t.value():t;return A||(A=new qr),a(m,y,n,r,A)}}return f?(A||(A=new qr),bV(e,t,n,r,a,A)):!1}function K_(e,t,n,r,a){return e===t?!0:e==null||t==null||!MA(e)&&!MA(t)?e!==e&&t!==t:EV(e,t,n,r,K_,a)}var kV="[object Map]",SV="[object Set]",xV=Object.prototype,FV=xV.hasOwnProperty;function IV(e){if(e==null)return!0;if(Zg(e)&&($s(e)||typeof e=="string"||typeof e.splice=="function"||Uo(e)||tm(e)||S_(e)))return!e.length;var t=Gs(e);if(t==kV||t==SV)return!e.size;if(Ad(e))return!Q_(e).length;for(var n in e)if(FV.call(e,n))return!1;return!0}function ZB(e,t){return K_(e,t)}var UV=Object.defineProperty,QV=Object.defineProperties,TV=Object.getOwnPropertyDescriptors,ey=Object.getOwnPropertySymbols,DV=Object.prototype.hasOwnProperty,LV=Object.prototype.propertyIsEnumerable,ty=(e,t,n)=>t in e?UV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,OV=(e,t)=>{for(var n in t||(t={}))DV.call(t,n)&&ty(e,n,t[n]);if(ey)for(var n of ey(t))LV.call(t,n)&&ty(e,n,t[n]);return e},MV=(e,t)=>QV(e,TV(t));function NV(e){return(e.match(/[a-zA-Z0-9]+/g)||[]).map(t=>`${t.charAt(0).toUpperCase()}${t.slice(1)}`).join("")}var aA=(e,t)=>{const n={chartData:{type:Object,required:!0},options:{type:Object,required:!1},chartId:{default:e,type:String},width:{default:400,type:Number},height:{default:400,type:Number},cssClasses:{type:String,default:""},styles:{type:Object},plugins:{type:Array,default:()=>[]},onLabelsUpdate:{type:Function},onChartUpdate:{type:Function},onChartDestroy:{type:Function},onChartRender:{type:Function}},r=NV(e);return i.defineComponent({name:r,props:n,emits:{"labels:update":()=>!0,"chart:update":a=>!0,"chart:destroy":()=>!0,"chart:render":a=>!0},setup(a,{emit:A,expose:s}){const o=i.ref(null),l=`${a.chartId}`;let c=i.shallowRef(null);i.watch(()=>a.chartData,u,{deep:!0}),i.watch(()=>a.options,y=>{c.value&&y&&(c.value.options=Bi(y),p())},{deep:!0});function u(y){if(c.value){let g=c.value;ZB(y.labels,c.value.data.labels)||(g.data.labels=y.labels,f()),ZB(y.datasets,c.value.data.datasets)||y.datasets.forEach((v,_)=>{var B,b;if(IV(v))g.data.datasets=[];else{const w=Bi(g.data),C=Object.keys((b=(B=w.datasets)==null?void 0:B[_])!=null?b:{}),k=Object.keys(v);C.filter(T=>T!=="_meta"&&k.indexOf(T)===-1).forEach(T=>{g.data.datasets[_]&&delete g.data.datasets[_][T]});for(const T in v){const U=Bi(v[T]);g.data.datasets[_]||(g.data.datasets[_]={}),v.hasOwnProperty(T)&&U!=null&&g&&(g.data.datasets[_][T]=U)}}}),p()}else c.value&&m(),d()}function d(){o.value?(c.value=new Le(o.value,{data:Bi(a.chartData),type:t,options:Bi(a.options),plugins:a.plugins}),h()):console.error(`Error on component ${r}, canvas cannot be rendered. Check if the render appends server-side`)}function f(){A("labels:update"),a.onLabelsUpdate&&a.onLabelsUpdate()}function h(){c.value&&(A("chart:render",c.value),a.onChartRender&&a.onChartRender(c.value))}function p(){c.value&&(c.value.update(),A("chart:update",c.value),a.onChartUpdate&&a.onChartUpdate(c.value))}function m(){c.value&&c.value.destroy(),A("chart:destroy"),a.onChartDestroy&&a.onChartDestroy()}return i.onMounted(d),i.onBeforeUnmount(()=>{c.value&&c.value.destroy()}),s({canvasRef:o,renderChart:d,chartInstance:c,canvasId:l,update:p}),()=>i.h("div",{style:MV(OV({maxWidth:"100%"},a.styles),{position:"relative"}),class:a.cssClasses},[i.h("canvas",{style:{maxWidth:"100%",maxHeight:"100%"},id:l,width:a.width,height:a.height,ref:o})])}})},od=aA("bar-chart","bar"),ld=aA("doughnut-chart","doughnut"),$_=aA("line-chart","line");aA("pie-chart","pie");aA("polar-chart","polarArea");aA("radar-chart","radar");aA("bubble-chart","bubble");aA("scatter-chart","scatter");const vu=i.defineComponent({__name:"InfoDoughnutChart",props:XD,setup(e){const t=e,n=i.ref(null);Le.register(...Cr);const r=i.computed(()=>{const A=t.info==="typeRef"?"types":"rarities",s={},o=St(t.deckCode);for(const c in o){const u=jt().cardJsonObject[c];if(u===void 0)continue;let d=u[t.info];d==="Unit"&&(d=u.supertype==="Champion"?"Champion":"Follower"),s[d]===void 0&&(s[d]=0),s[d]+=o[c]}const l=[];for(const c in s){const u=we().dataJson[A].find(f=>f.nameRef===c),d={key:c,value:s[c],color:u==null?void 0:u.color,name:u==null?void 0:u.name,order:u==null?void 0:u.order};l.push(d)}return console.log(l),l.sort((c,u)=>c.order-u.order),{labels:l.map(c=>c.name),datasets:[{data:l.map(c=>c.value),backgroundColor:l.map(c=>c.color)}]}}),a={cutout:55,layout:{padding:{top:10,bottom:10}},elements:{arc:{borderWidth:0}},plugins:{legend:{display:!0,position:"right",labels:{usePointStyle:!0,generateLabels(A){const s=[],o=A.data.labels;for(let l=0;l<A.data.labels.length;l++)s.push({text:`${o[l]} (${A.data.datasets[0].data[l]})`,borderRadius:999,datasetIndex:0,index:l,fontColor:Ha("--color-0"),fillStyle:A.data.datasets[0].backgroundColor[l]});return s}}},datalabels:{display:!1}}};return(A,s)=>(i.openBlock(),i.createBlock(i.unref(ld),{ref_key:"chart",ref:n,"chart-data":r.value,options:a},null,8,["chart-data"]))}}),PV={deck:{type:Object,required:!1,default:void 0},deckCode:{type:String,required:!1,default:void 0},paddingTop:{type:Number,required:!1,default:10},showDataLabels:{type:Boolean,required:!1,default:!0},dataLabelsOffset:{type:Number,required:!1,default:-10},tooltipsEnabled:{type:Boolean,required:!1,default:!0},displayXScale:{type:Boolean,required:!1,default:!0},animation:{type:Boolean,required:!1}};//! moment.js
|
|
827
|
+
`):e}function b9(e,t){const{element:n,datasetIndex:r,index:a}=t,A=e.getDatasetMeta(r).controller,{label:s,value:o}=A.getLabelAndValue(a);return{chart:e,label:s,parsed:A.getParsed(a),raw:e.data.datasets[r].data[a],formattedValue:o,dataset:A.getDataset(),dataIndex:a,datasetIndex:r,element:n}}function hB(e,t){const n=e.chart.ctx,{body:r,footer:a,title:A}=e,{boxWidth:s,boxHeight:o}=t,l=ft(t.bodyFont),c=ft(t.titleFont),u=ft(t.footerFont),d=A.length,f=a.length,h=r.length,p=_t(t.padding);let m=p.height,y=0,g=r.reduce((B,b)=>B+b.before.length+b.lines.length+b.after.length,0);if(g+=e.beforeBody.length+e.afterBody.length,d&&(m+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),g){const B=t.displayColors?Math.max(o,l.lineHeight):l.lineHeight;m+=h*B+(g-h)*l.lineHeight+(g-1)*t.bodySpacing}f&&(m+=t.footerMarginTop+f*u.lineHeight+(f-1)*t.footerSpacing);let v=0;const _=function(B){y=Math.max(y,n.measureText(B).width+v)};return n.save(),n.font=c.string,Ve(e.title,_),n.font=l.string,Ve(e.beforeBody.concat(e.afterBody),_),v=t.displayColors?s+2+t.boxPadding:0,Ve(r,B=>{Ve(B.before,_),Ve(B.lines,_),Ve(B.after,_)}),v=0,n.font=u.string,Ve(e.footer,_),n.restore(),y+=p.width,{width:y,height:m}}function _9(e,t){const{y:n,height:r}=t;return n<r/2?"top":n>e.height-r/2?"bottom":"center"}function C9(e,t,n,r){const{x:a,width:A}=r,s=n.caretSize+n.caretPadding;if(e==="left"&&a+A+s>t.width||e==="right"&&a-A-s<0)return!0}function E9(e,t,n,r){const{x:a,width:A}=n,{width:s,chartArea:{left:o,right:l}}=e;let c="center";return r==="center"?c=a<=(o+l)/2?"left":"right":a<=A/2?c="left":a>=s-A/2&&(c="right"),C9(c,e,t,n)&&(c="center"),c}function pB(e,t,n){const r=n.yAlign||t.yAlign||_9(e,n);return{xAlign:n.xAlign||t.xAlign||E9(e,t,n,r),yAlign:r}}function k9(e,t){let{x:n,width:r}=e;return t==="right"?n-=r:t==="center"&&(n-=r/2),n}function S9(e,t,n){let{y:r,height:a}=e;return t==="top"?r+=n:t==="bottom"?r-=a+n:r-=a/2,r}function gB(e,t,n,r){const{caretSize:a,caretPadding:A,cornerRadius:s}=e,{xAlign:o,yAlign:l}=n,c=a+A,{topLeft:u,topRight:d,bottomLeft:f,bottomRight:h}=Da(s);let p=k9(t,o);const m=S9(t,l,c);return l==="center"?o==="left"?p+=c:o==="right"&&(p-=c):o==="left"?p-=Math.max(u,f)+a:o==="right"&&(p+=Math.max(d,h)+a),{x:Mt(p,0,r.width-t.width),y:Mt(m,0,r.height-t.height)}}function Yl(e,t,n){const r=_t(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function mB(e){return lr([],Nr(e))}function x9(e,t,n){return rA(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function vB(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const v_={beforeTitle:Qr,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex<r)return n[t.dataIndex]}return""},afterTitle:Qr,beforeBody:Qr,beforeLabel:Qr,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const n=e.formattedValue;return _e(n)||(t+=n),t},labelColor(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.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(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:Qr,afterBody:Qr,beforeFooter:Qr,footer:Qr,afterFooter:Qr};function sn(e,t,n,r){const a=e[t].call(n,r);return typeof a>"u"?v_[t].call(n,r):a}class Vh extends an{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const n=this.chart,r=this.options.setContext(this.getContext()),a=r.enabled&&n.options.animation&&r.animations,A=new jg(this.chart,a);return a._cacheable&&(this._cachedAnimations=Object.freeze(A)),A}getContext(){return this.$context||(this.$context=x9(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:r}=n,a=sn(r,"beforeTitle",this,t),A=sn(r,"title",this,t),s=sn(r,"afterTitle",this,t);let o=[];return o=lr(o,Nr(a)),o=lr(o,Nr(A)),o=lr(o,Nr(s)),o}getBeforeBody(t,n){return mB(sn(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:r}=n,a=[];return Ve(t,A=>{const s={before:[],lines:[],after:[]},o=vB(r,A);lr(s.before,Nr(sn(o,"beforeLabel",this,A))),lr(s.lines,sn(o,"label",this,A)),lr(s.after,Nr(sn(o,"afterLabel",this,A))),a.push(s)}),a}getAfterBody(t,n){return mB(sn(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:r}=n,a=sn(r,"beforeFooter",this,t),A=sn(r,"footer",this,t),s=sn(r,"afterFooter",this,t);let o=[];return o=lr(o,Nr(a)),o=lr(o,Nr(A)),o=lr(o,Nr(s)),o}_createItems(t){const n=this._active,r=this.chart.data,a=[],A=[],s=[];let o=[],l,c;for(l=0,c=n.length;l<c;++l)o.push(b9(this.chart,n[l]));return t.filter&&(o=o.filter((u,d,f)=>t.filter(u,d,f,r))),t.itemSort&&(o=o.sort((u,d)=>t.itemSort(u,d,r))),Ve(o,u=>{const d=vB(t.callbacks,u);a.push(sn(d,"labelColor",this,u)),A.push(sn(d,"labelPointStyle",this,u)),s.push(sn(d,"labelTextColor",this,u))}),this.labelColors=a,this.labelPointStyles=A,this.labelTextColors=s,this.dataPoints=o,o}update(t,n){const r=this.options.setContext(this.getContext()),a=this._active;let A,s=[];if(!a.length)this.opacity!==0&&(A={opacity:0});else{const o=Ii[r.position].call(this,a,this._eventPosition);s=this._createItems(r),this.title=this.getTitle(s,r),this.beforeBody=this.getBeforeBody(s,r),this.body=this.getBody(s,r),this.afterBody=this.getAfterBody(s,r),this.footer=this.getFooter(s,r);const l=this._size=hB(this,r),c=Object.assign({},o,l),u=pB(this.chart,r,c),d=gB(r,c,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,A={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:o.x,caretY:o.y}}this._tooltipItems=s,this.$context=void 0,A&&this._resolveAnimations().update(this,A),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,r,a){const A=this.getCaretPosition(t,r,a);n.lineTo(A.x1,A.y1),n.lineTo(A.x2,A.y2),n.lineTo(A.x3,A.y3)}getCaretPosition(t,n,r){const{xAlign:a,yAlign:A}=this,{caretSize:s,cornerRadius:o}=r,{topLeft:l,topRight:c,bottomLeft:u,bottomRight:d}=Da(o),{x:f,y:h}=t,{width:p,height:m}=n;let y,g,v,_,B,b;return A==="center"?(B=h+m/2,a==="left"?(y=f,g=y-s,_=B+s,b=B-s):(y=f+p,g=y+s,_=B-s,b=B+s),v=y):(a==="left"?g=f+Math.max(l,u)+s:a==="right"?g=f+p-Math.max(c,d)-s:g=this.caretX,A==="top"?(_=h,B=_-s,y=g-s,v=g+s):(_=h+m,B=_+s,y=g+s,v=g-s),b=_),{x1:y,x2:g,x3:v,y1:_,y2:B,y3:b}}drawTitle(t,n,r){const a=this.title,A=a.length;let s,o,l;if(A){const c=Cs(r.rtl,this.x,this.width);for(t.x=Yl(this,r.titleAlign,r),n.textAlign=c.textAlign(r.titleAlign),n.textBaseline="middle",s=ft(r.titleFont),o=r.titleSpacing,n.fillStyle=r.titleColor,n.font=s.string,l=0;l<A;++l)n.fillText(a[l],c.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+o,l+1===A&&(t.y+=r.titleMarginBottom-o)}}_drawColorBox(t,n,r,a,A){const s=this.labelColors[r],o=this.labelPointStyles[r],{boxHeight:l,boxWidth:c}=A,u=ft(A.bodyFont),d=Yl(this,"left",A),f=a.x(d),h=l<u.lineHeight?(u.lineHeight-l)/2:0,p=n.y+h;if(A.usePointStyle){const m={radius:Math.min(c,l)/2,pointStyle:o.pointStyle,rotation:o.rotation,borderWidth:1},y=a.leftForLtr(f,c)+c/2,g=p+l/2;t.strokeStyle=A.multiKeyBackground,t.fillStyle=A.multiKeyBackground,Lh(t,m,y,g),t.strokeStyle=s.borderColor,t.fillStyle=s.backgroundColor,Lh(t,m,y,g)}else{t.lineWidth=ve(s.borderWidth)?Math.max(...Object.values(s.borderWidth)):s.borderWidth||1,t.strokeStyle=s.borderColor,t.setLineDash(s.borderDash||[]),t.lineDashOffset=s.borderDashOffset||0;const m=a.leftForLtr(f,c),y=a.leftForLtr(a.xPlus(f,1),c-2),g=Da(s.borderRadius);Object.values(g).some(v=>v!==0)?(t.beginPath(),t.fillStyle=A.multiKeyBackground,Rs(t,{x:m,y:p,w:c,h:l,radius:g}),t.fill(),t.stroke(),t.fillStyle=s.backgroundColor,t.beginPath(),Rs(t,{x:y,y:p+1,w:c-2,h:l-2,radius:g}),t.fill()):(t.fillStyle=A.multiKeyBackground,t.fillRect(m,p,c,l),t.strokeRect(m,p,c,l),t.fillStyle=s.backgroundColor,t.fillRect(y,p+1,c-2,l-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,n,r){const{body:a}=this,{bodySpacing:A,bodyAlign:s,displayColors:o,boxHeight:l,boxWidth:c,boxPadding:u}=r,d=ft(r.bodyFont);let f=d.lineHeight,h=0;const p=Cs(r.rtl,this.x,this.width),m=function(k){n.fillText(k,p.x(t.x+h),t.y+f/2),t.y+=f+A},y=p.textAlign(s);let g,v,_,B,b,w,C;for(n.textAlign=s,n.textBaseline="middle",n.font=d.string,t.x=Yl(this,y,r),n.fillStyle=r.bodyColor,Ve(this.beforeBody,m),h=o&&y!=="right"?s==="center"?c/2+u:c+2+u:0,B=0,w=a.length;B<w;++B){for(g=a[B],v=this.labelTextColors[B],n.fillStyle=v,Ve(g.before,m),_=g.lines,o&&_.length&&(this._drawColorBox(n,t,B,p,r),f=Math.max(d.lineHeight,l)),b=0,C=_.length;b<C;++b)m(_[b]),f=d.lineHeight;Ve(g.after,m)}h=0,f=d.lineHeight,Ve(this.afterBody,m),t.y-=A}drawFooter(t,n,r){const a=this.footer,A=a.length;let s,o;if(A){const l=Cs(r.rtl,this.x,this.width);for(t.x=Yl(this,r.footerAlign,r),t.y+=r.footerMarginTop,n.textAlign=l.textAlign(r.footerAlign),n.textBaseline="middle",s=ft(r.footerFont),n.fillStyle=r.footerColor,n.font=s.string,o=0;o<A;++o)n.fillText(a[o],l.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+r.footerSpacing}}drawBackground(t,n,r,a){const{xAlign:A,yAlign:s}=this,{x:o,y:l}=t,{width:c,height:u}=r,{topLeft:d,topRight:f,bottomLeft:h,bottomRight:p}=Da(a.cornerRadius);n.fillStyle=a.backgroundColor,n.strokeStyle=a.borderColor,n.lineWidth=a.borderWidth,n.beginPath(),n.moveTo(o+d,l),s==="top"&&this.drawCaret(t,n,r,a),n.lineTo(o+c-f,l),n.quadraticCurveTo(o+c,l,o+c,l+f),s==="center"&&A==="right"&&this.drawCaret(t,n,r,a),n.lineTo(o+c,l+u-p),n.quadraticCurveTo(o+c,l+u,o+c-p,l+u),s==="bottom"&&this.drawCaret(t,n,r,a),n.lineTo(o+h,l+u),n.quadraticCurveTo(o,l+u,o,l+u-h),s==="center"&&A==="left"&&this.drawCaret(t,n,r,a),n.lineTo(o,l+d),n.quadraticCurveTo(o,l,o+d,l),n.closePath(),n.fill(),a.borderWidth>0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,r=this.$animations,a=r&&r.x,A=r&&r.y;if(a||A){const s=Ii[t.position].call(this,this._active,this._eventPosition);if(!s)return;const o=this._size=hB(this,t),l=Object.assign({},s,this._size),c=pB(n,t,l),u=gB(t,l,c,n);(a._to!==u.x||A._to!==u.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=o.width,this.height=o.height,this.caretX=s.x,this.caretY=s.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(n);const a={width:this.width,height:this.height},A={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const s=_t(n.padding),o=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&o&&(t.save(),t.globalAlpha=r,this.drawBackground(A,t,a,n),Gb(t,n.textDirection),A.y+=s.top,this.drawTitle(A,t,n),this.drawBody(A,t,n),this.drawFooter(A,t,n),zb(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const r=this._active,a=t.map(({datasetIndex:o,index:l})=>{const c=this.chart.getDatasetMeta(o);if(!c)throw new Error("Cannot find a dataset at index "+o);return{datasetIndex:o,element:c.data[l],index:l}}),A=!iu(r,a),s=this._positionChanged(a,n);(A||s)&&(this._active=a,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const a=this.options,A=this._active||[],s=this._getActiveElements(t,A,n,r),o=this._positionChanged(s,t),l=n||!iu(s,A)||o;return l&&(this._active=s,(a.enabled||a.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),l}_getActiveElements(t,n,r,a){const A=this.options;if(t.type==="mouseout")return[];if(!a)return n;const s=this.chart.getElementsAtEventForMode(t,A.mode,A,r);return A.reverse&&s.reverse(),s}_positionChanged(t,n){const{caretX:r,caretY:a,options:A}=this,s=Ii[A.position].call(this,t,n);return s!==!1&&(r!==s.x||a!==s.y)}}R(Vh,"positioners",Ii);var F9={id:"tooltip",_element:Vh,positioners:Ii,afterInit(e,t,n){n&&(e.tooltip=new Vh({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const n={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){const n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:v_},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},I9=Object.freeze({__proto__:null,Colors:VM,Decimation:GM,Filler:d9,Legend:v9,SubTitle:w9,Title:y9,Tooltip:F9});const U9=(e,t,n,r)=>(typeof t=="string"?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function Q9(e,t,n,r){const a=e.indexOf(t);if(a===-1)return U9(e,t,n,r);const A=e.lastIndexOf(t);return a!==A?n:a}const T9=(e,t)=>e===null?null:Mt(Math.round(e),0,t);function BB(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class Kh extends $A{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const n=this._addedLabels;if(n.length){const r=this.getLabels();for(const{index:a,label:A}of n)r[a]===A&&r.splice(a,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(_e(t))return null;const r=this.getLabels();return n=isFinite(n)&&r[n]===t?n:Q9(r,t,de(n,t),this._addedLabels),T9(n,r.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:r,max:a}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(r=0),n||(a=this.getLabels().length-1)),this.min=r,this.max=a}buildTicks(){const t=this.min,n=this.max,r=this.options.offset,a=[];let A=this.getLabels();A=t===0&&n===A.length-1?A:A.slice(t,n+1),this._valueRange=Math.max(A.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let s=t;s<=n;s++)a.push({value:s});return a}getLabelForValue(t){return BB.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}R(Kh,"id","category"),R(Kh,"defaults",{ticks:{callback:BB}});function D9(e,t){const n=[],{bounds:a,step:A,min:s,max:o,precision:l,count:c,maxTicks:u,maxDigits:d,includeBounds:f}=e,h=A||1,p=u-1,{min:m,max:y}=t,g=!_e(s),v=!_e(o),_=!_e(c),B=(y-m)/(d+1);let b=fv((y-m)/p/h)*h,w,C,k,S;if(b<1e-14&&!g&&!v)return[{value:m},{value:y}];S=Math.ceil(y/b)-Math.floor(m/b),S>p&&(b=fv(S*b/p/h)*h),_e(l)||(w=Math.pow(10,l),b=Math.ceil(b*w)/w),a==="ticks"?(C=Math.floor(m/b)*b,k=Math.ceil(y/b)*b):(C=m,k=y),g&&v&&A&&FL((o-s)/A,b/1e3)?(S=Math.round(Math.min((o-s)/b,u)),b=(o-s)/S,C=s,k=o):_?(C=g?s:C,k=v?o:k,S=c-1,b=(k-C)/S):(S=(k-C)/b,Yi(S,Math.round(S),b/1e3)?S=Math.round(S):S=Math.ceil(S));const T=Math.max(hv(b),hv(C));w=Math.pow(10,_e(l)?T:l),C=Math.round(C*w)/w,k=Math.round(k*w)/w;let U=0;for(g&&(f&&C!==s?(n.push({value:s}),C<s&&U++,Yi(Math.round((C+U*b)*w)/w,s,yB(s,B,e))&&U++):C<s&&U++);U<S;++U){const F=Math.round((C+U*b)*w)/w;if(v&&F>o)break;n.push({value:F})}return v&&f&&k!==o?n.length&&Yi(n[n.length-1].value,o,yB(o,B,e))?n[n.length-1].value=o:n.push({value:o}):(!v||k===o)&&n.push({value:k}),n}function yB(e,t,{horizontal:n,minRotation:r}){const a=Et(r),A=(n?Math.sin(a):Math.cos(a))||.001,s=.75*t*(""+e).length;return Math.min(t/A,s)}class pu extends $A{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,n){return _e(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:r}=this.getUserBounds();let{min:a,max:A}=this;const s=l=>a=n?a:l,o=l=>A=r?A:l;if(t){const l=vr(a),c=vr(A);l<0&&c<0?o(0):l>0&&c>0&&s(0)}if(a===A){let l=A===0?1:Math.abs(A*.05);o(A+l),t||s(a-l)}this.min=a,this.max=A}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:r}=t,a;return r?(a=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,a>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${a} ticks. Limiting to 1000.`),a=1e3)):(a=this.computeTickLimit(),n=n||11),n&&(a=Math.min(n,a)),a}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=t.ticks;let r=this.getTickLimit();r=Math.max(2,r);const a={maxTicks:r,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},A=this._range||this,s=D9(a,A);return t.bounds==="ticks"&&xb(s,this,"value"),t.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}configure(){const t=this.ticks;let n=this.min,r=this.max;if(super.configure(),this.options.offset&&t.length){const a=(r-n)/Math.max(t.length-1,1)/2;n-=a,r+=a}this._startValue=n,this._endValue=r,this._valueRange=r-n}getLabelForValue(t){return el(t,this.chart.options.locale,this.options.ticks.format)}}class $h extends pu{determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=ut(t)?t:0,this.max=ut(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,r=Et(this.options.ticks.minRotation),a=(t?Math.sin(r):Math.cos(r))||.001,A=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,A.lineHeight/a))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}R($h,"id","linear"),R($h,"defaults",{ticks:{callback:td.formatters.numeric}});const Fo=e=>Math.floor(Ea(e)),oA=(e,t)=>Math.pow(10,Fo(e)+t);function wB(e){return e/Math.pow(10,Fo(e))===1}function bB(e,t,n){const r=Math.pow(10,n),a=Math.floor(e/r);return Math.ceil(t/r)-a}function L9(e,t){const n=t-e;let r=Fo(n);for(;bB(e,t,r)>10;)r++;for(;bB(e,t,r)<10;)r--;return Math.min(r,Fo(e))}function O9(e,{min:t,max:n}){t=wn(e.min,t);const r=[],a=Fo(t);let A=L9(t,n),s=A<0?Math.pow(10,Math.abs(A)):1;const o=Math.pow(10,A),l=a>A?Math.pow(10,a):0,c=Math.round((t-l)*s)/s,u=Math.floor((t-l)/o/10)*o*10;let d=Math.floor((c-u)/Math.pow(10,A)),f=wn(e.min,Math.round((l+u+d*Math.pow(10,A))*s)/s);for(;f<n;)r.push({value:f,major:wB(f),significand:d}),d>=10?d=d<15?15:20:d++,d>=20&&(A++,d=2,s=A>=0?1:s),f=Math.round((l+u+d*Math.pow(10,A))*s)/s;const h=wn(e.max,f);return r.push({value:h,major:wB(h),significand:d}),r}class Wh extends $A{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,n){const r=pu.prototype.parse.apply(this,[t,n]);if(r===0){this._zero=!0;return}return ut(r)&&r>0?r:null}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=ut(t)?Math.max(0,t):null,this.max=ut(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!ut(this._userMin)&&(this.min=t===oA(this.min,0)?oA(this.min,-1):oA(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let r=this.min,a=this.max;const A=o=>r=t?r:o,s=o=>a=n?a:o;r===a&&(r<=0?(A(1),s(10)):(A(oA(r,-1)),s(oA(a,1)))),r<=0&&A(oA(a,-1)),a<=0&&s(oA(r,1)),this.min=r,this.max=a}buildTicks(){const t=this.options,n={min:this._userMin,max:this._userMax},r=O9(n,this);return t.bounds==="ticks"&&xb(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}getLabelForValue(t){return t===void 0?"0":el(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=Ea(t),this._valueRange=Ea(this.max)-Ea(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(Ea(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const n=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+n*this._valueRange)}}R(Wh,"id","logarithmic"),R(Wh,"defaults",{ticks:{callback:td.formatters.logarithmic,major:{enabled:!0}}});function Gh(e){const t=e.ticks;if(t.display&&e.display){const n=_t(t.backdropPadding);return de(t.font&&t.font.size,dt.font.size)+n.height}return 0}function M9(e,t,n){return n=Oe(n)?n:[n],{w:GL(e,t.string,n),h:n.length*t.lineHeight}}function _B(e,t,n,r,a){return e===r||e===a?{start:t-n/2,end:t+n/2}:e<r||e>a?{start:t-n,end:t}:{start:t,end:t+n}}function N9(e){const t={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},n=Object.assign({},t),r=[],a=[],A=e._pointLabels.length,s=e.options.pointLabels,o=s.centerPointLabels?Qe/A:0;for(let l=0;l<A;l++){const c=s.setContext(e.getPointLabelContext(l));a[l]=c.padding;const u=e.getPointPosition(l,e.drawingArea+a[l],o),d=ft(c.font),f=M9(e.ctx,d,e._pointLabels[l]);r[l]=f;const h=_n(e.getIndexAngle(l)+o),p=Math.round(ed(h)),m=_B(p,u.x,f.w,0,180),y=_B(p,u.y,f.h,90,270);P9(n,t,h,m,y)}e.setCenterPoint(t.l-n.l,n.r-t.r,t.t-n.t,n.b-t.b),e._pointLabelItems=V9(e,r,a)}function P9(e,t,n,r,a){const A=Math.abs(Math.sin(n)),s=Math.abs(Math.cos(n));let o=0,l=0;r.start<t.l?(o=(t.l-r.start)/A,e.l=Math.min(e.l,t.l-o)):r.end>t.r&&(o=(r.end-t.r)/A,e.r=Math.max(e.r,t.r+o)),a.start<t.t?(l=(t.t-a.start)/s,e.t=Math.min(e.t,t.t-l)):a.end>t.b&&(l=(a.end-t.b)/s,e.b=Math.max(e.b,t.b+l))}function H9(e,t,n){const r=e.drawingArea,{extra:a,additionalAngle:A,padding:s,size:o}=n,l=e.getPointPosition(t,r+a+s,A),c=Math.round(ed(_n(l.angle+Je))),u=W9(l.y,o.h,c),d=K9(c),f=$9(l.x,o.w,d);return{visible:!0,x:l.x,y:u,textAlign:d,left:f,top:u,right:f+o.w,bottom:u+o.h}}function R9(e,t){if(!t)return!0;const{left:n,top:r,right:a,bottom:A}=e;return!(Gr({x:n,y:r},t)||Gr({x:n,y:A},t)||Gr({x:a,y:r},t)||Gr({x:a,y:A},t))}function V9(e,t,n){const r=[],a=e._pointLabels.length,A=e.options,{centerPointLabels:s,display:o}=A.pointLabels,l={extra:Gh(A)/2,additionalAngle:s?Qe/a:0};let c;for(let u=0;u<a;u++){l.padding=n[u],l.size=t[u];const d=H9(e,u,l);r.push(d),o==="auto"&&(d.visible=R9(d,c),d.visible&&(c=d))}return r}function K9(e){return e===0||e===180?"center":e<180?"left":"right"}function $9(e,t,n){return n==="right"?e-=t:n==="center"&&(e-=t/2),e}function W9(e,t,n){return n===90||n===270?e-=t/2:(n>270||n<90)&&(e-=t),e}function G9(e,t,n){const{left:r,top:a,right:A,bottom:s}=n,{backdropColor:o}=t;if(!_e(o)){const l=Da(t.borderRadius),c=_t(t.backdropPadding);e.fillStyle=o;const u=r-c.left,d=a-c.top,f=A-r+c.width,h=s-a+c.height;Object.values(l).some(p=>p!==0)?(e.beginPath(),Rs(e,{x:u,y:d,w:f,h,radius:l}),e.fill()):e.fillRect(u,d,f,h)}}function z9(e,t){const{ctx:n,options:{pointLabels:r}}=e;for(let a=t-1;a>=0;a--){const A=e._pointLabelItems[a];if(!A.visible)continue;const s=r.setContext(e.getPointLabelContext(a));G9(n,s,A);const o=ft(s.font),{x:l,y:c,textAlign:u}=A;OA(n,e._pointLabels[a],l,c+o.lineHeight/2,o,{color:s.color,textAlign:u,textBaseline:"middle"})}}function B_(e,t,n,r){const{ctx:a}=e;if(n)a.arc(e.xCenter,e.yCenter,t,0,Xe);else{let A=e.getPointPosition(0,t);a.moveTo(A.x,A.y);for(let s=1;s<r;s++)A=e.getPointPosition(s,t),a.lineTo(A.x,A.y)}}function j9(e,t,n,r,a){const A=e.ctx,s=t.circular,{color:o,lineWidth:l}=t;!s&&!r||!o||!l||n<0||(A.save(),A.strokeStyle=o,A.lineWidth=l,A.setLineDash(a.dash),A.lineDashOffset=a.dashOffset,A.beginPath(),B_(e,n,s,r),A.closePath(),A.stroke(),A.restore())}function Y9(e,t,n){return rA(e,{label:n,index:t,type:"pointLabel"})}class Ui extends pu{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=_t(Gh(this.options)/2),n=this.width=this.maxWidth-t.width,r=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+n/2+t.left),this.yCenter=Math.floor(this.top+r/2+t.top),this.drawingArea=Math.floor(Math.min(n,r)/2)}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!1);this.min=ut(t)&&!isNaN(t)?t:0,this.max=ut(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Gh(this.options))}generateTickLabels(t){pu.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((n,r)=>{const a=He(this.options.pointLabels.callback,[n,r],this);return a||a===0?a:""}).filter((n,r)=>this.chart.getDataVisibility(r))}fit(){const t=this.options;t.display&&t.pointLabels.display?N9(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,n,r,a){this.xCenter+=Math.floor((t-n)/2),this.yCenter+=Math.floor((r-a)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,n,r,a))}getIndexAngle(t){const n=Xe/(this._pointLabels.length||1),r=this.options.startAngle||0;return _n(t*n+Et(r))}getDistanceFromCenterForValue(t){if(_e(t))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*n:(t-this.min)*n}getValueForDistanceFromCenter(t){if(_e(t))return NaN;const n=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(t){const n=this._pointLabels||[];if(t>=0&&t<n.length){const r=n[t];return Y9(this.getContext(),t,r)}}getPointPosition(t,n,r=0){const a=this.getIndexAngle(t)-Je+r;return{x:Math.cos(a)*n+this.xCenter,y:Math.sin(a)*n+this.yCenter,angle:a}}getPointPositionForValue(t,n){return this.getPointPosition(t,this.getDistanceFromCenterForValue(n))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:n,top:r,right:a,bottom:A}=this._pointLabelItems[t];return{left:n,top:r,right:a,bottom:A}}drawBackground(){const{backgroundColor:t,grid:{circular:n}}=this.options;if(t){const r=this.ctx;r.save(),r.beginPath(),B_(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length),r.closePath(),r.fillStyle=t,r.fill(),r.restore()}}drawGrid(){const t=this.ctx,n=this.options,{angleLines:r,grid:a,border:A}=n,s=this._pointLabels.length;let o,l,c;if(n.pointLabels.display&&z9(this,s),a.display&&this.ticks.forEach((u,d)=>{if(d!==0){l=this.getDistanceFromCenterForValue(u.value);const f=this.getContext(d),h=a.setContext(f),p=A.setContext(f);j9(this,h,l,s,p)}}),r.display){for(t.save(),o=s-1;o>=0;o--){const u=r.setContext(this.getPointLabelContext(o)),{color:d,lineWidth:f}=u;!f||!d||(t.lineWidth=f,t.strokeStyle=d,t.setLineDash(u.borderDash),t.lineDashOffset=u.borderDashOffset,l=this.getDistanceFromCenterForValue(n.ticks.reverse?this.min:this.max),c=this.getPointPosition(o,l),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(c.x,c.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,n=this.options,r=n.ticks;if(!r.display)return;const a=this.getIndexAngle(0);let A,s;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(a),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((o,l)=>{if(l===0&&!n.reverse)return;const c=r.setContext(this.getContext(l)),u=ft(c.font);if(A=this.getDistanceFromCenterForValue(this.ticks[l].value),c.showLabelBackdrop){t.font=u.string,s=t.measureText(o.label).width,t.fillStyle=c.backdropColor;const d=_t(c.backdropPadding);t.fillRect(-s/2-d.left,-A-u.size/2-d.top,s+d.width,u.size+d.height)}OA(t,o.label,0,-A,u,{color:c.color})}),t.restore()}drawTitle(){}}R(Ui,"id","radialLinear"),R(Ui,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:td.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),R(Ui,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),R(Ui,"descriptors",{angleLines:{_fallback:"grid"}});const rd={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}},hn=Object.keys(rd);function q9(e,t){return e-t}function CB(e,t){if(_e(t))return null;const n=e._adapter,{parser:r,round:a,isoWeekday:A}=e._parseOpts;let s=t;return typeof r=="function"&&(s=r(s)),ut(s)||(s=typeof r=="string"?n.parse(s,r):n.parse(s)),s===null?null:(a&&(s=a==="week"&&(za(A)||A===!0)?n.startOf(s,"isoWeek",A):n.startOf(s,a)),+s)}function EB(e,t,n,r){const a=hn.length;for(let A=hn.indexOf(e);A<a-1;++A){const s=rd[hn[A]],o=s.steps?s.steps:Number.MAX_SAFE_INTEGER;if(s.common&&Math.ceil((n-t)/(o*s.size))<=r)return hn[A]}return hn[a-1]}function X9(e,t,n,r,a){for(let A=hn.length-1;A>=hn.indexOf(n);A--){const s=hn[A];if(rd[s].common&&e._adapter.diff(a,r,s)>=t-1)return s}return hn[n?hn.indexOf(n):0]}function J9(e){for(let t=hn.indexOf(e)+1,n=hn.length;t<n;++t)if(rd[hn[t]].common)return hn[t]}function kB(e,t,n){if(!n)e[t]=!0;else if(n.length){const{lo:r,hi:a}=Hg(n,t),A=n[r]>=t?n[r]:n[a];e[A]=!0}}function Z9(e,t,n,r){const a=e._adapter,A=+a.startOf(t[0].value,r),s=t[t.length-1].value;let o,l;for(o=A;o<=s;o=+a.add(o,1,r))l=n[o],l>=0&&(t[l].major=!0);return t}function SB(e,t,n){const r=[],a={},A=t.length;let s,o;for(s=0;s<A;++s)o=t[s],a[o]=s,r.push({value:o,major:!1});return A===0||!n?r:Z9(e,r,a,n)}class Io extends $A{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,n={}){const r=t.time||(t.time={}),a=this._adapter=new Zb._date(t.adapters.date);a.init(n),ji(r.displayFormats,a.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return t===void 0?null:CB(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,n=this._adapter,r=t.time.unit||"day";let{min:a,max:A,minDefined:s,maxDefined:o}=this.getUserBounds();function l(c){!s&&!isNaN(c.min)&&(a=Math.min(a,c.min)),!o&&!isNaN(c.max)&&(A=Math.max(A,c.max))}(!s||!o)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),a=ut(a)&&!isNaN(a)?a:+n.startOf(Date.now(),r),A=ut(A)&&!isNaN(A)?A:+n.endOf(Date.now(),r)+1,this.min=Math.min(a,A-1),this.max=Math.max(a+1,A)}_getLabelBounds(){const t=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],r=t[t.length-1]),{min:n,max:r}}buildTicks(){const t=this.options,n=t.time,r=t.ticks,a=r.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&a.length&&(this.min=this._userMin||a[0],this.max=this._userMax||a[a.length-1]);const A=this.min,s=this.max,o=TL(a,A,s);return this._unit=n.unit||(r.autoSkip?EB(n.minUnit,this.min,this.max,this._getLabelCapacity(A)):X9(this,o.length,n.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:J9(this._unit),this.initOffsets(a),t.reverse&&o.reverse(),SB(this,o,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let n=0,r=0,a,A;this.options.offset&&t.length&&(a=this.getDecimalForValue(t[0]),t.length===1?n=1-a:n=(this.getDecimalForValue(t[1])-a)/2,A=this.getDecimalForValue(t[t.length-1]),t.length===1?r=A:r=(A-this.getDecimalForValue(t[t.length-2]))/2);const s=t.length<3?.5:.25;n=Mt(n,0,s),r=Mt(r,0,s),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const t=this._adapter,n=this.min,r=this.max,a=this.options,A=a.time,s=A.unit||EB(A.minUnit,n,r,this._getLabelCapacity(n)),o=de(a.ticks.stepSize,1),l=s==="week"?A.isoWeekday:!1,c=za(l)||l===!0,u={};let d=n,f,h;if(c&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,c?"day":s),t.diff(r,n,s)>1e5*o)throw new Error(n+" and "+r+" are too far apart with stepSize of "+o+" "+s);const p=a.ticks.source==="data"&&this.getDataTimestamps();for(f=d,h=0;f<r;f=+t.add(f,o,s),h++)kB(u,f,p);return(f===r||a.bounds==="ticks"||h===1)&&kB(u,f,p),Object.keys(u).sort((m,y)=>m-y).map(m=>+m)}getLabelForValue(t){const n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(t,r.tooltipFormat):n.format(t,r.displayFormats.datetime)}format(t,n){const a=this.options.time.displayFormats,A=this._unit,s=n||a[A];return this._adapter.format(t,s)}_tickFormatFunction(t,n,r,a){const A=this.options,s=A.ticks.callback;if(s)return He(s,[t,n,r],this);const o=A.time.displayFormats,l=this._unit,c=this._majorUnit,u=l&&o[l],d=c&&o[c],f=r[n],h=c&&d&&f&&f.major;return this._adapter.format(t,a||(h?d:u))}generateTickLabels(t){let n,r,a;for(n=0,r=t.length;n<r;++n)a=t[n],a.label=this._tickFormatFunction(a.value,n,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const n=this._offsets,r=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+r)*n.factor)}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+r*(this.max-this.min)}_getLabelSize(t){const n=this.options.ticks,r=this.ctx.measureText(t).width,a=Et(this.isHorizontal()?n.maxRotation:n.minRotation),A=Math.cos(a),s=Math.sin(a),o=this._resolveTickFontOptions(0).size;return{w:r*A+o*s,h:r*s+o*A}}_getLabelCapacity(t){const n=this.options.time,r=n.displayFormats,a=r[n.unit]||r.millisecond,A=this._tickFormatFunction(t,0,SB(this,[t],this._majorUnit),a),s=this._getLabelSize(A),o=Math.floor(this.isHorizontal()?this.width/s.w:this.height/s.h)-1;return o>0?o:1}getDataTimestamps(){let t=this._cache.data||[],n,r;if(t.length)return t;const a=this.getMatchingVisibleMetas();if(this._normalized&&a.length)return this._cache.data=a[0].controller.getAllParsedValues(this);for(n=0,r=a.length;n<r;++n)t=t.concat(a[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let n,r;if(t.length)return t;const a=this.getLabels();for(n=0,r=a.length;n<r;++n)t.push(CB(this,a[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return Ub(t.sort(q9))}}R(Io,"id","time"),R(Io,"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 ql(e,t,n){let r=0,a=e.length-1,A,s,o,l;n?(t>=e[r].pos&&t<=e[a].pos&&({lo:r,hi:a}=Wr(e,"pos",t)),{pos:A,time:o}=e[r],{pos:s,time:l}=e[a]):(t>=e[r].time&&t<=e[a].time&&({lo:r,hi:a}=Wr(e,"time",t)),{time:A,pos:o}=e[r],{time:s,pos:l}=e[a]);const c=s-A;return c?o+(l-o)*(t-A)/c:o}class zh extends Io{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=ql(n,this.min),this._tableRange=ql(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:r}=this,a=[],A=[];let s,o,l,c,u;for(s=0,o=t.length;s<o;++s)c=t[s],c>=n&&c<=r&&a.push(c);if(a.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(s=0,o=a.length;s<o;++s)u=a[s+1],l=a[s-1],c=a[s],Math.round((u+l)/2)!==c&&A.push({time:c,pos:s/(o-1)});return A}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),r=this.getLabelTimestamps();return n.length&&r.length?t=this.normalize(n.concat(r)):t=n.length?n:r,t=this._cache.all=t,t}getDecimalForValue(t){return(ql(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return ql(this._table,r*this._tableRange+this._minPos,!0)}}R(zh,"id","timeseries"),R(zh,"defaults",Io.defaults);var eN=Object.freeze({__proto__:null,CategoryScale:Kh,LinearScale:$h,LogarithmicScale:Wh,RadialLinearScale:Ui,TimeScale:Io,TimeSeriesScale:zh});const Cr=[i7,OM,I9,eN];var tN=typeof global=="object"&&global&&global.Object===Object&&global;const y_=tN;var nN=typeof self=="object"&&self&&self.Object===Object&&self,rN=y_||nN||Function("return this")();const Er=rN;var aN=Er.Symbol;const ja=aN;var w_=Object.prototype,AN=w_.hasOwnProperty,sN=w_.toString,vi=ja?ja.toStringTag:void 0;function iN(e){var t=AN.call(e,vi),n=e[vi];try{e[vi]=void 0;var r=!0}catch{}var a=sN.call(e);return r&&(t?e[vi]=n:delete e[vi]),a}var oN=Object.prototype,lN=oN.toString;function cN(e){return lN.call(e)}var uN="[object Null]",dN="[object Undefined]",xB=ja?ja.toStringTag:void 0;function al(e){return e==null?e===void 0?dN:uN:xB&&xB in Object(e)?iN(e):cN(e)}function MA(e){return e!=null&&typeof e=="object"}var fN=Array.isArray;const $s=fN;function Al(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var hN="[object AsyncFunction]",pN="[object Function]",gN="[object GeneratorFunction]",mN="[object Proxy]";function b_(e){if(!Al(e))return!1;var t=al(e);return t==pN||t==gN||t==hN||t==mN}var vN=Er["__core-js_shared__"];const Cf=vN;var FB=function(){var e=/[^.]+$/.exec(Cf&&Cf.keys&&Cf.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function BN(e){return!!FB&&FB in e}var yN=Function.prototype,wN=yN.toString;function WA(e){if(e!=null){try{return wN.call(e)}catch{}try{return e+""}catch{}}return""}var bN=/[\\^$.*+?()[\]{}|]/g,_N=/^\[object .+?Constructor\]$/,CN=Function.prototype,EN=Object.prototype,kN=CN.toString,SN=EN.hasOwnProperty,xN=RegExp("^"+kN.call(SN).replace(bN,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function FN(e){if(!Al(e)||BN(e))return!1;var t=b_(e)?xN:_N;return t.test(WA(e))}function IN(e,t){return e==null?void 0:e[t]}function GA(e,t){var n=IN(e,t);return FN(n)?n:void 0}var UN=GA(Er,"WeakMap");const jh=UN;var IB=Object.create,QN=function(){function e(){}return function(t){if(!Al(t))return{};if(IB)return IB(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();const TN=QN;function DN(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var LN=function(){try{var e=GA(Object,"defineProperty");return e({},"",{}),e}catch{}}();const UB=LN;function ON(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var MN=9007199254740991,NN=/^(?:0|[1-9]\d*)$/;function PN(e,t){var n=typeof e;return t=t??MN,!!t&&(n=="number"||n!="symbol"&&NN.test(e))&&e>-1&&e%1==0&&e<t}function __(e,t,n){t=="__proto__"&&UB?UB(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Jg(e,t){return e===t||e!==e&&t!==t}var HN=Object.prototype,RN=HN.hasOwnProperty;function C_(e,t,n){var r=e[t];(!(RN.call(e,t)&&Jg(r,n))||n===void 0&&!(t in e))&&__(e,t,n)}function ad(e,t,n,r){var a=!n;n||(n={});for(var A=-1,s=t.length;++A<s;){var o=t[A],l=r?r(n[o],e[o],o,n,e):void 0;l===void 0&&(l=e[o]),a?__(n,o,l):C_(n,o,l)}return n}var VN=9007199254740991;function E_(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=VN}function Zg(e){return e!=null&&E_(e.length)&&!b_(e)}var KN=Object.prototype;function Ad(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||KN;return e===n}function $N(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var WN="[object Arguments]";function QB(e){return MA(e)&&al(e)==WN}var k_=Object.prototype,GN=k_.hasOwnProperty,zN=k_.propertyIsEnumerable,jN=QB(function(){return arguments}())?QB:function(e){return MA(e)&&GN.call(e,"callee")&&!zN.call(e,"callee")};const S_=jN;function YN(){return!1}var x_=typeof exports=="object"&&exports&&!exports.nodeType&&exports,TB=x_&&typeof module=="object"&&module&&!module.nodeType&&module,qN=TB&&TB.exports===x_,DB=qN?Er.Buffer:void 0,XN=DB?DB.isBuffer:void 0,JN=XN||YN;const Uo=JN;var ZN="[object Arguments]",eP="[object Array]",tP="[object Boolean]",nP="[object Date]",rP="[object Error]",aP="[object Function]",AP="[object Map]",sP="[object Number]",iP="[object Object]",oP="[object RegExp]",lP="[object Set]",cP="[object String]",uP="[object WeakMap]",dP="[object ArrayBuffer]",fP="[object DataView]",hP="[object Float32Array]",pP="[object Float64Array]",gP="[object Int8Array]",mP="[object Int16Array]",vP="[object Int32Array]",BP="[object Uint8Array]",yP="[object Uint8ClampedArray]",wP="[object Uint16Array]",bP="[object Uint32Array]",nt={};nt[hP]=nt[pP]=nt[gP]=nt[mP]=nt[vP]=nt[BP]=nt[yP]=nt[wP]=nt[bP]=!0;nt[ZN]=nt[eP]=nt[dP]=nt[tP]=nt[fP]=nt[nP]=nt[rP]=nt[aP]=nt[AP]=nt[sP]=nt[iP]=nt[oP]=nt[lP]=nt[cP]=nt[uP]=!1;function _P(e){return MA(e)&&E_(e.length)&&!!nt[al(e)]}function em(e){return function(t){return e(t)}}var F_=typeof exports=="object"&&exports&&!exports.nodeType&&exports,to=F_&&typeof module=="object"&&module&&!module.nodeType&&module,CP=to&&to.exports===F_,Ef=CP&&y_.process,EP=function(){try{var e=to&&to.require&&to.require("util").types;return e||Ef&&Ef.binding&&Ef.binding("util")}catch{}}();const Ws=EP;var LB=Ws&&Ws.isTypedArray,kP=LB?em(LB):_P;const tm=kP;var SP=Object.prototype,xP=SP.hasOwnProperty;function I_(e,t){var n=$s(e),r=!n&&S_(e),a=!n&&!r&&Uo(e),A=!n&&!r&&!a&&tm(e),s=n||r||a||A,o=s?$N(e.length,String):[],l=o.length;for(var c in e)(t||xP.call(e,c))&&!(s&&(c=="length"||a&&(c=="offset"||c=="parent")||A&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||PN(c,l)))&&o.push(c);return o}function U_(e,t){return function(n){return e(t(n))}}var FP=U_(Object.keys,Object);const IP=FP;var UP=Object.prototype,QP=UP.hasOwnProperty;function Q_(e){if(!Ad(e))return IP(e);var t=[];for(var n in Object(e))QP.call(e,n)&&n!="constructor"&&t.push(n);return t}function nm(e){return Zg(e)?I_(e):Q_(e)}function TP(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var DP=Object.prototype,LP=DP.hasOwnProperty;function OP(e){if(!Al(e))return TP(e);var t=Ad(e),n=[];for(var r in e)r=="constructor"&&(t||!LP.call(e,r))||n.push(r);return n}function rm(e){return Zg(e)?I_(e,!0):OP(e)}var MP=GA(Object,"create");const Qo=MP;function NP(){this.__data__=Qo?Qo(null):{},this.size=0}function PP(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var HP="__lodash_hash_undefined__",RP=Object.prototype,VP=RP.hasOwnProperty;function KP(e){var t=this.__data__;if(Qo){var n=t[e];return n===HP?void 0:n}return VP.call(t,e)?t[e]:void 0}var $P=Object.prototype,WP=$P.hasOwnProperty;function GP(e){var t=this.__data__;return Qo?t[e]!==void 0:WP.call(t,e)}var zP="__lodash_hash_undefined__";function jP(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Qo&&t===void 0?zP:t,this}function NA(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}NA.prototype.clear=NP;NA.prototype.delete=PP;NA.prototype.get=KP;NA.prototype.has=GP;NA.prototype.set=jP;function YP(){this.__data__=[],this.size=0}function sd(e,t){for(var n=e.length;n--;)if(Jg(e[n][0],t))return n;return-1}var qP=Array.prototype,XP=qP.splice;function JP(e){var t=this.__data__,n=sd(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():XP.call(t,n,1),--this.size,!0}function ZP(e){var t=this.__data__,n=sd(t,e);return n<0?void 0:t[n][1]}function eH(e){return sd(this.__data__,e)>-1}function tH(e,t){var n=this.__data__,r=sd(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function sa(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}sa.prototype.clear=YP;sa.prototype.delete=JP;sa.prototype.get=ZP;sa.prototype.has=eH;sa.prototype.set=tH;var nH=GA(Er,"Map");const To=nH;function rH(){this.size=0,this.__data__={hash:new NA,map:new(To||sa),string:new NA}}function aH(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function id(e,t){var n=e.__data__;return aH(t)?n[typeof t=="string"?"string":"hash"]:n.map}function AH(e){var t=id(this,e).delete(e);return this.size-=t?1:0,t}function sH(e){return id(this,e).get(e)}function iH(e){return id(this,e).has(e)}function oH(e,t){var n=id(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function zA(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}zA.prototype.clear=rH;zA.prototype.delete=AH;zA.prototype.get=sH;zA.prototype.has=iH;zA.prototype.set=oH;function T_(e,t){for(var n=-1,r=t.length,a=e.length;++n<r;)e[a+n]=t[n];return e}var lH=U_(Object.getPrototypeOf,Object);const D_=lH;function cH(){this.__data__=new sa,this.size=0}function uH(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function dH(e){return this.__data__.get(e)}function fH(e){return this.__data__.has(e)}var hH=200;function pH(e,t){var n=this.__data__;if(n instanceof sa){var r=n.__data__;if(!To||r.length<hH-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new zA(r)}return n.set(e,t),this.size=n.size,this}function qr(e){var t=this.__data__=new sa(e);this.size=t.size}qr.prototype.clear=cH;qr.prototype.delete=uH;qr.prototype.get=dH;qr.prototype.has=fH;qr.prototype.set=pH;function gH(e,t){return e&&ad(t,nm(t),e)}function mH(e,t){return e&&ad(t,rm(t),e)}var L_=typeof exports=="object"&&exports&&!exports.nodeType&&exports,OB=L_&&typeof module=="object"&&module&&!module.nodeType&&module,vH=OB&&OB.exports===L_,MB=vH?Er.Buffer:void 0,NB=MB?MB.allocUnsafe:void 0;function BH(e,t){if(t)return e.slice();var n=e.length,r=NB?NB(n):new e.constructor(n);return e.copy(r),r}function yH(e,t){for(var n=-1,r=e==null?0:e.length,a=0,A=[];++n<r;){var s=e[n];t(s,n,e)&&(A[a++]=s)}return A}function O_(){return[]}var wH=Object.prototype,bH=wH.propertyIsEnumerable,PB=Object.getOwnPropertySymbols,_H=PB?function(e){return e==null?[]:(e=Object(e),yH(PB(e),function(t){return bH.call(e,t)}))}:O_;const am=_H;function CH(e,t){return ad(e,am(e),t)}var EH=Object.getOwnPropertySymbols,kH=EH?function(e){for(var t=[];e;)T_(t,am(e)),e=D_(e);return t}:O_;const M_=kH;function SH(e,t){return ad(e,M_(e),t)}function N_(e,t,n){var r=t(e);return $s(e)?r:T_(r,n(e))}function Yh(e){return N_(e,nm,am)}function xH(e){return N_(e,rm,M_)}var FH=GA(Er,"DataView");const qh=FH;var IH=GA(Er,"Promise");const Xh=IH;var UH=GA(Er,"Set");const Jh=UH;var HB="[object Map]",QH="[object Object]",RB="[object Promise]",VB="[object Set]",KB="[object WeakMap]",$B="[object DataView]",TH=WA(qh),DH=WA(To),LH=WA(Xh),OH=WA(Jh),MH=WA(jh),hA=al;(qh&&hA(new qh(new ArrayBuffer(1)))!=$B||To&&hA(new To)!=HB||Xh&&hA(Xh.resolve())!=RB||Jh&&hA(new Jh)!=VB||jh&&hA(new jh)!=KB)&&(hA=function(e){var t=al(e),n=t==QH?e.constructor:void 0,r=n?WA(n):"";if(r)switch(r){case TH:return $B;case DH:return HB;case LH:return RB;case OH:return VB;case MH:return KB}return t});const Gs=hA;var NH=Object.prototype,PH=NH.hasOwnProperty;function HH(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&PH.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var RH=Er.Uint8Array;const gu=RH;function Am(e){var t=new e.constructor(e.byteLength);return new gu(t).set(new gu(e)),t}function VH(e,t){var n=t?Am(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var KH=/\w*$/;function $H(e){var t=new e.constructor(e.source,KH.exec(e));return t.lastIndex=e.lastIndex,t}var WB=ja?ja.prototype:void 0,GB=WB?WB.valueOf:void 0;function WH(e){return GB?Object(GB.call(e)):{}}function GH(e,t){var n=t?Am(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var zH="[object Boolean]",jH="[object Date]",YH="[object Map]",qH="[object Number]",XH="[object RegExp]",JH="[object Set]",ZH="[object String]",eR="[object Symbol]",tR="[object ArrayBuffer]",nR="[object DataView]",rR="[object Float32Array]",aR="[object Float64Array]",AR="[object Int8Array]",sR="[object Int16Array]",iR="[object Int32Array]",oR="[object Uint8Array]",lR="[object Uint8ClampedArray]",cR="[object Uint16Array]",uR="[object Uint32Array]";function dR(e,t,n){var r=e.constructor;switch(t){case tR:return Am(e);case zH:case jH:return new r(+e);case nR:return VH(e,n);case rR:case aR:case AR:case sR:case iR:case oR:case lR:case cR:case uR:return GH(e,n);case YH:return new r;case qH:case ZH:return new r(e);case XH:return $H(e);case JH:return new r;case eR:return WH(e)}}function fR(e){return typeof e.constructor=="function"&&!Ad(e)?TN(D_(e)):{}}var hR="[object Map]";function pR(e){return MA(e)&&Gs(e)==hR}var zB=Ws&&Ws.isMap,gR=zB?em(zB):pR;const mR=gR;var vR="[object Set]";function BR(e){return MA(e)&&Gs(e)==vR}var jB=Ws&&Ws.isSet,yR=jB?em(jB):BR;const wR=yR;var bR=1,_R=2,CR=4,P_="[object Arguments]",ER="[object Array]",kR="[object Boolean]",SR="[object Date]",xR="[object Error]",H_="[object Function]",FR="[object GeneratorFunction]",IR="[object Map]",UR="[object Number]",R_="[object Object]",QR="[object RegExp]",TR="[object Set]",DR="[object String]",LR="[object Symbol]",OR="[object WeakMap]",MR="[object ArrayBuffer]",NR="[object DataView]",PR="[object Float32Array]",HR="[object Float64Array]",RR="[object Int8Array]",VR="[object Int16Array]",KR="[object Int32Array]",$R="[object Uint8Array]",WR="[object Uint8ClampedArray]",GR="[object Uint16Array]",zR="[object Uint32Array]",Ye={};Ye[P_]=Ye[ER]=Ye[MR]=Ye[NR]=Ye[kR]=Ye[SR]=Ye[PR]=Ye[HR]=Ye[RR]=Ye[VR]=Ye[KR]=Ye[IR]=Ye[UR]=Ye[R_]=Ye[QR]=Ye[TR]=Ye[DR]=Ye[LR]=Ye[$R]=Ye[WR]=Ye[GR]=Ye[zR]=!0;Ye[xR]=Ye[H_]=Ye[OR]=!1;function Hc(e,t,n,r,a,A){var s,o=t&bR,l=t&_R,c=t&CR;if(n&&(s=a?n(e,r,a,A):n(e)),s!==void 0)return s;if(!Al(e))return e;var u=$s(e);if(u){if(s=HH(e),!o)return DN(e,s)}else{var d=Gs(e),f=d==H_||d==FR;if(Uo(e))return BH(e,o);if(d==R_||d==P_||f&&!a){if(s=l||f?{}:fR(e),!o)return l?SH(e,mH(s,e)):CH(e,gH(s,e))}else{if(!Ye[d])return a?e:{};s=dR(e,d,o)}}A||(A=new qr);var h=A.get(e);if(h)return h;A.set(e,s),wR(e)?e.forEach(function(y){s.add(Hc(y,t,n,y,e,A))}):mR(e)&&e.forEach(function(y,g){s.set(g,Hc(y,t,n,g,e,A))});var p=c?l?xH:Yh:l?rm:nm,m=u?void 0:p(e);return ON(m||e,function(y,g){m&&(g=y,y=e[g]),C_(s,g,Hc(y,t,n,g,e,A))}),s}var jR=1,YR=4;function Bi(e){return Hc(e,jR|YR)}var qR="__lodash_hash_undefined__";function XR(e){return this.__data__.set(e,qR),this}function JR(e){return this.__data__.has(e)}function mu(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new zA;++t<n;)this.add(e[t])}mu.prototype.add=mu.prototype.push=XR;mu.prototype.has=JR;function ZR(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function eV(e,t){return e.has(t)}var tV=1,nV=2;function V_(e,t,n,r,a,A){var s=n&tV,o=e.length,l=t.length;if(o!=l&&!(s&&l>o))return!1;var c=A.get(e),u=A.get(t);if(c&&u)return c==t&&u==e;var d=-1,f=!0,h=n&nV?new mu:void 0;for(A.set(e,t),A.set(t,e);++d<o;){var p=e[d],m=t[d];if(r)var y=s?r(m,p,d,t,e,A):r(p,m,d,e,t,A);if(y!==void 0){if(y)continue;f=!1;break}if(h){if(!ZR(t,function(g,v){if(!eV(h,v)&&(p===g||a(p,g,n,r,A)))return h.push(v)})){f=!1;break}}else if(!(p===m||a(p,m,n,r,A))){f=!1;break}}return A.delete(e),A.delete(t),f}function rV(e){var t=-1,n=Array(e.size);return e.forEach(function(r,a){n[++t]=[a,r]}),n}function aV(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var AV=1,sV=2,iV="[object Boolean]",oV="[object Date]",lV="[object Error]",cV="[object Map]",uV="[object Number]",dV="[object RegExp]",fV="[object Set]",hV="[object String]",pV="[object Symbol]",gV="[object ArrayBuffer]",mV="[object DataView]",YB=ja?ja.prototype:void 0,kf=YB?YB.valueOf:void 0;function vV(e,t,n,r,a,A,s){switch(n){case mV:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case gV:return!(e.byteLength!=t.byteLength||!A(new gu(e),new gu(t)));case iV:case oV:case uV:return Jg(+e,+t);case lV:return e.name==t.name&&e.message==t.message;case dV:case hV:return e==t+"";case cV:var o=rV;case fV:var l=r&AV;if(o||(o=aV),e.size!=t.size&&!l)return!1;var c=s.get(e);if(c)return c==t;r|=sV,s.set(e,t);var u=V_(o(e),o(t),r,a,A,s);return s.delete(e),u;case pV:if(kf)return kf.call(e)==kf.call(t)}return!1}var BV=1,yV=Object.prototype,wV=yV.hasOwnProperty;function bV(e,t,n,r,a,A){var s=n&BV,o=Yh(e),l=o.length,c=Yh(t),u=c.length;if(l!=u&&!s)return!1;for(var d=l;d--;){var f=o[d];if(!(s?f in t:wV.call(t,f)))return!1}var h=A.get(e),p=A.get(t);if(h&&p)return h==t&&p==e;var m=!0;A.set(e,t),A.set(t,e);for(var y=s;++d<l;){f=o[d];var g=e[f],v=t[f];if(r)var _=s?r(v,g,f,t,e,A):r(g,v,f,e,t,A);if(!(_===void 0?g===v||a(g,v,n,r,A):_)){m=!1;break}y||(y=f=="constructor")}if(m&&!y){var B=e.constructor,b=t.constructor;B!=b&&"constructor"in e&&"constructor"in t&&!(typeof B=="function"&&B instanceof B&&typeof b=="function"&&b instanceof b)&&(m=!1)}return A.delete(e),A.delete(t),m}var _V=1,qB="[object Arguments]",XB="[object Array]",Xl="[object Object]",CV=Object.prototype,JB=CV.hasOwnProperty;function EV(e,t,n,r,a,A){var s=$s(e),o=$s(t),l=s?XB:Gs(e),c=o?XB:Gs(t);l=l==qB?Xl:l,c=c==qB?Xl:c;var u=l==Xl,d=c==Xl,f=l==c;if(f&&Uo(e)){if(!Uo(t))return!1;s=!0,u=!1}if(f&&!u)return A||(A=new qr),s||tm(e)?V_(e,t,n,r,a,A):vV(e,t,l,n,r,a,A);if(!(n&_V)){var h=u&&JB.call(e,"__wrapped__"),p=d&&JB.call(t,"__wrapped__");if(h||p){var m=h?e.value():e,y=p?t.value():t;return A||(A=new qr),a(m,y,n,r,A)}}return f?(A||(A=new qr),bV(e,t,n,r,a,A)):!1}function K_(e,t,n,r,a){return e===t?!0:e==null||t==null||!MA(e)&&!MA(t)?e!==e&&t!==t:EV(e,t,n,r,K_,a)}var kV="[object Map]",SV="[object Set]",xV=Object.prototype,FV=xV.hasOwnProperty;function IV(e){if(e==null)return!0;if(Zg(e)&&($s(e)||typeof e=="string"||typeof e.splice=="function"||Uo(e)||tm(e)||S_(e)))return!e.length;var t=Gs(e);if(t==kV||t==SV)return!e.size;if(Ad(e))return!Q_(e).length;for(var n in e)if(FV.call(e,n))return!1;return!0}function ZB(e,t){return K_(e,t)}var UV=Object.defineProperty,QV=Object.defineProperties,TV=Object.getOwnPropertyDescriptors,ey=Object.getOwnPropertySymbols,DV=Object.prototype.hasOwnProperty,LV=Object.prototype.propertyIsEnumerable,ty=(e,t,n)=>t in e?UV(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,OV=(e,t)=>{for(var n in t||(t={}))DV.call(t,n)&&ty(e,n,t[n]);if(ey)for(var n of ey(t))LV.call(t,n)&&ty(e,n,t[n]);return e},MV=(e,t)=>QV(e,TV(t));function NV(e){return(e.match(/[a-zA-Z0-9]+/g)||[]).map(t=>`${t.charAt(0).toUpperCase()}${t.slice(1)}`).join("")}var aA=(e,t)=>{const n={chartData:{type:Object,required:!0},options:{type:Object,required:!1},chartId:{default:e,type:String},width:{default:400,type:Number},height:{default:400,type:Number},cssClasses:{type:String,default:""},styles:{type:Object},plugins:{type:Array,default:()=>[]},onLabelsUpdate:{type:Function},onChartUpdate:{type:Function},onChartDestroy:{type:Function},onChartRender:{type:Function}},r=NV(e);return i.defineComponent({name:r,props:n,emits:{"labels:update":()=>!0,"chart:update":a=>!0,"chart:destroy":()=>!0,"chart:render":a=>!0},setup(a,{emit:A,expose:s}){const o=i.ref(null),l=`${a.chartId}`;let c=i.shallowRef(null);i.watch(()=>a.chartData,u,{deep:!0}),i.watch(()=>a.options,y=>{c.value&&y&&(c.value.options=Bi(y),p())},{deep:!0});function u(y){if(c.value){let g=c.value;ZB(y.labels,c.value.data.labels)||(g.data.labels=y.labels,f()),ZB(y.datasets,c.value.data.datasets)||y.datasets.forEach((v,_)=>{var B,b;if(IV(v))g.data.datasets=[];else{const w=Bi(g.data),C=Object.keys((b=(B=w.datasets)==null?void 0:B[_])!=null?b:{}),k=Object.keys(v);C.filter(T=>T!=="_meta"&&k.indexOf(T)===-1).forEach(T=>{g.data.datasets[_]&&delete g.data.datasets[_][T]});for(const T in v){const U=Bi(v[T]);g.data.datasets[_]||(g.data.datasets[_]={}),v.hasOwnProperty(T)&&U!=null&&g&&(g.data.datasets[_][T]=U)}}}),p()}else c.value&&m(),d()}function d(){o.value?(c.value=new Le(o.value,{data:Bi(a.chartData),type:t,options:Bi(a.options),plugins:a.plugins}),h()):console.error(`Error on component ${r}, canvas cannot be rendered. Check if the render appends server-side`)}function f(){A("labels:update"),a.onLabelsUpdate&&a.onLabelsUpdate()}function h(){c.value&&(A("chart:render",c.value),a.onChartRender&&a.onChartRender(c.value))}function p(){c.value&&(c.value.update(),A("chart:update",c.value),a.onChartUpdate&&a.onChartUpdate(c.value))}function m(){c.value&&c.value.destroy(),A("chart:destroy"),a.onChartDestroy&&a.onChartDestroy()}return i.onMounted(d),i.onBeforeUnmount(()=>{c.value&&c.value.destroy()}),s({canvasRef:o,renderChart:d,chartInstance:c,canvasId:l,update:p}),()=>i.h("div",{style:MV(OV({maxWidth:"100%"},a.styles),{position:"relative"}),class:a.cssClasses},[i.h("canvas",{style:{maxWidth:"100%",maxHeight:"100%"},id:l,width:a.width,height:a.height,ref:o})])}})},od=aA("bar-chart","bar"),ld=aA("doughnut-chart","doughnut"),$_=aA("line-chart","line");aA("pie-chart","pie");aA("polar-chart","polarArea");aA("radar-chart","radar");aA("bubble-chart","bubble");aA("scatter-chart","scatter");const vu=i.defineComponent({__name:"InfoDoughnutChart",props:XD,setup(e){const t=e,n=i.ref(null);Le.register(...Cr);const r=i.computed(()=>{const A=t.info==="typeRef"?"types":"rarities",s={},o=St(t.deckCode);for(const c in o){const u=jt().cardJsonObject[c];if(u===void 0)continue;let d=u[t.info];d==="Unit"&&(d=u.supertype==="Champion"?"Champion":"Follower"),s[d]===void 0&&(s[d]=0),s[d]+=o[c]}const l=[];for(const c in s){const u=we().dataJson[A].find(f=>f.nameRef===c),d={key:c,value:s[c],color:u==null?void 0:u.color,name:u==null?void 0:u.name,order:u==null?void 0:u.order};l.push(d)}return console.log(l),l.sort((c,u)=>c.order-u.order),{labels:l.map(c=>c.name),datasets:[{data:l.map(c=>c.value),backgroundColor:l.map(c=>c.color)}]}}),a={cutout:55,layout:{padding:{top:10,bottom:10}},elements:{arc:{borderWidth:0}},plugins:{legend:{display:!0,position:"right",labels:{usePointStyle:!0,generateLabels(A){const s=[],o=A.data.labels;for(let l=0;l<A.data.labels.length;l++)s.push({text:`${o[l]} (${A.data.datasets[0].data[l]})`,borderRadius:999,datasetIndex:0,index:l,fontColor:Ha("--color-0"),fillStyle:A.data.datasets[0].backgroundColor[l]});return s}}},datalabels:{display:!1}}};return(A,s)=>(i.openBlock(),i.createBlock(i.unref(ld),{ref_key:"chart",ref:n,"chart-data":r.value,options:a},null,8,["chart-data"]))}}),PV={deck:{type:Object,required:!1,default:void 0},deckCode:{type:String,required:!1,default:void 0},paddingTop:{type:Number,required:!1,default:10},showDataLabels:{type:Boolean,required:!1,default:!0},dataLabelsOffset:{type:Number,required:!1,default:-10},tooltipsEnabled:{type:Boolean,required:!1,default:!0},displayXScale:{type:Boolean,required:!1,default:!0},animation:{type:Boolean,required:!1}};//! moment.js
|
|
828
828
|
//! version : 2.29.4
|
|
829
829
|
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
|
|
830
830
|
//! license : MIT
|
|
@@ -876,6 +876,6 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
|
876
876
|
Teacher: J. Willough
|
|
877
877
|
Report: I am spiderbit on left forearm. Sydell claims a misunderstanding, but his smirk belies his innocence. He is ordered to two weeks additional chores (refectory)."
|
|
878
878
|
- Ravenbloom discipline card`,artistName:"Polar Engine",name:"Spell Slinger",cardCode:"06NX013",keywords:["Fearsome"],keywordRefs:["Fearsome"],spellSpeedRef:"",rarityRef:"Common",subtypes:["SPIDER"],subtypeRefs:["SPIDER"],supertype:"",typeRef:"Unit",collectible:!0,set:"Set6",createdAt:"2022-09-09",updatedAt:"2022-09-14"}}},pne={class:"card-similar-cards"},gne=i.defineComponent({__name:"CardSimilarCards",props:hne,setup(e){const t=e;function n(a,A,s){if(a.length===10&&s<a[0].points)return;let o=0;for(;o<a.length&&a[o].points<s;)o++;a.splice(o,0,{cardCode:A,points:s}),a.length>10&&a.splice(0,1)}const r=i.computed(()=>{const a=[],A=jt().cardJsonObject;let s=0;for(const o in A){if(o===t.card.cardCode||t.card.collectible&&!A[o].collectible)continue;s=0;const l=A[o];for(const c of l.regionRefs)for(const u of t.card.regionRefs)c===u&&(s+=2);for(const c of l.subtypes)for(const u of t.card.subtypes)c===u&&(s+=2);for(const c of l.keywordRefs)for(const u of t.card.keywordRefs)c===u&&(s+=1);l.typeRef===t.card.typeRef&&(s+=3),l.rarityRef!=="None"&&l.rarityRef===t.card.rarityRef&&(s+=1),l.typeRef==="Unit"&&t.card.typeRef==="Unit"&&(s+=(9-Math.abs(l.attack-t.card.attack))/3,s+=(9-Math.abs(l.health-t.card.health))/3),s+=(12-Math.abs(l.cost-t.card.cost))/3,n(a,o,s)}return a.reverse().map(o=>jt().cardJsonObject[o.cardCode])});return(a,A)=>(i.openBlock(),i.createElementBlock("div",pne,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.value,s=>(i.openBlock(),i.createBlock(i.unref(Zm),{key:s.cardCode,"card-prop":s,"is-root":!0,"router-link":i.unref(nn)().callbacks.cardCodeRouterLinkCallback(s.cardCode)},null,8,["card-prop","router-link"]))),128))]))}});const h3=M(gne,[["__scopeId","data-v-4db54a8d"]]),mne={logoType:{type:String,required:!0,default:"logo-and-text"}},p3=e=>(i.pushScopeId("data-v-bb0b24b5"),e=e(),i.popScopeId(),e),vne={key:0,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 862.33 136.654"},Bne=i.createStaticVNode('<path d="M0 2.947h18.418V115.29h77.35v18.416H0Z" data-v-bb0b24b5></path><path d="M205.729 0a68.327 68.327 0 1 1-68.326 68.331A68.3 68.3 0 0 1 205.729 0Zm0 118.236a49.908 49.908 0 1 0-49.909-49.909 49.948 49.948 0 0 0 49.909 49.904Z" data-v-bb0b24b5></path><path d="M396.538 2.947a42.211 42.211 0 0 1 41.991 41.991 41.554 41.554 0 0 1-32.046 40.7l29.1 48.067H414.22l-28.363-46.962h-32.046v46.962h-18.416V68.326h39.413l-39.413-65.38Zm0 65.38a23.481 23.481 0 1 0 0-46.962h-28.73l28.363 46.962Z" data-v-bb0b24b5></path><path d="M495.266 115.291h18.418v18.416h-18.418Z" data-v-bb0b24b5></path><path d="M685.517 60.778v72.928h-18.418v-6.443a68.378 68.378 0 1 1 12.894-107.926l-12.894 13.076a49.909 49.909 0 1 0 0 71.827V79.192h-49.726V60.779Z" data-v-bb0b24b5></path><path d="M862.33 60.778v72.928h-18.417v-6.443a68.379 68.379 0 1 1 12.89-107.926l-12.89 13.076a49.909 49.909 0 1 0 0 71.827V79.192H794.19V60.779Z" data-v-bb0b24b5></path>',6),yne=[Bne],wne={key:1,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 926.43 201.096"},bne=i.createStaticVNode('<path d="M251.125 49.347h14.423v87.978h60.574v14.422h-75Z" data-v-bb0b24b5></path><path d="M412.235 47.039a53.507 53.507 0 1 1-53.508 53.507 53.487 53.487 0 0 1 53.508-53.507Zm0 92.592a39.084 39.084 0 1 0-39.085-39.084 39.115 39.115 0 0 0 39.085 39.084Z" data-v-bb0b24b5></path><path d="M561.66 49.347a33.056 33.056 0 0 1 32.884 32.884 32.542 32.542 0 0 1-25.1 31.873l22.787 37.642h-16.729l-22.212-36.777h-25.1v36.777h-14.422v-51.2h30.865l-30.865-51.2Zm0 51.2a18.388 18.388 0 1 0 0-36.776h-22.5l22.211 36.776Z" data-v-bb0b24b5></path><path d="M638.976 137.325h14.423v14.422h-14.423Z" data-v-bb0b24b5></path><path d="M787.964 94.635v57.111h-14.422V146.7a53.547 53.547 0 1 1 10.1-84.518l-10.1 10.24a39.084 39.084 0 1 0 0 56.248v-19.616h-38.939v-14.42Z" data-v-bb0b24b5></path><path d="M926.429 94.635v57.111h-14.423V146.7A53.548 53.548 0 1 1 922.1 62.182l-10.094 10.24a39.084 39.084 0 1 0 0 56.248v-19.616h-38.939v-14.42Z" data-v-bb0b24b5></path><path d="M100.548 0A100.548 100.548 0 0 1 201.1 100.548a98.177 98.177 0 0 1-3.633 26.46c-.011-.011-17.535 0-17.535 0s5.292-19.211 5.292-26.46a84.672 84.672 0 0 0-169.344 0c0 46.782 39.667 84.672 84.672 84.672s73.348-43.16 73.348-43.16h18.252A100.558 100.558 0 1 1 100.548 0Z" data-v-bb0b24b5></path><path d="M108.72 45.643c19.711 0 36.623 15.51 36.623 34.994 0 16.991-12.308 31.253-28.078 34.994l15.87 25.34h59.707s-4 7.623-11.509 11.243-18.271 3.238-18.271 3.238h-38.473l-24.415-39.821H72.097v39.821h-15.87V99.945h34.182l-34.182-54.3Zm0 54.3c11.2 0 20.753-8.242 20.753-19.307s-9.557-19.307-20.753-19.307H84.304l24.416 38.614Z" data-v-bb0b24b5></path>',8),_ne=[bne],Cne={key:2,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 201.1 201.12"},Ene=p3(()=>i.createElementVNode("path",{d:"M100.548 0A100.548 100.548 0 0 1 201.1 100.548a98.177 98.177 0 0 1-3.633 26.46c-.011-.011-17.535 0-17.535 0s5.292-19.211 5.292-26.46a84.672 84.672 0 0 0-169.344 0c0 46.782 39.667 84.672 84.672 84.672s73.348-43.16 73.348-43.16h18.252A100.558 100.558 0 1 1 100.548 0Z"},null,-1)),kne=p3(()=>i.createElementVNode("path",{d:"M108.72 45.643c19.711 0 36.623 15.51 36.623 34.994 0 16.991-12.308 31.253-28.078 34.994l15.87 25.34h59.707s-4 7.623-11.509 11.243-18.271 3.238-18.271 3.238h-38.473l-24.415-39.821H72.097v39.821h-15.87V99.945h34.182l-34.182-54.3Zm0 54.3c11.2 0 20.753-8.242 20.753-19.307s-9.557-19.307-20.753-19.307H84.304l24.416 38.614Z"},null,-1)),Sne=[Ene,kne],xne=i.defineComponent({__name:"LogoIcon",props:mne,setup(e){const t=e;return(n,r)=>t.logoType==="text-only"?(i.openBlock(),i.createElementBlock("svg",vne,yne)):t.logoType==="logo-and-text"?(i.openBlock(),i.createElementBlock("svg",wne,_ne)):(i.openBlock(),i.createElementBlock("svg",Cne,Sne))}});const Ys=M(xne,[["__scopeId","data-v-bb0b24b5"]]),Fne={class:"dashboard-sign-up"},Ine={class:"top"},Une={class:"subtitle"},Qne={class:"fancy-button"},Tne=i.defineComponent({__name:"DashboardSignUp",setup(e){const{t}=se();return(n,r)=>(i.openBlock(),i.createElementBlock("div",Fne,[i.createElementVNode("div",Ine,[i.createVNode(Ys,{"logo-type":"text-only",class:"logo-icon"}),i.createElementVNode("div",Une,i.toDisplayString(i.unref(t)("general.becomeTheMaster")),1)]),i.createElementVNode("div",Qne,i.toDisplayString(i.unref(t)("general.signIn")),1)]))}});const g3=M(Tne,[["__scopeId","data-v-e398dd28"]]),Dne={deckCode:{type:String,required:!0,default:""},gameMode:{type:String,required:!0,default:""},gameType:{type:String,required:!0,default:""},isAttackingFirst:{type:Boolean,required:!0,default:!0},isVictory:{type:Boolean,required:!0,default:""},opponentDeckCode:{type:String,required:!0,default:""},opponentName:{type:String,required:!0,default:""},playedAt:{type:Date,required:!0,default:new Date},opponentRouterLink:{type:Object,required:!0,default:""}},Lne=e=>(i.pushScopeId("data-v-554944b2"),e=e(),i.popScopeId(),e),One={class:"match-item"},Mne=Lne(()=>i.createElementVNode("div",{class:"background-card"},null,-1)),Nne=[Mne],Pne={class:"details"},Hne={class:"match-details"},Rne={class:"game-type"},Vne={class:"time"},Kne={class:"main"},$ne={class:"container"},Wne={class:"container"},Gne=i.defineComponent({__name:"MatchItem",props:Dne,setup(e){const t=e,{t:n}=se(),r=i.inject(HA),a=i.computed(()=>St(t.deckCode)),A=i.computed(()=>St(t.opponentDeckCode)),s=i.computed(()=>[Pa(rn(a.value),a.value,1)[0],Pa(rn(A.value),A.value,1)[0]].map(o=>`https://lor.gg/storage/cards/banner/${o==null?void 0:o.cardCode}.png`));return(o,l)=>{const c=i.resolveComponent("RouterLink");return i.openBlock(),i.createElementBlock("div",One,[i.createElementVNode("div",{class:"background",style:i.normalizeStyle({"--background-image":`url(${s.value[0]})`})},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(s.value,u=>(i.openBlock(),i.createElementBlock("div",{key:u,class:"background-card-wrapper",style:i.normalizeStyle({"--background-image":`url(${u})`})},Nne,4))),128))],4),i.createElementVNode("div",Pne,[i.createElementVNode("div",Hne,[i.createElementVNode("div",Rne,i.toDisplayString(t.gameType),1),i.createElementVNode("div",Vne,i.toDisplayString(i.unref(r)(t.playedAt).fromNow()),1)]),i.createVNode(c,{to:t.opponentRouterLink,class:"opponent-details"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(t.opponentName),1)]),_:1},8,["to"])]),i.createElementVNode("div",Kne,[i.createElementVNode("div",$ne,[i.createVNode(Ja,{class:"deck-highlight",deck:a.value},null,8,["deck"])]),i.createElementVNode("div",{class:"container results",style:i.normalizeStyle({color:t.isVictory?"var(--color-good)":"var(--color-bad)"})},i.toDisplayString(t.isVictory?i.unref(n)("general.victory"):i.unref(n)("general.defeat")),5),i.createElementVNode("div",Wne,[i.createVNode(Ja,{class:"deck-highlight opponent",deck:A.value},null,8,["deck"])])])])}}});const m3=M(Gne,[["__scopeId","data-v-554944b2"]]),zne={players:{type:Array,required:!0,default:[]}},jne={class:"leaderboard-top-10-region"},Yne=i.defineComponent({__name:"LeaderboardTop10Region",props:zne,setup(e){const t=e;return(n,r)=>(i.openBlock(),i.createElementBlock("div",jne,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(t.players,a=>(i.openBlock(),i.createBlock(fn,{key:`${a.name}${a.rank}`,"card-code-prop":a.selected_banner_card??void 0,color:a.selected_banner_color??"var(--color-background-2-rgb)","mana-number":a.rank,name:a.name,"quantity-number":a.lp,"ignore-card-item":!0,"router-link":i.unref(nn)().callbacks.playerRouterLinkCallback(a)},null,8,["card-code-prop","color","mana-number","name","quantity-number","router-link"]))),128))]))}});const n1=M(Yne,[["__scopeId","data-v-41d779ee"]]),qne={routerLink:{type:Object,required:!0,default:{path:"/404"}},index:{type:Number,required:!0,default:0},change:{type:Number,required:!0,default:null},favorite_deck:{type:String,required:!0,default:null},lp:{type:Number,required:!0,default:0},matches:{type:Number,required:!0,default:null},name:{type:String,required:!0,default:""},rank:{type:Number,required:!0,default:0},selected_banner_card:{type:String,required:!1,default:null},selected_banner_color:{type:String,required:!1,default:null},server:{type:String,required:!0,default:"americas"},updated_at:{type:String,required:!0,default:""},user_id:{type:Number,required:!0,default:null},wins:{type:Number,required:!0,default:null},shownColumns:{type:Object,required:!0,default:{player:!0,lp:!0,change:!0,wins:!0,matches:!0,winrate:!0,deck:!0}}},Xne={class:"leaderboard-detail-row-background-wrapper"},Jne={class:"leaderboard-detail-row-background"},Zne={class:"leaderboard-detail-row wrapper"},ere={key:1,class:"column-content"},tre={key:3,class:"column-content"},nre={key:4,class:"column-content"},rre={key:6,class:"column-content deck-highlight-wrapper"},are={key:1},Are=i.defineComponent({__name:"LeaderboardDetailRow",props:qne,setup(e){const t=e,n=i.computed(()=>t.selected_banner_card?["",`https://lor.gg/storage/cards/banner/${t.selected_banner_card}.png`]:[]),r=i.computed(()=>t.change===null||t.change===void 0?[]:t.change===0?["neutral"]:[t.change>0?"good":"bad"]);return(a,A)=>{const s=i.resolveComponent("RouterLink");return i.openBlock(),i.createBlock(s,{to:t.routerLink,class:"wrapper"},{default:i.withCtx(()=>[i.createElementVNode("div",{class:"leaderboard-detail-row-wrapper wrapper",style:i.normalizeStyle({"--index":t.index})},[i.createElementVNode("div",Xne,[i.createElementVNode("div",Jne,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.value,o=>(i.openBlock(),i.createElementBlock("div",{key:o,class:"background-card",style:i.normalizeStyle({"--background-image":`url(${o})`})},null,4))),128))])]),i.createElementVNode("div",Zne,[t.shownColumns.player?(i.openBlock(),i.createElementBlock("div",{key:0,class:"column-content card-wrapper",onClick:A[0]||(A[0]=i.withModifiers(()=>{},["stop","prevent"]))},[i.createVNode(fn,{class:"card-slice-item","card-code-prop":t.selected_banner_card??void 0,color:t.selected_banner_color??"var(--color-background-2-rgb)","ignore-card-item":!0,"mana-number":t.rank,name:t.name,"maintain-aspect-ratio":!0,"router-link":t.routerLink},null,8,["card-code-prop","color","mana-number","name","router-link"])])):i.createCommentVNode("",!0),t.shownColumns.lp?(i.openBlock(),i.createElementBlock("div",ere,i.toDisplayString(i.unref(Te)(t.lp)),1)):i.createCommentVNode("",!0),t.shownColumns.change?(i.openBlock(),i.createElementBlock("div",{key:2,class:i.normalizeClass(["column-content change",r.value])},[t.change!==null?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createVNode(i.unref(Ue),{class:"icon",icon:"fa-chevron-down"}),i.createElementVNode("span",null,i.toDisplayString(t.change?i.unref(Te)(Math.abs(t.change)):""),1)],64)):(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[],64))],2)):i.createCommentVNode("",!0),t.shownColumns.wins?(i.openBlock(),i.createElementBlock("div",tre,i.toDisplayString(i.unref(Te)(t.wins)),1)):i.createCommentVNode("",!0),t.shownColumns.matches?(i.openBlock(),i.createElementBlock("div",nre,i.toDisplayString(i.unref(Te)(t.matches)),1)):i.createCommentVNode("",!0),t.shownColumns.winrate?(i.openBlock(),i.createElementBlock("div",{key:5,class:"column-content",style:i.normalizeStyle({color:t.wins===null||t.matches===null?"var(--color-primary-2)":`var(${i.unref(Zn)(t.wins/t.matches)})`})},i.toDisplayString(t.matches===null||t.wins===null?"-":i.unref(Te)(t.wins/t.matches*100,1,3)+"%"),5)):i.createCommentVNode("",!0),t.shownColumns.deck?(i.openBlock(),i.createElementBlock("div",rre,[t.favorite_deck?(i.openBlock(),i.createBlock(Ja,{key:0,"deck-code":t.favorite_deck},null,8,["deck-code"])):(i.openBlock(),i.createElementBlock("span",are,"-"))])):i.createCommentVNode("",!0)])],4)]),_:1},8,["to"])}}});const r1=M(Are,[["__scopeId","data-v-b85984b9"]]),sre={routerLink:{type:Object,required:!0,default:{path:"/404"}},playerRouterLink:{type:Object,required:!0,default:{path:"/404"}},deckCode:{type:String,required:!0,default:""},type:{type:String,required:!0,default:"built"},wins:{type:Number,required:!1,default:0},matches:{type:Number,required:!1,default:0},deckId:{type:Number,required:!1,default:0},userName:{type:String,required:!1,default:""},userId:{type:Number,required:!1,default:0},deckName:{type:String,required:!1,default:""},updatedAt:{type:Date,required:!1,default:new Date},archetypeRouterLink:{type:Object,required:!1,default:"404"},deckBuilderRouterLink:{type:Object,required:!0,default:"404"},showOwnerButtons:{type:Boolean,required:!1,default:!1},isPrivate:{type:Boolean,required:!1,default:!1}};const ire={},ore=e=>(i.pushScopeId("data-v-5b8e191d"),e=e(),i.popScopeId(),e),lre={xmlns:"http://www.w3.org/2000/svg",viewBox:"25.21 66.56 353.98 269.42"},cre=ore(()=>i.createElementVNode("path",{"fill-rule":"evenodd",d:"M95 67.249c-9.442 3.237-27.165 14.29-35.055 21.862-11.985 11.504-13.495 17.449-8.521 33.553 2.884 9.338 3.125 12.31 1.653 20.336-.565 3.08-1.282 7.497-1.593 9.816-.654 4.859-1.507 6.968-3.167 7.827-3.347 1.731-6.07-.959-12.46-12.308-3.227-5.732-5.32-5.733-7.478-.002-2.901 7.705-4.229 34.074-2.178 43.267 2.612 11.708 12.146 22.248 23.887 26.408 8.91 3.158 11.435 5.049 14.233 10.662 8.79 17.627 7.541 23.49-4.121 19.348-1.98-.704-5.67-2.014-8.2-2.912-14.356-5.094-16.5 2.124-5.514 18.561 11.421 17.088 27.745 24.899 44.255 21.178 8.934-2.013 10.069-1.524 24.2 10.428 6.649 5.624 4.594 9.455-6.606 12.316-12.406 3.169-15.535 4.779-15.535 7.993 0 5.469 18.596 14.356 38.74 18.513l8.26 1.705 9.6-.008c15.176-.013 24.599-3.381 27.766-9.923 3.23-6.671-3.138-11.752-20.405-16.279-12.779-3.351-30.021-11.869-38.294-18.917-1.247-1.063-3.897-3.157-5.888-4.655-4.364-3.282-4.942-3.837-11.668-11.218-11.085-12.163-22.048-27.835-28.466-40.688-3.51-7.033-9.477-26.526-11.236-36.712-.456-2.64-1.19-6.571-1.631-8.736-2.292-11.243-2.558-44.967-.409-51.864 1.238-3.974 3.331-7.113 8.743-13.113 5.167-5.728 14.42-17.676 17.042-22.003C102.408 72.867 105.053 63.804 95 67.249m208.422.186c-3.908 3.908 15.994 38.934 31.232 54.965 10.996 11.569 10.723 10.583 10.696 38.6-.019 19.623-.295 24.066-1.963 31.6-.536 2.42-1.261 5.93-1.612 7.8-2.746 14.637-10.641 36.205-16.189 44.223-.904 1.308-3.281 4.807-5.282 7.777-10.021 14.873-21.298 27.434-32.304 35.985-8.729 6.78-14.267 10.233-24.2 15.088-5.783 2.826-8.281 3.691-18.309 6.339-18.029 4.761-23.977 11.711-16.463 19.235 10.208 10.222 41.826 8.98 67.937-2.669 18.937-8.448 18.603-13.956-1.126-18.585-11.879-2.787-13.761-6.768-6.284-13.29 10.684-9.318 15.331-11.406 22.045-9.904 19.751 4.416 38.64-5.948 49.204-26.999 7.093-14.133 2.492-17.531-14.547-10.743-14.009 5.581-15.808 2.355-8.334-14.948 3.515-8.137 5.055-9.639 13.261-12.938 12.256-4.926 18.075-9.526 22.289-17.62 5.112-9.82 6.884-21.96 4.955-33.951-.425-2.64-.978-6.6-1.229-8.8-1.713-15.016-5.073-17.902-10.183-8.747-8.477 15.19-14.387 14.824-15.445-.955-.217-3.244-.773-7.942-1.234-10.441-1.032-5.581-.845-7.054 2.093-16.489 4.123-13.244 3.044-19.481-4.99-28.827-11.239-13.075-39.907-29.817-44.018-25.706M154.939 85.232c-3.352.569-6.053 1.748-19.923 8.695-19.225 9.629-19.157 9.528-16.851 24.998.866 5.807 1.256 10.746 2.045 25.875.132 2.53.594 6.94 1.026 9.8.433 2.86 1.057 8.516 1.389 12.568.904 11.063 1.161 11.837 5.636 16.979 4.078 4.685 5.623 6.898 6.554 9.385 3.192 8.532 2.461 17.086-2.219 25.952-4.076 7.723-4.323 11.769-1.59 26.116.523 2.75 1.15 7.416 1.392 10.369.858 10.47 1.649 11.962 8.002 15.115 3.337 1.656 44.33 18.375 56 22.839 5.951 2.277 6.046 2.253 32.8-8.361 37.31-14.801 37.429-14.853 39.694-17.327 1.98-2.162 3.87-11.183 4.91-23.435.346-4.07.906-9.11 1.245-11.2.888-5.479.613-6.76-3.053-14.2-6.949-14.101-6.029-23.115 3.597-35.251 5.448-6.868 6.466-11.089 7.811-32.387.335-5.301.967-11.781 1.404-14.4.437-2.619.971-7.732 1.186-11.362.214-3.63.597-9.435.85-12.9.575-7.874.303-9.161-2.449-11.613-2.137-1.902-25.779-13.911-30.595-15.54L251 85l-47-.059c-25.85-.032-47.928.099-49.061.291m58.368 27.111c31.052 5.446 39.083 34.191 18.288 65.457-6.499 9.772-6.864 11.713-3.691 19.6.885 2.2 4.129 10.93 7.209 19.4 6.148 16.906 11.122 29.697 12.978 33.378C252.452 258.825 249.46 261 233.2 261c-15.701 0-17.591-1.169-15.554-9.621 1.257-5.212-1.044-13.36-9.338-33.066-3.593-8.535-8.291-9.515-11.759-2.453l-1.149 2.34v27.6l1.543 4.506c3.059 8.927 1.215 10.438-13.143 10.775-17.559.412-20.099-1.187-16.9-10.64l1.3-3.841V131l-1.322-3.6c-4.295-11.694-3.493-14.57 4.276-15.338 4.722-.467 39.199-.237 42.153.281m-15.188 22.413c-2.764 1.746-2.719 1.382-2.719 21.844 0 17.841.025 18.442.822 19.799 1.436 2.445 3.249 2.141 6.676-1.119 11.294-10.747 15.557-31.235 7.868-37.817-3.234-2.768-10.192-4.257-12.647-2.707"},null,-1)),ure=[cre];function dre(e,t){return i.openBlock(),i.createElementBlock("svg",lre,ure)}const a1=M(ire,[["render",dre],["__scopeId","data-v-5b8e191d"]]);const fre={},hre=e=>(i.pushScopeId("data-v-5b6f3d5e"),e=e(),i.popScopeId(),e),pre={xmlns:"http://www.w3.org/2000/svg",viewBox:"58.93 70.36 282.28 264.88"},gre=hre(()=>i.createElementVNode("path",{"fill-rule":"evenodd",d:"M74.274 70.98C70.143 72.453 70 73.187 70 92.989c0 21.375-.191 20.705 7.953 27.937 2.556 2.269 6.54 5.914 8.854 8.1 2.315 2.186 5.915 5.497 8 7.359 2.086 1.861 5.953 5.468 8.593 8.015 2.64 2.547 6.42 5.963 8.4 7.591 1.98 1.628 5.94 5.133 8.8 7.788 2.86 2.654 7 6.432 9.2 8.395 2.2 1.962 5.98 5.503 8.4 7.868s6.59 6.158 9.268 8.429c4.882 4.142 12.716 11.282 23.838 21.729 3.28 3.08 7.792 7.123 10.028 8.985 2.236 1.861 5.776 5.021 7.866 7.021s5.69 5.329 8 7.396c2.31 2.068 6.81 6.22 10 9.226 3.19 3.007 7.69 7.081 10 9.053 21.285 18.171 21.513 18.953 9.193 31.537-11.486 11.732-11.469 11.443-1.589 26.173 10.712 15.973 10.896 15.947 20.619-2.991 11.834-23.052 13.416-25.365 25.434-37.203 11.725-11.549 16.26-14.348 43.754-26.997 11.527-5.303 11.173-7.25-3.018-16.595-15.492-10.2-15.171-10.208-26.226.594-13.433 13.125-12.533 13.445-37.919-13.489-3.986-4.229-12.558-13.143-19.048-19.807-6.49-6.665-13.69-14.274-16-16.909-2.31-2.635-9.78-10.466-16.6-17.402-6.82-6.936-15.279-15.667-18.799-19.402-3.519-3.734-11.46-11.95-17.645-18.256-6.186-6.306-13.297-13.768-15.802-16.581-20.002-22.467-26.5-28.126-33.898-29.522-4.553-.859-33.002-.901-35.382-.051m216.926.059c-7.757 1.18-15.308 7.452-32.457 26.961-2.998 3.41-10.947 11.813-17.664 18.674-18.498 18.89-18.283 16.816-3.329 32.126 5.05 5.17 11.341 11.83 13.981 14.8 10.629 11.958 10.819 11.943 25.898-2.122 3.206-2.991 7.616-6.926 9.8-8.745 2.184-1.819 6.041-5.312 8.571-7.763 4.366-4.231 7.244-6.886 21.639-19.97 13.379-12.161 12.447-9.635 12.278-33.282-.166-23.132 1.735-21.089-19.717-21.188-11.529-.052-16.118.07-19 .509M100.353 214.552c-2.773.991-20.47 12.72-22.081 14.635-1.619 1.924-1.444 3.394.643 5.394 1.846 1.768 16.397 9.364 26.085 13.616 11.889 5.218 13.609 6.491 26.829 19.866 11.076 11.206 10.481 10.327 20.611 30.449 11.967 23.77 11.22 23.54 22.788 7.024 10.227-14.603 10.258-13.976-1.248-25.724-10.551-10.773-10.909-12.12-5.142-19.314 4.67-5.824 3.236-8.817-9.202-19.218-2.55-2.132-6.976-6.088-9.836-8.791-8.553-8.083-10.094-8.421-16.842-3.693-6.031 4.224-8.258 3.44-18.406-6.477-8.442-8.25-10.183-9.202-14.199-7.767m-3.956 64.232c-2.342.689-4.018 2.019-10.527 8.355-3.778 3.678-8.94 8.499-11.47 10.715-7.557 6.617-12.117 11.625-13.871 15.235-4.825 9.931 1.8 21.016 12.924 21.628 6.239.343 9.298-1.455 19.527-11.475 3.971-3.89 9.903-9.585 13.182-12.657 13.369-12.524 13.444-13.102 3.039-23.437-7.544-7.493-10.098-9.161-12.804-8.364m203.369.571c-2.737 1.275-13.946 12.139-15.534 15.057-2.288 4.204-1.446 5.641 9.351 15.954 4.28 4.089 10.49 10.054 13.8 13.257 13.601 13.162 21.004 14.833 29.242 6.6 8.552-8.547 5.312-18.062-11.025-32.369-2.53-2.215-7.718-7.063-11.529-10.773-8.942-8.704-10.453-9.52-14.305-7.726"},null,-1)),mre=[gre];function vre(e,t){return i.openBlock(),i.createElementBlock("svg",pre,mre)}const A1=M(fre,[["render",vre],["__scopeId","data-v-5b6f3d5e"]]);const Bre={},yre=e=>(i.pushScopeId("data-v-81223df9"),e=e(),i.popScopeId(),e),wre={xmlns:"http://www.w3.org/2000/svg",viewBox:"5.25 32.41 384.35 392.23"},bre=yre(()=>i.createElementVNode("path",{"fill-rule":"evenodd",d:"M196.56 32.706c-.242.162-.643.68-.891 1.151-.464.882-6.181 23.37-7.663 30.143-2.029 9.277-13.207 54.007-16.187 64.776-2.401 8.677-2.227 10.411 1.102 11.036 2.465.462 8.894-4.762 13.798-11.212 1.004-1.32 2.566-3.21 3.473-4.2.906-.99 2.417-2.935 3.358-4.322 2.851-4.205 4.112-4.166 7.292.224.916 1.264 2.6 3.288 3.743 4.498 1.142 1.21 3.257 3.64 4.698 5.401 6.387 7.801 10.008 10.411 12.645 9.115 2.896-1.422 3.516 2.259-6.28-37.316-2.423-9.79-4.945-20.05-5.603-22.8-8.63-36.06-11.562-46.819-12.753-46.794-.161.003-.49.138-.732.3m-77.835 9.868c-4.03 2.43-9.532 6.24-14.703 10.181-9.024 6.878-10.169 7.804-13.417 10.853-1.763 1.654-4.015 3.621-5.005 4.371-.99.75-3.702 3.177-6.026 5.393-2.324 2.215-5.474 5.198-7 6.628-3.458 3.241-9.993 10.614-12.232 13.8-.928 1.32-2.79 3.75-4.139 5.4-1.349 1.65-3.548 4.53-4.888 6.4-1.34 1.87-2.926 3.85-3.524 4.4-.599.55-2.45 2.8-4.113 5-1.663 2.2-3.953 5.08-5.087 6.4-1.134 1.32-3.261 4.11-4.725 6.2-1.464 2.09-3.443 4.88-4.399 6.2-8.17 11.289-23.812 36.82-24.163 39.441-.282 2.099.484 2.895 3.842 3.991 24.399 7.967 28.64 32.858 8.613 50.547-4.2 3.71-4.802 4.749-4.005 6.917 1.139 3.094 4.592 10.511 5.944 12.767.771 1.285 2.411 4.317 3.645 6.737s3.462 6.311 4.95 8.646c1.489 2.336 3.697 5.821 4.907 7.746 7.683 12.222 15.624 23.335 21.97 30.748 1.666 1.947 4.165 4.917 5.552 6.6 3.393 4.116 18.291 19.067 22.278 22.357 1.76 1.452 4.28 3.669 5.6 4.926 3.052 2.907 14.983 11.823 22.898 17.112 3.353 2.241 7.313 5.202 8.8 6.581 1.486 1.378 4.005 3.554 5.597 4.836 1.592 1.282 3.752 3.43 4.8 4.774 1.048 1.344 3.54 4.161 5.538 6.259 5.088 5.343 11.547 13.615 14.195 18.181 5.189 8.946 7.369 7.129 5.539-4.618-.458-2.942-.98-6.518-1.161-7.948-.906-7.167-3.701-21.63-4.87-25.2-4.277-13.062-8.002-19.195-11.662-19.199-2.363-.002-5.716-2.286-11.474-7.815-1.65-1.585-4.08-3.663-5.4-4.619-3.099-2.244-19.447-18.69-23.229-23.367-1.601-1.98-4.093-4.95-5.536-6.6-7.749-8.854-11.713-14.165-20.9-28-2.557-3.85-5.634-8.44-6.837-10.2-5.081-7.431-6.634-10.061-11.099-18.794-2.586-5.056-5.616-10.546-6.735-12.2-2.255-3.333-6.408-12.086-7.014-14.781-.886-3.942 4.505-17.812 11.748-30.225 1.155-1.98 3.322-5.76 4.815-8.4 3.088-5.461 12.353-19.487 14.344-21.717.729-.816 2.922-3.643 4.874-6.283 4.239-5.731 12.608-16.065 16.623-20.525 2.06-2.289 2.639-4.032 4.337-13.06 1.059-5.628 4.403-17.624 6.027-21.615.626-1.54 2.075-5.23 3.219-8.2 1.145-2.97 2.752-6.75 3.572-8.4.82-1.65 2.428-5.16 3.571-7.8 1.144-2.64 2.587-5.61 3.206-6.6.619-.99 2.405-4.315 3.97-7.388 4.164-8.182 3.716-10.062-1.631-6.838m152.701-1.017c-.394.638.802 3.336 6.061 13.68 7.714 15.171 14.334 30.793 16.444 38.805.428 1.627 1.251 4.578 1.828 6.558.577 1.98 1.741 6.957 2.586 11.061 1.741 8.459 1.616 8.201 7.055 14.569 3.573 4.183 5.806 6.933 12.8 15.763 17.7 22.344 38.646 60.307 37.177 67.379-.676 3.251-8.705 20.112-15.157 31.828-5.617 10.199-23.977 36.675-29.818 43-.813.88-2.297 2.68-3.298 4-1.001 1.32-2.399 2.94-3.107 3.6-.707.66-2.331 2.55-3.608 4.2-2.713 3.505-27.938 28.771-31.236 31.286-1.235.943-3.395 2.69-4.8 3.883-3.642 3.095-5.699 4.303-7.862 4.618-2.822.411-3.4.977-5.808 5.693-5.426 10.628-7.737 19.106-9.9 36.32-.194 1.54-.629 4.211-.968 5.935-.693 3.535-.813 9.292-.225 10.839.813 2.137 2.274 1.116 6.546-4.574 1.239-1.65 3.164-4.08 4.277-5.4 1.114-1.32 3.412-4.11 5.106-6.2 7.458-9.199 18.47-19.652 26.23-24.899 20.895-14.128 42.028-32.329 55.15-47.501 1.998-2.31 4.673-5.28 5.945-6.6 3.106-3.225 9.323-11.242 16.556-21.349 10.726-14.987 23-38.069 23-43.251 0-1.421-.265-1.773-3.657-4.866-13.765-12.547-17.154-26-10.012-39.734 2.918-5.61 7.799-9.456 15.469-12.187 3.788-1.349 5.4-2.597 5.4-4.181 0-2.486-15.591-29.304-21.703-37.33-.964-1.266-2.992-4.102-4.507-6.302-3.233-4.697-12.836-17.271-16.037-21-1.228-1.43-5.14-5.903-8.693-9.939-3.553-4.037-7.9-9.063-9.66-11.17-6.962-8.333-21.833-22.69-29.55-28.528-2.007-1.519-6.922-5.237-10.921-8.262-11.116-8.41-16.153-11.28-17.103-9.744M179.2 51.341c-.55.296-3.07 1.762-5.6 3.259-2.53 1.498-7.39 4.339-10.8 6.313-3.41 1.975-7.46 4.406-9 5.403-1.54.997-6.847 4.239-11.794 7.206-15.808 9.481-31.025 19.992-33.345 23.033-1.987 2.605-3.944 11.726-2.958 13.789 1.055 2.209 2.118 1.698 11.097-5.333 19.356-15.157 31.76-23.788 34.211-23.805 1.433-.01 2.574 1.182 4.172 4.361 3.175 6.314 4.208 6.746 8.866 3.708 1.623-1.058 4.259-2.7 5.857-3.649 4.495-2.667 4.798-3.169 6.895-11.426.447-1.76 1.8-7.035 3.006-11.723 2.901-11.276 2.809-12.968-.607-11.136m34.667.526c-1.284 1.284 5.221 27.239 7.638 30.478.938 1.256 7.903 6.113 11.489 8.011 3.101 1.642 4.066 1.08 6.79-3.956 3.49-6.451 3.98-6.45 13.616.006 7.527 5.044 20.023 14.489 26.751 20.221 9.473 8.07 11.523 7.245 8.835-3.555-1.659-6.668-2.042-7.168-10.078-13.136-6.485-4.816-28.683-18.844-36.308-22.944-1.98-1.065-5.329-2.973-7.442-4.24-2.113-1.267-5.623-3.289-7.8-4.492-2.177-1.203-5.758-3.194-7.958-4.424-3.846-2.15-4.957-2.545-5.533-1.969m-66.528 42.131c-.473.191-2.293 1.395-4.044 2.675-1.75 1.28-5.216 3.767-7.702 5.527-15.252 10.8-20.061 14.74-30.518 25-7.651 7.506-10.953 11.189-16.78 18.709-1.488 1.92-3.502 4.491-4.476 5.713-1.563 1.962-6.305 8.602-12.875 18.026-8.992 12.898-21.491 35.511-21.525 38.94-.019 2.036 3.141 9.239 6.762 15.412.709 1.21 2.606 4.63 4.214 7.6 11.397 21.048 20.971 33.763 39.005 51.803 19.754 19.761 24.958 24.424 43.868 39.309 9.849 7.752 9.183 9.072 9.042-17.927-.125-24.038.191-22.035-3.762-23.789-1.495-.662-4.107-2.852-9.61-8.053-4.156-3.929-9.331-8.762-11.501-10.742-4.157-3.792-11.026-11.294-14.652-16.001-1.186-1.54-2.888-3.63-3.782-4.644-.894-1.015-2.767-3.535-4.162-5.6-1.86-2.755-3.274-4.326-5.305-5.893-5.021-3.876-15.634-18.493-17.185-23.669-1.028-3.43 6.996-14.13 20.767-27.694 7.562-7.448 8.393-7.601 12.523-2.294.939 1.207 3.069 3.647 4.733 5.422 1.664 1.775 3.892 4.25 4.951 5.5 2.585 3.051 3.779 3.1 7.712.317 4.055-2.87 16.785-15.892 17.142-17.536.331-1.521.569-.625-3.411-12.797-4.73-14.467-6.033-11.772 12.572-26.006 4.48-3.426 4.785-3.849 4.555-6.302-.189-2.012-4.81-13.623-7.882-19.804-.82-1.65-2.009-4.335-2.641-5.966-1.772-4.57-3.648-6.198-6.033-5.236m96.668.395c-.807.807-2.36 3.975-4.415 9.007-.629 1.54-2.336 5.5-3.793 8.8-6.848 15.511-6.888 14.52.812 19.977 8.955 6.347 14.589 11.497 14.589 13.337-.001.946-3.853 12.713-6.344 19.376-1.908 5.104-1.758 5.362 9.369 16.04 11.414 10.953 11.327 10.936 17.454 3.294 1.565-1.952 8.193-9.257 9.696-10.687 2.159-2.052 4.75-.516 12.425 7.366 14.713 15.111 20.166 22.564 19.029 26.01-.732 2.216-7.044 12.21-9.14 14.469-1.679 1.811-4.565 5.349-11.089 13.6-8.574 10.841-41.872 43.429-47.041 46.036-3.976 2.006-3.759.609-3.759 24.2 0 22.706-.039 22.382 2.721 22.382 1.569 0 2.82-.883 13.163-9.293 1.696-1.379 4.396-3.568 6-4.864 1.604-1.297 4.176-3.562 5.716-5.034 1.54-1.471 3.97-3.592 5.4-4.712 1.43-1.121 3.86-3.33 5.4-4.911 1.54-1.58 3.7-3.585 4.8-4.454 3.3-2.61 18.909-17.902 21.546-21.109 1.35-1.642 3.464-4.074 4.698-5.404 2.215-2.389 3.163-3.563 8.898-11.019 7.577-9.85 14.393-21.081 21.886-36.056 5.889-11.771 5.957-12.57 1.607-18.893-.659-.959-2.706-4.332-4.548-7.497-7.471-12.836-15.422-25.234-21.131-32.954-13.902-18.797-15.65-20.983-22.616-28.278-7.44-7.792-13.149-13.243-18.142-17.322-7.348-6.003-18.73-14.447-28.138-20.874-2.216-1.514-3.895-1.691-5.053-.533m-48.324 38.234c-.492.345-1.784 1.944-2.871 3.555-2.76 4.091-6.753 8.511-10.568 11.697-1.784 1.491-9.814 9.219-17.844 17.174-8.03 7.954-15.767 15.427-17.193 16.605-1.426 1.178-6.663 6.102-11.637 10.942-4.975 4.84-14.224 13.736-20.555 19.769-12.119 11.549-13.028 12.587-12.985 14.831.042 2.222.386 2.728 5.306 7.8 2.561 2.64 6.154 6.375 7.986 8.3 5.068 5.328 4.972 5.368 18.52-7.778 5.647-5.48 6.33-5.384 13.358 1.876 1.43 1.478 6.38 6.205 11 10.506s14.823 14.086 22.674 21.744c17.648 17.215 15.94 16.543 23.171 9.12 2.555-2.623 5.293-5.283 6.085-5.912 1.798-1.43 21.471-20.066 26.871-25.456 7.915-7.901 16.576-15.779 17.64-16.046 1.759-.441 3.27.704 10.693 8.098 8.234 8.203 9.025 8.556 11.835 5.279.787-.919 2.988-3.304 4.891-5.3 11.519-12.086 11.901-13.498 5.206-19.285-1.686-1.458-10.356-9.712-19.266-18.343-8.91-8.631-17.28-16.642-18.6-17.803-1.32-1.16-5.756-5.46-9.857-9.555-13.461-13.439-19.294-19.065-22.743-21.936-4.84-4.029-11.755-11.258-15.099-15.785-3.522-4.767-4.303-5.299-6.018-4.097m2.802 27.673c.335.385 1.442 2.328 2.46 4.318 1.977 3.863 6.153 8.307 16.146 17.182 2.23 1.98 5.461 5.196 7.181 7.146 1.721 1.951 4.658 4.92 6.528 6.597 13.563 12.168 15.184 14.028 14.195 16.285-.513 1.169-10.056 10.824-15.845 16.029-1.677 1.509-8.247 7.714-14.6 13.789-15.23 14.565-15.45 14.754-17.166 14.754-1.572 0-2.598-.881-16.275-13.988-4.24-4.063-12.901-12.339-19.247-18.392-11.302-10.781-12.662-12.29-12.662-14.049 0-.61 3.353-4.137 11.3-11.884 6.215-6.059 13.19-12.935 15.5-15.281 2.31-2.346 5.763-5.566 7.674-7.157 5.063-4.214 8.072-7.596 9.55-10.734 2.323-4.934 3.832-6.258 5.261-4.615m-2.368 9.95c-.265.113-1.38 1.408-2.476 2.878-1.977 2.648-14.1 14.843-18.559 18.667-1.275 1.094-5.46 5.272-9.3 9.285-7.641 7.986-7.921 8.488-6.192 11.11 1.133 1.72 37.333 37.449 37.81 37.319 1.004-.273 37.7-37.781 37.942-38.781.143-.59.087-1.526-.124-2.08-.428-1.128-12.115-13.671-14.262-15.309-.758-.578-6.175-6.02-12.038-12.095-10.112-10.476-11.405-11.586-12.801-10.994m2.203 16.313c1.773.925 21.6 21.18 21.9 22.373.147.585.144 1.553-.006 2.15-.348 1.389-22.144 23.394-23.007 23.23-.334-.064-5.602-5.183-11.707-11.376-14.563-14.772-14.98-10.815 3.09-29.282 7.377-7.538 8.003-7.995 9.73-7.095m-16.023 95.832c-1.603 1.261-15.227 23.557-15.633 25.583-.163.818.3 3.34 1.382 7.526.895 3.463 2.229 8.906 2.966 12.096 1.606 6.958 7.686 30.805 12.085 47.4 1.75 6.6 3.462 13.17 3.805 14.6 2.478 10.341 6.74 26.114 7.411 27.429.446.875 1.034 2.724 1.307 4.11.889 4.517 2.575 4.686 3.753.378.379-1.385 1.284-4.407 2.012-6.717.727-2.31 1.728-6 2.222-8.2.495-2.2 1.149-4.99 1.455-6.2 2.792-11.062 9.84-38.585 11.933-46.6 1.437-5.5 3.071-11.98 3.632-14.4.56-2.42 1.807-7.37 2.77-11 2.989-11.267 4.603-18.241 4.603-19.885 0-2.163-.932-3.846-9.589-17.315-1.485-2.31-3.156-5.01-3.714-6-2.806-4.983-5.381-4.588-10.137 1.555-2.771 3.579-3.209 4.54-3.962 8.681-2.699 14.846-3.756 15.117-6.183 1.582-1.658-9.245-8.484-17.481-12.118-14.623"},null,-1)),_re=[bre];function Cre(e,t){return i.openBlock(),i.createElementBlock("svg",wre,_re)}const s1=M(Bre,[["render",Cre],["__scopeId","data-v-81223df9"]]),Ere=e=>(i.pushScopeId("data-v-578d0d2d"),e=e(),i.popScopeId(),e),kre=Ere(()=>i.createElementVNode("div",{class:"background"},null,-1)),Sre={class:"content"},xre={class:"format"},Fre={class:"format-text"},Ire={key:0,class:"details built"},Ure={class:"title"},Qre={class:"extra-info"},Tre={class:"info-time"},Dre={key:1,class:"details stats"},Lre={class:"stat-column"},Ore={class:"descriptor"},Mre={class:"stat-column"},Nre={class:"number"},Pre={class:"descriptor"},Hre=i.defineComponent({__name:"DeckBlock",props:sre,setup(e){const t=e,{t:n}=se(),r=i.inject(HA),a=i.ref(!1),A=i.computed(()=>St(t.deckCode)),s=i.computed(()=>rn(A.value)),o=i.computed(()=>Mu(s.value)),l=i.computed(()=>s.value.filter(h=>Qs(h))),c=i.computed(()=>{var h;return{"--background-image":`url(https://lor.gg/storage/cards/full-art/${(h=Pa(s.value,A.value,1)[0])==null?void 0:h.cardCode}.webp)`}}),u=i.computed(()=>_E(s.value)),d=i.computed(()=>u.value.map(h=>we().dataJson.formats[h]).filter(h=>h!==void 0).sort((h,p)=>h.order-p.order)[0]),f=i.computed(()=>({showButtons:{deleteDeck:t.type==="built"?t.showOwnerButtons:!1,updateDeckPrivacy:t.type==="built"?t.showOwnerButtons:!1,editDeckName:t.type==="built"?t.showOwnerButtons:!1,gemsCost:!1,openArchetypePage:t.type!=="built",simulateMulligan:!0,openInDeckBuilder:!0,copyDeckCode:!0,uploadDeckToLor:!0,shareDeck:!1},deckCode:t.deckCode,deckBuilderRouterLink:t.deckBuilderRouterLink,archetypeRouterLink:t.type==="built"?void 0:t.archetypeRouterLink,deckId:t.type==="built"?t.deckId:void 0,deckName:t.type==="built"?t.deckName:void 0,isPrivate:t.type==="built"?t.isPrivate:void 0}));return(h,p)=>{const m=i.resolveComponent("RouterLink");return i.openBlock(),i.createBlock(m,{to:t.routerLink},{default:i.withCtx(()=>{var y,g,v;return[i.createElementVNode("div",{class:i.normalizeClass(["built-deck-preview",a.value?"show":"hide"]),style:i.normalizeStyle(c.value)},[kre,i.createVNode(Vd,{class:"deck-highlight-eye icon","deck-code":t.deckCode,onClick:p[0]||(p[0]=i.withModifiers(()=>{},["stop","prevent"])),"deck-buttons-props":{...f.value,showButtons:{...f.value.showButtons,gemsCost:!0,shareDeck:!0}}},null,8,["deck-code","deck-buttons-props"]),i.createElementVNode("div",{class:"options-button icon",onClick:p[1]||(p[1]=i.withModifiers(_=>a.value=!a.value,["stop","prevent"]))},[i.createVNode(i.unref(Ue),{icon:"ellipsis-v"})]),i.createVNode(gl,i.mergeProps({onClick:p[2]||(p[2]=i.withModifiers(()=>{},["stop","prevent"])),class:"deck-buttons"},f.value),null,16),i.createVNode(Xo,{class:"deck-highlight-regions deck-highlight-section",regions:o.value},null,8,["regions"]),i.createElementVNode("div",Sre,[i.createElementVNode("div",xre,[((y=d.value)==null?void 0:y.nameRef)===i.unref(Vr).Eternal?(i.openBlock(),i.createBlock(a1,{key:0,class:"format-icon"})):((g=d.value)==null?void 0:g.nameRef)===i.unref(Vr).Standard?(i.openBlock(),i.createBlock(A1,{key:1,class:"format-icon"})):(i.openBlock(),i.createBlock(s1,{key:2,class:"format-icon"})),i.createElementVNode("span",Fre,i.toDisplayString((v=d.value)==null?void 0:v.name),1)]),i.createVNode(Jo,{class:"deck-highlight-cards deck-highlight-section",cards:l.value},null,8,["cards"])]),t.type==="built"?(i.openBlock(),i.createElementBlock("div",Ire,[i.createElementVNode("div",Ure,i.toDisplayString(t.deckName),1),i.createElementVNode("div",Qre,[i.createElementVNode("div",{class:"info-user",onClick:p[3]||(p[3]=i.withModifiers(()=>{},["stop","prevent"]))},[i.createVNode(m,{to:t.playerRouterLink},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(t.userName),1)]),_:1},8,["to"])]),i.createElementVNode("div",Tre,i.toDisplayString(i.unref(r)(t.updatedAt).fromNow()),1)])])):i.createCommentVNode("",!0),t.type==="stats"?(i.openBlock(),i.createElementBlock("div",Dre,[i.createElementVNode("div",Lre,[i.createElementVNode("div",{class:"number",style:i.normalizeStyle({color:`var(${i.unref(Zn)(t.wins/t.matches)})`})},i.toDisplayString(i.unref(Te)(t.wins/t.matches*100,1,3))+"% ",5),i.createElementVNode("div",Ore,i.toDisplayString(i.unref(n)("general.winrate")),1)]),i.createElementVNode("div",Mre,[i.createElementVNode("div",Nre,i.toDisplayString(i.unref(Te)(t.matches,0,10)),1),i.createElementVNode("div",Pre,i.toDisplayString(i.unref(n)("general.matches")),1)])])):i.createCommentVNode("",!0)],6)]}),_:1},8,["to"])}}});const v3=M(Hre,[["__scopeId","data-v-578d0d2d"]]),Rre={headingItems:{type:Array,required:!0,default:[]}},Vre={class:"table-wrapper"},Kre={class:"table no-scrollbar"},$re={class:"heading wrapper"},Wre=i.defineComponent({__name:"SmallTable",props:Rre,setup(e){const t=e;return(n,r)=>(i.openBlock(),i.createElementBlock("div",Vre,[i.createElementVNode("div",Kre,[i.createElementVNode("div",$re,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(t.headingItems,a=>(i.openBlock(),i.createElementBlock("div",{key:a.title,class:"heading-cell column-content"},[i.createElementVNode("div",null,i.toDisplayString(a.title),1)]))),128)),i.renderSlot(n.$slots,"heading",{},void 0,!0)]),i.renderSlot(n.$slots,"default",{},void 0,!0)])]))}});const XA=M(Wre,[["__scopeId","data-v-20cc8387"]]),Gre={players:{type:Array,required:!0,default:[]}},zre=e=>(i.pushScopeId("data-v-48a25357"),e=e(),i.popScopeId(),e),jre={class:"leaderboard-top"},Yre=zre(()=>i.createElementVNode("div",{class:"heading-background"},null,-1)),qre={class:"heading-wrapper"},Xre=i.defineComponent({__name:"LeaderboardTop",props:Gre,setup(e){const t=e,n=i.computed(()=>we().dataJson.servers.map(r=>t.players.filter(a=>a.server===r.nameRef).sort((a,A)=>a.rank-A.rank).slice(0,10)));return(r,a)=>(i.openBlock(),i.createElementBlock("div",jre,[Yre,i.createElementVNode("div",qre,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(we)().dataJson.servers,A=>(i.openBlock(),i.createElementBlock("div",{key:A.nameRef,class:"heading"},i.toDisplayString(A.name),1))),128))]),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.value,(A,s)=>(i.openBlock(),i.createElementBlock("div",{key:s,class:"top-10"},[i.createVNode(n1,{players:A},null,8,["players"])]))),128))]))}});const B3=M(Xre,[["__scopeId","data-v-48a25357"]]),Jre={flipped:{type:Boolean,required:!0,default:!0},cardCode:{type:String,required:!0,default:"01IO001"}},Zre={class:"card-item-3d"},eae=i.defineComponent({__name:"CardItem3d",props:Jre,setup(e){const t=e,n={ShadowIsles:"https://static.wikia.nocookie.net/leagueoflegends/images/b/bb/LoR_Shadow_Isles_Card_Back.png",BandleCity:"https://static.wikia.nocookie.net/leagueoflegends/images/c/c4/LoR_Bandle_City_Card_Back.png",Bilgewater:"https://static.wikia.nocookie.net/leagueoflegends/images/2/24/LoR_Bilgewater_Card_Back.png",Demacia:"https://static.wikia.nocookie.net/leagueoflegends/images/6/62/LoR_Demacia_Card_Back.png",Freljord:"https://static.wikia.nocookie.net/leagueoflegends/images/5/5e/LoR_Freljord_Card_Back.png",Ionia:"https://static.wikia.nocookie.net/leagueoflegends/images/3/3d/LoR_Ionia_Card_Back.png",Noxus:"https://static.wikia.nocookie.net/leagueoflegends/images/5/50/LoR_Noxus_Card_Back.png",PiltoverZaun:"https://static.wikia.nocookie.net/leagueoflegends/images/5/57/LoR_Piltover_Card_Back.png",Shurima:"https://static.wikia.nocookie.net/leagueoflegends/images/0/0c/LoR_Shurima_Card_Back.png",Targon:"https://static.wikia.nocookie.net/leagueoflegends/images/a/a6/LoR_Targon_Card_Back.png"},r=i.computed(()=>{const s=Ro(void 0,t.cardCode,!0);if(s.value===void 0)return{};const o=s.value.regionRefs[0];return{content:`url(${n[o]??"https://static.wikia.nocookie.net/leagueoflegends/images/2/2d/LoR_Summoner%27s_Rift_Order_Card_Back.png"})`}}),a=i.computed(()=>({"background-image":`url("https://lor.gg/storage/cards/card/en_us/${t.cardCode}.webp")`,"background-size":"cover"})),A=i.computed(()=>t.flipped?["flipped"]:[]);return(s,o)=>(i.openBlock(),i.createElementBlock("div",Zre,[i.createElementVNode("div",{class:i.normalizeClass(["card",A.value])},[i.createElementVNode("div",{class:"front face",style:i.normalizeStyle(r.value)},null,4),i.createElementVNode("div",{class:"back face",style:i.normalizeStyle(a.value)},null,4)],2)]))}});const i1=M(eae,[["__scopeId","data-v-72e7b1ae"]]),tae=e=>(i.pushScopeId("data-v-20998882"),e=e(),i.popScopeId(),e),nae={class:"card-lottery"},rae={class:"cards-container"},aae={key:0,class:"bottom"},Aae={class:"slice"},sae={class:"circle-slice-item-wrapper"},iae={class:"options"},oae={class:"primary-button"},lae={class:"primary-button"},cae=tae(()=>i.createElementVNode("span",null," (23) ",-1)),uae={class:"icon"},dae={class:"circle-card-item-wrapper"},fae=i.defineComponent({__name:"CardLottery",setup(e){const t=Object.keys(jt().cardJsonObject),n=[],r=i.ref(null),a=i.computed(()=>r.value?{background:`url(https://lor.gg/storage/cards/full-art/${r.value}.webp)`,"background-position":"center","background-size":"cover"}:{});function A(o){r.value=o.cardCode.value,o.flipped.value=!0;for(const l of n)o!==l&&setTimeout(()=>{l.display.value=!1},1e3)}function s(){r.value=null,n.splice(0);for(let o=0;o<3;o++)n.push({flipped:i.ref(!1),display:i.ref(!0),cardCode:i.ref(t[Math.floor(Math.random()*t.length)])})}return s(),(o,l)=>{const c=i.resolveDirective("t");return i.openBlock(),i.createElementBlock("div",nae,[i.createElementVNode("div",{class:"card-lottery-background",style:i.normalizeStyle(a.value)},null,4),i.createElementVNode("div",rae,[(i.openBlock(),i.createElementBlock(i.Fragment,null,i.renderList(n,(u,d)=>i.createElementVNode("div",{key:d,class:i.normalizeClass(["card-item-3d-wrapper",u.display.value?null:"hide"])},[i.createVNode(i1,{flipped:u.flipped.value,"card-code":u.cardCode.value,onClick:f=>A(u)},null,8,["flipped","card-code","onClick"])],2)),64))]),r.value?(i.openBlock(),i.createElementBlock("div",aae,[i.createElementVNode("div",Aae,[i.createElementVNode("div",sae,[i.createVNode(fn,{color:"133, 133, 133",name:"Player","card-code-prop":r.value,"ignore-card-item":!0},null,8,["card-code-prop"])])]),i.createElementVNode("div",iae,[i.withDirectives(i.createElementVNode("button",oae,null,512),[[c,"cardLottery.setBanner"]]),i.withDirectives(i.createElementVNode("button",lae,null,512),[[c,"cardLottery.setIcon"]]),i.createElementVNode("button",{class:"primary-button",onClick:s},[i.withDirectives(i.createElementVNode("span",null,null,512),[[c,"cardLottery.openAnother"]]),cae])]),i.createElementVNode("div",uae,[i.createElementVNode("div",dae,[i.createVNode(nA,{color:"133, 133, 133","card-code-prop":r.value,"ignore-card-item":!0,"router-link":""},null,8,["card-code-prop"])])])])):i.createCommentVNode("",!0)])}}});const y3=M(fae,[["__scopeId","data-v-20998882"]]),hae={bannerCardCode:{type:String,required:!0,default:""},bannerColor:{type:String,required:!0,default:""},iconCardCode:{type:String,required:!0,default:""},name:{type:String,required:!0,default:""},server:{type:String,required:!0,default:""},matches:{type:Number,required:!0,default:1},wins:{type:Number,required:!0,default:1},premiumExpiration:{type:Date,required:!1,default:null},isPremiumRenewing:{type:Boolean,required:!0,default:!1},routerLink:{type:Object,required:!0,default:""},premiumLink:{type:Object,required:!0,default:""}},pae={wins:{type:Number,required:!0,default:1},matches:{type:Number,required:!0,default:2},cutout:{type:Number,required:!1,default:145}},o1=i.defineComponent({__name:"WinrateDoughnutChart",props:pae,setup(e){const t=e,n=i.ref(null);Le.register(...Cr);const r=i.computed(()=>({labels:["Wins","Losses"],datasets:[{data:[t.wins,t.matches-t.wins],backgroundColor:["#00adff","#ff5153"]}]})),a={cutout:t.cutout,elements:{arc:{borderWidth:0}},plugins:{legend:{display:!1},datalabels:{display:!1}}},A=[{id:"text",beforeDraw:function(s){const o=s.chartArea.width,l=s.chartArea.height,c=s.ctx;c.restore();const u=(l/100).toFixed(2);c.font=`bold ${u}em sans-serif`,c.textBaseline="middle";const d=s.data.datasets[0].data[0],f=s.data.datasets[0].data[1],h=(d/(d+f)*100).toFixed(2)+"%",p=Math.round((o-c.measureText(h).width)/2),m=l/2;d>f?c.fillStyle="#00adff":d<f?c.fillStyle="#ff5153":c.fillStyle="#ffffff",c.fillText(h,p,m),c.save()}}];return(s,o)=>(i.openBlock(),i.createBlock(i.unref(ld),{ref_key:"chart",ref:n,"chart-data":r.value,options:a,plugins:A},null,8,["chart-data"]))}}),gae={class:"dashboard-profile"},mae={class:"profile-banner"},vae=["src"],Bae={class:"edit-banner"},yae={class:"profile-text"},wae={class:"profile-region"},bae={class:"profile-tiles"},_ae={class:"profile-tile"},Cae={class:"tile-content"},Eae={class:"games-text"},kae={class:"tile-text"},Sae={class:"profile-tile"},xae={class:"chart-container"},Fae={class:"tile-content"},Iae={class:"tile-text"},Uae={key:0,class:"profile-premium-expiration"},Qae={class:"profile-premium-expiration-time"},Tae=i.defineComponent({__name:"DashboardProfile",props:hae,setup(e){const t=e,{t:n}=se(),r=i.inject(HA);return(a,A)=>{const s=i.resolveComponent("RouterLink");return i.openBlock(),i.createElementBlock("div",gae,[i.createElementVNode("div",mae,[i.createElementVNode("img",{alt:"Profile Banner",src:`https://lor.gg/storage/cards/banner/${t.bannerCardCode??"05BC160"}.png`,class:"profile-banner-img"},null,8,vae),i.createVNode(nA,{"card-code-prop":t.iconCardCode??"05BC160","ignore-card-item":!0,"color-override":t.bannerColor,"router-link":t.routerLink},null,8,["card-code-prop","color-override","router-link"]),i.createElementVNode("div",Bae,[i.createVNode(i.unref(Ue),{icon:"pencil-alt"})])]),i.createElementVNode("div",yae,[i.createVNode(s,{to:t.routerLink,class:"profile-name"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(t.name),1)]),_:1},8,["to"]),i.createElementVNode("div",wae,i.toDisplayString(t.server),1)]),i.createElementVNode("div",bae,[i.createElementVNode("div",_ae,[i.createElementVNode("div",Cae,[i.createElementVNode("div",Eae,i.toDisplayString(i.unref(Te)(t.matches,0,10)),1)]),i.createElementVNode("div",kae,i.toDisplayString(i.unref(n)("general.gamesPlayed")),1)]),i.createElementVNode("div",Sae,[i.createElementVNode("div",xae,[i.createElementVNode("div",Fae,[i.createVNode(o1,{matches:t.matches,wins:t.wins,cutout:30},null,8,["matches","wins"])])]),i.createElementVNode("div",Iae,i.toDisplayString(i.unref(n)("general.winrate")),1)])]),t.premiumExpiration?(i.openBlock(),i.createElementBlock("div",Uae,[i.createTextVNode(i.toDisplayString(i.unref(n)("general.premium"))+" "+i.toDisplayString(t.isPremiumRenewing?i.unref(n)("general.renews"):i.unref(n)("general.expires"))+" ",1),i.createElementVNode("b",Qae,i.toDisplayString(i.unref(r)(t.premiumExpiration).fromNow()),1)])):(i.openBlock(),i.createBlock(s,{key:1,to:t.premiumLink,class:"profile-premium fancy-button"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(n)("general.getPremium")),1)]),_:1},8,["to"]))])}}});const w3=M(Tae,[["__scopeId","data-v-d302d4f0"]]),Dae={data:{type:Array,required:!0,default:[]},type:{type:String,required:!0,default:"totalPlayers"},server:{type:String,required:!1}};function Lae(e,t){const{t:n}=se();Le.register(qA),e.plugins||(e.plugins={}),e.plugins.annotation||(e.plugins.annotation={}),e.plugins.annotation.annotations=[];let r=new Date("1972-01-01"),a=new Date("3000-12-01");for(const s of t)s>r&&(r=s),s<a&&(a=s);const A=[];for(const s of Object.values(we().dataJson.patches))new Date(s.startTime)<=r&&new Date(s.startTime)>=a&&A.push(s);for(const s of A)e.plugins.annotation.annotations.push({type:"line",xMin:s.startTime,xMax:s.startTime,borderColor:"rgba(255, 255, 255, 0.1)",borderDash:[10,5],borderWidth:1,label:{content:`${n("general.patch")} ${s.name}`,display:!0,position:"start",font:{weight:"normal"},backgroundColor:"rgba(0,0,0,0.2)"}})}const b3=i.defineComponent({__name:"LeaderboardChart",props:Dae,setup(e){const t=e,n=i.ref();Le.register(...Cr),Le.register(qA);const r=i.computed(()=>t.data.slice().sort((s,o)=>+s.date-+o.date)),a=i.computed(()=>{let s;return t.type==="totalPlayers"?s=we().dataJson.servers.filter(o=>t.server===null?!0:o.nameRef===t.server).map(o=>({label:o.name,borderColor:x1(o.nameRef),data:r.value.filter(l=>l.server===o.nameRef).map(l=>l.players),pointBackgroundColor:"rgba(255, 255, 255, 0.25)"})):s=r.value.reduce((o,l)=>o.includes(l.name)?o:[...o,l.name],[]).map(o=>({label:o,borderColor:x1(o),data:r.value.filter(l=>l.name===o).map(l=>t.type==="lp"?l.lp:l.rank),pointBackgroundColor:"rgba(255, 255, 255, 0.25)"})),{labels:r.value.map(o=>o.date).filter((o,l,c)=>c.findIndex(u=>u.getTime()===o.getTime())===l),datasets:s}}),A={plugins:{legend:{display:!0},tooltip:{mode:"nearest",position:"nearest",axis:"x",intersect:!1},annotation:{annotations:[]},datalabels:{display:!1}},elements:{line:{tension:.25}},scales:{x:{type:"time",time:{unit:"day",displayFormats:{day:"MMM D"},tooltipFormat:"MMM D"}}}};return Lae(A,t.data.map(s=>s.date)),(s,o)=>(i.openBlock(),i.createBlock(i.unref($_),{ref_key:"chart",ref:n,"chart-data":a.value,options:A},null,8,["chart-data"]))}}),Oae={data:{type:Array,required:!0,default:[]},type:{type:Object,required:!0,default:"winrate"},baseline:{type:Number,required:!1,default:50}},_3=i.defineComponent({__name:"CardQuantityBarChart",props:Oae,setup(e){const t=e,{t:n}=se(),r=i.ref();Le.register(...Cr),Le.register(qA),Le.register(bd);const a=i.computed(()=>({labels:t.data.map(s=>s.quantity),datasets:[{backgroundColor:t.data.map(s=>s.wins*2>=s.matches?"rgba(0, 173, 255, 0.5)":"rgba(255, 81, 83, 0.5)"),borderWidth:0,borderRadius:9999,data:t.data.map(s=>t.type==="winrate"?s.wins/s.matches*100-t.baseline:s.matches)}]})),A={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{enabled:!0,mode:"index",intersect:!1,callbacks:{title(s){return`${n("general.quantity")}: ${s[0].label}`},label(s){return t.type==="winrate"?(s.dataset.data[s.dataIndex]+t.baseline).toFixed(2)+"%":s.dataset.data[s.dataIndex].toString()},footer(s){return[`${n("general.matches")}: ${t.data[s[0].dataIndex].matches}`,`${n("general.wins")}: ${t.data[s[0].dataIndex].wins}`]}}},datalabels:{display:!1}},scales:{y:{title:{display:!0,text:t.type==="winrate"?n("general.winrate"):n("general.matches")},ticks:{callback(s){return t.type==="winrate"?s+t.baseline+"%":s}}},x:{title:{display:!0,text:n("general.quantity")}}}};return(s,o)=>(i.openBlock(),i.createBlock(i.unref(od),{ref_key:"chart",ref:r,"chart-data":a.value,options:A},null,8,["chart-data"]))}}),Mae={data:{type:Array,required:!0,default:""}},C3=i.defineComponent({__name:"WinsLossesBarChart",props:Mae,setup(e){const t=e,{t:n}=se(),r=i.ref();Le.register(...Cr),Le.register(qA),Le.register(bd);const a=i.computed(()=>t.data.length===0?!1:typeof t.data[0].column!="string"),A=i.computed(()=>a.value?t.data.slice().sort((u,d)=>u.column.getTime()-d.column.getTime()):t.data),s=i.computed(()=>[...new Set(A.value.map(u=>u.column))]),o=i.computed(()=>({losses:A.value.map(u=>u.matches-u.wins),wins:A.value.map(u=>u.wins)})),l=i.computed(()=>({labels:s.value,datasets:Object.entries(o.value).map((u,d)=>({backgroundColor:u[0]==="wins"?`rgba(${Ha("--color-good-rgb")}, 0.5)`:`rgba(${Ha("--color-bad-rgb")}, 0.5)`,data:u[1],borderRadius:d===0?{topLeft:0,topRight:0,bottomLeft:10,bottomRight:10}:{topLeft:10,topRight:10,bottomLeft:0,bottomRight:0},borderSkipped:!1,label:n(`general.${u[0]}`),barPercentage:.5}))})),c={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{enabled:!0,mode:"index",intersect:!1,callbacks:{footer(u){if(u.length===0)return"";let d=0;const f=u[0].chart.data.datasets[1].data[u[0].dataIndex];for(let h=0;h<u[0].chart.data.datasets.length;h++)d+=u[0].chart.data.datasets[h].data[u[0].dataIndex];return`${n("general.total")}: ${d}
|
|
879
|
-
${n("general.winrate")}: ${Te(f/d*100,1,3)}%`}}},datalabels:{align:"end",anchor:"end",formatter(u,d){const f=A.value[d.dataIndex];return Te(f.wins/f.matches*100,2)+"%"},display(u){return u.datasetIndex===u.chart.data.datasets.length-1}}},scales:{x:{type:a.value?"time":"category",time:{unit:"day",displayFormats:{day:"MMM D"},tooltipFormat:"MMM D"},stacked:!0,grid:{display:!1}},y:{stacked:!0,grid:{display:!1},display:!0}}};return(u,d)=>(i.openBlock(),i.createBlock(i.unref(od),{ref_key:"chart",ref:r,"chart-data":l.value,options:c},null,8,["chart-data"]))}}),Nae={data:{type:Array,required:!0,default:[]},type:{type:String,required:!0,default:"winrate"},baseline:{type:Number,required:!1,default:50}},E3=i.defineComponent({__name:"RoundCardInfoBarChart",props:Nae,setup(e){const t=e,{t:n}=se(),r=i.ref();Le.register(...Cr),Le.register(qA),Le.register(bd);const a=i.computed(()=>Object.values(vE(t.data,o=>o.copy))),A=i.computed(()=>({labels:Array.from(t.data.reduce((o,l)=>o.add(l.round),new Set)),datasets:a.value.map(o=>{var l;return{backgroundColor:o.map(c=>c.wins*2>=c.matches?"rgba(0, 173, 255, 0.5)":"rgba(255, 81, 83, 0.5)"),borderWidth:0,borderRadius:9999,data:o.map(c=>c.wins/c.matches*100-t.baseline),label:`${n("general.copy")} ${(l=o[0])==null?void 0:l.copy}`}})})),s={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!0},tooltip:{enabled:!0,mode:"index",intersect:!1,callbacks:{title(o){return`${n("general.round")}: ${o[0].label}`},label(o){return(o.dataset.data[o.dataIndex]+t.baseline).toFixed(2)+"%"},footer(o){const l=[];for(const c of a.value)c[o[0].dataIndex]!==void 0&&l.push(`${n("general.copy")} ${c[o[0].dataIndex].copy}`,`${n("general.matches")}: ${c[o[0].dataIndex].matches}`,`${n("general.wins")}: ${c[o[0].dataIndex].wins}`);return l}}},datalabels:{display:!1}},scales:{y:{title:{display:!0,text:n("general.winrate")},ticks:{callback(o){return o+t.baseline+"%"}}},x:{title:{display:!0,text:t.type==="drawn"?n("cards.roundDrawn"):n("cards.roundPlayed")}}}};return(o,l)=>(i.openBlock(),i.createBlock(i.unref(od),{ref_key:"chart",ref:r,"chart-data":A.value,options:s},null,8,["chart-data"]))}}),Pae={data:{type:Array,required:!0,default:[]},baseline:{type:Number,required:!1,default:50},type:{type:String,required:!0,default:"winrate"},yAxis:{type:String,required:!0,default:"date"}},k3=i.defineComponent({__name:"LineChart",props:Pae,setup(e){const t=e,{t:n}=se(),r=i.ref();Le.register(...Cr),Le.register(qA);const a=i.computed(()=>({labels:t.data.map(o=>o.label),datasets:[{borderColor:"rgba(255, 255, 255, 0.1)",data:t.data.map(o=>o.totalMatches&&t.type==="playrate"?o.matches/(o.totalMatches??1)*100:o.winrate*100),pointBackgroundColor:"rgba(255, 255, 255, 0.25)"},{pointBackgroundColor:"rgba(255, 255, 255, 0)",data:t.data.map(()=>t.baseline),borderColor:"rgba(0, 0, 0, 0.05)"}]})),A=i.computed(()=>({plugins:{legend:{display:!1},tooltip:{mode:"nearest",position:"nearest",axis:"x",intersect:!1,filter:function(o){return o.datasetIndex===0},callbacks:{label(o){let l=o.dataset.label||"";return l&&(l+=": "),l+=o.parsed.y+"%",l},footer:o=>{let l="";return o[0].dataIndex!==null&&t.data[o[0].dataIndex].matches&&(l+=`${n("general.matches")}: ${t.data[o[0].dataIndex].matches}`),l}}},annotation:{annotations:[]},datalabels:{display:!1}},elements:{line:{tension:.25}},scales:{x:t.yAxis==="date"?{type:"time",time:{unit:"day",displayFormats:{day:"MMM D"},tooltipFormat:"MMM D"}}:void 0}})),s=[{id:"chartGradient",beforeDraw:function(o){if(!o.scales.y)return;const l=o.ctx.createLinearGradient(0,0,0,o.height);if(l.addColorStop(0,"rgba(0, 173, 255, 0.25)"),t.type==="playrate"){l.addColorStop(1,"rgba(0, 173, 255, 0)"),o.config.data.datasets[0].fill={target:1,above:l},o.update();return}const c=o.scales.y,u=Math.max.apply(null,o.data.datasets[0].data),d=c.getPixelForValue(u),f=c.getPixelForValue(50),h=Math.min(Math.min.apply(null,o.data.datasets[0].data),50),p=c.getPixelForValue(h),m=Math.max(Math.min((f-d)/(p-d),1),0);l.addColorStop(Math.max(m-.08,0),"rgba(0, 173, 255, 0)");const y=o.ctx.createLinearGradient(0,0,0,o.height);y.addColorStop(m,"rgba(255, 81, 83, 0)"),y.addColorStop(1,"rgba(255, 81, 83, 0.25)"),o.config.data.datasets[0].fill={target:1,above:l,below:y},o.update()}}];return(o,l)=>(i.openBlock(),i.createBlock(i.unref($_),{ref_key:"chart",ref:r,"chart-data":a.value,options:A.value,plugins:s},null,8,["chart-data","options"]))}}),Hae={deckRows:{type:Array,required:!0,default:[]},loading:{type:Boolean,required:!1,default:!1}},Rae=i.defineComponent({__name:"BuiltDecksTable",props:Hae,emits:["sort-updated"],setup(e,{emit:t}){const n=e,{t:r}=se(),a=i.ref([{id:"deck",isShown:!0,sortDirection:be.NOT_SORTABLE,title:r("general.deck")},{id:"name",isShown:!0,sortDirection:be.NEITHER,title:r("general.name")},{id:"updatedAt",isShown:!0,sortDirection:be.DOWN,title:r("general.updated")},{id:"createdAt",isShown:!0,sortDirection:be.NEITHER,title:r("general.created")},{id:"manaCurve",isShown:!0,sortDirection:be.NOT_SORTABLE,title:r("general.manaCurve")},{id:"cost",isShown:!0,sortDirection:be.NOT_SORTABLE,title:r("general.cost")}]);function A(s){const o=ei(s,a);o&&t("sort-updated",o)}return(s,o)=>(i.openBlock(),i.createBlock(tA,{class:"large-table","heading-items":a.value,onToggleSort:A},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.deckRows,(l,c)=>(i.openBlock(),i.createBlock(Bl,{id:l.id,key:l.id,type:"built","deck-code":l.deckCode,name:l.name,"created-at":l.createdAt,"updated-at":l.updatedAt,index:c+2},null,8,["id","deck-code","name","created-at","updated-at","index"]))),128))]),_:1},8,["heading-items"]))}});const S3=M(Rae,[["__scopeId","data-v-639a9202"]]),Vae={regionNameRef:{type:String,required:!0,default:"01IO001"},matches:{type:Number,required:!0,default:0},wins:{type:Number,required:!0,default:0},index:{type:Number,required:!0,default:0}},Kae={class:"wrapper"},$ae={class:"champion-column column-content"},Wae={class:"matches-column column-content"},Gae=i.defineComponent({__name:"ProfileRegionRow",props:Vae,setup(e){const t=e,n=i.computed(()=>we().dataJson.regions.find(a=>a.nameRef===t.regionNameRef)),r=i.computed(()=>{var a;return`https://lor.gg/storage/cards/banner/${(a=n.value)==null?void 0:a.cardCode}.png`});return(a,A)=>{var s;return i.openBlock(),i.createElementBlock("div",{class:"profile-champion-row wrapper",style:i.normalizeStyle({"--index":t.index})},[i.createElementVNode("div",{class:"small-table-background",style:i.normalizeStyle({"--background-image":`url(${r.value})`})},null,4),i.createElementVNode("div",Kae,[i.createElementVNode("div",$ae,[i.createVNode(qo,{"region-ref":t.regionNameRef},null,8,["region-ref"]),i.createElementVNode("span",null,i.toDisplayString((s=n.value)==null?void 0:s.name),1)]),i.createElementVNode("div",Wae,i.toDisplayString(i.unref(Te)(t.matches,0,10)),1),i.createElementVNode("div",{class:"winrate-column column-content",style:i.normalizeStyle({color:`var(${i.unref(Zn)(t.wins/t.matches)})`})},i.toDisplayString(i.unref(Te)(t.wins/t.matches*100,1,3))+"% ",5)])],4)}}});const l1=M(Gae,[["__scopeId","data-v-b3f363b1"]]),zae={rows:{type:Array,required:!0,default:[]}},jae=i.defineComponent({__name:"ProfileRegionTable",props:zae,setup(e){const t=e,{t:n}=se(),r=[{title:n("general.regions"),id:"regions"},{title:n("general.matches"),id:"matches"},{title:n("general.winrate"),id:"winrate"}];return(a,A)=>(i.openBlock(),i.createBlock(XA,{class:"small-table","heading-items":r},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(t.rows,s=>(i.openBlock(),i.createBlock(l1,{key:s.regionNameRef,"region-name-ref":s.regionNameRef,matches:s.matches,wins:s.wins,index:s.index+2},null,8,["region-name-ref","matches","wins","index"]))),128))]),_:1}))}});const x3=M(jae,[["__scopeId","data-v-2dae645c"]]),Yae={rows:{type:Array,required:!0,default:[]}},qae={archetypeId:{type:Number,required:!0,default:0},deckCode:{type:String,required:!0,default:""},matches:{type:Number,required:!0,default:0},wins:{type:Number,required:!0,default:0},index:{type:Number,required:!0,default:0}},Xae={class:"wrapper"},Jae={class:"champion-column column-content"},Zae={class:"matches-column column-content"},eAe=i.defineComponent({__name:"ProfileArchetypeRow",props:qae,setup(e){const t=e,n=i.computed(()=>St(t.deckCode)),r=i.computed(()=>rn(n.value)),a=i.computed(()=>{var A;return`https://lor.gg/storage/cards/banner/${(A=Pa(r.value,n.value,1)[0])==null?void 0:A.cardCode}.png`});return(A,s)=>(i.openBlock(),i.createElementBlock("div",{class:"profile-champion-row wrapper",style:i.normalizeStyle({"--index":t.index})},[i.createElementVNode("div",{class:"small-table-background",style:i.normalizeStyle({"--background-image":`url(${a.value})`})},null,4),i.createElementVNode("div",Xae,[i.createElementVNode("div",Jae,[i.createVNode(Ja,{"deck-code":t.deckCode},null,8,["deck-code"])]),i.createElementVNode("div",Zae,i.toDisplayString(i.unref(Te)(t.matches,0,10)),1),i.createElementVNode("div",{class:"winrate-column column-content",style:i.normalizeStyle({color:`var(${i.unref(Zn)(t.wins/t.matches)})`})},i.toDisplayString(i.unref(Te)(t.wins/t.matches*100,1,3))+"% ",5)])],4))}});const c1=M(eAe,[["__scopeId","data-v-91ed15a8"]]),tAe=i.defineComponent({__name:"ProfileArchetypeTable",props:Yae,setup(e){const t=e,{t:n}=se(),r=[{title:n("general.archetypes"),id:"archetypes"},{title:n("general.matches"),id:"matches"},{title:n("general.winrate"),id:"winrate"}];return(a,A)=>(i.openBlock(),i.createBlock(XA,{class:"small-table","heading-items":r},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(t.rows,s=>(i.openBlock(),i.createBlock(c1,{key:s.archetypeId,"archetype-id":s.archetypeId,"deck-code":s.deckCode,matches:s.matches,wins:s.wins,index:s.index+2},null,8,["archetype-id","deck-code","matches","wins","index"]))),128))]),_:1}))}});const F3=M(tAe,[["__scopeId","data-v-f883a9d9"]]),nAe={selectedRegion:{type:String,required:!0,default:null},selectedPlayers:{type:Array,required:!0,default:[]},selectedGraphOption:{type:String,required:!0,default:"totalPlayers"},players:{type:Array,required:!0,default:[]},updatedAt:{type:Number,required:!0,default:0},isGraphShown:{type:Boolean,required:!0,default:!1}},rAe={class:"leaderboard-options"},aAe={class:"multiselects"},AAe={class:"details"},sAe={class:"players"},iAe={class:"updated"},oAe=i.defineComponent({__name:"LeaderboardOptions",props:nAe,emits:["update:selectedPlayers","update:selectedRegion","update:selectedGraphOption"],setup(e,{emit:t}){const n=e,{t:r}=se(),a=i.inject(HA),A=[{name:r("leaderboard.lp"),nameRef:"lp"},{name:r("leaderboard.rank"),nameRef:"rank"},{name:r("leaderboard.totalPlayers"),nameRef:"totalPlayers"}],s=i.ref(n.selectedRegion),o=i.ref(n.selectedPlayers),l=i.ref(n.selectedGraphOption),c=i.computed(()=>s.value===null?n.players:n.players.filter(u=>u.server===s.value));return i.watch(s,u=>{t("update:selectedRegion",u),t("update:selectedPlayers",[])}),i.watch(o,u=>{t("update:selectedPlayers",u)}),i.watch(l,u=>{t("update:selectedGraphOption",u)}),i.watch(()=>n.selectedPlayers,u=>{o.value=u}),i.watch(()=>n.selectedRegion,u=>{s.value=u}),i.watch(()=>n.selectedGraphOption,u=>{l.value=u}),i.watch(()=>n.isGraphShown,u=>{u&&o.value.length>0&&(l.value="lp")}),(u,d)=>(i.openBlock(),i.createElementBlock("div",rAe,[i.createElementVNode("div",aAe,[i.createVNode(i.unref(Vt),{modelValue:o.value,"onUpdate:modelValue":d[0]||(d[0]=f=>o.value=f),placeholder:i.unref(r)("general.players"),mode:s.value?"tags":"disabled",options:c.value,searchable:!0,label:"name","value-prop":"name"},null,8,["modelValue","placeholder","mode","options"]),i.createVNode(i.unref(Vt),{modelValue:s.value,"onUpdate:modelValue":d[1]||(d[1]=f=>s.value=f),placeholder:i.unref(r)("general.server"),options:i.unref(we)().dataJson.servers,label:"name","value-prop":"nameRef"},null,8,["modelValue","placeholder","options"]),n.isGraphShown?(i.openBlock(),i.createBlock(i.unref(Vt),{key:0,modelValue:l.value,"onUpdate:modelValue":d[2]||(d[2]=f=>l.value=f),options:A,"can-clear":!1,label:"name","value-prop":"nameRef"},null,8,["modelValue"])):i.createCommentVNode("",!0)]),i.createElementVNode("div",AAe,[i.createElementVNode("div",sAe,[i.createTextVNode(i.toDisplayString(i.unref(r)("leaderboard.totalPlayers"))+": ",1),i.createElementVNode("span",null,i.toDisplayString(i.unref(Te)(c.value.length)),1)]),i.createElementVNode("div",iAe,[i.createTextVNode(i.toDisplayString(i.unref(r)("leaderboard.updated"))+": ",1),i.createElementVNode("span",null,i.toDisplayString(i.unref(a)(n.updatedAt*60*1e3).fromNow()),1)])])]))}});const I3=M(oAe,[["__scopeId","data-v-0689a8b2"]]),lAe={deckRows:{type:Array,required:!0,default:[]},originalDeckcode:{type:String,required:!0,default:""},loading:{type:Boolean,required:!1,default:!1}},cAe=i.defineComponent({__name:"SimilarDecksTable",props:lAe,emits:["sort-updated"],setup(e,{emit:t}){const n=e,{t:r}=se(),a=i.ref([{id:"deck",isShown:!0,sortDirection:be.NOT_SORTABLE,title:r("general.deck")},{id:"matches",isShown:!0,sortDirection:be.DOWN,title:r("general.matches")},{id:"winrate",isShown:!0,sortDirection:be.NEITHER,title:r("general.winrate")},{id:"cost",isShown:!0,sortDirection:be.NOT_SORTABLE,title:r("general.cost")},{id:"differences",isShown:!0,sortDirection:be.NOT_SORTABLE,title:r("general.deckDifferences")}]);function A(s){const o=ei(s,a);o&&t("sort-updated",o)}return(s,o)=>(i.openBlock(),i.createBlock(tA,{class:"large-table","heading-items":a.value,onToggleSort:A},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.deckRows,(l,c)=>(i.openBlock(),i.createBlock(Bl,i.mergeProps({key:l.deckCode},l,{type:"similar",index:c+2,"compared-deck-code":n.originalDeckcode}),null,16,["index","compared-deck-code"]))),128))]),_:1},8,["heading-items"]))}});const U3=M(cAe,[["__scopeId","data-v-a0377a1f"]]),uAe={heading:{type:String,required:!1,default:""}},dAe={class:"top"},fAe={class:"heading"},hAe={class:"chart"},pAe=i.defineComponent({__name:"StatisticsPaneContainer",props:uAe,setup(e){const t=e,n=i.ref(null),r=i.ref(!1);function a(){var A;r.value?document.exitFullscreen():(A=n.value)==null||A.requestFullscreen()}return i.onMounted(()=>{var A;(A=n.value)==null||A.addEventListener("fullscreenchange",()=>{r.value=document.fullscreenElement!==null})}),(A,s)=>(i.openBlock(),i.createElementBlock("div",{ref_key:"statitisticsPaneContainer",ref:n,class:i.normalizeClass(["statitistics-pane-container",r.value?"full-screen":""])},[i.createElementVNode("div",dAe,[i.createElementVNode("div",fAe,i.toDisplayString(t.heading),1),i.createVNode(i.unref(Ue),{class:"maximize-icon",icon:"fa-maximize",onClick:a})]),i.createElementVNode("div",hAe,[i.renderSlot(A.$slots,"default",{},void 0,!0)])],2))}});const Q3=M(pAe,[["__scopeId","data-v-f00b184f"]]);function gAe({swiper:e,on:t}){t("beforeInit",()=>{if(e.params.effect!=="carousel")return;e.classNames.push(`${e.params.containerModifierClass}carousel`);const n={watchSlidesProgress:!0,centeredSlides:!0};Object.assign(e.params,n),Object.assign(e.originalParams,n)}),t("progress",()=>{if(e.params.effect!=="carousel")return;const n=.2,r=e.slides.length;for(let a=0;a<e.slides.length;a+=1){const A=e.slides[a],s=e.slides[a].progress,o=Math.abs(s);let l=1;o>1&&(l=(o-1)*.3+1);const c=A.querySelectorAll(".swiper-carousel-animate-opacity"),u=`${s*l*50}%`,d=1-o*n,f=r-Math.abs(Math.round(s));A.style.transform=`translateX(${u}) scale(${d})`,A.style.zIndex=f,o>3?A.style.opacity=0:A.style.opacity=1,c.forEach(h=>{h.style.opacity=1-o/3})}}),t("setTransition",(n,r)=>{if(e.params.effect==="carousel")for(let a=0;a<e.slides.length;a+=1){const A=e.slides[a],s=A.querySelectorAll(".swiper-carousel-animate-opacity");A.style.transitionDuration=`${r}ms`,s.forEach(o=>{o.style.transitionDuration=`${r}ms`})}})}const mAe={activeIndex:{type:Number,required:!0,default:0},cardCodes:{type:Array,required:!0,default:[]}},vAe={class:"card-carousel"},BAe=["src"],yAe=i.defineComponent({__name:"CardCarousel",props:mAe,emits:["update:activeIndex"],setup(e,{emit:t}){const n=e;console.log(n);const r=[gAe];function a(A){t("update:activeIndex",A.activeIndex)}return(A,s)=>(i.openBlock(),i.createElementBlock("div",vAe,[i.createVNode(i.unref($w),{effect:"carousel","grab-cursor":!0,loop:!1,"looped-slides":5,"slides-per-view":"auto",modules:r,"slide-to-clicked-slide":!0,onActiveIndexChange:a},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.cardCodes,o=>(i.openBlock(),i.createBlock(i.unref(Ww),{key:o},{default:i.withCtx(()=>[i.createElementVNode("img",{src:`https://lor.gg/storage/cards/card/en_us/${o}.webp`},null,8,BAe)]),_:2},1024))),128))]),_:1})]))}});const T3=M(yAe,[["__scopeId","data-v-a6ffd2e2"]]),wAe={wins:{type:Number,required:!0,default:1},matches:{type:Number,required:!0,default:1},showDetails:{type:Boolean,required:!1,default:!0}},bAe={class:"wins-losses-line"},_Ae={key:0,class:"details"},CAe={class:"wl-record"},EAe={class:"lines"},kAe=i.defineComponent({__name:"WinsLossesLine",props:wAe,setup(e){const t=e;return(n,r)=>(i.openBlock(),i.createElementBlock("div",bAe,[t.showDetails?(i.openBlock(),i.createElementBlock("div",_Ae,[i.createElementVNode("span",CAe,i.toDisplayString(t.wins)+"W "+i.toDisplayString(t.matches-t.wins)+"L - ",1),i.createElementVNode("span",{style:i.normalizeStyle({color:`var(${i.unref(Zn)(t.wins/t.matches)})`})},i.toDisplayString(i.unref(Te)(t.wins/t.matches*100,1,3))+"%",5)])):i.createCommentVNode("",!0),i.createElementVNode("div",EAe,[t.wins!==0?(i.openBlock(),i.createElementBlock("div",{key:0,class:"wins line",style:i.normalizeStyle({flexGrow:t.wins})},null,4)):i.createCommentVNode("",!0),t.matches-t.wins!==0?(i.openBlock(),i.createElementBlock("div",{key:1,class:"losses line",style:i.normalizeStyle({flexGrow:t.matches-t.wins})},null,4)):i.createCommentVNode("",!0)])]))}});const u1=M(kAe,[["__scopeId","data-v-511803da"]]),SAe={cardCode:{type:String,required:!0,default:"01IO001"},matches:{type:Number,required:!0,default:0},wins:{type:Number,required:!0,default:0},index:{type:Number,required:!0,default:0}},xAe={key:0,class:"wrapper"},FAe={class:"champion-column column-content"},IAe={class:"matches-column column-content"},UAe=i.defineComponent({__name:"DashboardCardRow",props:SAe,setup(e){const t=e,n=i.computed(()=>jt().cardJsonObject[t.cardCode]),r=i.computed(()=>{var a;return`https://lor.gg/storage/cards/banner/${(a=n.value)==null?void 0:a.cardCode}.png`});return(a,A)=>(i.openBlock(),i.createElementBlock("div",{class:"profile-champion-row wrapper",style:i.normalizeStyle({"--index":t.index})},[i.createElementVNode("div",{class:"small-table-background",style:i.normalizeStyle({"--background-image":`url(${r.value})`})},null,4),n.value?(i.openBlock(),i.createElementBlock("div",xAe,[i.createElementVNode("div",FAe,[i.createVNode(nA,{class:"circle-card-item","card-prop":n.value,"router-link":i.unref(nn)().callbacks.cardCodeRouterLinkCallback(t.cardCode)},null,8,["card-prop","router-link"]),i.createElementVNode("span",null,i.toDisplayString(n.value.name),1)]),i.createElementVNode("div",IAe,i.toDisplayString(i.unref(Te)(t.matches,0,10)),1),i.createElementVNode("div",{class:"winrate-column column-content",style:i.normalizeStyle({color:`var(${i.unref(Zn)(t.wins/t.matches)})`})},i.toDisplayString(i.unref(Te)(t.wins/t.matches*100,1,3))+"% ",5)])):i.createCommentVNode("",!0)],4))}});const d1=M(UAe,[["__scopeId","data-v-5c26c4d6"]]),QAe={class:"card-page-toggle"},TAe=i.defineComponent({__name:"CardTogglePage",setup(e){const{t}=se(),n=i.ref(0);return(r,a)=>(i.openBlock(),i.createElementBlock("div",QAe,[i.createVNode(qu,{"selected-option":n.value,"onUpdate:selectedOption":a[0]||(a[0]=A=>n.value=A),options:[i.unref(t)("cards.recommendedDecks"),i.unref(t)("cards.similarCards"),i.unref(t)("general.statistics")]},null,8,["selected-option","options"])]))}});const D3=M(TAe,[["__scopeId","data-v-07d07f20"]]),DAe=i.defineComponent({setup(){return{}},mounted(){const e=St("EUAACAIEA54Q6AIGBECACBQKF4AQIBQGAECAOUYBAECBWAICAYKACAIFFUAQIBAOAIDAOBJIAIDAYBIIAIDAMGY5AMDAEGI4EIBQMAYTC4RAGBQABIMCQAYGAUBQMHY");console.log(e),console.log(wE(e))}}),LAe=i.createElementVNode("h1",null,"TestComponent",-1),OAe=[LAe];function MAe(e,t,n,r,a,A){return i.openBlock(),i.createElementBlock("div",null,OAe)}const L3=M(DAe,[["render",MAe]]),NAe={name:{type:String,required:!0,default:""},selectedBannerCard:{type:String,required:!0,default:""},rank:{type:Number,required:!0,default:0},id:{type:Number,required:!0,default:0},matches:{type:Number,required:!0,default:0},lp:{type:Number,required:!0,default:0},change:{type:Number,required:!0,default:0},index:{type:Number,required:!0,default:0}},PAe={class:"wrapper"},HAe={class:"champion-column column-content"},RAe={class:"mana-hexagon"},VAe={class:"mana-number"},KAe={class:"name"},$Ae={class:"matches-column column-content"},WAe=i.defineComponent({__name:"DashboardLeaderboardRow",props:NAe,setup(e){const t=e,n=i.computed(()=>t.selectedBannerCard===void 0?null:`https://lor.gg/storage/cards/banner/${t.selectedBannerCard}.png`),r=i.computed(()=>t.change===void 0?[]:t.change===0?["neutral"]:[t.change>0?"good":"bad"]);return(a,A)=>(i.openBlock(),i.createElementBlock("div",{class:"profile-champion-row wrapper",style:i.normalizeStyle({"--index":t.index})},[i.createElementVNode("div",{class:"small-table-background",style:i.normalizeStyle({"--background-image":`url(${n.value})`,"--background-color":t.index%2===0?"var(--color-background-0)":"transparent"})},null,4),i.createElementVNode("div",PAe,[i.createElementVNode("div",HAe,[i.createElementVNode("div",RAe,[i.createVNode(jo,{class:"hexagon-icon"}),i.createElementVNode("div",VAe,i.toDisplayString(t.rank),1)]),i.createElementVNode("div",KAe,i.toDisplayString(t.name),1)]),i.createElementVNode("div",$Ae,i.toDisplayString(i.unref(Te)(t.matches,0,10)),1),i.createElementVNode("div",{class:i.normalizeClass(["column-content change",r.value])},[t.change!==void 0?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createVNode(i.unref(Ue),{class:"icon",icon:"fa-chevron-down"}),i.createElementVNode("span",null,i.toDisplayString(i.unref(Te)(Math.abs(t.change),0,10)),1)],64)):(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createTextVNode(" Test ")],64))],2)])],4))}});const f1=M(WAe,[["__scopeId","data-v-3d62a718"]]),GAe={date:{type:Date,required:!0,default:[]},activated:{type:Boolean,required:!0,default:!1},soon:{type:Boolean,required:!0,default:!1}},eh="data:image/webp;base64,UklGRpQVAABXRUJQVlA4WAoAAAAQAAAAYwAAjQAAQUxQSAEBAAABgGPb2rHn+e3KTunUNntXPyaQKSSV7UzBSfejizkD26htPU/y/lZETABIK2xW2koVX0DKFxXZrLR1CQD2y3vah6PpUeLxnXviuwEBtL5SPz6/Ur+8Urvl0EbGQLccWsPjXH6DO+jg+vQSZGh5Zb7XaAp7aPEKbezzKMKEWuP+C7y0xdzV6gXkWif7drOyTtj34Mg99QL28KAcr5B14g0yAyo5p94gzytkn7Dv3qZz49xvzM6hzi5ffHrankNevMXZzIDUhuFfDw2PdKQr1SqVSqX+rUqbPfP8et2YqFKjqgz1I8ODA8O/7SnjAnC4qIBvGNm18wGdw0WF/6jMFcCfBwBWUDggbBQAABBDAJ0BKmQAjgAAwBIliAKSzJgM/yf5TextXv8H/bv2BwHdg+Vdzn/0vWB/tPVF5h36ofrv14vMX+3Xq2/7v1cf2b1AP6l/gOtp9A/9x/Th/dX4aP7X/2f3C9rXBZ+F2Jr4/8+/kPzM9c3+w73vS/++9CP5x+Df1n9q/dL2b8DflTqHfln9a/0/Ar209A7vn37/+R6R/YP/le4H/Ov63/oeSc9E9g3+ef3T/s/4z2Uf/P/Zelr6a/9f+k+BH+df27/reu51QB6l8J+19f+pT6sZj+zE2+wE9vWoNfcEz0oTpvLjAO+Oa0LQ0Jow+wnjIYPuMNdJgebCP0A0x9HFV9m1SGgYnekuqE7R0gGfFSqVDdnmaEzLXqoY5ab7mI283b2U6qHsm1LaV2sv3hWYD74YbO9I365ZyH7IOZW2np5xzxY1uNwlx8m3/TlZpshWOQCUqQEaeXuo/NGNB7fPAFQA9spGF46iKOVdiy4H51LojrONPcDzWBAEuAoyxYSjdLl+yL79WxDhr4xWsGpRCikM1q5cdoxI5DzxmQC+WU34EWnl4CUNbIztZ0DdID1a0xmf9PiWSXfO4bZPzx8wcVrzgmGBY4h9fhG06Eg8Pe4iO3CVETaIxrPsQBwT/o2De9RYWlsdvaDBCRFNqTIhtugVNyhTOM/+NHgy2FRNW55uPOcszqLATAsZl/DQCkGM1H3/Q6b8yOWsaDQ8wYl8YUfoAP7u3JuG7XFiqpPFp/zTze9Dk0t236U3vstNlqJ6SMY/EUhcAaCy3g3fU1aSTwRLVo/tbHheprGIHpVpNqjxBzS1OFaBnyrYoywF4mxQQRjLtYqhSzPDGyjl/+mVF30ZwM1deMxjDDSwpabr//JIfGwSajIir7csLqBcPmzLwiG0X8yyOdc6OggQUYZentENwuvqEfj4tkP5AdpcIlLP6PXPTMLwXYC5UVVGobBIg429evsLhW4cFRY7HS7kzF/loDieDUMVuHgsMHmBlHbV0ft7uggiS+/oURoyeFXHtbAffBaM7WcIS0lh3dr/hH+xcEKpG6voqahtySY9unVDK4Ma+M4J9OXSo71s3dEeACMKt+lj+FBWDsCJDXpu9Lm3VLbYyT5aF4l0kiGnDuTyRednJJxXlv9ZB2XqhFRCRxK1YE9sx6PGzx8h1YQvNTO5vUl/nAq/pglypqDeR1DHey3IRtZsO/1/M12zYhtN58HYvZriSE/pzLhUGdKAnDJN+N1zpts+c79KrZYjR5+LC8mqTp3zA107/ruodw4OhlDLLtEkHoK0aL6L9kgYkVYuk051/J0iVKO6TrNDjtGCXCzQ61VHH07nEMhfWQqzs+eEOnCdem+/mp99Y5moGhX/AG8JXlhIt15Lv5D60Crp8RJMOD93GDx3WmltCm+Uv1YUslp6iqCDT9pJkbrVnz19cge4T3b7AMrWIAxvDVSB+GjGkX/VQXtjcfsYyHhBaNDOrAPmMkk43eLISRFlsUW9xJ70I7YqMi4KkLA5BSawyrIJeGDRRPpOyqXBJ3he27M6nYaDUcu/dw+zKZFrH6JJepygQiw9/gTA8qAo9Wy4TxVrbJ3iVIyWD9tN6kW+H0ATrOZcaPr4mEoJATghh5iOmN12PTvewVv3VhiUXfqV2BWbUrqWHOkvUgcNaMRXkTobbwOziNe7s9Ub8f1fyJJ+KoqDjl5TXGTKJf71c5O8PiHEwUijMoTg1GNrxg/iyd2pvikPHJ/LeYRAjV77bM1tdlnWBYiABeF3lU6zrp/qqdxhb8P33GXLOZC+7Q+k29zjZyKON23ZtaPwSL1oDj4jmqXJ0DV/iWA+79rebbt2US+K8ARkowLBGCyDHGaKBFXplZu5qY2Jr6P0YUmkj8Se0bToxblcTq3Yo99+M+HkAnRjvQ6iVKId8+YXuXpHdWG2e0XjaXsZ6IBomXeg/qv7XzhWsqrLDSmmSG1scFVF9w5hYj02X4QIhwfHS9DJ46kN1NvcCouEHbUnMQHzUsndQ/LXToevL3LcziuwhLIDliY5NZVQGbChii5WdshXFpqLTnMoSx/QLlWVrcEpCWeg1QCKc32cIAdHGm85bWc1BWWymuRFjr5Tgp3b9TPWLbmnJyb+oSemQmbAPvG9LJIqXmr2xCr0TGmDluE4zO8vaZ/YMEtA9ObEVpVaRj/fqmgL6oHMSW8btJ19nVA62zSzzTuNWJjkN2Zx/t3a5oddkCmbJATg/9VKopqZllxD/GmhAA2Z+o2Yl+CoH3mwuLLPslUy54VmjbhRr+FyR7akdBlYodQHYMNcOKTqhcRGICgXOLTRXn27nIzblK2s7Ts8zAeHmG48CpkdL0ogJ+mrFlrUonC65itjH25Zybm2oM+zxGTTFmy3qhxeF44T6UObeh1vuD/xnjE7NOi28jLT2p7QOjRifMsWRKF8A1+4WnZwba/telVJ0M6W12iygb8UFKOypj4S3LoX1Sx+DIoHPssoAW9iBseVXrDaK8AUOd4jhVQ1WZXhAyQrLt5vuLNMEaFbCq0RltFolGtQ9UYWId2iCWWUAob/O5rzCZMRGWlrXfqV2OMsz7NzL8MkLUlj/XCo/PHG7Lqo/QabVPLqTejIyn8VMf75hXLI4vX3fFT9uVIjfrLe3wDtwo3hgQlrT+8wtcHIkMnpF1wK0Pmi3q3dt+cBzJ7twZjPrXbla5YVz18ptitmRDERECQ67qfzqNrl2C9pLJ/q1f/Ew/JY3Fr/02nDtq35QZ0dZYgfTf47HOzzo4UjL+noRi2L+dBj0fBp9NznpszWtf/ViprbM+6Zzv1l+tD4U3Zu//+Oey/Lgbh8EQfzgm9i59POCMUU/7sNjnSLils28YksYWNbznb3xcNIpy2wR85ntEWFLTuHfln1UVFAUGGrZdmWz6JzqNPxD0AeXjf8ntg4NCbxgB8iohTpMedkpD2q9xEEUXBeo8yuCJKNjP+zg/AYfX9/PVLZWqo5l/XXgtH2ABNTFqA2942K8zLTN4rjFvA8KqN5rmSofCljeENG145859vlNSmeR0T1U7KZ/z6Q/crwGbDY1f9Cmfzjf7MsZklghfj/1shlyq7gSv5Ym375SxDw/iDuj67jYdGOBVjmpB1mnV158my0bdh75nONKc2vK8ZjU+iNXS/P8aJUAiRFk7st3bV5h9baGPOQqbOk4dWjw8NUN7nwm0fmJQ5vp73I/A4UZ8eqf638Gkr3pXrHvUebaPb+xcIzBDE1Nvcojfb/5nm95LL0aHg1iKt36a6uavLgIvpkN7Qo3TujZX95S02Bjz3vhFXVLmBFQCYemOTW9uc4LHakG8kU8VevsB1HT+S1RQKKGdo8JtG9raNhNJjHGLqolgRumnusF3c3ABwOjbQhbjjfMQpu7cdy6J0DTh2hatG32udWg1LPdR9fsVpjEysfGQ0GDDxrvx9YwIGgSRZOZpNEJop4ey3CbpHsmfbpTu+aiszsvP5P6WtQ92vlZ8hxGp2cmnFD2MB6+gQ0hM7eZRxHsKG0+WcpmGsBbtEcNBFvUhbVul/oh7JL+W7adTjOuAVWYVYoTud4ovKjSckZfM1oTXnO4Ky5/LPkQICBB53iz2cdoAWm7owZYQ/S/m4Uwya+G8RezTLMacJChJKqvaibSzfr1bLY6Vry/907SR/JMI7gNWKaUF3Vba3b5b0HxlnFvPrH9H/e+v/zKavQWUONrFVDJYy1XBQUKeYi/Nk2TjiR28KllKGnB2Fq4UnOXuNFR6A2fOnv22Ud48xB8MDHPdrkiVnT362fvOFVnTizjBiQ8TsDnPCs9yEBp16IVDSPomLlWtRkTdEKM6vtCfOz5kpT/0/f18Zx1GX1lvHApIkCfMiNePrIQ9HXD0kmtO7+kdpnb01upiB8fDivDuW+Q0T9Ekbl4PcAAl6+TEntzh67pMz09ikbexC0m6HJHt2TiTtEeCNtLfTWM7HNNFnyoD6HOVEHxiygPZ4y8pyIEJY6J8xwz4TjpyIsHs3cFHpgqfjkUgTFx3uclUbtjRvRXWkgXyZd2ysup9AT8mS0ZJxbARswqXFxJaMDemxOcr6pMmpUPPx6m3QAAnD5YW7H7ATCMs7x2pa2P++IZrqP5lRbgR3bmPDGNdaK0MJWIdUEp/KMOQS9B6vwdVSLl/8mjT5CxXSx2VxxrgGTVW6NBBuTmP9Vt9ZOQ0d0ORGcg++/xMiPrl91fbiMOVAa5GRuhKUhIpUCxVplYkot97+71nhgPlFn6t3NoJKsWX7ecxQQ2Ju2lHT7kO007o0voWXVBgS4t1L3tHfiGWu9NcmCjKwt8PwHn/Jz3v6Uek7SG+ZjCMiakQpmV+0QrjA09K3jZfQgUr+zs/3n/X1zZPPLWk+TlywRK6p0/qbliMMhyXFKbGpTXqvlvBC2Fr58dVvfouGrlfh72hq6YOaZn9zdQWPqbjtqIg8g9QxZzL954uK2OuI1JJittRNNcVSSra2lACV/Ej7Or5II6lx2C3FjqTsrh4UXCcUZWtsOA24NHIJ9CzFmsC4IyIOUXhZEN65l9PYCkjNWKaNz89kPq2+4ye1/jzAuDDg2RrKp/FNIKhhKO0YSPaLz9ODfQTLJhMTpPAXm+xLB0oX7Vo75znqCKyJvmxCmfzANcHkBciBEuOOq68Zl6RZtvaAB0xxFCOfvwBwUY+0qWjfW5PVAaY9bzRJlL100JT3b2kkKDbSW1JXvJqoC/Gubz7CPLYlMJ8dNbim9ydCev9Yq4uzuFENwzKxXa/+CJOmjxzMMCUO8Et1aezpZRwhRESDWtEzJpOKzapC0Hy+M9LX92rbTLKuAfIs+t2RLVUI914oLWgqjEfsM+8o8Tp+U+TRjZ2FF4Ksvp2tGNUiwUapjWbERc67w9nCCgSfLo/c3J1nQLygbzMoJrH4FojgB5aomLL3Qu6IHsRkYhXeYS5oHE0EyRRQXDSEsr4Agr+Yfe5rM854ckE/Yjtm9JnUazZfvvxW2UhxIs9N1m706CP2Ypvs1i7dW+ZmqMCL6uSL+C7hOyycrmvY3Y1YHfIm/pn6u2tgqDN0Y/mZKlUtFq431+zZtpV7+M8ImZf+ou67QEQgXKlc5nxIRUn4WPWlDg2J+6ifiADxcmoRbqWCcG7PR1aUBaLcdSH9KfyF9wgQEj3V+4gyQIa/4JZICFGBUF1BBpZ/anb9TggFs64t+P8eXsWK/kYO+YjSiRyclvKR6hdZRs3hsPY5i7CnmpMUZIns0Ir1ZD8T38M3GM2CcjVW7dG8+0pgw9Si3W5RQrSQjYNq/0A9slLyqiv6ZjrmJFk8Vumsh0VfVPiE7vzqDoxlssE+RqwjJb7DCYE6MHby3aDhaThUE8lgQ7wHTzwoT6IwKqw1ofiTrBycnkdgSKnNEcAgmEQm/Nc4SfKQIjYFgAC+IZeC+S8/pKr8oSNd53EyIK7cuYgnPCUSYn8K2wZD3f/HeVjWIk2EaqRQNZvhCL9pMdwBR8OFRxr36qHCqSx2ZPJOQ3MOPk7swYH4B1QSo4K5tY7/RSl69ftU132HNN0NDfzsvWmBTzVLArpA8RY9LCv7PQ+tbH+6xQWWT4zo41H0hZroZB9Y1BRkiR1jU2XXIQzjY8M2WxSCUywHQOItrSSuDf43zfF+0pXshiSJh3wkP7UVjoF1JMXAPzr2YtxaKFTaZHj0t+e2KUYnGCPDMRt/jsJ1VNqvqGMjhbzmK/Ji7jcaK0nVU2t150c0NRtZlmCiRa7hpNnWe8JlN946yTf4mBY6we5YtS+tHlFzb6xxXgSNdAJUQ/Cf/gbr1MOYnfNPn7tgsduJnySBfUxlhueUByJNOC3T+QE5gELLjR8V/YThTkoJl7a4clEiUTt+fUCWTdjRcJgg8LQSvOspSnGQ5o5a42FBWa2brKLjpnmcroiLKuqJ8SM/UeCuF78esGhAuc2nC0jXZv12w17el7YAcHrpA2Vx+Jv6X5ok4PxVseLzfIY9wbb0nrOCAU3Gg/eKUcu2emB7XfMAgEbBPf7tOMUfluV4zeGsAFHhH3jCmTT0ie7YZP13tsgzt6I+llT2GnDkU9ylV0Rjzdl92EnAJhLyZovmJn2r+3xytit6NWsWFNLk8xZeFTY6cWoqEtVA2HoX/dvgwba3wkOMiZHRRnDWc5OHZ8DvUufoI4BEp4lLz8LqDcJ4U2ROGcH/tNtLAWpov5bBWwYZghIsAyxK4elFVxROoKzEytuvDaHjB85srMddi0+wpvq8Gv2hadSObXFOTXuJYuca+dVPRPg6i8Jy4YRCCcvDJ9h/G4pHs8UtxcagVPFP3LtdVn8qwgiO4/RkY/NvkpOnzPrgtjKA9F25cFO/iEV1SONr2YEg2e21jHzxn1BpHOC+VjkYP6+XVfhyW3FnO55pyGqelLpWnIMcvLUb/nYZluleyUZSt9yjLLW6HyeMT/TsCJpQ+TixJzS2a/JQRc+igKZAJCN5f4pHylBS/nTZQqff5FAhr6QbQIbB+3sfEH7dCB5G4BcRU/hWRacndN8it2rV+0OL+q9WuSGBeFROmtq7ko9ZK00n9mGhhm+CYaUiUyUpdNEhcjDi72xSDSPr5PIlg4ecGmxXOzJMAvwi7oAQQg+Yf0/4z2VCGkFCJ+brkSSZLb8fs2G2c+fYVn/tnAmmooSpfNyJw90LiRdDuQbQ93BQWt3azhV9TEBsPGFE3GGkTw0krNqcURqAQKzvXr2bnhO8KRWoWG7XliqBjI/qGv4UOSaZGwIFqc88q1XuMWRIvW6Cy0jaeljlEotz0AFnDGH2Aq1Pn6SREslqfkNcbIyJ/ZH8oMeXhw4Ua92QnhLp909o39dtaOK/eyzPuAH0ev2kS5g9sKHUC7eEoZIBtPPDrdsGXKpr+L+P9BRvo7OcKaVBxchzd2ZLrq/KC+l5UF0ZSfFqSW6UE0inppd0zfwM2/igkrgcDqi6fKcNBLQO3Yh9ysmWdD7EQ2ZnQ1rzdxuR59XgwjJvDgAAA",zAe={class:"reveal-day-option-wrapper"},jAe={class:"card-wrapper"},YAe=["src"],qAe={class:"card-wrapper"},XAe=["src"],JAe={class:"card-wrapper"},ZAe=["src"],ese=i.defineComponent({__name:"RevealDayOption",props:GAe,setup(e){const t=e,n=i.inject(HA),r=i.ref(null),a=i.ref(null),A=i.computed(()=>t.date.getTime()<new Date().getTime()),s=i.computed(()=>A.value?`Revealed Cards
|
|
879
|
+
${n("general.winrate")}: ${Te(f/d*100,1,3)}%`}}},datalabels:{align:"end",anchor:"end",formatter(u,d){const f=A.value[d.dataIndex];return Te(f.wins/f.matches*100,2)+"%"},display(u){return u.datasetIndex===u.chart.data.datasets.length-1}}},scales:{x:{type:a.value?"time":"category",time:{unit:"day",displayFormats:{day:"MMM D"},tooltipFormat:"MMM D"},stacked:!0,grid:{display:!1}},y:{stacked:!0,grid:{display:!1},display:!0}}};return(u,d)=>(i.openBlock(),i.createBlock(i.unref(od),{ref_key:"chart",ref:r,"chart-data":l.value,options:c},null,8,["chart-data"]))}}),Nae={data:{type:Array,required:!0,default:[]},type:{type:String,required:!0,default:"winrate"},baseline:{type:Number,required:!1,default:50}},E3=i.defineComponent({__name:"RoundCardInfoBarChart",props:Nae,setup(e){const t=e,{t:n}=se(),r=i.ref();Le.register(...Cr),Le.register(qA),Le.register(bd);const a=i.computed(()=>Object.values(vE(t.data,o=>o.copy))),A=i.computed(()=>({labels:Array.from(t.data.reduce((o,l)=>o.add(l.round),new Set)),datasets:a.value.map(o=>{var l;return{backgroundColor:o.map(c=>c.wins*2>=c.matches?"rgba(0, 173, 255, 0.5)":"rgba(255, 81, 83, 0.5)"),borderWidth:0,borderRadius:9999,data:o.map(c=>c.wins/c.matches*100-t.baseline),label:`${n("general.copy")} ${(l=o[0])==null?void 0:l.copy}`}})})),s={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!0},tooltip:{enabled:!0,mode:"index",intersect:!1,callbacks:{title(o){return`${n("general.round")}: ${o[0].label}`},label(o){return(o.dataset.data[o.dataIndex]+t.baseline).toFixed(2)+"%"},footer(o){const l=[];for(const c of a.value)c[o[0].dataIndex]!==void 0&&l.push(`${n("general.copy")} ${c[o[0].dataIndex].copy}`,`${n("general.matches")}: ${c[o[0].dataIndex].matches}`,`${n("general.wins")}: ${c[o[0].dataIndex].wins}`);return l}}},datalabels:{display:!1}},scales:{y:{title:{display:!0,text:n("general.winrate")},ticks:{callback(o){return o+t.baseline+"%"}}},x:{title:{display:!0,text:t.type==="drawn"?n("cards.roundDrawn"):n("cards.roundPlayed")}}}};return(o,l)=>(i.openBlock(),i.createBlock(i.unref(od),{ref_key:"chart",ref:r,"chart-data":A.value,options:s},null,8,["chart-data"]))}}),Pae={data:{type:Array,required:!0,default:[]},baseline:{type:Number,required:!1,default:50},type:{type:String,required:!0,default:"winrate"},yAxis:{type:String,required:!0,default:"date"}},k3=i.defineComponent({__name:"LineChart",props:Pae,setup(e){const t=e,{t:n}=se(),r=i.ref();Le.register(...Cr),Le.register(qA);const a=i.computed(()=>({labels:t.data.map(o=>o.label),datasets:[{borderColor:"rgba(255, 255, 255, 0.1)",data:t.data.map(o=>o.totalMatches&&t.type==="playrate"?o.matches/(o.totalMatches??1)*100:o.winrate*100),pointBackgroundColor:"rgba(255, 255, 255, 0.25)"},{pointBackgroundColor:"rgba(255, 255, 255, 0)",data:t.data.map(()=>t.baseline),borderColor:"rgba(0, 0, 0, 0.05)"}]})),A=i.computed(()=>({plugins:{legend:{display:!1},tooltip:{mode:"nearest",position:"nearest",axis:"x",intersect:!1,filter:function(o){return o.datasetIndex===0},callbacks:{label(o){let l=o.dataset.label||"";return l&&(l+=": "),l+=o.parsed.y+"%",l},footer:o=>{let l="";return o[0].dataIndex!==null&&t.data[o[0].dataIndex].matches&&(l+=`${n("general.matches")}: ${t.data[o[0].dataIndex].matches}`),l}}},annotation:{annotations:[]},datalabels:{display:!1}},elements:{line:{tension:.25}},scales:{x:t.yAxis==="date"?{type:"time",time:{unit:"day",displayFormats:{day:"MMM D"},tooltipFormat:"MMM D"}}:void 0}})),s=[{id:"chartGradient",beforeDraw:function(o){if(!o.scales.y)return;const l=o.ctx.createLinearGradient(0,0,0,o.height);if(l.addColorStop(0,"rgba(0, 173, 255, 0.25)"),t.type==="playrate"){l.addColorStop(1,"rgba(0, 173, 255, 0)"),o.config.data.datasets[0].fill={target:1,above:l},o.update();return}const c=o.scales.y,u=Math.max.apply(null,o.data.datasets[0].data),d=c.getPixelForValue(u),f=c.getPixelForValue(50),h=Math.min(Math.min.apply(null,o.data.datasets[0].data),50),p=c.getPixelForValue(h),m=Math.max(Math.min((f-d)/(p-d),1),0);l.addColorStop(Math.max(m-.08,0),"rgba(0, 173, 255, 0)");const y=o.ctx.createLinearGradient(0,0,0,o.height);y.addColorStop(m,"rgba(255, 81, 83, 0)"),y.addColorStop(1,"rgba(255, 81, 83, 0.25)"),o.config.data.datasets[0].fill={target:1,above:l,below:y},o.update()}}];return(o,l)=>(i.openBlock(),i.createBlock(i.unref($_),{ref_key:"chart",ref:r,"chart-data":a.value,options:A.value,plugins:s},null,8,["chart-data","options"]))}}),Hae={deckRows:{type:Array,required:!0,default:[]},loading:{type:Boolean,required:!1,default:!1}},Rae=i.defineComponent({__name:"BuiltDecksTable",props:Hae,emits:["sort-updated"],setup(e,{emit:t}){const n=e,{t:r}=se(),a=i.ref([{id:"deck",isShown:!0,sortDirection:be.NOT_SORTABLE,title:r("general.deck")},{id:"name",isShown:!0,sortDirection:be.NEITHER,title:r("general.name")},{id:"updatedAt",isShown:!0,sortDirection:be.DOWN,title:r("general.updated")},{id:"createdAt",isShown:!0,sortDirection:be.NEITHER,title:r("general.created")},{id:"manaCurve",isShown:!0,sortDirection:be.NOT_SORTABLE,title:r("general.manaCurve")},{id:"cost",isShown:!0,sortDirection:be.NOT_SORTABLE,title:r("general.cost")}]);function A(s){const o=ei(s,a);o&&t("sort-updated",o)}return(s,o)=>(i.openBlock(),i.createBlock(tA,{class:"large-table",loading:n.loading,"heading-items":a.value,onToggleSort:A},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.deckRows,(l,c)=>(i.openBlock(),i.createBlock(Bl,{id:l.id,key:l.id,type:"built","deck-code":l.deckCode,name:l.name,"created-at":l.createdAt,"updated-at":l.updatedAt,index:c+2},null,8,["id","deck-code","name","created-at","updated-at","index"]))),128))]),_:1},8,["loading","heading-items"]))}});const S3=M(Rae,[["__scopeId","data-v-3cbac27b"]]),Vae={regionNameRef:{type:String,required:!0,default:"01IO001"},matches:{type:Number,required:!0,default:0},wins:{type:Number,required:!0,default:0},index:{type:Number,required:!0,default:0}},Kae={class:"wrapper"},$ae={class:"champion-column column-content"},Wae={class:"matches-column column-content"},Gae=i.defineComponent({__name:"ProfileRegionRow",props:Vae,setup(e){const t=e,n=i.computed(()=>we().dataJson.regions.find(a=>a.nameRef===t.regionNameRef)),r=i.computed(()=>{var a;return`https://lor.gg/storage/cards/banner/${(a=n.value)==null?void 0:a.cardCode}.png`});return(a,A)=>{var s;return i.openBlock(),i.createElementBlock("div",{class:"profile-champion-row wrapper",style:i.normalizeStyle({"--index":t.index})},[i.createElementVNode("div",{class:"small-table-background",style:i.normalizeStyle({"--background-image":`url(${r.value})`})},null,4),i.createElementVNode("div",Kae,[i.createElementVNode("div",$ae,[i.createVNode(qo,{"region-ref":t.regionNameRef},null,8,["region-ref"]),i.createElementVNode("span",null,i.toDisplayString((s=n.value)==null?void 0:s.name),1)]),i.createElementVNode("div",Wae,i.toDisplayString(i.unref(Te)(t.matches,0,10)),1),i.createElementVNode("div",{class:"winrate-column column-content",style:i.normalizeStyle({color:`var(${i.unref(Zn)(t.wins/t.matches)})`})},i.toDisplayString(i.unref(Te)(t.wins/t.matches*100,1,3))+"% ",5)])],4)}}});const l1=M(Gae,[["__scopeId","data-v-b3f363b1"]]),zae={rows:{type:Array,required:!0,default:[]}},jae=i.defineComponent({__name:"ProfileRegionTable",props:zae,setup(e){const t=e,{t:n}=se(),r=[{title:n("general.regions"),id:"regions"},{title:n("general.matches"),id:"matches"},{title:n("general.winrate"),id:"winrate"}];return(a,A)=>(i.openBlock(),i.createBlock(XA,{class:"small-table","heading-items":r},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(t.rows,s=>(i.openBlock(),i.createBlock(l1,{key:s.regionNameRef,"region-name-ref":s.regionNameRef,matches:s.matches,wins:s.wins,index:s.index+2},null,8,["region-name-ref","matches","wins","index"]))),128))]),_:1}))}});const x3=M(jae,[["__scopeId","data-v-2dae645c"]]),Yae={rows:{type:Array,required:!0,default:[]}},qae={archetypeId:{type:Number,required:!0,default:0},deckCode:{type:String,required:!0,default:""},matches:{type:Number,required:!0,default:0},wins:{type:Number,required:!0,default:0},index:{type:Number,required:!0,default:0}},Xae={class:"wrapper"},Jae={class:"champion-column column-content"},Zae={class:"matches-column column-content"},eAe=i.defineComponent({__name:"ProfileArchetypeRow",props:qae,setup(e){const t=e,n=i.computed(()=>St(t.deckCode)),r=i.computed(()=>rn(n.value)),a=i.computed(()=>{var A;return`https://lor.gg/storage/cards/banner/${(A=Pa(r.value,n.value,1)[0])==null?void 0:A.cardCode}.png`});return(A,s)=>(i.openBlock(),i.createElementBlock("div",{class:"profile-champion-row wrapper",style:i.normalizeStyle({"--index":t.index})},[i.createElementVNode("div",{class:"small-table-background",style:i.normalizeStyle({"--background-image":`url(${a.value})`})},null,4),i.createElementVNode("div",Xae,[i.createElementVNode("div",Jae,[i.createVNode(Ja,{"deck-code":t.deckCode},null,8,["deck-code"])]),i.createElementVNode("div",Zae,i.toDisplayString(i.unref(Te)(t.matches,0,10)),1),i.createElementVNode("div",{class:"winrate-column column-content",style:i.normalizeStyle({color:`var(${i.unref(Zn)(t.wins/t.matches)})`})},i.toDisplayString(i.unref(Te)(t.wins/t.matches*100,1,3))+"% ",5)])],4))}});const c1=M(eAe,[["__scopeId","data-v-91ed15a8"]]),tAe=i.defineComponent({__name:"ProfileArchetypeTable",props:Yae,setup(e){const t=e,{t:n}=se(),r=[{title:n("general.archetypes"),id:"archetypes"},{title:n("general.matches"),id:"matches"},{title:n("general.winrate"),id:"winrate"}];return(a,A)=>(i.openBlock(),i.createBlock(XA,{class:"small-table","heading-items":r},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(t.rows,s=>(i.openBlock(),i.createBlock(c1,{key:s.archetypeId,"archetype-id":s.archetypeId,"deck-code":s.deckCode,matches:s.matches,wins:s.wins,index:s.index+2},null,8,["archetype-id","deck-code","matches","wins","index"]))),128))]),_:1}))}});const F3=M(tAe,[["__scopeId","data-v-f883a9d9"]]),nAe={selectedRegion:{type:String,required:!0,default:null},selectedPlayers:{type:Array,required:!0,default:[]},selectedGraphOption:{type:String,required:!0,default:"totalPlayers"},players:{type:Array,required:!0,default:[]},updatedAt:{type:Number,required:!0,default:0},isGraphShown:{type:Boolean,required:!0,default:!1}},rAe={class:"leaderboard-options"},aAe={class:"multiselects"},AAe={class:"details"},sAe={class:"players"},iAe={class:"updated"},oAe=i.defineComponent({__name:"LeaderboardOptions",props:nAe,emits:["update:selectedPlayers","update:selectedRegion","update:selectedGraphOption"],setup(e,{emit:t}){const n=e,{t:r}=se(),a=i.inject(HA),A=[{name:r("leaderboard.lp"),nameRef:"lp"},{name:r("leaderboard.rank"),nameRef:"rank"},{name:r("leaderboard.totalPlayers"),nameRef:"totalPlayers"}],s=i.ref(n.selectedRegion),o=i.ref(n.selectedPlayers),l=i.ref(n.selectedGraphOption),c=i.computed(()=>s.value===null?n.players:n.players.filter(u=>u.server===s.value));return i.watch(s,u=>{t("update:selectedRegion",u),t("update:selectedPlayers",[])}),i.watch(o,u=>{t("update:selectedPlayers",u)}),i.watch(l,u=>{t("update:selectedGraphOption",u)}),i.watch(()=>n.selectedPlayers,u=>{o.value=u}),i.watch(()=>n.selectedRegion,u=>{s.value=u}),i.watch(()=>n.selectedGraphOption,u=>{l.value=u}),i.watch(()=>n.isGraphShown,u=>{u&&o.value.length>0&&(l.value="lp")}),(u,d)=>(i.openBlock(),i.createElementBlock("div",rAe,[i.createElementVNode("div",aAe,[i.createVNode(i.unref(Vt),{modelValue:o.value,"onUpdate:modelValue":d[0]||(d[0]=f=>o.value=f),placeholder:i.unref(r)("general.players"),mode:s.value?"tags":"disabled",options:c.value,searchable:!0,label:"name","value-prop":"name"},null,8,["modelValue","placeholder","mode","options"]),i.createVNode(i.unref(Vt),{modelValue:s.value,"onUpdate:modelValue":d[1]||(d[1]=f=>s.value=f),placeholder:i.unref(r)("general.server"),options:i.unref(we)().dataJson.servers,label:"name","value-prop":"nameRef"},null,8,["modelValue","placeholder","options"]),n.isGraphShown?(i.openBlock(),i.createBlock(i.unref(Vt),{key:0,modelValue:l.value,"onUpdate:modelValue":d[2]||(d[2]=f=>l.value=f),options:A,"can-clear":!1,label:"name","value-prop":"nameRef"},null,8,["modelValue"])):i.createCommentVNode("",!0)]),i.createElementVNode("div",AAe,[i.createElementVNode("div",sAe,[i.createTextVNode(i.toDisplayString(i.unref(r)("leaderboard.totalPlayers"))+": ",1),i.createElementVNode("span",null,i.toDisplayString(i.unref(Te)(c.value.length)),1)]),i.createElementVNode("div",iAe,[i.createTextVNode(i.toDisplayString(i.unref(r)("leaderboard.updated"))+": ",1),i.createElementVNode("span",null,i.toDisplayString(i.unref(a)(n.updatedAt*60*1e3).fromNow()),1)])])]))}});const I3=M(oAe,[["__scopeId","data-v-0689a8b2"]]),lAe={deckRows:{type:Array,required:!0,default:[]},originalDeckcode:{type:String,required:!0,default:""},loading:{type:Boolean,required:!1,default:!1}},cAe=i.defineComponent({__name:"SimilarDecksTable",props:lAe,emits:["sort-updated"],setup(e,{emit:t}){const n=e,{t:r}=se(),a=i.ref([{id:"deck",isShown:!0,sortDirection:be.NOT_SORTABLE,title:r("general.deck")},{id:"matches",isShown:!0,sortDirection:be.DOWN,title:r("general.matches")},{id:"winrate",isShown:!0,sortDirection:be.NEITHER,title:r("general.winrate")},{id:"cost",isShown:!0,sortDirection:be.NOT_SORTABLE,title:r("general.cost")},{id:"differences",isShown:!0,sortDirection:be.NOT_SORTABLE,title:r("general.deckDifferences")}]);function A(s){const o=ei(s,a);o&&t("sort-updated",o)}return(s,o)=>(i.openBlock(),i.createBlock(tA,{class:"large-table",loading:n.loading,"heading-items":a.value,onToggleSort:A},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.deckRows,(l,c)=>(i.openBlock(),i.createBlock(Bl,i.mergeProps({key:l.deckCode},l,{type:"similar",index:c+2,"compared-deck-code":n.originalDeckcode}),null,16,["index","compared-deck-code"]))),128))]),_:1},8,["loading","heading-items"]))}});const U3=M(cAe,[["__scopeId","data-v-65e706f5"]]),uAe={heading:{type:String,required:!1,default:""}},dAe={class:"top"},fAe={class:"heading"},hAe={class:"chart"},pAe=i.defineComponent({__name:"StatisticsPaneContainer",props:uAe,setup(e){const t=e,n=i.ref(null),r=i.ref(!1);function a(){var A;r.value?document.exitFullscreen():(A=n.value)==null||A.requestFullscreen()}return i.onMounted(()=>{var A;(A=n.value)==null||A.addEventListener("fullscreenchange",()=>{r.value=document.fullscreenElement!==null})}),(A,s)=>(i.openBlock(),i.createElementBlock("div",{ref_key:"statitisticsPaneContainer",ref:n,class:i.normalizeClass(["statitistics-pane-container",r.value?"full-screen":""])},[i.createElementVNode("div",dAe,[i.createElementVNode("div",fAe,i.toDisplayString(t.heading),1),i.createVNode(i.unref(Ue),{class:"maximize-icon",icon:"fa-maximize",onClick:a})]),i.createElementVNode("div",hAe,[i.renderSlot(A.$slots,"default",{},void 0,!0)])],2))}});const Q3=M(pAe,[["__scopeId","data-v-f00b184f"]]);function gAe({swiper:e,on:t}){t("beforeInit",()=>{if(e.params.effect!=="carousel")return;e.classNames.push(`${e.params.containerModifierClass}carousel`);const n={watchSlidesProgress:!0,centeredSlides:!0};Object.assign(e.params,n),Object.assign(e.originalParams,n)}),t("progress",()=>{if(e.params.effect!=="carousel")return;const n=.2,r=e.slides.length;for(let a=0;a<e.slides.length;a+=1){const A=e.slides[a],s=e.slides[a].progress,o=Math.abs(s);let l=1;o>1&&(l=(o-1)*.3+1);const c=A.querySelectorAll(".swiper-carousel-animate-opacity"),u=`${s*l*50}%`,d=1-o*n,f=r-Math.abs(Math.round(s));A.style.transform=`translateX(${u}) scale(${d})`,A.style.zIndex=f,o>3?A.style.opacity=0:A.style.opacity=1,c.forEach(h=>{h.style.opacity=1-o/3})}}),t("setTransition",(n,r)=>{if(e.params.effect==="carousel")for(let a=0;a<e.slides.length;a+=1){const A=e.slides[a],s=A.querySelectorAll(".swiper-carousel-animate-opacity");A.style.transitionDuration=`${r}ms`,s.forEach(o=>{o.style.transitionDuration=`${r}ms`})}})}const mAe={activeIndex:{type:Number,required:!0,default:0},cardCodes:{type:Array,required:!0,default:[]}},vAe={class:"card-carousel"},BAe=["src"],yAe=i.defineComponent({__name:"CardCarousel",props:mAe,emits:["update:activeIndex"],setup(e,{emit:t}){const n=e;console.log(n);const r=[gAe];function a(A){t("update:activeIndex",A.activeIndex)}return(A,s)=>(i.openBlock(),i.createElementBlock("div",vAe,[i.createVNode(i.unref($w),{effect:"carousel","grab-cursor":!0,loop:!1,"looped-slides":5,"slides-per-view":"auto",modules:r,"slide-to-clicked-slide":!0,onActiveIndexChange:a},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.cardCodes,o=>(i.openBlock(),i.createBlock(i.unref(Ww),{key:o},{default:i.withCtx(()=>[i.createElementVNode("img",{src:`https://lor.gg/storage/cards/card/en_us/${o}.webp`},null,8,BAe)]),_:2},1024))),128))]),_:1})]))}});const T3=M(yAe,[["__scopeId","data-v-a6ffd2e2"]]),wAe={wins:{type:Number,required:!0,default:1},matches:{type:Number,required:!0,default:1},showDetails:{type:Boolean,required:!1,default:!0}},bAe={class:"wins-losses-line"},_Ae={key:0,class:"details"},CAe={class:"wl-record"},EAe={class:"lines"},kAe=i.defineComponent({__name:"WinsLossesLine",props:wAe,setup(e){const t=e;return(n,r)=>(i.openBlock(),i.createElementBlock("div",bAe,[t.showDetails?(i.openBlock(),i.createElementBlock("div",_Ae,[i.createElementVNode("span",CAe,i.toDisplayString(t.wins)+"W "+i.toDisplayString(t.matches-t.wins)+"L - ",1),i.createElementVNode("span",{style:i.normalizeStyle({color:`var(${i.unref(Zn)(t.wins/t.matches)})`})},i.toDisplayString(i.unref(Te)(t.wins/t.matches*100,1,3))+"%",5)])):i.createCommentVNode("",!0),i.createElementVNode("div",EAe,[t.wins!==0?(i.openBlock(),i.createElementBlock("div",{key:0,class:"wins line",style:i.normalizeStyle({flexGrow:t.wins})},null,4)):i.createCommentVNode("",!0),t.matches-t.wins!==0?(i.openBlock(),i.createElementBlock("div",{key:1,class:"losses line",style:i.normalizeStyle({flexGrow:t.matches-t.wins})},null,4)):i.createCommentVNode("",!0)])]))}});const u1=M(kAe,[["__scopeId","data-v-511803da"]]),SAe={cardCode:{type:String,required:!0,default:"01IO001"},matches:{type:Number,required:!0,default:0},wins:{type:Number,required:!0,default:0},index:{type:Number,required:!0,default:0}},xAe={key:0,class:"wrapper"},FAe={class:"champion-column column-content"},IAe={class:"matches-column column-content"},UAe=i.defineComponent({__name:"DashboardCardRow",props:SAe,setup(e){const t=e,n=i.computed(()=>jt().cardJsonObject[t.cardCode]),r=i.computed(()=>{var a;return`https://lor.gg/storage/cards/banner/${(a=n.value)==null?void 0:a.cardCode}.png`});return(a,A)=>(i.openBlock(),i.createElementBlock("div",{class:"profile-champion-row wrapper",style:i.normalizeStyle({"--index":t.index})},[i.createElementVNode("div",{class:"small-table-background",style:i.normalizeStyle({"--background-image":`url(${r.value})`})},null,4),n.value?(i.openBlock(),i.createElementBlock("div",xAe,[i.createElementVNode("div",FAe,[i.createVNode(nA,{class:"circle-card-item","card-prop":n.value,"router-link":i.unref(nn)().callbacks.cardCodeRouterLinkCallback(t.cardCode)},null,8,["card-prop","router-link"]),i.createElementVNode("span",null,i.toDisplayString(n.value.name),1)]),i.createElementVNode("div",IAe,i.toDisplayString(i.unref(Te)(t.matches,0,10)),1),i.createElementVNode("div",{class:"winrate-column column-content",style:i.normalizeStyle({color:`var(${i.unref(Zn)(t.wins/t.matches)})`})},i.toDisplayString(i.unref(Te)(t.wins/t.matches*100,1,3))+"% ",5)])):i.createCommentVNode("",!0)],4))}});const d1=M(UAe,[["__scopeId","data-v-5c26c4d6"]]),QAe={class:"card-page-toggle"},TAe=i.defineComponent({__name:"CardTogglePage",setup(e){const{t}=se(),n=i.ref(0);return(r,a)=>(i.openBlock(),i.createElementBlock("div",QAe,[i.createVNode(qu,{"selected-option":n.value,"onUpdate:selectedOption":a[0]||(a[0]=A=>n.value=A),options:[i.unref(t)("cards.recommendedDecks"),i.unref(t)("cards.similarCards"),i.unref(t)("general.statistics")]},null,8,["selected-option","options"])]))}});const D3=M(TAe,[["__scopeId","data-v-07d07f20"]]),DAe=i.defineComponent({setup(){return{}},mounted(){const e=St("EUAACAIEA54Q6AIGBECACBQKF4AQIBQGAECAOUYBAECBWAICAYKACAIFFUAQIBAOAIDAOBJIAIDAYBIIAIDAMGY5AMDAEGI4EIBQMAYTC4RAGBQABIMCQAYGAUBQMHY");console.log(e),console.log(wE(e))}}),LAe=i.createElementVNode("h1",null,"TestComponent",-1),OAe=[LAe];function MAe(e,t,n,r,a,A){return i.openBlock(),i.createElementBlock("div",null,OAe)}const L3=M(DAe,[["render",MAe]]),NAe={name:{type:String,required:!0,default:""},selectedBannerCard:{type:String,required:!0,default:""},rank:{type:Number,required:!0,default:0},id:{type:Number,required:!0,default:0},matches:{type:Number,required:!0,default:0},lp:{type:Number,required:!0,default:0},change:{type:Number,required:!0,default:0},index:{type:Number,required:!0,default:0}},PAe={class:"wrapper"},HAe={class:"champion-column column-content"},RAe={class:"mana-hexagon"},VAe={class:"mana-number"},KAe={class:"name"},$Ae={class:"matches-column column-content"},WAe=i.defineComponent({__name:"DashboardLeaderboardRow",props:NAe,setup(e){const t=e,n=i.computed(()=>t.selectedBannerCard===void 0?null:`https://lor.gg/storage/cards/banner/${t.selectedBannerCard}.png`),r=i.computed(()=>t.change===void 0?[]:t.change===0?["neutral"]:[t.change>0?"good":"bad"]);return(a,A)=>(i.openBlock(),i.createElementBlock("div",{class:"profile-champion-row wrapper",style:i.normalizeStyle({"--index":t.index})},[i.createElementVNode("div",{class:"small-table-background",style:i.normalizeStyle({"--background-image":`url(${n.value})`,"--background-color":t.index%2===0?"var(--color-background-0)":"transparent"})},null,4),i.createElementVNode("div",PAe,[i.createElementVNode("div",HAe,[i.createElementVNode("div",RAe,[i.createVNode(jo,{class:"hexagon-icon"}),i.createElementVNode("div",VAe,i.toDisplayString(t.rank),1)]),i.createElementVNode("div",KAe,i.toDisplayString(t.name),1)]),i.createElementVNode("div",$Ae,i.toDisplayString(i.unref(Te)(t.matches,0,10)),1),i.createElementVNode("div",{class:i.normalizeClass(["column-content change",r.value])},[t.change!==void 0?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createVNode(i.unref(Ue),{class:"icon",icon:"fa-chevron-down"}),i.createElementVNode("span",null,i.toDisplayString(i.unref(Te)(Math.abs(t.change),0,10)),1)],64)):(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createTextVNode(" Test ")],64))],2)])],4))}});const f1=M(WAe,[["__scopeId","data-v-3d62a718"]]),GAe={date:{type:Date,required:!0,default:[]},activated:{type:Boolean,required:!0,default:!1},soon:{type:Boolean,required:!0,default:!1}},eh="data:image/webp;base64,UklGRpQVAABXRUJQVlA4WAoAAAAQAAAAYwAAjQAAQUxQSAEBAAABgGPb2rHn+e3KTunUNntXPyaQKSSV7UzBSfejizkD26htPU/y/lZETABIK2xW2koVX0DKFxXZrLR1CQD2y3vah6PpUeLxnXviuwEBtL5SPz6/Ur+8Urvl0EbGQLccWsPjXH6DO+jg+vQSZGh5Zb7XaAp7aPEKbezzKMKEWuP+C7y0xdzV6gXkWif7drOyTtj34Mg99QL28KAcr5B14g0yAyo5p94gzytkn7Dv3qZz49xvzM6hzi5ffHrankNevMXZzIDUhuFfDw2PdKQr1SqVSqX+rUqbPfP8et2YqFKjqgz1I8ODA8O/7SnjAnC4qIBvGNm18wGdw0WF/6jMFcCfBwBWUDggbBQAABBDAJ0BKmQAjgAAwBIliAKSzJgM/yf5TextXv8H/bv2BwHdg+Vdzn/0vWB/tPVF5h36ofrv14vMX+3Xq2/7v1cf2b1AP6l/gOtp9A/9x/Th/dX4aP7X/2f3C9rXBZ+F2Jr4/8+/kPzM9c3+w73vS/++9CP5x+Df1n9q/dL2b8DflTqHfln9a/0/Ar209A7vn37/+R6R/YP/le4H/Ov63/oeSc9E9g3+ef3T/s/4z2Uf/P/Zelr6a/9f+k+BH+df27/reu51QB6l8J+19f+pT6sZj+zE2+wE9vWoNfcEz0oTpvLjAO+Oa0LQ0Jow+wnjIYPuMNdJgebCP0A0x9HFV9m1SGgYnekuqE7R0gGfFSqVDdnmaEzLXqoY5ab7mI283b2U6qHsm1LaV2sv3hWYD74YbO9I365ZyH7IOZW2np5xzxY1uNwlx8m3/TlZpshWOQCUqQEaeXuo/NGNB7fPAFQA9spGF46iKOVdiy4H51LojrONPcDzWBAEuAoyxYSjdLl+yL79WxDhr4xWsGpRCikM1q5cdoxI5DzxmQC+WU34EWnl4CUNbIztZ0DdID1a0xmf9PiWSXfO4bZPzx8wcVrzgmGBY4h9fhG06Eg8Pe4iO3CVETaIxrPsQBwT/o2De9RYWlsdvaDBCRFNqTIhtugVNyhTOM/+NHgy2FRNW55uPOcszqLATAsZl/DQCkGM1H3/Q6b8yOWsaDQ8wYl8YUfoAP7u3JuG7XFiqpPFp/zTze9Dk0t236U3vstNlqJ6SMY/EUhcAaCy3g3fU1aSTwRLVo/tbHheprGIHpVpNqjxBzS1OFaBnyrYoywF4mxQQRjLtYqhSzPDGyjl/+mVF30ZwM1deMxjDDSwpabr//JIfGwSajIir7csLqBcPmzLwiG0X8yyOdc6OggQUYZentENwuvqEfj4tkP5AdpcIlLP6PXPTMLwXYC5UVVGobBIg429evsLhW4cFRY7HS7kzF/loDieDUMVuHgsMHmBlHbV0ft7uggiS+/oURoyeFXHtbAffBaM7WcIS0lh3dr/hH+xcEKpG6voqahtySY9unVDK4Ma+M4J9OXSo71s3dEeACMKt+lj+FBWDsCJDXpu9Lm3VLbYyT5aF4l0kiGnDuTyRednJJxXlv9ZB2XqhFRCRxK1YE9sx6PGzx8h1YQvNTO5vUl/nAq/pglypqDeR1DHey3IRtZsO/1/M12zYhtN58HYvZriSE/pzLhUGdKAnDJN+N1zpts+c79KrZYjR5+LC8mqTp3zA107/ruodw4OhlDLLtEkHoK0aL6L9kgYkVYuk051/J0iVKO6TrNDjtGCXCzQ61VHH07nEMhfWQqzs+eEOnCdem+/mp99Y5moGhX/AG8JXlhIt15Lv5D60Crp8RJMOD93GDx3WmltCm+Uv1YUslp6iqCDT9pJkbrVnz19cge4T3b7AMrWIAxvDVSB+GjGkX/VQXtjcfsYyHhBaNDOrAPmMkk43eLISRFlsUW9xJ70I7YqMi4KkLA5BSawyrIJeGDRRPpOyqXBJ3he27M6nYaDUcu/dw+zKZFrH6JJepygQiw9/gTA8qAo9Wy4TxVrbJ3iVIyWD9tN6kW+H0ATrOZcaPr4mEoJATghh5iOmN12PTvewVv3VhiUXfqV2BWbUrqWHOkvUgcNaMRXkTobbwOziNe7s9Ub8f1fyJJ+KoqDjl5TXGTKJf71c5O8PiHEwUijMoTg1GNrxg/iyd2pvikPHJ/LeYRAjV77bM1tdlnWBYiABeF3lU6zrp/qqdxhb8P33GXLOZC+7Q+k29zjZyKON23ZtaPwSL1oDj4jmqXJ0DV/iWA+79rebbt2US+K8ARkowLBGCyDHGaKBFXplZu5qY2Jr6P0YUmkj8Se0bToxblcTq3Yo99+M+HkAnRjvQ6iVKId8+YXuXpHdWG2e0XjaXsZ6IBomXeg/qv7XzhWsqrLDSmmSG1scFVF9w5hYj02X4QIhwfHS9DJ46kN1NvcCouEHbUnMQHzUsndQ/LXToevL3LcziuwhLIDliY5NZVQGbChii5WdshXFpqLTnMoSx/QLlWVrcEpCWeg1QCKc32cIAdHGm85bWc1BWWymuRFjr5Tgp3b9TPWLbmnJyb+oSemQmbAPvG9LJIqXmr2xCr0TGmDluE4zO8vaZ/YMEtA9ObEVpVaRj/fqmgL6oHMSW8btJ19nVA62zSzzTuNWJjkN2Zx/t3a5oddkCmbJATg/9VKopqZllxD/GmhAA2Z+o2Yl+CoH3mwuLLPslUy54VmjbhRr+FyR7akdBlYodQHYMNcOKTqhcRGICgXOLTRXn27nIzblK2s7Ts8zAeHmG48CpkdL0ogJ+mrFlrUonC65itjH25Zybm2oM+zxGTTFmy3qhxeF44T6UObeh1vuD/xnjE7NOi28jLT2p7QOjRifMsWRKF8A1+4WnZwba/telVJ0M6W12iygb8UFKOypj4S3LoX1Sx+DIoHPssoAW9iBseVXrDaK8AUOd4jhVQ1WZXhAyQrLt5vuLNMEaFbCq0RltFolGtQ9UYWId2iCWWUAob/O5rzCZMRGWlrXfqV2OMsz7NzL8MkLUlj/XCo/PHG7Lqo/QabVPLqTejIyn8VMf75hXLI4vX3fFT9uVIjfrLe3wDtwo3hgQlrT+8wtcHIkMnpF1wK0Pmi3q3dt+cBzJ7twZjPrXbla5YVz18ptitmRDERECQ67qfzqNrl2C9pLJ/q1f/Ew/JY3Fr/02nDtq35QZ0dZYgfTf47HOzzo4UjL+noRi2L+dBj0fBp9NznpszWtf/ViprbM+6Zzv1l+tD4U3Zu//+Oey/Lgbh8EQfzgm9i59POCMUU/7sNjnSLils28YksYWNbznb3xcNIpy2wR85ntEWFLTuHfln1UVFAUGGrZdmWz6JzqNPxD0AeXjf8ntg4NCbxgB8iohTpMedkpD2q9xEEUXBeo8yuCJKNjP+zg/AYfX9/PVLZWqo5l/XXgtH2ABNTFqA2942K8zLTN4rjFvA8KqN5rmSofCljeENG145859vlNSmeR0T1U7KZ/z6Q/crwGbDY1f9Cmfzjf7MsZklghfj/1shlyq7gSv5Ym375SxDw/iDuj67jYdGOBVjmpB1mnV158my0bdh75nONKc2vK8ZjU+iNXS/P8aJUAiRFk7st3bV5h9baGPOQqbOk4dWjw8NUN7nwm0fmJQ5vp73I/A4UZ8eqf638Gkr3pXrHvUebaPb+xcIzBDE1Nvcojfb/5nm95LL0aHg1iKt36a6uavLgIvpkN7Qo3TujZX95S02Bjz3vhFXVLmBFQCYemOTW9uc4LHakG8kU8VevsB1HT+S1RQKKGdo8JtG9raNhNJjHGLqolgRumnusF3c3ABwOjbQhbjjfMQpu7cdy6J0DTh2hatG32udWg1LPdR9fsVpjEysfGQ0GDDxrvx9YwIGgSRZOZpNEJop4ey3CbpHsmfbpTu+aiszsvP5P6WtQ92vlZ8hxGp2cmnFD2MB6+gQ0hM7eZRxHsKG0+WcpmGsBbtEcNBFvUhbVul/oh7JL+W7adTjOuAVWYVYoTud4ovKjSckZfM1oTXnO4Ky5/LPkQICBB53iz2cdoAWm7owZYQ/S/m4Uwya+G8RezTLMacJChJKqvaibSzfr1bLY6Vry/907SR/JMI7gNWKaUF3Vba3b5b0HxlnFvPrH9H/e+v/zKavQWUONrFVDJYy1XBQUKeYi/Nk2TjiR28KllKGnB2Fq4UnOXuNFR6A2fOnv22Ud48xB8MDHPdrkiVnT362fvOFVnTizjBiQ8TsDnPCs9yEBp16IVDSPomLlWtRkTdEKM6vtCfOz5kpT/0/f18Zx1GX1lvHApIkCfMiNePrIQ9HXD0kmtO7+kdpnb01upiB8fDivDuW+Q0T9Ekbl4PcAAl6+TEntzh67pMz09ikbexC0m6HJHt2TiTtEeCNtLfTWM7HNNFnyoD6HOVEHxiygPZ4y8pyIEJY6J8xwz4TjpyIsHs3cFHpgqfjkUgTFx3uclUbtjRvRXWkgXyZd2ysup9AT8mS0ZJxbARswqXFxJaMDemxOcr6pMmpUPPx6m3QAAnD5YW7H7ATCMs7x2pa2P++IZrqP5lRbgR3bmPDGNdaK0MJWIdUEp/KMOQS9B6vwdVSLl/8mjT5CxXSx2VxxrgGTVW6NBBuTmP9Vt9ZOQ0d0ORGcg++/xMiPrl91fbiMOVAa5GRuhKUhIpUCxVplYkot97+71nhgPlFn6t3NoJKsWX7ecxQQ2Ju2lHT7kO007o0voWXVBgS4t1L3tHfiGWu9NcmCjKwt8PwHn/Jz3v6Uek7SG+ZjCMiakQpmV+0QrjA09K3jZfQgUr+zs/3n/X1zZPPLWk+TlywRK6p0/qbliMMhyXFKbGpTXqvlvBC2Fr58dVvfouGrlfh72hq6YOaZn9zdQWPqbjtqIg8g9QxZzL954uK2OuI1JJittRNNcVSSra2lACV/Ej7Or5II6lx2C3FjqTsrh4UXCcUZWtsOA24NHIJ9CzFmsC4IyIOUXhZEN65l9PYCkjNWKaNz89kPq2+4ye1/jzAuDDg2RrKp/FNIKhhKO0YSPaLz9ODfQTLJhMTpPAXm+xLB0oX7Vo75znqCKyJvmxCmfzANcHkBciBEuOOq68Zl6RZtvaAB0xxFCOfvwBwUY+0qWjfW5PVAaY9bzRJlL100JT3b2kkKDbSW1JXvJqoC/Gubz7CPLYlMJ8dNbim9ydCev9Yq4uzuFENwzKxXa/+CJOmjxzMMCUO8Et1aezpZRwhRESDWtEzJpOKzapC0Hy+M9LX92rbTLKuAfIs+t2RLVUI914oLWgqjEfsM+8o8Tp+U+TRjZ2FF4Ksvp2tGNUiwUapjWbERc67w9nCCgSfLo/c3J1nQLygbzMoJrH4FojgB5aomLL3Qu6IHsRkYhXeYS5oHE0EyRRQXDSEsr4Agr+Yfe5rM854ckE/Yjtm9JnUazZfvvxW2UhxIs9N1m706CP2Ypvs1i7dW+ZmqMCL6uSL+C7hOyycrmvY3Y1YHfIm/pn6u2tgqDN0Y/mZKlUtFq431+zZtpV7+M8ImZf+ou67QEQgXKlc5nxIRUn4WPWlDg2J+6ifiADxcmoRbqWCcG7PR1aUBaLcdSH9KfyF9wgQEj3V+4gyQIa/4JZICFGBUF1BBpZ/anb9TggFs64t+P8eXsWK/kYO+YjSiRyclvKR6hdZRs3hsPY5i7CnmpMUZIns0Ir1ZD8T38M3GM2CcjVW7dG8+0pgw9Si3W5RQrSQjYNq/0A9slLyqiv6ZjrmJFk8Vumsh0VfVPiE7vzqDoxlssE+RqwjJb7DCYE6MHby3aDhaThUE8lgQ7wHTzwoT6IwKqw1ofiTrBycnkdgSKnNEcAgmEQm/Nc4SfKQIjYFgAC+IZeC+S8/pKr8oSNd53EyIK7cuYgnPCUSYn8K2wZD3f/HeVjWIk2EaqRQNZvhCL9pMdwBR8OFRxr36qHCqSx2ZPJOQ3MOPk7swYH4B1QSo4K5tY7/RSl69ftU132HNN0NDfzsvWmBTzVLArpA8RY9LCv7PQ+tbH+6xQWWT4zo41H0hZroZB9Y1BRkiR1jU2XXIQzjY8M2WxSCUywHQOItrSSuDf43zfF+0pXshiSJh3wkP7UVjoF1JMXAPzr2YtxaKFTaZHj0t+e2KUYnGCPDMRt/jsJ1VNqvqGMjhbzmK/Ji7jcaK0nVU2t150c0NRtZlmCiRa7hpNnWe8JlN946yTf4mBY6we5YtS+tHlFzb6xxXgSNdAJUQ/Cf/gbr1MOYnfNPn7tgsduJnySBfUxlhueUByJNOC3T+QE5gELLjR8V/YThTkoJl7a4clEiUTt+fUCWTdjRcJgg8LQSvOspSnGQ5o5a42FBWa2brKLjpnmcroiLKuqJ8SM/UeCuF78esGhAuc2nC0jXZv12w17el7YAcHrpA2Vx+Jv6X5ok4PxVseLzfIY9wbb0nrOCAU3Gg/eKUcu2emB7XfMAgEbBPf7tOMUfluV4zeGsAFHhH3jCmTT0ie7YZP13tsgzt6I+llT2GnDkU9ylV0Rjzdl92EnAJhLyZovmJn2r+3xytit6NWsWFNLk8xZeFTY6cWoqEtVA2HoX/dvgwba3wkOMiZHRRnDWc5OHZ8DvUufoI4BEp4lLz8LqDcJ4U2ROGcH/tNtLAWpov5bBWwYZghIsAyxK4elFVxROoKzEytuvDaHjB85srMddi0+wpvq8Gv2hadSObXFOTXuJYuca+dVPRPg6i8Jy4YRCCcvDJ9h/G4pHs8UtxcagVPFP3LtdVn8qwgiO4/RkY/NvkpOnzPrgtjKA9F25cFO/iEV1SONr2YEg2e21jHzxn1BpHOC+VjkYP6+XVfhyW3FnO55pyGqelLpWnIMcvLUb/nYZluleyUZSt9yjLLW6HyeMT/TsCJpQ+TixJzS2a/JQRc+igKZAJCN5f4pHylBS/nTZQqff5FAhr6QbQIbB+3sfEH7dCB5G4BcRU/hWRacndN8it2rV+0OL+q9WuSGBeFROmtq7ko9ZK00n9mGhhm+CYaUiUyUpdNEhcjDi72xSDSPr5PIlg4ecGmxXOzJMAvwi7oAQQg+Yf0/4z2VCGkFCJ+brkSSZLb8fs2G2c+fYVn/tnAmmooSpfNyJw90LiRdDuQbQ93BQWt3azhV9TEBsPGFE3GGkTw0krNqcURqAQKzvXr2bnhO8KRWoWG7XliqBjI/qGv4UOSaZGwIFqc88q1XuMWRIvW6Cy0jaeljlEotz0AFnDGH2Aq1Pn6SREslqfkNcbIyJ/ZH8oMeXhw4Ua92QnhLp909o39dtaOK/eyzPuAH0ev2kS5g9sKHUC7eEoZIBtPPDrdsGXKpr+L+P9BRvo7OcKaVBxchzd2ZLrq/KC+l5UF0ZSfFqSW6UE0inppd0zfwM2/igkrgcDqi6fKcNBLQO3Yh9ysmWdD7EQ2ZnQ1rzdxuR59XgwjJvDgAAA",zAe={class:"reveal-day-option-wrapper"},jAe={class:"card-wrapper"},YAe=["src"],qAe={class:"card-wrapper"},XAe=["src"],JAe={class:"card-wrapper"},ZAe=["src"],ese=i.defineComponent({__name:"RevealDayOption",props:GAe,setup(e){const t=e,n=i.inject(HA),r=i.ref(null),a=i.ref(null),A=i.computed(()=>t.date.getTime()<new Date().getTime()),s=i.computed(()=>A.value?`Revealed Cards
|
|
880
880
|
${t.date.toLocaleDateString()}`:`Cards Revealed
|
|
881
|
-
${n(t.date).fromNow()}`),o=i.computed(()=>{const l=[];return t.activated&&l.push("activated"),t.soon&&l.push("soon"),A.value&&l.push("past"),l});return i.onMounted(()=>{At(r.value,{content:a.value,arrow:!0})}),(l,c)=>(i.openBlock(),i.createElementBlock("div",zAe,[i.createElementVNode("div",{ref_key:"revealDayOption",ref:r,class:i.normalizeClass(["reveal-day-option",o.value])},[i.createElementVNode("div",jAe,[i.createElementVNode("img",{src:i.unref(eh),alt:"card",class:"card"},null,8,YAe)]),i.createElementVNode("div",qAe,[i.createElementVNode("img",{src:i.unref(eh),alt:"card",class:"card"},null,8,XAe)]),i.createElementVNode("div",JAe,[i.createElementVNode("img",{src:i.unref(eh),alt:"card",class:"card"},null,8,ZAe)])],2),i.createElementVNode("div",{ref_key:"revealDayOptionTippy",ref:a},[i.createVNode(Ju,{text:s.value},null,8,["text"])],512)]))}});const h1=M(ese,[["__scopeId","data-v-f3dbe378"]]),tse={days:{type:Array,required:!0,default:[]}},nse=e=>(i.pushScopeId("data-v-76ed46ac"),e=e(),i.popScopeId(),e),rse={class:"reveal-day-options"},ase=nse(()=>i.createElementVNode("div",{class:"line"},null,-1)),Ase=i.defineComponent({__name:"RevealDayOptions",props:tse,emits:["update:days"],setup(e,{emit:t}){const n=e;function r(a){const A=n.days.map(s=>({activated:!1,date:s.date,soon:s.soon}));!A[a].soon&&A[a].date.getTime()>new Date().getTime()||(A[a].activated=!0,console.log(A),t("update:days",A))}return(a,A)=>(i.openBlock(),i.createElementBlock("div",rse,[ase,(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.days,(s,o)=>(i.openBlock(),i.createBlock(h1,{key:o,date:s.date,activated:s.activated,soon:s.soon,onClick:l=>r(o)},null,8,["date","activated","soon","onClick"]))),128))]))}});const O3=M(Ase,[["__scopeId","data-v-76ed46ac"]]),sse={cardCodes:{type:Array,required:!0,default:[]}},ise=i.defineComponent({__name:"DashboardNewCards",props:sse,setup(e){const t=e,{t:n}=se(),r=[{title:n("general.newCards"),id:"newCards"}];return(a,A)=>(i.openBlock(),i.createBlock(XA,{class:"small-table","heading-items":r},{default:i.withCtx(()=>[i.createVNode(gg,{class:"reveal-carousel","card-codes":t.cardCodes},null,8,["card-codes"])]),_:1}))}});const M3=M(ise,[["__scopeId","data-v-89a26f2c"]]),ose={players:{type:Array,required:!0,default:[]},shownColumns:{type:Object,required:!0,default:{player:!0,lp:!0,change:!0,wins:!0,matches:!0,winrate:!0,deck:!0}},loading:{type:Boolean,required:!1,default:!1}},lse=i.defineComponent({__name:"LeaderboardDetailTable",props:ose,emits:["sort-updated"],setup(e,{emit:t}){const n=e,{t:r}=se(),a=i.ref([{id:"player",isShown:n.shownColumns.player,sortDirection:be.UP,title:r("general.player")},{id:"lp",isShown:n.shownColumns.lp,sortDirection:be.NEITHER,title:r("general.lp")},{id:"change",isShown:n.shownColumns.change,sortDirection:be.NEITHER,title:r("general.change")},{id:"wins",isShown:n.shownColumns.wins,sortDirection:be.NEITHER,title:r("general.wins")},{id:"matches",isShown:n.shownColumns.matches,sortDirection:be.NEITHER,title:r("general.matches")},{id:"winrate",isShown:n.shownColumns.winrate,sortDirection:be.NEITHER,title:r("general.winrate")},{id:"deck",isShown:n.shownColumns.deck,sortDirection:be.NOT_SORTABLE,title:r("general.favoriteDeck")}]),A=i.computed(()=>({"--columns":a.value.filter(o=>o.isShown).length}));function s(o){const l=ei(o,a);l&&t("sort-updated",l)}return(o,l)=>(i.openBlock(),i.createBlock(tA,{class:"large-table",style:i.normalizeStyle(A.value),"heading-items":a.value,onToggleSort:s},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.players,(c,u)=>(i.openBlock(),i.createBlock(r1,i.mergeProps({key:u},c,{index:u+2,"shown-columns":n.shownColumns,"router-link":i.unref(nn)().callbacks.playerRouterLinkCallback(c)}),null,16,["index","shown-columns","router-link"]))),128))]),_:1},8,["style","heading-items"]))}});const N3=M(lse,[["__scopeId","data-v-89e95cdb"]]);const cse={},use=e=>(i.pushScopeId("data-v-c8a918ec"),e=e(),i.popScopeId(),e),dse={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 400 400"},fse=use(()=>i.createElementVNode("path",{d:"M107 57.2C23 99 25 97.6 22.2 106.3c-3.4 10.4-6 4 43.5 103.1l44 88.3.5-6.6c.4-4.6 1-7.7 2.4-10.4l1.9-3.7-40-80.8c-22.1-44.4-40.1-81.5-40.1-82.4 0-5-.9-4.5 78-43.9l75-37.4 3.4 1.1 3.3 1.2 49.8 99.6c33 65.8 49.8 100.4 49.8 102 0 4.9-1 5.5-28.2 19.2l-26 13 15.4.1h15.4l13.9-6.9c19.2-9.6 23.1-14 23.2-25.6v-5.7L257 129.6C221.5 58.6 206 28 204 26c-4-4.2-9.6-6.5-15.8-6.5h-5.1L107 57.2m121.5-15.8 3.5 7h29.6c26 0 29.7.2 31.3 1.3 4 2.8 4 1.9 4 68v61.6l6.6 12.9 6.6 12.9v-76.3c0-90 .7-84.8-11.8-91.7l-4.2-2.3-34.6-.3-34.6-.2 3.6 7m95.7 42.1V91l24.3 12.1c25.1 12.5 28 14.5 28 18.7 0 1.3-10.8 24-26.1 55l-26.2 53 .2 14.9.2 14.8 32.8-65.8 32.8-65.8v-5.5a20 20 0 0 0-7-16 739.5 739.5 0 0 0-58.6-30.6c-.2 0-.4 3.4-.4 7.6M126.5 285.1c-4.2 4.2-2 10.3 4 11.4 1.5.2 57.1.3 123.6.2l120.9-.2 1.9-2c3-3 3-6.9 0-9.8l-1.8-1.9H128.8l-2.3 2.3m1.9 25.8c-4.5 1.8-5.5 7.5-1.9 11l2.3 2.3h122.4c130.4 0 125.8.1 127.2-3.5 1.5-3.8.3-7.8-2.7-9.4-2.5-1.3-244-1.7-247.3-.4m-2.3 29.3c-2.6 2.6-2.6 6.6.2 9.3l2 2h246.8l1.9-1.9c2.6-2.6 2.6-7.2.1-9.6l-1.8-1.7H128l-2 1.9m.6 27c-3.7 3.5-3 8.9 1.4 11.1 2.6 1.3 9.8 1.4 124.8 1.2l122-.2 2-2c3-3 3-6.9 0-9.8l-1.8-1.9H251.7c-122.8 0-123.3 0-125 1.6"},null,-1)),hse=[fse];function pse(e,t){return i.openBlock(),i.createElementBlock("svg",dse,hse)}const P3=M(cse,[["render",pse],["__scopeId","data-v-c8a918ec"]]);const gse={},mse=e=>(i.pushScopeId("data-v-4a6733fd"),e=e(),i.popScopeId(),e),vse={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 400 431.6"},Bse=mse(()=>i.createElementVNode("path",{d:"m178 26.2-8.6 1.8-9.6 2c-2.6.6-6.6 1.5-8.8 1.8-2.2.4-5.7 1-7.8 1.6l-8.8 1.8-8.8 1.8-8.6 1.8c-2.6.5-6.2 1.2-8 1.7l-8.8 1.7-8.6 1.8-6.6 1.4c-3.2.5-14.1 2.9-18.3 3.9-4.2 1-4.4 2.2-2.2 15.1 4.2 24.3 5.2 51.8 2.9 80.4l-.8 10.8c-.2 2-.8 6.9-1.4 10.6-.6 3.7-1.5 9-1.8 11.8-.4 2.8-1.2 7-1.8 9.6a138 138 0 0 0-1.8 8.3c-.3 2-1.1 5.3-1.8 7.4l-1.6 6.1c-.8 4-3.8 14.2-7.1 23.6a191.2 191.2 0 0 1-5.7 15.3L39 259.8c-.7 2-1.7 4.2-2.1 5l-8.5 17c-3.4 7-3.6 6.6 11.3 17a13873.6 13873.6 0 0 1 92 64.6c17.4 12.3 16.5 12.7 18-8L151 332c.6-12 .9-16 2-30.4.6-7.2 1-13.3 1.8-30.2l1.2-18c1.6-20.9 3-46.9 2.6-48.9-.4-2.3-1.8-2.8-5-1.8-9.2 3-18 4.4-23 3.7-15.1-2-25.3-12.8-29.8-31.8a95.5 95.5 0 0 1-2.6-29.8c0-19.7.1-20 5.5-21.6a691 691 0 0 0 14.5-4.2 583.1 583.1 0 0 0 24-6.8 88 88 0 0 0 6.4-1.8c2-.6 4.9-1.5 6.4-1.8 1.5-.3 4.7-1.3 7-2l5-1.4 5-1.4c12-3.9 13.8-3.9 28.5.4a746 746 0 0 0 23 6.5c.4.2 2.3.8 4.3 1.3 2 .4 5.2 1.4 7.2 2l6.4 1.8c1.5.3 4.2 1 5.8 1.6l7.4 2.2c19 5 18.6 4.5 18.6 24.2 0 48.9-20.7 71.2-55 59.3-6.4-2.2-6.8-1.3-5.6 13a948 948 0 0 1 1.8 30.3c.2 4.7.9 14.2 1.4 21 1.1 14.4 1.6 22.6 2.2 34.8.2 4.8.9 14.7 1.4 21.8 1 12.3 1.2 16.4 2.2 36 .9 16.2-.6 16.4 26.2-2.6a2102.7 2102.7 0 0 1 24.8-17.3c2.6-2 7.1-5 10-7.1a3744.4 3744.4 0 0 1 30.2-21.1l17.8-12.5c13.2-9.2 14-9.9 13.7-12.5-.2-2-.5-2.7-3.4-8.1a164.8 164.8 0 0 1-10.7-22.4 292 292 0 0 1-9.5-25.4 292 292 0 0 1-7.2-25.2 345.8 345.8 0 0 1-10.4-64.4c-.9-7.7-.6-44.7.4-53.6l1.7-15.4 1.4-10.6c2-9.4 2-10.2-.1-11.7-.7-.4-2.1-1-3.2-1l-6.5-1.5-9.5-2c-2.7-.4-6.7-1.2-8.8-1.8l-6.9-1.4c-1.7-.3-5.7-1-9-1.8l-9.8-2c-2-.3-5.5-1-7.6-1.6l-8.8-1.8-8.8-1.8c-2.1-.5-5.6-1.3-7.8-1.6-2.2-.4-5.8-1.1-8-1.7l-9.4-2c-3-.4-7.3-1.3-9.6-1.9a28.3 28.3 0 0 0-14.8 0"},null,-1)),yse=[Bse];function wse(e,t){return i.openBlock(),i.createElementBlock("svg",vse,yse)}const p1=M(gse,[["render",wse],["__scopeId","data-v-4a6733fd"]]);const bse={},_se=e=>(i.pushScopeId("data-v-b519ac08"),e=e(),i.popScopeId(),e),Cse={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 400 429.1"},Ese=_se(()=>i.createElementVNode("path",{d:"M53.8 32.8c-2.6 1-8.3 12.9-13.6 28l-2.1 5.8c-.4 1.1-1.1 3.5-1.5 5.4L35 78.8a84.1 84.1 0 0 0-2.6 14.1c0 2.7.8 4.1 7.4 12.5 16.7 21.3 16.7 21 2.2 21-13.3 0-13-.3-12.7 11.8.2 8.4.7 11.8 1.9 14.2.9 1.7 1.7 2.7 27 35.3 8.1 10.6 7.8 11.5-4.2 11.5-11.9 0-12 .3-4.4 16.9a269.4 269.4 0 0 0 28.7 47.7c8.4 11 8.6 11.5 9 19.8.5 8 1.1 11.4 4.3 24.4 7 28.8 30 57 60 73.2a97 97 0 0 1 5 2.8l3 1.4c1.5.5 3.5 1.4 4.5 2 2.8 1.4 10.6 4 11.6 3.6 2.1-.5 2.4-3.6 1-10.6-.6-2.6-1.4-7.3-1.9-10.6-.4-3.2-1.2-7.6-1.6-9.7a218 218 0 0 1-2.6-15.1l-1.8-10.2-1.6-8.2c-1-5.6-.9-5.5-13-5.8-10.4-.2-11-.4-12.3-2.5-.4-.7-.5-7-.7-28.7-.2-26.2-.2-27.9-1-29.2-.4-.8-5.5-6.3-11.4-12.2-5.9-6-11-11.4-11.4-12.2-.8-1.5-1.3-65.8-.5-68.5.7-2.6 2.6-2.3 7.3 1.3l6.8 4.9a1371.6 1371.6 0 0 1 25 17.9c16.1 11.6 25 18.2 26.2 19.7l1.2 1.6.2 28.6c.2 31.6.1 30.2 2.8 32 1.7 1.1 28 1.4 30.6.3 3-1.2 2.8.6 3-31.4.2-31.9 0-29.5 3-32.5 1.7-1.5 7.1-5.6 18.6-13.7a3147.5 3147.5 0 0 0 38.3-27.6c4.4-3.3 6-3.6 7-1.2.7 2 .4 66.8-.3 68.3-.4.7-5.4 6-11.2 11.9-5.7 5.8-10.9 11.3-11.4 12.2l-1 1.6-.2 27.8c-.3 35 1.2 31.2-12.6 31.6-12 .3-12.2.4-13.6 12.6-.3 2.9-1 7.3-1.4 9.8-1.4 8.3-2 11.7-2.6 17-.3 2.9-1 7.5-1.6 10.4-1 5.6-2.2 14.1-2.2 16.9 0 2 1 3.3 2.8 3.3a93.6 93.6 0 0 0 21.9-9.4 124.7 124.7 0 0 0 47-44.9 128.2 128.2 0 0 0 15.9-52.5c.7-11.5 0-9.7 11.7-27.2l10.4-15.6c2.3-3.3 18.2-34.8 19-37.7 1.1-3.3-.8-4.3-8.8-4.3-11.8-.1-11.9.1 3.4-20.2a1330 1330 0 0 0 15.4-20.8c4.9-6.6 5.5-8.5 6.6-20.9.6-6.3.4-8.2-1-9.6l-1.1-1.1-9-.2c-13.5-.3-13.6-.6-4.2-13.4 14.6-19.7 14.1-18.3 11-31a188 188 0 0 0-9.9-31.1c-2.8-8-7.8-17.3-9.9-18.1-2.6-1.1-1.7-2.8-24.6 43-20.2 40.3-21.3 42.4-22.7 43.2-2.1 1.1-3 .5-6.3-4.2A118.4 118.4 0 0 0 237.3 71a122.9 122.9 0 0 0-76 2 73.7 73.7 0 0 0-14.9 6.9c-13.8 7-29.8 21.3-39.1 35-3.3 4.8-5.2 5.6-7.4 3.1L78.4 75.7c-22.4-44.9-22-44-24.6-43"},null,-1)),kse=[Ese];function Sse(e,t){return i.openBlock(),i.createElementBlock("svg",Cse,kse)}const g1=M(bse,[["render",Sse],["__scopeId","data-v-b519ac08"]]);const xse={},Fse=e=>(i.pushScopeId("data-v-f1928c9e"),e=e(),i.popScopeId(),e),Ise={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 400 470.8"},Use=Fse(()=>i.createElementVNode("path",{"fill-rule":"evenodd",d:"M60.6 11c-.5.8-.6 17.6-.5 157l.1 156 1 .8c1.5 1.3 278.4 1.2 279.6 0 1.3-1.3 1.2.8 1.1-81.1l-.1-78.6-1.3-1.1c-1-.9-4.5-2.2-16-6-38.4-12.5-36.7-12-38-10.7-.7.7-.7 5.1-.9 64.4l-.2 63.7-.9 2.2c-3.9 9.5-11 14-23.1 14.3-12.4.3-20-3.6-24.3-12.3-2.4-4.8-2.3-1.4-2.3-95v-87l-1-1.1c-1.2-1.4 1-.6-31.6-12.6a552 552 0 0 0-25.5-9.1c-2.5 0-2.3-8.5-2.3 98.8 0 60.3-.2 98.7-.4 100.8-2.7 23.7-41.9 26.6-49.7 3.6l-.9-2.6-.2-120.9-.2-120.9-1-1c-.7-.6-5-2.5-12.6-5.3C59.9 8.6 61.7 9.2 60.6 10.9m.9 356.3c-2.6.5-3 1.8-3 7.7-.1 12.3-5.7 18.7-24.6 28.2-11.4 5.6-16.6 10.9-19.3 19.3a86 86 0 0 0-.9 19.5l-.2 17.3 1 1 1 1h368.1l1-1c.7-.6 1-1.6 1.2-3.2.4-3.3 0-28.3-.6-31.4-1.9-10.7-8-17.3-22-23.4-17.3-7.6-21.8-13.2-22.6-28.5-.3-4.5-.4-5-1.3-5.8l-1-.9H200.7c-75.7 0-138.4 0-139.2.2"},null,-1)),Qse=[Use];function Tse(e,t){return i.openBlock(),i.createElementBlock("svg",Ise,Qse)}const m1=M(xse,[["render",Tse],["__scopeId","data-v-f1928c9e"]]);const Dse={},Lse=e=>(i.pushScopeId("data-v-b1448e85"),e=e(),i.popScopeId(),e),Ose={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 400 459.4"},Mse=Lse(()=>i.createElementVNode("path",{d:"M175.3 29.5c-1.7.3-.9 1.5 6.1 8.9A57.6 57.6 0 0 1 200 82.6a63.5 63.5 0 0 1-5 25.1 63.5 63.5 0 0 1-23 27.5c-4.6 2.7-6.3 2-14.8-6.2-7.9-7.7-8-7.8-11.1-6.2-2.6 1.3-14.6 12-20.5 18.2l-9.6 10a349.5 349.5 0 0 0-35.5 43.8c-3.1 4.6-6 9.1-9.3 15.2a753 753 0 0 1-5.2 9.2c-.9 1.4-2 3.7-2.4 5-.4 1.2-1.3 3.2-2 4.4l-2.2 4.8a52 52 0 0 1-1.8 4.2c-.4.8-1.3 3.2-2 5.4l-2.2 6c-.5 1-1.3 3.8-1.8 6l-2 7.7a62 62 0 0 0-1.8 8c-3.2 23.5-3 26.6 1.7 31A154.6 154.6 0 0 0 73 318a254 254 0 0 0 33.9 16.2c2.4 1.3 12.6 4.6 19 6.3 3.6 1 7.4 2 8.4 2.4l7.4 1.6c3 .5 7.5 1.4 9.8 2 2.7.6 7.5 1.3 13.2 1.8 5 .4 11.5 1 14.6 1.4 3.8.4 9.7.6 18.6.6 18.5 0 19.9 1.2 13.7 11.9a86.4 86.4 0 0 1-50.1 39.8c-1.4.6-4.1 1.4-6 2-1.9.4-5.2 1.3-7.4 2-2.2.6-6.3 1.4-9.2 1.7-6 .7-10 1.5-10.7 2.2-1.3 1.2 2.5 4 7 5.1l8.3 2.3c2.8.8 6.8 1.7 9 2l15.8 2.6c6.9 1.3 29.5 2 39.8 1.2 6.5-.4 8-.6 18.2-2.4l8.3-1.4c2-.3 5.7-1.2 8-2 2.4-.7 5.4-1.6 6.7-1.8 1.3-.3 3.8-1 5.6-1.8l6-2.2c1.5-.5 3.7-1.3 4.7-1.9l4.2-1.8a228 228 0 0 0 22-11.7c20.9-13.4 40-38.5 44.7-58.8l1.8-6c1.7-4.9 1.9-5.8 2.6-13.2a116.3 116.3 0 0 0-10.4-71l-1.4-2.7c-.4-1-2.5-4.5-6-9.7-4.3-6.6-7.5-7.3-10-2.3-3.1 6.1-15.8 20.3-23.2 25.8a81.5 81.5 0 0 1-71.1 13.4l-6.3-2.3a93 93 0 0 1-38.7-30.1c-4-5.7-4-7.3-.4-12.8a82.1 82.1 0 0 1 38.7-30.2c17-7.5 42.3-7.4 57.2.3 8.8 4.5 10.9 2.5 9.2-9.2-.3-2.2-.6-6.5-.6-9.6a129 129 0 0 0-4.6-34.6 75.6 75.6 0 0 0-3.6-13.8c-4.5-17-18-42.2-32-59.6a193.3 193.3 0 0 0-27.5-25.9 82.1 82.1 0 0 0-18-10.3c-3-1.8-14.6-4.6-17-4.1"},null,-1)),Nse=[Mse];function Pse(e,t){return i.openBlock(),i.createElementBlock("svg",Ose,Nse)}const v1=M(Dse,[["render",Pse],["__scopeId","data-v-b1448e85"]]);const Hse={},Rse=e=>(i.pushScopeId("data-v-e5501fa0"),e=e(),i.popScopeId(),e),Vse={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Kse=Rse(()=>i.createElementVNode("path",{d:"M9.51 16.698 2.244 9.18 1 11.478l6.226 6.264 2.283-1.044ZM6.189 6.676 4.943 5.423 7.02 3.335l1.245 1.253L6.19 6.676ZM9.302 14.61 4.113 9.39l.83-1.044H6.19l3.736-3.55V3.545L10.962 2.5l4.981.626.415 4.803-.83.835-1.453.209-.83 1.043 1.453 1.253.83-.835 1.453.626-4.15 4.176L12 13.775l.83-.835-1.453-1.462-1.037 1.253v1.252l-1.038.627ZM20.924 21.5l-6.018-6.473 1.66-1.67L23 19.412 20.924 21.5Z"},null,-1)),$se=[Kse];function Wse(e,t){return i.openBlock(),i.createElementBlock("svg",Vse,$se)}const B1=M(Hse,[["render",Wse],["__scopeId","data-v-e5501fa0"]]),y1={items:{type:Array,required:!0,default:[]},fetchSeachResult:{type:Function,required:!0,default:()=>[]}},Gse={...y1,expanded:{type:Boolean,required:!1,default:!1},links:{type:Object,required:!0,default:{gift:{path:"/404"},settings:{path:"/404"},profile:{path:"/404"}}}},zse={class:"content logo no-scrollbar"},jse={class:"nav-item"},Yse={class:"nav-icon-wrapper"},qse={class:"nav-text"},Xse={class:"nav-icon-wrapper"},Jse={class:"nav-text"},Zse={class:"profile content"},eie={class:"nav-icon-wrapper"},tie={class:"nav-text"},nie={class:"nav-icon-wrapper"},rie={class:"nav-text settings"},aie={class:"nav-icon-wrapper"},Aie={class:"nav-text"},sie={class:"nav-icon-wrapper"},iie={class:"nav-text name"},oie={class:"nav-icon-wrapper"},lie={class:"nav-text settings"},cie={class:"nav-icon-wrapper"},uie={class:"nav-text sign-in-container"},die={class:"fancy-button"},fie=i.defineComponent({__name:"NavigationSide",props:Gse,emits:["click:sync","click:sign-in","click:language"],setup(e,{emit:t}){const n=e,{t:r}=se(),a=i.ref(),A=i.ref();let s;i.onMounted(()=>{var l;s=new ResizeObserver(o),a.value&&s.observe(a.value),(l=A.value)==null||l.addEventListener("scroll",o),o()}),i.onUnmounted(()=>{var l;s.disconnect(),(l=A.value)==null||l.removeEventListener("scroll",o)});function o(){var u,d;let l=!1,c=!1;A.value&&(A.value.clientHeight<A.value.scrollHeight&&(l=A.value.scrollTop>0,c=A.value.scrollTop<A.value.scrollHeight-A.value.clientHeight),(u=A.value)==null||u.classList.toggle("scrollable-up",l),(d=A.value)==null||d.classList.toggle("scrollable-down",c))}return(l,c)=>(i.openBlock(),i.createElementBlock("div",{ref_key:"navigationSide",ref:a,class:i.normalizeClass(["navigation-side",n.expanded?"expanded":""])},[i.createElementVNode("div",zse,[i.createElementVNode("div",jse,[i.createElementVNode("div",Yse,[i.createVNode(Ys,{"logo-type":"logo-only"})]),i.createElementVNode("div",qse,[i.createVNode(Ys,{"logo-type":"text-only"})])])]),i.createElementVNode("div",{ref_key:"navigationPages",ref:A,class:"pages content no-scrollbar"},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.items,u=>(i.openBlock(),i.createBlock(i.unref(us.RouterLink),{key:u.text,to:u.routerLocation,class:i.normalizeClass(["nav-item",u.highlighted?"highlight":""])},{default:i.withCtx(()=>[i.createElementVNode("div",Xse,[i.createVNode(i.unref(Ue),{class:"nav-icon",icon:u.faIcon},null,8,["icon"])]),i.createElementVNode("div",Jse,i.toDisplayString(u.text),1)]),_:2},1032,["to","class"]))),128))],512),i.createElementVNode("div",Zse,[i.unref(wa)().user?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createVNode(i.unref(us.RouterLink),{to:n.links.gift,class:"nav-item"},{default:i.withCtx(()=>[i.createElementVNode("div",eie,[i.createVNode(i.unref(Ue),{class:"nav-icon",icon:"gift"})]),i.createElementVNode("div",tie,i.toDisplayString(i.unref(r)("general.openCards")),1)]),_:1},8,["to"]),i.createVNode(i.unref(us.RouterLink),{to:n.links.settings,class:"nav-item"},{default:i.withCtx(()=>[i.createElementVNode("div",nie,[i.createVNode(i.unref(Ue),{class:"nav-icon",icon:"cog"})]),i.createElementVNode("div",rie,[i.createElementVNode("div",null,i.toDisplayString(i.unref(r)("general.settings")),1),i.createElementVNode("div",{class:"icon",onClick:c[0]||(c[0]=i.withModifiers(u=>t("click:language"),["stop","prevent"]))},[i.createVNode(i.unref(Ue),{icon:"language"})])])]),_:1},8,["to"]),i.createElementVNode("div",{class:"nav-item",onClick:c[1]||(c[1]=u=>t("click:sync"))},[i.createElementVNode("div",aie,[i.createVNode(i.unref(Ue),{class:"nav-icon",icon:"rotate-right"})]),i.createElementVNode("div",Aie,i.toDisplayString(i.unref(r)("general.syncUserData")),1)]),i.createVNode(i.unref(us.RouterLink),{to:n.links.profile,class:"nav-item"},{default:i.withCtx(()=>{var u,d,f;return[i.createElementVNode("div",sie,[i.createVNode(nA,{"card-code-prop":((u=i.unref(wa)().user)==null?void 0:u.selectedIconCard)??"05BC160","ignore-card-item":!0,"color-override":(d=i.unref(wa)().user)==null?void 0:d.selectedBannerColor,"router-link":n.links.profile},null,8,["card-code-prop","color-override","router-link"])]),i.createElementVNode("div",iie,i.toDisplayString((f=i.unref(wa)().user)==null?void 0:f.name),1)]}),_:1},8,["to"])],64)):(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createVNode(i.unref(us.RouterLink),{to:n.links.settings,class:"nav-item"},{default:i.withCtx(()=>[i.createElementVNode("div",oie,[i.createVNode(i.unref(Ue),{class:"nav-icon",icon:"cog"})]),i.createElementVNode("div",lie,[i.createElementVNode("div",null,i.toDisplayString(i.unref(r)("general.settings")),1),i.createVNode(i.unref(Ue),{onClick:c[2]||(c[2]=i.withModifiers(u=>t("click:language"),["stop","prevent"])),class:"icon",icon:"language"})])]),_:1},8,["to"]),i.createElementVNode("div",{class:"nav-item",onClick:c[3]||(c[3]=u=>t("click:sign-in"))},[i.createElementVNode("div",cie,[i.createVNode(i.unref(Ue),{class:"nav-icon",icon:"arrow-right-to-bracket"})]),i.createElementVNode("div",uie,[i.createElementVNode("div",die,i.toDisplayString(i.unref(r)("general.signIn")),1)])])],64))])],2))}});const w1=M(fie,[["__scopeId","data-v-1728bf4e"]]),hie=i.defineComponent({__name:"NavigationTopMobile",props:y1,setup(e){const t=e,n=i.ref(!1),r=i.ref(!1),a=i.ref(),A=i.ref();window.addEventListener("click",s);function s(c){var u;n.value&&(n.value=!!((u=A.value)!=null&&u.contains(c.target)))}function o(){i.nextTick(()=>{n.value=!0,i.nextTick(()=>{var c,u;(u=(c=a.value)==null?void 0:c.$el.querySelector("input"))==null||u.focus()})})}function l(){r.value=!0}return i.onUnmounted(()=>{window.removeEventListener("click",s)}),(c,u)=>(i.openBlock(),i.createElementBlock("div",{ref_key:"navigationTopMobile",ref:A,class:"navigation-top-mobile"},[n.value?(i.openBlock(),i.createBlock(Yu,{key:1,"fetch-seach-result":t.fetchSeachResult,ref_key:"searchBar",ref:a,class:"search-bar"},null,8,["fetch-seach-result"])):(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createVNode(i.unref(Ue),{class:"icon",icon:"bars",onClick:l}),i.createVNode(Ys,{class:"logo-icon","logo-type":"text-only"}),i.createVNode(i.unref(Ue),{class:"icon",icon:"search",onClick:i.withModifiers(o,["stop","prevent"])},null,8,["onClick"])],64)),i.createVNode(VA,{"show-modal":r.value,"onUpdate:showModal":u[0]||(u[0]=d=>r.value=d)},{default:i.withCtx(()=>[i.createVNode(w1,i.mergeProps({class:"navigation-side"},t,{expanded:!0}),null,16)]),_:1},8,["show-modal"])],512))}});const b1=M(hie,[["__scopeId","data-v-4f19578e"]]),pie={class:"navigation-top"},gie=i.defineComponent({__name:"NavigationTop",props:y1,setup(e){const t=e;return(n,r)=>(i.openBlock(),i.createElementBlock("div",pie,[i.createVNode(t1,i.mergeProps({class:"navigation-top-desktop"},t),{default:i.withCtx(()=>[i.renderSlot(n.$slots,"default",{},void 0,!0)]),_:3},16),i.createVNode(b1,i.mergeProps({class:"navigation-top-mobile"},t),null,16)]))}});const H3=M(gie,[["__scopeId","data-v-a1aae1e1"]]),mie={modelValue:{type:String,required:!0,default:!1}},vie=["value"],Bie=i.defineComponent({__name:"ColorPicker",props:mie,emits:["update:modelValue"],setup(e,{emit:t}){const n=e;function r(a){t("update:modelValue",a.target.value)}return(a,A)=>(i.openBlock(),i.createElementBlock("input",{type:"color",value:n.modelValue,onInput:r},null,40,vie))}});const R3=M(Bie,[["__scopeId","data-v-5ebbd7eb"]]),yie={rows:{type:Array,required:!0,default:[]},selectedRegion:{type:String,required:!0,default:"americas"}},wie={class:"multiselect-wrapper"},bie=i.defineComponent({__name:"DashboardLeaderboardTable",props:yie,emits:["update:selectedRegion"],setup(e,{emit:t}){const n=e,{t:r}=se(),a=i.ref(n.selectedRegion),A=[{title:r("general.leaderboard"),id:"leaderboard"}];return i.watch(a,s=>{t("update:selectedRegion",s)}),(s,o)=>(i.openBlock(),i.createBlock(XA,{class:"small-table","heading-items":A},{heading:i.withCtx(()=>[i.createElementVNode("div",wie,[i.createVNode(i.unref(Vt),{modelValue:a.value,"onUpdate:modelValue":o[0]||(o[0]=l=>a.value=l),class:"multiselect",placeholder:i.unref(r)("general.server"),options:i.unref(we)().dataJson.servers,"can-clear":!1,label:"name","value-prop":"nameRef"},null,8,["modelValue","placeholder","options"])])]),default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.rows,(l,c)=>(i.openBlock(),i.createBlock(f1,{id:l.id,key:l.id,change:l.change,lp:l.lp,name:l.name,rank:l.rank,"selected-banner-card":l.selectedBannerCard,matches:l.matches,index:c+2},null,8,["id","change","lp","name","rank","selected-banner-card","matches","index"]))),128))]),_:1}))}});const V3=M(bie,[["__scopeId","data-v-fe0f916c"]]),_ie={routerLink:{type:Object,required:!0,default:{path:"/404"}},deckBuilderRouterLink:{type:Object,required:!0,default:{path:"/404"}},archetypeId:{type:Number,required:!0,default:1},deckCode:{type:String,required:!0,default:""},index:{type:Number,required:!0,default:1},matches:{type:Number,required:!0,default:1},wins:{type:Number,required:!0,default:1},playrate:{type:Number,required:!0,default:1},regions:{type:Array,required:!0,default:[]},cards:{type:Array,required:!0,default:[]}},Cie=e=>(i.pushScopeId("data-v-3fd14fcc"),e=e(),i.popScopeId(),e),Eie={class:"table-card-row-background-wrapper"},kie={class:"table-card-row-background"},Sie=Cie(()=>i.createElementVNode("div",{class:"background-card"},null,-1)),xie=[Sie],Fie={class:"archetypes-row wrapper"},Iie={class:"column-content"},Uie={class:"column-content"},Qie=i.defineComponent({__name:"ArchetypesRow",props:_ie,setup(e){const t=e,n=i.computed(()=>St(t.deckCode)),r=i.computed(()=>rn(n.value)),a=i.computed(()=>t.cards.map(s=>`https://lor.gg/storage/cards/banner/${s}.png`)),A=i.computed(()=>({showButtons:{deleteDeck:!1,updateDeckPrivacy:!1,editDeckName:!1,gemsCost:!1,openArchetypePage:!0,simulateMulligan:!0,openInDeckBuilder:!0,copyDeckCode:!0,uploadDeckToLor:!0,shareDeck:!1},deckCode:t.deckCode,deckBuilderRouterLink:t.deckBuilderRouterLink,archetypeRouterLink:t.routerLink,deckId:void 0,deckName:void 0,isPrivate:void 0}));return(s,o)=>{const l=i.resolveComponent("RouterLink");return i.openBlock(),i.createBlock(l,{to:t.routerLink,class:"wrapper"},{default:i.withCtx(()=>[i.createElementVNode("div",{class:"archetypes-row-wrapper wrapper",style:i.normalizeStyle({"--index":t.index})},[i.createElementVNode("div",Eie,[i.createElementVNode("div",kie,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.value,c=>(i.openBlock(),i.createElementBlock("div",{key:c,class:"background-card-wrapper",style:i.normalizeStyle({"--background-image":`url(${c})`})},xie,4))),128))])]),i.createElementVNode("div",Fie,[i.createElementVNode("div",{class:"column-content deck-highlight-wrapper",onClick:o[0]||(o[0]=i.withModifiers(()=>{},["stop","prevent"]))},[i.createVNode(Ja,{"deck-code":t.deckCode,deck:n.value,cards:r.value,"deck-buttons-props":A.value},null,8,["deck-code","deck","cards","deck-buttons-props"])]),i.createElementVNode("div",Iie,i.toDisplayString(i.unref(Te)(t.matches)),1),i.createElementVNode("div",{class:"column-content",style:i.normalizeStyle({color:`var(${i.unref(Zn)(t.wins/t.matches)})`})},i.toDisplayString(i.unref(Te)(t.wins/t.matches*100,2,3)+"%"),5),i.createElementVNode("div",Uie,i.toDisplayString(i.unref(Te)(t.playrate,2,3)+"%"),1)])],4)]),_:1},8,["to"])}}});const _1=M(Qie,[["__scopeId","data-v-3fd14fcc"]]),Tie={archetypeRows:{type:Array,required:!0,default:[]},loading:{type:Boolean,required:!1,default:!1}},Die=i.defineComponent({__name:"ArchetypesTable",props:Tie,emits:["sort-updated"],setup(e,{emit:t}){const n=e,{t:r}=se(),a=i.ref([{id:"deck",isShown:!0,sortDirection:be.NOT_SORTABLE,title:r("general.deck")},{id:"matches",isShown:!0,sortDirection:be.DOWN,title:r("general.matches")},{id:"winrate",isShown:!0,sortDirection:be.NEITHER,title:r("general.winrate")},{id:"playrate",isShown:!0,sortDirection:be.NEITHER,title:r("general.playrate")}]);function A(s){const o=ei(s,a);o&&t("sort-updated",o)}return(s,o)=>(i.openBlock(),i.createBlock(tA,{class:"large-table","heading-items":a.value,onToggleSort:A},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.archetypeRows,(l,c)=>(i.openBlock(),i.createBlock(_1,i.mergeProps({key:l.deckCode},l,{index:c+2}),null,16,["index"]))),128))]),_:1},8,["heading-items"]))}});const K3=M(Die,[["__scopeId","data-v-cbe0e959"]]),Lie={typeSummary:{type:Object,required:!0,default:{quantity:0,isError:!1,typeRef:"Champion"}}},Oie={class:"number-container"},Mie={key:0,class:"type-icon"},Nie=i.defineComponent({__name:"DeckBuilderSummaryType",props:Lie,setup(e){const t=e;return(n,r)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["deck-builder-summary-type",[t.typeSummary.isError?"error":"",t.typeSummary.typeRef==="Deck"?"deck":""]])},[i.createElementVNode("div",Oie,i.toDisplayString(t.typeSummary.quantity),1),t.typeSummary.typeRef!=="Deck"?(i.openBlock(),i.createElementBlock("div",Mie,[t.typeSummary.typeRef==="Champion"?(i.openBlock(),i.createBlock(g1,{key:0})):t.typeSummary.typeRef==="Follower"?(i.openBlock(),i.createBlock(p1,{key:1})):t.typeSummary.typeRef==="Spell"?(i.openBlock(),i.createBlock(v1,{key:2})):t.typeSummary.typeRef==="Landmark"?(i.openBlock(),i.createBlock(m1,{key:3})):t.typeSummary.typeRef==="Equipment"?(i.openBlock(),i.createBlock(B1,{key:4})):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0)],2))}});const ya=M(Nie,[["__scopeId","data-v-2e6bb287"]]),Pie={cards:{type:Array,required:!0,default:[]},deck:{type:Object,required:!0,default:{}}},Hie={class:"deck-builder-summary"},Rie=i.defineComponent({__name:"DeckBuilderSummary",props:Pie,setup(e){const t=e;function n(c,u,d){const f=t.cards.filter(c).map(h=>t.deck[h.cardCode]).reduce((h,p)=>h+p,0);return{typeRef:d,quantity:f,isError:u(f)}}const r=i.computed(()=>n(c=>c.typeRef==="Unit"&&c.supertype==="Champion",c=>c>6,"Champion")),a=i.computed(()=>n(c=>c.typeRef==="Unit"&&c.supertype==="",()=>!1,"Follower")),A=i.computed(()=>n(c=>c.typeRef==="Spell",()=>!1,"Spell")),s=i.computed(()=>n(c=>c.typeRef==="Landmark",()=>!1,"Landmark")),o=i.computed(()=>n(c=>c.typeRef==="Equipment",()=>!1,"Equipment")),l=i.computed(()=>n(()=>!0,c=>c!==40,"Deck"));return(c,u)=>(i.openBlock(),i.createElementBlock("div",Hie,[i.createVNode(ya,{"type-summary":r.value},null,8,["type-summary"]),i.createVNode(ya,{"type-summary":a.value},null,8,["type-summary"]),i.createVNode(ya,{"type-summary":A.value},null,8,["type-summary"]),i.createVNode(ya,{"type-summary":s.value},null,8,["type-summary"]),i.createVNode(ya,{"type-summary":o.value},null,8,["type-summary"]),i.createVNode(ya,{"type-summary":l.value},null,8,["type-summary"])]))}});const C1=M(Rie,[["__scopeId","data-v-ec8f0fa9"]]),Vie={rows:{type:Array,required:!0,default:[]}},Kie=i.defineComponent({__name:"DashboardCardTable",props:Vie,setup(e){const t=e,{t:n}=se(),r=[{title:n("general.cards"),id:"cards"},{title:n("general.matches"),id:"matches"},{title:n("general.winrate"),id:"winrate"}];return(a,A)=>(i.openBlock(),i.createBlock(XA,{class:"small-table","heading-items":r},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(t.rows,s=>(i.openBlock(),i.createBlock(d1,{key:s.cardCode,"card-code":s.cardCode,matches:s.matches,wins:s.wins,index:s.index+2},null,8,["card-code","matches","wins","index"]))),128))]),_:1}))}});const $3=M(Kie,[["__scopeId","data-v-e5817be3"]]),$ie={modelValue:{type:Number,required:!0,default:5}},Wie=["value"],Gie=i.defineComponent({__name:"ZoomSlider",props:$ie,emits:["update:modelValue"],setup(e,{emit:t}){const n=e,r=i.ref(),a=i.ref();function A(s){t("update:modelValue",Number.parseInt(s.target.value))}return i.onMounted(()=>{At(r.value,{content:a.value,arrow:!0,interactive:!0,trigger:"mouseenter click",interactiveBorder:10})}),(s,o)=>{const l=i.resolveComponent("FontAwesomeIcon");return i.openBlock(),i.createElementBlock("div",null,[i.createElementVNode("div",{ref_key:"button",ref:r,class:"circle-button"},[i.createVNode(l,{icon:"search-plus",class:"zoom-button"})],512),i.createElementVNode("div",{ref_key:"slider",ref:a,class:"slider-wrapper"},[i.createElementVNode("input",{type:"range",min:"1",max:"10",class:"slider",value:n.modelValue,onInput:A},null,40,Wie)],512)])}}});const W3=M(Gie,[["__scopeId","data-v-bac83f78"]]),zie={cardProp:{type:Object,required:!1,default:void 0},cardCodeProp:{type:String,required:!1,default:void 0}},Kd=e=>(i.pushScopeId("data-v-fe063557"),e=e(),i.popScopeId(),e),jie={class:"card-overview"},Yie={class:"overview-top"},qie={class:"card-name"},Xie={class:"card-tags"},Jie={class:"card-tag"},Zie={class:"card-tag-text"},eoe={class:"card-tag"},toe={class:"card-tag-text"},noe={class:"card-tag"},roe={class:"card-tag-text"},aoe={class:"card-tag"},Aoe={class:"card-tag-text"},soe=Kd(()=>i.createElementVNode("hr",{class:"divider"},null,-1)),ioe={class:"card-text"},ooe=Kd(()=>i.createElementVNode("hr",{class:"divider"},null,-1)),loe={class:"keyword-description"},coe={class:"keyword-name"},uoe=Kd(()=>i.createElementVNode("hr",{class:"divider"},null,-1)),doe={class:"flavor-text"},foe=Kd(()=>i.createElementVNode("div",{class:"card-art-section"},[i.createElementVNode("div",{class:"card-art-button primary-button"},"Card Art")],-1)),hoe=i.defineComponent({__name:"CardOverview",props:zie,setup(e){const t=e,n=Ro(t.cardProp,t.cardCodeProp,!0),r=i.computed(()=>{if(n.value===void 0)return[];const l=[];for(const c of n.value.keywordRefs){const u=we().dataJson.keywords.find(d=>d.nameRef===c);u&&l.push(u)}return l}),a=i.computed(()=>{if(n.value===void 0)return null;const l=we().dataJson;return uo(n.value.regionRefs[0])?l.runeterraChampions.find(c=>c.nameRef===n.value.regionRefs[0])??l.regions[0]:l.regions.find(c=>c.nameRef===n.value.regionRefs[0])??l.regions[0]}),A=i.computed(()=>n.value===void 0?null:we().dataJson.rarities.find(l=>l.nameRef===n.value.rarityRef)??we().dataJson.rarities[0]),s=i.computed(()=>n.value===void 0?null:we().dataJson.types.find(l=>l.nameRef===n.value.typeRef)??we().dataJson.types[0]),o=i.computed(()=>n.value===void 0?null:we().dataJson.sets.find(l=>l.nameRef===n.value.set)??we().dataJson.sets[0]);return(l,c)=>{var u,d,f,h,p,m,y,g;return i.openBlock(),i.createElementBlock("div",jie,[i.unref(n)?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createElementVNode("div",Yie,[i.createElementVNode("div",qie,i.toDisplayString(i.unref(n).name),1),i.createVNode(i.unref(Ue),{icon:"times",class:"close-icon"})]),i.createElementVNode("div",Xie,[i.createElementVNode("div",Jie,[i.createElementVNode("div",{class:"icon",style:i.normalizeStyle({content:`url(${((u=a.value)==null?void 0:u.icon)??""})`})},null,4),i.createElementVNode("div",Zie,i.toDisplayString((d=a.value)==null?void 0:d.name),1)]),i.createElementVNode("div",eoe,[i.createElementVNode("div",{class:"icon",style:i.normalizeStyle({content:`url(${((f=A.value)==null?void 0:f.icon)??""})`})},null,4),i.createElementVNode("div",toe,i.toDisplayString((h=A.value)==null?void 0:h.name),1)]),i.createElementVNode("div",noe,[i.createElementVNode("div",{class:"icon",style:i.normalizeStyle({content:`url(${((p=s.value)==null?void 0:p.icon)??""})`})},null,4),i.createElementVNode("div",roe,i.toDisplayString((m=s.value)==null?void 0:m.name),1)]),i.createElementVNode("div",aoe,[i.createElementVNode("div",{class:"icon",style:i.normalizeStyle({content:`url(${((y=o.value)==null?void 0:y.icon)??""})`})},null,4),i.createElementVNode("div",Aoe,i.toDisplayString((g=o.value)==null?void 0:g.name),1)])]),soe,i.createElementVNode("div",ioe,i.toDisplayString(i.unref(n).descriptionRaw),1),ooe,(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.value,v=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:v.nameRef},[i.createElementVNode("div",loe,[i.createElementVNode("b",coe,i.toDisplayString(v.name+" - "),1),i.createElementVNode("span",null,i.toDisplayString(v.description),1)]),uoe],64))),128)),i.createElementVNode("div",doe,i.toDisplayString(i.unref(n).flavorText),1),foe],64)):i.createCommentVNode("",!0)])}}});const G3=M(hoe,[["__scopeId","data-v-fe063557"]]),poe={gameType:{type:String,required:!0,default:""},matches:{type:Number,required:!0,default:1},wins:{type:Number,required:!0,default:1}},goe={class:"profile-game-type-winrate"},moe={class:"game-type"},voe=i.defineComponent({__name:"ProfileGameTypeWinrate",props:poe,setup(e){const t=e;return(n,r)=>(i.openBlock(),i.createElementBlock("div",goe,[i.createElementVNode("div",moe,i.toDisplayString(t.gameType),1),i.createVNode(u1,{matches:t.matches,wins:t.wins},null,8,["matches","wins"])]))}});const z3=M(voe,[["__scopeId","data-v-1bb3c9de"]]),Boe={deckRows:{type:Array,required:!0,default:[]},loading:{type:Boolean,required:!1,default:!1}},yoe=i.defineComponent({__name:"DecksTable",props:Boe,emits:["sort-updated"],setup(e,{emit:t}){const n=e,{t:r}=se(),a=i.ref([{id:"deck",isShown:!0,sortDirection:be.NOT_SORTABLE,title:r("general.deck")},{id:"matches",isShown:!0,sortDirection:be.DOWN,title:r("general.matches")},{id:"winrate",isShown:!0,sortDirection:be.NEITHER,title:r("general.winrate")},{id:"manaCurve",isShown:!0,sortDirection:be.NOT_SORTABLE,title:r("general.manaCurve")},{id:"cost",isShown:!0,sortDirection:be.NOT_SORTABLE,title:r("general.cost")}]);function A(s){const o=ei(s,a);o&&t("sort-updated",o)}return(s,o)=>(i.openBlock(),i.createBlock(tA,{class:"large-table","heading-items":a.value,onToggleSort:A},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.deckRows,(l,c)=>(i.openBlock(),i.createBlock(Bl,i.mergeProps({key:l.deckCode},l,{index:c+2}),null,16,["index"]))),128))]),_:1},8,["heading-items"]))}});const j3=M(yoe,[["__scopeId","data-v-e2919c63"]]),woe={deckCode:{type:String,required:!1,default:""}},boe={deck:{type:Object,required:!0,default:{}},deckButtonsProps:{type:Object,required:!0,default:{deckCode:"",deckId:void 0,showButtons:void 0,archetypeRouterLink:void 0,deckBuilderRouterLink:"404",deckName:void 0,showUploaded:void 0,isPrivate:void 0}}},_oe={class:"deck-preview-wrapper"},Coe=i.defineComponent({__name:"ShowDeckPreviewButton",props:boe,setup(e){const t=e,{t:n}=se(),r=i.ref(null),a=i.ref(!1);return i.onMounted(()=>{At(r.value,{content:n("deck.showPreview"),arrow:!0})}),(A,s)=>(i.openBlock(),i.createElementBlock("div",null,[i.createElementVNode("button",{ref_key:"button",ref:r,class:"circle-button",onClick:s[0]||(s[0]=o=>a.value=!0)},[i.createVNode(i.unref(Ue),{icon:"camera"})],512),i.createVNode(VA,{"show-modal":a.value,"onUpdate:showModal":s[1]||(s[1]=o=>a.value=o)},{default:i.withCtx(()=>[i.createElementVNode("div",_oe,[i.createVNode(i.unref(Rd),{deck:t.deck,"deck-buttons-props":t.deckButtonsProps},null,8,["deck","deck-buttons-props"])])]),_:1},8,["show-modal"])]))}});const Eoe=M(Coe,[["__scopeId","data-v-90be9f81"]]),koe={class:"cards-container no-scrollbar"},Soe={class:"bottom"},xoe={class:"bottom-buttons"},Foe={class:"fancy-button"},Y3=i.defineComponent({__name:"DeckBuilderSidePanel",props:woe,emits:["update:card-quantity"],setup(e,{emit:t}){const n=e,{t:r}=se(),a=i.computed(()=>{if(n.deckCode)return St(n.deckCode);throw new Error("Deck or DeckCode must be defined")}),A=i.computed(()=>rn(a.value)),s=i.computed(()=>({showButtons:{deleteDeck:!1,updateDeckPrivacy:!1,editDeckName:!1,gemsCost:!0,openArchetypePage:!1,simulateMulligan:!0,openInDeckBuilder:!1,copyDeckCode:!0,uploadDeckToLor:!0,shareDeck:!0},deckCode:n.deckCode,deckBuilderRouterLink:"404"}));return(o,l)=>(i.openBlock(),i.createBlock(Zs,{"show-clear-all":!1},{default:i.withCtx(()=>[i.createVNode(i.unref(C1),{cards:A.value,deck:a.value},null,8,["cards","deck"]),(i.openBlock(),i.createBlock(i.unref(hl),{class:"mana-curve-chart",key:n.deckCode,"padding-top":0,"show-data-labels":!1,"data-labels-offset":0,"tooltips-enabled":!1,"display-x-scale":!0,deck:a.value},null,8,["deck"])),i.createElementVNode("div",koe,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(A.value,c=>(i.openBlock(),i.createBlock(i.unref(fn),{"onUpdate:cardQuantity":l[0]||(l[0]=u=>t("update:card-quantity",u)),key:c.cardCode,"card-prop":c,"maintain-aspect-ratio":!0,"quantity-number":a.value[c.cardCode],"show-plus-minus":!0,"router-link":i.unref(nn)().callbacks.cardCodeRouterLinkCallback(c.cardCode),class:"card-slice-item"},null,8,["card-prop","quantity-number","router-link"]))),128))]),i.createElementVNode("div",Soe,[i.createElementVNode("div",xoe,[i.createVNode(i.unref(Fd),{deck:a.value},null,8,["deck"]),i.createVNode(i.unref(xd),{"deck-code":n.deckCode},null,8,["deck-code"]),i.createVNode(Eoe,{deck:a.value,"deck-buttons-props":s.value},null,8,["deck","deck-buttons-props"]),i.createVNode(i.unref(Id))]),i.createElementVNode("div",Foe,i.toDisplayString(i.unref(r)("general.save")),1)])]),_:1}))}});const Ioe={data:{type:Array,required:!0,default:[]},backgroundColor:{type:String,required:!1,default:"#000000"}},q3=i.defineComponent({__name:"RegionDistributionChart",props:Ioe,setup(e){const t=e,n=i.ref(null);Le.register(...Cr);const r=i.computed(()=>({labels:t.data.map(A=>A.region),datasets:[{data:t.data.map(A=>A.matches),backgroundColor:t.data.map(A=>I2(A.region))}]})),a={cutout:"80%",elements:{arc:{borderWidth:3,borderColor:t.backgroundColor}},plugins:{legend:{display:!0,position:"right",labels:{usePointStyle:!0,generateLabels(A){const s=[],o=A.data.labels;for(let l=0;l<A.data.labels.length;l++)s.push({text:`${Np(o[l])} (${A.data.datasets[0].data[l]})`,borderRadius:999,datasetIndex:0,index:l,fontColor:Ha("--color-0"),fillStyle:A.data.datasets[0].backgroundColor[l]});return s}}},datalabels:{display:!1}}};return(A,s)=>(i.openBlock(),i.createBlock(i.unref(ld),{ref_key:"chart",ref:n,"chart-data":r.value,options:a},null,8,["chart-data"]))}}),Uoe={value:{type:Number,required:!0,default:1},max:{type:Number,required:!0,default:2}},X3=i.defineComponent({__name:"SimpleDoughnutChart",props:Uoe,setup(e){const t=e,n=i.ref(null);Le.register(...Cr);const r=i.computed(()=>({labels:["Value","Max"],datasets:[{data:[t.value,t.max-t.value],backgroundColor:[Ha("--color-good"),"transparent"]}]})),a={cutout:"80%",elements:{arc:{borderWidth:0}},plugins:{legend:{display:!1}}},A=[{id:"text",beforeDraw:function(s){const o=s.chartArea.width,l=s.chartArea.height,c=s.ctx;c.restore();const u=(l/100).toFixed(2);c.font=`bold ${u}em sans-serif`,c.textBaseline="middle";const f=s.data.datasets[0].data[0].toFixed(2),h=Math.round((o-c.measureText(f).width)/2),p=l/2;c.fillStyle=Ha("--color-good"),c.fillText(f,h,p),c.save()}}];return(s,o)=>(i.openBlock(),i.createBlock(i.unref(ld),{ref_key:"chart",ref:n,"chart-data":r.value,options:a,plugins:A},null,8,["chart-data"]))}}),Qoe={install:async e=>{e.component("RevealCarousel",gg),e.component("SearchBar",Yu),e.component("SocialLinks",vg),e.component("ModalItem",VA),e.component("FilterSampleSize",Xs),e.component("FilterRanks",mb),e.component("FilterManaCost",Bg),e.component("FilterRarities",yg),e.component("FilterSets",wg),e.component("FilterKeywords",bg),e.component("FilterServers",Js),e.component("FilterTime",KA),e.component("FilterCardCodes",Xu),e.component("FilterDecks",vb),e.component("FilterProfile",Bb),e.component("FilterText",su),e.component("FilterAdvanced",Sg),e.component("FilterRegions",Yo),e.component("FilterCards",yb),e.component("AdvancedFilterItem",kg),e.component("FilterTypes",xg),e.component("RegionsLine",Fg),e.component("CardsTable",wb),e.component("DeckHighlightRegions",Xo),e.component("GemsCost",Tg),e.component("CardSliceItem",fn),e.component("LanguageSelection",Dg),e.component("DeckSidePanel",o4),e.component("DeckHighlight",Ja),e.component("ArchetypeSidePanel",d3),e.component("OpenInDeckBuilderButton",Nm),e.component("CopyDeckButton",xd),e.component("UpdateDeckPrivacyButton",Hm),e.component("EditDeckNameButton",Om),e.component("UploadDeckToLorButton",Id),e.component("DeleteDeckButton",Lm),e.component("OpenArchetypePageButton",Mm),e.component("SimulateMulliganButton",Fd),e.component("SocialMediaLinks",f3),e.component("DecksRow",Bl),e.component("CardItemLinkWrapper",Zm),e.component("DeckHighlightCards",Jo),e.component("CheckboxItem",tn),e.component("NavigationTopDesktop",t1),e.component("SidePanelSectionPane",mt),e.component("CardSimilarCards",h3),e.component("DashboardSignUp",g3),e.component("MatchItem",m3),e.component("ToggleSwitch",qu),e.component("LeaderboardTop10Region",n1),e.component("ShareButton",Vm),e.component("LeaderboardDetailRow",r1),e.component("DeckBlock",v3),e.component("SmallTable",XA),e.component("LeaderboardTop",B3),e.component("CardLottery",y3),e.component("DashboardProfile",w3),e.component("LeaderboardChart",b3),e.component("CardQuantityBarChart",_3),e.component("WinsLossesBarChart",C3),e.component("RoundCardInfoBarChart",E3),e.component("LineChart",k3),e.component("ManaCurveChart",hl),e.component("WinrateDoughnutChart",o1),e.component("InfoDoughnutChart",vu),e.component("BuiltDecksTable",S3),e.component("ProfileRegionTable",x3),e.component("ProfileArchetypeTable",F3),e.component("CardItem3d",i1),e.component("LeaderboardOptions",I3),e.component("SimilarDecksTable",U3),e.component("LargeTable",tA),e.component("StatisticsPaneContainer",Q3),e.component("ArchetypeSidePanelHighlight",Zu),e.component("CardCarousel",T3),e.component("DeckButtons",gl),e.component("WinsLossesLine",u1),e.component("DashboardCardRow",d1),e.component("CardTogglePage",D3),e.component("TestComponent",L3),e.component("DashboardLeaderboardRow",f1),e.component("DeckPreview",Rd),e.component("CheckboxItemManaCost",Au),e.component("RevealDayOptions",O3),e.component("DeckDifferenceItem",qm),e.component("DashboardNewCards",M3),e.component("CardsRow",Ig),e.component("LeaderboardDetailTable",N3),e.component("DeckIcon",P3),e.component("LogoIcon",Ys),e.component("FollowerIcon",p1),e.component("ChampionIcon",g1),e.component("EternalIcon",a1),e.component("InfoIcon",Jm),e.component("LandmarkIcon",m1),e.component("ManaHexagonIcon",jo),e.component("RuneterraIcon",Rm),e.component("ShardsIcon",Qg),e.component("StandardIcon",A1),e.component("SpellIcon",v1),e.component("GauntletIcon",s1),e.component("EquipmentIcon",B1),e.component("NavigationTop",H3),e.component("CardMultiselect",_g),e.component("ProfileDropdown",e1),e.component("ColorPicker",R3),e.component("DashboardLeaderboardTable",V3),e.component("NavigationSide",w1),e.component("ArchetypesTable",K3),e.component("DeckBuilderSummary",C1),e.component("DeckBuilderSummaryType",ya),e.component("DashboardCardTable",$3),e.component("ArchetypesRow",_1),e.component("RevealDayOption",h1),e.component("DeckHighlightEye",Vd),e.component("DeckDifferences",Xm),e.component("ZoomSlider",W3),e.component("CardOverview",G3),e.component("CircleCardItem",nA),e.component("ProfileGameTypeWinrate",z3),e.component("DecksTable",j3),e.component("RegionItem",qo),e.component("TippyText",Ju),e.component("ProfileRegionRow",l1),e.component("SimulateMulligan",Pm),e.component("DeckSummary",Sd),e.component("NavigationTopMobile",b1),e.component("CardItem",Wa),e.component("ProfileArchetypeRow",c1),e.component("DeckBuilderSidePanel",Y3),e.component("SimpleDoughnutChart",X3),e.component("RegionDistributionChart",q3),e.component("FontAwesomeIcon",Ue),e.component("Multiselect",Vt)}};exports.AdvancedFilterItem=kg;exports.ArchetypeSidePanel=d3;exports.ArchetypeSidePanelHighlight=Zu;exports.ArchetypesRow=_1;exports.ArchetypesTable=K3;exports.BuiltDecksTable=S3;exports.CardCarousel=T3;exports.CardItem=Wa;exports.CardItem3d=i1;exports.CardItemLinkWrapper=Zm;exports.CardLottery=y3;exports.CardMultiselect=_g;exports.CardOverview=G3;exports.CardQuantityBarChart=_3;exports.CardSimilarCards=h3;exports.CardSliceItem=fn;exports.CardTogglePage=D3;exports.CardsRow=Ig;exports.CardsTable=wb;exports.ChampionIcon=g1;exports.CheckboxItem=tn;exports.CheckboxItemManaCost=Au;exports.CircleCardItem=nA;exports.ColorPicker=R3;exports.CopyDeckButton=xd;exports.DashboardCardRow=d1;exports.DashboardCardTable=$3;exports.DashboardLeaderboardRow=f1;exports.DashboardLeaderboardTable=V3;exports.DashboardNewCards=M3;exports.DashboardProfile=w3;exports.DashboardSignUp=g3;exports.DeckBlock=v3;exports.DeckBuilderSidePanel=Y3;exports.DeckBuilderSummary=C1;exports.DeckBuilderSummaryType=ya;exports.DeckButtons=gl;exports.DeckDifferenceItem=qm;exports.DeckDifferences=Xm;exports.DeckHighlight=Ja;exports.DeckHighlightCards=Jo;exports.DeckHighlightEye=Vd;exports.DeckHighlightRegions=Xo;exports.DeckIcon=P3;exports.DeckPreview=Rd;exports.DeckSidePanel=o4;exports.DeckSummary=Sd;exports.DecksRow=Bl;exports.DecksTable=j3;exports.DeleteDeckButton=Lm;exports.EditDeckNameButton=Om;exports.EquipmentIcon=B1;exports.EternalIcon=a1;exports.FilterAdvanced=Sg;exports.FilterCardCodes=Xu;exports.FilterCards=yb;exports.FilterDecks=vb;exports.FilterKeywords=bg;exports.FilterManaCost=Bg;exports.FilterProfile=Bb;exports.FilterRanks=mb;exports.FilterRarities=yg;exports.FilterRegions=Yo;exports.FilterSampleSize=Xs;exports.FilterServers=Js;exports.FilterSets=wg;exports.FilterText=su;exports.FilterTime=KA;exports.FilterTypes=xg;exports.FollowerIcon=p1;exports.GauntletIcon=s1;exports.GemsCost=Tg;exports.InfoDoughnutChart=vu;exports.InfoIcon=Jm;exports.LandmarkIcon=m1;exports.LanguageSelection=Dg;exports.LargeTable=tA;exports.LeaderboardChart=b3;exports.LeaderboardDetailRow=r1;exports.LeaderboardDetailTable=N3;exports.LeaderboardOptions=I3;exports.LeaderboardTop=B3;exports.LeaderboardTop10Region=n1;exports.LineChart=k3;exports.LogoIcon=Ys;exports.ManaCurveChart=hl;exports.ManaHexagonIcon=jo;exports.MatchItem=m3;exports.ModalItem=VA;exports.NavigationSide=w1;exports.NavigationTop=H3;exports.NavigationTopDesktop=t1;exports.NavigationTopMobile=b1;exports.OpenArchetypePageButton=Mm;exports.OpenInDeckBuilderButton=Nm;exports.ProfileArchetypeRow=c1;exports.ProfileArchetypeTable=F3;exports.ProfileDropdown=e1;exports.ProfileGameTypeWinrate=z3;exports.ProfileRegionRow=l1;exports.ProfileRegionTable=x3;exports.RegionDistributionChart=q3;exports.RegionItem=qo;exports.RegionsLine=Fg;exports.RevealCarousel=gg;exports.RevealDayOption=h1;exports.RevealDayOptions=O3;exports.RoundCardInfoBarChart=E3;exports.RuneterraIcon=Rm;exports.SearchBar=Yu;exports.ShardsIcon=Qg;exports.ShareButton=Vm;exports.SidePanelSectionPane=mt;exports.SimilarDecksTable=U3;exports.SimpleDoughnutChart=X3;exports.SimulateMulligan=Pm;exports.SimulateMulliganButton=Fd;exports.SmallTable=XA;exports.SocialLinks=vg;exports.SocialMediaLinks=f3;exports.SpellIcon=v1;exports.StandardIcon=A1;exports.StatisticsPaneContainer=Q3;exports.TestComponent=L3;exports.TippyText=Ju;exports.ToggleSwitch=qu;exports.UpdateDeckPrivacyButton=Hm;exports.UploadDeckToLorButton=Id;exports.WinrateDoughnutChart=o1;exports.WinsLossesBarChart=C3;exports.WinsLossesLine=u1;exports.ZoomSlider=W3;exports.default=Qoe;exports.getCardsFromDeck=rn;exports.getDate=gE;exports.getDeckObjectFromCode=St;exports.getMostImportantCards=Pa;exports.getRegionNameOfRegionRef=Np;exports.importIcons=EF;exports.keyDayjs=HA;exports.regionOfCard=Pp;exports.setDescription=CE;exports.setTitle=EE;exports.setupi18n=LS;exports.useCallbacksStore=nn;exports.useCardJsonObjectStore=jt;exports.useCardJsonStore=Qw;exports.useDataJsonStore=we;exports.useUserStore=wa;
|
|
881
|
+
${n(t.date).fromNow()}`),o=i.computed(()=>{const l=[];return t.activated&&l.push("activated"),t.soon&&l.push("soon"),A.value&&l.push("past"),l});return i.onMounted(()=>{At(r.value,{content:a.value,arrow:!0})}),(l,c)=>(i.openBlock(),i.createElementBlock("div",zAe,[i.createElementVNode("div",{ref_key:"revealDayOption",ref:r,class:i.normalizeClass(["reveal-day-option",o.value])},[i.createElementVNode("div",jAe,[i.createElementVNode("img",{src:i.unref(eh),alt:"card",class:"card"},null,8,YAe)]),i.createElementVNode("div",qAe,[i.createElementVNode("img",{src:i.unref(eh),alt:"card",class:"card"},null,8,XAe)]),i.createElementVNode("div",JAe,[i.createElementVNode("img",{src:i.unref(eh),alt:"card",class:"card"},null,8,ZAe)])],2),i.createElementVNode("div",{ref_key:"revealDayOptionTippy",ref:a},[i.createVNode(Ju,{text:s.value},null,8,["text"])],512)]))}});const h1=M(ese,[["__scopeId","data-v-f3dbe378"]]),tse={days:{type:Array,required:!0,default:[]}},nse=e=>(i.pushScopeId("data-v-76ed46ac"),e=e(),i.popScopeId(),e),rse={class:"reveal-day-options"},ase=nse(()=>i.createElementVNode("div",{class:"line"},null,-1)),Ase=i.defineComponent({__name:"RevealDayOptions",props:tse,emits:["update:days"],setup(e,{emit:t}){const n=e;function r(a){const A=n.days.map(s=>({activated:!1,date:s.date,soon:s.soon}));!A[a].soon&&A[a].date.getTime()>new Date().getTime()||(A[a].activated=!0,console.log(A),t("update:days",A))}return(a,A)=>(i.openBlock(),i.createElementBlock("div",rse,[ase,(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.days,(s,o)=>(i.openBlock(),i.createBlock(h1,{key:o,date:s.date,activated:s.activated,soon:s.soon,onClick:l=>r(o)},null,8,["date","activated","soon","onClick"]))),128))]))}});const O3=M(Ase,[["__scopeId","data-v-76ed46ac"]]),sse={cardCodes:{type:Array,required:!0,default:[]}},ise=i.defineComponent({__name:"DashboardNewCards",props:sse,setup(e){const t=e,{t:n}=se(),r=[{title:n("general.newCards"),id:"newCards"}];return(a,A)=>(i.openBlock(),i.createBlock(XA,{class:"small-table","heading-items":r},{default:i.withCtx(()=>[i.createVNode(gg,{class:"reveal-carousel","card-codes":t.cardCodes},null,8,["card-codes"])]),_:1}))}});const M3=M(ise,[["__scopeId","data-v-89a26f2c"]]),ose={players:{type:Array,required:!0,default:[]},shownColumns:{type:Object,required:!0,default:{player:!0,lp:!0,change:!0,wins:!0,matches:!0,winrate:!0,deck:!0}},loading:{type:Boolean,required:!1,default:!1}},lse=i.defineComponent({__name:"LeaderboardDetailTable",props:ose,emits:["sort-updated"],setup(e,{emit:t}){const n=e,{t:r}=se(),a=i.ref([{id:"player",isShown:n.shownColumns.player,sortDirection:be.UP,title:r("general.player")},{id:"lp",isShown:n.shownColumns.lp,sortDirection:be.NEITHER,title:r("general.lp")},{id:"change",isShown:n.shownColumns.change,sortDirection:be.NEITHER,title:r("general.change")},{id:"wins",isShown:n.shownColumns.wins,sortDirection:be.NEITHER,title:r("general.wins")},{id:"matches",isShown:n.shownColumns.matches,sortDirection:be.NEITHER,title:r("general.matches")},{id:"winrate",isShown:n.shownColumns.winrate,sortDirection:be.NEITHER,title:r("general.winrate")},{id:"deck",isShown:n.shownColumns.deck,sortDirection:be.NOT_SORTABLE,title:r("general.favoriteDeck")}]),A=i.computed(()=>({"--columns":a.value.filter(o=>o.isShown).length}));function s(o){const l=ei(o,a);l&&t("sort-updated",l)}return(o,l)=>(i.openBlock(),i.createBlock(tA,{class:"large-table",loading:n.loading,style:i.normalizeStyle(A.value),"heading-items":a.value,onToggleSort:s},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.players,(c,u)=>(i.openBlock(),i.createBlock(r1,i.mergeProps({key:u},c,{index:u+2,"shown-columns":n.shownColumns,"router-link":i.unref(nn)().callbacks.playerRouterLinkCallback(c)}),null,16,["index","shown-columns","router-link"]))),128))]),_:1},8,["loading","style","heading-items"]))}});const N3=M(lse,[["__scopeId","data-v-168c9f53"]]);const cse={},use=e=>(i.pushScopeId("data-v-c8a918ec"),e=e(),i.popScopeId(),e),dse={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 400 400"},fse=use(()=>i.createElementVNode("path",{d:"M107 57.2C23 99 25 97.6 22.2 106.3c-3.4 10.4-6 4 43.5 103.1l44 88.3.5-6.6c.4-4.6 1-7.7 2.4-10.4l1.9-3.7-40-80.8c-22.1-44.4-40.1-81.5-40.1-82.4 0-5-.9-4.5 78-43.9l75-37.4 3.4 1.1 3.3 1.2 49.8 99.6c33 65.8 49.8 100.4 49.8 102 0 4.9-1 5.5-28.2 19.2l-26 13 15.4.1h15.4l13.9-6.9c19.2-9.6 23.1-14 23.2-25.6v-5.7L257 129.6C221.5 58.6 206 28 204 26c-4-4.2-9.6-6.5-15.8-6.5h-5.1L107 57.2m121.5-15.8 3.5 7h29.6c26 0 29.7.2 31.3 1.3 4 2.8 4 1.9 4 68v61.6l6.6 12.9 6.6 12.9v-76.3c0-90 .7-84.8-11.8-91.7l-4.2-2.3-34.6-.3-34.6-.2 3.6 7m95.7 42.1V91l24.3 12.1c25.1 12.5 28 14.5 28 18.7 0 1.3-10.8 24-26.1 55l-26.2 53 .2 14.9.2 14.8 32.8-65.8 32.8-65.8v-5.5a20 20 0 0 0-7-16 739.5 739.5 0 0 0-58.6-30.6c-.2 0-.4 3.4-.4 7.6M126.5 285.1c-4.2 4.2-2 10.3 4 11.4 1.5.2 57.1.3 123.6.2l120.9-.2 1.9-2c3-3 3-6.9 0-9.8l-1.8-1.9H128.8l-2.3 2.3m1.9 25.8c-4.5 1.8-5.5 7.5-1.9 11l2.3 2.3h122.4c130.4 0 125.8.1 127.2-3.5 1.5-3.8.3-7.8-2.7-9.4-2.5-1.3-244-1.7-247.3-.4m-2.3 29.3c-2.6 2.6-2.6 6.6.2 9.3l2 2h246.8l1.9-1.9c2.6-2.6 2.6-7.2.1-9.6l-1.8-1.7H128l-2 1.9m.6 27c-3.7 3.5-3 8.9 1.4 11.1 2.6 1.3 9.8 1.4 124.8 1.2l122-.2 2-2c3-3 3-6.9 0-9.8l-1.8-1.9H251.7c-122.8 0-123.3 0-125 1.6"},null,-1)),hse=[fse];function pse(e,t){return i.openBlock(),i.createElementBlock("svg",dse,hse)}const P3=M(cse,[["render",pse],["__scopeId","data-v-c8a918ec"]]);const gse={},mse=e=>(i.pushScopeId("data-v-4a6733fd"),e=e(),i.popScopeId(),e),vse={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 400 431.6"},Bse=mse(()=>i.createElementVNode("path",{d:"m178 26.2-8.6 1.8-9.6 2c-2.6.6-6.6 1.5-8.8 1.8-2.2.4-5.7 1-7.8 1.6l-8.8 1.8-8.8 1.8-8.6 1.8c-2.6.5-6.2 1.2-8 1.7l-8.8 1.7-8.6 1.8-6.6 1.4c-3.2.5-14.1 2.9-18.3 3.9-4.2 1-4.4 2.2-2.2 15.1 4.2 24.3 5.2 51.8 2.9 80.4l-.8 10.8c-.2 2-.8 6.9-1.4 10.6-.6 3.7-1.5 9-1.8 11.8-.4 2.8-1.2 7-1.8 9.6a138 138 0 0 0-1.8 8.3c-.3 2-1.1 5.3-1.8 7.4l-1.6 6.1c-.8 4-3.8 14.2-7.1 23.6a191.2 191.2 0 0 1-5.7 15.3L39 259.8c-.7 2-1.7 4.2-2.1 5l-8.5 17c-3.4 7-3.6 6.6 11.3 17a13873.6 13873.6 0 0 1 92 64.6c17.4 12.3 16.5 12.7 18-8L151 332c.6-12 .9-16 2-30.4.6-7.2 1-13.3 1.8-30.2l1.2-18c1.6-20.9 3-46.9 2.6-48.9-.4-2.3-1.8-2.8-5-1.8-9.2 3-18 4.4-23 3.7-15.1-2-25.3-12.8-29.8-31.8a95.5 95.5 0 0 1-2.6-29.8c0-19.7.1-20 5.5-21.6a691 691 0 0 0 14.5-4.2 583.1 583.1 0 0 0 24-6.8 88 88 0 0 0 6.4-1.8c2-.6 4.9-1.5 6.4-1.8 1.5-.3 4.7-1.3 7-2l5-1.4 5-1.4c12-3.9 13.8-3.9 28.5.4a746 746 0 0 0 23 6.5c.4.2 2.3.8 4.3 1.3 2 .4 5.2 1.4 7.2 2l6.4 1.8c1.5.3 4.2 1 5.8 1.6l7.4 2.2c19 5 18.6 4.5 18.6 24.2 0 48.9-20.7 71.2-55 59.3-6.4-2.2-6.8-1.3-5.6 13a948 948 0 0 1 1.8 30.3c.2 4.7.9 14.2 1.4 21 1.1 14.4 1.6 22.6 2.2 34.8.2 4.8.9 14.7 1.4 21.8 1 12.3 1.2 16.4 2.2 36 .9 16.2-.6 16.4 26.2-2.6a2102.7 2102.7 0 0 1 24.8-17.3c2.6-2 7.1-5 10-7.1a3744.4 3744.4 0 0 1 30.2-21.1l17.8-12.5c13.2-9.2 14-9.9 13.7-12.5-.2-2-.5-2.7-3.4-8.1a164.8 164.8 0 0 1-10.7-22.4 292 292 0 0 1-9.5-25.4 292 292 0 0 1-7.2-25.2 345.8 345.8 0 0 1-10.4-64.4c-.9-7.7-.6-44.7.4-53.6l1.7-15.4 1.4-10.6c2-9.4 2-10.2-.1-11.7-.7-.4-2.1-1-3.2-1l-6.5-1.5-9.5-2c-2.7-.4-6.7-1.2-8.8-1.8l-6.9-1.4c-1.7-.3-5.7-1-9-1.8l-9.8-2c-2-.3-5.5-1-7.6-1.6l-8.8-1.8-8.8-1.8c-2.1-.5-5.6-1.3-7.8-1.6-2.2-.4-5.8-1.1-8-1.7l-9.4-2c-3-.4-7.3-1.3-9.6-1.9a28.3 28.3 0 0 0-14.8 0"},null,-1)),yse=[Bse];function wse(e,t){return i.openBlock(),i.createElementBlock("svg",vse,yse)}const p1=M(gse,[["render",wse],["__scopeId","data-v-4a6733fd"]]);const bse={},_se=e=>(i.pushScopeId("data-v-b519ac08"),e=e(),i.popScopeId(),e),Cse={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 400 429.1"},Ese=_se(()=>i.createElementVNode("path",{d:"M53.8 32.8c-2.6 1-8.3 12.9-13.6 28l-2.1 5.8c-.4 1.1-1.1 3.5-1.5 5.4L35 78.8a84.1 84.1 0 0 0-2.6 14.1c0 2.7.8 4.1 7.4 12.5 16.7 21.3 16.7 21 2.2 21-13.3 0-13-.3-12.7 11.8.2 8.4.7 11.8 1.9 14.2.9 1.7 1.7 2.7 27 35.3 8.1 10.6 7.8 11.5-4.2 11.5-11.9 0-12 .3-4.4 16.9a269.4 269.4 0 0 0 28.7 47.7c8.4 11 8.6 11.5 9 19.8.5 8 1.1 11.4 4.3 24.4 7 28.8 30 57 60 73.2a97 97 0 0 1 5 2.8l3 1.4c1.5.5 3.5 1.4 4.5 2 2.8 1.4 10.6 4 11.6 3.6 2.1-.5 2.4-3.6 1-10.6-.6-2.6-1.4-7.3-1.9-10.6-.4-3.2-1.2-7.6-1.6-9.7a218 218 0 0 1-2.6-15.1l-1.8-10.2-1.6-8.2c-1-5.6-.9-5.5-13-5.8-10.4-.2-11-.4-12.3-2.5-.4-.7-.5-7-.7-28.7-.2-26.2-.2-27.9-1-29.2-.4-.8-5.5-6.3-11.4-12.2-5.9-6-11-11.4-11.4-12.2-.8-1.5-1.3-65.8-.5-68.5.7-2.6 2.6-2.3 7.3 1.3l6.8 4.9a1371.6 1371.6 0 0 1 25 17.9c16.1 11.6 25 18.2 26.2 19.7l1.2 1.6.2 28.6c.2 31.6.1 30.2 2.8 32 1.7 1.1 28 1.4 30.6.3 3-1.2 2.8.6 3-31.4.2-31.9 0-29.5 3-32.5 1.7-1.5 7.1-5.6 18.6-13.7a3147.5 3147.5 0 0 0 38.3-27.6c4.4-3.3 6-3.6 7-1.2.7 2 .4 66.8-.3 68.3-.4.7-5.4 6-11.2 11.9-5.7 5.8-10.9 11.3-11.4 12.2l-1 1.6-.2 27.8c-.3 35 1.2 31.2-12.6 31.6-12 .3-12.2.4-13.6 12.6-.3 2.9-1 7.3-1.4 9.8-1.4 8.3-2 11.7-2.6 17-.3 2.9-1 7.5-1.6 10.4-1 5.6-2.2 14.1-2.2 16.9 0 2 1 3.3 2.8 3.3a93.6 93.6 0 0 0 21.9-9.4 124.7 124.7 0 0 0 47-44.9 128.2 128.2 0 0 0 15.9-52.5c.7-11.5 0-9.7 11.7-27.2l10.4-15.6c2.3-3.3 18.2-34.8 19-37.7 1.1-3.3-.8-4.3-8.8-4.3-11.8-.1-11.9.1 3.4-20.2a1330 1330 0 0 0 15.4-20.8c4.9-6.6 5.5-8.5 6.6-20.9.6-6.3.4-8.2-1-9.6l-1.1-1.1-9-.2c-13.5-.3-13.6-.6-4.2-13.4 14.6-19.7 14.1-18.3 11-31a188 188 0 0 0-9.9-31.1c-2.8-8-7.8-17.3-9.9-18.1-2.6-1.1-1.7-2.8-24.6 43-20.2 40.3-21.3 42.4-22.7 43.2-2.1 1.1-3 .5-6.3-4.2A118.4 118.4 0 0 0 237.3 71a122.9 122.9 0 0 0-76 2 73.7 73.7 0 0 0-14.9 6.9c-13.8 7-29.8 21.3-39.1 35-3.3 4.8-5.2 5.6-7.4 3.1L78.4 75.7c-22.4-44.9-22-44-24.6-43"},null,-1)),kse=[Ese];function Sse(e,t){return i.openBlock(),i.createElementBlock("svg",Cse,kse)}const g1=M(bse,[["render",Sse],["__scopeId","data-v-b519ac08"]]);const xse={},Fse=e=>(i.pushScopeId("data-v-f1928c9e"),e=e(),i.popScopeId(),e),Ise={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 400 470.8"},Use=Fse(()=>i.createElementVNode("path",{"fill-rule":"evenodd",d:"M60.6 11c-.5.8-.6 17.6-.5 157l.1 156 1 .8c1.5 1.3 278.4 1.2 279.6 0 1.3-1.3 1.2.8 1.1-81.1l-.1-78.6-1.3-1.1c-1-.9-4.5-2.2-16-6-38.4-12.5-36.7-12-38-10.7-.7.7-.7 5.1-.9 64.4l-.2 63.7-.9 2.2c-3.9 9.5-11 14-23.1 14.3-12.4.3-20-3.6-24.3-12.3-2.4-4.8-2.3-1.4-2.3-95v-87l-1-1.1c-1.2-1.4 1-.6-31.6-12.6a552 552 0 0 0-25.5-9.1c-2.5 0-2.3-8.5-2.3 98.8 0 60.3-.2 98.7-.4 100.8-2.7 23.7-41.9 26.6-49.7 3.6l-.9-2.6-.2-120.9-.2-120.9-1-1c-.7-.6-5-2.5-12.6-5.3C59.9 8.6 61.7 9.2 60.6 10.9m.9 356.3c-2.6.5-3 1.8-3 7.7-.1 12.3-5.7 18.7-24.6 28.2-11.4 5.6-16.6 10.9-19.3 19.3a86 86 0 0 0-.9 19.5l-.2 17.3 1 1 1 1h368.1l1-1c.7-.6 1-1.6 1.2-3.2.4-3.3 0-28.3-.6-31.4-1.9-10.7-8-17.3-22-23.4-17.3-7.6-21.8-13.2-22.6-28.5-.3-4.5-.4-5-1.3-5.8l-1-.9H200.7c-75.7 0-138.4 0-139.2.2"},null,-1)),Qse=[Use];function Tse(e,t){return i.openBlock(),i.createElementBlock("svg",Ise,Qse)}const m1=M(xse,[["render",Tse],["__scopeId","data-v-f1928c9e"]]);const Dse={},Lse=e=>(i.pushScopeId("data-v-b1448e85"),e=e(),i.popScopeId(),e),Ose={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 400 459.4"},Mse=Lse(()=>i.createElementVNode("path",{d:"M175.3 29.5c-1.7.3-.9 1.5 6.1 8.9A57.6 57.6 0 0 1 200 82.6a63.5 63.5 0 0 1-5 25.1 63.5 63.5 0 0 1-23 27.5c-4.6 2.7-6.3 2-14.8-6.2-7.9-7.7-8-7.8-11.1-6.2-2.6 1.3-14.6 12-20.5 18.2l-9.6 10a349.5 349.5 0 0 0-35.5 43.8c-3.1 4.6-6 9.1-9.3 15.2a753 753 0 0 1-5.2 9.2c-.9 1.4-2 3.7-2.4 5-.4 1.2-1.3 3.2-2 4.4l-2.2 4.8a52 52 0 0 1-1.8 4.2c-.4.8-1.3 3.2-2 5.4l-2.2 6c-.5 1-1.3 3.8-1.8 6l-2 7.7a62 62 0 0 0-1.8 8c-3.2 23.5-3 26.6 1.7 31A154.6 154.6 0 0 0 73 318a254 254 0 0 0 33.9 16.2c2.4 1.3 12.6 4.6 19 6.3 3.6 1 7.4 2 8.4 2.4l7.4 1.6c3 .5 7.5 1.4 9.8 2 2.7.6 7.5 1.3 13.2 1.8 5 .4 11.5 1 14.6 1.4 3.8.4 9.7.6 18.6.6 18.5 0 19.9 1.2 13.7 11.9a86.4 86.4 0 0 1-50.1 39.8c-1.4.6-4.1 1.4-6 2-1.9.4-5.2 1.3-7.4 2-2.2.6-6.3 1.4-9.2 1.7-6 .7-10 1.5-10.7 2.2-1.3 1.2 2.5 4 7 5.1l8.3 2.3c2.8.8 6.8 1.7 9 2l15.8 2.6c6.9 1.3 29.5 2 39.8 1.2 6.5-.4 8-.6 18.2-2.4l8.3-1.4c2-.3 5.7-1.2 8-2 2.4-.7 5.4-1.6 6.7-1.8 1.3-.3 3.8-1 5.6-1.8l6-2.2c1.5-.5 3.7-1.3 4.7-1.9l4.2-1.8a228 228 0 0 0 22-11.7c20.9-13.4 40-38.5 44.7-58.8l1.8-6c1.7-4.9 1.9-5.8 2.6-13.2a116.3 116.3 0 0 0-10.4-71l-1.4-2.7c-.4-1-2.5-4.5-6-9.7-4.3-6.6-7.5-7.3-10-2.3-3.1 6.1-15.8 20.3-23.2 25.8a81.5 81.5 0 0 1-71.1 13.4l-6.3-2.3a93 93 0 0 1-38.7-30.1c-4-5.7-4-7.3-.4-12.8a82.1 82.1 0 0 1 38.7-30.2c17-7.5 42.3-7.4 57.2.3 8.8 4.5 10.9 2.5 9.2-9.2-.3-2.2-.6-6.5-.6-9.6a129 129 0 0 0-4.6-34.6 75.6 75.6 0 0 0-3.6-13.8c-4.5-17-18-42.2-32-59.6a193.3 193.3 0 0 0-27.5-25.9 82.1 82.1 0 0 0-18-10.3c-3-1.8-14.6-4.6-17-4.1"},null,-1)),Nse=[Mse];function Pse(e,t){return i.openBlock(),i.createElementBlock("svg",Ose,Nse)}const v1=M(Dse,[["render",Pse],["__scopeId","data-v-b1448e85"]]);const Hse={},Rse=e=>(i.pushScopeId("data-v-e5501fa0"),e=e(),i.popScopeId(),e),Vse={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Kse=Rse(()=>i.createElementVNode("path",{d:"M9.51 16.698 2.244 9.18 1 11.478l6.226 6.264 2.283-1.044ZM6.189 6.676 4.943 5.423 7.02 3.335l1.245 1.253L6.19 6.676ZM9.302 14.61 4.113 9.39l.83-1.044H6.19l3.736-3.55V3.545L10.962 2.5l4.981.626.415 4.803-.83.835-1.453.209-.83 1.043 1.453 1.253.83-.835 1.453.626-4.15 4.176L12 13.775l.83-.835-1.453-1.462-1.037 1.253v1.252l-1.038.627ZM20.924 21.5l-6.018-6.473 1.66-1.67L23 19.412 20.924 21.5Z"},null,-1)),$se=[Kse];function Wse(e,t){return i.openBlock(),i.createElementBlock("svg",Vse,$se)}const B1=M(Hse,[["render",Wse],["__scopeId","data-v-e5501fa0"]]),y1={items:{type:Array,required:!0,default:[]},fetchSeachResult:{type:Function,required:!0,default:()=>[]}},Gse={...y1,expanded:{type:Boolean,required:!1,default:!1},links:{type:Object,required:!0,default:{gift:{path:"/404"},settings:{path:"/404"},profile:{path:"/404"}}}},zse={class:"content logo no-scrollbar"},jse={class:"nav-item"},Yse={class:"nav-icon-wrapper"},qse={class:"nav-text"},Xse={class:"nav-icon-wrapper"},Jse={class:"nav-text"},Zse={class:"profile content"},eie={class:"nav-icon-wrapper"},tie={class:"nav-text"},nie={class:"nav-icon-wrapper"},rie={class:"nav-text settings"},aie={class:"nav-icon-wrapper"},Aie={class:"nav-text"},sie={class:"nav-icon-wrapper"},iie={class:"nav-text name"},oie={class:"nav-icon-wrapper"},lie={class:"nav-text settings"},cie={class:"nav-icon-wrapper"},uie={class:"nav-text sign-in-container"},die={class:"fancy-button"},fie=i.defineComponent({__name:"NavigationSide",props:Gse,emits:["click:sync","click:sign-in","click:language"],setup(e,{emit:t}){const n=e,{t:r}=se(),a=i.ref(),A=i.ref();let s;i.onMounted(()=>{var l;s=new ResizeObserver(o),a.value&&s.observe(a.value),(l=A.value)==null||l.addEventListener("scroll",o),o()}),i.onUnmounted(()=>{var l;s.disconnect(),(l=A.value)==null||l.removeEventListener("scroll",o)});function o(){var u,d;let l=!1,c=!1;A.value&&(A.value.clientHeight<A.value.scrollHeight&&(l=A.value.scrollTop>0,c=A.value.scrollTop<A.value.scrollHeight-A.value.clientHeight),(u=A.value)==null||u.classList.toggle("scrollable-up",l),(d=A.value)==null||d.classList.toggle("scrollable-down",c))}return(l,c)=>(i.openBlock(),i.createElementBlock("div",{ref_key:"navigationSide",ref:a,class:i.normalizeClass(["navigation-side",n.expanded?"expanded":""])},[i.createElementVNode("div",zse,[i.createElementVNode("div",jse,[i.createElementVNode("div",Yse,[i.createVNode(Ys,{"logo-type":"logo-only"})]),i.createElementVNode("div",qse,[i.createVNode(Ys,{"logo-type":"text-only"})])])]),i.createElementVNode("div",{ref_key:"navigationPages",ref:A,class:"pages content no-scrollbar"},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.items,u=>(i.openBlock(),i.createBlock(i.unref(us.RouterLink),{key:u.text,to:u.routerLocation,class:i.normalizeClass(["nav-item",u.highlighted?"highlight":""])},{default:i.withCtx(()=>[i.createElementVNode("div",Xse,[i.createVNode(i.unref(Ue),{class:"nav-icon",icon:u.faIcon},null,8,["icon"])]),i.createElementVNode("div",Jse,i.toDisplayString(u.text),1)]),_:2},1032,["to","class"]))),128))],512),i.createElementVNode("div",Zse,[i.unref(wa)().user?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createVNode(i.unref(us.RouterLink),{to:n.links.gift,class:"nav-item"},{default:i.withCtx(()=>[i.createElementVNode("div",eie,[i.createVNode(i.unref(Ue),{class:"nav-icon",icon:"gift"})]),i.createElementVNode("div",tie,i.toDisplayString(i.unref(r)("general.openCards")),1)]),_:1},8,["to"]),i.createVNode(i.unref(us.RouterLink),{to:n.links.settings,class:"nav-item"},{default:i.withCtx(()=>[i.createElementVNode("div",nie,[i.createVNode(i.unref(Ue),{class:"nav-icon",icon:"cog"})]),i.createElementVNode("div",rie,[i.createElementVNode("div",null,i.toDisplayString(i.unref(r)("general.settings")),1),i.createElementVNode("div",{class:"icon",onClick:c[0]||(c[0]=i.withModifiers(u=>t("click:language"),["stop","prevent"]))},[i.createVNode(i.unref(Ue),{icon:"language"})])])]),_:1},8,["to"]),i.createElementVNode("div",{class:"nav-item",onClick:c[1]||(c[1]=u=>t("click:sync"))},[i.createElementVNode("div",aie,[i.createVNode(i.unref(Ue),{class:"nav-icon",icon:"rotate-right"})]),i.createElementVNode("div",Aie,i.toDisplayString(i.unref(r)("general.syncUserData")),1)]),i.createVNode(i.unref(us.RouterLink),{to:n.links.profile,class:"nav-item"},{default:i.withCtx(()=>{var u,d,f;return[i.createElementVNode("div",sie,[i.createVNode(nA,{"card-code-prop":((u=i.unref(wa)().user)==null?void 0:u.selectedIconCard)??"05BC160","ignore-card-item":!0,"color-override":(d=i.unref(wa)().user)==null?void 0:d.selectedBannerColor,"router-link":n.links.profile},null,8,["card-code-prop","color-override","router-link"])]),i.createElementVNode("div",iie,i.toDisplayString((f=i.unref(wa)().user)==null?void 0:f.name),1)]}),_:1},8,["to"])],64)):(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createVNode(i.unref(us.RouterLink),{to:n.links.settings,class:"nav-item"},{default:i.withCtx(()=>[i.createElementVNode("div",oie,[i.createVNode(i.unref(Ue),{class:"nav-icon",icon:"cog"})]),i.createElementVNode("div",lie,[i.createElementVNode("div",null,i.toDisplayString(i.unref(r)("general.settings")),1),i.createVNode(i.unref(Ue),{onClick:c[2]||(c[2]=i.withModifiers(u=>t("click:language"),["stop","prevent"])),class:"icon",icon:"language"})])]),_:1},8,["to"]),i.createElementVNode("div",{class:"nav-item",onClick:c[3]||(c[3]=u=>t("click:sign-in"))},[i.createElementVNode("div",cie,[i.createVNode(i.unref(Ue),{class:"nav-icon",icon:"arrow-right-to-bracket"})]),i.createElementVNode("div",uie,[i.createElementVNode("div",die,i.toDisplayString(i.unref(r)("general.signIn")),1)])])],64))])],2))}});const w1=M(fie,[["__scopeId","data-v-1728bf4e"]]),hie=i.defineComponent({__name:"NavigationTopMobile",props:y1,setup(e){const t=e,n=i.ref(!1),r=i.ref(!1),a=i.ref(),A=i.ref();window.addEventListener("click",s);function s(c){var u;n.value&&(n.value=!!((u=A.value)!=null&&u.contains(c.target)))}function o(){i.nextTick(()=>{n.value=!0,i.nextTick(()=>{var c,u;(u=(c=a.value)==null?void 0:c.$el.querySelector("input"))==null||u.focus()})})}function l(){r.value=!0}return i.onUnmounted(()=>{window.removeEventListener("click",s)}),(c,u)=>(i.openBlock(),i.createElementBlock("div",{ref_key:"navigationTopMobile",ref:A,class:"navigation-top-mobile"},[n.value?(i.openBlock(),i.createBlock(Yu,{key:1,"fetch-seach-result":t.fetchSeachResult,ref_key:"searchBar",ref:a,class:"search-bar"},null,8,["fetch-seach-result"])):(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createVNode(i.unref(Ue),{class:"icon",icon:"bars",onClick:l}),i.createVNode(Ys,{class:"logo-icon","logo-type":"text-only"}),i.createVNode(i.unref(Ue),{class:"icon",icon:"search",onClick:i.withModifiers(o,["stop","prevent"])},null,8,["onClick"])],64)),i.createVNode(VA,{"show-modal":r.value,"onUpdate:showModal":u[0]||(u[0]=d=>r.value=d)},{default:i.withCtx(()=>[i.createVNode(w1,i.mergeProps({class:"navigation-side"},t,{expanded:!0}),null,16)]),_:1},8,["show-modal"])],512))}});const b1=M(hie,[["__scopeId","data-v-4f19578e"]]),pie={class:"navigation-top"},gie=i.defineComponent({__name:"NavigationTop",props:y1,setup(e){const t=e;return(n,r)=>(i.openBlock(),i.createElementBlock("div",pie,[i.createVNode(t1,i.mergeProps({class:"navigation-top-desktop"},t),{default:i.withCtx(()=>[i.renderSlot(n.$slots,"default",{},void 0,!0)]),_:3},16),i.createVNode(b1,i.mergeProps({class:"navigation-top-mobile"},t),null,16)]))}});const H3=M(gie,[["__scopeId","data-v-a1aae1e1"]]),mie={modelValue:{type:String,required:!0,default:!1}},vie=["value"],Bie=i.defineComponent({__name:"ColorPicker",props:mie,emits:["update:modelValue"],setup(e,{emit:t}){const n=e;function r(a){t("update:modelValue",a.target.value)}return(a,A)=>(i.openBlock(),i.createElementBlock("input",{type:"color",value:n.modelValue,onInput:r},null,40,vie))}});const R3=M(Bie,[["__scopeId","data-v-5ebbd7eb"]]),yie={rows:{type:Array,required:!0,default:[]},selectedRegion:{type:String,required:!0,default:"americas"}},wie={class:"multiselect-wrapper"},bie=i.defineComponent({__name:"DashboardLeaderboardTable",props:yie,emits:["update:selectedRegion"],setup(e,{emit:t}){const n=e,{t:r}=se(),a=i.ref(n.selectedRegion),A=[{title:r("general.leaderboard"),id:"leaderboard"}];return i.watch(a,s=>{t("update:selectedRegion",s)}),(s,o)=>(i.openBlock(),i.createBlock(XA,{class:"small-table","heading-items":A},{heading:i.withCtx(()=>[i.createElementVNode("div",wie,[i.createVNode(i.unref(Vt),{modelValue:a.value,"onUpdate:modelValue":o[0]||(o[0]=l=>a.value=l),class:"multiselect",placeholder:i.unref(r)("general.server"),options:i.unref(we)().dataJson.servers,"can-clear":!1,label:"name","value-prop":"nameRef"},null,8,["modelValue","placeholder","options"])])]),default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.rows,(l,c)=>(i.openBlock(),i.createBlock(f1,{id:l.id,key:l.id,change:l.change,lp:l.lp,name:l.name,rank:l.rank,"selected-banner-card":l.selectedBannerCard,matches:l.matches,index:c+2},null,8,["id","change","lp","name","rank","selected-banner-card","matches","index"]))),128))]),_:1}))}});const V3=M(bie,[["__scopeId","data-v-fe0f916c"]]),_ie={routerLink:{type:Object,required:!0,default:{path:"/404"}},deckBuilderRouterLink:{type:Object,required:!0,default:{path:"/404"}},archetypeId:{type:Number,required:!0,default:1},deckCode:{type:String,required:!0,default:""},index:{type:Number,required:!0,default:1},matches:{type:Number,required:!0,default:1},wins:{type:Number,required:!0,default:1},playrate:{type:Number,required:!0,default:1},regions:{type:Array,required:!0,default:[]},cards:{type:Array,required:!0,default:[]}},Cie=e=>(i.pushScopeId("data-v-3fd14fcc"),e=e(),i.popScopeId(),e),Eie={class:"table-card-row-background-wrapper"},kie={class:"table-card-row-background"},Sie=Cie(()=>i.createElementVNode("div",{class:"background-card"},null,-1)),xie=[Sie],Fie={class:"archetypes-row wrapper"},Iie={class:"column-content"},Uie={class:"column-content"},Qie=i.defineComponent({__name:"ArchetypesRow",props:_ie,setup(e){const t=e,n=i.computed(()=>St(t.deckCode)),r=i.computed(()=>rn(n.value)),a=i.computed(()=>t.cards.map(s=>`https://lor.gg/storage/cards/banner/${s}.png`)),A=i.computed(()=>({showButtons:{deleteDeck:!1,updateDeckPrivacy:!1,editDeckName:!1,gemsCost:!1,openArchetypePage:!0,simulateMulligan:!0,openInDeckBuilder:!0,copyDeckCode:!0,uploadDeckToLor:!0,shareDeck:!1},deckCode:t.deckCode,deckBuilderRouterLink:t.deckBuilderRouterLink,archetypeRouterLink:t.routerLink,deckId:void 0,deckName:void 0,isPrivate:void 0}));return(s,o)=>{const l=i.resolveComponent("RouterLink");return i.openBlock(),i.createBlock(l,{to:t.routerLink,class:"wrapper"},{default:i.withCtx(()=>[i.createElementVNode("div",{class:"archetypes-row-wrapper wrapper",style:i.normalizeStyle({"--index":t.index})},[i.createElementVNode("div",Eie,[i.createElementVNode("div",kie,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.value,c=>(i.openBlock(),i.createElementBlock("div",{key:c,class:"background-card-wrapper",style:i.normalizeStyle({"--background-image":`url(${c})`})},xie,4))),128))])]),i.createElementVNode("div",Fie,[i.createElementVNode("div",{class:"column-content deck-highlight-wrapper",onClick:o[0]||(o[0]=i.withModifiers(()=>{},["stop","prevent"]))},[i.createVNode(Ja,{"deck-code":t.deckCode,deck:n.value,cards:r.value,"deck-buttons-props":A.value},null,8,["deck-code","deck","cards","deck-buttons-props"])]),i.createElementVNode("div",Iie,i.toDisplayString(i.unref(Te)(t.matches)),1),i.createElementVNode("div",{class:"column-content",style:i.normalizeStyle({color:`var(${i.unref(Zn)(t.wins/t.matches)})`})},i.toDisplayString(i.unref(Te)(t.wins/t.matches*100,2,3)+"%"),5),i.createElementVNode("div",Uie,i.toDisplayString(i.unref(Te)(t.playrate,2,3)+"%"),1)])],4)]),_:1},8,["to"])}}});const _1=M(Qie,[["__scopeId","data-v-3fd14fcc"]]),Tie={archetypeRows:{type:Array,required:!0,default:[]},loading:{type:Boolean,required:!1,default:!1}},Die=i.defineComponent({__name:"ArchetypesTable",props:Tie,emits:["sort-updated"],setup(e,{emit:t}){const n=e,{t:r}=se(),a=i.ref([{id:"deck",isShown:!0,sortDirection:be.NOT_SORTABLE,title:r("general.deck")},{id:"matches",isShown:!0,sortDirection:be.DOWN,title:r("general.matches")},{id:"winrate",isShown:!0,sortDirection:be.NEITHER,title:r("general.winrate")},{id:"playrate",isShown:!0,sortDirection:be.NEITHER,title:r("general.playrate")}]);function A(s){const o=ei(s,a);o&&t("sort-updated",o)}return(s,o)=>(i.openBlock(),i.createBlock(tA,{class:"large-table",loading:n.loading,"heading-items":a.value,onToggleSort:A},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.archetypeRows,(l,c)=>(i.openBlock(),i.createBlock(_1,i.mergeProps({key:l.deckCode},l,{index:c+2}),null,16,["index"]))),128))]),_:1},8,["loading","heading-items"]))}});const K3=M(Die,[["__scopeId","data-v-4a8597f4"]]),Lie={typeSummary:{type:Object,required:!0,default:{quantity:0,isError:!1,typeRef:"Champion"}}},Oie={class:"number-container"},Mie={key:0,class:"type-icon"},Nie=i.defineComponent({__name:"DeckBuilderSummaryType",props:Lie,setup(e){const t=e;return(n,r)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["deck-builder-summary-type",[t.typeSummary.isError?"error":"",t.typeSummary.typeRef==="Deck"?"deck":""]])},[i.createElementVNode("div",Oie,i.toDisplayString(t.typeSummary.quantity),1),t.typeSummary.typeRef!=="Deck"?(i.openBlock(),i.createElementBlock("div",Mie,[t.typeSummary.typeRef==="Champion"?(i.openBlock(),i.createBlock(g1,{key:0})):t.typeSummary.typeRef==="Follower"?(i.openBlock(),i.createBlock(p1,{key:1})):t.typeSummary.typeRef==="Spell"?(i.openBlock(),i.createBlock(v1,{key:2})):t.typeSummary.typeRef==="Landmark"?(i.openBlock(),i.createBlock(m1,{key:3})):t.typeSummary.typeRef==="Equipment"?(i.openBlock(),i.createBlock(B1,{key:4})):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0)],2))}});const ya=M(Nie,[["__scopeId","data-v-2e6bb287"]]),Pie={cards:{type:Array,required:!0,default:[]},deck:{type:Object,required:!0,default:{}}},Hie={class:"deck-builder-summary"},Rie=i.defineComponent({__name:"DeckBuilderSummary",props:Pie,setup(e){const t=e;function n(c,u,d){const f=t.cards.filter(c).map(h=>t.deck[h.cardCode]).reduce((h,p)=>h+p,0);return{typeRef:d,quantity:f,isError:u(f)}}const r=i.computed(()=>n(c=>c.typeRef==="Unit"&&c.supertype==="Champion",c=>c>6,"Champion")),a=i.computed(()=>n(c=>c.typeRef==="Unit"&&c.supertype==="",()=>!1,"Follower")),A=i.computed(()=>n(c=>c.typeRef==="Spell",()=>!1,"Spell")),s=i.computed(()=>n(c=>c.typeRef==="Landmark",()=>!1,"Landmark")),o=i.computed(()=>n(c=>c.typeRef==="Equipment",()=>!1,"Equipment")),l=i.computed(()=>n(()=>!0,c=>c!==40,"Deck"));return(c,u)=>(i.openBlock(),i.createElementBlock("div",Hie,[i.createVNode(ya,{"type-summary":r.value},null,8,["type-summary"]),i.createVNode(ya,{"type-summary":a.value},null,8,["type-summary"]),i.createVNode(ya,{"type-summary":A.value},null,8,["type-summary"]),i.createVNode(ya,{"type-summary":s.value},null,8,["type-summary"]),i.createVNode(ya,{"type-summary":o.value},null,8,["type-summary"]),i.createVNode(ya,{"type-summary":l.value},null,8,["type-summary"])]))}});const C1=M(Rie,[["__scopeId","data-v-ec8f0fa9"]]),Vie={rows:{type:Array,required:!0,default:[]}},Kie=i.defineComponent({__name:"DashboardCardTable",props:Vie,setup(e){const t=e,{t:n}=se(),r=[{title:n("general.cards"),id:"cards"},{title:n("general.matches"),id:"matches"},{title:n("general.winrate"),id:"winrate"}];return(a,A)=>(i.openBlock(),i.createBlock(XA,{class:"small-table","heading-items":r},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(t.rows,s=>(i.openBlock(),i.createBlock(d1,{key:s.cardCode,"card-code":s.cardCode,matches:s.matches,wins:s.wins,index:s.index+2},null,8,["card-code","matches","wins","index"]))),128))]),_:1}))}});const $3=M(Kie,[["__scopeId","data-v-e5817be3"]]),$ie={modelValue:{type:Number,required:!0,default:5}},Wie=["value"],Gie=i.defineComponent({__name:"ZoomSlider",props:$ie,emits:["update:modelValue"],setup(e,{emit:t}){const n=e,r=i.ref(),a=i.ref();function A(s){t("update:modelValue",Number.parseInt(s.target.value))}return i.onMounted(()=>{At(r.value,{content:a.value,arrow:!0,interactive:!0,trigger:"mouseenter click",interactiveBorder:10})}),(s,o)=>{const l=i.resolveComponent("FontAwesomeIcon");return i.openBlock(),i.createElementBlock("div",null,[i.createElementVNode("div",{ref_key:"button",ref:r,class:"circle-button"},[i.createVNode(l,{icon:"search-plus",class:"zoom-button"})],512),i.createElementVNode("div",{ref_key:"slider",ref:a,class:"slider-wrapper"},[i.createElementVNode("input",{type:"range",min:"1",max:"10",class:"slider",value:n.modelValue,onInput:A},null,40,Wie)],512)])}}});const W3=M(Gie,[["__scopeId","data-v-bac83f78"]]),zie={cardProp:{type:Object,required:!1,default:void 0},cardCodeProp:{type:String,required:!1,default:void 0}},Kd=e=>(i.pushScopeId("data-v-fe063557"),e=e(),i.popScopeId(),e),jie={class:"card-overview"},Yie={class:"overview-top"},qie={class:"card-name"},Xie={class:"card-tags"},Jie={class:"card-tag"},Zie={class:"card-tag-text"},eoe={class:"card-tag"},toe={class:"card-tag-text"},noe={class:"card-tag"},roe={class:"card-tag-text"},aoe={class:"card-tag"},Aoe={class:"card-tag-text"},soe=Kd(()=>i.createElementVNode("hr",{class:"divider"},null,-1)),ioe={class:"card-text"},ooe=Kd(()=>i.createElementVNode("hr",{class:"divider"},null,-1)),loe={class:"keyword-description"},coe={class:"keyword-name"},uoe=Kd(()=>i.createElementVNode("hr",{class:"divider"},null,-1)),doe={class:"flavor-text"},foe=Kd(()=>i.createElementVNode("div",{class:"card-art-section"},[i.createElementVNode("div",{class:"card-art-button primary-button"},"Card Art")],-1)),hoe=i.defineComponent({__name:"CardOverview",props:zie,setup(e){const t=e,n=Ro(t.cardProp,t.cardCodeProp,!0),r=i.computed(()=>{if(n.value===void 0)return[];const l=[];for(const c of n.value.keywordRefs){const u=we().dataJson.keywords.find(d=>d.nameRef===c);u&&l.push(u)}return l}),a=i.computed(()=>{if(n.value===void 0)return null;const l=we().dataJson;return uo(n.value.regionRefs[0])?l.runeterraChampions.find(c=>c.nameRef===n.value.regionRefs[0])??l.regions[0]:l.regions.find(c=>c.nameRef===n.value.regionRefs[0])??l.regions[0]}),A=i.computed(()=>n.value===void 0?null:we().dataJson.rarities.find(l=>l.nameRef===n.value.rarityRef)??we().dataJson.rarities[0]),s=i.computed(()=>n.value===void 0?null:we().dataJson.types.find(l=>l.nameRef===n.value.typeRef)??we().dataJson.types[0]),o=i.computed(()=>n.value===void 0?null:we().dataJson.sets.find(l=>l.nameRef===n.value.set)??we().dataJson.sets[0]);return(l,c)=>{var u,d,f,h,p,m,y,g;return i.openBlock(),i.createElementBlock("div",jie,[i.unref(n)?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createElementVNode("div",Yie,[i.createElementVNode("div",qie,i.toDisplayString(i.unref(n).name),1),i.createVNode(i.unref(Ue),{icon:"times",class:"close-icon"})]),i.createElementVNode("div",Xie,[i.createElementVNode("div",Jie,[i.createElementVNode("div",{class:"icon",style:i.normalizeStyle({content:`url(${((u=a.value)==null?void 0:u.icon)??""})`})},null,4),i.createElementVNode("div",Zie,i.toDisplayString((d=a.value)==null?void 0:d.name),1)]),i.createElementVNode("div",eoe,[i.createElementVNode("div",{class:"icon",style:i.normalizeStyle({content:`url(${((f=A.value)==null?void 0:f.icon)??""})`})},null,4),i.createElementVNode("div",toe,i.toDisplayString((h=A.value)==null?void 0:h.name),1)]),i.createElementVNode("div",noe,[i.createElementVNode("div",{class:"icon",style:i.normalizeStyle({content:`url(${((p=s.value)==null?void 0:p.icon)??""})`})},null,4),i.createElementVNode("div",roe,i.toDisplayString((m=s.value)==null?void 0:m.name),1)]),i.createElementVNode("div",aoe,[i.createElementVNode("div",{class:"icon",style:i.normalizeStyle({content:`url(${((y=o.value)==null?void 0:y.icon)??""})`})},null,4),i.createElementVNode("div",Aoe,i.toDisplayString((g=o.value)==null?void 0:g.name),1)])]),soe,i.createElementVNode("div",ioe,i.toDisplayString(i.unref(n).descriptionRaw),1),ooe,(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.value,v=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:v.nameRef},[i.createElementVNode("div",loe,[i.createElementVNode("b",coe,i.toDisplayString(v.name+" - "),1),i.createElementVNode("span",null,i.toDisplayString(v.description),1)]),uoe],64))),128)),i.createElementVNode("div",doe,i.toDisplayString(i.unref(n).flavorText),1),foe],64)):i.createCommentVNode("",!0)])}}});const G3=M(hoe,[["__scopeId","data-v-fe063557"]]),poe={gameType:{type:String,required:!0,default:""},matches:{type:Number,required:!0,default:1},wins:{type:Number,required:!0,default:1}},goe={class:"profile-game-type-winrate"},moe={class:"game-type"},voe=i.defineComponent({__name:"ProfileGameTypeWinrate",props:poe,setup(e){const t=e;return(n,r)=>(i.openBlock(),i.createElementBlock("div",goe,[i.createElementVNode("div",moe,i.toDisplayString(t.gameType),1),i.createVNode(u1,{matches:t.matches,wins:t.wins},null,8,["matches","wins"])]))}});const z3=M(voe,[["__scopeId","data-v-1bb3c9de"]]),Boe={deckRows:{type:Array,required:!0,default:[]},loading:{type:Boolean,required:!1,default:!1}},yoe=i.defineComponent({__name:"DecksTable",props:Boe,emits:["sort-updated"],setup(e,{emit:t}){const n=e,{t:r}=se(),a=i.ref([{id:"deck",isShown:!0,sortDirection:be.NOT_SORTABLE,title:r("general.deck")},{id:"matches",isShown:!0,sortDirection:be.DOWN,title:r("general.matches")},{id:"winrate",isShown:!0,sortDirection:be.NEITHER,title:r("general.winrate")},{id:"manaCurve",isShown:!0,sortDirection:be.NOT_SORTABLE,title:r("general.manaCurve")},{id:"cost",isShown:!0,sortDirection:be.NOT_SORTABLE,title:r("general.cost")}]);function A(s){const o=ei(s,a);o&&t("sort-updated",o)}return(s,o)=>(i.openBlock(),i.createBlock(tA,{class:"large-table",loading:n.loading,"heading-items":a.value,onToggleSort:A},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.deckRows,(l,c)=>(i.openBlock(),i.createBlock(Bl,i.mergeProps({key:l.deckCode},l,{index:c+2}),null,16,["index"]))),128))]),_:1},8,["loading","heading-items"]))}});const j3=M(yoe,[["__scopeId","data-v-c789c9b5"]]),woe={deckCode:{type:String,required:!1,default:""}},boe={deck:{type:Object,required:!0,default:{}},deckButtonsProps:{type:Object,required:!0,default:{deckCode:"",deckId:void 0,showButtons:void 0,archetypeRouterLink:void 0,deckBuilderRouterLink:"404",deckName:void 0,showUploaded:void 0,isPrivate:void 0}}},_oe={class:"deck-preview-wrapper"},Coe=i.defineComponent({__name:"ShowDeckPreviewButton",props:boe,setup(e){const t=e,{t:n}=se(),r=i.ref(null),a=i.ref(!1);return i.onMounted(()=>{At(r.value,{content:n("deck.showPreview"),arrow:!0})}),(A,s)=>(i.openBlock(),i.createElementBlock("div",null,[i.createElementVNode("button",{ref_key:"button",ref:r,class:"circle-button",onClick:s[0]||(s[0]=o=>a.value=!0)},[i.createVNode(i.unref(Ue),{icon:"camera"})],512),i.createVNode(VA,{"show-modal":a.value,"onUpdate:showModal":s[1]||(s[1]=o=>a.value=o)},{default:i.withCtx(()=>[i.createElementVNode("div",_oe,[i.createVNode(i.unref(Rd),{deck:t.deck,"deck-buttons-props":t.deckButtonsProps},null,8,["deck","deck-buttons-props"])])]),_:1},8,["show-modal"])]))}});const Eoe=M(Coe,[["__scopeId","data-v-90be9f81"]]),koe={class:"cards-container no-scrollbar"},Soe={class:"bottom"},xoe={class:"bottom-buttons"},Foe={class:"fancy-button"},Y3=i.defineComponent({__name:"DeckBuilderSidePanel",props:woe,emits:["update:card-quantity"],setup(e,{emit:t}){const n=e,{t:r}=se(),a=i.computed(()=>{if(n.deckCode)return St(n.deckCode);throw new Error("Deck or DeckCode must be defined")}),A=i.computed(()=>rn(a.value)),s=i.computed(()=>({showButtons:{deleteDeck:!1,updateDeckPrivacy:!1,editDeckName:!1,gemsCost:!0,openArchetypePage:!1,simulateMulligan:!0,openInDeckBuilder:!1,copyDeckCode:!0,uploadDeckToLor:!0,shareDeck:!0},deckCode:n.deckCode,deckBuilderRouterLink:"404"}));return(o,l)=>(i.openBlock(),i.createBlock(Zs,{"show-clear-all":!1},{default:i.withCtx(()=>[i.createVNode(i.unref(C1),{cards:A.value,deck:a.value},null,8,["cards","deck"]),(i.openBlock(),i.createBlock(i.unref(hl),{class:"mana-curve-chart",key:n.deckCode,"padding-top":0,"show-data-labels":!1,"data-labels-offset":0,"tooltips-enabled":!1,"display-x-scale":!0,deck:a.value},null,8,["deck"])),i.createElementVNode("div",koe,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(A.value,c=>(i.openBlock(),i.createBlock(i.unref(fn),{"onUpdate:cardQuantity":l[0]||(l[0]=u=>t("update:card-quantity",u)),key:c.cardCode,"card-prop":c,"maintain-aspect-ratio":!0,"quantity-number":a.value[c.cardCode],"show-plus-minus":!0,"router-link":i.unref(nn)().callbacks.cardCodeRouterLinkCallback(c.cardCode),class:"card-slice-item"},null,8,["card-prop","quantity-number","router-link"]))),128))]),i.createElementVNode("div",Soe,[i.createElementVNode("div",xoe,[i.createVNode(i.unref(Fd),{deck:a.value},null,8,["deck"]),i.createVNode(i.unref(xd),{"deck-code":n.deckCode},null,8,["deck-code"]),i.createVNode(Eoe,{deck:a.value,"deck-buttons-props":s.value},null,8,["deck","deck-buttons-props"]),i.createVNode(i.unref(Id))]),i.createElementVNode("div",Foe,i.toDisplayString(i.unref(r)("general.save")),1)])]),_:1}))}});const Ioe={data:{type:Array,required:!0,default:[]},backgroundColor:{type:String,required:!1,default:"#000000"}},q3=i.defineComponent({__name:"RegionDistributionChart",props:Ioe,setup(e){const t=e,n=i.ref(null);Le.register(...Cr);const r=i.computed(()=>({labels:t.data.map(A=>A.region),datasets:[{data:t.data.map(A=>A.matches),backgroundColor:t.data.map(A=>I2(A.region))}]})),a={cutout:"80%",elements:{arc:{borderWidth:3,borderColor:t.backgroundColor}},plugins:{legend:{display:!0,position:"right",labels:{usePointStyle:!0,generateLabels(A){const s=[],o=A.data.labels;for(let l=0;l<A.data.labels.length;l++)s.push({text:`${Np(o[l])} (${A.data.datasets[0].data[l]})`,borderRadius:999,datasetIndex:0,index:l,fontColor:Ha("--color-0"),fillStyle:A.data.datasets[0].backgroundColor[l]});return s}}},datalabels:{display:!1}}};return(A,s)=>(i.openBlock(),i.createBlock(i.unref(ld),{ref_key:"chart",ref:n,"chart-data":r.value,options:a},null,8,["chart-data"]))}}),Uoe={value:{type:Number,required:!0,default:1},max:{type:Number,required:!0,default:2}},X3=i.defineComponent({__name:"SimpleDoughnutChart",props:Uoe,setup(e){const t=e,n=i.ref(null);Le.register(...Cr);const r=i.computed(()=>({labels:["Value","Max"],datasets:[{data:[t.value,t.max-t.value],backgroundColor:[Ha("--color-good"),"transparent"]}]})),a={cutout:"80%",elements:{arc:{borderWidth:0}},plugins:{legend:{display:!1}}},A=[{id:"text",beforeDraw:function(s){const o=s.chartArea.width,l=s.chartArea.height,c=s.ctx;c.restore();const u=(l/100).toFixed(2);c.font=`bold ${u}em sans-serif`,c.textBaseline="middle";const f=s.data.datasets[0].data[0].toFixed(2),h=Math.round((o-c.measureText(f).width)/2),p=l/2;c.fillStyle=Ha("--color-good"),c.fillText(f,h,p),c.save()}}];return(s,o)=>(i.openBlock(),i.createBlock(i.unref(ld),{ref_key:"chart",ref:n,"chart-data":r.value,options:a,plugins:A},null,8,["chart-data"]))}}),Qoe={install:async e=>{e.component("RevealCarousel",gg),e.component("SearchBar",Yu),e.component("SocialLinks",vg),e.component("ModalItem",VA),e.component("FilterSampleSize",Xs),e.component("FilterRanks",mb),e.component("FilterManaCost",Bg),e.component("FilterRarities",yg),e.component("FilterSets",wg),e.component("FilterKeywords",bg),e.component("FilterServers",Js),e.component("FilterTime",KA),e.component("FilterCardCodes",Xu),e.component("FilterDecks",vb),e.component("FilterProfile",Bb),e.component("FilterText",su),e.component("FilterAdvanced",Sg),e.component("FilterRegions",Yo),e.component("FilterCards",yb),e.component("AdvancedFilterItem",kg),e.component("FilterTypes",xg),e.component("RegionsLine",Fg),e.component("CardsTable",wb),e.component("DeckHighlightRegions",Xo),e.component("GemsCost",Tg),e.component("CardSliceItem",fn),e.component("LanguageSelection",Dg),e.component("DeckSidePanel",o4),e.component("DeckHighlight",Ja),e.component("ArchetypeSidePanel",d3),e.component("OpenInDeckBuilderButton",Nm),e.component("CopyDeckButton",xd),e.component("UpdateDeckPrivacyButton",Hm),e.component("EditDeckNameButton",Om),e.component("UploadDeckToLorButton",Id),e.component("DeleteDeckButton",Lm),e.component("OpenArchetypePageButton",Mm),e.component("SimulateMulliganButton",Fd),e.component("SocialMediaLinks",f3),e.component("DecksRow",Bl),e.component("CardItemLinkWrapper",Zm),e.component("DeckHighlightCards",Jo),e.component("CheckboxItem",tn),e.component("NavigationTopDesktop",t1),e.component("SidePanelSectionPane",mt),e.component("CardSimilarCards",h3),e.component("DashboardSignUp",g3),e.component("MatchItem",m3),e.component("ToggleSwitch",qu),e.component("LeaderboardTop10Region",n1),e.component("ShareButton",Vm),e.component("LeaderboardDetailRow",r1),e.component("DeckBlock",v3),e.component("SmallTable",XA),e.component("LeaderboardTop",B3),e.component("CardLottery",y3),e.component("DashboardProfile",w3),e.component("LeaderboardChart",b3),e.component("CardQuantityBarChart",_3),e.component("WinsLossesBarChart",C3),e.component("RoundCardInfoBarChart",E3),e.component("LineChart",k3),e.component("ManaCurveChart",hl),e.component("WinrateDoughnutChart",o1),e.component("InfoDoughnutChart",vu),e.component("BuiltDecksTable",S3),e.component("ProfileRegionTable",x3),e.component("ProfileArchetypeTable",F3),e.component("CardItem3d",i1),e.component("LeaderboardOptions",I3),e.component("SimilarDecksTable",U3),e.component("LargeTable",tA),e.component("StatisticsPaneContainer",Q3),e.component("ArchetypeSidePanelHighlight",Zu),e.component("CardCarousel",T3),e.component("DeckButtons",gl),e.component("WinsLossesLine",u1),e.component("DashboardCardRow",d1),e.component("CardTogglePage",D3),e.component("TestComponent",L3),e.component("DashboardLeaderboardRow",f1),e.component("DeckPreview",Rd),e.component("CheckboxItemManaCost",Au),e.component("RevealDayOptions",O3),e.component("DeckDifferenceItem",qm),e.component("DashboardNewCards",M3),e.component("CardsRow",Ig),e.component("LeaderboardDetailTable",N3),e.component("DeckIcon",P3),e.component("LogoIcon",Ys),e.component("FollowerIcon",p1),e.component("ChampionIcon",g1),e.component("EternalIcon",a1),e.component("InfoIcon",Jm),e.component("LandmarkIcon",m1),e.component("ManaHexagonIcon",jo),e.component("RuneterraIcon",Rm),e.component("ShardsIcon",Qg),e.component("StandardIcon",A1),e.component("SpellIcon",v1),e.component("GauntletIcon",s1),e.component("EquipmentIcon",B1),e.component("NavigationTop",H3),e.component("CardMultiselect",_g),e.component("ProfileDropdown",e1),e.component("ColorPicker",R3),e.component("DashboardLeaderboardTable",V3),e.component("NavigationSide",w1),e.component("ArchetypesTable",K3),e.component("DeckBuilderSummary",C1),e.component("DeckBuilderSummaryType",ya),e.component("DashboardCardTable",$3),e.component("ArchetypesRow",_1),e.component("RevealDayOption",h1),e.component("DeckHighlightEye",Vd),e.component("DeckDifferences",Xm),e.component("ZoomSlider",W3),e.component("CardOverview",G3),e.component("CircleCardItem",nA),e.component("ProfileGameTypeWinrate",z3),e.component("DecksTable",j3),e.component("RegionItem",qo),e.component("TippyText",Ju),e.component("ProfileRegionRow",l1),e.component("SimulateMulligan",Pm),e.component("DeckSummary",Sd),e.component("NavigationTopMobile",b1),e.component("CardItem",Wa),e.component("ProfileArchetypeRow",c1),e.component("DeckBuilderSidePanel",Y3),e.component("SimpleDoughnutChart",X3),e.component("RegionDistributionChart",q3),e.component("FontAwesomeIcon",Ue),e.component("Multiselect",Vt)}};exports.AdvancedFilterItem=kg;exports.ArchetypeSidePanel=d3;exports.ArchetypeSidePanelHighlight=Zu;exports.ArchetypesRow=_1;exports.ArchetypesTable=K3;exports.BuiltDecksTable=S3;exports.CardCarousel=T3;exports.CardItem=Wa;exports.CardItem3d=i1;exports.CardItemLinkWrapper=Zm;exports.CardLottery=y3;exports.CardMultiselect=_g;exports.CardOverview=G3;exports.CardQuantityBarChart=_3;exports.CardSimilarCards=h3;exports.CardSliceItem=fn;exports.CardTogglePage=D3;exports.CardsRow=Ig;exports.CardsTable=wb;exports.ChampionIcon=g1;exports.CheckboxItem=tn;exports.CheckboxItemManaCost=Au;exports.CircleCardItem=nA;exports.ColorPicker=R3;exports.CopyDeckButton=xd;exports.DashboardCardRow=d1;exports.DashboardCardTable=$3;exports.DashboardLeaderboardRow=f1;exports.DashboardLeaderboardTable=V3;exports.DashboardNewCards=M3;exports.DashboardProfile=w3;exports.DashboardSignUp=g3;exports.DeckBlock=v3;exports.DeckBuilderSidePanel=Y3;exports.DeckBuilderSummary=C1;exports.DeckBuilderSummaryType=ya;exports.DeckButtons=gl;exports.DeckDifferenceItem=qm;exports.DeckDifferences=Xm;exports.DeckHighlight=Ja;exports.DeckHighlightCards=Jo;exports.DeckHighlightEye=Vd;exports.DeckHighlightRegions=Xo;exports.DeckIcon=P3;exports.DeckPreview=Rd;exports.DeckSidePanel=o4;exports.DeckSummary=Sd;exports.DecksRow=Bl;exports.DecksTable=j3;exports.DeleteDeckButton=Lm;exports.EditDeckNameButton=Om;exports.EquipmentIcon=B1;exports.EternalIcon=a1;exports.FilterAdvanced=Sg;exports.FilterCardCodes=Xu;exports.FilterCards=yb;exports.FilterDecks=vb;exports.FilterKeywords=bg;exports.FilterManaCost=Bg;exports.FilterProfile=Bb;exports.FilterRanks=mb;exports.FilterRarities=yg;exports.FilterRegions=Yo;exports.FilterSampleSize=Xs;exports.FilterServers=Js;exports.FilterSets=wg;exports.FilterText=su;exports.FilterTime=KA;exports.FilterTypes=xg;exports.FollowerIcon=p1;exports.GauntletIcon=s1;exports.GemsCost=Tg;exports.InfoDoughnutChart=vu;exports.InfoIcon=Jm;exports.LandmarkIcon=m1;exports.LanguageSelection=Dg;exports.LargeTable=tA;exports.LeaderboardChart=b3;exports.LeaderboardDetailRow=r1;exports.LeaderboardDetailTable=N3;exports.LeaderboardOptions=I3;exports.LeaderboardTop=B3;exports.LeaderboardTop10Region=n1;exports.LineChart=k3;exports.LogoIcon=Ys;exports.ManaCurveChart=hl;exports.ManaHexagonIcon=jo;exports.MatchItem=m3;exports.ModalItem=VA;exports.NavigationSide=w1;exports.NavigationTop=H3;exports.NavigationTopDesktop=t1;exports.NavigationTopMobile=b1;exports.OpenArchetypePageButton=Mm;exports.OpenInDeckBuilderButton=Nm;exports.ProfileArchetypeRow=c1;exports.ProfileArchetypeTable=F3;exports.ProfileDropdown=e1;exports.ProfileGameTypeWinrate=z3;exports.ProfileRegionRow=l1;exports.ProfileRegionTable=x3;exports.RegionDistributionChart=q3;exports.RegionItem=qo;exports.RegionsLine=Fg;exports.RevealCarousel=gg;exports.RevealDayOption=h1;exports.RevealDayOptions=O3;exports.RoundCardInfoBarChart=E3;exports.RuneterraIcon=Rm;exports.SearchBar=Yu;exports.ShardsIcon=Qg;exports.ShareButton=Vm;exports.SidePanelSectionPane=mt;exports.SimilarDecksTable=U3;exports.SimpleDoughnutChart=X3;exports.SimulateMulligan=Pm;exports.SimulateMulliganButton=Fd;exports.SmallTable=XA;exports.SocialLinks=vg;exports.SocialMediaLinks=f3;exports.SpellIcon=v1;exports.StandardIcon=A1;exports.StatisticsPaneContainer=Q3;exports.TestComponent=L3;exports.TippyText=Ju;exports.ToggleSwitch=qu;exports.UpdateDeckPrivacyButton=Hm;exports.UploadDeckToLorButton=Id;exports.WinrateDoughnutChart=o1;exports.WinsLossesBarChart=C3;exports.WinsLossesLine=u1;exports.ZoomSlider=W3;exports.default=Qoe;exports.getCardsFromDeck=rn;exports.getDate=gE;exports.getDeckObjectFromCode=St;exports.getMostImportantCards=Pa;exports.getRegionNameOfRegionRef=Np;exports.importIcons=EF;exports.keyDayjs=HA;exports.regionOfCard=Pp;exports.setDescription=CE;exports.setTitle=EE;exports.setupi18n=LS;exports.useCallbacksStore=nn;exports.useCardJsonObjectStore=jt;exports.useCardJsonStore=Qw;exports.useDataJsonStore=we;exports.useUserStore=wa;
|