The Ultimate Video Player For WordPress – by Presto Player - Version 1.5.10

Version Description

  • August 2, 2021 =
  • Fix height issue with Vimeo videos on iOS devices.
Download this release

Release Info

Developer 2winfactor
Plugin Icon 128x128 The Ultimate Video Player For WordPress – by Presto Player
Version 1.5.10
Comparing to
See all releases

Code changes from version 1.5.9 to 1.5.10

dist/analytics/admin-379e676f.js ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ *
3
+ * Presto Player
4
+ *
5
+ * @author Presto Made, Inc
6
+ * @version 0.1.0
7
+ * @link undefined
8
+ * @license GPL
9
+ *
10
+ * Copyright (c) 2021 Presto Made, Inc
11
+ *
12
+ * This software is released under the GPL License
13
+ * https://opensource.org/licenses/GPL
14
+ *
15
+ * Compiled with the help of https://wpack.io
16
+ * A zero setup Webpack Bundler Script for WordPress
17
+ */
18
+ (window.wpackioprestoPlayeranalyticsJsonp=window.wpackioprestoPlayeranalyticsJsonp||[]).push([[1],{31:function(e,t,a){a(32),e.exports=a(46)},34:function(e,t){function a(e){return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}))}a.keys=function(){return[]},a.resolve=a,e.exports=a,a.id=34},46:function(e,t,a){"use strict";a.r(t);var r=a(24),n=a(1),c=a(6),l=a(7),o=a(4),i=a(8),s=a(15),p=a(11),d=a(5),u=a(27),m=a.n(u);function f(e){return{path:e.pathname,hash:e.hash,query:m.a.parse(e.search)}}var h=a(30),b=Object(h.a)(),y=wp.element.createContext({route:f(b.location)}),v=a(16),w=wp.element.useContext,E="";function g(e){var t=e.path,a=e.onRoute,r=e.children,n=w(y).route,c=Object(v.a)("".concat(t))("".concat(n.hash.substr(1)));return c?(a&&(E!==c.path&&a(),E=c.path),React.createElement("div",null,wp.element.cloneElement(r,{route:c}))):null}var R=a(21),O=a.n(R);wp.element.useContext;function j(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var a,r=Object(p.a)(e);if(t){var n=Object(p.a)(this).constructor;a=Reflect.construct(r,arguments,n)}else a=r.apply(this,arguments);return Object(s.a)(this,a)}}var x=function(e){Object(i.a)(a,e);var t=j(a);function a(e){var r;Object(c.a)(this,a),r=t.call(this,e),Object(d.a)(Object(o.a)(r),"handleRouteChange",(function(e){var t=f(null==e?void 0:e.location);r.setState({route:t})})),r.routes=Object.keys(e.routes).map((function(t){return e.routes[t].path})),r.unlisten=b.listen(r.handleRouteChange);var n=f(b.location);return r.state={route:n,defaultRoute:null!=e&&e.defaultRoute?"#".concat(null==e?void 0:e.defaultRoute):"#/"},r}return Object(l.a)(a,[{key:"componentWillUnmount",value:function(){this.unlisten()}},{key:"render",value:function(){var e=this.props,t=e.children,a=(e.NotFound,this.state),r=a.route,n=a.defaultRoute;if(!r.hash)return b.push(n),React.createElement("div",null);var c=!1;(this.routes||[]).forEach((function(e){var t=Object(v.a)(r.hash.substr(1))("".concat(r.hash.substr(1)));t&&(c={name:e,data:t})}));var l={route:r,matched:c},o=!c;return React.createElement(y.Provider,{value:l},o?React.createElement("div",null,"Not found"):t)}}]),a}(wp.element.Component),_=function(e){var t=e.width,a=e.height;return React.createElement("svg",{id:"e8f68bdd-4984-4f2e-95b7-7fc8ec281257","data-name":"Layer 1",width:t,height:a,xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 918.14 765.54"},React.createElement("defs",null,React.createElement("linearGradient",{id:"27aa7b70-b106-4a00-be67-693c8380e41d",x1:"397.74",y1:"717.25",x2:"397.74",y2:"86.11",gradientUnits:"userSpaceOnUse"},React.createElement("stop",{offset:"0","stop-color":"gray","stop-opacity":"0.25"}),React.createElement("stop",{offset:"0.54","stop-color":"gray","stop-opacity":"0.12"}),React.createElement("stop",{offset:"1","stop-color":"gray","stop-opacity":"0.1"})),React.createElement("linearGradient",{id:"46a816da-c484-41ec-8a6f-fbf14454d910",x1:"288.88",y1:"378.44",x2:"288.88",y2:"209.65",xlinkHref:"#27aa7b70-b106-4a00-be67-693c8380e41d"}),React.createElement("linearGradient",{id:"32b634d8-28f1-48d9-a868-f602a2cad942",x1:"288.88",y1:"328.29",x2:"288.88",y2:"223.1",xlinkHref:"#27aa7b70-b106-4a00-be67-693c8380e41d"}),React.createElement("clipPath",{id:"7a4c6aff-0be0-461b-a111-b3ae1b8fbf73",transform:"translate(-140.93 -67.23)"},React.createElement("rect",{id:"8cc91f6d-19b0-43cc-9c18-2faa83ac34ba","data-name":"<Rectangle>",x:"354.51",y:"291.55",width:"150.6",height:"101.52",fill:"#fff"})),React.createElement("linearGradient",{id:"38f1cb81-8fac-4205-a0ff-a33ac00d354c",x1:"288.88",y1:"594.94",x2:"288.88",y2:"426.14",xlinkHref:"#27aa7b70-b106-4a00-be67-693c8380e41d"}),React.createElement("linearGradient",{id:"6fc01aaf-135e-403e-a209-43b2a4fe59f1",x1:"288.88",y1:"544.79",x2:"288.88",y2:"439.6",xlinkHref:"#27aa7b70-b106-4a00-be67-693c8380e41d"}),React.createElement("clipPath",{id:"79ce363a-d134-40e4-9f82-b96d04a36978",transform:"translate(-140.93 -67.23)"},React.createElement("rect",{id:"5b44e697-61fe-43bd-9a58-5f3e41301748","data-name":"<Rectangle>",x:"354.51",y:"508.05",width:"150.6",height:"101.52",fill:"#fff"})),React.createElement("linearGradient",{id:"54803c44-522d-4b9e-9a34-f1f7b43e8483",x1:"671.57",y1:"760.34",x2:"671.57",y2:"129.2",gradientTransform:"translate(1109.43 -194.1) rotate(90)",xlinkHref:"#27aa7b70-b106-4a00-be67-693c8380e41d"}),React.createElement("linearGradient",{id:"089a6a47-adaa-499b-aefb-cd6464b62fb8",x1:"670.96",y1:"553.63",x2:"670.96",y2:"387.28",gradientTransform:"translate(1129.51 -168.41) rotate(90)",xlinkHref:"#27aa7b70-b106-4a00-be67-693c8380e41d"}),React.createElement("linearGradient",{id:"fd8d88e0-7826-450d-9e0b-001d1be709c2",x1:"637.66",y1:"754.12",x2:"637.66",y2:"601.05",xlinkHref:"#27aa7b70-b106-4a00-be67-693c8380e41d"}),React.createElement("linearGradient",{id:"8d1793c5-b76e-44e2-a52e-569460402331",x1:"778.37",y1:"673.86",x2:"778.37",y2:"569.13",xlinkHref:"#27aa7b70-b106-4a00-be67-693c8380e41d"}),React.createElement("linearGradient",{id:"4745700d-8097-45ff-9f71-625443fc4ad8",x1:"778.37",y1:"774.41",x2:"778.37",y2:"713.66",xlinkHref:"#27aa7b70-b106-4a00-be67-693c8380e41d"})),React.createElement("title",null,"secure data"),React.createElement("g",{opacity:"0.5"},React.createElement("rect",{x:"162.9",y:"86.11",width:"469.69",height:"631.14",fill:"url(#27aa7b70-b106-4a00-be67-693c8380e41d)"})),React.createElement("rect",{x:"169.02",y:"94.67",width:"455.01",height:"609.12",fill:"#f2f2f2"}),React.createElement("rect",{x:"204.49",y:"120.36",width:"156.56",height:"4.89",fill:"#e0e0e0"}),React.createElement("rect",{x:"204.49",y:"142.37",width:"156.56",height:"4.89",fill:"#6c63ff",opacity:"0.7"}),React.createElement("rect",{x:"384.29",y:"120.36",width:"156.56",height:"4.89",fill:"#e0e0e0"}),React.createElement("rect",{x:"408.75",y:"259.8",width:"156.56",height:"4.89",fill:"#e0e0e0"}),React.createElement("rect",{x:"412.42",y:"273.25",width:"156.56",height:"4.89",fill:"#e0e0e0"}),React.createElement("rect",{x:"419.76",y:"286.7",width:"156.56",height:"4.89",fill:"#e0e0e0"}),React.createElement("rect",{x:"408.75",y:"476.29",width:"156.56",height:"4.89",fill:"#e0e0e0"}),React.createElement("rect",{x:"412.42",y:"489.75",width:"156.56",height:"4.89",fill:"#e0e0e0"}),React.createElement("rect",{x:"419.76",y:"503.2",width:"156.56",height:"4.89",fill:"#e0e0e0"}),React.createElement("g",{opacity:"0.5"},React.createElement("rect",{x:"205.71",y:"209.65",width:"166.35",height:"168.79",fill:"url(#46a816da-c484-41ec-8a6f-fbf14454d910)"})),React.createElement("rect",{x:"206.76",y:"213.32",width:"163.72",height:"161.45",fill:"#f5f5f5"}),React.createElement("g",{opacity:"0.5"},React.createElement("rect",{x:"212.53",y:"223.1",width:"152.7",height:"105.19",fill:"url(#32b634d8-28f1-48d9-a868-f602a2cad942)"})),React.createElement("rect",{id:"689f37f3-cc41-448d-b172-63ec123bc985","data-name":"<Rectangle>",x:"213.58",y:"224.32",width:"150.6",height:"101.52",fill:"#fff"}),React.createElement("g",{"clip-path":"url(#7a4c6aff-0be0-461b-a111-b3ae1b8fbf73)"},React.createElement("polygon",{points:"200.82 322.18 238.74 263.46 254.64 289.15 288.88 253.68 318.24 289.15 343.93 236.56 409.98 341.75 195.93 334.41 200.82 322.18",fill:"#6c63ff",opacity:"0.4"}),React.createElement("circle",{cx:"230.17",cy:"239",r:"11.01",fill:"#6c63ff",opacity:"0.4"})),React.createElement("g",{opacity:"0.5"},React.createElement("rect",{x:"205.71",y:"426.14",width:"166.35",height:"168.79",fill:"url(#38f1cb81-8fac-4205-a0ff-a33ac00d354c)"})),React.createElement("rect",{x:"206.76",y:"429.81",width:"163.72",height:"161.45",fill:"#f5f5f5"}),React.createElement("g",{opacity:"0.5"},React.createElement("rect",{x:"212.53",y:"439.6",width:"152.7",height:"105.19",fill:"url(#6fc01aaf-135e-403e-a209-43b2a4fe59f1)"})),React.createElement("rect",{id:"b429ac3a-f8a8-4171-bcce-5b6c002c0714","data-name":"<Rectangle>",x:"213.58",y:"440.82",width:"150.6",height:"101.52",fill:"#fff"}),React.createElement("g",{"clip-path":"url(#79ce363a-d134-40e4-9f82-b96d04a36978)"},React.createElement("polygon",{points:"200.82 538.67 238.74 479.96 254.64 505.65 288.88 470.18 318.24 505.65 343.93 453.05 409.98 558.24 195.93 550.9 200.82 538.67",fill:"#bdbdbd",opacity:"0.4"}),React.createElement("circle",{cx:"230.17",cy:"455.5",r:"11.01",fill:"#bdbdbd",opacity:"0.4"})),React.createElement("g",{opacity:"0.5"},React.createElement("rect",{x:"349.09",y:"242.63",width:"631.14",height:"469.69",transform:"translate(-74.16 969.06) rotate(-78.76)",fill:"url(#54803c44-522d-4b9e-9a34-f1f7b43e8483)"})),React.createElement("rect",{x:"359.37",y:"247.33",width:"609.12",height:"455.01",transform:"translate(-72.16 966.22) rotate(-78.76)",fill:"#fff"}),React.createElement("rect",{x:"523.5",y:"197.22",width:"322.91",height:"4.89",transform:"translate(-88.86 -196.94) rotate(11.24)",fill:"#e0e0e0"}),React.createElement("rect",{x:"433.36",y:"650.7",width:"322.91",height:"4.89",transform:"translate(-2.18 -170.66) rotate(11.24)",fill:"#e0e0e0"}),React.createElement("rect",{x:"428.58",y:"671.14",width:"249.52",height:"4.89",transform:"translate(1.01 -162.18) rotate(11.24)",fill:"#e0e0e0"}),React.createElement("rect",{x:"424.6",y:"683.47",width:"92.96",height:"4.89",transform:"translate(1.84 -145.91) rotate(11.24)",fill:"#6c63ff",opacity:"0.7"}),React.createElement("rect",{x:"519.57",y:"209.08",width:"161.45",height:"4.89",transform:"translate(-88.17 -180.2) rotate(11.24)",fill:"#6c63ff",opacity:"0.7"}),React.createElement("rect",{x:"512.84",y:"249.31",width:"291.11",height:"4.89",transform:"translate(-79.21 -190.76) rotate(11.24)",fill:"#e0e0e0"}),React.createElement("rect",{x:"509.47",y:"255.44",width:"70.94",height:"4.89",transform:"translate(-80.19 -168.52) rotate(11.24)",fill:"#3ad29f",opacity:"0.7"}),React.createElement("rect",{x:"501.56",y:"307.59",width:"322.91",height:"4.89",transform:"translate(-67.76 -190.54) rotate(11.24)",fill:"#e0e0e0"}),React.createElement("g",{opacity:"0.5"},React.createElement("rect",{x:"575.87",y:"357.6",width:"166.35",height:"289.88",transform:"translate(-103.27 983.74) rotate(-78.76)",fill:"url(#089a6a47-adaa-499b-aefb-cd6464b62fb8)"})),React.createElement("rect",{x:"516.06",y:"420.61",width:"286.22",height:"162.68",transform:"translate(-30.42 -186.11) rotate(11.24)",fill:"#fff"}),React.createElement("rect",{x:"496.08",y:"335.18",width:"322.91",height:"4.89",transform:"translate(-62.49 -188.94) rotate(11.24)",fill:"#e0e0e0"}),React.createElement("rect",{x:"547.86",y:"424.02",width:"35.47",height:"118.64",transform:"translate(-35.84 -168.22) rotate(11.24)",fill:"#6c63ff"}),React.createElement("rect",{x:"606.43",y:"475.19",width:"35.47",height:"79.5",transform:"translate(-28.56 -179.03) rotate(11.24)",fill:"#3ad29f"}),React.createElement("rect",{x:"665.23",y:"523.93",width:"35.47",height:"42.81",transform:"translate(-21.5 -189.92) rotate(11.24)",fill:"#f55f44"}),React.createElement("rect",{x:"731.91",y:"492.72",width:"35.47",height:"86.84",transform:"translate(-22.02 -203.09) rotate(11.24)",fill:"#fdd835"}),React.createElement("g",{opacity:"0.5"},React.createElement("rect",{x:"128.65",y:"645.09",width:"3.67",height:"20.79",fill:"#47e6b1"}),React.createElement("rect",{x:"269.58",y:"712.31",width:"3.67",height:"20.79",transform:"translate(853.2 384.07) rotate(90)",fill:"#47e6b1"})),React.createElement("path",{d:"M699.44,75.56a4.49,4.49,0,0,1-2.5-5.43,2.16,2.16,0,0,0,.1-.5h0a2.25,2.25,0,0,0-4-1.49h0a2.16,2.16,0,0,0-.25.44,4.49,4.49,0,0,1-5.43,2.5,2.16,2.16,0,0,0-.5-.1h0a2.25,2.25,0,0,0-1.49,4h0a2.16,2.16,0,0,0,.44.25,4.49,4.49,0,0,1,2.5,5.43,2.16,2.16,0,0,0-.1.5h0a2.25,2.25,0,0,0,4,1.49h0a2.16,2.16,0,0,0,.25-.44,4.49,4.49,0,0,1,5.43-2.5,2.16,2.16,0,0,0,.5.1h0a2.25,2.25,0,0,0,1.49-4h0A2.16,2.16,0,0,0,699.44,75.56Z",transform:"translate(-140.93 -67.23)",fill:"#4d8af0",opacity:"0.5"}),React.createElement("path",{d:"M286.33,179.4a4.49,4.49,0,0,1-2.5-5.43,2.16,2.16,0,0,0,.1-.5h0a2.25,2.25,0,0,0-4-1.49h0a2.16,2.16,0,0,0-.25.44,4.49,4.49,0,0,1-5.43,2.5,2.16,2.16,0,0,0-.5-.1h0a2.25,2.25,0,0,0-1.49,4h0a2.16,2.16,0,0,0,.44.25,4.49,4.49,0,0,1,2.5,5.43,2.16,2.16,0,0,0-.1.5h0a2.25,2.25,0,0,0,4,1.49h0a2.16,2.16,0,0,0,.25-.44,4.49,4.49,0,0,1,5.43-2.5,2.16,2.16,0,0,0,.5.1h0a2.25,2.25,0,0,0,1.49-4h0A2.16,2.16,0,0,0,286.33,179.4Z",transform:"translate(-140.93 -67.23)",fill:"#fdd835",opacity:"0.5"}),React.createElement("path",{d:"M253.63,484.46a4.49,4.49,0,0,1-2.5-5.43,2.16,2.16,0,0,0,.1-.5h0a2.25,2.25,0,0,0-4-1.49h0a2.16,2.16,0,0,0-.25.44,4.49,4.49,0,0,1-5.43,2.5,2.16,2.16,0,0,0-.5-.1h0a2.25,2.25,0,0,0-1.49,4h0a2.16,2.16,0,0,0,.44.25,4.49,4.49,0,0,1,2.5,5.43,2.16,2.16,0,0,0-.1.5h0a2.25,2.25,0,0,0,4,1.49h0a2.16,2.16,0,0,0,.25-.44,4.49,4.49,0,0,1,5.43-2.5,2.16,2.16,0,0,0,.5.1h0a2.25,2.25,0,0,0,1.49-4h0A2.16,2.16,0,0,0,253.63,484.46Z",transform:"translate(-140.93 -67.23)",fill:"#fdd835",opacity:"0.5"}),React.createElement("circle",{cx:"337.81",cy:"28.62",r:"7.34",fill:"#f55f44",opacity:"0.5"}),React.createElement("circle",{cx:"7.34",cy:"317.46",r:"7.34",fill:"#f55f44",opacity:"0.5"}),React.createElement("circle",{cx:"863.76",cy:"120.36",r:"7.34",fill:"#f55f44",opacity:"0.5"}),React.createElement("circle",{cx:"822.17",cy:"339.3",r:"7.34",fill:"#4d8af0",opacity:"0.5"}),React.createElement("circle",{cx:"37.68",cy:"145.22",r:"7.34",fill:"#47e6b1",opacity:"0.5"}),React.createElement("circle",{cx:"853.29",cy:"647.34",r:"7.34",fill:"#47e6b1",opacity:"0.5"}),React.createElement("circle",{cx:"910.8",cy:"430.97",r:"7.34",fill:"#47e6b1",opacity:"0.5"}),React.createElement("rect",{x:"544.42",y:"601.05",width:"186.48",height:"153.07",fill:"url(#fd8d88e0-7826-450d-9e0b-001d1be709c2)"}),React.createElement("path",{d:"M723.82,639a54.55,54.55,0,0,1,109.1,0v34.91h15.27V639a69.82,69.82,0,0,0-139.65,0v34.91h15.27Z",transform:"translate(-140.93 -67.23)",fill:"url(#8d1793c5-b76e-44e2-a52e-569460402331)"}),React.createElement("path",{d:"M726,638.25a52.37,52.37,0,1,1,104.74,0v33.52H845.4V638.25a67,67,0,0,0-134.06,0v33.52H726Z",transform:"translate(-140.93 -67.23)",fill:"#f5f5f5"}),React.createElement("rect",{x:"546.32",y:"602.45",width:"182.24",height:"148.73",fill:"#6c63ff"}),React.createElement("rect",{x:"546.32",y:"602.45",width:"182.24",height:"148.73",fill:"#f5f5f5"}),React.createElement("rect",{x:"546.32",y:"631.77",width:"182.24",height:"90.07",fill:"#6c63ff"}),React.createElement("path",{d:"M791.73,727a13.36,13.36,0,1,0-23.08,9.15v28.51a9.72,9.72,0,0,0,19.44,0V736.18A13.3,13.3,0,0,0,791.73,727Z",transform:"translate(-140.93 -67.23)",fill:"url(#4745700d-8097-45ff-9f71-625443fc4ad8)"}),React.createElement("path",{d:"M789.89,729.38a11.52,11.52,0,1,0-19.9,7.89v24.58a8.38,8.38,0,1,0,16.76,0V737.27A11.47,11.47,0,0,0,789.89,729.38Z",transform:"translate(-140.93 -67.23)",opacity:"0.2"}))},D=wp.i18n.__,P=wp.components,k=P.Flex,N=P.FlexItem,S=P.FlexBlock,F=function(){return React.createElement(k,{style:{padding:"30px",background:"#fff"}},React.createElement(N,null,React.createElement(_,{width:"250px"})),React.createElement(S,{style:{marginLeft:"20px"}},React.createElement("h1",null,D("Get detailed video insights.","presto-player")),React.createElement("p",null,D("Upgrade to Pro and get video insights like plays, watch-time, and drop off numbers.","presto-player")),React.createElement("a",{href:"https://prestoplayer.com",target:"_blank",className:"button button-primary"},D("Learn More","presto-player"))))},C=a(3),T=a(0),M=a.n(T);function I(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function B(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?I(Object(a),!0).forEach((function(t){Object(d.a)(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):I(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}wp.i18n.__;var V=wp.apiFetch,A=wp.element.useState,H=wp.compose.createHigherOrderComponent,G=function(){return H((function(e){return function(t){var a=A(!1),r=Object(n.a)(a,2),c=r[0],l=r[1],o=A(1),i=Object(n.a)(o,2),s=i[0],p=i[1],d=A(0),u=Object(n.a)(d,2),m=u[0],f=u[1],h=A(0),b=Object(n.a)(h,2),y=b[0],v=b[1],w=A([]),E=Object(n.a)(w,2),g=E[0],R=E[1],O=A(""),j=Object(n.a)(O,2),x=j[0],_=j[1],D=function(){var e=Object(C.a)(M.a.mark((function e(t){var a,r,n,c;return M.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.endpoint,r=t.params,n=void 0===r?{}:r,l(!0),e.prev=2,e.next=5,V({path:wp.url.addQueryArgs(a,B({page:s,per_page:5},n)),parse:!1}).then((function(e){var t=e.headers?parseInt(e.headers.get("X-WP-Total")):0,a=e.headers?parseInt(e.headers.get("X-WP-TotalPages")):0;return f(t),v(a),e.json()}));case 5:c=e.sent,R(c),e.next=13;break;case 9:e.prev=9,e.t0=e.catch(2),console.error(e.t0),null!==e.t0&&void 0!==e.t0&&e.t0.message&&_(e.t0.message);case 13:return e.prev=13,l(!1),e.finish(13);case 16:case"end":return e.stop()}}),e,null,[[2,9,13,16]])})));return function(t){return e.apply(this,arguments)}}();return React.createElement(e,Object.assign({loading:c,setLoading:l,fetchData:D,page:s,setPage:p,total:m,setTotal:f,totalPages:y,setTotalPages:v,data:g,setData:R,error:x,setError:_},t))}}),"withDataList")},U=wp.i18n,L=U.__,W=U.sprintf,Z=function(e){var t=(new Date).getTimezoneOffset();return new Date(e.getTime()-60*t*1e3).toISOString().split("T")[0]+"T00:00:00.000Z"},Y=wp.components,z=Y.Spinner,Q=Y.Flex,X=Y.FlexItem,q=function(e){var t=e.height,a=void 0===t?100:t;return React.createElement(Q,{style:{height:"".concat(a,"px")},align:"center",justify:"center"},React.createElement(X,null,React.createElement(z,null)))},J=wp.i18n.__,K=wp.components,$=K.Card,ee=K.CardBody,te=K.Flex,ae=K.FlexBlock,re=K.Button,ne=K.ButtonGroup,ce=wp.element,le=ce.useState,oe=ce.useEffect,ie=function(e){var t=e.page,a=e.setPage,r=e.perPage,c=e.total,l=e.totalPages,o=le(!1),i=Object(n.a)(o,2),s=i[0],p=i[1],d=le(!1),u=Object(n.a)(d,2),m=u[0],f=u[1],h=le(0),b=Object(n.a)(h,2),y=b[0],v=b[1],w=le(0),E=Object(n.a)(w,2),g=E[0],R=E[1];oe((function(){v(Math.min(r*t,c)),R(r*(t-1)+1)}),[r,t,c]);return oe((function(){p(t-1>0),f(l>=t+1)}),[t,l]),React.createElement($,{size:"large",className:"presto-card pagination"},React.createElement(ee,{className:"presto-flow"},React.createElement(te,null,React.createElement(ae,null,sprintf(J("Showing %1s to %2s of %3s","presto-player"),g,y,c)),React.createElement(ae,null,React.createElement(te,{justify:"flex-end"},React.createElement(ne,null,React.createElement(re,{isSecondary:!0,disabled:!s,onClick:function(){a(Math.max(t-1,0))}},J("Previous","presto-player")),React.createElement(re,{isSecondary:!0,disabled:!m,onClick:function(){a(Math.min(l,t+1))}},J("Next","presto-player"))))))))},se=wp.i18n.__,pe=wp.element,de=(pe.useRef,pe.useEffect,pe.useState,wp.components),ue=de.Card,me=de.CardBody,fe=(de.Flex,de.FlexBlock,de.Button,de.ButtonGroup,function(e){var t=e.columns,a=e.data,r=e.onRowClick,n=e.title;return a.length?React.createElement(ue,{size:"large",className:"presto-card table-card"},React.createElement(me,{className:"presto-flow"},React.createElement("div",{className:"presto-card__title"},n),React.createElement("table",{role:"table",className:O()("presto-table",{"is-clickable":r})},React.createElement("thead",{role:"rowgroup"},React.createElement("tr",{role:"row"},t&&t.map((function(e){return React.createElement("th",{key:e.key,role:"columnheader"},e.label)})))),React.createElement("tbody",{role:"rowgroup"},a.map((function(e,a){return React.createElement("tr",{role:"row",key:"row-".concat(a),onClick:function(){return r&&r(e)}},t.map((function(t,r){return React.createElement("td",{role:"cell","data-title":t.label,key:"row-".concat(a,"-").concat(r),"aria-label":t.label},t.render?t.render(e):React.createElement("div",null,t.value(e)))})))})))))):React.createElement(ue,{size:"large",className:"presto-card table-card"},React.createElement(me,{className:"presto-flow"},React.createElement("div",{className:"presto-card__title"},n),React.createElement("div",{style:{opacity:.65}},se("No data available.","presto-player"))))}),he=wp.i18n.__,be=wp.element,ye=(be.useEffect,be.useState,wp.components),ve=ye.Card,we=ye.CardBody,Ee=function(e){var t=e.perPage,a=void 0===t?10:t,r=e.title,n=e.page,c=e.setPage,l=e.loading,o=e.total,i=e.totalPages,s=e.columns,p=e.data,d=e.onSelect;return l?React.createElement(ve,null,React.createElement(q,null)):null!=p&&p.length?React.createElement("div",{className:"datatable"},React.createElement(fe,{data:p,columns:s,perPage:a,onRowClick:d,title:r}),!!o&&React.createElement(ie,{page:n,setPage:c,perPage:a,total:o,totalPages:i})):React.createElement(ve,{size:"large",className:"presto-card"},React.createElement(we,{className:"presto-flow"},React.createElement("div",{className:"presto-card__title"},r),React.createElement("div",{style:{opacity:.65}},he("No data available.","presto-player"))))};function ge(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function Re(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?ge(Object(a),!0).forEach((function(t){Object(d.a)(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):ge(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var Oe=wp.i18n.__,je=wp.element.useEffect,xe=(0,wp.compose.compose)([G()])((function(e){var t=e.loading,a=e.page,r=e.setPage,n=e.total,c=e.totalPages,l=e.data,o=e.error,i=e.fetchData,s=e.startDate,p=e.endDate;je((function(){i({endpoint:"/presto-player/v1/analytics/top-users",params:Re(Re({per_page:5},s?{start:Z(s)}:{}),p?{end:Z(p)}:{})})}),[a,s,p]);var d=[{key:"name",label:Oe("Name","presto-player"),value:function(e){var t;return null==e||null===(t=e.user)||void 0===t?void 0:t.name}},{key:"total_view",label:Oe("Total View","presto-player"),value:function(e){var t,a;return null==e||null===(t=e.stats)||void 0===t||null===(a=t[0])||void 0===a?void 0:a.data}},{key:"avg_view_time",label:Oe("Avg View Time","presto-player"),render:function(e){var t,a;return React.createElement("div",{className:"presto-badge"},null==e||null===(t=e.stats)||void 0===t||null===(a=t[1])||void 0===a?void 0:a.data)}}];return o?{error:o}:React.createElement(Ee,{title:Oe("Top Users","presto-player"),page:a,perPage:5,setPage:r,loading:t,total:n,totalPages:c,columns:d,data:l,onSelect:function(e){var t,a;return a=null==e||null===(t=e.user)||void 0===t?void 0:t.id,void b.push("#/user/".concat(a))}})}));function _e(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function De(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?_e(Object(a),!0).forEach((function(t){Object(d.a)(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):_e(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var Pe=wp.i18n.__,ke=wp.element.useEffect,Ne=(0,wp.compose.compose)([G()])((function(e){var t=e.loading,a=e.page,r=e.setPage,n=e.total,c=e.totalPages,l=e.data,o=e.error,i=e.fetchData,s=e.startDate,p=e.endDate,d=e.userId;ke((function(){i({endpoint:"/presto-player/v1/analytics/top-videos",params:De(De(De({per_page:10},s?{start:Z(s)}:{}),p?{end:Z(p)}:{}),d?{user_id:d}:{})})}),[a,s,p]);var u=[{key:"name",label:Pe("Name","presto-player"),render:function(e){return React.createElement("h3",{style:{marginBottom:0,wordBreak:"break-all"}},e.video.title?e.video.title:Pe("Untitled","presto-player"))}},{key:"total_view",label:Pe("Total View","presto-player"),value:function(e){return e.stats[0].data}},{key:"avg_view_time",label:Pe("Avg View Time","presto-player"),render:function(e){return React.createElement("div",{className:"presto-badge"},e.stats[1].data)}},{key:"view_more",label:"",render:function(e){return React.createElement("span",{style:{color:"var(--wp-admin-theme-color, #007cba)"}},Pe("View Details","presto-player")," →")}}];return o?{error:o}:React.createElement(Ee,{title:Pe("Top Videos","presto-player"),perPage:10,page:a,setPage:r,loading:t,total:n,totalPages:c,columns:u,data:l,onSelect:function(e){var t,a;a=null==e||null===(t=e.video)||void 0===t?void 0:t.id,b.push("#/video/".concat(a))}})})),Se=wp.apiFetch;Se.use(Se.createNonceMiddleware(prestoPlayer.nonce)),Se.use(Se.createRootURLMiddleware(prestoPlayer.root+prestoPlayer.prestoVersionString));var Fe=Se,Ce=a(17),Te=a.n(Ce);function Me(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function Ie(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?Me(Object(a),!0).forEach((function(t){Object(d.a)(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):Me(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var Be=wp.i18n,Ve=Be.__,Ae=Be.sprintf,He=wp.components,Ge=(He.Card,He.CardBody),Ue=wp.element,Le=Ue.useState,We=Ue.useEffect,Ze=(Ue.useRef,function(e){var t=Le(!0),a=Object(n.a)(t,2),r=a[0],c=a[1],l=Le(0),o=Object(n.a)(l,2),i=o[0],s=o[1],p=e.startDate,d=e.endDate,u=Le([{name:"Views",data:[]}]),m=Object(n.a)(u,2),f=m[0],h=m[1],b={options:{chart:{toolbar:{show:!1}},yaxis:{min:0,labels:{formatter:function(e){return e<1?0:Math.abs(e)>999?Math.sign(e)*(Math.abs(e)/1e3).toFixed(1)+"k":Math.sign(e)*Math.abs(e).toFixed(0)}}},colors:["#7c3aed"],xaxis:{type:"datetime",min:new Date(p).setHours(0,0,0,0),max:new Date(d).setHours(23,59,59,999)},dataLabels:{enabled:!1},stroke:{curve:"smooth"},fill:{type:"gradient",gradient:{shadeIntensity:1,opacityFrom:.7,opacityTo:.9,stops:[0,90,100]}}}};We((function(){y()}),[e]);var y=function(){c(!0),Fe({path:"/presto-player/v1/analytics/views?"+jQuery.param(Ie(Ie({},p?{start:Z(p)}:{}),d?{end:Z(d)}:{})),parse:!1}).then(function(){var e=Object(C.a)(M.a.mark((function e(t){var a,r;return M.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s(t.headers&&t.headers.get("X-WP-Total")),e.next=3,t.json();case 3:a=e.sent,r=[],a.length&&a.forEach((function(e){r.push({x:e.date_time,y:e.total})})),h([{name:"Views",data:r}]);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){console.error(e)})).finally((function(){c(!1)}))};return r?React.createElement(Ge,null,React.createElement(q,null)):React.createElement(Ge,{className:"presto-flow"},React.createElement("div",{className:"presto-card__title"},Ae(Ve("%d Unique Views","presto-player"),i)),React.createElement(Te.a,{options:b.options,series:f,type:"area",height:280}))}),Ye=wp.i18n,ze=Ye.__,Qe=Ye.sprintf,Xe=wp.components,qe=(Xe.Card,Xe.CardBody),Je=wp.element,Ke=Je.useState,$e=Je.useEffect,et=(Je.useRef,function(e){var t=Ke(!0),a=Object(n.a)(t,2),r=a[0],c=a[1],l=Ke(0),o=Object(n.a)(l,2),i=o[0],s=o[1],p=e.startDate,d=e.endDate,u=Ke([{name:"Views",data:[]}]),m=Object(n.a)(u,2),f=m[0],h=m[1],b={options:{chart:{toolbar:{show:!1}},yaxis:{labels:{formatter:function(e){return Math.abs(e)>999?Math.sign(e)*(Math.abs(e)/1e3).toFixed(1)+"k min":(Math.sign(e)*Math.abs(e)).toFixed(1)+"min"}}},colors:["#7c3aed"],xaxis:{type:"datetime",min:new Date(p).setHours(0,0,0,0),max:new Date(d).setHours(23,59,59,999)},dataLabels:{enabled:!1},stroke:{curve:"smooth"},fill:{type:"gradient",gradient:{shadeIntensity:1,opacityFrom:.7,opacityTo:.9,stops:[0,90,100]}}}};$e((function(){R()}),[e]);var y,v,w,E,g,R=function(){c(!0),Fe({path:"/presto-player/v1/analytics/watch-time?"+jQuery.param({start:Z(p),end:Z(d)}),parse:!1}).then(function(){var e=Object(C.a)(M.a.mark((function e(t){var a,r,n,c;return M.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.json();case 2:a=e.sent,r=a.data,n=a.average,s(parseFloat(n)),c=[],r.length&&r.forEach((function(e){c.push({x:e.date_time,y:(e.total/60).toFixed(2)})})),h([{name:"Watch Time",data:c}]);case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){console.error(e)})).finally((function(){c(!1)}))};return r?React.createElement(qe,null,React.createElement(q,null)):React.createElement(qe,{className:"presto-flow"},React.createElement("div",{className:"presto-card__title"},Qe(ze("%s average watch time","presto-player"),(y=i,v=Math.floor(y/60/60),w=Math.floor(y/60)-60*v,E=y%60,g="",v&&(g+=W(L("%d hours","presto-player"),v)+", "),w&&(g+=W(L("%d minutes","presto-player"),w)+" "),(v||w)&&E&&(g+=L("and","presto-player")+" "),g+=W(L("%d seconds","presto-player"),E)))),React.createElement(Te.a,{options:b.options,series:f,type:"area",height:280}))}),tt=wp.i18n.__,at=wp.components,rt=at.Panel,nt=at.TabPanel,ct=function(e){var t=e.startDate,a=e.endDate;return React.createElement(rt,null,React.createElement(nt,{className:"presto-module-tabs",onSelect:function(){},tabs:[{name:"views",title:tt("Views","presto-player")},{name:"watch",title:tt("Watch Time","presto-player")}]},(function(e){switch(e.name){case"views":return React.createElement(Ze,{startDate:t,endDate:a});case"watch":return React.createElement(et,{startDate:t,endDate:a});default:return React.createElement(React.Fragment,null,"Not Found")}})))},lt=a(28),ot=a.n(lt),it=(a(41),wp.i18n.__),st=wp.element,pt=st.useRef,dt=st.useEffect,ut=st.useState,mt=function(e){var t=e.startDate,a=e.setStartDate,r=e.endDate,c=e.setEndDate,l=pt(),o=ut(25),i=Object(n.a)(o,2),s=i[0],p=i[1];return dt((function(){new ot.a({element:null==l?void 0:l.current,singleMode:!1,format:"MMMM D YYYY",autoApply:!1,plugins:["ranges"],maxDate:new Date,numberOfMonths:2,buttonText:{apply:it("Apply","presto-player"),cancel:it("Cancel","presto-player")},dropdowns:{minYear:1990,maxYear:null,months:!0,years:!0},setup:function(e){e.setDateRange(t,r),e.on("button:apply",(function(e,t){a(e.dateInstance),c(t.dateInstance),p(l.current.value.length)}))}})}),[l]),React.createElement("div",{className:"component-base-control"},React.createElement("div",{className:"components-base-control__field"},React.createElement("input",{className:"components-text-control__input presto-settings__date-select",ref:l,size:s})))},ft=wp.i18n.__,ht=wp.components,bt=ht.Flex,yt=ht.FlexBlock,vt=ht.FlexItem,wt=(wp.element.useState,function(e){var t=e.startDate,a=e.endDate,r=e.setStartDate,n=e.setEndDate;return React.createElement(React.Fragment,null,React.createElement(bt,null,React.createElement(yt,null,React.createElement("h1",null,ft("Analytics","presto-player"))),React.createElement(vt,null,React.createElement(mt,{startDate:t,setStartDate:r,endDate:a,setEndDate:n}))),React.createElement("div",{className:"presto-flow"},React.createElement("div",{className:"presto-dashboard"},React.createElement("div",{className:"presto-dashboard__row"},React.createElement("div",{className:"presto-dashboard__item is-large"},React.createElement(ct,{startDate:t,endDate:a})),React.createElement("div",{className:"presto-dashboard__item"},React.createElement(xe,{startDate:t,endDate:a}))),React.createElement("div",{className:"presto-dashboard__row"},React.createElement("div",{className:"presto-dashboard__item is-large"},React.createElement(Ne,{startDate:t,endDate:a}))))))}),Et=a(22),gt=wp.components,Rt=gt.Card,Ot=gt.CardBody,jt=function(e){var t=e.loading,a=e.title,r=e.value,n=e.label;return t?React.createElement(Rt,null,React.createElement(Ot,null,React.createElement(q,null))):React.createElement(Rt,{className:"presto-player__stat-card"},React.createElement(Ot,null,React.createElement("div",{className:"presto-subtitle"},a),React.createElement("h1",null,r),React.createElement("div",null,n)))};function xt(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function _t(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?xt(Object(a),!0).forEach((function(t){Object(d.a)(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):xt(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var Dt,Pt,kt,Nt=wp.apiFetch,St=wp.element.useState,Ft=wp.compose.createHigherOrderComponent,Ct=function(){return Ft((function(e){return function(t){var a=St(!1),r=Object(n.a)(a,2),c=r[0],l=r[1],o=St([]),i=Object(n.a)(o,2),s=i[0],p=i[1],d=St(""),u=Object(n.a)(d,2),m=u[0],f=u[1],h=function(){var e=Object(C.a)(M.a.mark((function e(t){var a,r,n,c;return M.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.endpoint,r=t.params,n=void 0===r?{}:r,l(!0),e.prev=2,e.next=5,Nt({path:wp.url.addQueryArgs(a,_t({},n))});case 5:c=e.sent,p(c),e.next=13;break;case 9:e.prev=9,e.t0=e.catch(2),console.error(e.t0),null!==e.t0&&void 0!==e.t0&&e.t0.message&&f(e.t0.message);case 13:return e.prev=13,l(!1),e.finish(13);case 16:case"end":return e.stop()}}),e,null,[[2,9,13,16]])})));return function(t){return e.apply(this,arguments)}}();return React.createElement(e,Object.assign({loading:c,setLoading:l,fetchData:h,stat:s,setStat:p,error:m,setError:f},t))}}),"withStat")},Tt=wp.i18n.__,Mt=wp.compose.compose,It=wp.element.useEffect,Bt=Mt([Ct()])((function(e){var t=e.userId,a=e.startDate,r=e.endDate,n=e.stat,c=e.fetchData,l=e.loading;return It((function(){c({endpoint:"/presto-player/v1/analytics/user/".concat(t,"/total-views"),params:{start:Z(a),end:Z(r)}})}),[a,r]),React.createElement(jt,{loading:l,value:parseInt(null==n?void 0:n.view),title:Tt("Total Views","presto-player")})})),Vt=wp.i18n.__,At=wp.compose.compose,Ht=wp.element.useEffect,Gt=At([Ct()])((function(e){var t=e.userId,a=e.startDate,r=e.endDate,n=e.stat,c=e.fetchData,l=e.loading;return Ht((function(){c({endpoint:"/presto-player/v1/analytics/user/".concat(t,"/average-watchtime"),params:{start:Z(a),end:Z(r)}})}),[a,r]),React.createElement(jt,{loading:l,value:parseFloat(null==n?void 0:n.view).toFixed(2),title:Vt("Average Watch Time","presto-player"),label:Vt("seconds","presto-player")})})),Ut=wp.i18n.__,Lt=wp.compose.compose,Wt=wp.element.useEffect,Zt=Lt([Ct()])((function(e){var t=e.userId,a=e.startDate,r=e.endDate,n=e.stat,c=e.fetchData,l=e.loading;return Wt((function(){c({endpoint:"/presto-player/v1/analytics/user/".concat(t,"/total-watchtime"),params:{start:Z(a),end:Z(r)}})}),[a,r]),React.createElement(jt,{loading:l,value:parseFloat(null==n?void 0:n.view).toFixed(2),title:Ut("Total Watch Time","presto-player"),label:Ut("seconds","presto-player")})})),Yt=a(2),zt=wp.i18n.__,Qt=wp.components,Xt=Qt.Flex,qt=Qt.FlexBlock,Jt=Qt.FlexItem,Kt=Qt.Spinner,$t=Qt.Button,ea=wp.element,ta=ea.useEffect,aa=ea.useState,ra=wp.apiFetch,na=function(e){var t,a,r,c,l=e.route,o=e.startDate,i=e.endDate,s=e.setStartDate,p=e.setEndDate,d=aa(!0),u=Object(n.a)(d,2),m=u[0],f=u[1],h=aa({}),y=Object(n.a)(h,2),v=y[0],w=y[1],E=aa(""),g=Object(n.a)(E,2),R=g[0],O=g[1],j=function(){var e=Object(C.a)(M.a.mark((function e(){var t,a;return M.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return f(!0),e.prev=1,e.next=4,ra({url:"/wp-json/wp/v2/users/".concat(null==l||null===(t=l.params)||void 0===t?void 0:t.id,"?context=edit")});case 4:a=e.sent,w(a),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),"rest_no_route"===e.t0.code&&O("User Not Found");case 11:return e.prev=11,f(!1),e.finish(11);case 14:case"end":return e.stop()}}),e,null,[[1,8,11,14]])})));return function(){return e.apply(this,arguments)}}();return ta((function(){j()}),[]),R?Object(Yt.b)("div",{className:"presto-flow"},Object(Yt.b)(Xt,null,Object(Yt.b)(qt,null,Object(Yt.b)("h2",null,R)))):Object(Yt.b)("div",{className:"presto-flow"},Object(Yt.b)(Xt,null,Object(Yt.b)(qt,null,Object(Yt.b)($t,{isSecondary:!0,onClick:function(){b.push("#/")}},"← ",zt("Back to Dashboard","presto-player")))),Object(Yt.b)(Xt,{wrap:!0},Object(Yt.b)(qt,null,m?Object(Yt.b)(Kt,null):Object(Yt.b)("div",{css:Object(Yt.a)(Dt||(Dt=Object(Et.a)(["\n display: flex;\n align-items: center;\n\n .presto__edit-user-button {\n opacity: 0;\n visibility: hidden;\n transition: opacity 0.3s ease;\n }\n\n &:hover {\n .presto__edit-user-button {\n opacity: 1;\n visibility: visible;\n }\n }\n "])))},Object(Yt.b)("div",null,Object(Yt.b)("h1",{className:"presto-dashboard__title"},null==v?void 0:v.name),Object(Yt.b)("p",{css:Object(Yt.a)(Pt||(Pt=Object(Et.a)(["\n margin-top: -10px;\n opacity: 0.65;\n "])))},null==v?void 0:v.email)),!!v.id&&Object(Yt.b)("div",{className:"presto__edit-user-button",css:Object(Yt.a)(kt||(kt=Object(Et.a)(["\n margin: 0 20px;\n "])))},Object(Yt.b)($t,{href:"/wp-admin/user-edit.php?user_id=".concat(null==v?void 0:v.id),isSecondary:!0,isSmall:!0},zt("View Profile","presto-player")," →")))),Object(Yt.b)(Jt,null,Object(Yt.b)(mt,{startDate:o,setStartDate:s,endDate:i,setEndDate:p}))),Object(Yt.b)("div",{className:"presto-dashboard presto-flow"},Object(Yt.b)("div",{className:"presto-dashboard__row"},Object(Yt.b)("div",{className:"presto-dashboard__item"},Object(Yt.b)(Bt,{userId:null==l||null===(t=l.params)||void 0===t?void 0:t.id,startDate:o,endDate:i})),Object(Yt.b)("div",{className:"presto-dashboard__item"},Object(Yt.b)(Gt,{userId:null==l||null===(a=l.params)||void 0===a?void 0:a.id,startDate:o,endDate:i})),Object(Yt.b)("div",{className:"presto-dashboard__item"},Object(Yt.b)(Zt,{userId:null==l||null===(r=l.params)||void 0===r?void 0:r.id,startDate:o,endDate:i}))),Object(Yt.b)("div",{className:"presto-dashboard__row"},Object(Yt.b)("div",{className:"presto-dashboard__item is-large"},Object(Yt.b)(Ne,{startDate:o,endDate:i,userId:null==l||null===(c=l.params)||void 0===c?void 0:c.id})))))},ca=wp.i18n.__,la=wp.compose.compose,oa=wp.element.useEffect,ia=la([Ct()])((function(e){var t=e.video_id,a=e.startDate,r=e.endDate,n=e.stat,c=e.fetchData,l=e.loading;return oa((function(){c({endpoint:"/presto-player/v1/analytics/video/".concat(t,"/average-watchtime"),params:{start:Z(a),end:Z(r)}})}),[a,r]),React.createElement(jt,{loading:l,value:parseInt(n),title:ca("Average Watch Time","presto-player"),label:ca("seconds","presto-player")})})),sa=wp.i18n,pa=sa.__,da=(sa.sprintf,wp.components),ua=da.Card,ma=da.CardBody,fa=wp.element,ha=fa.useState,ba=fa.useEffect,ya=(fa.useRef,function(e){var t=e.video_id,a=e.startDate,r=e.endDate,c=ha(!0),l=Object(n.a)(c,2),o=l[0],i=l[1],s=ha([{name:"Views",data:[]}]),p=Object(n.a)(s,2),d=p[0],u=p[1];ba((function(){i(!0),Fe({path:wp.url.addQueryArgs("/presto-player/v1/analytics/video/".concat(t,"/timeline"),{start:Z(a),end:Z(r)})}).then((function(e){var t=[];e.length&&e.forEach((function(e){t.push({x:e.watch_time,y:e.total})})),u([{name:"Viewers",data:t}])})).catch((function(e){console.error(e)})).finally((function(){i(!1)}))}),[a,r]);var m={options:{chart:{toolbar:{show:!1}},tickAmount:1,yaxis:{labels:{formatter:function(e){return parseInt(e)}}},xaxis:{labels:{formatter:function(e){return t=e,t=1e3*parseInt(t||0),new Date(t).toISOString().substr(11,8);var t}}},colors:["#7c3aed"],dataLabels:{enabled:!1},stroke:{curve:"smooth"},fill:{type:"gradient",gradient:{shadeIntensity:1,opacityFrom:.7,opacityTo:.9,stops:[0,90,100]}}}};return o?React.createElement(ua,null,React.createElement(ma,null,React.createElement(q,null))):React.createElement(ua,null,React.createElement(ma,null,React.createElement("div",{className:"presto-card__title"},pa("Audience Retention","presto-player")),React.createElement(Te.a,{options:m.options,series:d,type:"area",height:280})))}),va=wp.i18n.__,wa=wp.compose.compose,Ea=wp.element.useEffect,ga=wa([Ct()])((function(e){var t=e.video_id,a=e.startDate,r=e.endDate,n=e.stat,c=e.fetchData,l=e.loading;return Ea((function(){c({endpoint:"/presto-player/v1/analytics/video/".concat(t,"/views"),params:{start:Z(a),end:Z(r)}})}),[a,r]),React.createElement(jt,{loading:l,value:parseInt(n),title:va("Unique Views","presto-player")})})),Ra=a(29);function Oa(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function ja(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?Oa(Object(a),!0).forEach((function(t){Object(d.a)(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):Oa(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var xa=wp.data.useSelect,_a=function(e){var t,a,r,n=e.src,c=e.preset,l=e.branding,o=e.attributes,i=e.adminPreview,s=e.type,p=o.chapters,d=o.mutedOverlay,u=o.mutedPreview,m=xa((function(e){var t;return null===(t=e("presto-player/player"))||void 0===t?void 0:t.youtube()})),f=xa((function(e){var t;return null===(t=e("presto-player/player"))||void 0===t?void 0:t.playerCSS()}));return React.createElement("div",{className:"wp-block-video presto-block-video",style:ja(ja(ja({"--presto-player-border-radius":"".concat(null==c?void 0:c.border_radius,"px")},null!=c&&c.caption_background?{"--plyr-captions-background":c.caption_background}:{}),null!=l&&l.color?{"--plyr-color-main":l.color}:{}),{},{"--presto-player-email-border-radius":"".concat((null==c||null===(t=c.email_collection)||void 0===t?void 0:t.border_radius)||0,"px"),"--presto-player-logo-width":"".concat((null==l?void 0:l.logo_width)||75,"px")})},React.createElement(Ra.a,{src:n,css:f,isAdmin:!0,preload:"metadata",preset:c,bunny:{thumbnail:null==o?void 0:o.previewThumbnail,preview:null==o?void 0:o.preview},youtube:{channelId:null==m?void 0:m.channel_id},tracks:!(null==c||!c.captions)&&[{kind:"captions",label:"English",srclang:"en",src:"/path/to/captions.en.vtt",default:!0}],branding:l,chapters:p,blockAttributes:o,poster:o.poster,provider:s},React.createElement("div",{slot:"player-end"},(null==u?void 0:u.enabled)&&(null==d?void 0:d.enabled)&&React.createElement("div",{className:"presto-player__overlay is-image",style:{position:"absolute",width:"".concat((null==d?void 0:d.width)||100,"%"),left:"".concat(100*((null==d||null===(a=d.focalPoint)||void 0===a?void 0:a.x)||.5),"%"),top:"".concat(100*((null==d||null===(r=d.focalPoint)||void 0===r?void 0:r.y)||.5),"%")}},React.createElement("img",{src:null==d?void 0:d.src,style:{transform:"translateX(-50%) translateY(-50%)"}})),i)))};function Da(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function Pa(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?Da(Object(a),!0).forEach((function(t){Object(d.a)(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):Da(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var ka=wp.i18n.__,Na=wp.components,Sa=Na.Flex,Fa=Na.FlexBlock,Ca=Na.FlexItem,Ta=Na.Spinner,Ma=Na.Button,Ia=Na.TextControl,Ba=wp.element,Va=Ba.useEffect,Aa=Ba.useState,Ha=wp.apiFetch,Ga=function(e){var t,a,r,c=e.route,l=e.startDate,o=e.endDate,i=e.setStartDate,s=e.setEndDate,p=Aa(!0),d=Object(n.a)(p,2),u=d[0],m=d[1],f=Aa({}),h=Object(n.a)(f,2),y=h[0],v=h[1],w=Aa(""),E=Object(n.a)(w,2),g=E[0],R=E[1],O=Aa(null),j=Object(n.a)(O,2),x=j[0],_=j[1],D=Aa(!1),P=Object(n.a)(D,2),k=P[0],N=P[1],S=function(){var e=Object(C.a)(M.a.mark((function e(){var t,a,r,n;return M.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return m(!0),e.prev=1,e.next=4,Ha({url:"".concat(null===(t=prestoPlayer)||void 0===t?void 0:t.root).concat(null===(a=prestoPlayer)||void 0===a?void 0:a.prestoVersionString,"videos/").concat(null==c||null===(r=c.params)||void 0===r?void 0:r.id)});case 4:n=e.sent,v(n),_(null==n?void 0:n.title),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(1),"rest_no_route"===e.t0.code&&R("Video Not Found");case 12:return e.prev=12,m(!1),e.finish(12);case 15:case"end":return e.stop()}}),e,null,[[1,9,12,15]])})));return function(){return e.apply(this,arguments)}}(),F=function(){var e=Object(C.a)(M.a.mark((function e(){var t,a;return M.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("New Video title ".concat(x)),m(!0),e.prev=2,t=Pa(Pa({},y),{title:x}),e.next=6,wp.apiFetch({method:"POST",url:wp.url.addQueryArgs("".concat(prestoPlayer.root).concat(prestoPlayer.prestoVersionString,"videos/").concat(y.id),{_method:"PUT"}),data:t});case 6:if(a=e.sent){e.next=9;break}throw genericError;case 9:N(!1),v(a),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(2),R(null!==e.t0&&void 0!==e.t0&&e.t0.message?e.t0.message:genericError);case 16:return e.prev=16,m(!1),e.finish(16);case 19:case"end":return e.stop()}}),e,null,[[2,13,16,19]])})));return function(){return e.apply(this,arguments)}}(),T=function(){_(null==y?void 0:y.title),N(!1)};return Va((function(){S()}),[]),g?React.createElement("div",{className:"presto-flow"},React.createElement(Sa,null,React.createElement(Fa,null,React.createElement("h2",null,g)))):React.createElement("div",{className:"presto-flow"},React.createElement(Sa,null,React.createElement(Fa,null,React.createElement(Ma,{isSecondary:!0,onClick:function(){b.push("#/")}},"← ",ka("Back to Dashboard","presto-player")))),React.createElement(Sa,{wrap:!0},React.createElement(Fa,null,u?React.createElement(Ta,null):k?React.createElement("div",{className:"presto-inline-edit presto-inline-edit--editing"},React.createElement(Ia,{className:"presto-inline-edit__input",type:"text",value:x,onChange:function(e){return _(e)}}),React.createElement(Ma,{className:"presto-inline-edit__button",isPrimary:!0,onClick:F}," ","Save"," "),React.createElement(Ma,{className:"presto-inline-edit__button",isSecondary:!0,onClick:T}," ","Cancel"," ")):React.createElement("div",{className:"presto-inline-edit"},React.createElement("h1",{className:"presto-dashboard__title presto-inline-edit__text"},null==y?void 0:y.title),React.createElement("button",{className:"presto-inline-edit__edit",onClick:function(){return N(!0)}},React.createElement("span",{className:"dashicon dashicons dashicons-edit"})))),React.createElement(Ca,null,React.createElement(mt,{startDate:l,setStartDate:i,endDate:o,setEndDate:s}))),React.createElement("div",{className:"presto-dashboard presto-flow"},React.createElement("div",{className:"presto-dashboard__row"},React.createElement("div",{className:"presto-dashboard__item is-large"},React.createElement(ga,{video_id:null==c||null===(t=c.params)||void 0===t?void 0:t.id,startDate:l,endDate:o})),React.createElement("div",{className:"presto-dashboard__item"},!!Object.keys(y||{}).length&&React.createElement(_a,{src:null==y?void 0:y.src,attributes:{},type:null==y?void 0:y.type,preset:{"play-large":!0,play:!0,progress:!0,"current-time":!0}})),React.createElement("div",{className:"presto-dashboard__item"},React.createElement(ia,{video_id:null==c||null===(a=c.params)||void 0===a?void 0:a.id,startDate:l,endDate:o}))),React.createElement("div",{className:"presto-dashboard__row"},React.createElement("div",{className:"presto-dashboard__item is-large"},React.createElement(ya,{video_id:null==c||null===(r=c.params)||void 0===r?void 0:r.id,startDate:l,endDate:o})))))},Ua={dashboard:{path:"/"},video:{path:"/video/:id"},user:{path:"/user/:id"}},La=wp.element.useState,Wa=function(){var e,t=function(){window.scrollTo(0,0)},a=La(new Date(Date.now()-6048e5)),r=Object(n.a)(a,2),c=r[0],l=r[1],o=La(new Date),i=Object(n.a)(o,2),s=i[0],p=i[1];return null!==(e=prestoPlayer)&&void 0!==e&&e.isPremium?React.createElement("div",{className:"presto-dashboard__content"},React.createElement(x,{routes:Ua},React.createElement(g,{path:Ua.dashboard.path,onRoute:t},React.createElement(wt,{startDate:c,endDate:s,setStartDate:l,setEndDate:p})),React.createElement(g,{path:Ua.video.path,onRoute:t},React.createElement(Ga,{startDate:c,endDate:s,setStartDate:l,setEndDate:p})),React.createElement(g,{path:Ua.user.path,onRoute:t},React.createElement(na,{startDate:c,endDate:s,setStartDate:l,setEndDate:p})))):React.createElement("div",{className:"presto-dashboard__content"},React.createElement(F,null))},Za=wp.element.render;Object(r.c)(),Za(React.createElement(Wa,null),document.getElementById("presto-analytics-page"))}},[[31,2,3]]]);
19
+ //# sourceMappingURL=admin-379e676f.js.map
dist/analytics/admin-379e676f.js.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"sources":["webpack:///./node_modules/@stencil/core/internal/client lazy ^\\.\\/.*$ include: \\.entry\\.js$ exclude: \\.system\\.entry\\.js$ namespace object","webpack:///./src/router/utils.js","webpack:///./src/router/context.js","webpack:///./src/router/route.js","webpack:///./src/router/link.js","webpack:///./src/router/index.js","webpack:///./src/admin/analytics/pages/illustration.js","webpack:///./src/admin/analytics/pages/AnalyticsUpgrade.js","webpack:///./src/admin/analytics/hocs/withDataList.js","webpack:///./src/admin/analytics/util.js","webpack:///./src/admin/settings/components/Loading.js","webpack:///./src/admin/ui/Pagination.js","webpack:///./src/admin/ui/Table.js","webpack:///./src/admin/analytics/components/DataTable.js","webpack:///./src/admin/analytics/components/TopUsers.js","webpack:///./src/admin/analytics/components/TopVideos.js","webpack:///./src/shared/services/fetch.js","webpack:///./src/admin/analytics/components/TotalViewsGraph.js","webpack:///./src/admin/analytics/components/TotalWatchGraph.js","webpack:///./src/admin/analytics/components/OverviewPanel.js","webpack:///./src/admin/analytics/components/DatePicker.js","webpack:///./src/admin/analytics/pages/Dashboard.js","webpack:///./src/admin/ui/StatCard.js","webpack:///./src/admin/analytics/hocs/withStat.js","webpack:///./src/admin/analytics/components/TotalVideoViewsByUser.js","webpack:///./src/admin/analytics/components/VideoAverageWatchTimeByUser.js","webpack:///./src/admin/analytics/components/VideoTotalWatchTimeByUser.js","webpack:///./src/admin/analytics/pages/User.js","webpack:///./src/admin/analytics/components/VideoAverageWatchTime.js","webpack:///./src/admin/analytics/components/VideoTimeline.js","webpack:///./src/admin/analytics/components/VideoViews.js","webpack:///./src/admin/blocks/shared/Player.js","webpack:///./src/admin/analytics/pages/Video.js","webpack:///./src/admin/analytics/routes.js","webpack:///./src/admin/analytics/App.js","webpack:///./src/admin/analytics/index.js"],"names":["webpackEmptyAsyncContext","req","Promise","resolve","then","e","Error","code","keys","module","exports","id","locationToRoute","location","path","pathname","hash","query","qs","parse","search","history","createBrowserHistory","RouterContext","wp","element","createContext","route","useContext","prev","Route","onRoute","children","matched","match","checkMatch","substr","cloneElement","Router","props","setState","routes","Object","map","key","unlisten","listen","handleRouteChange","state","defaultRoute","this","NotFound","push","forEach","name","isMatched","data","routerContextValue","is404","Provider","value","Component","width","height","data-name","xmlns","xmlnsXlink","viewBox","x1","y1","x2","y2","gradientUnits","offset","stop-color","stop-opacity","xlinkHref","transform","x","y","fill","gradientTransform","opacity","clip-path","points","cx","cy","r","d","__","i18n","components","Flex","FlexItem","FlexBlock","style","padding","background","marginLeft","href","target","className","apiFetch","useState","createHigherOrderComponent","compose","WrappedComponent","loading","setLoading","page","setPage","total","setTotal","totalPages","setTotalPages","setData","error","setError","fetchData","a","endpoint","params","url","addQueryArgs","per_page","res","headers","parseInt","get","json","responseData","console","message","sprintf","convertDateTimeToAbsoluteDate","dateTime","Date","getTimezoneOffset","getTime","toISOString","split","Spinner","align","justify","Card","CardBody","Button","ButtonGroup","useEffect","perPage","hasPrevious","setHasPrevious","hasNext","setHasNext","end","setEnd","start","setStart","Math","min","size","isSecondary","disabled","onClick","max","useRef","columns","onRowClick","title","length","role","classNames","column","label","row","rowIndex","columnIndex","data-title","aria-label","render","onSelect","Loading","Table","Pagination","withDataList","startDate","endDate","user","stats","DataTable","userId","user_id","marginBottom","wordBreak","video","color","use","createNonceMiddleware","prestoPlayer","nonce","createRootURLMiddleware","root","prestoVersionString","totalViews","setTotalViews","series","setSeries","chart","options","toolbar","show","yaxis","labels","formatter","num","abs","sign","toFixed","colors","xaxis","type","setHours","dataLabels","enabled","stroke","curve","gradient","shadeIntensity","opacityFrom","opacityTo","stops","fetchViews","jQuery","param","item","date_time","catch","finally","averageTime","setAverageTime","fetchMinutes","savedSeconds","hours","minutes","seconds","out","average","parseFloat","floor","Panel","TabPanel","tabs","tab","TotalViewsGraph","TotalWatchGraph","setStartDate","setEndDate","dateRef","inputSize","setInputSize","Litepicker","current","singleMode","format","autoApply","plugins","maxDate","numberOfMonths","buttonText","apply","cancel","dropdowns","minYear","maxYear","months","years","setup","picker","setDateRange","on","dateInstance","ref","DatePicker","OverviewPanel","TopUsers","TopVideos","stat","setStat","withStat","StatCard","view","User","setUser","getUser","wrap","css","email","isSmall","TotalVideoViewsByUser","VideoAverageWatchTimeByUser","VideoTotalWatchTimeByUser","video_id","watch_time","tickAmount","useSelect","src","preset","branding","attributes","adminPreview","chapters","mutedOverlay","mutedPreview","youtube","select","playerCSS","border_radius","caption_background","email_collection","logo_width","isAdmin","preload","bunny","thumbnail","previewThumbnail","preview","channelId","channel_id","tracks","captions","kind","srclang","default","blockAttributes","poster","provider","slot","position","left","focalPoint","top","TextControl","Video","setVideo","thisName","setThisName","editing","setEditing","getVideo","putVideo","log","method","_method","saved","genericError","cancelEditing","onChange","isPrimary","VideoViews","Player","play","progress","VideoAverageWatchTime","VideoTimeline","dashboard","scrollToTop","window","scrollTo","now","isPremium","Dashboard","AnalyticsUpgrade","defineCustomElements","App","document","getElementById"],"mappings":";;;;;;;;;;;;;;;;;8JAAA,SAASA,EAAyBC,GAGjC,OAAOC,QAAQC,UAAUC,MAAK,WAC7B,IAAIC,EAAI,IAAIC,MAAM,uBAAyBL,EAAM,KAEjD,MADAI,EAAEE,KAAO,mBACHF,KAGRL,EAAyBQ,KAAO,WAAa,MAAO,IACpDR,EAAyBG,QAAUH,EACnCS,EAAOC,QAAUV,EACjBA,EAAyBW,GAAK,I,8HCXvB,SAASC,EAAgBC,GAE9B,MAAO,CACLC,KAAMD,EAASE,SACfC,KAAMH,EAASG,KACfC,MAAOC,IAAGC,MAAMN,EAASO,S,YCHhBC,EAAUC,cACVC,EAAgBC,GAAGC,QAAQC,cAAc,CACpDC,MAAOf,EAAgBS,EAAQR,Y,QCJzBe,EAAeJ,GAAGC,QAAlBG,WAEJC,EAAO,GAEJ,SAASC,EAAT,GAA6C,IAA5BhB,EAA2B,EAA3BA,KAAMiB,EAAqB,EAArBA,QAASC,EAAY,EAAZA,SAE7BL,EAAUC,EAAWL,GAArBI,MAGFM,EADaC,YAAM,GAAD,OAAIpB,GACZqB,CAAW,GAAD,OAAIR,EAAMX,KAAKoB,OAAO,KAEhD,OAAKH,GAIDF,IACEF,IAASI,EAAQnB,MACnBiB,IAEFF,EAAOI,EAAQnB,MAGV,+BAAMU,GAAGC,QAAQY,aAAaL,EAAU,CAAEL,MAAOM,MAV/C,K,qBCbYT,GAAGC,QAAlBG,W,qcCAR,IAOMU,E,wCACJ,WAAYC,GAAQ,IAAD,sBACjB,cAAMA,GADW,gDAyBC,SAAC1B,GACnB,IAAMc,EAAQf,EAAgBC,aAAD,EAACA,EAAUA,UACxC,EAAK2B,SAAS,CAAEb,MAAOA,OAvBvB,EAAKc,OAASC,OAAOlC,KAAK+B,EAAME,QAAQE,KACtC,SAACC,GAAD,OAASL,EAAME,OAAOG,GAAK9B,QAI7B,EAAK+B,SAAWxB,EAAQyB,OAAO,EAAKC,mBAEpC,IAAMpB,EAAQf,EAAgBS,EAAQR,UAXrB,OAcjB,EAAKmC,MAAQ,CACXrB,QACAsB,aAAcV,WAAOU,aAAP,WAA0BV,aAA1B,EAA0BA,EAAOU,cAAiB,MAhBjD,E,wDAoBnB,WAEEC,KAAKL,a,oBAQP,WAEE,MAA+BK,KAAKX,MAA5BP,EAAR,EAAQA,SACR,GADA,EAAkBmB,SACcD,KAAKF,OAA7BrB,EAAR,EAAQA,MAAOsB,EAAf,EAAeA,aAEf,IAAKtB,EAAMX,KAET,OADAK,EAAQ+B,KAAKH,GACN,gCAGT,IAAIhB,GAAU,GAEbiB,KAAKT,QAAU,IAAIY,SAAQ,SAACC,GAC3B,IACMC,EADarB,YAAMP,EAAMX,KAAKoB,OAAO,GACzBD,CAAW,GAAD,OAAIR,EAAMX,KAAKoB,OAAO,KAC7CmB,IAGLtB,EAAU,CACRqB,OACAE,KAAMD,OAIV,IAAME,EAAqB,CAAE9B,QAAOM,WAG9ByB,GAASzB,EAEf,OACE,oBAACV,EAAcoC,SAAf,CAAwBC,MAAOH,GAC5BC,EAAQ,4CAAuB1B,O,GArElBR,GAAGC,QAAjBoC,WCAO,cAAwB,IAArBC,EAAoB,EAApBA,MAAOC,EAAa,EAAbA,OACvB,OACE,2BACEpD,GAAG,uCACHqD,YAAU,UACVF,MAAOA,EACPC,OAAQA,EACRE,MAAM,6BACNC,WAAW,+BACXC,QAAQ,qBAER,gCACE,sCACExD,GAAG,uCACHyD,GAAG,SACHC,GAAG,SACHC,GAAG,SACHC,GAAG,QACHC,cAAc,kBAEd,4BAAMC,OAAO,IAAIC,aAAW,OAAOC,eAAa,SAChD,4BAAMF,OAAO,OAAOC,aAAW,OAAOC,eAAa,SACnD,4BAAMF,OAAO,IAAIC,aAAW,OAAOC,eAAa,SAElD,sCACEhE,GAAG,uCACHyD,GAAG,SACHC,GAAG,SACHC,GAAG,SACHC,GAAG,SACHK,UAAU,0CAEZ,sCACEjE,GAAG,uCACHyD,GAAG,SACHC,GAAG,SACHC,GAAG,SACHC,GAAG,QACHK,UAAU,0CAEZ,gCACEjE,GAAG,uCACHkE,UAAU,6BAEV,4BACElE,GAAG,uCACHqD,YAAU,cACVc,EAAE,SACFC,EAAE,SACFjB,MAAM,QACNC,OAAO,SACPiB,KAAK,UAGT,sCACErE,GAAG,uCACHyD,GAAG,SACHC,GAAG,SACHC,GAAG,SACHC,GAAG,SACHK,UAAU,0CAEZ,sCACEjE,GAAG,uCACHyD,GAAG,SACHC,GAAG,SACHC,GAAG,SACHC,GAAG,QACHK,UAAU,0CAEZ,gCACEjE,GAAG,uCACHkE,UAAU,6BAEV,4BACElE,GAAG,uCACHqD,YAAU,cACVc,EAAE,SACFC,EAAE,SACFjB,MAAM,QACNC,OAAO,SACPiB,KAAK,UAGT,sCACErE,GAAG,uCACHyD,GAAG,SACHC,GAAG,SACHC,GAAG,SACHC,GAAG,QACHU,kBAAkB,uCAClBL,UAAU,0CAEZ,sCACEjE,GAAG,uCACHyD,GAAG,SACHC,GAAG,SACHC,GAAG,SACHC,GAAG,SACHU,kBAAkB,wCAClBL,UAAU,0CAEZ,sCACEjE,GAAG,uCACHyD,GAAG,SACHC,GAAG,SACHC,GAAG,SACHC,GAAG,SACHK,UAAU,0CAEZ,sCACEjE,GAAG,uCACHyD,GAAG,SACHC,GAAG,SACHC,GAAG,SACHC,GAAG,SACHK,UAAU,0CAEZ,sCACEjE,GAAG,uCACHyD,GAAG,SACHC,GAAG,SACHC,GAAG,SACHC,GAAG,SACHK,UAAU,2CAGd,gDACA,yBAAGM,QAAQ,OACT,4BACEJ,EAAE,QACFC,EAAE,QACFjB,MAAM,SACNC,OAAO,SACPiB,KAAK,gDAGT,4BACEF,EAAE,SACFC,EAAE,QACFjB,MAAM,SACNC,OAAO,SACPiB,KAAK,YAEP,4BAAMF,EAAE,SAASC,EAAE,SAASjB,MAAM,SAASC,OAAO,OAAOiB,KAAK,YAC9D,4BACEF,EAAE,SACFC,EAAE,SACFjB,MAAM,SACNC,OAAO,OACPiB,KAAK,UACLE,QAAQ,QAEV,4BAAMJ,EAAE,SAASC,EAAE,SAASjB,MAAM,SAASC,OAAO,OAAOiB,KAAK,YAC9D,4BAAMF,EAAE,SAASC,EAAE,QAAQjB,MAAM,SAASC,OAAO,OAAOiB,KAAK,YAC7D,4BAAMF,EAAE,SAASC,EAAE,SAASjB,MAAM,SAASC,OAAO,OAAOiB,KAAK,YAC9D,4BAAMF,EAAE,SAASC,EAAE,QAAQjB,MAAM,SAASC,OAAO,OAAOiB,KAAK,YAC7D,4BAAMF,EAAE,SAASC,EAAE,SAASjB,MAAM,SAASC,OAAO,OAAOiB,KAAK,YAC9D,4BAAMF,EAAE,SAASC,EAAE,SAASjB,MAAM,SAASC,OAAO,OAAOiB,KAAK,YAC9D,4BAAMF,EAAE,SAASC,EAAE,QAAQjB,MAAM,SAASC,OAAO,OAAOiB,KAAK,YAC7D,yBAAGE,QAAQ,OACT,4BACEJ,EAAE,SACFC,EAAE,SACFjB,MAAM,SACNC,OAAO,SACPiB,KAAK,gDAGT,4BACEF,EAAE,SACFC,EAAE,SACFjB,MAAM,SACNC,OAAO,SACPiB,KAAK,YAEP,yBAAGE,QAAQ,OACT,4BACEJ,EAAE,SACFC,EAAE,QACFjB,MAAM,QACNC,OAAO,SACPiB,KAAK,gDAGT,4BACErE,GAAG,uCACHqD,YAAU,cACVc,EAAE,SACFC,EAAE,SACFjB,MAAM,QACNC,OAAO,SACPiB,KAAK,SAEP,yBAAGG,YAAU,8CACX,+BACEC,OAAO,gIACPJ,KAAK,UACLE,QAAQ,QAEV,8BAAQG,GAAG,SAASC,GAAG,MAAMC,EAAE,QAAQP,KAAK,UAAUE,QAAQ,SAEhE,yBAAGA,QAAQ,OACT,4BACEJ,EAAE,SACFC,EAAE,SACFjB,MAAM,SACNC,OAAO,SACPiB,KAAK,gDAGT,4BACEF,EAAE,SACFC,EAAE,SACFjB,MAAM,SACNC,OAAO,SACPiB,KAAK,YAEP,yBAAGE,QAAQ,OACT,4BACEJ,EAAE,SACFC,EAAE,QACFjB,MAAM,QACNC,OAAO,SACPiB,KAAK,gDAGT,4BACErE,GAAG,uCACHqD,YAAU,cACVc,EAAE,SACFC,EAAE,SACFjB,MAAM,QACNC,OAAO,SACPiB,KAAK,SAEP,yBAAGG,YAAU,8CACX,+BACEC,OAAO,+HACPJ,KAAK,UACLE,QAAQ,QAEV,8BAAQG,GAAG,SAASC,GAAG,QAAQC,EAAE,QAAQP,KAAK,UAAUE,QAAQ,SAElE,yBAAGA,QAAQ,OACT,4BACEJ,EAAE,SACFC,EAAE,SACFjB,MAAM,SACNC,OAAO,SACPc,UAAU,0CACVG,KAAK,gDAGT,4BACEF,EAAE,SACFC,EAAE,SACFjB,MAAM,SACNC,OAAO,SACPc,UAAU,0CACVG,KAAK,SAEP,4BACEF,EAAE,QACFC,EAAE,SACFjB,MAAM,SACNC,OAAO,OACPc,UAAU,0CACVG,KAAK,YAEP,4BACEF,EAAE,SACFC,EAAE,QACFjB,MAAM,SACNC,OAAO,OACPc,UAAU,yCACVG,KAAK,YAEP,4BACEF,EAAE,SACFC,EAAE,SACFjB,MAAM,SACNC,OAAO,OACPc,UAAU,wCACVG,KAAK,YAEP,4BACEF,EAAE,QACFC,EAAE,SACFjB,MAAM,QACNC,OAAO,OACPc,UAAU,wCACVG,KAAK,UACLE,QAAQ,QAEV,4BACEJ,EAAE,SACFC,EAAE,SACFjB,MAAM,SACNC,OAAO,OACPc,UAAU,yCACVG,KAAK,UACLE,QAAQ,QAEV,4BACEJ,EAAE,SACFC,EAAE,SACFjB,MAAM,SACNC,OAAO,OACPc,UAAU,0CACVG,KAAK,YAEP,4BACEF,EAAE,SACFC,EAAE,SACFjB,MAAM,QACNC,OAAO,OACPc,UAAU,0CACVG,KAAK,UACLE,QAAQ,QAEV,4BACEJ,EAAE,SACFC,EAAE,SACFjB,MAAM,SACNC,OAAO,OACPc,UAAU,0CACVG,KAAK,YAEP,yBAAGE,QAAQ,OACT,4BACEJ,EAAE,SACFC,EAAE,QACFjB,MAAM,SACNC,OAAO,SACPc,UAAU,2CACVG,KAAK,gDAGT,4BACEF,EAAE,SACFC,EAAE,SACFjB,MAAM,SACNC,OAAO,SACPc,UAAU,0CACVG,KAAK,SAEP,4BACEF,EAAE,SACFC,EAAE,SACFjB,MAAM,SACNC,OAAO,OACPc,UAAU,0CACVG,KAAK,YAEP,4BACEF,EAAE,SACFC,EAAE,SACFjB,MAAM,QACNC,OAAO,SACPc,UAAU,0CACVG,KAAK,YAEP,4BACEF,EAAE,SACFC,EAAE,SACFjB,MAAM,QACNC,OAAO,OACPc,UAAU,0CACVG,KAAK,YAEP,4BACEF,EAAE,SACFC,EAAE,SACFjB,MAAM,QACNC,OAAO,QACPc,UAAU,yCACVG,KAAK,YAEP,4BACEF,EAAE,SACFC,EAAE,SACFjB,MAAM,QACNC,OAAO,QACPc,UAAU,0CACVG,KAAK,YAEP,yBAAGE,QAAQ,OACT,4BACEJ,EAAE,SACFC,EAAE,SACFjB,MAAM,OACNC,OAAO,QACPiB,KAAK,YAEP,4BACEF,EAAE,SACFC,EAAE,SACFjB,MAAM,OACNC,OAAO,QACPc,UAAU,qCACVG,KAAK,aAGT,4BACEQ,EAAE,0ZACFX,UAAU,4BACVG,KAAK,UACLE,QAAQ,QAEV,4BACEM,EAAE,0ZACFX,UAAU,4BACVG,KAAK,UACLE,QAAQ,QAEV,4BACEM,EAAE,4ZACFX,UAAU,4BACVG,KAAK,UACLE,QAAQ,QAEV,8BAAQG,GAAG,SAASC,GAAG,QAAQC,EAAE,OAAOP,KAAK,UAAUE,QAAQ,QAC/D,8BAAQG,GAAG,OAAOC,GAAG,SAASC,EAAE,OAAOP,KAAK,UAAUE,QAAQ,QAC9D,8BAAQG,GAAG,SAASC,GAAG,SAASC,EAAE,OAAOP,KAAK,UAAUE,QAAQ,QAChE,8BAAQG,GAAG,SAASC,GAAG,QAAQC,EAAE,OAAOP,KAAK,UAAUE,QAAQ,QAC/D,8BAAQG,GAAG,QAAQC,GAAG,SAASC,EAAE,OAAOP,KAAK,UAAUE,QAAQ,QAC/D,8BAAQG,GAAG,SAASC,GAAG,SAASC,EAAE,OAAOP,KAAK,UAAUE,QAAQ,QAChE,8BAAQG,GAAG,QAAQC,GAAG,SAASC,EAAE,OAAOP,KAAK,UAAUE,QAAQ,QAC/D,4BACEJ,EAAE,SACFC,EAAE,SACFjB,MAAM,SACNC,OAAO,SACPiB,KAAK,+CAEP,4BACEQ,EAAE,gGACFX,UAAU,4BACVG,KAAK,+CAEP,4BACEQ,EAAE,4FACFX,UAAU,4BACVG,KAAK,YAEP,4BACEF,EAAE,SACFC,EAAE,SACFjB,MAAM,SACNC,OAAO,SACPiB,KAAK,YAEP,4BACEF,EAAE,SACFC,EAAE,SACFjB,MAAM,SACNC,OAAO,SACPiB,KAAK,YAEP,4BACEF,EAAE,SACFC,EAAE,SACFjB,MAAM,SACNC,OAAO,QACPiB,KAAK,YAEP,4BACEQ,EAAE,4GACFX,UAAU,4BACVG,KAAK,+CAEP,4BACEQ,EAAE,mHACFX,UAAU,4BACVK,QAAQ,UC3dRO,EAAOjE,GAAGkE,KAAVD,GAGR,EAAsCjE,GAAGmE,WAAjCC,EAAR,EAAQA,KAAMC,EAAd,EAAcA,SAAUC,EAAxB,EAAwBA,UAET,aACb,OACE,oBAACF,EAAD,CAAMG,MAAO,CAAEC,QAAS,OAAQC,WAAY,SAC1C,oBAACJ,EAAD,KACE,oBAAC,EAAD,CAAc/B,MAAM,WAEtB,oBAACgC,EAAD,CAAWC,MAAO,CAAEG,WAAY,SAC9B,8BAAKT,EAAG,+BAAgC,kBACxC,6BACGA,EACC,sFACA,kBAGJ,yBACEU,KAAK,2BACLC,OAAO,SACPC,UAAU,yBAETZ,EAAG,aAAc,qB,gmBCrBbjE,GAAGkE,KAAVD,GAAR,IACQa,EAAa9E,GAAb8E,SACAC,EAAa/E,GAAGC,QAAhB8E,SACAC,EAA+BhF,GAAGiF,QAAlCD,2BAOO,oBACbA,GACE,SAACE,GAAD,OAAsB,SAACnE,GACrB,MAA8BgE,GAAS,GAAvC,mBAAOI,EAAP,KAAgBC,EAAhB,KACA,EAAwBL,EAAS,GAAjC,mBAAOM,EAAP,KAAaC,EAAb,KACA,EAA0BP,EAAS,GAAnC,mBAAOQ,EAAP,KAAcC,EAAd,KACA,EAAoCT,EAAS,GAA7C,mBAAOU,EAAP,KAAmBC,EAAnB,KACA,EAAwBX,EAAS,IAAjC,mBAAO/C,EAAP,KAAa2D,EAAb,KACA,EAA0BZ,EAAS,IAAnC,mBAAOa,EAAP,KAAcC,EAAd,KAKMC,EAAS,uCAAG,mCAAAC,EAAA,6DAASC,EAAT,EAASA,SAAT,IAAmBC,cAAnB,MAA4B,GAA5B,EAChBb,GAAW,GADK,kBAKON,EAAS,CAC5BxF,KAAMU,GAAGkG,IAAIC,aAAaH,EAApB,GACJX,OACAe,SAAU,GACPH,IAELtG,OAAO,IACNf,MAAK,SAACyH,GACP,IAAMd,EAAQc,EAAIC,QACdC,SAASF,EAAIC,QAAQE,IAAI,eACzB,EACEf,EAAaY,EAAIC,QACnBC,SAASF,EAAIC,QAAQE,IAAI,oBACzB,EAGJ,OAFAhB,EAASD,GACTG,EAAcD,GACPY,EAAII,UArBC,OAKdC,EALc,OAwBdf,EAAQe,GAxBM,gDA0BdC,QAAQf,MAAR,MACA,4BAAI,KAAGgB,SACLf,EAAS,KAAEe,SA5BC,yBA+BdxB,GAAW,GA/BG,4EAAH,sDAmCf,OACE,oBAACF,EAAD,eACEC,QAASA,EACTC,WAAYA,EACZU,UAAWA,EACXT,KAAMA,EACNC,QAASA,EACTC,MAAOA,EACPC,SAAUA,EACVC,WAAYA,EACZC,cAAeA,EACf1D,KAAMA,EACN2D,QAASA,EACTC,MAAOA,EACPC,SAAUA,GACN9E,OAIV,iBChFJ,EAAwBf,GAAGkE,KAAnBD,EAAR,EAAQA,GAAI4C,EAAZ,EAAYA,QAgCCC,EAAgC,SAACC,GAC5C,IAAM9D,GAAS,IAAI+D,MAAOC,oBAE1B,OADY,IAAID,KAAKD,EAASG,UAAoB,GAAPjE,EAAU,KACzCkE,cAAcC,MAAM,KAAK,GAAG,kBCnC1C,EAAoCpH,GAAGmE,WAA/BkD,EAAR,EAAQA,QAASjD,EAAjB,EAAiBA,KAAMC,EAAvB,EAAuBA,SACR,cAAuB,IAAD,IAAnB9B,cAAmB,MAAV,IAAU,EACnC,OACE,oBAAC,EAAD,CAAMgC,MAAO,CAAEhC,OAAO,GAAD,OAAKA,EAAL,OAAmB+E,MAAM,SAASC,QAAQ,UAC7D,oBAAC,EAAD,KACE,oBAACF,EAAD,SCLApD,EAAOjE,GAAGkE,KAAVD,GACR,EAAiEjE,GAAGmE,WAA5DqD,EAAR,EAAQA,KAAMC,GAAd,EAAcA,SAAUrD,GAAxB,EAAwBA,KAAME,GAA9B,EAA8BA,UAAWoD,GAAzC,EAAyCA,OAAQC,GAAjD,EAAiDA,YACjD,GAAgC3H,GAAGC,QAA3B8E,GAAR,GAAQA,SAAU6C,GAAlB,GAAkBA,UAEH,eAAoD,IAAjDvC,EAAgD,EAAhDA,KAAMC,EAA0C,EAA1CA,QAASuC,EAAiC,EAAjCA,QAAStC,EAAwB,EAAxBA,MAAOE,EAAiB,EAAjBA,WAE/C,EAAsCV,IAAS,GAA/C,mBAAO+C,EAAP,KAAoBC,EAApB,KACA,EAA8BhD,IAAS,GAAvC,mBAAOiD,EAAP,KAAgBC,EAAhB,KAGA,EAAsBlD,GAAS,GAA/B,mBAAOmD,EAAP,KAAYC,EAAZ,KACA,EAA0BpD,GAAS,GAAnC,mBAAOqD,EAAP,KAAcC,EAAd,KAGAT,IAAU,WACRO,EAAOG,KAAKC,IAAIV,EAAUxC,EAAME,IAChC8C,EAASR,GAAWxC,EAAO,GAAK,KAC/B,CAACwC,EAASxC,EAAME,IAgBnB,OALAqC,IAAU,WACRG,EAAe1C,EAAO,EAAI,GAC1B4C,EAAWxC,GAAcJ,EAAO,KAC/B,CAACA,EAAMI,IAGR,oBAAC+B,EAAD,CAAMgB,KAAK,QAAQ3D,UAAU,0BAC3B,oBAAC4C,GAAD,CAAU5C,UAAU,eAClB,oBAAC,GAAD,KACE,oBAAC,GAAD,KACGgC,QACC5C,EAAG,4BAA6B,iBAChCmE,EACAF,EACA3C,IAGJ,oBAAC,GAAD,KACE,oBAAC,GAAD,CAAMgC,QAAQ,YAEV,oBAACI,GAAD,KACE,oBAACD,GAAD,CACEe,aAAW,EACXC,UAAWZ,EACXa,QA7BD,WACfrD,EAAQgD,KAAKM,IAAIvD,EAAO,EAAG,MA8BVpB,EAAG,WAAY,kBAElB,oBAACyD,GAAD,CAAQe,aAAW,EAACC,UAAWV,EAASW,QApCvC,WACfrD,EAAQgD,KAAKC,IAAI9C,EAAYJ,EAAO,MAoCnBpB,EAAG,OAAQ,yBCzDxBA,GAAOjE,GAAGkE,KAAVD,GACR,GAAwCjE,GAAGC,QAC3C,IADA,GAAQ4I,OAAR,GAAgBjB,UAAhB,GAA2B7C,SACuC/E,GAAGmE,YAA7DqD,GAAR,GAAQA,KAAMC,GAAd,GAAcA,SAIC,IAJf,GAAwBrD,KAAxB,GAA8BE,UAA9B,GAAyCoD,OAAzC,GAAiDC,YAIlC,YAA8C,IAA3CmB,EAA0C,EAA1CA,QAAU9G,EAAgC,EAAhCA,KAAO+G,EAAyB,EAAzBA,WAAaC,EAAY,EAAZA,MAE9C,OAAKhH,EAAKiH,OAgBR,oBAAC,GAAD,CAAMT,KAAK,QAAQ3D,UAAU,0BAC3B,oBAAC,GAAD,CAAUA,UAAU,eAClB,2BAAKA,UAAU,sBACZmE,GAEH,6BAAOE,KAAK,QAAQrE,UAAWsE,IAAW,eAAgB,CAAE,eAAgBJ,KAC1E,6BAAOG,KAAK,YACV,0BAAIA,KAAK,OACNJ,GAAWA,EAAQ3H,KAAI,SAACiI,GACrB,OACE,0BAAIhI,IAAKgI,EAAOhI,IAAK8H,KAAK,gBACvBE,EAAOC,YAOpB,6BAAOH,KAAK,YACTlH,EAAKb,KAAI,SAACmI,EAAMC,GACf,OACE,0BAAIL,KAAK,MAAM9H,IAAG,cAASmI,GACzBZ,QAAS,kBAAMI,GAAcA,EAAWO,KAEvCR,EAAQ3H,KAAI,SAACiI,EAASI,GACnB,OACE,0BAAIN,KAAK,OAAOO,aAAYL,EAAOC,MAAOjI,IAAG,cAASmI,EAAT,YAAqBC,GAAeE,aAAYN,EAAOC,OACjGD,EAAOO,OAASP,EAAOO,OAAOL,GAAQ,+BAAMF,EAAOhH,MAAMkH,gBAzC9E,oBAAC,GAAD,CAAMd,KAAK,QAAQ3D,UAAU,0BAC3B,oBAAC,GAAD,CAAUA,UAAU,eAClB,2BAAKA,UAAU,sBACZmE,GAEH,2BAAKzE,MAAO,CAAEb,QAAS,MACpBO,GAAG,qBAAsB,sBChB9BA,GAAOjE,GAAGkE,KAAVD,GACR,GAAgCjE,GAAGC,QACnC,IADA,GAAQ2H,UAAR,GAAmB7C,SACQ/E,GAAGmE,YAAtBqD,GAAR,GAAQA,KAAMC,GAAd,GAAcA,SAKC,eAWR,IAAD,IAVJI,eAUI,MAVM,GAUN,EATJmB,EASI,EATJA,MACA3D,EAQI,EARJA,KACAC,EAOI,EAPJA,QACAH,EAMI,EANJA,QACAI,EAKI,EALJA,MACAE,EAII,EAJJA,WACAqD,EAGI,EAHJA,QACA9G,EAEI,EAFJA,KACA4H,EACI,EADJA,SAEA,OAAIzE,EAEA,oBAAC,GAAD,KACE,oBAAC0E,EAAD,OAKD7H,WAAMiH,OAcT,2BAAKpE,UAAU,aACb,oBAACiF,GAAD,CACE9H,KAAMA,EACN8G,QAASA,EACTjB,QAASA,EACTkB,WAAYa,EACZZ,MAAOA,MAGNzD,GACD,oBAACwE,GAAD,CACE1E,KAAMA,EACNC,QAASA,EACTuC,QAASA,EACTtC,MAAOA,EACPE,WAAYA,KA3BhB,oBAAC,GAAD,CAAM+C,KAAK,QAAQ3D,UAAU,eAC3B,oBAAC,GAAD,CAAUA,UAAU,eAClB,2BAAKA,UAAU,sBAAsBmE,GACrC,2BAAKzE,MAAO,CAAEb,QAAS,MACpBO,GAAG,qBAAsB,qB,6kBCjCtC,IAAQA,GAAOjE,GAAGkE,KAAVD,GACA2D,GAAc5H,GAAGC,QAAjB2H,UAQO3C,MAPKjF,GAAGiF,QAAfA,SAOe,CAAC+E,KAAT/E,EACb,YAWO,IAVLE,EAUI,EAVJA,QACAE,EASI,EATJA,KACAC,EAQI,EARJA,QACAC,EAOI,EAPJA,MACAE,EAMI,EANJA,WACAzD,EAKI,EALJA,KACA4D,EAII,EAJJA,MACAE,EAGI,EAHJA,UACAmE,EAEI,EAFJA,UACAC,EACI,EADJA,QAMAtC,IAAU,WACR9B,EAAU,CACRE,SAAU,wCACVC,OAAO,OACLG,SAPW,GAQP6D,EAAY,CAAE7B,MAAOtB,EAA8BmD,IAAe,IAClEC,EAAU,CAAEhC,IAAKpB,EAA8BoD,IAAa,QAGnE,CAAC7E,EAAM4E,EAAWC,IAGrB,IAIMpB,EAAU,CACd,CACE1H,IAAK,OACLiI,MAAOpF,GAAG,OAAQ,iBAClB7B,MAAO,SAACkH,GAAD,aAASA,SAAT,UAASA,EAAKa,YAAd,aAAS,EAAWrI,OAE7B,CACEV,IAAK,aACLiI,MAAOpF,GAAG,aAAc,iBACxB7B,MAAO,SAACkH,GAAD,eAASA,SAAT,UAASA,EAAKc,aAAd,iBAAS,EAAa,UAAtB,aAAS,EAAiBpI,OAEnC,CACEZ,IAAK,gBACLiI,MAAOpF,GAAG,gBAAiB,iBAC3B0F,OAAQ,SAACL,GAAD,eACN,2BAAKzE,UAAU,gBAAgByE,SAA/B,UAA+BA,EAAKc,aAApC,iBAA+B,EAAa,UAA5C,aAA+B,EAAiBpI,SAKtD,OAAI4D,EACK,CAAEA,SAIT,oBAACyE,GAAD,CACErB,MAAO/E,GAAG,YAAa,iBACvBoB,KAAMA,EACNwC,QA/Ca,EAgDbvC,QAASA,EACTH,QAASA,EACTI,MAAOA,EACPE,WAAYA,EACZqD,QAASA,EACT9G,KAAMA,EACN4H,SAAU,SAACN,GAAD,MAvCInK,EAuCJ,OAvCIA,EAuCcmK,SAAD,UAACA,EAAKa,YAAN,aAAC,EAAWhL,QAtCzCU,EAAQ+B,KAAR,iBAAuBzC,U,6kBCvC7B,IAAQ8E,GAAOjE,GAAGkE,KAAVD,GACA2D,GAAc5H,GAAGC,QAAjB2H,UASO3C,MARKjF,GAAGiF,QAAfA,SAQe,CAAC+E,KAAT/E,EACb,YAYO,IAXLE,EAWI,EAXJA,QACAE,EAUI,EAVJA,KACAC,EASI,EATJA,QACAC,EAQI,EARJA,MACAE,EAOI,EAPJA,WACAzD,EAMI,EANJA,KACA4D,EAKI,EALJA,MACAE,EAII,EAJJA,UACAmE,EAGI,EAHJA,UACAC,EAEI,EAFJA,QACAI,EACI,EADJA,OAOA1C,IAAU,WACR9B,EAAU,CACRE,SAAU,yCACVC,OAAO,UACLG,SARW,IASP6D,EAAY,CAAE7B,MAAOtB,EAA8BmD,IAAe,IAClEC,EAAU,CAAEhC,IAAKpB,EAA8BoD,IAAa,IAC5DI,EAAS,CAAEC,QAASD,GAAU,QAGrC,CAACjF,EAAM4E,EAAWC,IAErB,IAIMpB,EAAU,CACd,CACE1H,IAAK,OACLiI,MAAOpF,GAAG,OAAQ,iBAClB0F,OAHF,SAGSL,GACL,OACE,0BAAI/E,MAAO,CAAEiG,aAAc,EAAGC,UAAU,cACrCnB,EAAIoB,MAAM1B,MACPM,EAAIoB,MAAM1B,MACV/E,GAAG,WAAY,oBAK3B,CACE7C,IAAK,aACLiI,MAAOpF,GAAG,aAAc,iBACxB7B,MAHF,SAGQkH,GACJ,OAAOA,EAAIc,MAAM,GAAGpI,OAGxB,CACEZ,IAAK,gBACLiI,MAAOpF,GAAG,gBAAiB,iBAC3B0F,OAHF,SAGSL,GACL,OAAO,2BAAKzE,UAAU,gBAAgByE,EAAIc,MAAM,GAAGpI,QAGvD,CACEZ,IAAK,YACLiI,MAAO,GACPM,OAHF,SAGSL,GACL,OACE,4BACE/E,MAAO,CACLoG,MAAO,yCAGR1G,GAAG,eAAgB,iBALtB,SAYR,OAAI2B,EACK,CAAEA,SAIT,oBAACyE,GAAD,CACErB,MAAO/E,GAAG,aAAc,iBACxB4D,QAxEa,GAyEbxC,KAAMA,EACNC,QAASA,EACTH,QAASA,EACTI,MAAOA,EACPE,WAAYA,EACZqD,QAASA,EACT9G,KAAMA,EACN4H,SAAU,SAACN,GAAS,IAAD,EAhELnK,IAiEHmK,SAAD,UAACA,EAAKoB,aAAN,aAAC,EAAYvL,GAhEzBU,EAAQ+B,KAAR,kBAAwBzC,UCzCtB2F,GAAa9E,GAAb8E,SAGRA,GAAS8F,IAAI9F,GAAS+F,sBAAsBC,aAAaC,QACzDjG,GAAS8F,IACP9F,GAASkG,wBACPF,aAAaG,KAAOH,aAAaI,sBAItBpG,U,imBCXf,OAAwB9E,GAAGkE,KAAnBD,GAAR,GAAQA,GAAI4C,GAAZ,GAAYA,QACZ,GAA2B7G,GAAGmE,WAAhBsD,IAAd,GAAQD,KAAR,GAAcC,UACd,GAAwCzH,GAAGC,QAAnC8E,GAAR,GAAQA,SAAU6C,GAAlB,GAAkBA,UAOH,IAPf,GAA6BiB,OAOd,SAAC9H,GACd,MAA8BgE,IAAS,GAAvC,mBAAOI,EAAP,KAAgBC,EAAhB,KACA,EAAoCL,GAAS,GAA7C,mBAAOoG,EAAP,KAAmBC,EAAnB,KACQnB,EAAuBlJ,EAAvBkJ,UAAWC,EAAYnJ,EAAZmJ,QACnB,EAA4BnF,GAAS,CACnC,CACEjD,KAAM,QACNE,KAAM,MAHV,mBAAOqJ,EAAP,KAAeC,EAAf,KAOMC,EAAQ,CACZC,QAAS,CACPD,MAAO,CACLE,QAAS,CACPC,MAAM,IAGVC,MAAO,CACLpD,IAAK,EACLqD,OAAQ,CACNC,UAAW,SAAUC,GACnB,OAAIA,EAAM,EACD,EAEFxD,KAAKyD,IAAID,GAAO,IACnBxD,KAAK0D,KAAKF,IAAQxD,KAAKyD,IAAID,GAAO,KAAMG,QAAQ,GAAK,IACrD3D,KAAK0D,KAAKF,GAAOxD,KAAKyD,IAAID,GAAKG,QAAQ,MAIjDC,OAAQ,CAAC,WACTC,MAAO,CACLC,KAAM,WACN7D,IAAK,IAAIvB,KAAKiD,GAAWoC,SAAS,EAAG,EAAG,EAAG,GAC3CzD,IAAK,IAAI5B,KAAKkD,GAASmC,SAAS,GAAI,GAAI,GAAI,MAE9CC,WAAY,CACVC,SAAS,GAEXC,OAAQ,CAAEC,MAAO,UACjBjJ,KAAM,CACJ4I,KAAM,WACNM,SAAU,CACRC,eAAgB,EAChBC,YAAa,GACbC,UAAW,GACXC,MAAO,CAAC,EAAG,GAAI,SAOvBlF,IAAU,WACRmF,MACC,CAAChM,IAEJ,IAAMgM,EAAa,WACjB3H,GAAW,GACXN,GAAS,CACPxF,KACE,qCACA0N,OAAOC,MAAP,SACMhD,EAAY,CAAE7B,MAAOtB,EAA8BmD,IAAe,IAClEC,EAAU,CAAEhC,IAAKpB,EAA8BoD,IAAa,KAEpEvK,OAAO,IAENf,KATH,+BAAAmH,EAAA,MASQ,WAAOM,GAAP,iBAAAN,EAAA,6DACJqF,EAAc/E,EAAIC,SAAWD,EAAIC,QAAQE,IAAI,eADzC,SAEeH,EAAII,OAFnB,OAEEzE,EAFF,OAIAqJ,EAAS,GACTrJ,EAAKiH,QACPjH,EAAKH,SAAQ,SAACqL,GACZ7B,EAAOzJ,KAAK,CACV0B,EAAG4J,EAAKC,UACR5J,EAAG2J,EAAK3H,WAId+F,EAAU,CACR,CACExJ,KAAM,QACNE,KAAMqJ,KAhBN,2CATR,uDA6BG+B,OAAM,SAACvO,GACN8H,QAAQf,MAAM/G,MAEfwO,SAAQ,WACPjI,GAAW,OAIjB,OAAID,EAEA,oBAAC,GAAD,KACE,oBAAC0E,EAAD,OAMJ,oBAAC,GAAD,CAAUhF,UAAU,eAClB,2BAAKA,UAAU,sBACZgC,GAAQ5C,GAAG,kBAAmB,iBAAkBkH,IAEnD,oBAAC,KAAD,CAAOK,QAASD,EAAMC,QAASH,OAAQA,EAAQe,KAAK,OAAO7J,OAAQ,SCvHzE,GAAwBvC,GAAGkE,KAAnBD,GAAR,GAAQA,GAAI4C,GAAZ,GAAYA,QACZ,GAA2B7G,GAAGmE,WAAhBsD,IAAd,GAAQD,KAAR,GAAcC,UACd,GAAwCzH,GAAGC,QAAnC8E,GAAR,GAAQA,SAAU6C,GAAlB,GAAkBA,UAQH,IARf,GAA6BiB,OAQd,SAAC9H,GACd,MAA8BgE,IAAS,GAAvC,mBAAOI,EAAP,KAAgBC,EAAhB,KACA,EAAsCL,GAAS,GAA/C,mBAAOuI,EAAP,KAAoBC,EAApB,KACQtD,EAAuBlJ,EAAvBkJ,UAAWC,EAAYnJ,EAAZmJ,QACnB,EAA4BnF,GAAS,CACnC,CACEjD,KAAM,QACNE,KAAM,MAHV,mBAAOqJ,EAAP,KAAeC,EAAf,KAOMC,EAAQ,CACZC,QAAS,CACPD,MAAO,CACLE,QAAS,CACPC,MAAM,IAGVC,MAAO,CACLC,OAAQ,CACNC,UAAW,SAAUC,GACnB,OAAOxD,KAAKyD,IAAID,GAAO,IACnBxD,KAAK0D,KAAKF,IAAQxD,KAAKyD,IAAID,GAAO,KAAMG,QAAQ,GAAK,SACpD3D,KAAK0D,KAAKF,GAAOxD,KAAKyD,IAAID,IAAMG,QAAQ,GAAK,SAIxDC,OAAQ,CAAC,WACTC,MAAO,CACLC,KAAM,WACN7D,IAAK,IAAIvB,KAAKiD,GAAWoC,SAAS,EAAG,EAAG,EAAG,GAC3CzD,IAAK,IAAI5B,KAAKkD,GAASmC,SAAS,GAAI,GAAI,GAAI,MAE9CC,WAAY,CACVC,SAAS,GAEXC,OAAQ,CAAEC,MAAO,UACjBjJ,KAAM,CACJ4I,KAAM,WACNM,SAAU,CACRC,eAAgB,EAChBC,YAAa,GACbC,UAAW,GACXC,MAAO,CAAC,EAAG,GAAI,SAOvBlF,IAAU,WACR4F,MACC,CAACzM,IAEJ,IT9D2B0M,EACrBC,EACAC,EACAC,EAEFC,ESyDEL,EAAe,WACnBpI,GAAW,GACXN,GAAS,CACPxF,KACE,0CACA0N,OAAOC,MAAM,CACX7E,MAAOtB,EAA8BmD,GACrC/B,IAAKpB,EAA8BoD,KAEvCvK,OAAO,IAENf,KATH,+BAAAmH,EAAA,MASQ,WAAOM,GAAP,qBAAAN,EAAA,sEAC4BM,EAAII,OADhC,gBACIzE,EADJ,EACIA,KAAM8L,EADV,EACUA,QAEdP,EAAeQ,WAAWD,IAEtBzC,EAAS,GACTrJ,EAAKiH,QACPjH,EAAKH,SAAQ,SAACqL,GACZ7B,EAAOzJ,KAAK,CACV0B,EAAG4J,EAAKC,UACR5J,GAAI2J,EAAK3H,MAAQ,IAAI0G,QAAQ,QAInCX,EAAU,CACR,CACExJ,KAAM,aACNE,KAAMqJ,KAjBN,2CATR,uDA8BG+B,OAAM,SAACvO,GACN8H,QAAQf,MAAM/G,MAEfwO,SAAQ,WACPjI,GAAW,OAIjB,OAAID,EAEA,oBAAC,GAAD,KACE,oBAAC0E,EAAD,OAMJ,oBAAC,GAAD,CAAUhF,UAAU,eAClB,2BAAKA,UAAU,sBACZgC,GACC5C,GAAG,wBAAyB,kBTlHTwJ,ESmHNH,ETlHfI,EAAQpF,KAAK0F,MAAMP,EAAe,GAAK,IACvCE,EAAUrF,KAAK0F,MAAMP,EAAe,IAAc,GAARC,EAC1CE,EAAUH,EAAe,GAE3BI,EAAM,GACNH,IACFG,GAAOhH,EAAQ5C,EAAG,WAAY,iBAAkByJ,GAAS,MAEvDC,IACFE,GAAOhH,EAAQ5C,EAAG,aAAc,iBAAkB0J,GAAW,MAE1DD,GAASC,IAAYC,IACxBC,GAAO5J,EAAG,MAAO,iBAAmB,KAGtC4J,GAAOhH,EAAQ5C,EAAG,aAAc,iBAAkB2J,MSsG9C,oBAAC,KAAD,CAAOpC,QAASD,EAAMC,QAASH,OAAQA,EAAQe,KAAK,OAAO7J,OAAQ,SCxHjE0B,GAAOjE,GAAGkE,KAAVD,GACR,GAA4BjE,GAAGmE,WAAvB8J,GAAR,GAAQA,MAAOC,GAAf,GAAeA,SAKA,eAA6B,IAA1BjE,EAAyB,EAAzBA,UAAWC,EAAc,EAAdA,QAC3B,OACE,oBAAC+D,GAAD,KACE,oBAACC,GAAD,CACErJ,UAAU,qBACV+E,SAAU,aACVuE,KAAM,CACJ,CACErM,KAAM,QACNkH,MAAO/E,GAAG,QAAS,kBAErB,CACEnC,KAAM,QACNkH,MAAO/E,GAAG,aAAc,qBAI3B,SAACmK,GACA,OAAQA,EAAItM,MACV,IAAK,QACH,OACE,oBAACuM,GAAD,CAAiBpE,UAAWA,EAAWC,QAASA,IAEpD,IAAK,QACH,OACE,oBAACoE,GAAD,CAAiBrE,UAAWA,EAAWC,QAASA,IAEpD,QACE,OAAO,2D,oBClCbjG,I,MAAOjE,GAAGkE,KAAVD,IACR,GAAwCjE,GAAGC,QAAnC4I,GAAR,GAAQA,OAAQjB,GAAhB,GAAgBA,UAAW7C,GAA3B,GAA2BA,SAKZ,eAAuD,IAApDkF,EAAmD,EAAnDA,UAAWsE,EAAwC,EAAxCA,aAAcrE,EAA0B,EAA1BA,QAASsE,EAAiB,EAAjBA,WAC5CC,EAAU5F,KAChB,EAAkC9D,GAAS,IAA3C,mBAAO2J,EAAP,KAAkBC,EAAlB,KAiCA,OA9BA/G,IAAU,WACK,IAAIgH,KAAW,CAC1B3O,QAASwO,aAAF,EAAEA,EAASI,QAClBC,YAAY,EACZC,OAAQ,cACRC,WAAW,EACXC,QAAS,CAAC,UACVC,QAAS,IAAIlI,KACbmI,eAAgB,EAChBC,WAAY,CACVC,MAAOpL,GAAG,QAAS,iBACnBqL,OAAQrL,GAAG,SAAU,kBAEvBsL,UAAW,CACTC,QAAS,KACTC,QAAS,KACTC,QAAQ,EACRC,OAAO,GAETC,MAAO,SAACC,GACNA,EAAOC,aAAa7F,EAAWC,GAC/B2F,EAAOE,GAAG,gBAAgB,SAAC3H,EAAOF,GAChCqG,EAAanG,EAAM4H,cACnBxB,EAAWtG,EAAI8H,cACfrB,EAAaF,EAAQI,QAAQzM,MAAM6G,gBAIxC,CAACwF,IAGF,2BAAK5J,UAAU,0BACb,2BAAKA,UAAU,kCACb,6BACEA,UAAU,8DACVoL,IAAKxB,EACLjG,KAAMkG,OC/CRzK,GAAOjE,GAAGkE,KAAVD,GACR,GAAsCjE,GAAGmE,WAAjCC,GAAR,GAAQA,KAAME,GAAd,GAAcA,UAAWD,GAAzB,GAAyBA,SAQV,IAPMrE,GAAGC,QAAhB8E,SAOO,YAA6D,IAAjDkF,EAAgD,EAAhDA,UAAWC,EAAqC,EAArCA,QAASqE,EAA4B,EAA5BA,aAAcC,EAAc,EAAdA,WAC3D,OACE,wCACE,oBAAC,GAAD,KACE,oBAAC,GAAD,KACE,8BAAKvK,GAAG,YAAa,mBAEvB,oBAAC,GAAD,KACE,oBAACiM,GAAD,CACEjG,UAAWA,EACXsE,aAAcA,EACdrE,QAASA,EACTsE,WAAYA,MAKlB,2BAAK3J,UAAU,eACb,2BAAKA,UAAU,oBACb,2BAAKA,UAAU,yBACb,2BAAKA,UAAU,mCACb,oBAACsL,GAAD,CAAelG,UAAWA,EAAWC,QAASA,KAEhD,2BAAKrF,UAAU,0BACb,oBAACuL,GAAD,CAAUnG,UAAWA,EAAWC,QAASA,MAI7C,2BAAKrF,UAAU,yBACb,2BAAKA,UAAU,mCACb,oBAACwL,GAAD,CAAWpG,UAAWA,EAAWC,QAASA,W,SCvCxD,GAA2BlK,GAAGmE,WAAtBqD,GAAR,GAAQA,KAAMC,GAAd,GAAcA,SAGC,eAAwC,IAArCtC,EAAoC,EAApCA,QAAS6D,EAA2B,EAA3BA,MAAQ5G,EAAmB,EAAnBA,MAAOiH,EAAY,EAAZA,MACxC,OAAIlE,EAEA,oBAAC,GAAD,KACE,oBAAC,GAAD,KACE,oBAAC0E,EAAD,QAON,oBAAC,GAAD,CAAMhF,UAAU,4BACd,oBAAC,GAAD,KACE,2BAAKA,UAAU,mBAAmBmE,GAClC,8BAAK5G,GACL,+BAAMiH,M,6kBChBd,I,SAAQvE,GAAa9E,GAAb8E,SACAC,GAAa/E,GAAGC,QAAhB8E,SACAC,GAA+BhF,GAAGiF,QAAlCD,2BAOO,qBACbA,IACE,SAACE,GAAD,OAAsB,SAACnE,GACrB,MAA8BgE,IAAS,GAAvC,mBAAOI,EAAP,KAAgBC,EAAhB,KACA,EAAwBL,GAAS,IAAjC,mBAAOuL,EAAP,KAAaC,EAAb,KACA,EAA0BxL,GAAS,IAAnC,mBAAOa,EAAP,KAAcC,EAAd,KAKMC,EAAS,uCAAG,mCAAAC,EAAA,6DAASC,EAAT,EAASA,SAAT,IAAmBC,cAAnB,MAA4B,GAA5B,EAChBb,GAAW,GADK,kBAKON,GAAS,CAC5BxF,KAAMU,GAAGkG,IAAIC,aAAaH,EAApB,MACDC,MAPO,OAKdS,EALc,OAUd6J,EAAQ7J,GAVM,gDAYdC,QAAQf,MAAR,MACA,4BAAI,KAAGgB,SACLf,EAAS,KAAEe,SAdC,yBAiBdxB,GAAW,GAjBG,4EAAH,sDAqBf,OACE,oBAACF,EAAD,eACEC,QAASA,EACTC,WAAYA,EACZU,UAAWA,EACXwK,KAAMA,EACNC,QAASA,EACT3K,MAAOA,EACPC,SAAUA,GACN9E,OAIV,aCxDIkD,GAAOjE,GAAGkE,KAAVD,GACAgB,GAAYjF,GAAGiF,QAAfA,QACA2C,GAAc5H,GAAGC,QAAjB2H,UAMO3C,MAAQ,CAACuL,MAATvL,EAAsB,SAAClE,GAEpC,IAAQuJ,EAAyDvJ,EAAzDuJ,OAAQL,EAAiDlJ,EAAjDkJ,UAAWC,EAAsCnJ,EAAtCmJ,QAASoG,EAA6BvP,EAA7BuP,KAAMxK,EAAuB/E,EAAvB+E,UAAWX,EAAYpE,EAAZoE,QAYrD,OAVAyC,IAAU,WACR9B,EAAU,CACRE,SAAS,oCAAD,OAAsCsE,EAAtC,gBACRrE,OAAQ,CACNmC,MAAOtB,EAA8BmD,GACrC/B,IAAKpB,EAA8BoD,QAGtC,CAACD,EAAWC,IAIb,oBAACuG,GAAD,CACEtL,QAASA,EACT/C,MAAOmE,SAAS+J,aAAD,EAACA,EAAMI,MACtB1H,MAAO/E,GAAG,cAAe,sBC3BvBA,GAAOjE,GAAGkE,KAAVD,GACAgB,GAAYjF,GAAGiF,QAAfA,QACA2C,GAAc5H,GAAGC,QAAjB2H,UAMO3C,MAAQ,CAACuL,MAATvL,EAAsB,SAAClE,GAEpC,IAAQuJ,EAAyDvJ,EAAzDuJ,OAAQL,EAAiDlJ,EAAjDkJ,UAAWC,EAAsCnJ,EAAtCmJ,QAASoG,EAA6BvP,EAA7BuP,KAAMxK,EAAuB/E,EAAvB+E,UAAWX,EAAYpE,EAAZoE,QAYrD,OAVAyC,IAAU,WACR9B,EAAU,CACRE,SAAS,oCAAD,OAAsCsE,EAAtC,sBACRrE,OAAQ,CACNmC,MAAOtB,EAA8BmD,GACrC/B,IAAKpB,EAA8BoD,QAGtC,CAACD,EAAWC,IAGb,oBAACuG,GAAD,CACEtL,QAASA,EACT/C,MAAO2L,WAAWuC,aAAD,EAACA,EAAMI,MAAMzE,QAAQ,GACtCjD,MAAO/E,GAAG,qBAAsB,iBAChCoF,MAAOpF,GAAG,UAAW,sBC3BnBA,GAAOjE,GAAGkE,KAAVD,GACAgB,GAAYjF,GAAGiF,QAAfA,QACA2C,GAAc5H,GAAGC,QAAjB2H,UAMO3C,MAAQ,CAACuL,MAATvL,EAAsB,SAAClE,GAEpC,IAAQuJ,EAAyDvJ,EAAzDuJ,OAAQL,EAAiDlJ,EAAjDkJ,UAAWC,EAAsCnJ,EAAtCmJ,QAASoG,EAA6BvP,EAA7BuP,KAAMxK,EAAuB/E,EAAvB+E,UAAWX,EAAYpE,EAAZoE,QAYrD,OAVAyC,IAAU,WACR9B,EAAU,CACRE,SAAS,oCAAD,OAAsCsE,EAAtC,oBACRrE,OAAQ,CACNmC,MAAOtB,EAA8BmD,GACrC/B,IAAKpB,EAA8BoD,QAGtC,CAACD,EAAWC,IAGb,oBAACuG,GAAD,CACEtL,QAASA,EACT/C,MAAO2L,WAAWuC,aAAD,EAACA,EAAMI,MAAMzE,QAAQ,GACtCjD,MAAO/E,GAAG,mBAAoB,iBAC9BoF,MAAOpF,GAAG,UAAW,sB,QCzBnBA,GAAOjE,GAAGkE,KAAVD,GAER,GAAuDjE,GAAGmE,WAAlDC,GAAR,GAAQA,KAAME,GAAd,GAAcA,UAAWD,GAAzB,GAAyBA,SAAUgD,GAAnC,GAAmCA,QAASK,GAA5C,GAA4CA,OAS5C,GAAgC1H,GAAGC,QAA3B2H,GAAR,GAAQA,UAAW7C,GAAnB,GAAmBA,SACXD,GAAa9E,GAAb8E,SA4JO6L,GAxJF,SAAC,GAA6D,IAAD,QAA1DxQ,EAA0D,EAA1DA,MAAO8J,EAAmD,EAAnDA,UAAWC,EAAwC,EAAxCA,QAASqE,EAA+B,EAA/BA,aAAcC,EAAiB,EAAjBA,WACvD,EAA8BzJ,IAAS,GAAvC,mBAAOI,EAAP,KAAgBC,EAAhB,KACA,EAAwBL,GAAS,IAAjC,mBAAOoF,EAAP,KAAayG,EAAb,KACA,EAA0B7L,GAAS,IAAnC,mBAAOa,EAAP,KAAcC,EAAd,KAMMgL,EAAO,uCAAG,8BAAA9K,EAAA,6DACdX,GAAW,GADG,kBAGKN,GAAS,CACxBoB,IAAI,wBAAD,OAA0B/F,SAA1B,UAA0BA,EAAO8F,cAAjC,aAA0B,EAAe9G,GAAzC,mBAJO,OAGRgL,EAHQ,OAMZyG,EAAQzG,GANI,gDAQG,kBAAX,KAAEpL,MACJ8G,EAAS,kBATC,yBAYZT,GAAW,GAZC,4EAAH,qDAoBb,OAJAwC,IAAU,WACRiJ,MACC,IAECjL,EAEA,oBAAKf,UAAU,eACb,aAAC,GAAD,KACE,aAAC,GAAD,KACE,uBAAKe,MAQb,oBAAKf,UAAU,eACb,aAAC,GAAD,KACE,aAAC,GAAD,KACE,aAAC,GAAD,CAAQ4D,aAAW,EAACE,QAxCf,WACX9I,EAAQ+B,KAAR,QAuCM,KACUqC,GAAG,oBAAqB,oBAItC,aAAC,GAAD,CAAM6M,MAAI,GACR,aAAC,GAAD,KACG3L,EACC,aAAC,GAAD,MAEA,oBACE4L,IAAKA,aAAF,6eAkBH,wBACE,mBAAIlM,UAAU,2BAA2BsF,aAAzC,EAAyCA,EAAMrI,MAC/C,kBACEiP,IAAKA,aAAF,8HAKF5G,aANH,EAMGA,EAAM6G,UAGR7G,EAAKhL,IACN,oBACE0F,UAAU,2BACVkM,IAAKA,aAAF,uFAIH,aAAC,GAAD,CACEpM,KAAI,0CAAqCwF,aAArC,EAAqCA,EAAMhL,IAC/CsJ,aAAW,EACXwI,SAAO,GAENhN,GAAG,eAAgB,iBALtB,SAYV,aAAC,GAAD,KACE,aAACiM,GAAD,CACEjG,UAAWA,EACXsE,aAAcA,EACdrE,QAASA,EACTsE,WAAYA,MAKlB,oBAAK3J,UAAU,gCACb,oBAAKA,UAAU,yBACb,oBAAKA,UAAU,0BACb,aAACqM,GAAD,CACE5G,OAAQnK,SAAF,UAAEA,EAAO8F,cAAT,aAAE,EAAe9G,GACvB8K,UAAWA,EACXC,QAASA,KAGb,oBAAKrF,UAAU,0BACb,aAACsM,GAAD,CACE7G,OAAQnK,SAAF,UAAEA,EAAO8F,cAAT,aAAE,EAAe9G,GACvB8K,UAAWA,EACXC,QAASA,KAGb,oBAAKrF,UAAU,0BACb,aAACuM,GAAD,CACE9G,OAAQnK,SAAF,UAAEA,EAAO8F,cAAT,aAAE,EAAe9G,GACvB8K,UAAWA,EACXC,QAASA,MAIf,oBAAKrF,UAAU,yBACb,oBAAKA,UAAU,mCACb,aAACwL,GAAD,CACEpG,UAAWA,EACXC,QAASA,EACTI,OAAQnK,SAAF,UAAEA,EAAO8F,cAAT,aAAE,EAAe9G,UCjK7B8E,GAAOjE,GAAGkE,KAAVD,GACAgB,GAAYjF,GAAGiF,QAAfA,QACA2C,GAAc5H,GAAGC,QAAjB2H,UAMO3C,MAAQ,CAACuL,MAATvL,EAAsB,SAAClE,GACpC,IAAQsQ,EAA2DtQ,EAA3DsQ,SAAUpH,EAAiDlJ,EAAjDkJ,UAAWC,EAAsCnJ,EAAtCmJ,QAASoG,EAA6BvP,EAA7BuP,KAAMxK,EAAuB/E,EAAvB+E,UAAWX,EAAYpE,EAAZoE,QAYvD,OAVAyC,IAAU,WACR9B,EAAU,CACRE,SAAS,qCAAD,OAAuCqL,EAAvC,sBACRpL,OAAQ,CACNmC,MAAOtB,EAA8BmD,GACrC/B,IAAKpB,EAA8BoD,QAGtC,CAACD,EAAWC,IAIb,oBAACuG,GAAD,CACEtL,QAASA,EACT/C,MAAOmE,SAAS+J,GAChBtH,MAAO/E,GAAG,qBAAsB,iBAChCoF,MAAOpF,GAAG,UAAW,sBC3B3B,GAAwBjE,GAAGkE,KAAnBD,GAAR,GAAQA,GACR,IADA,GAAY4C,QACe7G,GAAGmE,YAAtBqD,GAAR,GAAQA,KAAMC,GAAd,GAAcA,SACd,GAAwCzH,GAAGC,QAAnC8E,GAAR,GAAQA,SAAU6C,GAAlB,GAAkBA,UAQH,IARf,GAA6BiB,OAQd,SAAC9H,GACd,IAAQsQ,EAAiCtQ,EAAjCsQ,SAAUpH,EAAuBlJ,EAAvBkJ,UAAWC,EAAYnJ,EAAZmJ,QAC7B,EAA8BnF,IAAS,GAAvC,mBAAOI,EAAP,KAAgBC,EAAhB,KAEA,EAA4BL,GAAS,CACnC,CACEjD,KAAM,QACNE,KAAM,MAHV,mBAAOqJ,EAAP,KAAeC,EAAf,KA4CA1D,IAAU,WApCRxC,GAAW,GACXN,GAAS,CACPxF,KAAMU,GAAGkG,IAAIC,aAAP,4CACiCkL,EADjC,aAEJ,CACEjJ,MAAOtB,EAA8BmD,GACrC/B,IAAKpB,EAA8BoD,OAItCtL,MAAK,SAACoD,GACL,IAAIqJ,EAAS,GACTrJ,EAAKiH,QACPjH,EAAKH,SAAQ,SAACqL,GAEZ7B,EAAOzJ,KAAK,CACV0B,EAAG4J,EAAKoE,WACR/N,EAAG2J,EAAK3H,WAId+F,EAAU,CACR,CACExJ,KAAM,UACNE,KAAMqJ,QAIX+B,OAAM,SAACvO,GACN8H,QAAQf,MAAM/G,MAEfwO,SAAQ,WACPjI,GAAW,QAMd,CAAC6E,EAAWC,IAEf,IAAMqB,EAAQ,CACZC,QAAS,CACPD,MAAO,CACLE,QAAS,CACPC,MAAM,IAGV6F,WAAY,EACZ5F,MAAO,CACLC,OAAQ,CACNC,UAAW,SAAUC,GACnB,OAAOvF,SAASuF,MAItBK,MAAO,CACLP,OAAQ,CACNC,UAAW,SAAUC,GACnB,OpBzDc8B,EoByDG9B,EpBxD3B8B,EAAmC,IAAzBrH,SAASqH,GAAW,GACvB,IAAI5G,KAAK4G,GAASzG,cAAcvG,OAAO,GAAI,GAF3B,IAACgN,KoB6DpB1B,OAAQ,CAAC,WACTI,WAAY,CACVC,SAAS,GAEXC,OAAQ,CAAEC,MAAO,UACjBjJ,KAAM,CACJ4I,KAAM,WACNM,SAAU,CACRC,eAAgB,EAChBC,YAAa,GACbC,UAAW,GACXC,MAAO,CAAC,EAAG,GAAI,SAMvB,OAAI3H,EAEA,oBAAC,GAAD,KACE,oBAAC,GAAD,KACE,oBAAC0E,EAAD,QAON,oBAAC,GAAD,KACE,oBAAC,GAAD,KACE,2BAAKhF,UAAU,sBACZZ,GAAG,qBAAsB,kBAE5B,oBAAC,KAAD,CACEuH,QAASD,EAAMC,QACfH,OAAQA,EACRe,KAAK,OACL7J,OAAQ,UCzHV0B,GAAOjE,GAAGkE,KAAVD,GACAgB,GAAYjF,GAAGiF,QAAfA,QACA2C,GAAc5H,GAAGC,QAAjB2H,UAMO3C,MAAQ,CAACuL,MAATvL,EAAsB,SAAClE,GACpC,IAAQsQ,EAA2DtQ,EAA3DsQ,SAAUpH,EAAiDlJ,EAAjDkJ,UAAWC,EAAsCnJ,EAAtCmJ,QAASoG,EAA6BvP,EAA7BuP,KAAMxK,EAAuB/E,EAAvB+E,UAAWX,EAAYpE,EAAZoE,QAavD,OAVAyC,IAAU,WACR9B,EAAU,CACRE,SAAS,qCAAD,OAAuCqL,EAAvC,UACRpL,OAAQ,CACNmC,MAAOtB,EAA8BmD,GACrC/B,IAAKpB,EAA8BoD,QAGtC,CAACD,EAAWC,IAGb,oBAACuG,GAAD,CACEtL,QAASA,EACT/C,MAAOmE,SAAS+J,GAChBtH,MAAO/E,GAAG,eAAgB,sB,slBCxBhC,IAAQuN,GAAcxR,GAAGgC,KAAjBwP,UAEO,eAAgE,IAAD,EAW1C,IAXlBC,EAA4D,EAA5DA,IAAKC,EAAuD,EAAvDA,OAAQC,EAA+C,EAA/CA,SAAUC,EAAqC,EAArCA,WAAYC,EAAyB,EAAzBA,aAAczF,EAAW,EAAXA,KACzD0F,EAAyCF,EAAzCE,SAAUC,EAA+BH,EAA/BG,aAAcC,EAAiBJ,EAAjBI,aAE1BC,EAAUT,IAAU,SAACU,GAAY,IAAD,EACpC,iBAAOA,EAAO,+BAAd,aAAO,EAAgCD,aAGnClB,EAAMS,IAAU,SAACU,GAAY,IAAD,EAChC,iBAAOA,EAAO,+BAAd,aAAO,EAAgCC,eAwBzC,OACE,2BACEtN,UAAU,oCACVN,MAAK,UACH,gCAAgC,GAAhC,OAAoCmN,aAApC,EAAoCA,EAAQU,cAA5C,OACIV,WAAQW,mBACR,CAAE,6BAA8BX,EAAOW,oBACvC,IACAV,WAAUhH,MAAQ,CAAE,oBAAqBgH,EAAShH,OAAU,IAL7D,IAMH,sCAAsC,GAAtC,QACE+G,SAAA,UAAAA,EAAQY,wBAAR,eAA0BF,gBAAiB,EAD7C,MAGA,6BAA6B,GAA7B,QAAiCT,aAAA,EAAAA,EAAUY,aAAc,GAAzD,SAGF,oBAAC,KAAD,CACEd,IAAKA,EACLV,IAAKA,EACLyB,SAAS,EACTC,QAAQ,WACRf,OAAQA,EACRgB,MAAO,CACLC,UAAWf,aAAF,EAAEA,EAAYgB,iBACvBC,QAASjB,aAAF,EAAEA,EAAYiB,SAEvBZ,QAAS,CACPa,UAAWb,aAAF,EAAEA,EAASc,YAEtBC,SACItB,YAAQuB,WAAY,CACpB,CACEC,KAAM,WACN7J,MAAO,UACP8J,QAAS,KACT1B,IAAK,2BACL2B,SAAS,IAIfzB,SAAUA,EACVG,SAAUA,EACVuB,gBAAiBzB,EACjB0B,OAAQ1B,EAAW0B,OACnBC,SAAUnH,GAEV,2BAAKoH,KAAK,eACPxB,aAAA,EAAAA,EAAczF,WACbwF,aADD,EACCA,EAAcxF,UAlEpB,2BACE1H,UAAU,kCACVN,MAAO,CACLkP,SAAU,WACVnR,MAAM,GAAD,QAAKyP,aAAA,EAAAA,EAAczP,QAAS,IAA5B,KACLoR,KAAK,GAAD,OAA4C,MAAtC3B,SAAA,UAAAA,EAAc4B,kBAAd,eAA0BrQ,IAAK,IAArC,KACJsQ,IAAI,GAAD,OAA4C,MAAtC7B,SAAA,UAAAA,EAAc4B,kBAAd,eAA0BpQ,IAAK,IAArC,OAGL,2BACEkO,IAAKM,aAAF,EAAEA,EAAcN,IACnBlN,MAAO,CACLlB,UAAW,wCAwDZwO,M,6kBCrFX,IAAQ5N,GAAOjE,GAAGkE,KAAVD,GAER,GACEjE,GAAGmE,WADGC,GAAR,GAAQA,KAAME,GAAd,GAAcA,UAAWD,GAAzB,GAAyBA,SAAUgD,GAAnC,GAAmCA,QAASK,GAA5C,GAA4CA,OAAQmM,GAApD,GAAoDA,YAUpD,GAAgC7T,GAAGC,QAA3B2H,GAAR,GAAQA,UAAW7C,GAAnB,GAAmBA,SACXD,GAAa9E,GAAb8E,SAmMOgP,GAjMD,SAAC,GAA6D,IAAD,MAA1D3T,EAA0D,EAA1DA,MAAO8J,EAAmD,EAAnDA,UAAWC,EAAwC,EAAxCA,QAASqE,EAA+B,EAA/BA,aAAcC,EAAiB,EAAjBA,WACxD,EAA8BzJ,IAAS,GAAvC,mBAAOI,EAAP,KAAgBC,EAAhB,KACA,EAA0BL,GAAS,IAAnC,mBAAO2F,EAAP,KAAcqJ,EAAd,KACA,EAA0BhP,GAAS,IAAnC,mBAAOa,EAAP,KAAcC,EAAd,KACA,EAAgCd,GAAS,MAAzC,mBAAOiP,EAAP,KAAiBC,EAAjB,KACA,EAA8BlP,IAAS,GAAvC,mBAAOmP,EAAP,KAAgBC,EAAhB,KAMMC,EAAQ,uCAAG,kCAAArO,EAAA,6DACfX,GAAW,GADI,kBAGKN,GAAS,CACzBoB,IAAI,GAAD,iBAAK4E,oBAAL,aAAK,EAAcG,MAAnB,iBAA0BH,oBAA1B,aAA0B,EAAcI,oBAAxC,kBAAqE/K,SAArE,UAAqEA,EAAO8F,cAA5E,aAAqE,EAAe9G,MAJ5E,OAGTuL,EAHS,OAMbqJ,EAASrJ,GACTuJ,EAAYvJ,aAAD,EAACA,EAAO1B,OAPN,gDASE,kBAAX,KAAEjK,MACJ8G,EAAS,mBAVE,yBAabT,GAAW,GAbE,4EAAH,qDAiBRiP,EAAQ,uCAAG,8BAAAtO,EAAA,6DACfY,QAAQ2N,IAAR,2BAAgCN,IAChC5O,GAAW,GAFI,SAIPpD,EAJO,SAKR0I,GACA,CAAE1B,MAAOgL,IAND,SAQKhU,GAAG8E,SAAS,CAC5ByP,OAAQ,OACRrO,IAAKlG,GAAGkG,IAAIC,aAAP,UACA2E,aAAaG,MADb,OACoBH,aAAaI,oBADjC,kBAC8DR,EAAMvL,IACvE,CAAEqV,QAAS,QAEbxS,SAdW,UAQTyS,EARS,6BAkBLC,aAlBK,OAoBbP,GAAW,GACXJ,EAASU,GArBI,kDAuBb5O,EAAS,iCAAGe,QAAU,KAAEA,QAAU8N,cAvBrB,yBAyBbtP,GAAW,GAzBE,6EAAH,qDA6BRuP,EAAgB,WACpBV,EAAYvJ,aAAD,EAACA,EAAO1B,OACnBmL,GAAW,IAuDb,OAJAvM,IAAU,WACRwM,MACC,IAECxO,EAEA,2BAAKf,UAAU,eACb,oBAAC,GAAD,KACE,oBAAC,GAAD,KACE,8BAAKe,MAQb,2BAAKf,UAAU,eACb,oBAAC,GAAD,KACE,oBAAC,GAAD,KACE,oBAAC,GAAD,CAAQ4D,aAAW,EAACE,QA3Hf,WACX9I,EAAQ+B,KAAR,QA0HM,KACUqC,GAAG,oBAAqB,oBAItC,oBAAC,GAAD,CAAM6M,MAAI,GACR,oBAAC,GAAD,KAzEA3L,EACK,oBAAC,GAAD,MACE+O,EAEP,2BAAKrP,UAAU,kDACb,oBAACgP,GAAD,CACEhP,UAAU,4BACVuH,KAAK,OACLhK,MAAO4R,EACPY,SAAU,SAAC5L,GAAD,OAAWiL,EAAYjL,MAEnC,oBAAC,GAAD,CACEnE,UAAU,6BACVgQ,WAAS,EACTlM,QAAS0L,GAER,IALH,OAMO,KAEP,oBAAC,GAAD,CACExP,UAAU,6BACV4D,aAAW,EACXE,QAASgM,GAER,IALH,SAMS,MAMX,2BAAK9P,UAAU,sBACb,0BAAIA,UAAU,oDACX6F,aADH,EACGA,EAAO1B,OAGV,8BACEnE,UAAU,2BACV8D,QAAS,kBAAMwL,GAAW,KAE1B,4BAAMtP,UAAU,yCAkCpB,oBAAC,GAAD,KACE,oBAACqL,GAAD,CACEjG,UAAWA,EACXsE,aAAcA,EACdrE,QAASA,EACTsE,WAAYA,MAKlB,2BAAK3J,UAAU,gCACb,2BAAKA,UAAU,yBACb,2BAAKA,UAAU,mCACb,oBAACiQ,GAAD,CACEzD,SAAUlR,SAAF,UAAEA,EAAO8F,cAAT,aAAE,EAAe9G,GACzB8K,UAAWA,EACXC,QAASA,KAGb,2BAAKrF,UAAU,4BACV3D,OAAOlC,KAAK0L,GAAS,IAAIzB,QAC1B,oBAAC8L,GAAD,CACEtD,IAAK/G,aAAF,EAAEA,EAAO+G,IACZG,WAAY,GACZxF,KAAM1B,aAAF,EAAEA,EAAO0B,KACbsF,OAAQ,CACN,cAAc,EACdsD,MAAM,EACNC,UAAU,EACV,gBAAgB,MAKxB,2BAAKpQ,UAAU,0BACb,oBAACqQ,GAAD,CACE7D,SAAUlR,SAAF,UAAEA,EAAO8F,cAAT,aAAE,EAAe9G,GACzB8K,UAAWA,EACXC,QAASA,MAIf,2BAAKrF,UAAU,yBACb,2BAAKA,UAAU,mCACb,oBAACsQ,GAAD,CACE9D,SAAUlR,SAAF,UAAEA,EAAO8F,cAAT,aAAE,EAAe9G,GACzB8K,UAAWA,EACXC,QAASA,SCvMVjJ,GAAS,CACpBmU,UAAW,CACT9V,KAAM,KAERoL,MAAO,CACLpL,KAAM,cAER6K,KAAM,CACJ7K,KAAM,cCRFyF,GAAa/E,GAAGC,QAAhB8E,SAWO,cAAO,IAAD,EACbsQ,EAAc,WAClBC,OAAOC,SAAS,EAAG,IAGrB,EAAkCxQ,GAChC,IAAIiC,KAAKA,KAAKwO,MAAQ,SADxB,mBAAOvL,EAAP,KAAkBsE,EAAlB,KAGA,EAA8BxJ,GAAS,IAAIiC,MAA3C,mBAAOkD,EAAP,KAAgBsE,EAAhB,KAEA,OAAI,UAAC1D,oBAAD,OAAC,EAAc2K,UASjB,2BAAK5Q,UAAU,6BACb,oBAAC,EAAD,CAAQ5D,OAAQA,IACd,oBAACX,EAAD,CAAOhB,KAAM2B,GAAOmU,UAAU9V,KAAMiB,QAAS8U,GAC3C,oBAACK,GAAD,CACEzL,UAAWA,EACXC,QAASA,EACTqE,aAAcA,EACdC,WAAYA,KAGhB,oBAAClO,EAAD,CAAOhB,KAAM2B,GAAOyJ,MAAMpL,KAAMiB,QAAS8U,GACvC,oBAAC,GAAD,CACEpL,UAAWA,EACXC,QAASA,EACTqE,aAAcA,EACdC,WAAYA,KAGhB,oBAAClO,EAAD,CAAOhB,KAAM2B,GAAOkJ,KAAK7K,KAAMiB,QAAS8U,GACtC,oBAAC,GAAD,CACEpL,UAAWA,EACXC,QAASA,EACTqE,aAAcA,EACdC,WAAYA,OA9BlB,2BAAK3J,UAAU,6BACb,oBAAC8Q,EAAD,QCxBAhM,GAAW3J,GAAGC,QAAd0J,OAIRiM,cAeAjM,GAAO,oBAACkM,GAAD,MAASC,SAASC,eAAe,4B","file":"analytics/admin-379e676f.js","sourcesContent":["function webpackEmptyAsyncContext(req) {\n\t// Here Promise.resolve().then() is used instead of new Promise() to prevent\n\t// uncaught exception popping up in devtools\n\treturn Promise.resolve().then(function() {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t});\n}\nwebpackEmptyAsyncContext.keys = function() { return []; };\nwebpackEmptyAsyncContext.resolve = webpackEmptyAsyncContext;\nmodule.exports = webpackEmptyAsyncContext;\nwebpackEmptyAsyncContext.id = 34;","import qs from \"querystringify\";\nexport function locationToRoute(location) {\n // location comes from the history package\n return {\n path: location.pathname,\n hash: location.hash,\n query: qs.parse(location.search),\n };\n}\n","import { createBrowserHistory } from \"history\";\nimport { locationToRoute } from \"./utils\";\n\nexport const history = createBrowserHistory();\nexport const RouterContext = wp.element.createContext({\n route: locationToRoute(history.location),\n});\n","import { RouterContext } from \"./context\";\nconst { useContext } = wp.element;\nimport { match } from \"path-to-regexp\";\nlet prev = \"\";\n\nexport function Route({ path, onRoute, children }) {\n // Extract route from RouterContext\n const { route } = useContext(RouterContext);\n\n const checkMatch = match(`${path}`);\n const matched = checkMatch(`${route.hash.substr(1)}`);\n\n if (!matched) {\n return null;\n }\n\n if (onRoute) {\n if (prev !== matched.path) {\n onRoute();\n }\n prev = matched.path;\n }\n\n return <div>{wp.element.cloneElement(children, { route: matched })}</div>;\n}\n","const { useContext } = wp.element;\nimport { RouterContext, history } from \"./context\";\nimport classNames from \"classnames\";\nimport { match } from \"path-to-regexp\";\n\nexport function Link(props) {\n const { to, onClick, children, activeClassName } = props;\n const { route } = useContext(RouterContext);\n\n let state = { ...props };\n delete state.activeClassName;\n\n const isActive = () => {\n const checkMatch = match(`${to}`);\n return checkMatch(`${route.hash.substr(1)}`);\n };\n\n const handleClick = (e) => {\n e.preventDefault();\n // Dont' navigate if current path\n if (route.path === to) {\n return;\n }\n // Trigger onClick prop manually\n if (onClick) {\n onClick(e);\n }\n // Use history API to navigate page\n history.push(`#${to}`);\n };\n\n return (\n <a\n {...state}\n className={classNames({ [activeClassName]: isActive() }, props.className)}\n onClick={handleClick}\n >\n {children}\n </a>\n );\n}\n","const { Component } = wp.element;\nimport { locationToRoute } from \"./utils\";\nimport { history, RouterContext } from \"./context\";\nimport { Route } from \"./route\";\nimport { Link } from \"./link\";\nimport { match } from \"path-to-regexp\";\n\nclass Router extends Component {\n constructor(props) {\n super(props);\n\n // Convert our routes into an array for easy 404 checking\n this.routes = Object.keys(props.routes).map(\n (key) => props.routes[key].path\n );\n\n // Listen for path changes from the history API\n this.unlisten = history.listen(this.handleRouteChange);\n\n const route = locationToRoute(history.location);\n\n // Define the initial RouterContext value\n this.state = {\n route,\n defaultRoute: props?.defaultRoute ? `#${props?.defaultRoute}` : \"#/\",\n };\n }\n\n componentWillUnmount() {\n // Stop listening for changes if the Router component unmounts\n this.unlisten();\n }\n\n handleRouteChange = (location) => {\n const route = locationToRoute(location?.location);\n this.setState({ route: route });\n };\n\n render() {\n // Define our variables\n const { children, NotFound } = this.props;\n const { route, defaultRoute } = this.state;\n\n if (!route.hash) {\n history.push(defaultRoute);\n return <div></div>;\n }\n\n let matched = false;\n // match route\n (this.routes || []).forEach((name) => {\n const checkMatch = match(route.hash.substr(1));\n const isMatched = checkMatch(`${route.hash.substr(1)}`);\n if (!isMatched) {\n return;\n }\n matched = {\n name,\n data: isMatched,\n };\n });\n\n const routerContextValue = { route, matched };\n\n // Check if 404 if no route matched\n const is404 = !matched;\n\n return (\n <RouterContext.Provider value={routerContextValue}>\n {is404 ? <div>Not found</div> : children}\n </RouterContext.Provider>\n );\n }\n}\nexport { history, RouterContext, Router, Route, Link };\n","export default ({ width, height }) => {\n return (\n <svg\n id=\"e8f68bdd-4984-4f2e-95b7-7fc8ec281257\"\n data-name=\"Layer 1\"\n width={width}\n height={height}\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlnsXlink=\"http://www.w3.org/1999/xlink\"\n viewBox=\"0 0 918.14 765.54\"\n >\n <defs>\n <linearGradient\n id=\"27aa7b70-b106-4a00-be67-693c8380e41d\"\n x1=\"397.74\"\n y1=\"717.25\"\n x2=\"397.74\"\n y2=\"86.11\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop offset=\"0\" stop-color=\"gray\" stop-opacity=\"0.25\" />\n <stop offset=\"0.54\" stop-color=\"gray\" stop-opacity=\"0.12\" />\n <stop offset=\"1\" stop-color=\"gray\" stop-opacity=\"0.1\" />\n </linearGradient>\n <linearGradient\n id=\"46a816da-c484-41ec-8a6f-fbf14454d910\"\n x1=\"288.88\"\n y1=\"378.44\"\n x2=\"288.88\"\n y2=\"209.65\"\n xlinkHref=\"#27aa7b70-b106-4a00-be67-693c8380e41d\"\n />\n <linearGradient\n id=\"32b634d8-28f1-48d9-a868-f602a2cad942\"\n x1=\"288.88\"\n y1=\"328.29\"\n x2=\"288.88\"\n y2=\"223.1\"\n xlinkHref=\"#27aa7b70-b106-4a00-be67-693c8380e41d\"\n />\n <clipPath\n id=\"7a4c6aff-0be0-461b-a111-b3ae1b8fbf73\"\n transform=\"translate(-140.93 -67.23)\"\n >\n <rect\n id=\"8cc91f6d-19b0-43cc-9c18-2faa83ac34ba\"\n data-name=\"&lt;Rectangle&gt;\"\n x=\"354.51\"\n y=\"291.55\"\n width=\"150.6\"\n height=\"101.52\"\n fill=\"#fff\"\n />\n </clipPath>\n <linearGradient\n id=\"38f1cb81-8fac-4205-a0ff-a33ac00d354c\"\n x1=\"288.88\"\n y1=\"594.94\"\n x2=\"288.88\"\n y2=\"426.14\"\n xlinkHref=\"#27aa7b70-b106-4a00-be67-693c8380e41d\"\n />\n <linearGradient\n id=\"6fc01aaf-135e-403e-a209-43b2a4fe59f1\"\n x1=\"288.88\"\n y1=\"544.79\"\n x2=\"288.88\"\n y2=\"439.6\"\n xlinkHref=\"#27aa7b70-b106-4a00-be67-693c8380e41d\"\n />\n <clipPath\n id=\"79ce363a-d134-40e4-9f82-b96d04a36978\"\n transform=\"translate(-140.93 -67.23)\"\n >\n <rect\n id=\"5b44e697-61fe-43bd-9a58-5f3e41301748\"\n data-name=\"&lt;Rectangle&gt;\"\n x=\"354.51\"\n y=\"508.05\"\n width=\"150.6\"\n height=\"101.52\"\n fill=\"#fff\"\n />\n </clipPath>\n <linearGradient\n id=\"54803c44-522d-4b9e-9a34-f1f7b43e8483\"\n x1=\"671.57\"\n y1=\"760.34\"\n x2=\"671.57\"\n y2=\"129.2\"\n gradientTransform=\"translate(1109.43 -194.1) rotate(90)\"\n xlinkHref=\"#27aa7b70-b106-4a00-be67-693c8380e41d\"\n />\n <linearGradient\n id=\"089a6a47-adaa-499b-aefb-cd6464b62fb8\"\n x1=\"670.96\"\n y1=\"553.63\"\n x2=\"670.96\"\n y2=\"387.28\"\n gradientTransform=\"translate(1129.51 -168.41) rotate(90)\"\n xlinkHref=\"#27aa7b70-b106-4a00-be67-693c8380e41d\"\n />\n <linearGradient\n id=\"fd8d88e0-7826-450d-9e0b-001d1be709c2\"\n x1=\"637.66\"\n y1=\"754.12\"\n x2=\"637.66\"\n y2=\"601.05\"\n xlinkHref=\"#27aa7b70-b106-4a00-be67-693c8380e41d\"\n />\n <linearGradient\n id=\"8d1793c5-b76e-44e2-a52e-569460402331\"\n x1=\"778.37\"\n y1=\"673.86\"\n x2=\"778.37\"\n y2=\"569.13\"\n xlinkHref=\"#27aa7b70-b106-4a00-be67-693c8380e41d\"\n />\n <linearGradient\n id=\"4745700d-8097-45ff-9f71-625443fc4ad8\"\n x1=\"778.37\"\n y1=\"774.41\"\n x2=\"778.37\"\n y2=\"713.66\"\n xlinkHref=\"#27aa7b70-b106-4a00-be67-693c8380e41d\"\n />\n </defs>\n <title>secure data</title>\n <g opacity=\"0.5\">\n <rect\n x=\"162.9\"\n y=\"86.11\"\n width=\"469.69\"\n height=\"631.14\"\n fill=\"url(#27aa7b70-b106-4a00-be67-693c8380e41d)\"\n />\n </g>\n <rect\n x=\"169.02\"\n y=\"94.67\"\n width=\"455.01\"\n height=\"609.12\"\n fill=\"#f2f2f2\"\n />\n <rect x=\"204.49\" y=\"120.36\" width=\"156.56\" height=\"4.89\" fill=\"#e0e0e0\" />\n <rect\n x=\"204.49\"\n y=\"142.37\"\n width=\"156.56\"\n height=\"4.89\"\n fill=\"#6c63ff\"\n opacity=\"0.7\"\n />\n <rect x=\"384.29\" y=\"120.36\" width=\"156.56\" height=\"4.89\" fill=\"#e0e0e0\" />\n <rect x=\"408.75\" y=\"259.8\" width=\"156.56\" height=\"4.89\" fill=\"#e0e0e0\" />\n <rect x=\"412.42\" y=\"273.25\" width=\"156.56\" height=\"4.89\" fill=\"#e0e0e0\" />\n <rect x=\"419.76\" y=\"286.7\" width=\"156.56\" height=\"4.89\" fill=\"#e0e0e0\" />\n <rect x=\"408.75\" y=\"476.29\" width=\"156.56\" height=\"4.89\" fill=\"#e0e0e0\" />\n <rect x=\"412.42\" y=\"489.75\" width=\"156.56\" height=\"4.89\" fill=\"#e0e0e0\" />\n <rect x=\"419.76\" y=\"503.2\" width=\"156.56\" height=\"4.89\" fill=\"#e0e0e0\" />\n <g opacity=\"0.5\">\n <rect\n x=\"205.71\"\n y=\"209.65\"\n width=\"166.35\"\n height=\"168.79\"\n fill=\"url(#46a816da-c484-41ec-8a6f-fbf14454d910)\"\n />\n </g>\n <rect\n x=\"206.76\"\n y=\"213.32\"\n width=\"163.72\"\n height=\"161.45\"\n fill=\"#f5f5f5\"\n />\n <g opacity=\"0.5\">\n <rect\n x=\"212.53\"\n y=\"223.1\"\n width=\"152.7\"\n height=\"105.19\"\n fill=\"url(#32b634d8-28f1-48d9-a868-f602a2cad942)\"\n />\n </g>\n <rect\n id=\"689f37f3-cc41-448d-b172-63ec123bc985\"\n data-name=\"&lt;Rectangle&gt;\"\n x=\"213.58\"\n y=\"224.32\"\n width=\"150.6\"\n height=\"101.52\"\n fill=\"#fff\"\n />\n <g clip-path=\"url(#7a4c6aff-0be0-461b-a111-b3ae1b8fbf73)\">\n <polygon\n points=\"200.82 322.18 238.74 263.46 254.64 289.15 288.88 253.68 318.24 289.15 343.93 236.56 409.98 341.75 195.93 334.41 200.82 322.18\"\n fill=\"#6c63ff\"\n opacity=\"0.4\"\n />\n <circle cx=\"230.17\" cy=\"239\" r=\"11.01\" fill=\"#6c63ff\" opacity=\"0.4\" />\n </g>\n <g opacity=\"0.5\">\n <rect\n x=\"205.71\"\n y=\"426.14\"\n width=\"166.35\"\n height=\"168.79\"\n fill=\"url(#38f1cb81-8fac-4205-a0ff-a33ac00d354c)\"\n />\n </g>\n <rect\n x=\"206.76\"\n y=\"429.81\"\n width=\"163.72\"\n height=\"161.45\"\n fill=\"#f5f5f5\"\n />\n <g opacity=\"0.5\">\n <rect\n x=\"212.53\"\n y=\"439.6\"\n width=\"152.7\"\n height=\"105.19\"\n fill=\"url(#6fc01aaf-135e-403e-a209-43b2a4fe59f1)\"\n />\n </g>\n <rect\n id=\"b429ac3a-f8a8-4171-bcce-5b6c002c0714\"\n data-name=\"&lt;Rectangle&gt;\"\n x=\"213.58\"\n y=\"440.82\"\n width=\"150.6\"\n height=\"101.52\"\n fill=\"#fff\"\n />\n <g clip-path=\"url(#79ce363a-d134-40e4-9f82-b96d04a36978)\">\n <polygon\n points=\"200.82 538.67 238.74 479.96 254.64 505.65 288.88 470.18 318.24 505.65 343.93 453.05 409.98 558.24 195.93 550.9 200.82 538.67\"\n fill=\"#bdbdbd\"\n opacity=\"0.4\"\n />\n <circle cx=\"230.17\" cy=\"455.5\" r=\"11.01\" fill=\"#bdbdbd\" opacity=\"0.4\" />\n </g>\n <g opacity=\"0.5\">\n <rect\n x=\"349.09\"\n y=\"242.63\"\n width=\"631.14\"\n height=\"469.69\"\n transform=\"translate(-74.16 969.06) rotate(-78.76)\"\n fill=\"url(#54803c44-522d-4b9e-9a34-f1f7b43e8483)\"\n />\n </g>\n <rect\n x=\"359.37\"\n y=\"247.33\"\n width=\"609.12\"\n height=\"455.01\"\n transform=\"translate(-72.16 966.22) rotate(-78.76)\"\n fill=\"#fff\"\n />\n <rect\n x=\"523.5\"\n y=\"197.22\"\n width=\"322.91\"\n height=\"4.89\"\n transform=\"translate(-88.86 -196.94) rotate(11.24)\"\n fill=\"#e0e0e0\"\n />\n <rect\n x=\"433.36\"\n y=\"650.7\"\n width=\"322.91\"\n height=\"4.89\"\n transform=\"translate(-2.18 -170.66) rotate(11.24)\"\n fill=\"#e0e0e0\"\n />\n <rect\n x=\"428.58\"\n y=\"671.14\"\n width=\"249.52\"\n height=\"4.89\"\n transform=\"translate(1.01 -162.18) rotate(11.24)\"\n fill=\"#e0e0e0\"\n />\n <rect\n x=\"424.6\"\n y=\"683.47\"\n width=\"92.96\"\n height=\"4.89\"\n transform=\"translate(1.84 -145.91) rotate(11.24)\"\n fill=\"#6c63ff\"\n opacity=\"0.7\"\n />\n <rect\n x=\"519.57\"\n y=\"209.08\"\n width=\"161.45\"\n height=\"4.89\"\n transform=\"translate(-88.17 -180.2) rotate(11.24)\"\n fill=\"#6c63ff\"\n opacity=\"0.7\"\n />\n <rect\n x=\"512.84\"\n y=\"249.31\"\n width=\"291.11\"\n height=\"4.89\"\n transform=\"translate(-79.21 -190.76) rotate(11.24)\"\n fill=\"#e0e0e0\"\n />\n <rect\n x=\"509.47\"\n y=\"255.44\"\n width=\"70.94\"\n height=\"4.89\"\n transform=\"translate(-80.19 -168.52) rotate(11.24)\"\n fill=\"#3ad29f\"\n opacity=\"0.7\"\n />\n <rect\n x=\"501.56\"\n y=\"307.59\"\n width=\"322.91\"\n height=\"4.89\"\n transform=\"translate(-67.76 -190.54) rotate(11.24)\"\n fill=\"#e0e0e0\"\n />\n <g opacity=\"0.5\">\n <rect\n x=\"575.87\"\n y=\"357.6\"\n width=\"166.35\"\n height=\"289.88\"\n transform=\"translate(-103.27 983.74) rotate(-78.76)\"\n fill=\"url(#089a6a47-adaa-499b-aefb-cd6464b62fb8)\"\n />\n </g>\n <rect\n x=\"516.06\"\n y=\"420.61\"\n width=\"286.22\"\n height=\"162.68\"\n transform=\"translate(-30.42 -186.11) rotate(11.24)\"\n fill=\"#fff\"\n />\n <rect\n x=\"496.08\"\n y=\"335.18\"\n width=\"322.91\"\n height=\"4.89\"\n transform=\"translate(-62.49 -188.94) rotate(11.24)\"\n fill=\"#e0e0e0\"\n />\n <rect\n x=\"547.86\"\n y=\"424.02\"\n width=\"35.47\"\n height=\"118.64\"\n transform=\"translate(-35.84 -168.22) rotate(11.24)\"\n fill=\"#6c63ff\"\n />\n <rect\n x=\"606.43\"\n y=\"475.19\"\n width=\"35.47\"\n height=\"79.5\"\n transform=\"translate(-28.56 -179.03) rotate(11.24)\"\n fill=\"#3ad29f\"\n />\n <rect\n x=\"665.23\"\n y=\"523.93\"\n width=\"35.47\"\n height=\"42.81\"\n transform=\"translate(-21.5 -189.92) rotate(11.24)\"\n fill=\"#f55f44\"\n />\n <rect\n x=\"731.91\"\n y=\"492.72\"\n width=\"35.47\"\n height=\"86.84\"\n transform=\"translate(-22.02 -203.09) rotate(11.24)\"\n fill=\"#fdd835\"\n />\n <g opacity=\"0.5\">\n <rect\n x=\"128.65\"\n y=\"645.09\"\n width=\"3.67\"\n height=\"20.79\"\n fill=\"#47e6b1\"\n />\n <rect\n x=\"269.58\"\n y=\"712.31\"\n width=\"3.67\"\n height=\"20.79\"\n transform=\"translate(853.2 384.07) rotate(90)\"\n fill=\"#47e6b1\"\n />\n </g>\n <path\n d=\"M699.44,75.56a4.49,4.49,0,0,1-2.5-5.43,2.16,2.16,0,0,0,.1-.5h0a2.25,2.25,0,0,0-4-1.49h0a2.16,2.16,0,0,0-.25.44,4.49,4.49,0,0,1-5.43,2.5,2.16,2.16,0,0,0-.5-.1h0a2.25,2.25,0,0,0-1.49,4h0a2.16,2.16,0,0,0,.44.25,4.49,4.49,0,0,1,2.5,5.43,2.16,2.16,0,0,0-.1.5h0a2.25,2.25,0,0,0,4,1.49h0a2.16,2.16,0,0,0,.25-.44,4.49,4.49,0,0,1,5.43-2.5,2.16,2.16,0,0,0,.5.1h0a2.25,2.25,0,0,0,1.49-4h0A2.16,2.16,0,0,0,699.44,75.56Z\"\n transform=\"translate(-140.93 -67.23)\"\n fill=\"#4d8af0\"\n opacity=\"0.5\"\n />\n <path\n d=\"M286.33,179.4a4.49,4.49,0,0,1-2.5-5.43,2.16,2.16,0,0,0,.1-.5h0a2.25,2.25,0,0,0-4-1.49h0a2.16,2.16,0,0,0-.25.44,4.49,4.49,0,0,1-5.43,2.5,2.16,2.16,0,0,0-.5-.1h0a2.25,2.25,0,0,0-1.49,4h0a2.16,2.16,0,0,0,.44.25,4.49,4.49,0,0,1,2.5,5.43,2.16,2.16,0,0,0-.1.5h0a2.25,2.25,0,0,0,4,1.49h0a2.16,2.16,0,0,0,.25-.44,4.49,4.49,0,0,1,5.43-2.5,2.16,2.16,0,0,0,.5.1h0a2.25,2.25,0,0,0,1.49-4h0A2.16,2.16,0,0,0,286.33,179.4Z\"\n transform=\"translate(-140.93 -67.23)\"\n fill=\"#fdd835\"\n opacity=\"0.5\"\n />\n <path\n d=\"M253.63,484.46a4.49,4.49,0,0,1-2.5-5.43,2.16,2.16,0,0,0,.1-.5h0a2.25,2.25,0,0,0-4-1.49h0a2.16,2.16,0,0,0-.25.44,4.49,4.49,0,0,1-5.43,2.5,2.16,2.16,0,0,0-.5-.1h0a2.25,2.25,0,0,0-1.49,4h0a2.16,2.16,0,0,0,.44.25,4.49,4.49,0,0,1,2.5,5.43,2.16,2.16,0,0,0-.1.5h0a2.25,2.25,0,0,0,4,1.49h0a2.16,2.16,0,0,0,.25-.44,4.49,4.49,0,0,1,5.43-2.5,2.16,2.16,0,0,0,.5.1h0a2.25,2.25,0,0,0,1.49-4h0A2.16,2.16,0,0,0,253.63,484.46Z\"\n transform=\"translate(-140.93 -67.23)\"\n fill=\"#fdd835\"\n opacity=\"0.5\"\n />\n <circle cx=\"337.81\" cy=\"28.62\" r=\"7.34\" fill=\"#f55f44\" opacity=\"0.5\" />\n <circle cx=\"7.34\" cy=\"317.46\" r=\"7.34\" fill=\"#f55f44\" opacity=\"0.5\" />\n <circle cx=\"863.76\" cy=\"120.36\" r=\"7.34\" fill=\"#f55f44\" opacity=\"0.5\" />\n <circle cx=\"822.17\" cy=\"339.3\" r=\"7.34\" fill=\"#4d8af0\" opacity=\"0.5\" />\n <circle cx=\"37.68\" cy=\"145.22\" r=\"7.34\" fill=\"#47e6b1\" opacity=\"0.5\" />\n <circle cx=\"853.29\" cy=\"647.34\" r=\"7.34\" fill=\"#47e6b1\" opacity=\"0.5\" />\n <circle cx=\"910.8\" cy=\"430.97\" r=\"7.34\" fill=\"#47e6b1\" opacity=\"0.5\" />\n <rect\n x=\"544.42\"\n y=\"601.05\"\n width=\"186.48\"\n height=\"153.07\"\n fill=\"url(#fd8d88e0-7826-450d-9e0b-001d1be709c2)\"\n />\n <path\n d=\"M723.82,639a54.55,54.55,0,0,1,109.1,0v34.91h15.27V639a69.82,69.82,0,0,0-139.65,0v34.91h15.27Z\"\n transform=\"translate(-140.93 -67.23)\"\n fill=\"url(#8d1793c5-b76e-44e2-a52e-569460402331)\"\n />\n <path\n d=\"M726,638.25a52.37,52.37,0,1,1,104.74,0v33.52H845.4V638.25a67,67,0,0,0-134.06,0v33.52H726Z\"\n transform=\"translate(-140.93 -67.23)\"\n fill=\"#f5f5f5\"\n />\n <rect\n x=\"546.32\"\n y=\"602.45\"\n width=\"182.24\"\n height=\"148.73\"\n fill=\"#6c63ff\"\n />\n <rect\n x=\"546.32\"\n y=\"602.45\"\n width=\"182.24\"\n height=\"148.73\"\n fill=\"#f5f5f5\"\n />\n <rect\n x=\"546.32\"\n y=\"631.77\"\n width=\"182.24\"\n height=\"90.07\"\n fill=\"#6c63ff\"\n />\n <path\n d=\"M791.73,727a13.36,13.36,0,1,0-23.08,9.15v28.51a9.72,9.72,0,0,0,19.44,0V736.18A13.3,13.3,0,0,0,791.73,727Z\"\n transform=\"translate(-140.93 -67.23)\"\n fill=\"url(#4745700d-8097-45ff-9f71-625443fc4ad8)\"\n />\n <path\n d=\"M789.89,729.38a11.52,11.52,0,1,0-19.9,7.89v24.58a8.38,8.38,0,1,0,16.76,0V737.27A11.47,11.47,0,0,0,789.89,729.38Z\"\n transform=\"translate(-140.93 -67.23)\"\n opacity=\"0.2\"\n />\n </svg>\n );\n};\n","const { __ } = wp.i18n;\n\nimport Illustration from \"./illustration\";\nconst { Flex, FlexItem, FlexBlock } = wp.components;\n\nexport default () => {\n return (\n <Flex style={{ padding: \"30px\", background: \"#fff\" }}>\n <FlexItem>\n <Illustration width=\"250px\" />\n </FlexItem>\n <FlexBlock style={{ marginLeft: \"20px\" }}>\n <h1>{__(\"Get detailed video insights.\", \"presto-player\")}</h1>\n <p>\n {__(\n \"Upgrade to Pro and get video insights like plays, watch-time, and drop off numbers.\",\n \"presto-player\"\n )}\n </p>\n <a\n href=\"https://prestoplayer.com\"\n target=\"_blank\"\n className=\"button button-primary\"\n >\n {__(\"Learn More\", \"presto-player\")}\n </a>\n </FlexBlock>\n </Flex>\n );\n};\n","/**\n * WordPress dependencies\n */\nconst { __ } = wp.i18n;\nconst { apiFetch } = wp;\nconst { useState } = wp.element;\nconst { createHigherOrderComponent } = wp.compose;\n\n/**\n * Higher order component factory\n *\n * @return {Function} The higher order component.\n */\nexport default () =>\n createHigherOrderComponent(\n (WrappedComponent) => (props) => {\n const [loading, setLoading] = useState(false);\n const [page, setPage] = useState(1);\n const [total, setTotal] = useState(0);\n const [totalPages, setTotalPages] = useState(0);\n const [data, setData] = useState([]);\n const [error, setError] = useState(\"\");\n\n // fetch data\n // we could also abstract this function to make it reusable\n // or do a higher order component\n const fetchData = async ({ endpoint, params = {} }) => {\n setLoading(true);\n\n let responseData;\n try {\n responseData = await apiFetch({\n path: wp.url.addQueryArgs(endpoint, {\n page,\n per_page: 5,\n ...params,\n }),\n parse: false,\n }).then((res) => {\n const total = res.headers\n ? parseInt(res.headers.get(\"X-WP-Total\"))\n : 0;\n const totalPages = res.headers\n ? parseInt(res.headers.get(\"X-WP-TotalPages\"))\n : 0;\n setTotal(total);\n setTotalPages(totalPages);\n return res.json();\n });\n\n setData(responseData);\n } catch (e) {\n console.error(e);\n if (e?.message) {\n setError(e.message);\n }\n } finally {\n setLoading(false);\n }\n };\n\n return (\n <WrappedComponent\n loading={loading}\n setLoading={setLoading}\n fetchData={fetchData}\n page={page}\n setPage={setPage}\n total={total}\n setTotal={setTotal}\n totalPages={totalPages}\n setTotalPages={setTotalPages}\n data={data}\n setData={setData}\n error={error}\n setError={setError}\n {...props}\n />\n );\n },\n \"withDataList\"\n );\n","const { __, sprintf } = wp.i18n;\n\nexport const humanSeconds = (savedSeconds) => {\n const hours = Math.floor(savedSeconds / 60 / 60);\n const minutes = Math.floor(savedSeconds / 60) - hours * 60;\n const seconds = savedSeconds % 60;\n\n let out = \"\";\n if (hours) {\n out += sprintf(__(\"%d hours\", \"presto-player\"), hours) + \", \";\n }\n if (minutes) {\n out += sprintf(__(\"%d minutes\", \"presto-player\"), minutes) + \" \";\n }\n if ((hours || minutes) && seconds) {\n out += __(\"and\", \"presto-player\") + \" \";\n }\n\n out += sprintf(__(\"%d seconds\", \"presto-player\"), seconds);\n\n return out;\n};\n\nexport const timestamp = (seconds) => {\n seconds = parseInt(seconds || 0) * 1000;\n return new Date(seconds).toISOString().substr(11, 8);\n};\n\n/*\n * This function remove the user timezone from new Date()\n * https://stackoverflow.com/a/29774197/1972413\n*/\nexport const convertDateTimeToAbsoluteDate = (dateTime) => {\n const offset = new Date().getTimezoneOffset()\n var date = new Date(dateTime.getTime() - (offset*60*1000))\n return date.toISOString().split('T')[0]+'T00:00:00.000Z';\n}\n","const { Spinner, Flex, FlexItem } = wp.components;\nexport default ({ height = 100 }) => {\n return (\n <Flex style={{ height: `${height}px` }} align=\"center\" justify=\"center\">\n <FlexItem>\n <Spinner />\n </FlexItem>\n </Flex>\n );\n};\n","const { __ } = wp.i18n;\nconst { Card, CardBody, Flex, FlexBlock, Button, ButtonGroup } = wp.components;\nconst { useState, useEffect } = wp.element;\n\nexport default ({ page, setPage, perPage, total, totalPages }) => {\n // do we have prev/next\n const [hasPrevious, setHasPrevious] = useState(false);\n const [hasNext, setHasNext] = useState(false);\n\n // end and start cursors\n const [end, setEnd] = useState(0);\n const [start, setStart] = useState(0);\n\n // set end and start\n useEffect(() => {\n setEnd(Math.min(perPage * page, total));\n setStart(perPage * (page - 1) + 1);\n }, [perPage, page, total]);\n\n // update page when pagination is clicked\n const nextPage = () => {\n setPage(Math.min(totalPages, page + 1));\n };\n const prevPage = () => {\n setPage(Math.max(page - 1, 0));\n };\n\n // set prev/next\n useEffect(() => {\n setHasPrevious(page - 1 > 0);\n setHasNext(totalPages >= page + 1);\n }, [page, totalPages]);\n\n return (\n <Card size=\"large\" className=\"presto-card pagination\">\n <CardBody className=\"presto-flow\">\n <Flex>\n <FlexBlock>\n {sprintf(\n __(\"Showing %1s to %2s of %3s\", \"presto-player\"),\n start,\n end,\n total\n )}\n </FlexBlock>\n <FlexBlock>\n <Flex justify=\"flex-end\">\n {\n <ButtonGroup>\n <Button\n isSecondary\n disabled={!hasPrevious}\n onClick={prevPage}\n >\n {__(\"Previous\", \"presto-player\")}\n </Button>\n <Button isSecondary disabled={!hasNext} onClick={nextPage}>\n {__(\"Next\", \"presto-player\")}\n </Button>\n </ButtonGroup>\n }\n </Flex>\n </FlexBlock>\n </Flex>\n </CardBody>\n </Card>\n );\n};\n","const { __ } = wp.i18n;\nconst { useRef, useEffect, useState } = wp.element;\nconst { Card, CardBody ,Flex, FlexBlock, Button, ButtonGroup } = wp.components;\n\nimport classNames from 'classnames';\n\nexport default ({ columns , data , onRowClick , title }) => {\n\n if (!data.length) {\n return (\n <Card size=\"large\" className=\"presto-card table-card\">\n <CardBody className=\"presto-flow\">\n <div className=\"presto-card__title\">\n {title}\n </div>\n <div style={{ opacity: 0.65 }}>\n {__(\"No data available.\", \"presto-player\")}\n </div>\n </CardBody>\n </Card>\n );\n }\n\n return (\n <Card size=\"large\" className=\"presto-card table-card\">\n <CardBody className=\"presto-flow\">\n <div className=\"presto-card__title\">\n {title}\n </div>\n <table role=\"table\" className={classNames('presto-table', { 'is-clickable': onRowClick })}>\n <thead role=\"rowgroup\">\n <tr role=\"row\">\n {columns && columns.map((column) => {\n return (\n <th key={column.key} role=\"columnheader\">\n {column.label}\n </th>\n );\n })}\n </tr>\n </thead>\n\n <tbody role=\"rowgroup\">\n {data.map((row , rowIndex) => {\n return (\n <tr role=\"row\" key={`row-${rowIndex}`}\n onClick={() => onRowClick && onRowClick(row)}\n >\n {columns.map((column , columnIndex ) => {\n return (\n <td role=\"cell\" data-title={column.label} key={`row-${rowIndex}-${columnIndex}`} aria-label={column.label}>\n {column.render ? column.render(row) : (<div>{column.value(row)}</div>)}\n </td>\n );\n })}\n </tr>\n );\n })}\n </tbody>\n </table>\n </CardBody>\n </Card>\n );\n};\n","const { __ } = wp.i18n;\nconst { useEffect, useState } = wp.element;\nconst { Card, CardBody } = wp.components;\nimport Loading from \"@/admin/settings/components/Loading\";\nimport Pagination from \"@/admin/ui/Pagination\";\nimport Table from \"@/admin/ui/Table\";\n\nexport default ({\n perPage = 10,\n title,\n page,\n setPage,\n loading,\n total,\n totalPages,\n columns,\n data,\n onSelect,\n}) => {\n if (loading) {\n return (\n <Card>\n <Loading />\n </Card>\n );\n }\n\n if (!data?.length) {\n return (\n <Card size=\"large\" className=\"presto-card\">\n <CardBody className=\"presto-flow\">\n <div className=\"presto-card__title\">{title}</div>\n <div style={{ opacity: 0.65 }}>\n {__(\"No data available.\", \"presto-player\")}\n </div>\n </CardBody>\n </Card>\n );\n }\n\n return (\n <div className=\"datatable\">\n <Table\n data={data}\n columns={columns}\n perPage={perPage}\n onRowClick={onSelect}\n title={title}\n />\n\n {!!total && (\n <Pagination\n page={page}\n setPage={setPage}\n perPage={perPage}\n total={total}\n totalPages={totalPages}\n />\n )}\n </div>\n );\n};\n","const { __ } = wp.i18n;\nconst { useEffect } = wp.element;\nconst { compose } = wp.compose;\n\nimport { history } from \"@/router/context\";\nimport withDataList from \"../hocs/withDataList\";\nimport { convertDateTimeToAbsoluteDate } from \"../util\";\nimport DataTable from \"./DataTable\";\n\nexport default compose([withDataList()])(\n ({\n loading,\n page,\n setPage,\n total,\n totalPages,\n data,\n error,\n fetchData,\n startDate,\n endDate,\n }) => {\n // 10 per page\n const per_page = 5;\n\n // fetch data when page changes\n useEffect(() => {\n fetchData({\n endpoint: \"/presto-player/v1/analytics/top-users\",\n params: {\n per_page,\n ...(startDate ? { start: convertDateTimeToAbsoluteDate(startDate) } : {}),\n ...(endDate ? { end: convertDateTimeToAbsoluteDate(endDate) } : {}),\n },\n });\n }, [page, startDate, endDate]);\n\n // navigate to user screen here\n const navigate = (id) => {\n history.push(`#/user/${id}`);\n };\n\n const columns = [\n {\n key: \"name\",\n label: __(\"Name\", \"presto-player\"),\n value: (row) => row?.user?.name,\n },\n {\n key: \"total_view\",\n label: __(\"Total View\", \"presto-player\"),\n value: (row) => row?.stats?.[0]?.data,\n },\n {\n key: \"avg_view_time\",\n label: __(\"Avg View Time\", \"presto-player\"),\n render: (row) => (\n <div className=\"presto-badge\">{row?.stats?.[1]?.data}</div>\n ),\n },\n ];\n\n if (error) {\n return { error };\n }\n\n return (\n <DataTable\n title={__(\"Top Users\", \"presto-player\")}\n page={page}\n perPage={per_page}\n setPage={setPage}\n loading={loading}\n total={total}\n totalPages={totalPages}\n columns={columns}\n data={data}\n onSelect={(row) => navigate(row?.user?.id)}\n />\n );\n }\n);\n","const { __ } = wp.i18n;\nconst { useEffect } = wp.element;\nconst { compose } = wp.compose;\n\nimport { history } from \"@/router/context\";\nimport withDataList from \"../hocs/withDataList\";\nimport { convertDateTimeToAbsoluteDate } from \"../util\";\nimport DataTable from \"./DataTable\";\n\n\nexport default compose([withDataList()])(\n ({\n loading,\n page,\n setPage,\n total,\n totalPages,\n data,\n error,\n fetchData,\n startDate,\n endDate,\n userId\n }) => {\n // 10 per page\n const per_page = 10;\n\n\n // fetch data when page changes\n useEffect(() => {\n fetchData({\n endpoint: \"/presto-player/v1/analytics/top-videos\",\n params: {\n per_page,\n ...(startDate ? { start: convertDateTimeToAbsoluteDate(startDate) } : {}),\n ...(endDate ? { end: convertDateTimeToAbsoluteDate(endDate) } : {}),\n ...(userId ? { user_id: userId }: {})\n },\n });\n }, [page, startDate, endDate]);\n\n const navigate = (id) => {\n history.push(`#/video/${id}`);\n };\n\n const columns = [\n {\n key: \"name\",\n label: __(\"Name\", \"presto-player\"),\n render(row) {\n return (\n <h3 style={{ marginBottom: 0, wordBreak:'break-all' }}>\n {row.video.title\n ? row.video.title\n : __(\"Untitled\", \"presto-player\")}\n </h3>\n );\n },\n },\n {\n key: \"total_view\",\n label: __(\"Total View\", \"presto-player\"),\n value(row) {\n return row.stats[0].data;\n },\n },\n {\n key: \"avg_view_time\",\n label: __(\"Avg View Time\", \"presto-player\"),\n render(row) {\n return <div className=\"presto-badge\">{row.stats[1].data}</div>;\n },\n },\n {\n key: \"view_more\",\n label: \"\",\n render(row) {\n return (\n <span\n style={{\n color: \"var(--wp-admin-theme-color, #007cba)\",\n }}\n >\n {__(\"View Details\", \"presto-player\")} &rarr;\n </span>\n );\n },\n },\n ];\n\n if (error) {\n return { error };\n }\n\n return (\n <DataTable\n title={__(\"Top Videos\", \"presto-player\")}\n perPage={per_page}\n page={page}\n setPage={setPage}\n loading={loading}\n total={total}\n totalPages={totalPages}\n columns={columns}\n data={data}\n onSelect={(row) => {\n navigate(row?.video?.id);\n }}\n />\n );\n }\n);\n","// import apiFetch from \"@wordpress/api-fetch\";\nconst { apiFetch } = wp;\n\n// nonce and root\napiFetch.use(apiFetch.createNonceMiddleware(prestoPlayer.nonce));\napiFetch.use(\n apiFetch.createRootURLMiddleware(\n prestoPlayer.root + prestoPlayer.prestoVersionString\n )\n);\n\nexport default apiFetch;\n","const { __, sprintf } = wp.i18n;\nconst { Card, CardBody } = wp.components;\nconst { useState, useEffect, useRef } = wp.element;\n\nimport Loading from \"@/admin/settings/components/Loading\";\nimport apiFetch from \"@/shared/services/fetch\";\nimport Chart from \"react-apexcharts\";\nimport { convertDateTimeToAbsoluteDate } from \"../util\";\n\nexport default (props) => {\n const [loading, setLoading] = useState(true);\n const [totalViews, setTotalViews] = useState(0);\n const { startDate, endDate } = props;\n const [series, setSeries] = useState([\n {\n name: \"Views\",\n data: [],\n },\n ]);\n\n const chart = {\n options: {\n chart: {\n toolbar: {\n show: false,\n },\n },\n yaxis: {\n min: 0,\n labels: {\n formatter: function (num) {\n if (num < 1) {\n return 0;\n }\n return Math.abs(num) > 999\n ? Math.sign(num) * (Math.abs(num) / 1000).toFixed(1) + \"k\"\n : Math.sign(num) * Math.abs(num).toFixed(0);\n },\n },\n },\n colors: [\"#7c3aed\"],\n xaxis: {\n type: \"datetime\",\n min: new Date(startDate).setHours(0, 0, 0, 0),\n max: new Date(endDate).setHours(23, 59, 59, 999),\n },\n dataLabels: {\n enabled: false,\n },\n stroke: { curve: \"smooth\" },\n fill: {\n type: \"gradient\",\n gradient: {\n shadeIntensity: 1,\n opacityFrom: 0.7,\n opacityTo: 0.9,\n stops: [0, 90, 100],\n },\n },\n },\n };\n\n // fetch only if we already mounted\n useEffect(() => {\n fetchViews();\n }, [props]);\n\n const fetchViews = () => {\n setLoading(true);\n apiFetch({\n path:\n \"/presto-player/v1/analytics/views?\" +\n jQuery.param({\n ...(startDate ? { start: convertDateTimeToAbsoluteDate(startDate) } : {}),\n ...(endDate ? { end: convertDateTimeToAbsoluteDate(endDate) } : {}),\n }),\n parse: false,\n })\n .then(async (res) => {\n setTotalViews(res.headers && res.headers.get(\"X-WP-Total\"));\n const data = await res.json();\n\n let series = [];\n if (data.length) {\n data.forEach((item) => {\n series.push({\n x: item.date_time,\n y: item.total,\n });\n });\n }\n setSeries([\n {\n name: \"Views\",\n data: series,\n },\n ]);\n })\n .catch((e) => {\n console.error(e);\n })\n .finally(() => {\n setLoading(false);\n });\n };\n\n if (loading) {\n return (\n <CardBody>\n <Loading />\n </CardBody>\n );\n }\n\n return (\n <CardBody className=\"presto-flow\">\n <div className=\"presto-card__title\">\n {sprintf(__(\"%d Unique Views\", \"presto-player\"), totalViews)}\n </div>\n <Chart options={chart.options} series={series} type=\"area\" height={280} />\n </CardBody>\n );\n};\n","const { __, sprintf } = wp.i18n;\nconst { Card, CardBody } = wp.components;\nconst { useState, useEffect, useRef } = wp.element;\n\nimport Loading from \"@/admin/settings/components/Loading\";\nimport apiFetch from \"@/shared/services/fetch\";\nimport Chart from \"react-apexcharts\";\nimport { convertDateTimeToAbsoluteDate, humanSeconds } from \"../util\";\n\n\nexport default (props) => {\n const [loading, setLoading] = useState(true);\n const [averageTime, setAverageTime] = useState(0);\n const { startDate, endDate } = props;\n const [series, setSeries] = useState([\n {\n name: \"Views\",\n data: [],\n },\n ]);\n\n const chart = {\n options: {\n chart: {\n toolbar: {\n show: false,\n },\n },\n yaxis: {\n labels: {\n formatter: function (num) {\n return Math.abs(num) > 999\n ? Math.sign(num) * (Math.abs(num) / 1000).toFixed(1) + \"k min\"\n : (Math.sign(num) * Math.abs(num)).toFixed(1) + \"min\";\n },\n },\n },\n colors: [\"#7c3aed\"],\n xaxis: {\n type: \"datetime\",\n min: new Date(startDate).setHours(0, 0, 0, 0),\n max: new Date(endDate).setHours(23, 59, 59, 999),\n },\n dataLabels: {\n enabled: false,\n },\n stroke: { curve: \"smooth\" },\n fill: {\n type: \"gradient\",\n gradient: {\n shadeIntensity: 1,\n opacityFrom: 0.7,\n opacityTo: 0.9,\n stops: [0, 90, 100],\n },\n },\n },\n };\n\n // fetch only if we already mounted\n useEffect(() => {\n fetchMinutes();\n }, [props]);\n\n const fetchMinutes = () => {\n setLoading(true);\n apiFetch({\n path:\n \"/presto-player/v1/analytics/watch-time?\" +\n jQuery.param({\n start: convertDateTimeToAbsoluteDate(startDate),\n end: convertDateTimeToAbsoluteDate(endDate),\n }),\n parse: false,\n })\n .then(async (res) => {\n const { data, average } = await res.json();\n\n setAverageTime(parseFloat(average));\n\n let series = [];\n if (data.length) {\n data.forEach((item) => {\n series.push({\n x: item.date_time,\n y: (item.total / 60).toFixed(2),\n });\n });\n }\n setSeries([\n {\n name: \"Watch Time\",\n data: series,\n },\n ]);\n })\n .catch((e) => {\n console.error(e);\n })\n .finally(() => {\n setLoading(false);\n });\n };\n\n if (loading) {\n return (\n <CardBody>\n <Loading />\n </CardBody>\n );\n }\n\n return (\n <CardBody className=\"presto-flow\">\n <div className=\"presto-card__title\">\n {sprintf(\n __(\"%s average watch time\", \"presto-player\"),\n humanSeconds(averageTime)\n )}\n </div>\n <Chart options={chart.options} series={series} type=\"area\" height={280} />\n </CardBody>\n );\n};\n","const { __ } = wp.i18n;\nconst { Panel, TabPanel } = wp.components;\n\nimport TotalViewsGraph from \"./TotalViewsGraph\";\nimport TotalWatchGraph from \"./TotalWatchGraph\";\n\nexport default ({ startDate, endDate }) => {\n return (\n <Panel>\n <TabPanel\n className=\"presto-module-tabs\"\n onSelect={() => {}}\n tabs={[\n {\n name: \"views\",\n title: __(\"Views\", \"presto-player\"),\n },\n {\n name: \"watch\",\n title: __(\"Watch Time\", \"presto-player\"),\n },\n ]}\n >\n {(tab) => {\n switch (tab.name) {\n case \"views\":\n return (\n <TotalViewsGraph startDate={startDate} endDate={endDate} />\n );\n case \"watch\":\n return (\n <TotalWatchGraph startDate={startDate} endDate={endDate} />\n );\n default:\n return <>Not Found</>;\n }\n }}\n </TabPanel>\n </Panel>\n );\n};\n","const { __ } = wp.i18n;\nconst { useRef, useEffect, useState } = wp.element;\n\nimport Litepicker from \"litepicker\";\nimport \"litepicker/dist/plugins/ranges\";\n\nexport default ({ startDate, setStartDate, endDate, setEndDate }) => {\n const dateRef = useRef();\n const [inputSize, setInputSize] = useState(25);\n\n let datepicker;\n useEffect(() => {\n datepicker = new Litepicker({\n element: dateRef?.current,\n singleMode: false,\n format: \"MMMM D YYYY\",\n autoApply: false,\n plugins: [\"ranges\"],\n maxDate: new Date(),\n numberOfMonths: 2,\n buttonText: {\n apply: __(\"Apply\", \"presto-player\"),\n cancel: __(\"Cancel\", \"presto-player\"),\n },\n dropdowns: {\n minYear: 1990,\n maxYear: null,\n months: true,\n years: true,\n },\n setup: (picker) => {\n picker.setDateRange(startDate, endDate);\n picker.on(\"button:apply\", (start, end) => {\n setStartDate(start.dateInstance);\n setEndDate(end.dateInstance);\n setInputSize(dateRef.current.value.length);\n });\n },\n });\n }, [dateRef]);\n\n return (\n <div className=\"component-base-control\">\n <div className=\"components-base-control__field\">\n <input\n className=\"components-text-control__input presto-settings__date-select\"\n ref={dateRef}\n size={inputSize}\n />\n </div>\n </div>\n );\n};\n","const { __ } = wp.i18n;\nconst { Flex, FlexBlock, FlexItem } = wp.components;\nconst { useState } = wp.element;\n\nimport TopUsers from \"../components/TopUsers\";\nimport TopVideos from \"../components/TopVideos\";\nimport OverviewPanel from \"../components/OverviewPanel\";\nimport DatePicker from \"../components/DatePicker\";\n\nexport default function ({ startDate, endDate, setStartDate, setEndDate }) {\n return (\n <>\n <Flex>\n <FlexBlock>\n <h1>{__(\"Analytics\", \"presto-player\")}</h1>\n </FlexBlock>\n <FlexItem>\n <DatePicker\n startDate={startDate}\n setStartDate={setStartDate}\n endDate={endDate}\n setEndDate={setEndDate}\n />\n </FlexItem>\n </Flex>\n\n <div className=\"presto-flow\">\n <div className=\"presto-dashboard\">\n <div className=\"presto-dashboard__row\">\n <div className=\"presto-dashboard__item is-large\">\n <OverviewPanel startDate={startDate} endDate={endDate} />\n </div>\n <div className=\"presto-dashboard__item\">\n <TopUsers startDate={startDate} endDate={endDate} />\n </div>\n </div>\n\n <div className=\"presto-dashboard__row\">\n <div className=\"presto-dashboard__item is-large\">\n <TopVideos startDate={startDate} endDate={endDate} />\n </div>\n </div>\n </div>\n </div>\n </>\n );\n}\n","const { Card, CardBody } = wp.components;\nimport Loading from \"@/admin/settings/components/Loading\";\n\nexport default ({ loading, title , value, label }) => {\n if (loading) {\n return (\n <Card>\n <CardBody>\n <Loading />\n </CardBody>\n </Card>\n );\n }\n\n return (\n <Card className=\"presto-player__stat-card\">\n <CardBody>\n <div className=\"presto-subtitle\">{title}</div>\n <h1>{value}</h1>\n <div>{label}</div>\n </CardBody>\n </Card>\n );\n};\n","/**\n * WordPress dependencies\n */\nconst { apiFetch } = wp;\nconst { useState } = wp.element;\nconst { createHigherOrderComponent } = wp.compose;\n\n/**\n * Higher order component factory\n *\n * @return {Function} The higher order component.\n */\nexport default () =>\n createHigherOrderComponent(\n (WrappedComponent) => (props) => {\n const [loading, setLoading] = useState(false);\n const [stat, setStat] = useState([]);\n const [error, setError] = useState(\"\");\n\n // fetch data\n // we could also abstract this function to make it reusable\n // or do a higher order component\n const fetchData = async ({ endpoint, params = {} }) => {\n setLoading(true);\n\n let responseData;\n try {\n responseData = await apiFetch({\n path: wp.url.addQueryArgs(endpoint, {\n ...params,\n }),\n });\n setStat(responseData);\n } catch (e) {\n console.error(e);\n if (e?.message) {\n setError(e.message);\n }\n } finally {\n setLoading(false);\n }\n };\n\n return (\n <WrappedComponent\n loading={loading}\n setLoading={setLoading}\n fetchData={fetchData}\n stat={stat}\n setStat={setStat}\n error={error}\n setError={setError}\n {...props}\n />\n );\n },\n \"withStat\"\n );\n","const { __ } = wp.i18n;\nconst { compose } = wp.compose;\nconst { useEffect } = wp.element;\n\nimport StatCard from \"@/admin/ui/StatCard\";\nimport withStat from \"../hocs/withStat\";\nimport { convertDateTimeToAbsoluteDate } from \"../util\";\n\nexport default compose([withStat()])((props) => {\n\n const { userId, startDate, endDate, stat, fetchData, loading } = props;\n\n useEffect(() => {\n fetchData({\n endpoint: `/presto-player/v1/analytics/user/${userId}/total-views`,\n params: {\n start: convertDateTimeToAbsoluteDate(startDate),\n end: convertDateTimeToAbsoluteDate(endDate),\n },\n });\n }, [startDate, endDate]);\n\n return (\n\n <StatCard\n loading={loading}\n value={parseInt(stat?.view)}\n title={__(\"Total Views\", \"presto-player\")}\n />\n );\n});\n","const { __ } = wp.i18n;\nconst { compose } = wp.compose;\nconst { useEffect } = wp.element;\n\nimport StatCard from \"@/admin/ui/StatCard\";\nimport withStat from \"../hocs/withStat\";\nimport { convertDateTimeToAbsoluteDate } from \"../util\";\n\nexport default compose([withStat()])((props) => {\n\n const { userId, startDate, endDate, stat, fetchData, loading } = props;\n\n useEffect(() => {\n fetchData({\n endpoint: `/presto-player/v1/analytics/user/${userId}/average-watchtime`,\n params: {\n start: convertDateTimeToAbsoluteDate(startDate),\n end: convertDateTimeToAbsoluteDate(endDate),\n },\n });\n }, [startDate, endDate]);\n\n return (\n <StatCard\n loading={loading}\n value={parseFloat(stat?.view).toFixed(2)}\n title={__(\"Average Watch Time\", \"presto-player\")}\n label={__(\"seconds\", \"presto-player\")}\n />\n );\n});\n","const { __ } = wp.i18n;\nconst { compose } = wp.compose;\nconst { useEffect } = wp.element;\n\nimport StatCard from \"@/admin/ui/StatCard\";\nimport withStat from \"../hocs/withStat\";\nimport { convertDateTimeToAbsoluteDate } from \"../util\";\n\nexport default compose([withStat()])((props) => {\n\n const { userId, startDate, endDate, stat, fetchData, loading } = props;\n\n useEffect(() => {\n fetchData({\n endpoint: `/presto-player/v1/analytics/user/${userId}/total-watchtime`,\n params: {\n start: convertDateTimeToAbsoluteDate(startDate),\n end: convertDateTimeToAbsoluteDate(endDate),\n },\n });\n }, [startDate, endDate]);\n\n return (\n <StatCard\n loading={loading}\n value={parseFloat(stat?.view).toFixed(2)}\n title={__(\"Total Watch Time\", \"presto-player\")}\n label={__(\"seconds\", \"presto-player\")}\n />\n );\n});\n","/** @jsx jsx */\n\nconst { __ } = wp.i18n;\n\nconst { Flex, FlexBlock, FlexItem, Spinner, Button } = wp.components;\n\nimport { history } from \"@/router/context\";\nimport DatePicker from \"../components/DatePicker\";\nimport TopVideos from \"../components/TopVideos\";\nimport TotalVideoViewsByUser from \"../components/TotalVideoViewsByUser\";\nimport VideoAverageWatchTimeByUser from \"../components/VideoAverageWatchTimeByUser\";\nimport VideoTotalWatchTimeByUser from \"../components/VideoTotalWatchTimeByUser\";\n\nconst { useEffect, useState } = wp.element;\nconst { apiFetch } = wp;\n\nimport { css, jsx } from \"@emotion/core\";\n\nconst User = ({ route, startDate, endDate, setStartDate, setEndDate }) => {\n const [loading, setLoading] = useState(true);\n const [user, setUser] = useState({});\n const [error, setError] = useState(\"\");\n\n const back = () => {\n history.push(`#/`);\n };\n\n const getUser = async () => {\n setLoading(true);\n try {\n let user = await apiFetch({\n url: `/wp-json/wp/v2/users/${route?.params?.id}?context=edit`,\n });\n setUser(user);\n } catch (e) {\n if (e.code === \"rest_no_route\") {\n setError(\"User Not Found\");\n }\n } finally {\n setLoading(false);\n }\n };\n\n useEffect(() => {\n getUser();\n }, []);\n\n if (error) {\n return (\n <div className=\"presto-flow\">\n <Flex>\n <FlexBlock>\n <h2>{error}</h2>\n </FlexBlock>\n </Flex>\n </div>\n );\n }\n\n return (\n <div className=\"presto-flow\">\n <Flex>\n <FlexBlock>\n <Button isSecondary onClick={back}>\n &larr; {__(\"Back to Dashboard\", \"presto-player\")}\n </Button>\n </FlexBlock>\n </Flex>\n <Flex wrap>\n <FlexBlock>\n {loading ? (\n <Spinner />\n ) : (\n <div\n css={css`\n display: flex;\n align-items: center;\n\n .presto__edit-user-button {\n opacity: 0;\n visibility: hidden;\n transition: opacity 0.3s ease;\n }\n\n &:hover {\n .presto__edit-user-button {\n opacity: 1;\n visibility: visible;\n }\n }\n `}\n >\n <div>\n <h1 className=\"presto-dashboard__title\">{user?.name}</h1>\n <p\n css={css`\n margin-top: -10px;\n opacity: 0.65;\n `}\n >\n {user?.email}\n </p>\n </div>\n {!!user.id && (\n <div\n className=\"presto__edit-user-button\"\n css={css`\n margin: 0 20px;\n `}\n >\n <Button\n href={`/wp-admin/user-edit.php?user_id=${user?.id}`}\n isSecondary\n isSmall\n >\n {__(\"View Profile\", \"presto-player\")} &rarr;\n </Button>\n </div>\n )}\n </div>\n )}\n </FlexBlock>\n <FlexItem>\n <DatePicker\n startDate={startDate}\n setStartDate={setStartDate}\n endDate={endDate}\n setEndDate={setEndDate}\n />\n </FlexItem>\n </Flex>\n\n <div className=\"presto-dashboard presto-flow\">\n <div className=\"presto-dashboard__row\">\n <div className=\"presto-dashboard__item\">\n <TotalVideoViewsByUser\n userId={route?.params?.id}\n startDate={startDate}\n endDate={endDate}\n />\n </div>\n <div className=\"presto-dashboard__item\">\n <VideoAverageWatchTimeByUser\n userId={route?.params?.id}\n startDate={startDate}\n endDate={endDate}\n />\n </div>\n <div className=\"presto-dashboard__item\">\n <VideoTotalWatchTimeByUser\n userId={route?.params?.id}\n startDate={startDate}\n endDate={endDate}\n />\n </div>\n </div>\n <div className=\"presto-dashboard__row\">\n <div className=\"presto-dashboard__item is-large\">\n <TopVideos\n startDate={startDate}\n endDate={endDate}\n userId={route?.params?.id}\n />\n </div>\n </div>\n </div>\n </div>\n );\n};\n\nexport default User;\n","const { __ } = wp.i18n;\nconst { compose } = wp.compose;\nconst { useEffect } = wp.element;\n\nimport StatCard from \"@/admin/ui/StatCard\";\nimport withStat from \"../hocs/withStat\";\nimport { convertDateTimeToAbsoluteDate } from \"../util\";\n\nexport default compose([withStat()])((props) => {\n const { video_id, startDate, endDate, stat, fetchData, loading } = props;\n\n useEffect(() => {\n fetchData({\n endpoint: `/presto-player/v1/analytics/video/${video_id}/average-watchtime`,\n params: {\n start: convertDateTimeToAbsoluteDate(startDate),\n end: convertDateTimeToAbsoluteDate(endDate),\n },\n });\n }, [startDate, endDate]);\n\n return (\n\n <StatCard\n loading={loading}\n value={parseInt(stat)}\n title={__(\"Average Watch Time\", \"presto-player\")}\n label={__(\"seconds\", \"presto-player\")}\n />\n );\n});\n","const { __, sprintf } = wp.i18n;\nconst { Card, CardBody } = wp.components;\nconst { useState, useEffect, useRef } = wp.element;\n\nimport Loading from \"@/admin/settings/components/Loading\";\nimport apiFetch from \"@/shared/services/fetch\";\nimport Chart from \"react-apexcharts\";\nimport { convertDateTimeToAbsoluteDate, timestamp } from \"../util\";\n\n\nexport default (props) => {\n const { video_id, startDate, endDate } = props;\n const [loading, setLoading] = useState(true);\n\n const [series, setSeries] = useState([\n {\n name: \"Views\",\n data: [],\n },\n ]);\n\n const fetchTimeline = () => {\n setLoading(true);\n apiFetch({\n path: wp.url.addQueryArgs(\n `/presto-player/v1/analytics/video/${video_id}/timeline`,\n {\n start: convertDateTimeToAbsoluteDate(startDate),\n end: convertDateTimeToAbsoluteDate(endDate),\n }\n ),\n })\n .then((data) => {\n let series = [];\n if (data.length) {\n data.forEach((item) => {\n // add another to them\n series.push({\n x: item.watch_time,\n y: item.total,\n });\n });\n }\n setSeries([\n {\n name: \"Viewers\",\n data: series,\n },\n ]);\n })\n .catch((e) => {\n console.error(e);\n })\n .finally(() => {\n setLoading(false);\n });\n };\n\n useEffect(() => {\n fetchTimeline();\n }, [startDate, endDate]);\n\n const chart = {\n options: {\n chart: {\n toolbar: {\n show: false,\n },\n },\n tickAmount: 1,\n yaxis: {\n labels: {\n formatter: function (num) {\n return parseInt(num);\n },\n },\n },\n xaxis: {\n labels: {\n formatter: function (num) {\n return timestamp(num);\n },\n },\n },\n colors: [\"#7c3aed\"],\n dataLabels: {\n enabled: false,\n },\n stroke: { curve: \"smooth\" },\n fill: {\n type: \"gradient\",\n gradient: {\n shadeIntensity: 1,\n opacityFrom: 0.7,\n opacityTo: 0.9,\n stops: [0, 90, 100],\n },\n },\n },\n };\n\n if (loading) {\n return (\n <Card>\n <CardBody>\n <Loading />\n </CardBody>\n </Card>\n );\n }\n\n return (\n <Card>\n <CardBody>\n <div className=\"presto-card__title\">\n {__(\"Audience Retention\", \"presto-player\")}\n </div>\n <Chart\n options={chart.options}\n series={series}\n type=\"area\"\n height={280}\n />\n </CardBody>\n </Card>\n );\n};\n","const { __ } = wp.i18n;\nconst { compose } = wp.compose;\nconst { useEffect } = wp.element;\n\nimport StatCard from \"@/admin/ui/StatCard\";\nimport withStat from \"../hocs/withStat\";\nimport { convertDateTimeToAbsoluteDate } from \"../util\";\n\nexport default compose([withStat()])((props) => {\n const { video_id, startDate, endDate, stat, fetchData, loading } = props;\n\n // fetch data when page changes\n useEffect(() => {\n fetchData({\n endpoint: `/presto-player/v1/analytics/video/${video_id}/views`,\n params: {\n start: convertDateTimeToAbsoluteDate(startDate),\n end: convertDateTimeToAbsoluteDate(endDate),\n },\n });\n }, [startDate, endDate]);\n\n return (\n <StatCard\n loading={loading}\n value={parseInt(stat)}\n title={__(\"Unique Views\", \"presto-player\")}\n />\n );\n});\n","import { PrestoPlayer } from \"@presto-player/react\";\n\nconst { useSelect } = wp.data;\n\nexport default ({ src, preset, branding, attributes, adminPreview, type }) => {\n const { chapters, mutedOverlay, mutedPreview } = attributes;\n\n const youtube = useSelect((select) => {\n return select(\"presto-player/player\")?.youtube();\n });\n\n const css = useSelect((select) => {\n return select(\"presto-player/player\")?.playerCSS();\n });\n\n const mutedOverlayContent = () => {\n return (\n <div\n className=\"presto-player__overlay is-image\"\n style={{\n position: \"absolute\",\n width: `${mutedOverlay?.width || 100}%`,\n left: `${(mutedOverlay?.focalPoint?.x || 0.5) * 100}%`,\n top: `${(mutedOverlay?.focalPoint?.y || 0.5) * 100}%`,\n }}\n >\n <img\n src={mutedOverlay?.src}\n style={{\n transform: \"translateX(-50%) translateY(-50%)\",\n }}\n />\n </div>\n );\n };\n\n return (\n <div\n className=\"wp-block-video presto-block-video\"\n style={{\n \"--presto-player-border-radius\": `${preset?.border_radius}px`,\n ...(preset?.caption_background\n ? { \"--plyr-captions-background\": preset.caption_background }\n : {}),\n ...(branding?.color ? { \"--plyr-color-main\": branding.color } : {}),\n \"--presto-player-email-border-radius\": `${\n preset?.email_collection?.border_radius || 0\n }px`,\n \"--presto-player-logo-width\": `${branding?.logo_width || 75}px`,\n }}\n >\n <PrestoPlayer\n src={src}\n css={css}\n isAdmin={true}\n preload=\"metadata\"\n preset={preset}\n bunny={{\n thumbnail: attributes?.previewThumbnail,\n preview: attributes?.preview,\n }}\n youtube={{\n channelId: youtube?.channel_id,\n }}\n tracks={\n !!preset?.captions && [\n {\n kind: \"captions\",\n label: \"English\",\n srclang: \"en\",\n src: \"/path/to/captions.en.vtt\",\n default: true,\n },\n ]\n }\n branding={branding}\n chapters={chapters}\n blockAttributes={attributes}\n poster={attributes.poster}\n provider={type}\n >\n <div slot=\"player-end\">\n {mutedPreview?.enabled &&\n mutedOverlay?.enabled &&\n mutedOverlayContent()}\n {adminPreview}\n </div>\n </PrestoPlayer>\n </div>\n );\n};\n","const { __ } = wp.i18n;\n\nconst { Flex, FlexBlock, FlexItem, Spinner, Button, TextControl } =\n wp.components;\n\nimport { history } from \"@/router/context\";\nimport DatePicker from \"../components/DatePicker\";\nimport VideoAverageWatchTime from \"../components/VideoAverageWatchTime\";\nimport VideoTimeline from \"../components/VideoTimeline\";\nimport VideoViews from \"../components/VideoViews\";\nimport Player from \"../../blocks/shared/Player\";\n\nconst { useEffect, useState } = wp.element;\nconst { apiFetch } = wp;\n\nconst Video = ({ route, startDate, endDate, setStartDate, setEndDate }) => {\n const [loading, setLoading] = useState(true);\n const [video, setVideo] = useState({});\n const [error, setError] = useState(\"\");\n const [thisName, setThisName] = useState(null);\n const [editing, setEditing] = useState(false);\n\n const back = () => {\n history.push(`#/`);\n };\n\n const getVideo = async () => {\n setLoading(true);\n try {\n let video = await apiFetch({\n url: `${prestoPlayer?.root}${prestoPlayer?.prestoVersionString}videos/${route?.params?.id}`,\n });\n setVideo(video);\n setThisName(video?.title);\n } catch (e) {\n if (e.code === \"rest_no_route\") {\n setError(\"Video Not Found\");\n }\n } finally {\n setLoading(false);\n }\n };\n\n const putVideo = async () => {\n console.log(`New Video title ${thisName}`);\n setLoading(true);\n try {\n const data = {\n ...video,\n ...{ title: thisName },\n };\n let saved = await wp.apiFetch({\n method: \"POST\",\n url: wp.url.addQueryArgs(\n `${prestoPlayer.root}${prestoPlayer.prestoVersionString}videos/${video.id}`,\n { _method: \"PUT\" }\n ),\n data,\n });\n\n if (!saved) {\n throw genericError;\n }\n setEditing(false);\n setVideo(saved);\n } catch (e) {\n setError(e?.message ? e.message : genericError);\n } finally {\n setLoading(false);\n }\n };\n\n const cancelEditing = () => {\n setThisName(video?.title);\n setEditing(false);\n };\n\n const renderVideoEditableTitle = () => {\n if (loading) {\n return <Spinner />;\n } else if (editing) {\n return (\n <div className=\"presto-inline-edit presto-inline-edit--editing\">\n <TextControl\n className=\"presto-inline-edit__input\"\n type=\"text\"\n value={thisName}\n onChange={(title) => setThisName(title)}\n />\n <Button\n className=\"presto-inline-edit__button\"\n isPrimary\n onClick={putVideo}\n >\n {\" \"}\n Save{\" \"}\n </Button>\n <Button\n className=\"presto-inline-edit__button\"\n isSecondary\n onClick={cancelEditing}\n >\n {\" \"}\n Cancel{\" \"}\n </Button>\n </div>\n );\n } else {\n return (\n <div className=\"presto-inline-edit\">\n <h1 className=\"presto-dashboard__title presto-inline-edit__text\">\n {video?.title}\n </h1>\n\n <button\n className=\"presto-inline-edit__edit\"\n onClick={() => setEditing(true)}\n >\n <span className=\"dashicon dashicons dashicons-edit\"></span>\n </button>\n </div>\n );\n }\n };\n\n useEffect(() => {\n getVideo();\n }, []);\n\n if (error) {\n return (\n <div className=\"presto-flow\">\n <Flex>\n <FlexBlock>\n <h2>{error}</h2>\n </FlexBlock>\n </Flex>\n </div>\n );\n }\n\n return (\n <div className=\"presto-flow\">\n <Flex>\n <FlexBlock>\n <Button isSecondary onClick={back}>\n &larr; {__(\"Back to Dashboard\", \"presto-player\")}\n </Button>\n </FlexBlock>\n </Flex>\n <Flex wrap>\n <FlexBlock>{renderVideoEditableTitle()}</FlexBlock>\n <FlexItem>\n <DatePicker\n startDate={startDate}\n setStartDate={setStartDate}\n endDate={endDate}\n setEndDate={setEndDate}\n />\n </FlexItem>\n </Flex>\n\n <div className=\"presto-dashboard presto-flow\">\n <div className=\"presto-dashboard__row\">\n <div className=\"presto-dashboard__item is-large\">\n <VideoViews\n video_id={route?.params?.id}\n startDate={startDate}\n endDate={endDate}\n />\n </div>\n <div className=\"presto-dashboard__item\">\n {!!Object.keys(video || {}).length && (\n <Player\n src={video?.src}\n attributes={{}}\n type={video?.type}\n preset={{\n \"play-large\": true,\n play: true,\n progress: true,\n \"current-time\": true,\n }}\n />\n )}\n </div>\n <div className=\"presto-dashboard__item\">\n <VideoAverageWatchTime\n video_id={route?.params?.id}\n startDate={startDate}\n endDate={endDate}\n />\n </div>\n </div>\n <div className=\"presto-dashboard__row\">\n <div className=\"presto-dashboard__item is-large\">\n <VideoTimeline\n video_id={route?.params?.id}\n startDate={startDate}\n endDate={endDate}\n />\n </div>\n </div>\n </div>\n </div>\n );\n};\n\nexport default Video;\n","export const routes = {\n dashboard: {\n path: \"/\",\n },\n video: {\n path: \"/video/:id\",\n },\n user: {\n path: \"/user/:id\",\n },\n};\n","const { useState } = wp.element;\n\nimport { Route, Router } from \"@/router\";\n\nimport AnalyticsUpgrade from \"./pages/AnalyticsUpgrade\";\nimport Dashboard from \"./pages/Dashboard\";\n\nimport User from \"./pages/User\";\nimport Video from \"./pages/Video\";\nimport { routes } from \"./routes\";\n\nexport default () => {\n const scrollToTop = () => {\n window.scrollTo(0, 0);\n };\n\n const [startDate, setStartDate] = useState(\n new Date(Date.now() - 7 * 24 * 60 * 60 * 1000)\n );\n const [endDate, setEndDate] = useState(new Date());\n\n if (!prestoPlayer?.isPremium) {\n return (\n <div className=\"presto-dashboard__content\">\n <AnalyticsUpgrade />\n </div>\n );\n }\n\n return (\n <div className=\"presto-dashboard__content\">\n <Router routes={routes}>\n <Route path={routes.dashboard.path} onRoute={scrollToTop}>\n <Dashboard\n startDate={startDate}\n endDate={endDate}\n setStartDate={setStartDate}\n setEndDate={setEndDate}\n />\n </Route>\n <Route path={routes.video.path} onRoute={scrollToTop}>\n <Video\n startDate={startDate}\n endDate={endDate}\n setStartDate={setStartDate}\n setEndDate={setEndDate}\n />\n </Route>\n <Route path={routes.user.path} onRoute={scrollToTop}>\n <User\n startDate={startDate}\n endDate={endDate}\n setStartDate={setStartDate}\n setEndDate={setEndDate}\n />\n </Route>\n </Router>\n </div>\n );\n};\n","const { render } = wp.element;\n\nimport { defineCustomElements } from \"@presto-player/components/dist/custom-elements\";\n\ndefineCustomElements();\n\n/**\n * App\n */\nimport App from \"./App\";\n\n/**\n * styles\n */\nimport \"./analytics.scss\";\n\n/**\n * Render\n */\nrender(<App />, document.getElementById(\"presto-analytics-page\"));\n"],"sourceRoot":""}
dist/analytics/manifest.json CHANGED
@@ -1,8 +1,8 @@
1
  {
2
  "admin.css": "analytics/admin-866190a9.css",
3
  "admin.css.map": "analytics/admin-866190a9.css.map",
4
- "admin.js": "analytics/admin-103fe944.js",
5
- "admin.js.map": "analytics/admin-103fe944.js.map",
6
  "analytics/0-05e94cb1.js": "analytics/0-05e94cb1.js",
7
  "analytics/0-05e94cb1.js.map": "analytics/0-05e94cb1.js.map",
8
  "analytics/4-10d614d7.js": "analytics/4-10d614d7.js",
@@ -15,20 +15,20 @@
15
  "analytics/7-0f173a3d.js.map": "analytics/7-0f173a3d.js.map",
16
  "runtime.js": "analytics/runtime-84f85df4.js",
17
  "runtime.js.map": "analytics/runtime-84f85df4.js.map",
18
- "vendors--presto-player--admin.js": "analytics/vendors--presto-player--admin-de477507.js",
19
- "vendors--presto-player--admin.js.map": "analytics/vendors--presto-player--admin-de477507.js.map",
20
  "wpackioEp": {
21
  "admin": {
22
  "assets": {
23
  "js": [
24
  "analytics/runtime-84f85df4.js",
25
- "analytics/vendors--presto-player--admin-de477507.js",
26
- "analytics/admin-103fe944.js"
27
  ],
28
  "js.map": [
29
  "analytics/runtime-84f85df4.js.map",
30
- "analytics/vendors--presto-player--admin-de477507.js.map",
31
- "analytics/admin-103fe944.js.map"
32
  ],
33
  "css": [
34
  "analytics/admin-866190a9.css"
1
  {
2
  "admin.css": "analytics/admin-866190a9.css",
3
  "admin.css.map": "analytics/admin-866190a9.css.map",
4
+ "admin.js": "analytics/admin-379e676f.js",
5
+ "admin.js.map": "analytics/admin-379e676f.js.map",
6
  "analytics/0-05e94cb1.js": "analytics/0-05e94cb1.js",
7
  "analytics/0-05e94cb1.js.map": "analytics/0-05e94cb1.js.map",
8
  "analytics/4-10d614d7.js": "analytics/4-10d614d7.js",
15
  "analytics/7-0f173a3d.js.map": "analytics/7-0f173a3d.js.map",
16
  "runtime.js": "analytics/runtime-84f85df4.js",
17
  "runtime.js.map": "analytics/runtime-84f85df4.js.map",
18
+ "vendors--presto-player--admin.js": "analytics/vendors--presto-player--admin-55797d52.js",
19
+ "vendors--presto-player--admin.js.map": "analytics/vendors--presto-player--admin-55797d52.js.map",
20
  "wpackioEp": {
21
  "admin": {
22
  "assets": {
23
  "js": [
24
  "analytics/runtime-84f85df4.js",
25
+ "analytics/vendors--presto-player--admin-55797d52.js",
26
+ "analytics/admin-379e676f.js"
27
  ],
28
  "js.map": [
29
  "analytics/runtime-84f85df4.js.map",
30
+ "analytics/vendors--presto-player--admin-55797d52.js.map",
31
+ "analytics/admin-379e676f.js.map"
32
  ],
33
  "css": [
34
  "analytics/admin-866190a9.css"
dist/analytics/vendors--presto-player--admin-55797d52.js ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ *
3
+ * Presto Player
4
+ *
5
+ * @author Presto Made, Inc
6
+ * @version 0.1.0
7
+ * @link undefined
8
+ * @license GPL
9
+ *
10
+ * Copyright (c) 2021 Presto Made, Inc
11
+ *
12
+ * This software is released under the GPL License
13
+ * https://opensource.org/licenses/GPL
14
+ *
15
+ * Compiled with the help of https://wpack.io
16
+ * A zero setup Webpack Bundler Script for WordPress
17
+ */
18
+ (window.wpackioprestoPlayeranalyticsJsonp=window.wpackioprestoPlayeranalyticsJsonp||[]).push([[3],[function(e,t,i){e.exports=i(33)},function(e,t,i){"use strict";i.d(t,"a",(function(){return r}));var n=i(20);function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var n,r,a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(e){s=!0,r=e}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}}(e,t)||Object(n.a)(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},function(e,t,i){"use strict";i.d(t,"a",(function(){return D})),i.d(t,"b",(function(){return z}));var n=i(10),r=i(13);var a=i(9);var o=function(){function e(e){this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.before=null}var t=e.prototype;return t.insert=function(e){if(this.ctr%(this.isSpeedy?65e3:1)==0){var t,i=function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t}(this);t=0===this.tags.length?this.before:this.tags[this.tags.length-1].nextSibling,this.container.insertBefore(i,t),this.tags.push(i)}var n=this.tags[this.tags.length-1];if(this.isSpeedy){var r=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(n);try{var a=105===e.charCodeAt(1)&&64===e.charCodeAt(0);r.insertRule(e,a?0:r.cssRules.length)}catch(e){0}}else n.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}();var s=function(e){function t(e,t,n){var r=t.trim().split(g);t=r;var a=r.length,o=e.length;switch(o){case 0:case 1:var s=0;for(e=0===o?"":e[0]+" ";s<a;++s)t[s]=i(e,t[s],n).trim();break;default:var l=s=0;for(t=[];s<a;++s)for(var c=0;c<o;++c)t[l++]=i(e[c]+" ",r[s],n).trim()}return t}function i(e,t,i){var n=t.charCodeAt(0);switch(33>n&&(n=(t=t.trim()).charCodeAt(0)),n){case 38:return t.replace(m,"$1"+e.trim());case 58:return e.trim()+t.replace(m,"$1"+e.trim());default:if(0<1*i&&0<t.indexOf("\f"))return t.replace(m,(58===e.charCodeAt(0)?"":"$1")+e.trim())}return e+t}function r(e,t,i,n){var o=e+";",s=2*t+3*i+4*n;if(944===s){e=o.indexOf(":",9)+1;var l=o.substring(e,o.length-1).trim();return l=o.substring(0,e).trim()+l+";",1===E||2===E&&a(l,1)?"-webkit-"+l+l:l}if(0===E||2===E&&!a(o,1))return o;switch(s){case 1015:return 97===o.charCodeAt(10)?"-webkit-"+o+o:o;case 951:return 116===o.charCodeAt(3)?"-webkit-"+o+o:o;case 963:return 110===o.charCodeAt(5)?"-webkit-"+o+o:o;case 1009:if(100!==o.charCodeAt(4))break;case 969:case 942:return"-webkit-"+o+o;case 978:return"-webkit-"+o+"-moz-"+o+o;case 1019:case 983:return"-webkit-"+o+"-moz-"+o+"-ms-"+o+o;case 883:if(45===o.charCodeAt(8))return"-webkit-"+o+o;if(0<o.indexOf("image-set(",11))return o.replace(C,"$1-webkit-$2")+o;break;case 932:if(45===o.charCodeAt(4))switch(o.charCodeAt(5)){case 103:return"-webkit-box-"+o.replace("-grow","")+"-webkit-"+o+"-ms-"+o.replace("grow","positive")+o;case 115:return"-webkit-"+o+"-ms-"+o.replace("shrink","negative")+o;case 98:return"-webkit-"+o+"-ms-"+o.replace("basis","preferred-size")+o}return"-webkit-"+o+"-ms-"+o+o;case 964:return"-webkit-"+o+"-ms-flex-"+o+o;case 1023:if(99!==o.charCodeAt(8))break;return"-webkit-box-pack"+(l=o.substring(o.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+o+"-ms-flex-pack"+l+o;case 1005:return p.test(o)?o.replace(u,":-webkit-")+o.replace(u,":-moz-")+o:o;case 1e3:switch(t=(l=o.substring(13).trim()).indexOf("-")+1,l.charCodeAt(0)+l.charCodeAt(t)){case 226:l=o.replace(x,"tb");break;case 232:l=o.replace(x,"tb-rl");break;case 220:l=o.replace(x,"lr");break;default:return o}return"-webkit-"+o+"-ms-"+l+o;case 1017:if(-1===o.indexOf("sticky",9))break;case 975:switch(t=(o=e).length-10,s=(l=(33===o.charCodeAt(t)?o.substring(0,t):o).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|l.charCodeAt(7))){case 203:if(111>l.charCodeAt(8))break;case 115:o=o.replace(l,"-webkit-"+l)+";"+o;break;case 207:case 102:o=o.replace(l,"-webkit-"+(102<s?"inline-":"")+"box")+";"+o.replace(l,"-webkit-"+l)+";"+o.replace(l,"-ms-"+l+"box")+";"+o}return o+";";case 938:if(45===o.charCodeAt(5))switch(o.charCodeAt(6)){case 105:return l=o.replace("-items",""),"-webkit-"+o+"-webkit-box-"+l+"-ms-flex-"+l+o;case 115:return"-webkit-"+o+"-ms-flex-item-"+o.replace(_,"")+o;default:return"-webkit-"+o+"-ms-flex-line-pack"+o.replace("align-content","").replace(_,"")+o}break;case 973:case 989:if(45!==o.charCodeAt(3)||122===o.charCodeAt(4))break;case 931:case 953:if(!0===A.test(e))return 115===(l=e.substring(e.indexOf(":")+1)).charCodeAt(0)?r(e.replace("stretch","fill-available"),t,i,n).replace(":fill-available",":stretch"):o.replace(l,"-webkit-"+l)+o.replace(l,"-moz-"+l.replace("fill-",""))+o;break;case 962:if(o="-webkit-"+o+(102===o.charCodeAt(5)?"-ms-"+o:"")+o,211===i+n&&105===o.charCodeAt(13)&&0<o.indexOf("transform",10))return o.substring(0,o.indexOf(";",27)+1).replace(f,"$1-webkit-$2")+o}return o}function a(e,t){var i=e.indexOf(1===t?":":"{"),n=e.substring(0,3!==t?i:10);return i=e.substring(i+1,e.length-1),D(2!==t?n:n.replace(S,"$1"),i,t)}function o(e,t){var i=r(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return i!==t+";"?i.replace(k," or ($1)").substring(4):"("+t+")"}function s(e,t,i,n,r,a,o,s,l,h){for(var d,u=0,p=t;u<I;++u)switch(d=O[u].call(c,e,p,i,n,r,a,o,s,l,h)){case void 0:case!1:case!0:case null:break;default:p=d}if(p!==t)return p}function l(e){return void 0!==(e=e.prefix)&&(D=null,e?"function"!=typeof e?E=1:(E=2,D=e):E=0),l}function c(e,i){var n=e;if(33>n.charCodeAt(0)&&(n=n.trim()),n=[n],0<I){var l=s(-1,i,n,n,P,T,0,0,0,0);void 0!==l&&"string"==typeof l&&(i=l)}var c=function e(i,n,l,c,u){for(var p,f,g,m,x,k=0,_=0,S=0,A=0,C=0,O=0,D=g=p=0,N=0,R=0,F=0,H=0,Y=l.length,j=Y-1,$="",X="",B="",W="";N<Y;){if(f=l.charCodeAt(N),N===j&&0!==_+A+S+k&&(0!==_&&(f=47===_?10:47),A=S=k=0,Y++,j++),0===_+A+S+k){if(N===j&&(0<R&&($=$.replace(d,"")),0<$.trim().length)){switch(f){case 32:case 9:case 59:case 13:case 10:break;default:$+=l.charAt(N)}f=59}switch(f){case 123:for(p=($=$.trim()).charCodeAt(0),g=1,H=++N;N<Y;){switch(f=l.charCodeAt(N)){case 123:g++;break;case 125:g--;break;case 47:switch(f=l.charCodeAt(N+1)){case 42:case 47:e:{for(D=N+1;D<j;++D)switch(l.charCodeAt(D)){case 47:if(42===f&&42===l.charCodeAt(D-1)&&N+2!==D){N=D+1;break e}break;case 10:if(47===f){N=D+1;break e}}N=D}}break;case 91:f++;case 40:f++;case 34:case 39:for(;N++<j&&l.charCodeAt(N)!==f;);}if(0===g)break;N++}switch(g=l.substring(H,N),0===p&&(p=($=$.replace(h,"").trim()).charCodeAt(0)),p){case 64:switch(0<R&&($=$.replace(d,"")),f=$.charCodeAt(1)){case 100:case 109:case 115:case 45:R=n;break;default:R=M}if(H=(g=e(n,R,g,f,u+1)).length,0<I&&(x=s(3,g,R=t(M,$,F),n,P,T,H,f,u,c),$=R.join(""),void 0!==x&&0===(H=(g=x.trim()).length)&&(f=0,g="")),0<H)switch(f){case 115:$=$.replace(w,o);case 100:case 109:case 45:g=$+"{"+g+"}";break;case 107:g=($=$.replace(v,"$1 $2"))+"{"+g+"}",g=1===E||2===E&&a("@"+g,3)?"@-webkit-"+g+"@"+g:"@"+g;break;default:g=$+g,112===c&&(X+=g,g="")}else g="";break;default:g=e(n,t(n,$,F),g,c,u+1)}B+=g,g=F=R=D=p=0,$="",f=l.charCodeAt(++N);break;case 125:case 59:if(1<(H=($=(0<R?$.replace(d,""):$).trim()).length))switch(0===D&&(p=$.charCodeAt(0),45===p||96<p&&123>p)&&(H=($=$.replace(" ",":")).length),0<I&&void 0!==(x=s(1,$,n,i,P,T,X.length,c,u,c))&&0===(H=($=x.trim()).length)&&($="\0\0"),p=$.charCodeAt(0),f=$.charCodeAt(1),p){case 0:break;case 64:if(105===f||99===f){W+=$+l.charAt(N);break}default:58!==$.charCodeAt(H-1)&&(X+=r($,p,f,$.charCodeAt(2)))}F=R=D=p=0,$="",f=l.charCodeAt(++N)}}switch(f){case 13:case 10:47===_?_=0:0===1+p&&107!==c&&0<$.length&&(R=1,$+="\0"),0<I*z&&s(0,$,n,i,P,T,X.length,c,u,c),T=1,P++;break;case 59:case 125:if(0===_+A+S+k){T++;break}default:switch(T++,m=l.charAt(N),f){case 9:case 32:if(0===A+k+_)switch(C){case 44:case 58:case 9:case 32:m="";break;default:32!==f&&(m=" ")}break;case 0:m="\\0";break;case 12:m="\\f";break;case 11:m="\\v";break;case 38:0===A+_+k&&(R=F=1,m="\f"+m);break;case 108:if(0===A+_+k+L&&0<D)switch(N-D){case 2:112===C&&58===l.charCodeAt(N-3)&&(L=C);case 8:111===O&&(L=O)}break;case 58:0===A+_+k&&(D=N);break;case 44:0===_+S+A+k&&(R=1,m+="\r");break;case 34:case 39:0===_&&(A=A===f?0:0===A?f:A);break;case 91:0===A+_+S&&k++;break;case 93:0===A+_+S&&k--;break;case 41:0===A+_+k&&S--;break;case 40:if(0===A+_+k){if(0===p)switch(2*C+3*O){case 533:break;default:p=1}S++}break;case 64:0===_+S+A+k+D+g&&(g=1);break;case 42:case 47:if(!(0<A+k+S))switch(_){case 0:switch(2*f+3*l.charCodeAt(N+1)){case 235:_=47;break;case 220:H=N,_=42}break;case 42:47===f&&42===C&&H+2!==N&&(33===l.charCodeAt(H+2)&&(X+=l.substring(H,N+1)),m="",_=0)}}0===_&&($+=m)}O=C,C=f,N++}if(0<(H=X.length)){if(R=n,0<I&&(void 0!==(x=s(2,X,R,i,P,T,H,c,u,c))&&0===(X=x).length))return W+X+B;if(X=R.join(",")+"{"+X+"}",0!=E*L){switch(2!==E||a(X,2)||(L=0),L){case 111:X=X.replace(b,":-moz-$1")+X;break;case 112:X=X.replace(y,"::-webkit-input-$1")+X.replace(y,"::-moz-$1")+X.replace(y,":-ms-input-$1")+X}L=0}}return W+X+B}(M,n,i,0,0);return 0<I&&(void 0!==(l=s(-2,c,n,n,P,T,c.length,0,0,0))&&(c=l)),"",L=0,T=P=1,c}var h=/^\0+/g,d=/[\0\r\f]/g,u=/: */g,p=/zoo|gra/,f=/([,: ])(transform)/g,g=/,\r+?/g,m=/([\t\r\n ])*\f?&/g,v=/@(k\w+)\s*(\S*)\s*/,y=/::(place)/g,b=/:(read-only)/g,x=/[svh]\w+-[tblr]{2}/,w=/\(\s*(.*)\s*\)/g,k=/([\s\S]*?);/g,_=/-self|flex-/g,S=/[^]*?(:[rp][el]a[\w-]+)[^]*/,A=/stretch|:\s*\w+\-(?:conte|avail)/,C=/([^-])(image-set\()/,T=1,P=1,L=0,E=1,M=[],O=[],I=0,D=null,z=0;return c.use=function e(t){switch(t){case void 0:case null:I=O.length=0;break;default:if("function"==typeof t)O[I++]=t;else if("object"===Object(n.a)(t))for(var i=0,r=t.length;i<r;++i)e(t[i]);else z=0|!!t}return e},c.set=l,void 0!==e&&l(e),c};function l(e){e&&c.current.insert(e+"}")}var c={current:null},h=function(e,t,i,n,r,a,o,s,h,d){switch(e){case 1:switch(t.charCodeAt(0)){case 64:return c.current.insert(t+";"),"";case 108:if(98===t.charCodeAt(2))return""}break;case 2:if(0===s)return t+"/*|*/";break;case 3:switch(s){case 102:case 112:return c.current.insert(i[0]+t),"";default:return t+(0===d?"/*|*/":"")}case-2:t.split("/*|*/}").forEach(l)}},d=function(e){void 0===e&&(e={});var t,i=e.key||"css";void 0!==e.prefix&&(t={prefix:e.prefix});var n=new s(t);var r,a={};r=e.container||document.head;var l,d=document.querySelectorAll("style[data-emotion-"+i+"]");Array.prototype.forEach.call(d,(function(e){e.getAttribute("data-emotion-"+i).split(" ").forEach((function(e){a[e]=!0})),e.parentNode!==r&&r.appendChild(e)})),n.use(e.stylisPlugins)(h),l=function(e,t,i,r){var a=t.name;c.current=i,n(e,t.styles),r&&(u.inserted[a]=!0)};var u={key:i,sheet:new o({key:i,container:r,nonce:e.nonce,speedy:e.speedy}),nonce:e.nonce,inserted:a,registered:{},insert:l};return u};i(42);function u(e,t,i){var n="";return i.split(" ").forEach((function(i){void 0!==e[i]?t.push(e[i]):n+=i+" "})),n}var p=function(e,t,i){var n=e.key+"-"+t.name;if(!1===i&&void 0===e.registered[n]&&(e.registered[n]=t.styles),void 0===e.inserted[t.name]){var r=t;do{e.insert("."+n,r,e.sheet,!0);r=r.next}while(void 0!==r)}};var f=function(e){for(var t,i=0,n=0,r=e.length;r>=4;++n,r-=4)t=1540483477*(65535&(t=255&e.charCodeAt(n)|(255&e.charCodeAt(++n))<<8|(255&e.charCodeAt(++n))<<16|(255&e.charCodeAt(++n))<<24))+(59797*(t>>>16)<<16),i=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&i)+(59797*(i>>>16)<<16);switch(r){case 3:i^=(255&e.charCodeAt(n+2))<<16;case 2:i^=(255&e.charCodeAt(n+1))<<8;case 1:i=1540483477*(65535&(i^=255&e.charCodeAt(n)))+(59797*(i>>>16)<<16)}return(((i=1540483477*(65535&(i^=i>>>13))+(59797*(i>>>16)<<16))^i>>>15)>>>0).toString(36)},g={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};var m=/[A-Z]|^ms/g,v=/_EMO_([^_]+?)_([^]*?)_EMO_/g,y=function(e){return 45===e.charCodeAt(1)},b=function(e){return null!=e&&"boolean"!=typeof e},x=function(e){var t={};return function(i){return void 0===t[i]&&(t[i]=e(i)),t[i]}}((function(e){return y(e)?e:e.replace(m,"-$&").toLowerCase()})),w=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(v,(function(e,t,i){return _={name:t,styles:i,next:_},t}))}return 1===g[e]||y(e)||"number"!=typeof t||0===t?t:t+"px"};function k(e,t,i,r){if(null==i)return"";if(void 0!==i.__emotion_styles)return i;switch(Object(n.a)(i)){case"boolean":return"";case"object":if(1===i.anim)return _={name:i.name,styles:i.styles,next:_},i.name;if(void 0!==i.styles){var a=i.next;if(void 0!==a)for(;void 0!==a;)_={name:a.name,styles:a.styles,next:_},a=a.next;return i.styles+";"}return function(e,t,i){var r="";if(Array.isArray(i))for(var a=0;a<i.length;a++)r+=k(e,t,i[a],!1);else for(var o in i){var s=i[o];if("object"!==Object(n.a)(s))null!=t&&void 0!==t[s]?r+=o+"{"+t[s]+"}":b(s)&&(r+=x(o)+":"+w(o,s)+";");else if(!Array.isArray(s)||"string"!=typeof s[0]||null!=t&&void 0!==t[s[0]]){var l=k(e,t,s,!1);switch(o){case"animation":case"animationName":r+=x(o)+":"+l+";";break;default:r+=o+"{"+l+"}"}}else for(var c=0;c<s.length;c++)b(s[c])&&(r+=x(o)+":"+w(o,s[c])+";")}return r}(e,t,i);case"function":if(void 0!==e){var o=_,s=i(e);return _=o,k(e,t,s,r)}break;case"string":}if(null==t)return i;var l=t[i];return void 0===l||r?i:l}var _,S=/label:\s*([^\s;\n{]+)\s*;/g;var A=function(e,t,i){if(1===e.length&&"object"===Object(n.a)(e[0])&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,a="";_=void 0;var o=e[0];null==o||void 0===o.raw?(r=!1,a+=k(i,t,o,!1)):a+=o[0];for(var s=1;s<e.length;s++)a+=k(i,t,e[s],46===a.charCodeAt(a.length-1)),r&&(a+=o[s]);S.lastIndex=0;for(var l,c="";null!==(l=S.exec(a));)c+="-"+l[1];return{name:f(a)+c,styles:a,next:_}},C=Object.prototype.hasOwnProperty,T=Object(a.createContext)("undefined"!=typeof HTMLElement?d():null),P=Object(a.createContext)({}),L=(T.Provider,function(e){var t=function(t,i){return Object(a.createElement)(T.Consumer,null,(function(n){return e(t,n,i)}))};return Object(a.forwardRef)(t)}),E="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",M=function(e,t){var i={};for(var n in t)C.call(t,n)&&(i[n]=t[n]);return i[E]=e,i},O=function(e,t,i,n){var r=null===i?t.css:t.css(i);"string"==typeof r&&void 0!==e.registered[r]&&(r=e.registered[r]);var o=t[E],s=[r],l="";"string"==typeof t.className?l=u(e.registered,s,t.className):null!=t.className&&(l=t.className+" ");var c=A(s);p(e,c,"string"==typeof o);l+=e.key+"-"+c.name;var h={};for(var d in t)C.call(t,d)&&"css"!==d&&d!==E&&(h[d]=t[d]);return h.ref=n,h.className=l,Object(a.createElement)(o,h)},I=L((function(e,t,i){return"function"==typeof e.css?Object(a.createElement)(P.Consumer,null,(function(n){return O(t,e,n,i)})):O(t,e,null,i)}));var D=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return A(t)},z=function(e,t){var i=arguments;if(null==t||!C.call(t,"css"))return a.createElement.apply(void 0,i);var n=i.length,r=new Array(n);r[0]=I,r[1]=M(e,t);for(var o=2;o<n;o++)r[o]=i[o];return a.createElement.apply(null,r)},N=(a.Component,function e(t){for(var i=t.length,r=0,a="";r<i;r++){var o=t[r];if(null!=o){var s=void 0;switch(Object(n.a)(o)){case"boolean":break;case"object":if(Array.isArray(o))s=e(o);else for(var l in s="",o)o[l]&&l&&(s&&(s+=" "),s+=l);break;default:s=o}s&&(a&&(a+=" "),a+=s)}}return a});function R(e,t,i){var n=[],r=u(e,n,i);return n.length<2?i:r+t(n)}L((function(e,t){return Object(a.createElement)(P.Consumer,null,(function(i){var n=function(){for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];var r=A(i,t.registered);return p(t,r,!1),t.key+"-"+r.name},r={css:n,cx:function(){for(var e=arguments.length,i=new Array(e),r=0;r<e;r++)i[r]=arguments[r];return R(t.registered,n,N(i))},theme:i},a=e.children(r);return!0,a}))}))},function(e,t,i){"use strict";function n(e,t,i,n,r,a,o){try{var s=e[a](o),l=s.value}catch(e){return void i(e)}s.done?t(l):Promise.resolve(l).then(n,r)}function r(e){return function(){var t=this,i=arguments;return new Promise((function(r,a){var o=e.apply(t,i);function s(e){n(o,r,a,s,l,"next",e)}function l(e){n(o,r,a,s,l,"throw",e)}s(void 0)}))}}i.d(t,"a",(function(){return r}))},function(e,t,i){"use strict";function n(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}i.d(t,"a",(function(){return n}))},function(e,t,i){"use strict";function n(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}i.d(t,"a",(function(){return n}))},function(e,t,i){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}i.d(t,"a",(function(){return n}))},function(e,t,i){"use strict";function n(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function r(e,t,i){return t&&n(e.prototype,t),i&&n(e,i),e}i.d(t,"a",(function(){return r}))},function(e,t,i){"use strict";i.d(t,"a",(function(){return r}));var n=i(13);function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Object(n.a)(e,t)}},function(e,t,i){"use strict";e.exports=i(36)},function(e,t,i){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}i.d(t,"a",(function(){return n}))},function(e,t,i){"use strict";function n(e){return(n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}i.d(t,"a",(function(){return n}))},function(e,t){function i(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(e.exports=i=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=i=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),i(t)}e.exports=i,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,i){"use strict";function n(e,t){return(n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}i.d(t,"a",(function(){return n}))},function(e,t,i){"use strict";i.d(t,"a",(function(){return a}));var n=i(19);var r=i(20);function a(e){return function(e){if(Array.isArray(e))return Object(n.a)(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Object(r.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},function(e,t,i){"use strict";i.d(t,"a",(function(){return o}));var n=i(12),r=i.n(n),a=i(4);function o(e,t){return!t||"object"!==r()(t)&&"function"!=typeof t?Object(a.a)(e):t}},function(e,t,i){"use strict";i.d(t,"a",(function(){return r}));i(10);function n(e,t){void 0===t&&(t={});for(var i=function(e){for(var t=[],i=0;i<e.length;){var n=e[i];if("*"!==n&&"+"!==n&&"?"!==n)if("\\"!==n)if("{"!==n)if("}"!==n)if(":"!==n)if("("!==n)t.push({type:"CHAR",index:i,value:e[i++]});else{var r=1,a="";if("?"===e[s=i+1])throw new TypeError('Pattern cannot start with "?" at '+s);for(;s<e.length;)if("\\"!==e[s]){if(")"===e[s]){if(0===--r){s++;break}}else if("("===e[s]&&(r++,"?"!==e[s+1]))throw new TypeError("Capturing groups are not allowed at "+s);a+=e[s++]}else a+=e[s++]+e[s++];if(r)throw new TypeError("Unbalanced pattern at "+i);if(!a)throw new TypeError("Missing pattern at "+i);t.push({type:"PATTERN",index:i,value:a}),i=s}else{for(var o="",s=i+1;s<e.length;){var l=e.charCodeAt(s);if(!(l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||95===l))break;o+=e[s++]}if(!o)throw new TypeError("Missing parameter name at "+i);t.push({type:"NAME",index:i,value:o}),i=s}else t.push({type:"CLOSE",index:i,value:e[i++]});else t.push({type:"OPEN",index:i,value:e[i++]});else t.push({type:"ESCAPED_CHAR",index:i++,value:e[i++]});else t.push({type:"MODIFIER",index:i,value:e[i++]})}return t.push({type:"END",index:i,value:""}),t}(e),n=t.prefixes,r=void 0===n?"./":n,o="[^"+a(t.delimiter||"/#?")+"]+?",s=[],l=0,c=0,h="",d=function(e){if(c<i.length&&i[c].type===e)return i[c++].value},u=function(e){var t=d(e);if(void 0!==t)return t;var n=i[c],r=n.type,a=n.index;throw new TypeError("Unexpected "+r+" at "+a+", expected "+e)},p=function(){for(var e,t="";e=d("CHAR")||d("ESCAPED_CHAR");)t+=e;return t};c<i.length;){var f=d("CHAR"),g=d("NAME"),m=d("PATTERN");if(g||m){var v=f||"";-1===r.indexOf(v)&&(h+=v,v=""),h&&(s.push(h),h=""),s.push({name:g||l++,prefix:v,suffix:"",pattern:m||o,modifier:d("MODIFIER")||""})}else{var y=f||d("ESCAPED_CHAR");if(y)h+=y;else if(h&&(s.push(h),h=""),d("OPEN")){v=p();var b=d("NAME")||"",x=d("PATTERN")||"",w=p();u("CLOSE"),s.push({name:b||(x?l++:""),pattern:b&&!x?o:x,prefix:v,suffix:w,modifier:d("MODIFIER")||""})}else u("END")}}return s}function r(e,t){var i=[];return function(e,t,i){void 0===i&&(i={});var n=i.decode,r=void 0===n?function(e){return e}:n;return function(i){var n=e.exec(i);if(!n)return!1;for(var a=n[0],o=n.index,s=Object.create(null),l=function(e){if(void 0===n[e])return"continue";var i=t[e-1];"*"===i.modifier||"+"===i.modifier?s[i.name]=n[e].split(i.prefix+i.suffix).map((function(e){return r(e,i)})):s[i.name]=r(n[e],i)},c=1;c<n.length;c++)l(c);return{path:a,index:o,params:s}}}(l(e,i,t),i,t)}function a(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function o(e){return e&&e.sensitive?"":"i"}function s(e,t,i){return function(e,t,i){void 0===i&&(i={});for(var n=i.strict,r=void 0!==n&&n,s=i.start,l=void 0===s||s,c=i.end,h=void 0===c||c,d=i.encode,u=void 0===d?function(e){return e}:d,p="["+a(i.endsWith||"")+"]|$",f="["+a(i.delimiter||"/#?")+"]",g=l?"^":"",m=0,v=e;m<v.length;m++){var y=v[m];if("string"==typeof y)g+=a(u(y));else{var b=a(u(y.prefix)),x=a(u(y.suffix));if(y.pattern)if(t&&t.push(y),b||x)if("+"===y.modifier||"*"===y.modifier){var w="*"===y.modifier?"?":"";g+="(?:"+b+"((?:"+y.pattern+")(?:"+x+b+"(?:"+y.pattern+"))*)"+x+")"+w}else g+="(?:"+b+"("+y.pattern+")"+x+")"+y.modifier;else g+="("+y.pattern+")"+y.modifier;else g+="(?:"+b+x+")"+y.modifier}}if(h)r||(g+=f+"?"),g+=i.endsWith?"(?="+p+")":"$";else{var k=e[e.length-1],_="string"==typeof k?f.indexOf(k[k.length-1])>-1:void 0===k;r||(g+="(?:"+f+"(?="+p+"))?"),_||(g+="(?="+f+"|"+p+")")}return new RegExp(g,o(i))}(n(e,i),t,i)}function l(e,t,i){return e instanceof RegExp?function(e,t){if(!t)return e;for(var i=/\((?:\?<(.*?)>)?(?!\?)/g,n=0,r=i.exec(e.source);r;)t.push({name:r[1]||n++,prefix:"",suffix:"",modifier:"",pattern:""}),r=i.exec(e.source);return e}(e,t):Array.isArray(e)?function(e,t,i){var n=e.map((function(e){return l(e,t,i).source}));return new RegExp("(?:"+n.join("|")+")",o(i))}(e,t,i):s(e,t,i)}},function(e,t,i){"use strict";var n=i(12);Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==n(Symbol.iterator)?function(e){return n(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":n(e)},a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},o=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}(),s=d(i(35)),l=i(9),c=d(l),h=d(i(38));function d(e){return e&&e.__esModule?e:{default:e}}window.ApexCharts=s.default;var u=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=n(t)&&"function"!=typeof t?e:t}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return c.default.createRef?i.chartRef=c.default.createRef():i.setRef=function(e){return i.chartRef=e},i.chart=null,i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(e,l.Component),o(e,[{key:"render",value:function(){var e=function(e,t){var i={};for(var n in e)0<=t.indexOf(n)||Object.prototype.hasOwnProperty.call(e,n)&&(i[n]=e[n]);return i}(this.props,[]);return c.default.createElement("div",a({ref:c.default.createRef?this.chartRef:this.setRef},e))}},{key:"componentDidMount",value:function(){var e=c.default.createRef?this.chartRef.current:this.chartRef;this.chart=new s.default(e,this.getConfig()),this.chart.render()}},{key:"getConfig",value:function(){var e=this.props,t=e.type,i=e.height,n=e.width,r=e.series,a=e.options,o={chart:{type:t,height:i,width:n},series:r};return this.extend(a,o)}},{key:"isObject",value:function(e){return e&&"object"===(void 0===e?"undefined":r(e))&&!Array.isArray(e)&&null!=e}},{key:"extend",value:function(e,t){var i=this;"function"!=typeof Object.assign&&(Object.assign=function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),i=1;i<arguments.length;i++){var n=arguments[i];if(null!=n)for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])}return t});var n=Object.assign({},e);return this.isObject(e)&&this.isObject(t)&&Object.keys(t).forEach((function(r){i.isObject(t[r])&&r in e?n[r]=i.extend(e[r],t[r]):Object.assign(n,function(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}({},r,t[r]))})),n}},{key:"componentDidUpdate",value:function(e){if(!this.chart)return null;var t=this.props,i=t.options,n=t.series,r=t.height,a=t.width,o=JSON.stringify(e.options),s=JSON.stringify(e.series),l=JSON.stringify(i),c=JSON.stringify(n);o===l&&s===c&&r===e.height&&a===e.width||(s===c?this.chart.updateOptions(this.getConfig()):o===l&&r===e.height&&a===e.width?this.chart.updateSeries(n):this.chart.updateOptions(this.getConfig()))}},{key:"componentWillUnmount",value:function(){this.chart&&"function"==typeof this.chart.destroy&&this.chart.destroy()}}]),e}();(t.default=u).propTypes={type:h.default.string.isRequired,width:h.default.any,height:h.default.any,series:h.default.array.isRequired,options:h.default.object.isRequired},u.defaultProps={type:"line",width:"100%",height:"auto"}},function(e,t,i){"use strict";e.exports=i(44)},function(e,t,i){"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}i.d(t,"a",(function(){return n}))},function(e,t,i){"use strict";i.d(t,"a",(function(){return r}));var n=i(19);function r(e,t){if(e){if("string"==typeof e)return Object(n.a)(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Object(n.a)(e,t):void 0}}},function(e,t,i){var n,r=i(12);
19
+ /*!
20
+ Copyright (c) 2018 Jed Watson.
21
+ Licensed under the MIT License (MIT), see
22
+ http://jedwatson.github.io/classnames
23
+ */!function(){"use strict";var a={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var i=arguments[t];if(i){var n=r(i);if("string"===n||"number"===n)e.push(i);else if(Array.isArray(i)){if(i.length){var s=o.apply(null,i);s&&e.push(s)}}else if("object"===n)if(i.toString===Object.prototype.toString)for(var l in i)a.call(i,l)&&i[l]&&e.push(l);else e.push(i.toString())}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):"object"===r(i(26))&&i(26)?void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n):window.classNames=o}()},function(e,t,i){"use strict";function n(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}i.d(t,"a",(function(){return n}))},function(e,t){function i(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(e.exports=i=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=i=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),i(t)}e.exports=i,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,i){"use strict";i.d(t,"a",(function(){return So})),i.d(t,"b",(function(){return Wi})),i.d(t,"c",(function(){return ns})),i.d(t,"d",(function(){return Ya}));var n=i(14),r=i(3),a=i(5),o=i(6),s=i(7),l=i(4),c=i(8),h=i(15),d=i(11),u=i(13);function p(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function f(e,t,i){return(f=p()?Reflect.construct:function(e,t,i){var n=[null];n.push.apply(n,t);var r=new(Function.bind.apply(e,n));return i&&Object(u.a)(r,i.prototype),r}).apply(null,arguments)}function g(e){var t="function"==typeof Map?new Map:void 0;return(g=function(e){if(null===e||(i=e,-1===Function.toString.call(i).indexOf("[native code]")))return e;var i;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return f(e,arguments,Object(d.a)(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Object(u.a)(n,e)})(e)}var m,v,y,b,x=i(0),w=i.n(x),k=i(10),_=i(1),S=!1,A=!0,C=!1,T=!0,P=!0,L=!0,E=!0,M=!0,O=!0,I=!0,D=!0,z=!0,N=!0,R=!0,F=!0,H=!1,Y=!0,j=!0,$=!0,X=!0,B=!0,W=!0,V=!0,G=!0,U=!0,q=!0,Z=!0,J=!0,Q=!0,K=!0,ee=!0,te=!0,ie=!0,ne=!0,re=!0,ae=!0,oe=!0,se=!0,le=!0,ce=!0,he=!0,de=!0,ue=!0,pe=!0,fe=!1,ge=!1,me=!1,ve=!1,ye=!1,be=!1,xe=!1,we=!1,ke=!1,_e=!0,Se=!1,Ae=!0,Ce=!1,Te=!0,Pe=!0,Le=!0,Ee=!1,Me=!0,Oe=!0,Ie=!1,De=!1,ze=!1,Ne=!0;var Re=0,Fe=!1,He=!1,Ye=!1,je=!1,$e=0,Xe=!1,Be="undefined"!=typeof window?window:{},We=(Ee&&Be.CSS,Be.document||{head:{}}),Ve=(Be.HTMLElement,{$flags$:0,$resourcesUrl$:"",jmp:function(e){return e()},raf:function(e){return requestAnimationFrame(e)},ael:function(e,t,i,n){return e.addEventListener(t,i,n)},rel:function(e,t,i,n){return e.removeEventListener(t,i,n)},ce:function(e,t){return new CustomEvent(e,t)}}),Ge=!Ce||!U||function(){return(We.head.attachShadow+"").indexOf("[native")>-1}(),Ue=function(){var e=!1;try{We.addEventListener("e",null,Object.defineProperty({},"passive",{get:function(){e=!0}}))}catch(e){}return e}(),qe=!!Me&&function(){try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replace}catch(e){}return!1}(),Ze=function(e,t,i,n){z&&i&&(H&&(i=n?i.filter((function(e){return 32&Object(_.a)(e,1)[0]})):i.filter((function(e){return!(32&Object(_.a)(e,1)[0])}))),i.map((function(i){var n=Object(_.a)(i,3),r=n[0],a=n[1],o=n[2],s=Y?Qe(e,r):e,l=Je(t,o),c=Ke(r);Ve.ael(s,a,l,c),(t.$rmListeners$=t.$rmListeners$||[]).push((function(){return Ve.rel(s,a,l,c)}))})))},Je=function(e,t){return function(i){try{we?256&e.$flags$?e.$lazyInstance$[t](i):(e.$queuedListeners$=e.$queuedListeners$||[]).push([t,i]):e.$hostElement$[t](i)}catch(e){ui(e)}}},Qe=function(e,t){return R&&4&t?We:N&&8&t?Be:F&&16&t?We.body:H&&32&t?e.parentElement:e},Ke=function(e){return Ue?{passive:0!=(1&e),capture:0!=(2&e)}:0!=(2&e)},et="http://www.w3.org/1999/xlink",tt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(ke&&performance.mark){var i="st:".concat(e,":").concat(t,":").concat(Re++);return performance.mark(i),function(){return performance.measure("[Stencil] ".concat(e,"() <").concat(t,">"),i)}}return function(){}},it=function(e,t){return ke&&performance.mark?(0===performance.getEntriesByName(e).length&&performance.mark(e),function(){0===performance.getEntriesByName(t).length&&performance.measure(t,e)}):function(){}},nt=new WeakMap,rt=function(e,t,i){var n=yi.get(e);qe&&i?(n=n||new CSSStyleSheet).replace(t):n=t,yi.set(e,n)},at=function(e,t,i,r){var a=st(t,i),o=yi.get(a);if(!Ne)return a;if(e=11===e.nodeType?e:We,o)if("string"==typeof o){e=e.head||e;var s,l=nt.get(e);if(l||nt.set(e,l=new Set),!l.has(a)){if(be&&e.host&&(s=e.querySelector("[".concat("sty-id",'="').concat(a,'"]'))))s.innerHTML=o;else{if(Ee&&Ve.$cssShim$){var c=(s=Ve.$cssShim$.createHostStyle(r,a,o,!!(10&t.$flags$)))["s-sc"];c&&(a=c,l=null)}else(s=We.createElement("style")).innerHTML=o;(ye||fe)&&s.setAttribute("sty-id",a),e.insertBefore(s,e.querySelector("link"))}l&&l.add(a)}}else Me&&!e.adoptedStyleSheets.includes(o)&&(e.adoptedStyleSheets=[].concat(Object(n.a)(e.adoptedStyleSheets),[o]));return a},ot=function(e){var t=e.$cmpMeta$,i=e.$hostElement$,n=t.$flags$,r=tt("attachStyles",t.$tagName$),a=at(U&&Ge&&i.shadowRoot?i.shadowRoot:i.getRootNode(),t,e.$modeName$,i);(U||G)&&Z&&10&n&&(i["s-sc"]=a,i.classList.add(a+"-h"),G&&2&n&&i.classList.add(a+"-s")),r()},st=function(e,t){return"sc-"+(X&&t&&32&e.$flags$?e.$tagName$+"-"+t:e.$tagName$)},lt=function(e){return bi.map((function(t){return t(e)})).find((function(e){return!!e}))},ct={},ht=function(e){return"object"===(e=Object(k.a)(e))||"function"===e},dt=function(e,t){for(var i=null,n=null,r=null,a=!1,o=!1,s=[],l=function t(n){for(var r=0;r<n.length;r++)i=n[r],Array.isArray(i)?t(i):null!=i&&"boolean"!=typeof i&&((a="function"!=typeof e&&!ht(i))?i=String(i):me&&"function"!=typeof e&&void 0===i.$flags$&&fi("vNode passed as children has unexpected type.\nMake sure it's using the correct h() function.\nEmpty objects can also be the cause, look for JSX comments that became objects."),a&&o?s[s.length-1].$text$+=i:s.push(a?ut(null,i):i),o=a)},c=arguments.length,h=new Array(c>2?c-2:0),d=2;d<c;d++)h[d-2]=arguments[d];if(l(h),t&&(me&&"input"===e&&yt(t),ae&&t.key&&(n=t.key),_e&&t.name&&(r=t.name),ne)){var u=t.className||t.class;u&&(t.class="object"!==Object(k.a)(u)?u:Object.keys(u).filter((function(e){return u[e]})).join(" "))}if(me&&s.some(ft)&&fi("The <Host> must be the single root component. Make sure:\n- You are NOT using hostData() and <Host> in the same component.\n- <Host> is used once, and it's the single root component of the render() function."),re&&"function"==typeof e)return e(null===t?{}:t,s,gt);var p=ut(e,null);return p.$attrs$=t,s.length>0&&(p.$children$=s),ae&&(p.$key$=n),_e&&(p.$name$=r),p},ut=function(e,t){var i={$flags$:0,$tag$:e,$text$:t,$elm$:null,$children$:null};return te&&(i.$attrs$=null),ae&&(i.$key$=null),_e&&(i.$name$=null),i},pt={},ft=function(e){return e&&e.$tag$===pt},gt={forEach:function(e,t){return e.map(mt).forEach(t)},map:function(e,t){return e.map(mt).map(t).map(vt)}},mt=function(e){return{vattrs:e.$attrs$,vchildren:e.$children$,vkey:e.$key$,vname:e.$name$,vtag:e.$tag$,vtext:e.$text$}},vt=function(e){if("function"==typeof e.vtag){var t=Object.assign({},e.vattrs);return e.vkey&&(t.key=e.vkey),e.vname&&(t.name=e.vname),dt.apply(void 0,[e.vtag,t].concat(Object(n.a)(e.vchildren||[])))}var i=ut(e.vtag,e.vtext);return i.$attrs$=e.vattrs,i.$children$=e.vchildren,i.$key$=e.vkey,i.$name$=e.vname,i},yt=function(e){var t=Object.keys(e),i=t.indexOf("type"),n=t.indexOf("min"),r=t.indexOf("max"),a=t.indexOf("min"),o=t.indexOf("value");-1!==o&&(o<i||o<n||o<r||o<a)&&gi('The "value" prop of <input> should be set after "min", "max", "type" and "step"')},bt=function(e,t,i,r,a,o){if(i!==r){var s=di(e,t),l=t.toLowerCase();if(ne&&"class"===t){var c=e.classList,h=wt(i),d=wt(r);c.remove.apply(c,Object(n.a)(h.filter((function(e){return e&&!d.includes(e)})))),c.add.apply(c,Object(n.a)(d.filter((function(e){return e&&!h.includes(e)}))))}else if(he&&"style"===t){if(ee)for(var u in i)r&&null!=r[u]||(!ye&&u.includes("-")?e.style.removeProperty(u):e.style[u]="");for(var p in r)i&&r[p]===i[p]||(!ye&&p.includes("-")?e.style.setProperty(p,r[p]):e.style[p]=r[p])}else if(ae&&"key"===t);else if(se&&"ref"===t)r&&r(e);else if(!oe||(we?s:e.__lookupSetter__(t))||"o"!==t[0]||"n"!==t[1]){if(le){var f=ht(r);if((s||f&&null!==r)&&!a)try{if(e.tagName.includes("-"))e[t]=r;else{var g=null==r?"":r;"list"===t?s=!1:null!=i&&e[t]==g||(e[t]=g)}}catch(e){}var m=!1;ie&&l!==(l=l.replace(/^xlink\:?/,""))&&(t=l,m=!0),null==r||!1===r?!1===r&&""!==e.getAttribute(t)||(ie&&m?e.removeAttributeNS(et,t):e.removeAttribute(t)):(!s||4&o||a)&&!f&&(r=!0===r?"":r,ie&&m?e.setAttributeNS(et,t,r):e.setAttribute(t,r))}}else t="-"===t[2]?t.slice(3):di(Be,l)?l.slice(2):l[2]+t.slice(3),i&&Ve.rel(e,t,i,!1),r&&Ve.ael(e,t,r,!1)}},xt=/\s/,wt=function(e){return e?e.split(xt):[]},kt=function(e,t,i,n){var r=11===t.$elm$.nodeType&&t.$elm$.host?t.$elm$.host:t.$elm$,a=e&&e.$attrs$||ct,o=t.$attrs$||ct;if(ee)for(n in a)n in o||bt(r,n,a[n],void 0,i,t.$flags$);for(n in o)bt(r,n,a[n],o[n],i,t.$flags$)},_t=function e(t,i,n,r){var a,o,s,l=i.$children$[n],c=0;if(_e&&!Fe&&(Ye=!0,"slot"===l.$tag$&&(m&&r.classList.add(m+"-s"),l.$flags$|=l.$children$?2:1)),me&&l.$elm$&&fi("The JSX ".concat(null!==l.$text$?'"'.concat(l.$text$,'" text'):'"'.concat(l.$tag$,'" element')," node should not be shared within the same renderer. The renderer caches element lookups in order to improve performance. However, a side effect from this is that the exact same JSX node should not be reused. For more information please see https://stenciljs.com/docs/templating-jsx#avoid-shared-jsx-nodes")),de&&null!==l.$text$)a=l.$elm$=We.createTextNode(l.$text$);else if(_e&&1&l.$flags$)a=l.$elm$=ge||ye?zt(l):We.createTextNode("");else{if(K&&!je&&(je="svg"===l.$tag$),a=l.$elm$=K?We.createElementNS(je?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",_e&&2&l.$flags$?"slot-fb":l.$tag$):We.createElement(_e&&2&l.$flags$?"slot-fb":l.$tag$),K&&je&&"foreignObject"===l.$tag$&&(je=!1),te&&kt(null,l,je),(U||G)&&null!=m&&a["s-si"]!==m&&a.classList.add(a["s-si"]=m),l.$children$)for(c=0;c<l.$children$.length;++c)(o=e(t,l,c,a))&&a.appendChild(o);K&&("svg"===l.$tag$?je=!1:"foreignObject"===a.tagName&&(je=!0))}return _e&&(a["s-hn"]=y,3&l.$flags$&&(a["s-sr"]=!0,a["s-cr"]=v,a["s-sn"]=l.$name$||"",(s=t&&t.$children$&&t.$children$[n])&&s.$tag$===l.$tag$&&t.$elm$&&St(t.$elm$,!1))),a},St=function e(t,i){Ve.$flags$|=1;for(var n=t.childNodes,r=n.length-1;r>=0;r--){var a=n[r];a["s-hn"]!==y&&a["s-ol"]&&(Lt(a).insertBefore(a,Pt(a)),a["s-ol"].remove(),a["s-ol"]=void 0,Ye=!0),i&&e(a,i)}Ve.$flags$&=-2},At=function(e,t,i,n,r,a){var o,s=_e&&e["s-cr"]&&e["s-cr"].parentNode||e;for(U&&s.shadowRoot&&s.tagName===y&&(s=s.shadowRoot);r<=a;++r)n[r]&&(o=_t(null,i,r,e))&&(n[r].$elm$=o,s.insertBefore(o,_e?Pt(t):t))},Ct=function(e,t,i,n,r){for(;t<=i;++t)(n=e[t])&&(r=n.$elm$,It(n),_e&&(He=!0,r["s-ol"]?r["s-ol"].remove():St(r,!0)),r.remove())},Tt=function(e,t){return e.$tag$===t.$tag$&&(_e&&"slot"===e.$tag$?e.$name$===t.$name$:!ae||e.$key$===t.$key$)},Pt=function(e){return e&&e["s-ol"]||e},Lt=function(e){return(e["s-ol"]?e["s-ol"]:e).parentNode},Et=function(e,t){var i,n=t.$elm$=e.$elm$,r=e.$children$,a=t.$children$,o=t.$tag$,s=t.$text$;de&&null!==s?de&&_e&&(i=n["s-cr"])?i.parentNode.textContent=s:de&&e.$text$!==s&&(n.data=s):(K&&(je="svg"===o||"foreignObject"!==o&&je),(te||V)&&(q&&"slot"===o||kt(e,t,je)),ee&&null!==r&&null!==a?function(e,t,i,n){for(var r,a,o=0,s=0,l=0,c=0,h=t.length-1,d=t[0],u=t[h],p=n.length-1,f=n[0],g=n[p];o<=h&&s<=p;)if(null==d)d=t[++o];else if(null==u)u=t[--h];else if(null==f)f=n[++s];else if(null==g)g=n[--p];else if(Tt(d,f))Et(d,f),d=t[++o],f=n[++s];else if(Tt(u,g))Et(u,g),u=t[--h],g=n[--p];else if(Tt(d,g))!_e||"slot"!==d.$tag$&&"slot"!==g.$tag$||St(d.$elm$.parentNode,!1),Et(d,g),e.insertBefore(d.$elm$,u.$elm$.nextSibling),d=t[++o],g=n[--p];else if(Tt(u,f))!_e||"slot"!==d.$tag$&&"slot"!==g.$tag$||St(u.$elm$.parentNode,!1),Et(u,f),e.insertBefore(u.$elm$,d.$elm$),u=t[--h],f=n[++s];else{if(l=-1,ae)for(c=o;c<=h;++c)if(t[c]&&null!==t[c].$key$&&t[c].$key$===f.$key$){l=c;break}ae&&l>=0?((a=t[l]).$tag$!==f.$tag$?r=_t(t&&t[s],i,l,e):(Et(a,f),t[l]=void 0,r=a.$elm$),f=n[++s]):(r=_t(t&&t[s],i,s,e),f=n[++s]),r&&(_e?Lt(d.$elm$).insertBefore(r,Pt(d.$elm$)):d.$elm$.parentNode.insertBefore(r,d.$elm$))}o>h?At(e,null==n[p+1]?null:n[p+1].$elm$,i,n,s,p):ee&&s>p&&Ct(t,o,h)}(n,r,t,a):null!==a?(ee&&de&&null!==e.$text$&&(n.textContent=""),At(n,null,t,a,0,a.length-1)):ee&&null!==r&&Ct(r,0,r.length-1),K&&je&&"svg"===o&&(je=!1))},Mt=[],Ot=function(e,t){return 1===e.nodeType?null===e.getAttribute("slot")&&""===t||e.getAttribute("slot")===t:e["s-sn"]===t||""===t},It=function e(t){se&&(t.$attrs$&&t.$attrs$.ref&&t.$attrs$.ref(null),t.$children$&&t.$children$.map(e))},Dt=function(e,t){var i=e.$hostElement$,n=e.$cmpMeta$,r=e.$vnode$||ut(null,null),a=ft(t)?t:dt(null,null,t);if(y=i.tagName,me&&Array.isArray(t)&&t.some(ft))throw new Error('The <Host> must be the single root component.\nLooks like the render() function of "'.concat(y.toLowerCase(),'" is returning an array that contains the <Host>.\n\nThe render() function should look like this instead:\n\nrender() {\n // Do not return an array\n return (\n <Host>{content}</Host>\n );\n}\n '));if(V&&n.$attrsToReflect$&&(a.$attrs$=a.$attrs$||{},n.$attrsToReflect$.map((function(e){var t=Object(_.a)(e,2),n=t[0],r=t[1];return a.$attrs$[r]=i[n]}))),a.$tag$=null,a.$flags$|=4,e.$vnode$=a,a.$elm$=r.$elm$=U&&i.shadowRoot||i,(G||U)&&(m=i["s-sc"]),_e&&(v=i["s-cr"],Fe=Ge&&0!=(1&n.$flags$),He=!1),Et(r,a),_e){if(Ve.$flags$|=1,Ye){var o,s,l,c,h,d;!function e(t){for(var i,n,r,a,o,s,l=0,c=t.childNodes,h=c.length;l<h;l++){if((i=c[l])["s-sr"]&&(n=i["s-cr"])&&n.parentNode)for(r=n.parentNode.childNodes,a=i["s-sn"],s=r.length-1;s>=0;s--)(n=r[s])["s-cn"]||n["s-nr"]||n["s-hn"]===i["s-hn"]||(Ot(n,a)?(o=Mt.find((function(e){return e.$nodeToRelocate$===n})),He=!0,n["s-sn"]=n["s-sn"]||a,o?o.$slotRefNode$=i:Mt.push({$slotRefNode$:i,$nodeToRelocate$:n}),n["s-sr"]&&Mt.map((function(e){Ot(e.$nodeToRelocate$,n["s-sn"])&&(o=Mt.find((function(e){return e.$nodeToRelocate$===n})))&&!e.$slotRefNode$&&(e.$slotRefNode$=o.$slotRefNode$)}))):Mt.some((function(e){return e.$nodeToRelocate$===n}))||Mt.push({$nodeToRelocate$:n}));1===i.nodeType&&e(i)}}(a.$elm$);for(var u=0;u<Mt.length;u++)(s=(o=Mt[u]).$nodeToRelocate$)["s-ol"]||((l=ge||ye?Nt(s):We.createTextNode(""))["s-nr"]=s,s.parentNode.insertBefore(s["s-ol"]=l,s));for(u=0;u<Mt.length;u++)if(s=(o=Mt[u]).$nodeToRelocate$,o.$slotRefNode$){for(c=o.$slotRefNode$.parentNode,h=o.$slotRefNode$.nextSibling,l=s["s-ol"];l=l.previousSibling;)if((d=l["s-nr"])&&d["s-sn"]===s["s-sn"]&&c===d.parentNode&&(!(d=d.nextSibling)||!d["s-nr"])){h=d;break}(!h&&c!==s.parentNode||s.nextSibling!==h)&&s!==h&&(!s["s-hn"]&&s["s-ol"]&&(s["s-hn"]=s["s-ol"].parentNode.nodeName),c.insertBefore(s,h))}else 1===s.nodeType&&(s.hidden=!0)}He&&function e(t){var i,n,r,a,o,s,l=t.childNodes;for(n=0,r=l.length;n<r;n++)if(1===(i=l[n]).nodeType){if(i["s-sr"])for(o=i["s-sn"],i.hidden=!1,a=0;a<r;a++)if(s=l[a].nodeType,l[a]["s-hn"]!==i["s-hn"]||""!==o){if(1===s&&o===l[a].getAttribute("slot")){i.hidden=!0;break}}else if(1===s||3===s&&""!==l[a].textContent.trim()){i.hidden=!0;break}e(i)}}(a.$elm$),Ve.$flags$&=-2,Mt.length=0}},zt=function(e){return We.createComment("<slot".concat(e.$name$?' name="'+e.$name$+'"':"","> (host=").concat(y.toLowerCase(),")"))},Nt=function(e){return We.createComment("org-location for "+(e.localName?"<".concat(e.localName,"> (host=").concat(e["s-hn"],")"):"[".concat(e.textContent,"]")))},Rt=function(e,t,i){var n=function(e){return we?ci(e).$hostElement$:e}(e);return{emit:function(e){return me&&!n.isConnected&&gi('The "'.concat(t,'" event was emitted, but the dispatcher node is no longer connected to the dom.')),Ft(n,t,{bubbles:!!(4&i),composed:!!(2&i),cancelable:!!(1&i),detail:e})}}},Ft=function(e,t,i){var n=Ve.ce(t,i);return e.dispatchEvent(n),n},Ht=function(e,t){De&&t&&!e.$onRenderResolve$&&t["s-p"]&&t["s-p"].push(new Promise((function(t){return e.$onRenderResolve$=t})))},Yt=function(e,t){if(pe&&ee&&(e.$flags$|=16),!(De&&4&e.$flags$)){Ht(e,e.$ancestorComponent$);var i=function(){return jt(e,t)};return pe?Pi(i):i()}e.$flags$|=512},jt=function(e,t){var i,n=e.$hostElement$,r=tt("scheduleUpdate",e.$cmpMeta$.$tagName$),a=we?e.$lazyInstance$:n;return t?(we&&z&&(e.$flags$|=256,e.$queuedListeners$&&(e.$queuedListeners$.map((function(e){var t=Object(_.a)(e,2),i=t[0],n=t[1];return Vt(a,i,n)})),e.$queuedListeners$=null)),Ut(n,"componentWillLoad"),L&&(i=Vt(a,"componentWillLoad"))):(Ut(n,"componentWillUpdate"),E&&(i=Vt(a,"componentWillUpdate"))),Ut(n,"componentWillRender"),M&&(i=Gt(i,(function(){return Vt(a,"componentWillRender")}))),r(),Gt(i,(function(){return $t(e,a,t)}))},$t=function(){var e=Object(r.a)(w.a.mark((function e(t,i,n){var r,a,o,s,l,c;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.$hostElement$,a=tt("update",t.$cmpMeta$.$tagName$),o=r["s-rc"],Q&&n&&ot(t),s=tt("render",t.$cmpMeta$.$tagName$),me&&(t.$flags$|=1024),!ye){e.next=11;break}return e.next=9,Xt(t,i,r);case 9:e.next=12;break;case 11:Xt(t,i,r);case 12:if(Ee&&Ve.$cssShim$&&Ve.$cssShim$.updateHost(r),me&&(t.$renderCount$++,t.$flags$&=-1025),ye)try{Zt(r),n&&(1&t.$cmpMeta$.$flags$?r["s-en"]="":2&t.$cmpMeta$.$flags$&&(r["s-en"]="c"))}catch(e){ui(e,r)}De&&o&&(o.map((function(e){return e()})),r["s-rc"]=void 0),s(),a(),De?(l=r["s-p"],c=function(){return Bt(t)},0===l.length?c():(Promise.all(l).then(c),t.$flags$|=4,l.length=0)):Bt(t);case 19:case"end":return e.stop()}}),e)})));return function(t,i,n){return e.apply(this,arguments)}}(),Xt=function(e,t,i){var n=!!S,r=!!we,a=!!pe,o=!!ee;try{if(t,t=(n||t.render)&&t.render(),o&&a&&(e.$flags$&=-17),(o||r)&&(e.$flags$|=2),D||V)if(ce||V){if(ye)return Promise.resolve(t).then((function(t){return Dt(e,t)}));Dt(e,t)}else i.textContent=t}catch(t){ui(t,e.$hostElement$)}return null,null},Bt=function(e){var t=e.$cmpMeta$.$tagName$,i=e.$hostElement$,n=tt("postUpdate",t),r=we?e.$lazyInstance$:i,a=e.$ancestorComponent$;P&&(me&&(e.$flags$|=1024),Vt(r,"componentDidRender"),me&&(e.$flags$&=-1025)),Ut(i,"componentDidRender"),64&e.$flags$?(T&&(me&&(e.$flags$|=1024),Vt(r,"componentDidUpdate"),me&&(e.$flags$&=-1025)),Ut(i,"componentDidUpdate"),n()):(e.$flags$|=64,De&&Z&&qt(i),A&&(me&&(e.$flags$|=2048),Vt(r,"componentDidLoad"),me&&(e.$flags$&=-2049)),Ut(i,"componentDidLoad"),n(),De&&(e.$onReadyResolve$(i),a||Wt(t))),fe&&i["s-hmr-load"]&&i["s-hmr-load"](),$&&we&&e.$onInstanceResolve$(i),De&&(e.$onRenderResolve$&&(e.$onRenderResolve$(),e.$onRenderResolve$=void 0),512&e.$flags$&&Ti((function(){return Yt(e,!1)})),e.$flags$&=-517)},Wt=function(e){Z&&qt(We.documentElement),ze&&(Ve.$flags$|=2),Ti((function(){return Ft(Be,"appload",{detail:{namespace:"app"}})})),ke&&performance.measure&&performance.measure("[Stencil] ".concat("app"," initial load (by ").concat(e,")"),"st:app:start")},Vt=function(e,t,i){if(e&&e[t])try{return e[t](i)}catch(e){ui(e)}},Gt=function(e,t){return e&&e.then?e.then(t):t()},Ut=function(e,t){xe&&Ft(e,"stencil_"+t,{bubbles:!0,composed:!0,detail:{namespace:"app"}})},qt=function(e){return Ae?e.classList.add("hydrated"):Se?e.setAttribute("hydrated",""):void 0},Zt=function e(t){var i=t.children;if(null!=i)for(var n=0,r=i.length;n<r;n++){var a=i[n];"function"==typeof a.connectedCallback&&a.connectedCallback(),e(a)}},Jt=function e(t,i,n,r,a,o,s){var l,c,h,d;if(1===o.nodeType){for((l=o.getAttribute("c-id"))&&((c=l.split("."))[0]!==s&&"0"!==c[0]||(h={$flags$:0,$hostId$:c[0],$nodeId$:c[1],$depth$:c[2],$index$:c[3],$tag$:o.tagName.toLowerCase(),$elm$:o,$attrs$:null,$children$:null,$key$:null,$name$:null,$text$:null},i.push(h),o.removeAttribute("c-id"),t.$children$||(t.$children$=[]),t.$children$[h.$index$]=h,t=h,r&&"0"===h.$depth$&&(r[h.$index$]=h.$elm$))),d=o.childNodes.length-1;d>=0;d--)e(t,i,n,r,a,o.childNodes[d],s);if(o.shadowRoot)for(d=o.shadowRoot.childNodes.length-1;d>=0;d--)e(t,i,n,r,a,o.shadowRoot.childNodes[d],s)}else if(8===o.nodeType)(c=o.nodeValue.split("."))[1]!==s&&"0"!==c[1]||(l=c[0],h={$flags$:0,$hostId$:c[1],$nodeId$:c[2],$depth$:c[3],$index$:c[4],$elm$:o,$attrs$:null,$children$:null,$key$:null,$name$:null,$tag$:null,$text$:null},"t"===l?(h.$elm$=o.nextSibling,h.$elm$&&3===h.$elm$.nodeType&&(h.$text$=h.$elm$.textContent,i.push(h),o.remove(),t.$children$||(t.$children$=[]),t.$children$[h.$index$]=h,r&&"0"===h.$depth$&&(r[h.$index$]=h.$elm$))):h.$hostId$===s&&("s"===l?(h.$tag$="slot",c[5]?o["s-sn"]=h.$name$=c[5]:o["s-sn"]="",o["s-sr"]=!0,U&&r&&(h.$elm$=We.createElement(h.$tag$),h.$name$&&h.$elm$.setAttribute("name",h.$name$),o.parentNode.insertBefore(h.$elm$,o),o.remove(),"0"===h.$depth$&&(r[h.$index$]=h.$elm$)),n.push(h),t.$children$||(t.$children$=[]),t.$children$[h.$index$]=h):"r"===l&&(U&&r?o.remove():_e&&(a["s-cr"]=o,o["s-cn"]=!0))));else if(t&&"style"===t.$tag$){var u=ut(null,o.textContent);u.$elm$=o,u.$index$="0",t.$children$=[u]}},Qt=function e(t,i){if(1===t.nodeType){for(var n=0;n<t.childNodes.length;n++)e(t.childNodes[n],i);if(t.shadowRoot)for(n=0;n<t.shadowRoot.childNodes.length;n++)e(t.shadowRoot.childNodes[n],i)}else if(8===t.nodeType){var r=t.nodeValue.split(".");"o"===r[0]&&(i.set(r[1]+"."+r[2],t),t.nodeValue="",t["s-en"]=r[3])}},Kt=function(e,t,i,n){var r,a,o=ci(e),s=we?o.$hostElement$:e,l=o.$instanceValues$.get(t),c=o.$flags$,h=we?o.$lazyInstance$:s;if(r=i,a=n.$members$[t][0],i=null==r||ht(r)?r:Te&&4&a?"false"!==r&&(""===r||!!r):Pe&&2&a?parseFloat(r):Le&&1&a?String(r):r,!(we&&8&c&&void 0!==l||i===l)&&(o.$instanceValues$.set(t,i),me&&(1024&o.$flags$?gi('The state/prop "'.concat(t,'" changed during rendering. This can potentially lead to infinite-loops and other bugs.'),"\nElement",s,"\nNew value",i,"\nOld value",l):2048&o.$flags$&&gi('The state/prop "'.concat(t,'" changed during "componentDidLoad()", this triggers extra re-renders, try to setup on "componentWillLoad()"'),"\nElement",s,"\nNew value",i,"\nOld value",l)),!we||h)){if(ue&&n.$watchers$&&128&c){var d=n.$watchers$[t];d&&d.map((function(e){try{h[e](i,l,t)}catch(e){ui(e,s)}}))}if(ee&&2==(18&c)){if(Oe&&h.componentShouldUpdate&&!1===h.componentShouldUpdate(i,l,t))return;Yt(o,!1)}}},ei=function(e,t,i){if(j&&t.$members$){ue&&e.watchers&&(t.$watchers$=e.watchers);var n=Object.entries(t.$members$),r=e.prototype;if(n.map((function(e){var n=Object(_.a)(e,2),a=n[0],o=Object(_.a)(n[1],1)[0];(W||J)&&(31&o||(!we||2&i)&&32&o)?Object.defineProperty(r,a,{get:function(){return e=a,ci(this).$instanceValues$.get(e);var e},set:function(e){if(me){var n=ci(this);0==(1&i)&&0==(8&n.$flags$)&&0!=(31&o)&&0==(1024&o)&&gi('@Prop() "'.concat(a,'" on <').concat(t.$tagName$,"> is immutable but was modified from within the component.\nMore information: https://stenciljs.com/docs/properties#prop-mutability"))}Kt(this,a,e,t)},configurable:!0,enumerable:!0}):we&&$&&1&i&&64&o&&Object.defineProperty(r,a,{value:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var n=ci(this);return n.$onInstancePromise$.then((function(){var e;return(e=n.$lazyInstance$)[a].apply(e,t)}))}})})),B&&(!we||1&i)){var a=new Map;r.attributeChangedCallback=function(e,t,i){var n=this;Ve.jmp((function(){var t=a.get(e);n[t]=(null!==i||"boolean"!=typeof n[t])&&i}))},e.observedAttributes=n.filter((function(e){var t=Object(_.a)(e,2);t[0];return 15&t[1][0]})).map((function(e){var i=Object(_.a)(e,2),n=i[0],r=i[1],o=r[1]||n;return a.set(o,n),V&&512&r[0]&&t.$attrsToReflect$.push([n,o]),o}))}}return e},ti=function(){var e=Object(r.a)(w.a.mark((function e(t,n,r,a,o){var s,l,c,h,d,u,p;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(we||ye||Q)||0!=(32&n.$flags$)){e.next=36;break}if(!we&&!be){e.next=22;break}if(n.$flags$|=32,!(o=vi(r,n,a)).then){e.next=10;break}return s=it("st:load:".concat(r.$tagName$,":").concat(n.$modeName$),"[Stencil] Load module for <".concat(r.$tagName$,">")),e.next=8,o;case 8:o=e.sent,s();case 10:if(!me&&!ge||o){e.next=12;break}throw new Error('Constructor for "'.concat(r.$tagName$,"#").concat(n.$modeName$,'" was not found'));case 12:j&&!o.isProxied&&(ue&&(r.$watchers$=o.watchers),ei(o,r,2),o.isProxied=!0),l=tt("createInstance",r.$tagName$),j&&(n.$flags$|=8);try{new o(n)}catch(e){ui(e)}j&&(n.$flags$&=-9),ue&&(n.$flags$|=128),l(),ii(n.$lazyInstance$),e.next=24;break;case 22:o=t.constructor,n.$flags$|=160;case 24:if(!Q||!o.style){e.next=36;break}if(c=o.style,X&&"string"!=typeof c&&(c=c[n.$modeName$=lt(t)],ye&&n.$modeName$&&t.setAttribute("s-mode",n.$modeName$)),h=st(r,n.$modeName$),yi.has(h)){e.next=36;break}if(d=tt("registerStyles",r.$tagName$),!(!ye&&U&&Ce&&8&r.$flags$)){e.next=34;break}return e.next=33,i.e(7).then(i.bind(null,52)).then((function(e){return e.scopeCss(c,h,!1)}));case 33:c=e.sent;case 34:rt(h,c,!!(1&r.$flags$)),d();case 36:u=n.$ancestorComponent$,p=function(){return Yt(n,!0)},De&&u&&u["s-rc"]?u["s-rc"].push(p):p();case 39:case"end":return e.stop()}}),e)})));return function(t,i,n,r,a){return e.apply(this,arguments)}}(),ii=function(e){we&&O&&Vt(e,"connectedCallback")},ni=function(e){if(0==(1&Ve.$flags$)){var t=ci(e),i=t.$cmpMeta$,n=tt("connectedCallback",i.$tagName$);if(H&&Ze(e,t,i.$listeners$,!0),1&t.$flags$)Ze(e,t,i.$listeners$,!1),ii(t.$lazyInstance$);else{var r;if(t.$flags$|=1,be&&(r=e.getAttribute("s-id"))){if(U&&Ge&&1&i.$flags$){var a=X?at(e.shadowRoot,i,e.getAttribute("s-mode")):at(e.shadowRoot,i);e.classList.remove(a+"-h",a+"-s")}!function(e,t,i,n){var r=tt("hydrateClient",t),a=e.shadowRoot,o=[],s=U&&a?[]:null,l=n.$vnode$=ut(t,null);Ve.$orgLocNodes$||Qt(We.body,Ve.$orgLocNodes$=new Map),e["s-id"]=i,e.removeAttribute("s-id"),Jt(l,o,[],s,e,e,i),o.map((function(e){var i=e.$hostId$+"."+e.$nodeId$,n=Ve.$orgLocNodes$.get(i),r=e.$elm$;n&&Ge&&""===n["s-en"]&&n.parentNode.insertBefore(r,n.nextSibling),a||(r["s-hn"]=t,n&&(r["s-ol"]=n,r["s-ol"]["s-nr"]=r)),Ve.$orgLocNodes$.delete(i)})),U&&a&&s.map((function(e){e&&a.appendChild(e)})),r()}(e,i.$tagName$,r,t)}if(_e&&!r&&(ye||(q||U)&&12&i.$flags$)&&ri(e),De)for(var o=e;o=o.parentNode||o.host;)if(be&&1===o.nodeType&&o.hasAttribute("s-id")&&o["s-p"]||o["s-p"]){Ht(t,t.$ancestorComponent$=o);break}W&&we&&!ye&&i.$members$&&Object.entries(i.$members$).map((function(t){var i=Object(_.a)(t,2),n=i[0];if(31&Object(_.a)(i[1],1)[0]&&e.hasOwnProperty(n)){var r=e[n];delete e[n],e[n]=r}})),Ie?Ti((function(){return ti(e,t,i)})):ti(e,t,i)}n()}},ri=function(e){var t=e["s-cr"]=We.createComment(ge?"content-ref (host=".concat(e.localName,")"):"");t["s-cn"]=!0,e.insertBefore(t,e.firstChild)},ai=function(e){if(0==(1&Ve.$flags$)){var t=ci(e),i=we?t.$lazyInstance$:e;z&&t.$rmListeners$&&(t.$rmListeners$.map((function(e){return e()})),t.$rmListeners$=void 0),Ee&&Ve.$cssShim$&&Ve.$cssShim$.removeHost(e),we&&I&&Vt(i,"disconnectedCallback"),C&&Vt(i,"componentDidUnload")}},oi=function(e,t){var i={$flags$:t[0],$tagName$:t[1]};j&&(i.$members$=t[2]),z&&(i.$listeners$=t[3]),ue&&(i.$watchers$=e.$watchers$),V&&(i.$attrsToReflect$=[]),U&&!Ge&&1&i.$flags$&&(i.$flags$|=8);var n=e.prototype.connectedCallback,r=e.prototype.disconnectedCallback;return Object.assign(e.prototype,{__registerHost:function(){hi(this,i)},connectedCallback:function(){ni(this),O&&n&&n.call(this)},disconnectedCallback:function(){ai(this),I&&r&&r.call(this)}}),e.is=i.$tagName$,ei(e,i,3)},si=function(e){Ge?e.attachShadow({mode:"open"}):e.shadowRoot=e},li=new WeakMap,ci=function(e){return li.get(e)},hi=function(e,t){var i={$flags$:0,$hostElement$:e,$cmpMeta$:t,$instanceValues$:new Map};return me&&(i.$renderCount$=0),$&&we&&(i.$onInstancePromise$=new Promise((function(e){return i.$onInstanceResolve$=e}))),De&&(i.$onReadyPromise$=new Promise((function(e){return i.$onReadyResolve$=e})),e["s-p"]=[],e["s-rc"]=[]),Ze(e,i,t.$listeners$,!1),li.set(e,i)},di=function(e,t){return t in e},ui=function(e,t){return(b||console.error)(e,t)},pi=ve?["STENCIL:"]:["%cstencil","color: white;background:#4c47ff;font-weight: bold; font-size:10px; padding:2px 6px; border-radius: 5px"],fi=function(){for(var e,t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];return(e=console).error.apply(e,pi.concat(i))},gi=function(){for(var e,t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];return(e=console).warn.apply(e,pi.concat(i))},mi=new Map,vi=function(e,t,n){var r=e.$tagName$.replace(/-/g,"_"),a=e.$lazyBundleId$;if(!me||"string"==typeof a){var o=!fe&&mi.get(a);return o?o[r]:i(34)("./".concat(a,".entry.js").concat(BUILD.hotModuleReplacement&&n?"?s-hmr="+n:"")).then((function(e){return fe||mi.set(a,e),e[r]}),ui)}fi("Trying to lazily load component <".concat(e.$tagName$,'> with style mode "').concat(t.$modeName$,'", but it does not exist.'))},yi=new Map,bi=[],xi=[],wi=[],ki=[],_i=function(e,t){return function(i){e.push(i),Xe||(Xe=!0,t&&4&Ve.$flags$?Ti(Ci):Ve.raf(Ci))}},Si=function(e){for(var t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){ui(e)}e.length=0},Ai=function(e,t){for(var i=0,n=0;i<e.length&&(n=performance.now())<t;)try{e[i++](n)}catch(e){ui(e)}i===e.length?e.length=0:0!==i&&e.splice(0,i)},Ci=function e(){if(ze&&$e++,Si(xi),ze){var t=2==(6&Ve.$flags$)?performance.now()+14*Math.ceil(.1*$e):1/0;Ai(wi,t),Ai(ki,t),wi.length>0&&(ki.push.apply(ki,wi),wi.length=0),(Xe=xi.length+wi.length+ki.length>0)?Ve.raf(e):$e=0}else Si(wi),(Xe=xi.length>0)&&Ve.raf(e)},Ti=function(e){return Promise.resolve(t).then(e);var t},Pi=_i(wi,!0);function Li(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=Object(d.a)(e);if(t){var r=Object(d.a)(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return Object(h.a)(this,i)}}function Ei(e){var t,i=e.split(":");return i.length>1&&(t=60*parseInt(i[0])),parseInt(i[1])+parseInt(t)}function Mi(){var e=navigator.userAgent||navigator.vendor;return/windows phone/i.test(e)?"Windows Phone":/android/i.test(e)?"Android":"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1||/(iPad|iPhone|iPod)/gi.test(navigator.platform)?"iOS":"unknown"}function Oi(){return"Android"===Mi()&&(e=window.navigator.standalone,t=window.navigator.userAgent.toLowerCase(),i=/safari/.test(t),!(/iphone|ipod|ipad/.test(t)?!e&&i||e||i:!t.includes("wv")));var e,t,i}var Ii=function(e){Object(c.a)(i,e);var t=Li(i);function i(){var e;return Object(o.a)(this,i),(e=t.call(this)).__registerHost(),si(Object(l.a)(e)),e.show=!1,e.youtubeRenderKey=1,e}return Object(s.a)(i,[{key:"componentWillLoad",value:function(){this.handleDuration()}},{key:"handleButtonCountChange",value:function(e,t){console.log(e),(null==e?void 0:e.button_count)!==(null==t?void 0:t.button_count)&&this.youtubeRenderKey++,(null==e?void 0:e.enabled)&&this.handleDuration()}},{key:"handleDuration",value:function(){var e,t;(null===(e=null===window||void 0===window?void 0:window.wp)||void 0===e?void 0:e.blocks)?this.show=!0:this.show=function(e){var t=e.current,i=e.duration,n=e.showAfter;if(t===n)return!0;var r=t/i*100;return 99.9<r&&(r=100),r>=n}({current:this.currentTime,duration:this.duration,showAfter:(null===(t=this.config)||void 0===t?void 0:t.percentage_start)||0})}},{key:"youtubeButton",value:function(){var e,t,i,n;if("youtube"===(null===(e=this.config)||void 0===e?void 0:e.button_type)&&(null===(t=this.youtube)||void 0===t?void 0:t.channelId))return dt("presto-youtube-subscribe-button",{key:this.youtubeRenderKey,channel:null===(i=this.youtube)||void 0===i?void 0:i.channelId,showCount:null===(n=this.config)||void 0===n?void 0:n.button_count})}},{key:"customButton",value:function(){var e,t,i,n,r,a,o,s,l,c,h;if("custom"===(null===(e=this.config)||void 0===e?void 0:e.button_type))return dt("presto-player-button",{type:"primary",size:"small",href:null===(i=null===(t=this.config)||void 0===t?void 0:t.button_link)||void 0===i?void 0:i.url,target:(null===(r=null===(n=this.config)||void 0===n?void 0:n.button_link)||void 0===r?void 0:r.opensInNewTab)?"_blank":"_self",style:Object.assign(Object.assign({"--presto-player-button-border-radius":"".concat(null===(a=this.config)||void 0===a?void 0:a.button_radius,"px")},(null===(o=this.config)||void 0===o?void 0:o.button_color)?{"--presto-player-button-color":"".concat(null===(s=this.config)||void 0===s?void 0:s.button_color)}:{}),(null===(l=this.config)||void 0===l?void 0:l.button_text_color)?{"--presto-player-button-text":"".concat(null===(c=this.config)||void 0===c?void 0:c.button_text_color)}:{})},null===(h=this.config)||void 0===h?void 0:h.button_text)}},{key:"render",value:function(){var e,t;return dt("presto-action-bar-ui",{open:this.show,style:{"--presto-action-bar-background":(null===(e=this.config)||void 0===e?void 0:e.background_color)||"#1d1d1d"}},null===(t=this.config)||void 0===t?void 0:t.text,dt("div",{slot:"button"},this.youtubeButton(),this.customButton()))}},{key:"el",get:function(){return this}}],[{key:"watchers",get:function(){return{config:["handleButtonCountChange"],currentTime:["handleDuration"],duration:["handleDuration"]}}},{key:"style",get:function(){return":host{display:block}"}}]),i}(g(HTMLElement)),Di=function(e){Object(c.a)(i,e);var t=Li(i);function i(){var e;return Object(o.a)(this,i),(e=t.call(this)).__registerHost(),si(Object(l.a)(e)),e}return Object(s.a)(i,[{key:"render",value:function(){return dt("div",{class:{bar:!0,"bar--open":this.open}},dt("span",{part:"content",class:"bar__content"},dt("slot",null)),dt("span",{part:"button",class:"bar__button"},dt("slot",{name:"button"})))}}],[{key:"style",get:function(){return":host{display:block;overflow:hidden}.bar{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;background:var(--presto-action-bar-background, #1d1d1d);color:#fff;padding:0 var(--presto-action-bar-padding, 6px);line-height:1em;font-size:16px;margin-top:-100%;transition:margin var(--presto-action-bar-animation-speed, 0.5s) ease-in-out;transform:translate3d(0)}.bar.bar--open{margin-top:0}.bar__button{margin:var(--presto-action-bar-padding, 6px);display:flex;align-items:center}.bar__content{margin:var(--presto-action-bar-padding, 6px);width:100%;text-align:center}@media screen and (min-width: 480px){.bar__content{width:auto}}"}}]),i}(g(HTMLElement)),zi=function(e){Object(c.a)(i,e);var t=Li(i);function i(){var e;return Object(o.a)(this,i),(e=t.call(this)).__registerHost(),e}return Object(s.a)(i,[{key:"componentWillLoad",value:function(){this.poster=this.poster||this.thumbnail}},{key:"render",value:function(){return dt("presto-video",{getRef:this.getRef,player:this.player,autoplay:this.autoplay,preload:this.preload,poster:this.poster,playsinline:this.playsinline,src:this.src,tracks:this.tracks})}}]),i}(g(HTMLElement)),Ni=function(e){Object(c.a)(i,e);var t=Li(i);function i(){var e;return Object(o.a)(this,i),(e=t.call(this)).__registerHost(),e.playVideo=Rt(Object(l.a)(e),"playVideo",7),e.rewatchVideo=Rt(Object(l.a)(e),"rewatchVideo",7),e.percentagePassed=0,e}return Object(s.a)(i,[{key:"componentWillLoad",value:function(){this.handleDuration()}},{key:"timePassed",value:function(e){var t=e.current,i=e.duration,n=e.showAfter;if(t===n)return!0;var r=t/i*100;return 99.9<r&&(r=100),r>=n}},{key:"handleFullScreen",value:function(){var e,t,i,n,r,a,o,s,l,c,h,d,u=this;if(this.enabled&&!this.skipped&&this.player){if(this.player.fullscreen.active&&this.player.fullscreen.exit(),this.isiOS()&&!(null===(i=null===(t=null===(e=this.player)||void 0===e?void 0:e.config)||void 0===t?void 0:t.blockAttributes)||void 0===i?void 0:i.playsinline)&&("function"==typeof(null===(r=null===(n=null==this?void 0:this.player)||void 0===n?void 0:n.media)||void 0===r?void 0:r.webkitExitFullScreen)&&(null===(a=this.player)||void 0===a||a.media.webkitExitFullScreen()),"function"==typeof(null===(s=null===(o=null==this?void 0:this.player)||void 0===o?void 0:o.embed)||void 0===s?void 0:s.exitFullscreen)&&(null===(c=null===(l=null==this?void 0:this.player)||void 0===l?void 0:l.embed)||void 0===c||c.exitFullscreen()),this.isiOSYoutubeFullscreen())){var p=this.player.currentTime;this.player.currentTime=this.player.duration,this.player.once("playing",(function(){u.player.currentTime=p}))}this.player.ended&&(console.log("ended"),this.ended=!0,100===(null===(d=null===(h=this.preset)||void 0===h?void 0:h.cta)||void 0===d?void 0:d.percentage)&&(this.show=!0))}}},{key:"handleDuration",value:function(){var e,t;this.enabled=!this.skipped&&(null===(t=null===(e=this.preset)||void 0===e?void 0:e.cta)||void 0===t?void 0:t.enabled),this.handleTime()}},{key:"handlePercentagePassed",value:function(){this.percentagePassed=this.currentTime/this.duration*100}},{key:"handlePercentagePassedChange",value:function(){this.ended=this.percentagePassed>=99.9}},{key:"handleEnabled",value:function(){this.show&&(this.skipped||this.player&&this.player.pause())}},{key:"handleTime",value:function(){var e,t;this.enabled&&(this.skipped||100!==(null===(t=null===(e=this.preset)||void 0===e?void 0:e.cta)||void 0===t?void 0:t.percentage)&&this.checkTime())}},{key:"isiOS",value:function(){var e=window.navigator.userAgent;return!!e.match(/iPad/i)||!!e.match(/iPhone/i)}},{key:"isiOSYoutubeFullscreen",value:function(){var e,t,i;return this.isiOS()&&"youtube"===this.player.provider&&!(null===(i=null===(t=null===(e=this.player)||void 0===e?void 0:e.config)||void 0===t?void 0:t.blockAttributes)||void 0===i?void 0:i.playsinline)}},{key:"checkTime",value:function(){var e,t;this.show=this.timePassed({current:this.currentTime,duration:this.duration,showAfter:(null===(t=null===(e=this.preset)||void 0===e?void 0:e.cta)||void 0===t?void 0:t.percentage)||0})}},{key:"skip",value:function(){this.skipped=!0,this.show=!1,this.playVideo.emit()}},{key:"rewatch",value:function(){var e=this;this.ended=!1,this.show=!1,this.rewatchVideo.emit(),this.player.once("timeupdate",(function(){setTimeout((function(){return e.player.play()}),500)})),this.player.restart()}},{key:"render",value:function(){var e,t,i,n,r,a,o,s,l,c,h,d,u,p,f,g,m,v,y,b,x,w,k,_,S,A,C,T,P,L=this;if(this.show)return dt("presto-cta-overlay-ui",{style:Object.assign(Object.assign(Object.assign({"--presto-player-button-border-radius":"".concat(null===(t=null===(e=this.preset)||void 0===e?void 0:e.cta)||void 0===t?void 0:t.button_radius,"px")},(null===(n=null===(i=this.preset)||void 0===i?void 0:i.cta)||void 0===n?void 0:n.background_opacity)?{"--presto-player-cta-background-opacity":"".concat((null===(a=null===(r=this.preset)||void 0===r?void 0:r.cta)||void 0===a?void 0:a.background_opacity)/100)}:{}),(null===(s=null===(o=this.preset)||void 0===o?void 0:o.cta)||void 0===s?void 0:s.button_color)?{"--presto-player-button-color":"".concat(null===(c=null===(l=this.preset)||void 0===l?void 0:l.cta)||void 0===c?void 0:c.button_color)}:{}),(null===(d=null===(h=this.preset)||void 0===h?void 0:h.cta)||void 0===d?void 0:d.button_text_color)?{"--presto-player-button-text":"".concat(null===(p=null===(u=this.preset)||void 0===u?void 0:u.cta)||void 0===p?void 0:p.button_text_color)}:{}),direction:this.direction,class:"cta-overlay",headline:null===(g=null===(f=this.preset)||void 0===f?void 0:f.cta)||void 0===g?void 0:g.headline,"bottom-text":null===(v=null===(m=this.preset)||void 0===m?void 0:m.cta)||void 0===v?void 0:v.bottom_text,"show-button":null===(b=null===(y=this.preset)||void 0===y?void 0:y.cta)||void 0===b?void 0:b.show_button,buttonLink:null===(w=null===(x=this.preset)||void 0===x?void 0:x.cta)||void 0===w?void 0:w.button_link,allowSkip:!this.ended&&(null===(_=null===(k=this.preset)||void 0===k?void 0:k.cta)||void 0===_?void 0:_.show_skip),allowRewatch:this.ended&&(null===(A=null===(S=this.preset)||void 0===S?void 0:S.cta)||void 0===A?void 0:A.show_rewatch),"skip-text":null===(C=null==this?void 0:this.i18n)||void 0===C?void 0:C.skip,"button-text":null===(P=null===(T=this.preset)||void 0===T?void 0:T.cta)||void 0===P?void 0:P.button_text,onSkip:function(){return L.skip()},onRewatch:function(){return L.rewatch()}})}}],[{key:"watchers",get:function(){return{currentTime:["handleFullScreen","handlePercentagePassed","handleEnabled","handleTime"],duration:["handleDuration","handlePercentagePassed"],percentagePassed:["handlePercentagePassedChange"]}}},{key:"style",get:function(){return":host{display:block}"}}]),i}(g(HTMLElement)),Ri=function(e,t,n){var r=function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);return e}({minFontSize:-1/0,maxFontSize:1/0,container:e},n),a=function(e){var n=t||1,a=function(){e.style.fontSize=Math.max(Math.min(r.container.clientWidth/(10*n),parseFloat(r.maxFontSize)),parseFloat(r.minFontSize))+"px"};if(a(),"ResizeObserver"in window==!1)var o=i.e(0).then(i.bind(null,48)).then((function(){window.ResizeObserver=o.ResizeObserver,new ResizeObserver(a).observe(r.container)}));else new ResizeObserver(a).observe(r.container)};if(e.length)for(var o=0;o<e.length;o++)a(e[o]);else a(e);return e},Fi=function(e){Object(c.a)(i,e);var t=Li(i);function i(){var e;return Object(o.a)(this,i),(e=t.call(this)).__registerHost(),si(Object(l.a)(e)),e.skip=Rt(Object(l.a)(e),"skip",7),e.rewatch=Rt(Object(l.a)(e),"rewatch",7),e}return Object(s.a)(i,[{key:"componentDidLoad",value:function(){Ri(this.textInput,3,{maxFontSize:20,minFontSize:8})}},{key:"handleCTAClick",value:function(e){var t;(null===(t=this.buttonLink)||void 0===t?void 0:t.url)&&(e.preventDefault(),e.stopPropagation(),this.handleLink())}},{key:"handleLink",value:function(){var e,t,i;(null===(e=this.buttonLink)||void 0===e?void 0:e.opensInNewTab)?window.open(null===(t=this.buttonLink)||void 0===t?void 0:t.url,"_blank"):window.location.href=null===(i=this.buttonLink)||void 0===i?void 0:i.url}},{key:"render",value:function(){var e,t,i,n=this;return dt("div",{class:"wrapper",ref:function(e){return n.textInput=e}},dt("div",{onClick:function(e){return n.handleCTAClick(e)},class:"overlay ".concat("rtl"===this.direction?"rtl":""," ").concat((null===(e=this.buttonLink)||void 0===e?void 0:e.url)?"has-link":"")},dt("div",{class:"content"},dt("h1",{part:"cta-headline"},this.headline||this.defaultHeadline),this.bottomText&&dt("p",{part:"cta-bottom-text",innerHTML:this.bottomText}),this.showButton&&dt("presto-player-button",{full:!0,onClick:function(e){return n.handleCTAClick(e)},part:"cta-button",href:null===(t=null==this?void 0:this.buttonLink)||void 0===t?void 0:t.url,target:(null===(i=null==this?void 0:this.buttonLink)||void 0===i?void 0:i.opensInNewTab)?"_blank":"_self",class:"button",type:"primary"},this.buttonText))),!!this.allowRewatch&&dt("div",{class:"rewatch",onClick:function(e){e.preventDefault(),e.stopImmediatePropagation(),n.rewatch.emit()}},dt("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-corner-up-left"},dt("polyline",{points:"9 14 4 9 9 4"}),dt("path",{d:"M20 20v-7a4 4 0 0 0-4-4H4"})),this.rewatchText||"Rewatch"),!!this.allowSkip&&dt("div",{class:"skip",onClick:function(e){e.preventDefault(),n.skip.emit()}},this.skipText||"Skip"," →"))}}],[{key:"style",get:function(){return':host{display:block;font-size:16px;width:100%;height:100%;position:absolute;top:0;left:0;bottom:0;right:0;width:100%;height:100%;z-index:99999;user-select:none}*{box-sizing:border-box}a{color:#fff}.wrapper{height:100%;position:relative;color:#fff;font-family:var(--plyr-font-family, "San Francisco", -apple-system, BlinkMacSystemFont, ".SFNSText-Regular", Avenir, "Avenir Next", "Helvetica Neue", "Segoe UI", Helvetica, Arial, sans-serif)}.overlay{position:relative;display:flex;align-items:center;justify-content:center;padding:48px;height:100%}.overlay.has-link{cursor:pointer}.overlay:before{content:"";border-radius:var(--presto-player-border-radius, 0);opacity:var(--presto-player-cta-background-opacity, 0.75);position:absolute;top:0;left:0;bottom:0;right:0;background-color:var(--presto-player-cta-background, #000);z-index:-1;box-shadow:inset 0 0 100px black}.content{width:80%;max-width:600px}.content *~*{margin-top:22px}button{background:var(--plyr-color-main, #000);appearance:none;padding:6px 12px;align-items:center;display:inline-flex;border-width:1px;border-color:transparent;color:#fff;border-radius:0;cursor:pointer;font-size:0.8em;border-radius:0 var(--presto-player-cta-border-radius, 0) var(--presto-player-cta-border-radius) 0}@media screen and (min-width: 700px){button{padding:10px 18px}}button:focus{box-shadow:white 0px 0px 0px 2px, var(--plyr-color-main, #000) 0px 0px 0px 4px, rgba(0, 0, 0, 0.05) 0px 1px 2px 0px;z-index:1}button:focus,button:hover{outline:none}h1{font-size:1.5em;font-weight:500;margin:0;line-height:1.1em}.skip,.rewatch{font-size:0.8em;font-weight:600;position:absolute;top:0;right:0;padding:4%;cursor:pointer}.rewatch{display:inline-flex;align-items:center;right:auto;left:0}.rewatch .icon{margin-right:5px}p{font-size:0.85em;margin:0;margin-top:1.5em;line-height:1.4em;opacity:0.75}'}}]),i}(g(HTMLElement)),Hi=function(e){Object(c.a)(i,e);var t=Li(i);function i(){var e;return Object(o.a)(this,i),(e=t.call(this)).__registerHost(),si(Object(l.a)(e)),e.position="top-right",e}return Object(s.a)(i,[{key:"closestElement",value:function(e,t){return t&&t!=document&&t!=window&&t.closest(e)||this.closestElement(e,t.getRootNode().host)}},{key:"componentDidLoad",value:function(){var e=this.closestElement("presto-player",this.el);Ri(this.text,3,{maxFontSize:16,minFontSize:10,container:e})}},{key:"render",value:function(){var e=this;return dt("a",{class:{"overlay-text":!0,"overlay--top-left":"top-left"===this.position,"overlay--top-right":"top-right"===this.position},href:this.href,target:this.target,part:"overlay-text",ref:function(t){return e.text=t}},dt("slot",null))}},{key:"el",get:function(){return this}}],[{key:"style",get:function(){return":host{display:block}.overlay-text{text-decoration:none;display:inline-block;line-height:1;cursor:pointer;font-size:var(--presto-dynamic-overlay-font-size, 18px);padding:var(--presto-dynamic-overlay-padding, 0.65em 0.85em);font-weight:var(--presto-dynamic-overlay-font-weight, 500);border-radius:var(--presto-dynamic-overlay-radius, 0.25em);background:var(--presto-dynamic-overlay-background, rgba(0, 0, 0, 0.8));color:var(--presto-dynamic-overlay-color, #fff)}"}}]),i}(g(HTMLElement)),Yi=function(e){Object(c.a)(i,e);var t=Li(i);function i(){var e;return Object(o.a)(this,i),(e=t.call(this)).__registerHost(),si(Object(l.a)(e)),e}return Object(s.a)(i,[{key:"showOverlay",value:function(e){return!(this.currentTime<Ei(null==e?void 0:e.startTime))&&!(this.currentTime>Ei(null==e?void 0:e.endTime))}},{key:"renderOverlay",value:function(e){var t,i;return dt("presto-dynamic-overlay-ui",{class:{visible:this.showOverlay(e)},position:e.position,href:null===(t=null==e?void 0:e.link)||void 0===t?void 0:t.url,target:(null===(i=null==e?void 0:e.link)||void 0===i?void 0:i.opensInNewTab)?"_blank":"_self",innerHTML:this.showOverlay(e)?e.text:""})}},{key:"render",value:function(){var e=this;if(this.enabled&&this.overlays&&this.overlays.length)return dt("div",{class:"overlays"},dt("div",{class:"top-left"},this.overlays.map((function(t){return"top-left"!==t.position?"":e.renderOverlay(t)}))),dt("div",{class:"top-right"},this.overlays.map((function(t){return"top-right"!==t.position?"":e.renderOverlay(t)}))))}}],[{key:"style",get:function(){return".top-left,.top-right{position:absolute;display:block;padding:20px;max-width:45%;z-index:20;display:flex;flex-direction:column;flex-wrap:wrap}.top-left{top:0;left:0}.top-right{top:0;right:0;align-items:flex-end}presto-dynamic-overlay-ui{overflow:hidden;height:0;opacity:0;transition:height 0ms 400ms, opacity 400ms 0ms}presto-dynamic-overlay-ui.visible{margin-bottom:10px;height:auto;opacity:1;transition:height 0ms 0ms, opacity 500ms 0ms}"}}]),i}(g(HTMLElement)),ji=function(e){Object(c.a)(h,e);var t,i,n=Li(h);function h(){var e;return Object(o.a)(this,h),(e=n.call(this)).__registerHost(),e.playVideo=Rt(Object(l.a)(e),"playVideo",7),e}return Object(s.a)(h,[{key:"setStorage",value:function(e){window.localStorage.setItem("presto.videos.email_collection",JSON.stringify(Object(a.a)({},this.videoId,e)))}},{key:"getStorage",value:function(){return window.localStorage.getItem("presto.videos.email_collection")}},{key:"componentWillLoad",value:function(){this.handleDuration()}},{key:"timePassed",value:function(e){var t=e.current,i=e.duration,n=e.showAfter;if(t===n)return!0;var r=t/i*100;return 99.9<r&&(r=100),r>=n}},{key:"handlePlayerInit",value:function(e,t){var i=this;t||this.player.on("play playing timeupdate",(function(){i.getStorage()||i.show&&i.player.pause()}))}},{key:"handleDuration",value:function(){var e,t;this.enabled=!this.getStorage()&&(null===(t=null===(e=this.preset)||void 0===e?void 0:e.email_collection)||void 0===t?void 0:t.enabled),this.handleTime()}},{key:"handleTime",value:function(){this.enabled&&(this.getStorage()||this.checkTime())}},{key:"checkTime",value:function(){var e,t;this.show=this.timePassed({current:this.currentTime,duration:this.duration,showAfter:(null===(t=null===(e=this.preset)||void 0===e?void 0:e.email_collection)||void 0===t?void 0:t.percentage)||0})}},{key:"getNonce",value:(i=Object(r.a)(w.a.mark((function e(){var t;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",fetch("".concat(null===(t=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===t?void 0:t.ajaxurl,"?action=presto_refresh_progress_nonce")));case 1:case"end":return e.stop()}}),e)}))),function(){return i.apply(this,arguments)})},{key:"submit",value:(t=Object(r.a)(w.a.mark((function e(t){var i,n,r,a,o,s,l,c,h;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.loading=!0,this.error="",e.next=4,this.getNonce();case 4:return n=e.sent,e.next=7,n.json();case 7:return r=e.sent,a=r.data,e.prev=9,e.next=12,fetch(null===(i=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===i?void 0:i.ajaxurl,{method:"post",body:new URLSearchParams(Object.assign({action:"presto_player_email_submit",nonce:a,preset_id:this.preset.id,video_id:this.videoId},(null==t?void 0:t.detail)||{}))});case 12:return o=e.sent,e.next=15,o.json();case 15:if(s=e.sent,l=s.success,c=s.data,!l){e.next=24;break}this.setStorage("collected"),this.show=!1,this.playVideo.emit(),e.next=25;break;case 24:throw c;case 25:e.next=31;break;case 27:e.prev=27,e.t0=e.catch(9),(h=null===e.t0||void 0===e.t0?void 0:e.t0[0])&&"string"==typeof h&&(this.error=h);case 31:return e.prev=31,this.loading=!1,e.finish(31);case 34:case"end":return e.stop()}}),e,this,[[9,27,31,34]])}))),function(e){return t.apply(this,arguments)})},{key:"skip",value:function(){this.setStorage("skipped"),this.show=!1,this.playVideo.emit()}},{key:"render",value:function(){var e,t,i,n,r,a,o,s,l,c,h,d=this;if(this.show)return dt("presto-email-overlay-ui",{direction:this.direction,class:"email-overlay",headline:null===(t=null===(e=this.preset)||void 0===e?void 0:e.email_collection)||void 0===t?void 0:t.headline,defaultHeadline:null===(i=null==this?void 0:this.i18n)||void 0===i?void 0:i.emailDefaultHeadline,bottomText:null===(r=null===(n=this.preset)||void 0===n?void 0:n.email_collection)||void 0===r?void 0:r.bottom_text,allowSkip:null===(o=null===(a=this.preset)||void 0===a?void 0:a.email_collection)||void 0===o?void 0:o.allow_skip,skipText:null===(s=null==this?void 0:this.i18n)||void 0===s?void 0:s.skip,buttonText:null===(c=null===(l=this.preset)||void 0===l?void 0:l.email_collection)||void 0===c?void 0:c.button_text,placeholder:null===(h=null==this?void 0:this.i18n)||void 0===h?void 0:h.emailPlaceholder,isLoading:this.loading,errorMessage:this.error,onSubmitForm:function(e){return d.submit(e)},onSkip:function(){return d.skip()}})}}],[{key:"watchers",get:function(){return{player:["handlePlayerInit"],duration:["handleDuration"],currentTime:["handleTime"]}}},{key:"style",get:function(){return":host{display:block}"}}]),h}(g(HTMLElement)),$i=function(e){Object(c.a)(i,e);var t=Li(i);function i(){var e;return Object(o.a)(this,i),(e=t.call(this)).__registerHost(),si(Object(l.a)(e)),e.submitForm=Rt(Object(l.a)(e),"submitForm",7),e.skip=Rt(Object(l.a)(e),"skip",7),e}return Object(s.a)(i,[{key:"handleSubmit",value:function(e){this.submitForm.emit({email:this.email}),e.preventDefault()}},{key:"componentDidLoad",value:function(){Ri(this.textInput,3,{maxFontSize:20,minFontSize:8})}},{key:"handleChange",value:function(e){this.email=e.target.value}},{key:"render",value:function(){var e=this;return dt("div",{class:"overlay ".concat("rtl"===this.direction?"rtl":""),ref:function(t){return e.textInput=t}},dt("div",{class:"content"},dt("h1",null,this.headline||this.defaultHeadline),this.isLoading?dt("presto-player-spinner",null):dt("form",{onSubmit:function(t){return e.handleSubmit(t)}},dt("input",{type:"email",placeholder:this.placeholder,value:this.email,onInput:function(t){return e.handleChange(t)},required:!0}),dt("button",{type:"submit"},this.buttonText||"Play")),this.errorMessage&&dt("p",{class:"error"},this.errorMessage),this.bottomText&&dt("p",{innerHTML:this.bottomText}),!!this.allowSkip&&dt("div",{class:"skip",onClick:function(){e.skip.emit()}},this.skipText||"Skip"," →")))}}],[{key:"style",get:function(){return':host{display:block;font-size:16px;width:100%;height:100%;position:absolute;top:0;left:0;bottom:0;right:0;width:100%;height:100%;z-index:99999}*{box-sizing:border-box}a{color:#fff}.overlay{position:relative;display:flex;align-items:center;text-align:center;justify-content:center;padding:48px;color:#fff;font-family:var(--plyr-font-family, "San Francisco", -apple-system, BlinkMacSystemFont, ".SFNSText-Regular", Avenir, "Avenir Next", "Helvetica Neue", "Segoe UI", Helvetica, Arial, sans-serif);height:100%}.overlay:before{content:"";border-radius:var(--presto-player-border-radius, 0);opacity:var(--presto-player-email-background-opacity, 0.75);position:absolute;top:0;left:0;bottom:0;right:0;background-color:var(--presto-player-email-background, #000);z-index:-1;box-shadow:inset 0 0 100px black}.content{width:20em}form{display:flex;align-items:stretch;justify-content:center}input{background:#fff;border:none;font-size:0.8em;line-height:20px;padding:6px 8px;border-radius:0;border-width:1px;border-style:solid;border-color:transparent;border-radius:var(--presto-player-email-border-radius, 0) 0 0 var(--presto-player-email-border-radius);flex:1}@media screen and (min-width: 700px){input{padding:10px 14px}}input:focus{border-color:var(--plyr-color-main, #000);z-index:1}input:focus,input:hover{outline:none}.rtl input{border-radius:0 var(--presto-player-email-border-radius, 0) var(--presto-player-email-border-radius) 0}button{background:var(--plyr-color-main, #000);appearance:none;padding:6px 12px;align-items:center;display:inline-flex;border-width:1px;border-color:transparent;color:#fff;border-radius:0;cursor:pointer;font-size:0.8em;border-radius:0 var(--presto-player-email-border-radius, 0) var(--presto-player-email-border-radius) 0}@media screen and (min-width: 700px){button{padding:10px 18px}}button:focus{box-shadow:white 0px 0px 0px 2px, var(--plyr-color-main, #000) 0px 0px 0px 4px, rgba(0, 0, 0, 0.05) 0px 1px 2px 0px;z-index:1}button:focus,button:hover{outline:none}.rtl button{border-radius:var(--presto-player-email-border-radius, 0) 0 0 var(--presto-player-email-border-radius)}h1{font-size:1.5em;font-weight:500;margin:0 0 22px 0;max-width:600px;line-height:1.1em}.skip{font-size:0.8em;font-weight:600;position:absolute;top:0;right:0;padding:4%;cursor:pointer}p{font-size:0.7em;margin:0;margin-top:1.5em}'}}]),i}(g(HTMLElement)),Xi=function(e){Object(c.a)(i,e);var t=Li(i);function i(){var e;return Object(o.a)(this,i),(e=t.call(this)).__registerHost(),e.playVideo=Rt(Object(l.a)(e),"playVideo",7),e}return Object(s.a)(i,[{key:"render",value:function(){var e,t,i,n,r,a,o,s,l,c=this;return dt("div",{class:"presto-player__muted-overlay",onClick:function(){c.mutedPreview=!1,c.playVideo.emit()}},(null===(e=this.preset)||void 0===e?void 0:e["play-large"])&&dt("div",{class:"plyr__control plyr__control--overlaid","data-plyr":"play","aria-label":"Play",part:"muted-overlay-play"},dt("svg",{id:"plyr-play",viewBox:"0 0 18 18"},dt("path",{d:"M15.562 8.1L3.87.225c-.818-.562-1.87 0-1.87.9v15.75c0 .9 1.052 1.462 1.87.9L15.563 9.9c.584-.45.584-1.35 0-1.8z"})),dt("span",{class:"plyr__sr-only"},"Play")),(null===(t=this.mutedOverlay)||void 0===t?void 0:t.enabled)&&(null===(i=this.mutedOverlay)||void 0===i?void 0:i.src)?dt("div",{class:"presto-player__overlay is-image",part:"muted-overlay-image",style:{width:"".concat((null===(n=this.mutedOverlay)||void 0===n?void 0:n.width)||50,"%"),left:"".concat(100*((null===(a=null===(r=this.mutedOverlay)||void 0===r?void 0:r.focalPoint)||void 0===a?void 0:a.x)||.5),"%"),top:"".concat(100*((null===(s=null===(o=this.mutedOverlay)||void 0===o?void 0:o.focalPoint)||void 0===s?void 0:s.y)||.5),"%")}},dt("img",{src:null===(l=this.mutedOverlay)||void 0===l?void 0:l.src,style:{transform:"translateX(-50%) translateY(-50%)"}})):"")}}],[{key:"style",get:function(){return":host{display:block}"}}]),i}(g(HTMLElement));function Bi(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Wi(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Bi(Object(i),!0).forEach((function(t){Ji(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Bi(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function Vi(e){return(Vi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Gi(e,t,i,n,r,a,o){try{var s=e[a](o),l=s.value}catch(e){return void i(e)}s.done?t(l):Promise.resolve(l).then(n,r)}function Ui(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qi(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Zi(e,t,i){return t&&qi(e.prototype,t),i&&qi(e,i),e}function Ji(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function Qi(e,t){if(null==e)return{};var i,n,r=function(e,t){if(null==e)return{};var i,n,r={},a=Object.keys(e);for(n=0;n<a.length;n++)i=a[n],t.indexOf(i)>=0||(r[i]=e[i]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)i=a[n],t.indexOf(i)>=0||Object.prototype.propertyIsEnumerable.call(e,i)&&(r[i]=e[i])}return r}function Ki(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==i)return;var n,r,a=[],o=!0,s=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);o=!0);}catch(e){s=!0,r=e}finally{try{o||null==i.return||i.return()}finally{if(s)throw r}}return a}(e,t)||tn(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function en(e){return function(e){if(Array.isArray(e))return nn(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||tn(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tn(e,t){if(e){if("string"==typeof e)return nn(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?nn(e,t):void 0}}function nn(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}function rn(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=tn(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==i.return||i.return()}finally{if(s)throw a}}}}var an=["premium","referrerPolicy"];function on(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function sn(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ln(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function cn(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function hn(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?cn(Object(i),!0).forEach((function(t){ln(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):cn(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var dn={addCSS:!0,thumbWidth:15,watch:!0};function un(e,t){return function(){return Array.from(document.querySelectorAll(t)).includes(this)}.call(e,t)}var pn=function(e){return null!=e?e.constructor:null},fn=function(e,t){return!!(e&&t&&e instanceof t)},gn=function(e){return null==e},mn=function(e){return pn(e)===Object},vn=function(e){return pn(e)===String},yn=function(e){return Array.isArray(e)},bn=function(e){return fn(e,NodeList)},xn=vn,wn=yn,kn=bn,_n=function(e){return fn(e,Element)},Sn=function(e){return fn(e,Event)},An=function(e){return gn(e)||(vn(e)||yn(e)||bn(e))&&!e.length||mn(e)&&!Object.keys(e).length};function Cn(e,t){if(1>t){var i=function(e){var t="".concat(e).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return t?Math.max(0,(t[1]?t[1].length:0)-(t[2]?+t[2]:0)):0}(t);return parseFloat(e.toFixed(i))}return Math.round(e/t)*t}var Tn,Pn,Ln,En=function(){function e(t,i){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),_n(t)?this.element=t:xn(t)&&(this.element=document.querySelector(t)),_n(this.element)&&An(this.element.rangeTouch)&&(this.config=hn({},dn,{},i),this.init())}return function(e,t,i){t&&sn(e.prototype,t),i&&sn(e,i)}(e,[{key:"init",value:function(){e.enabled&&(this.config.addCSS&&(this.element.style.userSelect="none",this.element.style.webKitUserSelect="none",this.element.style.touchAction="manipulation"),this.listeners(!0),this.element.rangeTouch=this)}},{key:"destroy",value:function(){e.enabled&&(this.config.addCSS&&(this.element.style.userSelect="",this.element.style.webKitUserSelect="",this.element.style.touchAction=""),this.listeners(!1),this.element.rangeTouch=null)}},{key:"listeners",value:function(e){var t=this,i=e?"addEventListener":"removeEventListener";["touchstart","touchmove","touchend"].forEach((function(e){t.element[i](e,(function(e){return t.set(e)}),!1)}))}},{key:"get",value:function(t){if(!e.enabled||!Sn(t))return null;var i,n=t.target,r=t.changedTouches[0],a=parseFloat(n.getAttribute("min"))||0,o=parseFloat(n.getAttribute("max"))||100,s=parseFloat(n.getAttribute("step"))||1,l=n.getBoundingClientRect(),c=100/l.width*(this.config.thumbWidth/2)/100;return 0>(i=100/l.width*(r.clientX-l.left))?i=0:100<i&&(i=100),50>i?i-=(100-2*i)*c:50<i&&(i+=2*(i-50)*c),a+Cn(i/100*(o-a),s)}},{key:"set",value:function(t){e.enabled&&Sn(t)&&!t.target.disabled&&(t.preventDefault(),t.target.value=this.get(t),function(e,t){if(e&&t){var i=new Event(t,{bubbles:!0});e.dispatchEvent(i)}}(t.target,"touchend"===t.type?"change":"input"))}}],[{key:"setup",value:function(t){var i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=null;if(An(t)||xn(t)?n=Array.from(document.querySelectorAll(xn(t)?t:'input[type="range"]')):_n(t)?n=[t]:kn(t)?n=Array.from(t):wn(t)&&(n=t.filter(_n)),An(n))return null;var r=hn({},dn,{},i);if(xn(t)&&r.watch){var a=new MutationObserver((function(i){Array.from(i).forEach((function(i){Array.from(i.addedNodes).forEach((function(i){_n(i)&&un(i,t)&&new e(i,r)}))}))}));a.observe(document.body,{childList:!0,subtree:!0})}return n.map((function(t){return new e(t,i)}))}},{key:"enabled",get:function(){return"ontouchstart"in document.documentElement}}]),e}(),Mn=function(e){return null!=e?e.constructor:null},On=function(e,t){return Boolean(e&&t&&e instanceof t)},In=function(e){return null==e},Dn=function(e){return Mn(e)===Object},zn=function(e){return Mn(e)===String},Nn=function(e){return Mn(e)===Function},Rn=function(e){return Array.isArray(e)},Fn=function(e){return On(e,NodeList)},Hn=function(e){return In(e)||(zn(e)||Rn(e)||Fn(e))&&!e.length||Dn(e)&&!Object.keys(e).length},Yn=In,jn=Dn,$n=function(e){return Mn(e)===Number&&!Number.isNaN(e)},Xn=zn,Bn=function(e){return Mn(e)===Boolean},Wn=Nn,Vn=Rn,Gn=Fn,Un=function(e){return null!==e&&"object"==Vi(e)&&1===e.nodeType&&"object"==Vi(e.style)&&"object"==Vi(e.ownerDocument)},qn=function(e){return On(e,Event)},Zn=function(e){return On(e,KeyboardEvent)},Jn=function(e){return On(e,TextTrack)||!In(e)&&zn(e.kind)},Qn=function(e){return On(e,Promise)&&Nn(e.then)},Kn=function(e){if(On(e,window.URL))return!0;if(!zn(e))return!1;var t=e;e.startsWith("http://")&&e.startsWith("https://")||(t="http://".concat(e));try{return!Hn(new URL(t).hostname)}catch(e){return!1}},er=Hn,tr=(Tn=document.createElement("span"),Pn={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},Ln=Object.keys(Pn).find((function(e){return void 0!==Tn.style[e]})),!!Xn(Ln)&&Pn[Ln]);function ir(e,t){setTimeout((function(){try{e.hidden=!0,e.hidden=!1}catch(e){}}),t)}var nr={isIE:Boolean(window.document.documentMode),isEdge:window.navigator.userAgent.includes("Edge"),isWebkit:"WebkitAppearance"in document.documentElement.style&&!/Edge/.test(navigator.userAgent),isIPhone:/(iPhone|iPod)/gi.test(navigator.platform),isIos:"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1||/(iPad|iPhone|iPod)/gi.test(navigator.platform)};function rr(e,t){return t.split(".").reduce((function(e,t){return e&&e[t]}),e)}function ar(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];if(!i.length)return e;var r=i.shift();return jn(r)?(Object.keys(r).forEach((function(t){jn(r[t])?(Object.keys(e).includes(t)||Object.assign(e,Ji({},t,{})),ar(e[t],r[t])):Object.assign(e,Ji({},t,r[t]))})),ar.apply(void 0,[e].concat(i))):e}function or(e,t){var i=e.length?e:[e];Array.from(i).reverse().forEach((function(e,i){var n=i>0?t.cloneNode(!0):t,r=e.parentNode,a=e.nextSibling;n.appendChild(e),a?r.insertBefore(n,a):r.appendChild(n)}))}function sr(e,t){Un(e)&&!er(t)&&Object.entries(t).filter((function(e){var t=Ki(e,2)[1];return!Yn(t)})).forEach((function(t){var i=Ki(t,2),n=i[0],r=i[1];return e.setAttribute(n,r)}))}function lr(e,t,i){var n=document.createElement(e);return jn(t)&&sr(n,t),Xn(i)&&(n.innerText=i),n}function cr(e,t,i,n){Un(t)&&t.appendChild(lr(e,i,n))}function hr(e){Gn(e)||Vn(e)?Array.from(e).forEach(hr):Un(e)&&Un(e.parentNode)&&e.parentNode.removeChild(e)}function dr(e){if(Un(e))for(var t=e.childNodes.length;t>0;)e.removeChild(e.lastChild),t-=1}function ur(e,t){return Un(t)&&Un(t.parentNode)&&Un(e)?(t.parentNode.replaceChild(e,t),e):null}function pr(e,t){if(!Xn(e)||er(e))return{};var i={},n=ar({},t);return e.split(",").forEach((function(e){var t=e.trim(),r=t.replace(".",""),a=t.replace(/[[\]]/g,"").split("="),o=Ki(a,1)[0],s=a.length>1?a[1].replace(/["']/g,""):"";switch(t.charAt(0)){case".":Xn(n.class)?i.class="".concat(n.class," ").concat(r):i.class=r;break;case"#":i.id=t.replace("#","");break;case"[":i[o]=s}})),ar(n,i)}function fr(e,t){if(Un(e)){var i=t;Bn(i)||(i=!e.hidden),e.hidden=i}}function gr(e,t,i){if(Gn(e))return Array.from(e).map((function(e){return gr(e,t,i)}));if(Un(e)){var n="toggle";return void 0!==i&&(n=i?"add":"remove"),e.classList[n](t),e.classList.contains(t)}return!1}function mr(e,t){return Un(e)&&e.classList.contains(t)}function vr(e,t){var i=Element.prototype;return(i.matches||i.webkitMatchesSelector||i.mozMatchesSelector||i.msMatchesSelector||function(){return Array.from(document.querySelectorAll(t)).includes(this)}).call(e,t)}function yr(e){return this.elements.container.querySelectorAll(e)}function br(e){return this.elements.container.querySelector(e)}function xr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];Un(e)&&(e.focus({preventScroll:!0}),t&&gr(e,this.config.classNames.tabFocus))}var wr={"audio/ogg":"vorbis","audio/wav":"1","video/webm":"vp8, vorbis","video/mp4":"avc1.42E01E, mp4a.40.2","video/ogg":"theora"},kr={audio:"canPlayType"in document.createElement("audio"),video:"canPlayType"in document.createElement("video"),check:function(e,t,i){var n=nr.isIPhone&&i&&kr.playsinline,r=kr[e]||"html5"!==t;return{api:r,ui:r&&kr.rangeInput&&("video"!==e||!nr.isIPhone||n)}},pip:!(nr.isIPhone||!Wn(lr("video").webkitSetPresentationMode)&&(!document.pictureInPictureEnabled||lr("video").disablePictureInPicture)),airplay:Wn(window.WebKitPlaybackTargetAvailabilityEvent),playsinline:"playsInline"in document.createElement("video"),mime:function(e){if(er(e))return!1;var t=Ki(e.split("/"),1)[0],i=e;if(!this.isHTML5||t!==this.type)return!1;Object.keys(wr).includes(i)&&(i+='; codecs="'.concat(wr[e],'"'));try{return Boolean(i&&this.media.canPlayType(i).replace(/no/,""))}catch(e){return!1}},textTracks:"textTracks"in document.createElement("video"),rangeInput:function(){var e=document.createElement("input");return e.type="range","range"===e.type}(),touch:"ontouchstart"in document.documentElement,transitions:!1!==tr,reducedMotion:"matchMedia"in window&&window.matchMedia("(prefers-reduced-motion)").matches},_r=function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){return e=!0,null}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(e){}return e}();function Sr(e,t,i){var n=this,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],a=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=arguments.length>5&&void 0!==arguments[5]&&arguments[5];if(e&&"addEventListener"in e&&!er(t)&&Wn(i)){var s=t.split(" "),l=o;_r&&(l={passive:a,capture:o}),s.forEach((function(t){n&&n.eventListeners&&r&&n.eventListeners.push({element:e,type:t,callback:i,options:l}),e[r?"addEventListener":"removeEventListener"](t,i,l)}))}}function Ar(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2?arguments[2]:void 0,n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];Sr.call(this,e,t,i,!0,n,r)}function Cr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2?arguments[2]:void 0,n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];Sr.call(this,e,t,i,!1,n,r)}function Tr(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=function o(){for(var s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];Cr(e,i,o,r,a),n.apply(t,l)};Sr.call(this,e,i,o,!0,r,a)}function Pr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(Un(e)&&!er(t)){var r=new CustomEvent(t,{bubbles:i,detail:Wi(Wi({},n),{},{plyr:this})});e.dispatchEvent(r)}}function Lr(){this&&this.eventListeners&&(this.eventListeners.forEach((function(e){var t=e.element,i=e.type,n=e.callback,r=e.options;t.removeEventListener(i,n,r)})),this.eventListeners=[])}function Er(){var e=this;return new Promise((function(t){return e.ready?setTimeout(t,0):Ar.call(e,e.elements.container,"ready",t)})).then((function(){}))}function Mr(e){Qn(e)&&e.then(null,(function(){}))}function Or(e){return Vn(e)?e.filter((function(t,i){return e.indexOf(t)===i})):e}function Ir(e,t){return Vn(e)&&e.length?e.reduce((function(e,i){return Math.abs(i-t)<Math.abs(e-t)?i:e})):null}function Dr(e){return!(!window||!window.CSS)&&window.CSS.supports(e)}var zr=[[1,1],[4,3],[3,4],[5,4],[4,5],[3,2],[2,3],[16,10],[10,16],[16,9],[9,16],[21,9],[9,21],[32,9],[9,32]].reduce((function(e,t){var i=Ki(t,2),n=i[0],r=i[1];return Wi(Wi({},e),{},Ji({},n/r,[n,r]))}),{});function Nr(e){return!!(Vn(e)||Xn(e)&&e.includes(":"))&&(Vn(e)?e:e.split(":")).map(Number).every($n)}function Rr(e){if(!Vn(e)||!e.every($n))return null;var t=Ki(e,2),i=t[0],n=t[1],r=function e(t,i){return 0===i?t:e(i,t%i)}(i,n);return[i/r,n/r]}function Fr(e){var t=function(e){return Nr(e)?e.split(":").map(Number):null},i=t(e);if(null===i&&(i=t(this.config.ratio)),null===i&&!er(this.embed)&&Vn(this.embed.ratio)&&(i=this.embed.ratio),null===i&&this.isHTML5){var n=this.media;i=[n.videoWidth,n.videoHeight]}return Rr(i)}function Hr(e){if(!this.isVideo)return{};var t=this.elements.wrapper,i=Fr.call(this,e);if(!Vn(i))return{};var n=Ki(Rr(i),2),r=n[0],a=n[1],o=100/r*a;if(Dr("aspect-ratio: ".concat(r,"/").concat(a))?t.style.aspectRatio="".concat(r,"/").concat(a):t.style.paddingBottom="".concat(o,"%"),this.isVimeo&&!this.config.vimeo.premium&&this.supported.ui){var s=100/this.media.offsetWidth*parseInt(window.getComputedStyle(this.media).paddingBottom,10),l=(s-o)/(s/50);this.fullscreen.active?t.style.paddingBottom=null:this.media.style.transform="translateY(-".concat(l,"%)")}else this.isHTML5&&t.classList.add(this.config.classNames.videoFixedRatio);return{padding:o,ratio:i}}function Yr(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.05,n=e/t,r=Ir(Object.keys(zr),n);return Math.abs(r-n)<=i?zr[r]:[e,t]}var jr={getSources:function(){var e=this;return this.isHTML5?Array.from(this.media.querySelectorAll("source")).filter((function(t){var i=t.getAttribute("type");return!!er(i)||kr.mime.call(e,i)})):[]},getQualityOptions:function(){return this.config.quality.forced?this.config.quality.options:jr.getSources.call(this).map((function(e){return Number(e.getAttribute("size"))})).filter(Boolean)},setup:function(){if(this.isHTML5){var e=this;e.options.speed=e.config.speed.options,er(this.config.ratio)||Hr.call(e),Object.defineProperty(e.media,"quality",{get:function(){var t=jr.getSources.call(e).find((function(t){return t.getAttribute("src")===e.source}));return t&&Number(t.getAttribute("size"))},set:function(t){if(e.quality!==t){if(e.config.quality.forced&&Wn(e.config.quality.onChange))e.config.quality.onChange(t);else{var i=jr.getSources.call(e).find((function(e){return Number(e.getAttribute("size"))===t}));if(!i)return;var n=e.media,r=n.currentTime,a=n.paused,o=n.preload,s=n.readyState,l=n.playbackRate;e.media.src=i.getAttribute("src"),("none"!==o||s)&&(e.once("loadedmetadata",(function(){e.speed=l,e.currentTime=r,a||Mr(e.play())})),e.media.load())}Pr.call(e,e.media,"qualitychange",!1,{quality:t})}}})}},cancelRequests:function(){this.isHTML5&&(hr(jr.getSources.call(this)),this.media.setAttribute("src",this.config.blankVideo),this.media.load(),this.debug.log("Cancelled network requests"))}};function $r(e){return"".concat(e,"-").concat(Math.floor(1e4*Math.random()))}function Xr(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];return er(e)?e:e.toString().replace(/{(\d+)}/g,(function(e,t){return i[t].toString()}))}var Br=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return e.replace(new RegExp(t.toString().replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1"),"g"),i.toString())},Wr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.toString().replace(/\w\S*/g,(function(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()}))};function Vr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=e.toString();return t=Br(t,"-"," "),t=Br(t,"_"," "),t=Wr(t),Br(t," ","")}function Gr(e){var t=document.createElement("div");return t.appendChild(e),t.innerHTML}var Ur={pip:"PIP",airplay:"AirPlay",html5:"HTML5",vimeo:"Vimeo",youtube:"YouTube"},qr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(er(e)||er(t))return"";var i=rr(t.i18n,e);if(er(i))return Object.keys(Ur).includes(e)?Ur[e]:"";var n={"{seektime}":t.seekTime,"{title}":t.title};return Object.entries(n).forEach((function(e){var t=Ki(e,2),n=t[0],r=t[1];i=Br(i,n,r)})),i},Zr=function(){function e(t){var i=this;Ui(this,e),on(this,"get",(function(t){if(!e.supported||!i.enabled)return null;var n=window.localStorage.getItem(i.key);if(er(n))return null;var r=JSON.parse(n);return Xn(t)&&t.length?r[t]:r})),on(this,"set",(function(t){if(e.supported&&i.enabled&&jn(t)){var n=i.get();er(n)&&(n={}),ar(n,t),window.localStorage.setItem(i.key,JSON.stringify(n))}})),this.enabled=t.config.storage.enabled,this.key=t.config.storage.key}return Zi(e,null,[{key:"supported",get:function(){try{if(!("localStorage"in window))return!1;var e="___test";return window.localStorage.setItem(e,e),window.localStorage.removeItem(e),!0}catch(e){return!1}}}]),e}();function Jr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"text";return new Promise((function(i,n){try{var r=new XMLHttpRequest;if(!("withCredentials"in r))return;r.addEventListener("load",(function(){if("text"===t)try{i(JSON.parse(r.responseText))}catch(e){i(r.responseText)}else i(r.response)})),r.addEventListener("error",(function(){throw new Error(r.status)})),r.open("GET",e,!0),r.responseType=t,r.send()}catch(e){n(e)}}))}function Qr(e,t){if(Xn(e)){var i=Xn(t),n=function(){return null!==document.getElementById(t)},r=function(e,t){e.innerHTML=t,i&&n()||document.body.insertAdjacentElement("afterbegin",e)};if(!i||!n()){var a=Zr.supported,o=document.createElement("div");if(o.setAttribute("hidden",""),i&&o.setAttribute("id",t),a){var s=window.localStorage.getItem("cache-".concat(t));if(null!==s){var l=JSON.parse(s);r(o,l.content)}}Jr(e).then((function(e){er(e)||(a&&window.localStorage.setItem("cache-".concat(t),JSON.stringify({content:e})),r(o,e))})).catch((function(){}))}}}var Kr=function(e){return Math.trunc(e/60/60%60,10)},ea=function(e){return Math.trunc(e%60,10)};function ta(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!$n(e))return ta(void 0,t,i);var n,r=function(e){return"0".concat(e).slice(-2)},a=Kr(e),o=(n=e,Math.trunc(n/60%60,10)),s=ea(e);return a=t||a>0?"".concat(a,":"):"","".concat(i&&e>0?"-":"").concat(a).concat(r(o),":").concat(r(s))}var ia={getIconUrl:function(){var e=new URL(this.config.iconUrl,window.location),t=window.location.host?window.location.host:window.top.location.host,i=e.host!==t||nr.isIE&&!window.svg4everybody;return{url:this.config.iconUrl,cors:i}},findElements:function(){try{return this.elements.controls=br.call(this,this.config.selectors.controls.wrapper),this.elements.buttons={play:yr.call(this,this.config.selectors.buttons.play),pause:br.call(this,this.config.selectors.buttons.pause),restart:br.call(this,this.config.selectors.buttons.restart),rewind:br.call(this,this.config.selectors.buttons.rewind),fastForward:br.call(this,this.config.selectors.buttons.fastForward),mute:br.call(this,this.config.selectors.buttons.mute),pip:br.call(this,this.config.selectors.buttons.pip),airplay:br.call(this,this.config.selectors.buttons.airplay),settings:br.call(this,this.config.selectors.buttons.settings),captions:br.call(this,this.config.selectors.buttons.captions),fullscreen:br.call(this,this.config.selectors.buttons.fullscreen)},this.elements.progress=br.call(this,this.config.selectors.progress),this.elements.inputs={seek:br.call(this,this.config.selectors.inputs.seek),volume:br.call(this,this.config.selectors.inputs.volume)},this.elements.display={buffer:br.call(this,this.config.selectors.display.buffer),currentTime:br.call(this,this.config.selectors.display.currentTime),duration:br.call(this,this.config.selectors.display.duration)},Un(this.elements.progress)&&(this.elements.display.seekTooltip=this.elements.progress.querySelector(".".concat(this.config.classNames.tooltip))),!0}catch(e){return this.debug.warn("It looks like there is a problem with your custom controls HTML",e),this.toggleNativeControls(!0),!1}},createIcon:function(e,t){var i="http://www.w3.org/2000/svg",n=ia.getIconUrl.call(this),r="".concat(n.cors?"":n.url,"#").concat(this.config.iconPrefix),a=document.createElementNS(i,"svg");sr(a,ar(t,{"aria-hidden":"true",focusable:"false"}));var o=document.createElementNS(i,"use"),s="".concat(r,"-").concat(e);return"href"in o&&o.setAttributeNS("http://www.w3.org/1999/xlink","href",s),o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s),a.appendChild(o),a},createLabel:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=qr(e,this.config);return lr("span",Wi(Wi({},t),{},{class:[t.class,this.config.classNames.hidden].filter(Boolean).join(" ")}),i)},createBadge:function(e){if(er(e))return null;var t=lr("span",{class:this.config.classNames.menu.value});return t.appendChild(lr("span",{class:this.config.classNames.menu.badge},e)),t},createButton:function(e,t){var i=this,n=ar({},t),r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=e.toString();return(t=Vr(t)).charAt(0).toLowerCase()+t.slice(1)}(e),a={element:"button",toggle:!1,label:null,icon:null,labelPressed:null,iconPressed:null};switch(["element","icon","label"].forEach((function(e){Object.keys(n).includes(e)&&(a[e]=n[e],delete n[e])})),"button"!==a.element||Object.keys(n).includes("type")||(n.type="button"),Object.keys(n).includes("class")?n.class.split(" ").some((function(e){return e===i.config.classNames.control}))||ar(n,{class:"".concat(n.class," ").concat(this.config.classNames.control)}):n.class=this.config.classNames.control,e){case"play":a.toggle=!0,a.label="play",a.labelPressed="pause",a.icon="play",a.iconPressed="pause";break;case"mute":a.toggle=!0,a.label="mute",a.labelPressed="unmute",a.icon="volume",a.iconPressed="muted";break;case"captions":a.toggle=!0,a.label="enableCaptions",a.labelPressed="disableCaptions",a.icon="captions-off",a.iconPressed="captions-on";break;case"fullscreen":a.toggle=!0,a.label="enterFullscreen",a.labelPressed="exitFullscreen",a.icon="enter-fullscreen",a.iconPressed="exit-fullscreen";break;case"play-large":n.class+=" ".concat(this.config.classNames.control,"--overlaid"),r="play",a.label="play",a.icon="play";break;default:er(a.label)&&(a.label=r),er(a.icon)&&(a.icon=e)}var o=lr(a.element);return a.toggle?(o.appendChild(ia.createIcon.call(this,a.iconPressed,{class:"icon--pressed"})),o.appendChild(ia.createIcon.call(this,a.icon,{class:"icon--not-pressed"})),o.appendChild(ia.createLabel.call(this,a.labelPressed,{class:"label--pressed"})),o.appendChild(ia.createLabel.call(this,a.label,{class:"label--not-pressed"}))):(o.appendChild(ia.createIcon.call(this,a.icon)),o.appendChild(ia.createLabel.call(this,a.label))),ar(n,pr(this.config.selectors.buttons[r],n)),sr(o,n),"play"===r?(Vn(this.elements.buttons[r])||(this.elements.buttons[r]=[]),this.elements.buttons[r].push(o)):this.elements.buttons[r]=o,o},createRange:function(e,t){var i=lr("input",ar(pr(this.config.selectors.inputs[e]),{type:"range",min:0,max:100,step:.01,value:0,autocomplete:"off",role:"slider","aria-label":qr(e,this.config),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":0},t));return this.elements.inputs[e]=i,ia.updateRangeFill.call(this,i),En.setup(i),i},createProgress:function(e,t){var i=lr("progress",ar(pr(this.config.selectors.display[e]),{min:0,max:100,value:0,role:"progressbar","aria-hidden":!0},t));if("volume"!==e){i.appendChild(lr("span",null,"0"));var n={played:"played",buffer:"buffered"}[e],r=n?qr(n,this.config):"";i.innerText="% ".concat(r.toLowerCase())}return this.elements.display[e]=i,i},createTime:function(e,t){var i=pr(this.config.selectors.display[e],t),n=lr("div",ar(i,{class:"".concat(i.class?i.class:""," ").concat(this.config.classNames.display.time," ").trim(),"aria-label":qr(e,this.config)}),"00:00");return this.elements.display[e]=n,n},bindMenuItemShortcuts:function(e,t){var i=this;Ar.call(this,e,"keydown keyup",(function(n){if([32,38,39,40].includes(n.which)&&(n.preventDefault(),n.stopPropagation(),"keydown"!==n.type)){var r,a=vr(e,'[role="menuitemradio"]');if(!a&&[32,39].includes(n.which))ia.showMenuPanel.call(i,t,!0);else 32!==n.which&&(40===n.which||a&&39===n.which?(r=e.nextElementSibling,Un(r)||(r=e.parentNode.firstElementChild)):(r=e.previousElementSibling,Un(r)||(r=e.parentNode.lastElementChild)),xr.call(i,r,!0))}}),!1),Ar.call(this,e,"keyup",(function(e){13===e.which&&ia.focusFirstMenuItem.call(i,null,!0)}))},createMenuItem:function(e){var t=this,i=e.value,n=e.list,r=e.type,a=e.title,o=e.badge,s=void 0===o?null:o,l=e.checked,c=void 0!==l&&l,h=pr(this.config.selectors.inputs[r]),d=lr("button",ar(h,{type:"button",role:"menuitemradio",class:"".concat(this.config.classNames.control," ").concat(h.class?h.class:"").trim(),"aria-checked":c,value:i})),u=lr("span");u.innerHTML=a,Un(s)&&u.appendChild(s),d.appendChild(u),Object.defineProperty(d,"checked",{enumerable:!0,get:function(){return"true"===d.getAttribute("aria-checked")},set:function(e){e&&Array.from(d.parentNode.children).filter((function(e){return vr(e,'[role="menuitemradio"]')})).forEach((function(e){return e.setAttribute("aria-checked","false")})),d.setAttribute("aria-checked",e?"true":"false")}}),this.listeners.bind(d,"click keyup",(function(e){if(!Zn(e)||32===e.which){switch(e.preventDefault(),e.stopPropagation(),d.checked=!0,r){case"language":t.currentTrack=Number(i);break;case"quality":t.quality=i;break;case"speed":t.speed=parseFloat(i)}ia.showMenuPanel.call(t,"home",Zn(e))}}),r,!1),ia.bindMenuItemShortcuts.call(this,d,r),n.appendChild(d)},formatTime:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return $n(e)?ta(e,Kr(this.duration)>0,t):e},updateTimeDisplay:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];Un(e)&&$n(t)&&(e.innerText=ia.formatTime(t,i))},updateVolume:function(){this.supported.ui&&(Un(this.elements.inputs.volume)&&ia.setRange.call(this,this.elements.inputs.volume,this.muted?0:this.volume),Un(this.elements.buttons.mute)&&(this.elements.buttons.mute.pressed=this.muted||0===this.volume))},setRange:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;Un(e)&&(e.value=t,ia.updateRangeFill.call(this,e))},updateProgress:function(e){var t=this;if(this.supported.ui&&qn(e)){var i=0;if(e)switch(e.type){case"timeupdate":case"seeking":case"seeked":i=function(e,t){return 0===e||0===t||Number.isNaN(e)||Number.isNaN(t)?0:(e/t*100).toFixed(2)}(this.currentTime,this.duration),"timeupdate"===e.type&&ia.setRange.call(this,this.elements.inputs.seek,i);break;case"playing":case"progress":!function(e,i){var n=$n(i)?i:0,r=Un(e)?e:t.elements.display.buffer;if(Un(r)){r.value=n;var a=r.getElementsByTagName("span")[0];Un(a)&&(a.childNodes[0].nodeValue=n)}}(this.elements.display.buffer,100*this.buffered)}}},updateRangeFill:function(e){var t=qn(e)?e.target:e;if(Un(t)&&"range"===t.getAttribute("type")){if(vr(t,this.config.selectors.inputs.seek)){t.setAttribute("aria-valuenow",this.currentTime);var i=ia.formatTime(this.currentTime),n=ia.formatTime(this.duration),r=qr("seekLabel",this.config);t.setAttribute("aria-valuetext",r.replace("{currentTime}",i).replace("{duration}",n))}else if(vr(t,this.config.selectors.inputs.volume)){var a=100*t.value;t.setAttribute("aria-valuenow",a),t.setAttribute("aria-valuetext","".concat(a.toFixed(1),"%"))}else t.setAttribute("aria-valuenow",t.value);nr.isWebkit&&t.style.setProperty("--value",t.value/t.max*100+"%")}},updateSeekTooltip:function(e){var t=this;if(this.config.tooltips.seek&&Un(this.elements.inputs.seek)&&Un(this.elements.display.seekTooltip)&&0!==this.duration){var i="".concat(this.config.classNames.tooltip,"--visible"),n=function(e){return gr(t.elements.display.seekTooltip,i,e)};if(this.touch)n(!1);else{var r=0,a=this.elements.progress.getBoundingClientRect();if(qn(e))r=100/a.width*(e.pageX-a.left);else{if(!mr(this.elements.display.seekTooltip,i))return;r=parseFloat(this.elements.display.seekTooltip.style.left,10)}r<0?r=0:r>100&&(r=100),ia.updateTimeDisplay.call(this,this.elements.display.seekTooltip,this.duration/100*r),this.elements.display.seekTooltip.style.left="".concat(r,"%"),qn(e)&&["mouseenter","mouseleave"].includes(e.type)&&n("mouseenter"===e.type)}}},timeUpdate:function(e){var t=!Un(this.elements.display.duration)&&this.config.invertTime;ia.updateTimeDisplay.call(this,this.elements.display.currentTime,t?this.duration-this.currentTime:this.currentTime,t),e&&"timeupdate"===e.type&&this.media.seeking||ia.updateProgress.call(this,e)},durationUpdate:function(){if(this.supported.ui&&(this.config.invertTime||!this.currentTime)){if(this.duration>=Math.pow(2,32))return fr(this.elements.display.currentTime,!0),void fr(this.elements.progress,!0);Un(this.elements.inputs.seek)&&this.elements.inputs.seek.setAttribute("aria-valuemax",this.duration);var e=Un(this.elements.display.duration);!e&&this.config.displayDuration&&this.paused&&ia.updateTimeDisplay.call(this,this.elements.display.currentTime,this.duration),e&&ia.updateTimeDisplay.call(this,this.elements.display.duration,this.duration),ia.updateSeekTooltip.call(this)}},toggleMenuButton:function(e,t){fr(this.elements.settings.buttons[e],!t)},updateSetting:function(e,t,i){var n=this.elements.settings.panels[e],r=null,a=t;if("captions"===e)r=this.currentTrack;else{if(r=er(i)?this[e]:i,er(r)&&(r=this.config[e].default),!er(this.options[e])&&!this.options[e].includes(r))return void this.debug.warn("Unsupported value of '".concat(r,"' for ").concat(e));if(!this.config[e].options.includes(r))return void this.debug.warn("Disabled value of '".concat(r,"' for ").concat(e))}if(Un(a)||(a=n&&n.querySelector('[role="menu"]')),Un(a)){this.elements.settings.buttons[e].querySelector(".".concat(this.config.classNames.menu.value)).innerHTML=ia.getLabel.call(this,e,r);var o=a&&a.querySelector('[value="'.concat(r,'"]'));Un(o)&&(o.checked=!0)}},getLabel:function(e,t){switch(e){case"speed":return 1===t?qr("normal",this.config):"".concat(t,"&times;");case"quality":if($n(t)){if(0===t)return qr("auto",this.config);var i=qr("qualityLabel.".concat(t),this.config);return i.length?i:"".concat(t,"p")}return Wr(t);case"captions":return aa.getLabel.call(this);default:return null}},setQualityMenu:function(e){var t=this;if(Un(this.elements.settings.panels.quality)){var i="quality",n=this.elements.settings.panels.quality.querySelector('[role="menu"]');Vn(e)&&(this.options.quality=Or(e).filter((function(e){return t.config.quality.options.includes(e)})));var r=!er(this.options.quality)&&this.options.quality.length>1;if(ia.toggleMenuButton.call(this,i,r),dr(n),ia.checkMenu.call(this),r){var a=function(e){var i=qr("qualityBadge.".concat(e),t.config);return i.length?ia.createBadge.call(t,i):null};this.options.quality.sort((function(e,i){var n=t.config.quality.options;return n.indexOf(e)>n.indexOf(i)?1:-1})).forEach((function(e){ia.createMenuItem.call(t,{value:e,list:n,type:i,title:ia.getLabel.call(t,"quality",e),badge:a(e)})})),ia.updateSetting.call(this,i,n)}}},setCaptionsMenu:function(){var e=this;if(Un(this.elements.settings.panels.captions)){var t="captions",i=this.elements.settings.panels.captions.querySelector('[role="menu"]'),n=aa.getTracks.call(this),r=Boolean(n.length);if(ia.toggleMenuButton.call(this,t,r),dr(i),ia.checkMenu.call(this),r){var a=n.map((function(t,n){return{value:n,checked:e.captions.toggled&&e.currentTrack===n,title:aa.getLabel.call(e,t),badge:t.language&&ia.createBadge.call(e,t.language.toUpperCase()),list:i,type:"language"}}));a.unshift({value:-1,checked:!this.captions.toggled,title:qr("disabled",this.config),list:i,type:"language"}),a.forEach(ia.createMenuItem.bind(this)),ia.updateSetting.call(this,t,i)}}},setSpeedMenu:function(){var e=this;if(Un(this.elements.settings.panels.speed)){var t="speed",i=this.elements.settings.panels.speed.querySelector('[role="menu"]');this.options.speed=this.options.speed.filter((function(t){return t>=e.minimumSpeed&&t<=e.maximumSpeed}));var n=!er(this.options.speed)&&this.options.speed.length>1;ia.toggleMenuButton.call(this,t,n),dr(i),ia.checkMenu.call(this),n&&(this.options.speed.forEach((function(n){ia.createMenuItem.call(e,{value:n,list:i,type:t,title:ia.getLabel.call(e,"speed",n)})})),ia.updateSetting.call(this,t,i))}},checkMenu:function(){var e=this.elements.settings.buttons,t=!er(e)&&Object.values(e).some((function(e){return!e.hidden}));fr(this.elements.settings.menu,!t)},focusFirstMenuItem:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.elements.settings.popup.hidden){var i=e;Un(i)||(i=Object.values(this.elements.settings.panels).find((function(e){return!e.hidden})));var n=i.querySelector('[role^="menuitem"]');xr.call(this,n,t)}},toggleMenu:function(e){var t=this.elements.settings.popup,i=this.elements.buttons.settings;if(Un(t)&&Un(i)){var n=t.hidden,r=n;if(Bn(e))r=e;else if(Zn(e)&&27===e.which)r=!1;else if(qn(e)){var a=Wn(e.composedPath)?e.composedPath()[0]:e.target,o=t.contains(a);if(o||!o&&e.target!==i&&r)return}i.setAttribute("aria-expanded",r),fr(t,!r),gr(this.elements.container,this.config.classNames.menu.open,r),r&&Zn(e)?ia.focusFirstMenuItem.call(this,null,!0):r||n||xr.call(this,i,Zn(e))}},getMenuSize:function(e){var t=e.cloneNode(!0);t.style.position="absolute",t.style.opacity=0,t.removeAttribute("hidden"),e.parentNode.appendChild(t);var i=t.scrollWidth,n=t.scrollHeight;return hr(t),{width:i,height:n}},showMenuPanel:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.elements.container.querySelector("#plyr-settings-".concat(this.id,"-").concat(t));if(Un(n)){var r=n.parentNode,a=Array.from(r.children).find((function(e){return!e.hidden}));if(kr.transitions&&!kr.reducedMotion){r.style.width="".concat(a.scrollWidth,"px"),r.style.height="".concat(a.scrollHeight,"px");var o=ia.getMenuSize.call(this,n),s=function t(i){i.target===r&&["width","height"].includes(i.propertyName)&&(r.style.width="",r.style.height="",Cr.call(e,r,tr,t))};Ar.call(this,r,tr,s),r.style.width="".concat(o.width,"px"),r.style.height="".concat(o.height,"px")}fr(a,!0),fr(n,!1),ia.focusFirstMenuItem.call(this,n,i)}},setDownloadUrl:function(){var e=this.elements.buttons.download;Un(e)&&e.setAttribute("href",this.download)},create:function(e){var t=this,i=ia.bindMenuItemShortcuts,n=ia.createButton,r=ia.createProgress,a=ia.createRange,o=ia.createTime,s=ia.setQualityMenu,l=ia.setSpeedMenu,c=ia.showMenuPanel;this.elements.controls=null,Vn(this.config.controls)&&this.config.controls.includes("play-large")&&this.elements.container.appendChild(n.call(this,"play-large"));var h=lr("div",pr(this.config.selectors.controls.wrapper));this.elements.controls=h;var d={class:"plyr__controls__item"};return Or(Vn(this.config.controls)?this.config.controls:[]).forEach((function(s){if("restart"===s&&h.appendChild(n.call(t,"restart",d)),"rewind"===s&&h.appendChild(n.call(t,"rewind",d)),"play"===s&&h.appendChild(n.call(t,"play",d)),"fast-forward"===s&&h.appendChild(n.call(t,"fast-forward",d)),"progress"===s){var l=lr("div",{class:"".concat(d.class," plyr__progress__container")}),u=lr("div",pr(t.config.selectors.progress));if(u.appendChild(a.call(t,"seek",{id:"plyr-seek-".concat(e.id)})),u.appendChild(r.call(t,"buffer")),t.config.tooltips.seek){var p=lr("span",{class:t.config.classNames.tooltip},"00:00");u.appendChild(p),t.elements.display.seekTooltip=p}t.elements.progress=u,l.appendChild(t.elements.progress),h.appendChild(l)}if("current-time"===s&&h.appendChild(o.call(t,"currentTime",d)),"duration"===s&&h.appendChild(o.call(t,"duration",d)),"mute"===s||"volume"===s){var f=t.elements.volume;if(Un(f)&&h.contains(f)||(f=lr("div",ar({},d,{class:"".concat(d.class," plyr__volume").trim()})),t.elements.volume=f,h.appendChild(f)),"mute"===s&&f.appendChild(n.call(t,"mute")),"volume"===s&&!nr.isIos){var g={max:1,step:.05,value:t.config.volume};f.appendChild(a.call(t,"volume",ar(g,{id:"plyr-volume-".concat(e.id)})))}}if("captions"===s&&h.appendChild(n.call(t,"captions",d)),"settings"===s&&!er(t.config.settings)){var m=lr("div",ar({},d,{class:"".concat(d.class," plyr__menu").trim(),hidden:""}));m.appendChild(n.call(t,"settings",{"aria-haspopup":!0,"aria-controls":"plyr-settings-".concat(e.id),"aria-expanded":!1}));var v=lr("div",{class:"plyr__menu__container",id:"plyr-settings-".concat(e.id),hidden:""}),y=lr("div"),b=lr("div",{id:"plyr-settings-".concat(e.id,"-home")}),x=lr("div",{role:"menu"});b.appendChild(x),y.appendChild(b),t.elements.settings.panels.home=b,t.config.settings.forEach((function(n){var r=lr("button",ar(pr(t.config.selectors.buttons.settings),{type:"button",class:"".concat(t.config.classNames.control," ").concat(t.config.classNames.control,"--forward"),role:"menuitem","aria-haspopup":!0,hidden:""}));i.call(t,r,n),Ar.call(t,r,"click",(function(){c.call(t,n,!1)}));var a=lr("span",null,qr(n,t.config)),o=lr("span",{class:t.config.classNames.menu.value});o.innerHTML=e[n],a.appendChild(o),r.appendChild(a),x.appendChild(r);var s=lr("div",{id:"plyr-settings-".concat(e.id,"-").concat(n),hidden:""}),l=lr("button",{type:"button",class:"".concat(t.config.classNames.control," ").concat(t.config.classNames.control,"--back")});l.appendChild(lr("span",{"aria-hidden":!0},qr(n,t.config))),l.appendChild(lr("span",{class:t.config.classNames.hidden},qr("menuBack",t.config))),Ar.call(t,s,"keydown",(function(e){37===e.which&&(e.preventDefault(),e.stopPropagation(),c.call(t,"home",!0))}),!1),Ar.call(t,l,"click",(function(){c.call(t,"home",!1)})),s.appendChild(l),s.appendChild(lr("div",{role:"menu"})),y.appendChild(s),t.elements.settings.buttons[n]=r,t.elements.settings.panels[n]=s})),v.appendChild(y),m.appendChild(v),h.appendChild(m),t.elements.settings.popup=v,t.elements.settings.menu=m}if("pip"===s&&kr.pip&&h.appendChild(n.call(t,"pip",d)),"airplay"===s&&kr.airplay&&h.appendChild(n.call(t,"airplay",d)),"download"===s){var w=ar({},d,{element:"a",href:t.download,target:"_blank"});t.isHTML5&&(w.download="");var k=t.config.urls.download;!Kn(k)&&t.isEmbed&&ar(w,{icon:"logo-".concat(t.provider),label:t.provider}),h.appendChild(n.call(t,"download",w))}"fullscreen"===s&&h.appendChild(n.call(t,"fullscreen",d))})),this.isHTML5&&s.call(this,jr.getQualityOptions.call(this)),l.call(this),h},inject:function(){var e=this;if(this.config.loadSprite){var t=ia.getIconUrl.call(this);t.cors&&Qr(t.url,"sprite-plyr")}this.id=Math.floor(1e4*Math.random());var i=null;this.elements.controls=null;var n,r={id:this.id,seektime:this.config.seekTime,title:this.config.title},a=!0;if(Wn(this.config.controls)&&(this.config.controls=this.config.controls.call(this,r)),this.config.controls||(this.config.controls=[]),Un(this.config.controls)||Xn(this.config.controls)?i=this.config.controls:(i=ia.create.call(this,{id:this.id,seektime:this.config.seekTime,speed:this.speed,quality:this.quality,captions:aa.getLabel.call(this)}),a=!1),a&&Xn(this.config.controls)&&(i=function(e){var t=e;return Object.entries(r).forEach((function(e){var i=Ki(e,2),n=i[0],r=i[1];t=Br(t,"{".concat(n,"}"),r)})),t}(i)),Xn(this.config.selectors.controls.container)&&(n=document.querySelector(this.config.selectors.controls.container)),Un(n)||(n=this.elements.container),n[Un(i)?"insertAdjacentElement":"insertAdjacentHTML"]("afterbegin",i),Un(this.elements.controls)||ia.findElements.call(this),!er(this.elements.buttons)){var o=function(t){var i=e.config.classNames.controlPressed;Object.defineProperty(t,"pressed",{enumerable:!0,get:function(){return mr(t,i)},set:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];gr(t,i,e)}})};Object.values(this.elements.buttons).filter(Boolean).forEach((function(e){Vn(e)||Gn(e)?Array.from(e).filter(Boolean).forEach(o):o(e)}))}if(nr.isEdge&&ir(n),this.config.tooltips.controls){var s=this.config,l=s.classNames,c=s.selectors,h="".concat(c.controls.wrapper," ").concat(c.labels," .").concat(l.hidden),d=yr.call(this,h);Array.from(d).forEach((function(t){gr(t,e.config.classNames.hidden,!1),gr(t,e.config.classNames.tooltip,!0)}))}}};function na(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=e;if(t){var n=document.createElement("a");n.href=i,i=n.href}try{return new URL(i)}catch(e){return null}}function ra(e){var t=new URLSearchParams;return jn(e)&&Object.entries(e).forEach((function(e){var i=Ki(e,2),n=i[0],r=i[1];t.set(n,r)})),t}var aa={setup:function(){if(this.supported.ui)if(!this.isVideo||this.isYouTube||this.isHTML5&&!kr.textTracks)Vn(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&ia.setCaptionsMenu.call(this);else{if(Un(this.elements.captions)||(this.elements.captions=lr("div",pr(this.config.selectors.captions)),function(e,t){Un(e)&&Un(t)&&t.parentNode.insertBefore(e,t.nextSibling)}(this.elements.captions,this.elements.wrapper)),nr.isIE&&window.URL){var e=this.media.querySelectorAll("track");Array.from(e).forEach((function(e){var t=e.getAttribute("src"),i=na(t);null!==i&&i.hostname!==window.location.href.hostname&&["http:","https:"].includes(i.protocol)&&Jr(t,"blob").then((function(t){e.setAttribute("src",window.URL.createObjectURL(t))})).catch((function(){hr(e)}))}))}var t=Or((navigator.languages||[navigator.language||navigator.userLanguage||"en"]).map((function(e){return e.split("-")[0]}))),i=(this.storage.get("language")||this.config.captions.language||"auto").toLowerCase();"auto"===i&&(i=Ki(t,1)[0]);var n=this.storage.get("captions");if(Bn(n)||(n=this.config.captions.active),Object.assign(this.captions,{toggled:!1,active:n,language:i,languages:t}),this.isHTML5){var r=this.config.captions.update?"addtrack removetrack":"removetrack";Ar.call(this,this.media.textTracks,r,aa.update.bind(this))}setTimeout(aa.update.bind(this),0)}},update:function(){var e=this,t=aa.getTracks.call(this,!0),i=this.captions,n=i.active,r=i.language,a=i.meta,o=i.currentTrackNode,s=Boolean(t.find((function(e){return e.language===r})));this.isHTML5&&this.isVideo&&t.filter((function(e){return!a.get(e)})).forEach((function(t){e.debug.log("Track added",t),a.set(t,{default:"showing"===t.mode}),"showing"===t.mode&&(t.mode="hidden"),Ar.call(e,t,"cuechange",(function(){return aa.updateCues.call(e)}))})),(s&&this.language!==r||!t.includes(o))&&(aa.setLanguage.call(this,r),aa.toggle.call(this,n&&s)),gr(this.elements.container,this.config.classNames.captions.enabled,!er(t)),Vn(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&ia.setCaptionsMenu.call(this)},toggle:function(e){var t=this,i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.supported.ui){var n=this.captions.toggled,r=this.config.classNames.captions.active,a=Yn(e)?!n:e;if(a!==n){if(i||(this.captions.active=a,this.storage.set({captions:a})),!this.language&&a&&!i){var o=aa.getTracks.call(this),s=aa.findTrack.call(this,[this.captions.language].concat(en(this.captions.languages)),!0);return this.captions.language=s.language,void aa.set.call(this,o.indexOf(s))}this.elements.buttons.captions&&(this.elements.buttons.captions.pressed=a),gr(this.elements.container,r,a),this.captions.toggled=a,ia.updateSetting.call(this,"captions"),Pr.call(this,this.media,a?"captionsenabled":"captionsdisabled")}setTimeout((function(){a&&t.captions.toggled&&t.captions.currentTrackNode&&(t.captions.currentTrackNode.mode="hidden")}))}},set:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=aa.getTracks.call(this);if(-1!==e)if($n(e))if(e in i){if(this.captions.currentTrack!==e){this.captions.currentTrack=e;var n=i[e],r=n||{},a=r.language;this.captions.currentTrackNode=n,ia.updateSetting.call(this,"captions"),t||(this.captions.language=a,this.storage.set({language:a})),this.isVimeo&&this.embed.enableTextTrack(a),Pr.call(this,this.media,"languagechange")}aa.toggle.call(this,!0,t),this.isHTML5&&this.isVideo&&aa.updateCues.call(this)}else this.debug.warn("Track not found",e);else this.debug.warn("Invalid caption argument",e);else aa.toggle.call(this,!1,t)},setLanguage:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(Xn(e)){var i=e.toLowerCase();this.captions.language=i;var n=aa.getTracks.call(this),r=aa.findTrack.call(this,[i]);aa.set.call(this,n.indexOf(r),t)}else this.debug.warn("Invalid language argument",e)},getTracks:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return Array.from((this.media||{}).textTracks||[]).filter((function(i){return!e.isHTML5||t||e.captions.meta.has(i)})).filter((function(e){return["captions","subtitles"].includes(e.kind)}))},findTrack:function(e){var t,i=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=aa.getTracks.call(this),a=function(e){return Number((i.captions.meta.get(e)||{}).default)},o=Array.from(r).sort((function(e,t){return a(t)-a(e)}));return e.every((function(e){return!(t=o.find((function(t){return t.language===e})))})),t||(n?o[0]:void 0)},getCurrentTrack:function(){return aa.getTracks.call(this)[this.currentTrack]},getLabel:function(e){var t=e;return!Jn(t)&&kr.textTracks&&this.captions.toggled&&(t=aa.getCurrentTrack.call(this)),Jn(t)?er(t.label)?er(t.language)?qr("enabled",this.config):e.language.toUpperCase():t.label:qr("disabled",this.config)},updateCues:function(e){if(this.supported.ui)if(Un(this.elements.captions))if(Yn(e)||Array.isArray(e)){var t=e;if(!t){var i=aa.getCurrentTrack.call(this);t=Array.from((i||{}).activeCues||[]).map((function(e){return e.getCueAsHTML()})).map(Gr)}var n=t.map((function(e){return e.trim()})).join("\n");if(n!==this.elements.captions.innerHTML){dr(this.elements.captions);var r=lr("span",pr(this.config.selectors.caption));r.innerHTML=n,this.elements.captions.appendChild(r),Pr.call(this,this.media,"cuechange")}}else this.debug.warn("updateCues: Invalid input",e);else this.debug.warn("No captions element to render to")}},oa={enabled:!0,title:"",debug:!1,autoplay:!1,autopause:!0,playsinline:!0,seekTime:10,volume:1,muted:!1,duration:null,displayDuration:!0,invertTime:!0,toggleInvert:!0,ratio:null,clickToPlay:!0,hideControls:!0,resetOnEnd:!1,disableContextMenu:!0,loadSprite:!0,iconPrefix:"plyr",iconUrl:"https://cdn.plyr.io/3.6.8/plyr.svg",blankVideo:"https://cdn.plyr.io/static/blank.mp4",quality:{default:576,options:[4320,2880,2160,1440,1080,720,576,480,360,240],forced:!1,onChange:null},loop:{active:!1},speed:{selected:1,options:[.5,.75,1,1.25,1.5,1.75,2,4]},keyboard:{focused:!0,global:!1},tooltips:{controls:!1,seek:!0},captions:{active:!1,language:"auto",update:!1},fullscreen:{enabled:!0,fallback:!0,iosNative:!1},storage:{enabled:!0,key:"plyr"},controls:["play-large","play","progress","current-time","mute","volume","captions","settings","pip","airplay","fullscreen"],settings:["captions","quality","speed"],i18n:{restart:"Restart",rewind:"Rewind {seektime}s",play:"Play",pause:"Pause",fastForward:"Forward {seektime}s",seek:"Seek",seekLabel:"{currentTime} of {duration}",played:"Played",buffered:"Buffered",currentTime:"Current time",duration:"Duration",volume:"Volume",mute:"Mute",unmute:"Unmute",enableCaptions:"Enable captions",disableCaptions:"Disable captions",download:"Download",enterFullscreen:"Enter fullscreen",exitFullscreen:"Exit fullscreen",frameTitle:"Player for {title}",captions:"Captions",settings:"Settings",pip:"PIP",menuBack:"Go back to previous menu",speed:"Speed",normal:"Normal",quality:"Quality",loop:"Loop",start:"Start",end:"End",all:"All",reset:"Reset",disabled:"Disabled",enabled:"Enabled",advertisement:"Ad",qualityBadge:{2160:"4K",1440:"HD",1080:"HD",720:"HD",576:"SD",480:"SD"},auto:"AUTO"},urls:{download:null,vimeo:{sdk:"https://player.vimeo.com/api/player.js",iframe:"https://player.vimeo.com/video/{0}?{1}",api:"https://vimeo.com/api/oembed.json?url={0}"},youtube:{sdk:"https://www.youtube.com/iframe_api",api:"https://noembed.com/embed?url=https://www.youtube.com/watch?v={0}"},googleIMA:{sdk:"https://imasdk.googleapis.com/js/sdkloader/ima3.js"}},listeners:{seek:null,play:null,pause:null,restart:null,rewind:null,fastForward:null,mute:null,volume:null,captions:null,download:null,fullscreen:null,pip:null,airplay:null,speed:null,quality:null,loop:null,language:null},events:["ended","progress","stalled","playing","waiting","canplay","canplaythrough","loadstart","loadeddata","loadedmetadata","timeupdate","volumechange","play","pause","error","seeking","seeked","emptied","ratechange","cuechange","download","enterfullscreen","exitfullscreen","captionsenabled","captionsdisabled","languagechange","controlshidden","controlsshown","ready","statechange","qualitychange","adsloaded","adscontentpause","adscontentresume","adstarted","adsmidpoint","adscomplete","adsallcomplete","adsimpression","adsclick"],selectors:{editable:"input, textarea, select, [contenteditable]",container:".plyr",controls:{container:null,wrapper:".plyr__controls"},labels:"[data-plyr]",buttons:{play:'[data-plyr="play"]',pause:'[data-plyr="pause"]',restart:'[data-plyr="restart"]',rewind:'[data-plyr="rewind"]',fastForward:'[data-plyr="fast-forward"]',mute:'[data-plyr="mute"]',captions:'[data-plyr="captions"]',download:'[data-plyr="download"]',fullscreen:'[data-plyr="fullscreen"]',pip:'[data-plyr="pip"]',airplay:'[data-plyr="airplay"]',settings:'[data-plyr="settings"]',loop:'[data-plyr="loop"]'},inputs:{seek:'[data-plyr="seek"]',volume:'[data-plyr="volume"]',speed:'[data-plyr="speed"]',language:'[data-plyr="language"]',quality:'[data-plyr="quality"]'},display:{currentTime:".plyr__time--current",duration:".plyr__time--duration",buffer:".plyr__progress__buffer",loop:".plyr__progress__loop",volume:".plyr__volume--display"},progress:".plyr__progress",captions:".plyr__captions",caption:".plyr__caption"},classNames:{type:"plyr--{0}",provider:"plyr--{0}",video:"plyr__video-wrapper",embed:"plyr__video-embed",videoFixedRatio:"plyr__video-wrapper--fixed-ratio",embedContainer:"plyr__video-embed__container",poster:"plyr__poster",posterEnabled:"plyr__poster-enabled",ads:"plyr__ads",control:"plyr__control",controlPressed:"plyr__control--pressed",playing:"plyr--playing",paused:"plyr--paused",stopped:"plyr--stopped",loading:"plyr--loading",hover:"plyr--hover",tooltip:"plyr__tooltip",cues:"plyr__cues",hidden:"plyr__sr-only",hideControls:"plyr--hide-controls",isIos:"plyr--is-ios",isTouch:"plyr--is-touch",uiSupported:"plyr--full-ui",noTransition:"plyr--no-transition",display:{time:"plyr__time"},menu:{value:"plyr__menu__value",badge:"plyr__badge",open:"plyr--menu-open"},captions:{enabled:"plyr--captions-enabled",active:"plyr--captions-active"},fullscreen:{enabled:"plyr--fullscreen-enabled",fallback:"plyr--fullscreen-fallback"},pip:{supported:"plyr--pip-supported",active:"plyr--pip-active"},airplay:{supported:"plyr--airplay-supported",active:"plyr--airplay-active"},tabFocus:"plyr__tab-focus",previewThumbnails:{thumbContainer:"plyr__preview-thumb",thumbContainerShown:"plyr__preview-thumb--is-shown",imageContainer:"plyr__preview-thumb__image-container",timeContainer:"plyr__preview-thumb__time-container",scrubbingContainer:"plyr__preview-scrubbing",scrubbingContainerShown:"plyr__preview-scrubbing--is-shown"}},attributes:{embed:{provider:"data-plyr-provider",id:"data-plyr-embed-id"}},ads:{enabled:!1,publisherId:"",tagUrl:""},previewThumbnails:{enabled:!1,src:""},vimeo:{byline:!1,portrait:!1,title:!1,speed:!0,transparent:!1,customControls:!0,referrerPolicy:null,premium:!1},youtube:{rel:0,showinfo:0,iv_load_policy:3,modestbranding:1,customControls:!0,noCookie:!1}},sa="picture-in-picture",la="inline",ca={html5:"html5",youtube:"youtube",vimeo:"vimeo"},ha="audio",da="video";var ua=function(){},pa=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];Ui(this,e),this.enabled=window.console&&t,this.enabled&&this.log("Debugging enabled")}return Zi(e,[{key:"log",get:function(){return this.enabled?Function.prototype.bind.call(console.log,console):ua}},{key:"warn",get:function(){return this.enabled?Function.prototype.bind.call(console.warn,console):ua}},{key:"error",get:function(){return this.enabled?Function.prototype.bind.call(console.error,console):ua}}]),e}(),fa=function(){function e(t){var i=this;Ui(this,e),on(this,"onChange",(function(){if(i.enabled){var e=i.player.elements.buttons.fullscreen;Un(e)&&(e.pressed=i.active);var t=i.target===i.player.media?i.target:i.player.elements.container;Pr.call(i.player,t,i.active?"enterfullscreen":"exitfullscreen",!0)}})),on(this,"toggleFallback",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(e?i.scrollPosition={x:window.scrollX||0,y:window.scrollY||0}:window.scrollTo(i.scrollPosition.x,i.scrollPosition.y),document.body.style.overflow=e?"hidden":"",gr(i.target,i.player.config.classNames.fullscreen.fallback,e),nr.isIos){var t=document.head.querySelector('meta[name="viewport"]'),n="viewport-fit=cover";t||(t=document.createElement("meta")).setAttribute("name","viewport");var r=Xn(t.content)&&t.content.includes(n);e?(i.cleanupViewport=!r,r||(t.content+=",".concat(n))):i.cleanupViewport&&(t.content=t.content.split(",").filter((function(e){return e.trim()!==n})).join(","))}i.onChange()})),on(this,"trapFocus",(function(e){if(!nr.isIos&&i.active&&"Tab"===e.key&&9===e.keyCode){var t=document.activeElement,n=yr.call(i.player,"a[href], button:not(:disabled), input:not(:disabled), [tabindex]"),r=Ki(n,1)[0],a=n[n.length-1];t!==a||e.shiftKey?t===r&&e.shiftKey&&(a.focus(),e.preventDefault()):(r.focus(),e.preventDefault())}})),on(this,"update",(function(){var t;i.enabled?(t=i.forceFallback?"Fallback (forced)":e.native?"Native":"Fallback",i.player.debug.log("".concat(t," fullscreen enabled"))):i.player.debug.log("Fullscreen not supported and fallback disabled");gr(i.player.elements.container,i.player.config.classNames.fullscreen.enabled,i.enabled)})),on(this,"enter",(function(){i.enabled&&(nr.isIos&&i.player.config.fullscreen.iosNative?i.player.isVimeo?i.player.embed.requestFullscreen():i.target.webkitEnterFullscreen():!e.native||i.forceFallback?i.toggleFallback(!0):i.prefix?er(i.prefix)||i.target["".concat(i.prefix,"Request").concat(i.property)]():i.target.requestFullscreen({navigationUI:"hide"}))})),on(this,"exit",(function(){if(i.enabled)if(nr.isIos&&i.player.config.fullscreen.iosNative)i.target.webkitExitFullscreen(),Mr(i.player.play());else if(!e.native||i.forceFallback)i.toggleFallback(!1);else if(i.prefix){if(!er(i.prefix)){var t="moz"===i.prefix?"Cancel":"Exit";document["".concat(i.prefix).concat(t).concat(i.property)]()}}else(document.cancelFullScreen||document.exitFullscreen).call(document)})),on(this,"toggle",(function(){i.active?i.exit():i.enter()})),this.player=t,this.prefix=e.prefix,this.property=e.property,this.scrollPosition={x:0,y:0},this.forceFallback="force"===t.config.fullscreen.fallback,this.player.elements.fullscreen=t.config.fullscreen.container&&function(e,t){return(Element.prototype.closest||function(){var e=this;do{if(vr.matches(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}).call(e,t)}(this.player.elements.container,t.config.fullscreen.container),Ar.call(this.player,document,"ms"===this.prefix?"MSFullscreenChange":"".concat(this.prefix,"fullscreenchange"),(function(){i.onChange()})),Ar.call(this.player,this.player.elements.container,"dblclick",(function(e){Un(i.player.elements.controls)&&i.player.elements.controls.contains(e.target)||i.player.listeners.proxy(e,i.toggle,"fullscreen")})),Ar.call(this,this.player.elements.container,"keydown",(function(e){return i.trapFocus(e)})),this.update()}return Zi(e,[{key:"usingNative",get:function(){return e.native&&!this.forceFallback}},{key:"enabled",get:function(){return(e.native||this.player.config.fullscreen.fallback)&&this.player.config.fullscreen.enabled&&this.player.supported.ui&&this.player.isVideo}},{key:"active",get:function(){if(!this.enabled)return!1;if(!e.native||this.forceFallback)return mr(this.target,this.player.config.classNames.fullscreen.fallback);var t=this.prefix?document["".concat(this.prefix).concat(this.property,"Element")]:document.fullscreenElement;return t&&t.shadowRoot?t===this.target.getRootNode().host:t===this.target}},{key:"target",get:function(){return nr.isIos&&this.player.config.fullscreen.iosNative?this.player.media:this.player.elements.fullscreen||this.player.elements.container}}],[{key:"native",get:function(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}},{key:"prefix",get:function(){if(Wn(document.exitFullscreen))return"";var e="";return["webkit","moz","ms"].some((function(t){return!(!Wn(document["".concat(t,"ExitFullscreen")])&&!Wn(document["".concat(t,"CancelFullScreen")])||(e=t,0))})),e}},{key:"property",get:function(){return"moz"===this.prefix?"FullScreen":"Fullscreen"}}]),e}();function ga(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return new Promise((function(i,n){var r=new Image,a=function(){delete r.onload,delete r.onerror,(r.naturalWidth>=t?i:n)(r)};Object.assign(r,{onload:a,onerror:a,src:e})}))}var ma={addStyleHook:function(){gr(this.elements.container,this.config.selectors.container.replace(".",""),!0),gr(this.elements.container,this.config.classNames.uiSupported,this.supported.ui)},toggleNativeControls:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];e&&this.isHTML5?this.media.setAttribute("controls",""):this.media.removeAttribute("controls")},build:function(){var e=this;if(this.listeners.media(),!this.supported.ui)return this.debug.warn("Basic support only for ".concat(this.provider," ").concat(this.type)),void ma.toggleNativeControls.call(this,!0);Un(this.elements.controls)||(ia.inject.call(this),this.listeners.controls()),ma.toggleNativeControls.call(this),this.isHTML5&&aa.setup.call(this),this.volume=null,this.muted=null,this.loop=null,this.quality=null,this.speed=null,ia.updateVolume.call(this),ia.timeUpdate.call(this),ma.checkPlaying.call(this),gr(this.elements.container,this.config.classNames.pip.supported,kr.pip&&this.isHTML5&&this.isVideo),gr(this.elements.container,this.config.classNames.airplay.supported,kr.airplay&&this.isHTML5),gr(this.elements.container,this.config.classNames.isIos,nr.isIos),gr(this.elements.container,this.config.classNames.isTouch,this.touch),this.ready=!0,setTimeout((function(){Pr.call(e,e.media,"ready")}),0),ma.setTitle.call(this),this.poster&&ma.setPoster.call(this,this.poster,!1).catch((function(){})),this.config.duration&&ia.durationUpdate.call(this)},setTitle:function(){var e=qr("play",this.config);if(Xn(this.config.title)&&!er(this.config.title)&&(e+=", ".concat(this.config.title)),Array.from(this.elements.buttons.play||[]).forEach((function(t){t.setAttribute("aria-label",e)})),this.isEmbed){var t=br.call(this,"iframe");if(!Un(t))return;var i=er(this.config.title)?"video":this.config.title,n=qr("frameTitle",this.config);t.setAttribute("title",n.replace("{title}",i))}},togglePoster:function(e){gr(this.elements.container,this.config.classNames.posterEnabled,e)},setPoster:function(e){var t=this,i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return i&&this.poster?Promise.reject(new Error("Poster already set")):(this.media.setAttribute("data-poster",e),this.elements.poster.removeAttribute("hidden"),Er.call(this).then((function(){return ga(e)})).catch((function(i){throw e===t.poster&&ma.togglePoster.call(t,!1),i})).then((function(){if(e!==t.poster)throw new Error("setPoster cancelled by later call to setPoster")})).then((function(){return Object.assign(t.elements.poster.style,{backgroundImage:"url('".concat(e,"')"),backgroundSize:""}),ma.togglePoster.call(t,!0),e})))},checkPlaying:function(e){var t=this;gr(this.elements.container,this.config.classNames.playing,this.playing),gr(this.elements.container,this.config.classNames.paused,this.paused),gr(this.elements.container,this.config.classNames.stopped,this.stopped),Array.from(this.elements.buttons.play||[]).forEach((function(e){Object.assign(e,{pressed:t.playing}),e.setAttribute("aria-label",qr(t.playing?"pause":"play",t.config))})),qn(e)&&"timeupdate"===e.type||ma.toggleControls.call(this)},checkLoading:function(e){var t=this;this.loading=["stalled","waiting"].includes(e.type),clearTimeout(this.timers.loading),this.timers.loading=setTimeout((function(){gr(t.elements.container,t.config.classNames.loading,t.loading),ma.toggleControls.call(t)}),this.loading?250:0)},toggleControls:function(e){var t=this.elements.controls;if(t&&this.config.hideControls){var i=this.touch&&this.lastSeekTime+2e3>Date.now();this.toggleControls(Boolean(e||this.loading||this.paused||t.pressed||t.hover||i))}},migrateStyles:function(){var e=this;Object.values(Wi({},this.media.style)).filter((function(e){return!er(e)&&Xn(e)&&e.startsWith("--plyr")})).forEach((function(t){e.elements.container.style.setProperty(t,e.media.style.getPropertyValue(t)),e.media.style.removeProperty(t)})),er(this.media.style)&&this.media.removeAttribute("style")}},va=function(){function e(t){var i=this;Ui(this,e),on(this,"firstTouch",(function(){var e=i.player,t=e.elements;e.touch=!0,gr(t.container,e.config.classNames.isTouch,!0)})),on(this,"setTabFocus",(function(e){var t=i.player,n=t.elements;if(clearTimeout(i.focusTimer),"keydown"!==e.type||9===e.which){"keydown"===e.type&&(i.lastKeyDown=e.timeStamp);var r=e.timeStamp-i.lastKeyDown<=20;("focus"!==e.type||r)&&(function(){var e=t.config.classNames.tabFocus;gr(yr.call(t,".".concat(e)),e,!1)}(),"focusout"!==e.type&&(i.focusTimer=setTimeout((function(){var e=document.activeElement;n.container.contains(e)&&gr(document.activeElement,t.config.classNames.tabFocus,!0)}),10)))}})),on(this,"global",(function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=i.player;t.config.keyboard.global&&Sr.call(t,window,"keydown keyup",i.handleKey,e,!1),Sr.call(t,document.body,"click",i.toggleMenu,e),Tr.call(t,document.body,"touchstart",i.firstTouch),Sr.call(t,document.body,"keydown focus blur focusout",i.setTabFocus,e,!1,!0)})),on(this,"container",(function(){var e=i.player,t=e.config,n=e.elements,r=e.timers;!t.keyboard.global&&t.keyboard.focused&&Ar.call(e,n.container,"keydown keyup",i.handleKey,!1),Ar.call(e,n.container,"mousemove mouseleave touchstart touchmove enterfullscreen exitfullscreen",(function(t){var i=n.controls;i&&"enterfullscreen"===t.type&&(i.pressed=!1,i.hover=!1);var a=0;["touchstart","touchmove","mousemove"].includes(t.type)&&(ma.toggleControls.call(e,!0),a=e.touch?3e3:2e3),clearTimeout(r.controls),r.controls=setTimeout((function(){return ma.toggleControls.call(e,!1)}),a)}));var a=function(){if(e.isVimeo&&!e.config.vimeo.premium){var t=n.wrapper,i=e.fullscreen.active,r=Ki(Fr.call(e),2),a=r[0],o=r[1],s=Dr("aspect-ratio: ".concat(a," / ").concat(o));if(i){var l=Ki([Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)],2),c=l[0],h=l[1],d=c/h>a/o;s?(t.style.width=d?"auto":"100%",t.style.height=d?"100%":"auto"):(t.style.maxWidth=d?h/o*a+"px":null,t.style.margin=d?"0 auto":null)}else s?(t.style.width=null,t.style.height=null):(t.style.maxWidth=null,t.style.margin=null)}},o=function(){clearTimeout(r.resized),r.resized=setTimeout(a,50)};Ar.call(e,n.container,"enterfullscreen exitfullscreen",(function(t){e.fullscreen.target===n.container&&(!e.isEmbed&&er(e.config.ratio)||(a(),("enterfullscreen"===t.type?Ar:Cr).call(e,window,"resize",o)))}))})),on(this,"media",(function(){var e=i.player,t=e.elements;if(Ar.call(e,e.media,"timeupdate seeking seeked",(function(t){return ia.timeUpdate.call(e,t)})),Ar.call(e,e.media,"durationchange loadeddata loadedmetadata",(function(t){return ia.durationUpdate.call(e,t)})),Ar.call(e,e.media,"ended",(function(){e.isHTML5&&e.isVideo&&e.config.resetOnEnd&&(e.restart(),e.pause())})),Ar.call(e,e.media,"progress playing seeking seeked",(function(t){return ia.updateProgress.call(e,t)})),Ar.call(e,e.media,"volumechange",(function(t){return ia.updateVolume.call(e,t)})),Ar.call(e,e.media,"playing play pause ended emptied timeupdate",(function(t){return ma.checkPlaying.call(e,t)})),Ar.call(e,e.media,"waiting canplay seeked playing",(function(t){return ma.checkLoading.call(e,t)})),e.supported.ui&&e.config.clickToPlay&&!e.isAudio){var n=br.call(e,".".concat(e.config.classNames.video));if(!Un(n))return;Ar.call(e,t.container,"click",(function(r){([t.container,n].includes(r.target)||n.contains(r.target))&&(e.touch&&e.config.hideControls||(e.ended?(i.proxy(r,e.restart,"restart"),i.proxy(r,(function(){Mr(e.play())}),"play")):i.proxy(r,(function(){Mr(e.togglePlay())}),"play")))}))}e.supported.ui&&e.config.disableContextMenu&&Ar.call(e,t.wrapper,"contextmenu",(function(e){e.preventDefault()}),!1),Ar.call(e,e.media,"volumechange",(function(){e.storage.set({volume:e.volume,muted:e.muted})})),Ar.call(e,e.media,"ratechange",(function(){ia.updateSetting.call(e,"speed"),e.storage.set({speed:e.speed})})),Ar.call(e,e.media,"qualitychange",(function(t){ia.updateSetting.call(e,"quality",null,t.detail.quality)})),Ar.call(e,e.media,"ready qualitychange",(function(){ia.setDownloadUrl.call(e)}));var r=e.config.events.concat(["keyup","keydown"]).join(" ");Ar.call(e,e.media,r,(function(i){var n=i.detail,r=void 0===n?{}:n;"error"===i.type&&(r=e.media.error),Pr.call(e,t.container,i.type,!0,r)}))})),on(this,"proxy",(function(e,t,n){var r=i.player,a=r.config.listeners[n],o=!0;Wn(a)&&(o=a.call(r,e)),!1!==o&&Wn(t)&&t.call(r,e)})),on(this,"bind",(function(e,t,n,r){var a=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=i.player,s=o.config.listeners[r],l=Wn(s);Ar.call(o,e,t,(function(e){return i.proxy(e,n,r)}),a&&!l)})),on(this,"controls",(function(){var e=i.player,t=e.elements,n=nr.isIE?"change":"input";if(t.buttons.play&&Array.from(t.buttons.play).forEach((function(t){i.bind(t,"click",(function(){Mr(e.togglePlay())}),"play")})),i.bind(t.buttons.restart,"click",e.restart,"restart"),i.bind(t.buttons.rewind,"click",(function(){e.lastSeekTime=Date.now(),e.rewind()}),"rewind"),i.bind(t.buttons.fastForward,"click",(function(){e.lastSeekTime=Date.now(),e.forward()}),"fastForward"),i.bind(t.buttons.mute,"click",(function(){e.muted=!e.muted}),"mute"),i.bind(t.buttons.captions,"click",(function(){return e.toggleCaptions()})),i.bind(t.buttons.download,"click",(function(){Pr.call(e,e.media,"download")}),"download"),i.bind(t.buttons.fullscreen,"click",(function(){e.fullscreen.toggle()}),"fullscreen"),i.bind(t.buttons.pip,"click",(function(){e.pip="toggle"}),"pip"),i.bind(t.buttons.airplay,"click",e.airplay,"airplay"),i.bind(t.buttons.settings,"click",(function(t){t.stopPropagation(),t.preventDefault(),ia.toggleMenu.call(e,t)}),null,!1),i.bind(t.buttons.settings,"keyup",(function(t){var i=t.which;[13,32].includes(i)&&(13!==i?(t.preventDefault(),t.stopPropagation(),ia.toggleMenu.call(e,t)):ia.focusFirstMenuItem.call(e,null,!0))}),null,!1),i.bind(t.settings.menu,"keydown",(function(t){27===t.which&&ia.toggleMenu.call(e,t)})),i.bind(t.inputs.seek,"mousedown mousemove",(function(e){var i=t.progress.getBoundingClientRect(),n=100/i.width*(e.pageX-i.left);e.currentTarget.setAttribute("seek-value",n)})),i.bind(t.inputs.seek,"mousedown mouseup keydown keyup touchstart touchend",(function(t){var i=t.currentTarget,n=t.keyCode?t.keyCode:t.which,r="play-on-seeked";if(!Zn(t)||39===n||37===n){e.lastSeekTime=Date.now();var a=i.hasAttribute(r),o=["mouseup","touchend","keyup"].includes(t.type);a&&o?(i.removeAttribute(r),Mr(e.play())):!o&&e.playing&&(i.setAttribute(r,""),e.pause())}})),nr.isIos){var r=yr.call(e,'input[type="range"]');Array.from(r).forEach((function(e){return i.bind(e,n,(function(e){return ir(e.target)}))}))}i.bind(t.inputs.seek,n,(function(t){var i=t.currentTarget,n=i.getAttribute("seek-value");er(n)&&(n=i.value),i.removeAttribute("seek-value"),e.currentTime=n/i.max*e.duration}),"seek"),i.bind(t.progress,"mouseenter mouseleave mousemove",(function(t){return ia.updateSeekTooltip.call(e,t)})),i.bind(t.progress,"mousemove touchmove",(function(t){var i=e.previewThumbnails;i&&i.loaded&&i.startMove(t)})),i.bind(t.progress,"mouseleave touchend click",(function(){var t=e.previewThumbnails;t&&t.loaded&&t.endMove(!1,!0)})),i.bind(t.progress,"mousedown touchstart",(function(t){var i=e.previewThumbnails;i&&i.loaded&&i.startScrubbing(t)})),i.bind(t.progress,"mouseup touchend",(function(t){var i=e.previewThumbnails;i&&i.loaded&&i.endScrubbing(t)})),nr.isWebkit&&Array.from(yr.call(e,'input[type="range"]')).forEach((function(t){i.bind(t,"input",(function(t){return ia.updateRangeFill.call(e,t.target)}))})),e.config.toggleInvert&&!Un(t.display.duration)&&i.bind(t.display.currentTime,"click",(function(){0!==e.currentTime&&(e.config.invertTime=!e.config.invertTime,ia.timeUpdate.call(e))})),i.bind(t.inputs.volume,n,(function(t){e.volume=t.target.value}),"volume"),i.bind(t.controls,"mouseenter mouseleave",(function(i){t.controls.hover=!e.touch&&"mouseenter"===i.type})),t.fullscreen&&Array.from(t.fullscreen.children).filter((function(e){return!e.contains(t.container)})).forEach((function(n){i.bind(n,"mouseenter mouseleave",(function(i){t.controls.hover=!e.touch&&"mouseenter"===i.type}))})),i.bind(t.controls,"mousedown mouseup touchstart touchend touchcancel",(function(e){t.controls.pressed=["mousedown","touchstart"].includes(e.type)})),i.bind(t.controls,"focusin",(function(){var n=e.config,r=e.timers;gr(t.controls,n.classNames.noTransition,!0),ma.toggleControls.call(e,!0),setTimeout((function(){gr(t.controls,n.classNames.noTransition,!1)}),0);var a=i.touch?3e3:4e3;clearTimeout(r.controls),r.controls=setTimeout((function(){return ma.toggleControls.call(e,!1)}),a)})),i.bind(t.inputs.volume,"wheel",(function(t){var i=t.webkitDirectionInvertedFromDevice,n=Ki([t.deltaX,-t.deltaY].map((function(e){return i?-e:e})),2),r=n[0],a=n[1],o=Math.sign(Math.abs(r)>Math.abs(a)?r:a);e.increaseVolume(o/50);var s=e.media.volume;(1===o&&s<1||-1===o&&s>0)&&t.preventDefault()}),"volume",!1)})),this.player=t,this.lastKey=null,this.focusTimer=null,this.lastKeyDown=null,this.handleKey=this.handleKey.bind(this),this.toggleMenu=this.toggleMenu.bind(this),this.setTabFocus=this.setTabFocus.bind(this),this.firstTouch=this.firstTouch.bind(this)}return Zi(e,[{key:"handleKey",value:function(e){var t=this.player,i=t.elements,n=e.keyCode?e.keyCode:e.which,r="keydown"===e.type,a=r&&n===this.lastKey;if(!(e.altKey||e.ctrlKey||e.metaKey||e.shiftKey)&&$n(n))if(r){var o=document.activeElement;if(Un(o)){var s=t.config.selectors.editable;if(o!==i.inputs.seek&&vr(o,s))return;if(32===e.which&&vr(o,'button, [role^="menuitem"]'))return}switch([32,37,38,39,40,48,49,50,51,52,53,54,56,57,67,70,73,75,76,77,79].includes(n)&&(e.preventDefault(),e.stopPropagation()),n){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:a||(t.currentTime=t.duration/10*(n-48));break;case 32:case 75:a||Mr(t.togglePlay());break;case 38:t.increaseVolume(.1);break;case 40:t.decreaseVolume(.1);break;case 77:a||(t.muted=!t.muted);break;case 39:t.forward();break;case 37:t.rewind();break;case 70:t.fullscreen.toggle();break;case 67:a||t.toggleCaptions();break;case 76:t.loop=!t.loop}27===n&&!t.fullscreen.usingNative&&t.fullscreen.active&&t.fullscreen.toggle(),this.lastKey=n}else this.lastKey=null}},{key:"toggleMenu",value:function(e){ia.toggleMenu.call(this.player,e)}}]),e}();var ya=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e,t){e.exports=function(){var e=function(){},t={},i={},n={};function r(e,t){if(e){var r=n[e];if(i[e]=t,r)for(;r.length;)r[0](e,t),r.splice(0,1)}}function a(t,i){t.call&&(t={success:t}),i.length?(t.error||e)(i):(t.success||e)(t)}function o(t,i,n,r){var a,s,l=document,c=n.async,h=(n.numRetries||0)+1,d=n.before||e,u=t.replace(/[\?|#].*$/,""),p=t.replace(/^(css|img)!/,"");r=r||0,/(^css!|\.css$)/.test(u)?((s=l.createElement("link")).rel="stylesheet",s.href=p,(a="hideFocus"in s)&&s.relList&&(a=0,s.rel="preload",s.as="style")):/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(u)?(s=l.createElement("img")).src=p:((s=l.createElement("script")).src=t,s.async=void 0===c||c),s.onload=s.onerror=s.onbeforeload=function(e){var l=e.type[0];if(a)try{s.sheet.cssText.length||(l="e")}catch(e){18!=e.code&&(l="e")}if("e"==l){if((r+=1)<h)return o(t,i,n,r)}else if("preload"==s.rel&&"style"==s.as)return s.rel="stylesheet";i(t,l,e.defaultPrevented)},!1!==d(t,s)&&l.head.appendChild(s)}function s(e,t,i){var n,r,a=(e=e.push?e:[e]).length,s=a,l=[];for(n=function(e,i,n){if("e"==i&&l.push(e),"b"==i){if(!n)return;l.push(e)}--a||t(l)},r=0;r<s;r++)o(e[r],n,i)}function l(e,i,n){var o,l;if(i&&i.trim&&(o=i),l=(o?n:i)||{},o){if(o in t)throw"LoadJS";t[o]=!0}function c(t,i){s(e,(function(e){a(l,e),t&&a({success:t,error:i},e),r(o,e)}),l)}if(l.returnPromise)return new Promise(c);c()}return l.ready=function(e,t){return function(e,t){e=e.push?e:[e];var r,a,o,s=[],l=e.length,c=l;for(r=function(e,i){i.length&&s.push(e),--c||t(s)};l--;)a=e[l],(o=i[a])?r(a,o):(n[a]=n[a]||[]).push(r)}(e,(function(e){a(t,e)})),l},l.done=function(e){r(e,[])},l.reset=function(){t={},i={},n={}},l.isDefined=function(e){return e in t},l}()}));function ba(e){return new Promise((function(t,i){ya(e,{success:t,error:i})}))}function xa(e){e&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===e&&(this.media.paused=!e,Pr.call(this,this.media,e?"play":"pause"))}var wa={setup:function(){var e=this;gr(e.elements.wrapper,e.config.classNames.embed,!0),e.options.speed=e.config.speed.options,Hr.call(e),jn(window.Vimeo)?wa.ready.call(e):ba(e.config.urls.vimeo.sdk).then((function(){wa.ready.call(e)})).catch((function(t){e.debug.warn("Vimeo SDK (player.js) failed to load",t)}))},ready:function(){var e=this,t=this,i=t.config.vimeo,n=i.premium,r=i.referrerPolicy,a=Qi(i,an);n&&Object.assign(a,{controls:!1,sidedock:!1});var o=ra(Wi({loop:t.config.loop.active,autoplay:t.autoplay,muted:t.muted,gesture:"media",playsinline:!this.config.fullscreen.iosNative},a)),s=t.media.getAttribute("src");er(s)&&(s=t.media.getAttribute(t.config.attributes.embed.id));var l=function(e){return er(e)?null:$n(Number(e))?e:e.match(/^.*(vimeo.com\/|video\/)(\d+).*/)?RegExp.$2:e}(s),c=lr("iframe"),h=Xr(t.config.urls.vimeo.iframe,l,o);if(c.setAttribute("src",h),c.setAttribute("allowfullscreen",""),c.setAttribute("allow",["autoplay","fullscreen","picture-in-picture","encrypted-media","accelerometer","gyroscope"].join("; ")),er(r)||c.setAttribute("referrerPolicy",r),n||!i.customControls)c.setAttribute("data-poster",t.poster),t.media=ur(c,t.media);else{var d=lr("div",{class:t.config.classNames.embedContainer,"data-poster":t.poster});d.appendChild(c),t.media=ur(d,t.media)}i.customControls||Jr(Xr(t.config.urls.vimeo.api,h)).then((function(e){!er(e)&&e.thumbnail_url&&ma.setPoster.call(t,e.thumbnail_url).catch((function(){}))})),t.embed=new window.Vimeo.Player(c,{autopause:t.config.autopause,muted:t.muted}),t.media.paused=!0,t.media.currentTime=0,t.supported.ui&&t.embed.disableTextTrack(),t.media.play=function(){return xa.call(t,!0),t.embed.play()},t.media.pause=function(){return xa.call(t,!1),t.embed.pause()},t.media.stop=function(){t.pause(),t.currentTime=0};var u=t.media.currentTime;Object.defineProperty(t.media,"currentTime",{get:function(){return u},set:function(e){var i=t.embed,n=t.media,r=t.paused,a=t.volume,o=r&&!i.hasPlayed;n.seeking=!0,Pr.call(t,n,"seeking"),Promise.resolve(o&&i.setVolume(0)).then((function(){return i.setCurrentTime(e)})).then((function(){return o&&i.pause()})).then((function(){return o&&i.setVolume(a)})).catch((function(){}))}});var p=t.config.speed.selected;Object.defineProperty(t.media,"playbackRate",{get:function(){return p},set:function(e){t.embed.setPlaybackRate(e).then((function(){p=e,Pr.call(t,t.media,"ratechange")})).catch((function(){t.options.speed=[1]}))}});var f=t.config.volume;Object.defineProperty(t.media,"volume",{get:function(){return f},set:function(e){t.embed.setVolume(e).then((function(){f=e,Pr.call(t,t.media,"volumechange")}))}});var g=t.config.muted;Object.defineProperty(t.media,"muted",{get:function(){return g},set:function(e){var i=!!Bn(e)&&e;t.embed.setVolume(i?0:t.config.volume).then((function(){g=i,Pr.call(t,t.media,"volumechange")}))}});var m,v=t.config.loop;Object.defineProperty(t.media,"loop",{get:function(){return v},set:function(e){var i=Bn(e)?e:t.config.loop.active;t.embed.setLoop(i).then((function(){v=i}))}}),t.embed.getVideoUrl().then((function(e){m=e,ia.setDownloadUrl.call(t)})).catch((function(t){e.debug.warn(t)})),Object.defineProperty(t.media,"currentSrc",{get:function(){return m}}),Object.defineProperty(t.media,"ended",{get:function(){return t.currentTime===t.duration}}),Promise.all([t.embed.getVideoWidth(),t.embed.getVideoHeight()]).then((function(i){var n=Ki(i,2),r=n[0],a=n[1];t.embed.ratio=Yr(r,a),Hr.call(e)})),t.embed.setAutopause(t.config.autopause).then((function(e){t.config.autopause=e})),t.embed.getVideoTitle().then((function(i){t.config.title=i,ma.setTitle.call(e)})),t.embed.getCurrentTime().then((function(e){u=e,Pr.call(t,t.media,"timeupdate")})),t.embed.getDuration().then((function(e){t.media.duration=e,Pr.call(t,t.media,"durationchange")})),t.embed.getTextTracks().then((function(e){t.media.textTracks=e,aa.setup.call(t)})),t.embed.on("cuechange",(function(e){var i=e.cues,n=(void 0===i?[]:i).map((function(e){return function(e){var t=document.createDocumentFragment(),i=document.createElement("div");return t.appendChild(i),i.innerHTML=e,t.firstChild.innerText}(e.text)}));aa.updateCues.call(t,n)})),t.embed.on("loaded",(function(){t.embed.getPaused().then((function(e){xa.call(t,!e),e||Pr.call(t,t.media,"playing")})),Un(t.embed.element)&&t.supported.ui&&t.embed.element.setAttribute("tabindex",-1)})),t.embed.on("bufferstart",(function(){Pr.call(t,t.media,"waiting")})),t.embed.on("bufferend",(function(){Pr.call(t,t.media,"playing")})),t.embed.on("play",(function(){xa.call(t,!0),Pr.call(t,t.media,"playing")})),t.embed.on("pause",(function(){xa.call(t,!1)})),t.embed.on("timeupdate",(function(e){t.media.seeking=!1,u=e.seconds,Pr.call(t,t.media,"timeupdate")})),t.embed.on("progress",(function(e){t.media.buffered=e.percent,Pr.call(t,t.media,"progress"),1===parseInt(e.percent,10)&&Pr.call(t,t.media,"canplaythrough"),t.embed.getDuration().then((function(e){e!==t.media.duration&&(t.media.duration=e,Pr.call(t,t.media,"durationchange"))}))})),t.embed.on("seeked",(function(){t.media.seeking=!1,Pr.call(t,t.media,"seeked")})),t.embed.on("ended",(function(){t.media.paused=!0,Pr.call(t,t.media,"ended")})),t.embed.on("error",(function(e){t.media.error=e,Pr.call(t,t.media,"error")})),i.customControls&&setTimeout((function(){return ma.build.call(t)}),0)}};function ka(e){e&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===e&&(this.media.paused=!e,Pr.call(this,this.media,e?"play":"pause"))}function _a(e){return e.noCookie?"https://www.youtube-nocookie.com":"http:"===window.location.protocol?"http://www.youtube.com":void 0}var Sa={setup:function(){var e=this;if(gr(this.elements.wrapper,this.config.classNames.embed,!0),jn(window.YT)&&Wn(window.YT.Player))Sa.ready.call(this);else{var t=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=function(){Wn(t)&&t(),Sa.ready.call(e)},ba(this.config.urls.youtube.sdk).catch((function(t){e.debug.warn("YouTube API failed to load",t)}))}},getTitle:function(e){var t=this;Jr(Xr(this.config.urls.youtube.api,e)).then((function(e){if(jn(e)){var i=e.title,n=e.height,r=e.width;t.config.title=i,ma.setTitle.call(t),t.embed.ratio=Yr(r,n)}Hr.call(t)})).catch((function(){Hr.call(t)}))},ready:function(){var e=this,t=e.config.youtube,i=e.media&&e.media.getAttribute("id");if(er(i)||!i.startsWith("youtube-")){var n=e.media.getAttribute("src");er(n)&&(n=e.media.getAttribute(this.config.attributes.embed.id));var r=function(e){return er(e)?null:e.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/)?RegExp.$2:e}(n),a=lr("div",{id:$r(e.provider),"data-poster":t.customControls?e.poster:void 0});if(e.media=ur(a,e.media),t.customControls){var o=function(e){return"https://i.ytimg.com/vi/".concat(r,"/").concat(e,"default.jpg")};ga(o("maxres"),121).catch((function(){return ga(o("sd"),121)})).catch((function(){return ga(o("hq"))})).then((function(t){return ma.setPoster.call(e,t.src)})).then((function(t){t.includes("maxres")||(e.elements.poster.style.backgroundSize="cover")})).catch((function(){}))}e.embed=new window.YT.Player(e.media,{videoId:r,host:_a(t),playerVars:ar({},{autoplay:e.config.autoplay?1:0,hl:e.config.hl,controls:e.supported.ui&&t.customControls?0:1,disablekb:1,playsinline:e.config.fullscreen.iosNative?0:1,cc_load_policy:e.captions.active?1:0,cc_lang_pref:e.config.captions.language,widget_referrer:window?window.location.href:null},t),events:{onError:function(t){if(!e.media.error){var i=t.data,n={2:"The request contains an invalid parameter value. For example, this error occurs if you specify a video ID that does not have 11 characters, or if the video ID contains invalid characters, such as exclamation points or asterisks.",5:"The requested content cannot be played in an HTML5 player or another error related to the HTML5 player has occurred.",100:"The video requested was not found. This error occurs when a video has been removed (for any reason) or has been marked as private.",101:"The owner of the requested video does not allow it to be played in embedded players.",150:"The owner of the requested video does not allow it to be played in embedded players."}[i]||"An unknown error occured";e.media.error={code:i,message:n},Pr.call(e,e.media,"error")}},onPlaybackRateChange:function(t){var i=t.target;e.media.playbackRate=i.getPlaybackRate(),Pr.call(e,e.media,"ratechange")},onReady:function(i){if(!Wn(e.media.play)){var n=i.target;Sa.getTitle.call(e,r),e.media.play=function(){ka.call(e,!0),n.playVideo()},e.media.pause=function(){ka.call(e,!1),n.pauseVideo()},e.media.stop=function(){n.stopVideo()},e.media.duration=n.getDuration(),e.media.paused=!0,e.media.currentTime=0,Object.defineProperty(e.media,"currentTime",{get:function(){return Number(n.getCurrentTime())},set:function(t){e.paused&&!e.embed.hasPlayed&&e.embed.mute(),e.media.seeking=!0,Pr.call(e,e.media,"seeking"),n.seekTo(t)}}),Object.defineProperty(e.media,"playbackRate",{get:function(){return n.getPlaybackRate()},set:function(e){n.setPlaybackRate(e)}});var a=e.config.volume;Object.defineProperty(e.media,"volume",{get:function(){return a},set:function(t){a=t,n.setVolume(100*a),Pr.call(e,e.media,"volumechange")}});var o=e.config.muted;Object.defineProperty(e.media,"muted",{get:function(){return o},set:function(t){var i=Bn(t)?t:o;o=i,n[i?"mute":"unMute"](),n.setVolume(100*a),Pr.call(e,e.media,"volumechange")}}),Object.defineProperty(e.media,"currentSrc",{get:function(){return n.getVideoUrl()}}),Object.defineProperty(e.media,"ended",{get:function(){return e.currentTime===e.duration}});var s=n.getAvailablePlaybackRates();e.options.speed=s.filter((function(t){return e.config.speed.options.includes(t)})),e.supported.ui&&t.customControls&&e.media.setAttribute("tabindex",-1),Pr.call(e,e.media,"timeupdate"),Pr.call(e,e.media,"durationchange"),clearInterval(e.timers.buffering),e.timers.buffering=setInterval((function(){e.media.buffered=n.getVideoLoadedFraction(),(null===e.media.lastBuffered||e.media.lastBuffered<e.media.buffered)&&Pr.call(e,e.media,"progress"),e.media.lastBuffered=e.media.buffered,1===e.media.buffered&&(clearInterval(e.timers.buffering),Pr.call(e,e.media,"canplaythrough"))}),200),t.customControls&&setTimeout((function(){return ma.build.call(e)}),50)}},onStateChange:function(i){var n=i.target;switch(clearInterval(e.timers.playing),e.media.seeking&&[1,2].includes(i.data)&&(e.media.seeking=!1,Pr.call(e,e.media,"seeked")),i.data){case-1:Pr.call(e,e.media,"timeupdate"),e.media.buffered=n.getVideoLoadedFraction(),Pr.call(e,e.media,"progress");break;case 0:ka.call(e,!1),e.media.loop?(n.stopVideo(),n.playVideo()):Pr.call(e,e.media,"ended");break;case 1:t.customControls&&!e.config.autoplay&&e.media.paused&&!e.embed.hasPlayed?e.media.pause():(ka.call(e,!0),Pr.call(e,e.media,"playing"),e.timers.playing=setInterval((function(){Pr.call(e,e.media,"timeupdate")}),50),e.media.duration!==n.getDuration()&&(e.media.duration=n.getDuration(),Pr.call(e,e.media,"durationchange")));break;case 2:e.muted||e.embed.unMute(),ka.call(e,!1);break;case 3:Pr.call(e,e.media,"waiting")}Pr.call(e,e.elements.container,"statechange",!1,{code:i.data})}}})}}},Aa={setup:function(){this.media?(gr(this.elements.container,this.config.classNames.type.replace("{0}",this.type),!0),gr(this.elements.container,this.config.classNames.provider.replace("{0}",this.provider),!0),this.isEmbed&&gr(this.elements.container,this.config.classNames.type.replace("{0}","video"),!0),this.isVideo&&(this.elements.wrapper=lr("div",{class:this.config.classNames.video}),or(this.media,this.elements.wrapper),this.elements.poster=lr("div",{class:this.config.classNames.poster}),this.elements.wrapper.appendChild(this.elements.poster)),this.isHTML5?jr.setup.call(this):this.isYouTube?Sa.setup.call(this):this.isVimeo&&wa.setup.call(this)):this.debug.warn("No media element found!")}},Ca=function(){function e(t){var i=this;Ui(this,e),on(this,"load",(function(){i.enabled&&(jn(window.google)&&jn(window.google.ima)?i.ready():ba(i.player.config.urls.googleIMA.sdk).then((function(){i.ready()})).catch((function(){i.trigger("error",new Error("Google IMA SDK failed to load"))})))})),on(this,"ready",(function(){var e;i.enabled||((e=i).manager&&e.manager.destroy(),e.elements.displayContainer&&e.elements.displayContainer.destroy(),e.elements.container.remove()),i.startSafetyTimer(12e3,"ready()"),i.managerPromise.then((function(){i.clearSafetyTimer("onAdsManagerLoaded()")})),i.listeners(),i.setupIMA()})),on(this,"setupIMA",(function(){i.elements.container=lr("div",{class:i.player.config.classNames.ads}),i.player.elements.container.appendChild(i.elements.container),google.ima.settings.setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.ENABLED),google.ima.settings.setLocale(i.player.config.ads.language),google.ima.settings.setDisableCustomPlaybackForIOS10Plus(i.player.config.playsinline),i.elements.displayContainer=new google.ima.AdDisplayContainer(i.elements.container,i.player.media),i.loader=new google.ima.AdsLoader(i.elements.displayContainer),i.loader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,(function(e){return i.onAdsManagerLoaded(e)}),!1),i.loader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,(function(e){return i.onAdError(e)}),!1),i.requestAds()})),on(this,"requestAds",(function(){var e=i.player.elements.container;try{var t=new google.ima.AdsRequest;t.adTagUrl=i.tagUrl,t.linearAdSlotWidth=e.offsetWidth,t.linearAdSlotHeight=e.offsetHeight,t.nonLinearAdSlotWidth=e.offsetWidth,t.nonLinearAdSlotHeight=e.offsetHeight,t.forceNonLinearFullSlot=!1,t.setAdWillPlayMuted(!i.player.muted),i.loader.requestAds(t)}catch(e){i.onAdError(e)}})),on(this,"pollCountdown",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!e)return clearInterval(i.countdownTimer),void i.elements.container.removeAttribute("data-badge-text");i.countdownTimer=setInterval((function(){var e=ta(Math.max(i.manager.getRemainingTime(),0)),t="".concat(qr("advertisement",i.player.config)," - ").concat(e);i.elements.container.setAttribute("data-badge-text",t)}),100)})),on(this,"onAdsManagerLoaded",(function(e){if(i.enabled){var t=new google.ima.AdsRenderingSettings;t.restoreCustomPlaybackStateOnAdBreakComplete=!0,t.enablePreloading=!0,i.manager=e.getAdsManager(i.player,t),i.cuePoints=i.manager.getCuePoints(),i.manager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,(function(e){return i.onAdError(e)})),Object.keys(google.ima.AdEvent.Type).forEach((function(e){i.manager.addEventListener(google.ima.AdEvent.Type[e],(function(e){return i.onAdEvent(e)}))})),i.trigger("loaded")}})),on(this,"addCuePoints",(function(){er(i.cuePoints)||i.cuePoints.forEach((function(e){if(0!==e&&-1!==e&&e<i.player.duration){var t=i.player.elements.progress;if(Un(t)){var n=100/i.player.duration*e,r=lr("span",{class:i.player.config.classNames.cues});r.style.left="".concat(n.toString(),"%"),t.appendChild(r)}}}))})),on(this,"onAdEvent",(function(e){var t=i.player.elements.container,n=e.getAd(),r=e.getAdData();switch(function(e){Pr.call(i.player,i.player.media,"ads".concat(e.replace(/_/g,"").toLowerCase()))}(e.type),e.type){case google.ima.AdEvent.Type.LOADED:i.trigger("loaded"),i.pollCountdown(!0),n.isLinear()||(n.width=t.offsetWidth,n.height=t.offsetHeight);break;case google.ima.AdEvent.Type.STARTED:i.manager.setVolume(i.player.volume);break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:i.player.ended?i.loadAds():i.loader.contentComplete();break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:i.pauseContent();break;case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:i.pollCountdown(),i.resumeContent();break;case google.ima.AdEvent.Type.LOG:r.adError&&i.player.debug.warn("Non-fatal ad error: ".concat(r.adError.getMessage()))}})),on(this,"onAdError",(function(e){i.cancel(),i.player.debug.warn("Ads error",e)})),on(this,"listeners",(function(){var e,t=i.player.elements.container;i.player.on("canplay",(function(){i.addCuePoints()})),i.player.on("ended",(function(){i.loader.contentComplete()})),i.player.on("timeupdate",(function(){e=i.player.currentTime})),i.player.on("seeked",(function(){var t=i.player.currentTime;er(i.cuePoints)||i.cuePoints.forEach((function(n,r){e<n&&n<t&&(i.manager.discardAdBreak(),i.cuePoints.splice(r,1))}))})),window.addEventListener("resize",(function(){i.manager&&i.manager.resize(t.offsetWidth,t.offsetHeight,google.ima.ViewMode.NORMAL)}))})),on(this,"play",(function(){var e=i.player.elements.container;i.managerPromise||i.resumeContent(),i.managerPromise.then((function(){i.manager.setVolume(i.player.volume),i.elements.displayContainer.initialize();try{i.initialized||(i.manager.init(e.offsetWidth,e.offsetHeight,google.ima.ViewMode.NORMAL),i.manager.start()),i.initialized=!0}catch(e){i.onAdError(e)}})).catch((function(){}))})),on(this,"resumeContent",(function(){i.elements.container.style.zIndex="",i.playing=!1,Mr(i.player.media.play())})),on(this,"pauseContent",(function(){i.elements.container.style.zIndex=3,i.playing=!0,i.player.media.pause()})),on(this,"cancel",(function(){i.initialized&&i.resumeContent(),i.trigger("error"),i.loadAds()})),on(this,"loadAds",(function(){i.managerPromise.then((function(){i.manager&&i.manager.destroy(),i.managerPromise=new Promise((function(e){i.on("loaded",e),i.player.debug.log(i.manager)})),i.initialized=!1,i.requestAds()})).catch((function(){}))})),on(this,"trigger",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var a=i.events[e];Vn(a)&&a.forEach((function(e){Wn(e)&&e.apply(i,n)}))})),on(this,"on",(function(e,t){return Vn(i.events[e])||(i.events[e]=[]),i.events[e].push(t),i})),on(this,"startSafetyTimer",(function(e,t){i.player.debug.log("Safety timer invoked from: ".concat(t)),i.safetyTimer=setTimeout((function(){i.cancel(),i.clearSafetyTimer("startSafetyTimer()")}),e)})),on(this,"clearSafetyTimer",(function(e){Yn(i.safetyTimer)||(i.player.debug.log("Safety timer cleared from: ".concat(e)),clearTimeout(i.safetyTimer),i.safetyTimer=null)})),this.player=t,this.config=t.config.ads,this.playing=!1,this.initialized=!1,this.elements={container:null,displayContainer:null},this.manager=null,this.loader=null,this.cuePoints=null,this.events={},this.safetyTimer=null,this.countdownTimer=null,this.managerPromise=new Promise((function(e,t){i.on("loaded",e),i.on("error",t)})),this.load()}return Zi(e,[{key:"enabled",get:function(){var e=this.config;return this.player.isHTML5&&this.player.isVideo&&e.enabled&&(!er(e.publisherId)||Kn(e.tagUrl))}},{key:"tagUrl",get:function(){var e=this.config;return Kn(e.tagUrl)?e.tagUrl:"https://go.aniview.com/api/adserver6/vast/?".concat(ra({AV_PUBLISHERID:"58c25bb0073ef448b1087ad6",AV_CHANNELID:"5a0458dc28a06145e4519d21",AV_URL:window.location.hostname,cb:Date.now(),AV_WIDTH:640,AV_HEIGHT:480,AV_CDIM2:e.publisherId}))}}]),e}(),Ta=function(e){var t=[];return e.split(/\r\n\r\n|\n\n|\r\r/).forEach((function(e){var i={};e.split(/\r\n|\n|\r/).forEach((function(e){if($n(i.startTime)){if(!er(e.trim())&&er(i.text)){var t,n,r=e.trim().split("#xywh=");t=Ki(r,1),i.text=t[0],r[1]&&(n=Ki(r[1].split(","),4),i.x=n[0],i.y=n[1],i.w=n[2],i.h=n[3])}}else{var a=e.match(/([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})( ?--> ?)([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})/);a&&(i.startTime=60*Number(a[1]||0)*60+60*Number(a[2])+Number(a[3])+Number("0.".concat(a[4])),i.endTime=60*Number(a[6]||0)*60+60*Number(a[7])+Number(a[8])+Number("0.".concat(a[9])))}})),i.text&&t.push(i)})),t},Pa=function(e,t){var i={};return e>t.width/t.height?(i.width=t.width,i.height=1/e*t.width):(i.height=t.height,i.width=e*t.height),i},La=function(){function e(t){var i=this;Ui(this,e),on(this,"load",(function(){i.player.elements.display.seekTooltip&&(i.player.elements.display.seekTooltip.hidden=i.enabled),i.enabled&&i.getThumbnails().then((function(){i.enabled&&(i.render(),i.determineContainerAutoSizing(),i.loaded=!0)}))})),on(this,"getThumbnails",(function(){return new Promise((function(e){var t=i.player.config.previewThumbnails.src;if(er(t))throw new Error("Missing previewThumbnails.src config attribute");var n=function(){i.thumbnails.sort((function(e,t){return e.height-t.height})),i.player.debug.log("Preview thumbnails",i.thumbnails),e()};if(Wn(t))t((function(e){i.thumbnails=e,n()}));else{var r=(Xn(t)?[t]:t).map((function(e){return i.getThumbnail(e)}));Promise.all(r).then(n)}}))})),on(this,"getThumbnail",(function(e){return new Promise((function(t){Jr(e).then((function(n){var r={frames:Ta(n),height:null,urlPrefix:""};r.frames[0].text.startsWith("/")||r.frames[0].text.startsWith("http://")||r.frames[0].text.startsWith("https://")||(r.urlPrefix=e.substring(0,e.lastIndexOf("/")+1));var a=new Image;a.onload=function(){r.height=a.naturalHeight,r.width=a.naturalWidth,i.thumbnails.push(r),t()},a.src=r.urlPrefix+r.frames[0].text}))}))})),on(this,"startMove",(function(e){if(i.loaded&&qn(e)&&["touchmove","mousemove"].includes(e.type)&&i.player.media.duration){if("touchmove"===e.type)i.seekTime=i.player.media.duration*(i.player.elements.inputs.seek.value/100);else{var t=i.player.elements.progress.getBoundingClientRect(),n=100/t.width*(e.pageX-t.left);i.seekTime=i.player.media.duration*(n/100),i.seekTime<0&&(i.seekTime=0),i.seekTime>i.player.media.duration-1&&(i.seekTime=i.player.media.duration-1),i.mousePosX=e.pageX,i.elements.thumb.time.innerText=ta(i.seekTime)}i.showImageAtCurrentTime()}})),on(this,"endMove",(function(){i.toggleThumbContainer(!1,!0)})),on(this,"startScrubbing",(function(e){(Yn(e.button)||!1===e.button||0===e.button)&&(i.mouseDown=!0,i.player.media.duration&&(i.toggleScrubbingContainer(!0),i.toggleThumbContainer(!1,!0),i.showImageAtCurrentTime()))})),on(this,"endScrubbing",(function(){i.mouseDown=!1,Math.ceil(i.lastTime)===Math.ceil(i.player.media.currentTime)?i.toggleScrubbingContainer(!1):Tr.call(i.player,i.player.media,"timeupdate",(function(){i.mouseDown||i.toggleScrubbingContainer(!1)}))})),on(this,"listeners",(function(){i.player.on("play",(function(){i.toggleThumbContainer(!1,!0)})),i.player.on("seeked",(function(){i.toggleThumbContainer(!1)})),i.player.on("timeupdate",(function(){i.lastTime=i.player.media.currentTime}))})),on(this,"render",(function(){i.elements.thumb.container=lr("div",{class:i.player.config.classNames.previewThumbnails.thumbContainer}),i.elements.thumb.imageContainer=lr("div",{class:i.player.config.classNames.previewThumbnails.imageContainer}),i.elements.thumb.container.appendChild(i.elements.thumb.imageContainer);var e=lr("div",{class:i.player.config.classNames.previewThumbnails.timeContainer});i.elements.thumb.time=lr("span",{},"00:00"),e.appendChild(i.elements.thumb.time),i.elements.thumb.container.appendChild(e),Un(i.player.elements.progress)&&i.player.elements.progress.appendChild(i.elements.thumb.container),i.elements.scrubbing.container=lr("div",{class:i.player.config.classNames.previewThumbnails.scrubbingContainer}),i.player.elements.wrapper.appendChild(i.elements.scrubbing.container)})),on(this,"destroy",(function(){i.elements.thumb.container&&i.elements.thumb.container.remove(),i.elements.scrubbing.container&&i.elements.scrubbing.container.remove()})),on(this,"showImageAtCurrentTime",(function(){i.mouseDown?i.setScrubbingContainerSize():i.setThumbContainerSizeAndPos();var e=i.thumbnails[0].frames.findIndex((function(e){return i.seekTime>=e.startTime&&i.seekTime<=e.endTime})),t=e>=0,n=0;i.mouseDown||i.toggleThumbContainer(t),t&&(i.thumbnails.forEach((function(t,r){i.loadedImages.includes(t.frames[e].text)&&(n=r)})),e!==i.showingThumb&&(i.showingThumb=e,i.loadImage(n)))})),on(this,"loadImage",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=i.showingThumb,n=i.thumbnails[e],r=n.urlPrefix,a=n.frames[t],o=n.frames[t].text,s=r+o;if(i.currentImageElement&&i.currentImageElement.dataset.filename===o)i.showImage(i.currentImageElement,a,e,t,o,!1),i.currentImageElement.dataset.index=t,i.removeOldImages(i.currentImageElement);else{i.loadingImage&&i.usingSprites&&(i.loadingImage.onload=null);var l=new Image;l.src=s,l.dataset.index=t,l.dataset.filename=o,i.showingThumbFilename=o,i.player.debug.log("Loading image: ".concat(s)),l.onload=function(){return i.showImage(l,a,e,t,o,!0)},i.loadingImage=l,i.removeOldImages(l)}})),on(this,"showImage",(function(e,t,n,r,a){var o=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];i.player.debug.log("Showing thumb: ".concat(a,". num: ").concat(r,". qual: ").concat(n,". newimg: ").concat(o)),i.setImageSizeAndOffset(e,t),o&&(i.currentImageContainer.appendChild(e),i.currentImageElement=e,i.loadedImages.includes(a)||i.loadedImages.push(a)),i.preloadNearby(r,!0).then(i.preloadNearby(r,!1)).then(i.getHigherQuality(n,e,t,a))})),on(this,"removeOldImages",(function(e){Array.from(i.currentImageContainer.children).forEach((function(t){if("img"===t.tagName.toLowerCase()){var n=i.usingSprites?500:1e3;if(t.dataset.index!==e.dataset.index&&!t.dataset.deleting){t.dataset.deleting=!0;var r=i.currentImageContainer;setTimeout((function(){r.removeChild(t),i.player.debug.log("Removing thumb: ".concat(t.dataset.filename))}),n)}}}))})),on(this,"preloadNearby",(function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return new Promise((function(n){setTimeout((function(){var r=i.thumbnails[0].frames[e].text;if(i.showingThumbFilename===r){var a;a=t?i.thumbnails[0].frames.slice(e):i.thumbnails[0].frames.slice(0,e).reverse();var o=!1;a.forEach((function(e){var t=e.text;if(t!==r&&!i.loadedImages.includes(t)){o=!0,i.player.debug.log("Preloading thumb filename: ".concat(t));var a=i.thumbnails[0].urlPrefix+t,s=new Image;s.src=a,s.onload=function(){i.player.debug.log("Preloaded thumb filename: ".concat(t)),i.loadedImages.includes(t)||i.loadedImages.push(t),n()}}})),o||n()}}),300)}))})),on(this,"getHigherQuality",(function(e,t,n,r){if(e<i.thumbnails.length-1){var a=t.naturalHeight;i.usingSprites&&(a=n.h),a<i.thumbContainerHeight&&setTimeout((function(){i.showingThumbFilename===r&&(i.player.debug.log("Showing higher quality thumb for: ".concat(r)),i.loadImage(e+1))}),300)}})),on(this,"toggleThumbContainer",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=i.player.config.classNames.previewThumbnails.thumbContainerShown;i.elements.thumb.container.classList.toggle(n,e),!e&&t&&(i.showingThumb=null,i.showingThumbFilename=null)})),on(this,"toggleScrubbingContainer",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=i.player.config.classNames.previewThumbnails.scrubbingContainerShown;i.elements.scrubbing.container.classList.toggle(t,e),e||(i.showingThumb=null,i.showingThumbFilename=null)})),on(this,"determineContainerAutoSizing",(function(){(i.elements.thumb.imageContainer.clientHeight>20||i.elements.thumb.imageContainer.clientWidth>20)&&(i.sizeSpecifiedInCSS=!0)})),on(this,"setThumbContainerSizeAndPos",(function(){if(i.sizeSpecifiedInCSS){if(i.elements.thumb.imageContainer.clientHeight>20&&i.elements.thumb.imageContainer.clientWidth<20){var e=Math.floor(i.elements.thumb.imageContainer.clientHeight*i.thumbAspectRatio);i.elements.thumb.imageContainer.style.width="".concat(e,"px")}else if(i.elements.thumb.imageContainer.clientHeight<20&&i.elements.thumb.imageContainer.clientWidth>20){var t=Math.floor(i.elements.thumb.imageContainer.clientWidth/i.thumbAspectRatio);i.elements.thumb.imageContainer.style.height="".concat(t,"px")}}else{var n=Math.floor(i.thumbContainerHeight*i.thumbAspectRatio);i.elements.thumb.imageContainer.style.height="".concat(i.thumbContainerHeight,"px"),i.elements.thumb.imageContainer.style.width="".concat(n,"px")}i.setThumbContainerPos()})),on(this,"setThumbContainerPos",(function(){var e=i.player.elements.progress.getBoundingClientRect(),t=i.player.elements.container.getBoundingClientRect(),n=i.elements.thumb.container,r=t.left-e.left+10,a=t.right-e.left-n.clientWidth-10,o=i.mousePosX-e.left-n.clientWidth/2;o<r&&(o=r),o>a&&(o=a),n.style.left="".concat(o,"px")})),on(this,"setScrubbingContainerSize",(function(){var e=Pa(i.thumbAspectRatio,{width:i.player.media.clientWidth,height:i.player.media.clientHeight}),t=e.width,n=e.height;i.elements.scrubbing.container.style.width="".concat(t,"px"),i.elements.scrubbing.container.style.height="".concat(n,"px")})),on(this,"setImageSizeAndOffset",(function(e,t){if(i.usingSprites){var n=i.thumbContainerHeight/t.h;e.style.height=e.naturalHeight*n+"px",e.style.width=e.naturalWidth*n+"px",e.style.left="-".concat(t.x*n,"px"),e.style.top="-".concat(t.y*n,"px")}})),this.player=t,this.thumbnails=[],this.loaded=!1,this.lastMouseMoveTime=Date.now(),this.mouseDown=!1,this.loadedImages=[],this.elements={thumb:{},scrubbing:{}},this.load()}return Zi(e,[{key:"enabled",get:function(){return this.player.isHTML5&&this.player.isVideo&&this.player.config.previewThumbnails.enabled}},{key:"currentImageContainer",get:function(){return this.mouseDown?this.elements.scrubbing.container:this.elements.thumb.imageContainer}},{key:"usingSprites",get:function(){return Object.keys(this.thumbnails[0].frames[0]).includes("w")}},{key:"thumbAspectRatio",get:function(){return this.usingSprites?this.thumbnails[0].frames[0].w/this.thumbnails[0].frames[0].h:this.thumbnails[0].width/this.thumbnails[0].height}},{key:"thumbContainerHeight",get:function(){return this.mouseDown?Pa(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight}).height:this.sizeSpecifiedInCSS?this.elements.thumb.imageContainer.clientHeight:Math.floor(this.player.media.clientWidth/this.thumbAspectRatio/4)}},{key:"currentImageElement",get:function(){return this.mouseDown?this.currentScrubbingImageElement:this.currentThumbnailImageElement},set:function(e){this.mouseDown?this.currentScrubbingImageElement=e:this.currentThumbnailImageElement=e}}]),e}(),Ea={insertElements:function(e,t){var i=this;Xn(t)?cr(e,this.media,{src:t}):Vn(t)&&t.forEach((function(t){cr(e,i.media,t)}))},change:function(e){var t=this;rr(e,"sources.length")?(jr.cancelRequests.call(this),this.destroy.call(this,(function(){t.options.quality=[],hr(t.media),t.media=null,Un(t.elements.container)&&t.elements.container.removeAttribute("class");var i=e.sources,n=e.type,r=Ki(i,1)[0],a=r.provider,o=void 0===a?ca.html5:a,s=r.src,l="html5"===o?n:"div",c="html5"===o?{}:{src:s};Object.assign(t,{provider:o,type:n,supported:kr.check(n,o,t.config.playsinline),media:lr(l,c)}),t.elements.container.appendChild(t.media),Bn(e.autoplay)&&(t.config.autoplay=e.autoplay),t.isHTML5&&(t.config.crossorigin&&t.media.setAttribute("crossorigin",""),t.config.autoplay&&t.media.setAttribute("autoplay",""),er(e.poster)||(t.poster=e.poster),t.config.loop.active&&t.media.setAttribute("loop",""),t.config.muted&&t.media.setAttribute("muted",""),t.config.playsinline&&t.media.setAttribute("playsinline","")),ma.addStyleHook.call(t),t.isHTML5&&Ea.insertElements.call(t,"source",i),t.config.title=e.title,Aa.setup.call(t),t.isHTML5&&Object.keys(e).includes("tracks")&&Ea.insertElements.call(t,"track",e.tracks),(t.isHTML5||t.isEmbed&&!t.supported.ui)&&ma.build.call(t),t.isHTML5&&t.media.load(),er(e.previewThumbnails)||(Object.assign(t.config.previewThumbnails,e.previewThumbnails),t.previewThumbnails&&t.previewThumbnails.loaded&&(t.previewThumbnails.destroy(),t.previewThumbnails=null),t.config.previewThumbnails.enabled&&(t.previewThumbnails=new La(t))),t.fullscreen.update()}),!0)):this.debug.warn("Invalid source format")}};var Ma,Oa,Ia,Da,za,Na,Ra=function(){function e(t,i){var n=this;if(Ui(this,e),on(this,"play",(function(){return Wn(n.media.play)?(n.ads&&n.ads.enabled&&n.ads.managerPromise.then((function(){return n.ads.play()})).catch((function(){return Mr(n.media.play())})),n.media.play()):null})),on(this,"pause",(function(){return n.playing&&Wn(n.media.pause)?n.media.pause():null})),on(this,"togglePlay",(function(e){return(Bn(e)?e:!n.playing)?n.play():n.pause()})),on(this,"stop",(function(){n.isHTML5?(n.pause(),n.restart()):Wn(n.media.stop)&&n.media.stop()})),on(this,"restart",(function(){n.currentTime=0})),on(this,"rewind",(function(e){n.currentTime-=$n(e)?e:n.config.seekTime})),on(this,"forward",(function(e){n.currentTime+=$n(e)?e:n.config.seekTime})),on(this,"increaseVolume",(function(e){var t=n.media.muted?0:n.volume;n.volume=t+($n(e)?e:0)})),on(this,"decreaseVolume",(function(e){n.increaseVolume(-e)})),on(this,"airplay",(function(){kr.airplay&&n.media.webkitShowPlaybackTargetPicker()})),on(this,"toggleControls",(function(e){if(n.supported.ui&&!n.isAudio){var t=mr(n.elements.container,n.config.classNames.hideControls),i=void 0===e?void 0:!e,r=gr(n.elements.container,n.config.classNames.hideControls,i);if(r&&Vn(n.config.controls)&&n.config.controls.includes("settings")&&!er(n.config.settings)&&ia.toggleMenu.call(n,!1),r!==t){var a=r?"controlshidden":"controlsshown";Pr.call(n,n.media,a)}return!r}return!1})),on(this,"on",(function(e,t){Ar.call(n,n.elements.container,e,t)})),on(this,"once",(function(e,t){Tr.call(n,n.elements.container,e,t)})),on(this,"off",(function(e,t){Cr(n.elements.container,e,t)})),on(this,"destroy",(function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(n.ready){var i=function(){document.body.style.overflow="",n.embed=null,t?(Object.keys(n.elements).length&&(hr(n.elements.buttons.play),hr(n.elements.captions),hr(n.elements.controls),hr(n.elements.wrapper),n.elements.buttons.play=null,n.elements.captions=null,n.elements.controls=null,n.elements.wrapper=null),Wn(e)&&e()):(Lr.call(n),jr.cancelRequests.call(n),ur(n.elements.original,n.elements.container),Pr.call(n,n.elements.original,"destroyed",!0),Wn(e)&&e.call(n.elements.original),n.ready=!1,setTimeout((function(){n.elements=null,n.media=null}),200))};n.stop(),clearTimeout(n.timers.loading),clearTimeout(n.timers.controls),clearTimeout(n.timers.resized),n.isHTML5?(ma.toggleNativeControls.call(n,!0),i()):n.isYouTube?(clearInterval(n.timers.buffering),clearInterval(n.timers.playing),null!==n.embed&&Wn(n.embed.destroy)&&n.embed.destroy(),i()):n.isVimeo&&(null!==n.embed&&n.embed.unload().then(i),setTimeout(i,200))}})),on(this,"supports",(function(e){return kr.mime.call(n,e)})),this.timers={},this.ready=!1,this.loading=!1,this.failed=!1,this.touch=kr.touch,this.media=t,Xn(this.media)&&(this.media=document.querySelectorAll(this.media)),(window.jQuery&&this.media instanceof jQuery||Gn(this.media)||Vn(this.media))&&(this.media=this.media[0]),this.config=ar({},oa,e.defaults,i||{},function(){try{return JSON.parse(n.media.getAttribute("data-plyr-config"))}catch(e){return{}}}()),this.elements={container:null,fullscreen:null,captions:null,buttons:{},display:{},progress:{},inputs:{},settings:{popup:null,menu:null,panels:{},buttons:{}}},this.captions={active:null,currentTrack:-1,meta:new WeakMap},this.fullscreen={active:!1},this.options={speed:[],quality:[]},this.debug=new pa(this.config.debug),this.debug.log("Config",this.config),this.debug.log("Support",kr),!Yn(this.media)&&Un(this.media))if(this.media.plyr)this.debug.warn("Target already setup");else if(this.config.enabled)if(kr.check().api){var r=this.media.cloneNode(!0);r.autoplay=!1,this.elements.original=r;var a=this.media.tagName.toLowerCase(),o=null,s=null;switch(a){case"div":if(o=this.media.querySelector("iframe"),Un(o)){if(s=na(o.getAttribute("src")),this.provider=function(e){return/^(https?:\/\/)?(www\.)?(youtube\.com|youtube-nocookie\.com|youtu\.?be)\/.+$/.test(e)?ca.youtube:/^https?:\/\/player.vimeo.com\/video\/\d{0,9}(?=\b|\/)/.test(e)?ca.vimeo:null}(s.toString()),this.elements.container=this.media,this.media=o,this.elements.container.className="",s.search.length){var l=["1","true"];l.includes(s.searchParams.get("autoplay"))&&(this.config.autoplay=!0),l.includes(s.searchParams.get("loop"))&&(this.config.loop.active=!0),this.isYouTube?(this.config.playsinline=l.includes(s.searchParams.get("playsinline")),this.config.youtube.hl=s.searchParams.get("hl")):this.config.playsinline=!0}}else this.provider=this.media.getAttribute(this.config.attributes.embed.provider),this.media.removeAttribute(this.config.attributes.embed.provider);if(er(this.provider)||!Object.values(ca).includes(this.provider))return void this.debug.error("Setup failed: Invalid provider");this.type=da;break;case"video":case"audio":this.type=a,this.provider=ca.html5,this.media.hasAttribute("crossorigin")&&(this.config.crossorigin=!0),this.media.hasAttribute("autoplay")&&(this.config.autoplay=!0),(this.media.hasAttribute("playsinline")||this.media.hasAttribute("webkit-playsinline"))&&(this.config.playsinline=!0),this.media.hasAttribute("muted")&&(this.config.muted=!0),this.media.hasAttribute("loop")&&(this.config.loop.active=!0);break;default:return void this.debug.error("Setup failed: unsupported type")}this.supported=kr.check(this.type,this.provider,this.config.playsinline),this.supported.api?(this.eventListeners=[],this.listeners=new va(this),this.storage=new Zr(this),this.media.plyr=this,Un(this.elements.container)||(this.elements.container=lr("div",{tabindex:0}),or(this.media,this.elements.container)),ma.migrateStyles.call(this),ma.addStyleHook.call(this),Aa.setup.call(this),this.config.debug&&Ar.call(this,this.elements.container,this.config.events.join(" "),(function(e){n.debug.log("event: ".concat(e.type))})),this.fullscreen=new fa(this),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&ma.build.call(this),this.listeners.container(),this.listeners.global(),this.config.ads.enabled&&(this.ads=new Ca(this)),this.isHTML5&&this.config.autoplay&&this.once("canplay",(function(){return Mr(n.play())})),this.lastSeekTime=0,this.config.previewThumbnails.enabled&&(this.previewThumbnails=new La(this))):this.debug.error("Setup failed: no support")}else this.debug.error("Setup failed: no support");else this.debug.error("Setup failed: disabled by config");else this.debug.error("Setup failed: no suitable element passed")}return Zi(e,[{key:"isHTML5",get:function(){return this.provider===ca.html5}},{key:"isEmbed",get:function(){return this.isYouTube||this.isVimeo}},{key:"isYouTube",get:function(){return this.provider===ca.youtube}},{key:"isVimeo",get:function(){return this.provider===ca.vimeo}},{key:"isVideo",get:function(){return this.type===da}},{key:"isAudio",get:function(){return this.type===ha}},{key:"playing",get:function(){return Boolean(this.ready&&!this.paused&&!this.ended)}},{key:"paused",get:function(){return Boolean(this.media.paused)}},{key:"stopped",get:function(){return Boolean(this.paused&&0===this.currentTime)}},{key:"ended",get:function(){return Boolean(this.media.ended)}},{key:"currentTime",get:function(){return Number(this.media.currentTime)},set:function(e){if(this.duration){var t=$n(e)&&e>0;this.media.currentTime=t?Math.min(e,this.duration):0,this.debug.log("Seeking to ".concat(this.currentTime," seconds"))}}},{key:"buffered",get:function(){var e=this.media.buffered;return $n(e)?e:e&&e.length&&this.duration>0?e.end(0)/this.duration:0}},{key:"seeking",get:function(){return Boolean(this.media.seeking)}},{key:"duration",get:function(){var e=parseFloat(this.config.duration),t=(this.media||{}).duration,i=$n(t)&&t!==1/0?t:0;return e||i}},{key:"volume",get:function(){return Number(this.media.volume)},set:function(e){var t=e;Xn(t)&&(t=Number(t)),$n(t)||(t=this.storage.get("volume")),$n(t)||(t=this.config.volume),t>1&&(t=1),t<0&&(t=0),this.config.volume=t,this.media.volume=t,!er(e)&&this.muted&&t>0&&(this.muted=!1)}},{key:"muted",get:function(){return Boolean(this.media.muted)},set:function(e){var t=e;Bn(t)||(t=this.storage.get("muted")),Bn(t)||(t=this.config.muted),this.config.muted=t,this.media.muted=t}},{key:"hasAudio",get:function(){return!this.isHTML5||!!this.isAudio||Boolean(this.media.mozHasAudio)||Boolean(this.media.webkitAudioDecodedByteCount)||Boolean(this.media.audioTracks&&this.media.audioTracks.length)}},{key:"speed",get:function(){return Number(this.media.playbackRate)},set:function(e){var t=this,i=null;$n(e)&&(i=e),$n(i)||(i=this.storage.get("speed")),$n(i)||(i=this.config.speed.selected);var n=this.minimumSpeed,r=this.maximumSpeed;i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:255;return Math.min(Math.max(e,t),i)}(i,n,r),this.config.speed.selected=i,setTimeout((function(){t.media.playbackRate=i}),0)}},{key:"minimumSpeed",get:function(){return this.isYouTube?Math.min.apply(Math,en(this.options.speed)):this.isVimeo?.5:.0625}},{key:"maximumSpeed",get:function(){return this.isYouTube?Math.max.apply(Math,en(this.options.speed)):this.isVimeo?2:16}},{key:"quality",get:function(){return this.media.quality},set:function(e){var t=this.config.quality,i=this.options.quality;if(i.length){var n=[!er(e)&&Number(e),this.storage.get("quality"),t.selected,t.default].find($n),r=!0;if(!i.includes(n)){var a=Ir(i,n);this.debug.warn("Unsupported quality option: ".concat(n,", using ").concat(a," instead")),n=a,r=!1}t.selected=n,this.media.quality=n,r&&this.storage.set({quality:n})}}},{key:"loop",get:function(){return Boolean(this.media.loop)},set:function(e){var t=Bn(e)?e:this.config.loop.active;this.config.loop.active=t,this.media.loop=t}},{key:"source",get:function(){return this.media.currentSrc},set:function(e){Ea.change.call(this,e)}},{key:"download",get:function(){var e=this.config.urls.download;return Kn(e)?e:this.source},set:function(e){Kn(e)&&(this.config.urls.download=e,ia.setDownloadUrl.call(this))}},{key:"poster",get:function(){return this.isVideo?this.media.getAttribute("poster")||this.media.getAttribute("data-poster"):null},set:function(e){this.isVideo?ma.setPoster.call(this,e,!1).catch((function(){})):this.debug.warn("Poster can only be set for video")}},{key:"ratio",get:function(){if(!this.isVideo)return null;var e=Rr(Fr.call(this));return Vn(e)?e.join(":"):e},set:function(e){this.isVideo?Xn(e)&&Nr(e)?(this.config.ratio=Rr(e),Hr.call(this)):this.debug.error("Invalid aspect ratio specified (".concat(e,")")):this.debug.warn("Aspect ratio can only be set for video")}},{key:"autoplay",get:function(){return Boolean(this.config.autoplay)},set:function(e){var t=Bn(e)?e:this.config.autoplay;this.config.autoplay=t}},{key:"toggleCaptions",value:function(e){aa.toggle.call(this,e,!1)}},{key:"currentTrack",get:function(){var e=this.captions,t=e.toggled,i=e.currentTrack;return t?i:-1},set:function(e){aa.set.call(this,e,!1)}},{key:"language",get:function(){return(aa.getCurrentTrack.call(this)||{}).language},set:function(e){aa.setLanguage.call(this,e,!1)}},{key:"pip",get:function(){return kr.pip?er(this.media.webkitPresentationMode)?this.media===document.pictureInPictureElement:this.media.webkitPresentationMode===sa:null},set:function(e){if(kr.pip){var t=Bn(e)?e:!this.pip;Wn(this.media.webkitSetPresentationMode)&&this.media.webkitSetPresentationMode(t?sa:la),Wn(this.media.requestPictureInPicture)&&(!this.pip&&t?this.media.requestPictureInPicture():this.pip&&!t&&document.exitPictureInPicture())}}}],[{key:"supported",value:function(e,t,i){return kr.check(e,t,i)}},{key:"loadSprite",value:function(e,t){return Qr(e,t)}},{key:"setup",value:function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null;return Xn(t)?n=Array.from(document.querySelectorAll(t)):Gn(t)?n=Array.from(t):Vn(t)&&(n=t.filter(Un)),er(n)?null:n.map((function(t){return new e(t,i)}))}}]),e}();function Fa(e){e.on("timeupdate",(function(){return function(e){var t,i;if(null!=e&&null!==(t=e.config)&&void 0!==t&&null!==(i=t.mutedPreview)&&void 0!==i&&i.enabled)return;!function(e){var t;if(0===e.currentTime)return;if(null==e||null===(t=e.config)||void 0===t||!t.save_player_position)return;localStorage.setItem("player-progress-".concat(Ha(e)),e.currentTime)}(e)}(e)})),e.on("ready",(function(){return Ya(e)})),e.on("loadeddata",(function(){return Ya(e)}))}function Ha(e){var t,i;return null==e||null===(t=e.config)||void 0===t||null===(i=t.blockAttributes)||void 0===i?void 0:i.id}function Ya(e){var t,i,n;if(null!=e&&null!==(t=e.config)&&void 0!==t&&t.save_player_position&&(null==e||null===(i=e.config)||void 0===i||null===(n=i.mutedPreview)||void 0===n||!n.enabled)){var r=function(e){return parseFloat(localStorage.getItem("player-progress-".concat(Ha(e))))}(e);return e.hls&&r>=0&&e.hls.startLoad(r),e.duration&&(r=Math.min(r,e.duration)),!r||r<1?0:(e.currentTime=r,null!=e&&e.isVimeo&&setTimeout((function(){e.embed.setCurrentTime(r||0)}),0),r)}}Ra.defaults=function(e){return JSON.parse(JSON.stringify(e))}(oa);var ja,$a,Xa,Ba,Wa=(null===(Ma=window)||void 0===Ma||null===(Oa=Ma.prestoPlayer)||void 0===Oa||null===(Ia=Oa.i18n)||void 0===Ia?void 0:Ia.hide_chapters)||"Hide Chapters",Va=(null===(Da=window)||void 0===Da||null===(za=Da.prestoPlayer)||void 0===za||null===(Na=za.i18n)||void 0===Na?void 0:Na.show_chapters)||"Show Chapters",Ga='<button class="plyr__controls__item plyr__control" type="button" data-plyr="chapters">\n<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="feather feather-list">\n <line x1="8" y1="6" x2="21" y2="6"></line><line x1="8" y1="12" x2="21" y2="12"></line>\n <line x1="8" y1="18" x2="21" y2="18"></line><line x1="3" y1="6" x2="3.01" y2="6"></line>\n <line x1="3" y1="12" x2="3.01" y2="12"></line><line x1="3" y1="18" x2="3.01" y2="18"></line>\n</svg>\n<span class="label--pressed plyr__tooltip" role="tooltip">'.concat(Wa,'</span>\n<span class="label--not-pressed plyr__tooltip" role="tooltip">').concat(Va,"</span>\n</button>\n"),Ua='\n<div class="presto-player-toc__wrapper">\n <div class="presto-player-toc__cover" data-player-toc-cover></div>\n <div class="presto-player-toc">\n <div class="presto-player-toc__title">'.concat((null===(ja=window)||void 0===ja||null===($a=ja.prestoPlayer)||void 0===$a||null===(Xa=$a.i18n)||void 0===Xa?void 0:Xa.chapters)||"Chapters",'</div>\n <div class="presto-player-toc__list" data-player-toc></div>\n </div>\n</div>');function qa(e){var t,i,n,r,a,o,s,l,c,h,d,u,p,f=0,g={},m=null,v=0;if(r=e.detail.plyr,n=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(!e.length)return e;var t={};return e.forEach((function(e){var i,n=e.time.split(":");n.length>1&&(i=60*parseInt(n[0])),t[parseInt(n[1])+parseInt(i)]=e})),t}((null===(t=r)||void 0===t||null===(i=t.config)||void 0===i?void 0:i.chapters)||[]),"html5"!==r.provider||r.duration){if(n&&Object.keys(n).length){a=jQuery(r.elements.container).closest(".presto-player__wrapper").find(".plyr");var y=(p=jQuery(r.elements.controls)).find(".plyr__time");y=y.length?y:p.find(".plyr__progress__container"),(c=a.find('[data-plyr="chapters"]')).length||(c=jQuery(Ga).insertAfter(y)),(s=a.find(".presto-player-toc__wrapper")).length||(s=jQuery(Ua).appendTo(a)),h=s.find("[data-player-toc-cover]"),l=s.find("[data-player-toc]"),o=a.find(".plyr__progress__container");var b,x=jQuery('<div class="presto-player__chapters"></div>').appendTo(o);d=jQuery('<div class="presto-player__chapter-markers"></div>').appendTo(x),b=0,l.find(".presto-player-toc__chapter").length||(Object.keys(n).forEach((function(e){b++;var t=n[e],i=jQuery(function(e){var t=e.name,i=void 0===t?"Untitled":t,n=e.order,r=void 0===n?1:n,a=e.highlight;return'<div class="presto-player-toc__chapter '.concat(void 0!==a&&a?"is-highlighted":"",'" data-chapter-item>\n \n <span class="presto-player-toc__order">\n ').concat(r,'\n </span>\n <span class="presto-player-toc__name">\n ').concat(i,"\n </div>\n</div>")}({name:t.title,order:b})).appendTo(l);i.data("presto-player-timestamp",e),g[e]=i,i.on("click",(function(){r.currentTime=parseFloat(e),r.play(),A(!1)}))})),u=s.find("[data-chapter-item]")),S(),c.off("click"),c.on("click",A),_(),r.off("timeupdate"),r.on("timeupdate",_),m=window.setInterval(k,100),h.off("click"),h.on("click",(function(){return A(!1)})),l.off("mouseleave"),l.on("mouseleave",w)}}else r.on("loadedmetadata",qa);function w(){if(r.playing){var e=setTimeout((function(){A(!1),l.off("mouseleave",w)}),2e3);l.on("mouseenter",(function(){clearTimeout(e)}))}}function k(){v++,r.duration&&(S(),window.clearInterval(m)),v>50&&window.clearInterval(m)}function _(){f=r.currentTime;var e=Object.keys(n).filter((function(e){return e<=f})).map((function(e){return parseInt(e,10)})),t=Math.max.apply(Math,en(e));u&&u.removeClass("is-highlighted"),jQuery(g[t||0]).addClass("is-highlighted")}function S(){r.duration&&(Object.keys(n).forEach((function(e){if(parseInt(e)&&!d.find("[data-timestamp=".concat(e,"]")).length){var t=n[e],i=parseInt(e)/r.duration*100,a=jQuery(function(e){var t=e.position,i=void 0===t?0:t,n=e.name,r=void 0===n?"":n;return'<div class="presto-player-progress__marker plyr__controls__item plyr__control" style="left: '.concat(i,'%" data-timeline-marker>\n <span class="label--not-pressed plyr__tooltip" role="tooltip">').concat(r,"</span>\n </div>")}({position:i,name:"".concat(t.title)})).prependTo(d);a.attr("data-timestamp",e),a.data("timestamp",e),a.on("click",(function(t){r.currentTime=parseInt(e),r.play()}))}})),s.find("[data-timeline-marker]"))}function A(e){void 0!==Vi(e)?s.toggleClass("is-showing",e):s.toggleClass("is-showing")}}function Za(e){Ba=e,jQuery(Ba.elements.container).closest(".presto-player__wrapper"),Ba.on("ready",qa),Ba.on("controlshidden",Ja),Ba.on("controlsshown",Qa)}function Ja(e){var t,i,n;jQuery(null==e||null===(t=e.detail)||void 0===t||null===(i=t.plyr)||void 0===i||null===(n=i.elements)||void 0===n?void 0:n.container).closest(".presto-player__wrapper").addClass("presto-player--hide-controls")}function Qa(e){var t,i,n;jQuery(null==e||null===(t=e.detail)||void 0===t||null===(i=t.plyr)||void 0===i||null===(n=i.elements)||void 0===n?void 0:n.container).closest(".presto-player__wrapper").removeClass("presto-player--hide-controls")}function Ka(e){var t,i;return Wi(Wi(Wi({video_current_time:parseInt((null==e?void 0:e.currentTime)||0),video_provider:(null==e?void 0:e.provider)||"html5"},null!=e&&e.duration?{video_duration:parseInt(null==e?void 0:e.duration)}:{}),null!=e&&e.source?{video_url:null==e?void 0:e.source}:{}),null!=e&&null!==(t=e.config)&&void 0!==t&&t.title?{video_title:null==e||null===(i=e.config)||void 0===i?void 0:i.title}:{})}function eo(e){var t;null===(t=window)||void 0===t||t.gtag("event","Play",Ka(e))}function to(e){var t;null===(t=window)||void 0===t||t.gtag("event","Pause",Ka(e))}function io(e){var t;null===(t=window)||void 0===t||t.gtag("event","Player Load",Ka(e))}var no,ro={25:!1,50:!1,75:!1,100:!1};function ao(e){if(e.currentTime){var t=parseFloat(e.currentTime)/parseFloat(e.duration)*100;Object.keys(ro).forEach((function(i){var n;!ro[i]&&t>=parseInt(i)&&(ro[i]=!0,null===(n=window)||void 0===n||n.gtag("event","".concat(i," Percent Played"),Ka(e)))}))}}var oo="presto-player.analytics",so="";function lo(e){!function(e){var t,i,n,r,a,o,s,l;if(!so)return;var c=new FormData;if(c.append("action","presto_player_progress"),c.append("duration",null==e?void 0:e.video_current_time),c.append("video_id",null===(t=no)||void 0===t||null===(i=t.config)||void 0===i?void 0:i.id),c.append("nonce",so),!(null!==(n=window)&&void 0!==n&&null!==(r=n.prestoPlayer)&&void 0!==r&&r.debug_navigator)){var h,d;return void navigator.sendBeacon(null===(h=window)||void 0===h||null===(d=h.prestoPlayer)||void 0===d?void 0:d.ajaxurl,c)}jQuery.ajax({type:"POST",url:null===(a=window)||void 0===a||null===(o=a.prestoPlayer)||void 0===o?void 0:o.ajaxurl,dataType:"json",cache:!1,data:{action:"presto_player_progress",duration:null==e?void 0:e.video_current_time,video_id:null===(s=no)||void 0===s||null===(l=s.config)||void 0===l?void 0:l.id,nonce:so}})}(function(e){var t,i;return Wi(Wi(Wi({video_current_time:parseInt((null==e?void 0:e.currentTime)||0),video_provider:(null==e?void 0:e.provider)||"html5"},null!=e&&e.duration?{video_duration:parseInt(null==e?void 0:e.duration)}:{}),null!=e&&e.source?{video_url:null==e?void 0:e.source}:{}),null!=e&&null!==(t=e.config)&&void 0!==t&&t.title?{video_title:null==e||null===(i=e.config)||void 0===i?void 0:i.title}:{})}(e))}function co(e){var t,i;null!==(t=window)&&void 0!==t&&null!==(i=t.prestoPlayer)&&void 0!==i&&i.isPremium&&(!function(){var e;null!==(e=window)&&void 0!==e&&e.gtag&&(wp.hooks.addAction("presto.playerPlay","presto-player",eo),wp.hooks.addAction("presto.playerPause","presto-player",to),wp.hooks.addAction("presto.playerReady","presto-player",io),wp.hooks.addAction("presto.playerTimeUpdate","presto-player",ao))}(),(no=e).config.analytics&&(wp.hooks.hasAction("presto.nonceRefreshed",oo)||wp.hooks.addAction("presto.nonceRefreshed",oo,(function(e){so=e})),wp.hooks.hasAction("presto.playerPlay",oo)||wp.hooks.addAction("presto.playerPlay",oo,lo),wp.hooks.hasAction("presto.playerEnded",oo)||wp.hooks.addAction("presto.playerEnded",oo,lo),wp.hooks.hasAction("presto.playerHidden",oo)||wp.hooks.addAction("presto.playerHidden",oo,lo),wp.hooks.hasAction("presto.playerPause",oo)||wp.hooks.addAction("presto.playerPause",oo,lo),wp.hooks.hasAction("presto.playerSeeked",oo)||wp.hooks.addAction("presto.playerSeeked",oo,lo)))}var ho=function(e){e.on("ready",(function(){var t,i,n,r;null==e||null===(t=e.config)||void 0===t||!t.logo||null!=e&&null!==(i=e.config)&&void 0!==i&&i.logo_added||(jQuery('<img src="'.concat(null==e||null===(n=e.config)||void 0===n?void 0:n.logo,'" class="presto-player__logo is-bottom-right" part="logo">')).insertBefore(null==e||null===(r=e.elements)||void 0===r?void 0:r.controls),e.config.logo_added=!0)}))};function uo(e){var t;null!=e&&null!==(t=e.config)&&void 0!==t&&t.poster&&(e.poster=e.config.poster)}var po=function(e){e.on("ready",(function(){fo("Ready",e)})),e.on("play",(function(){fo("Play",e)})),e.on("playing",(function(){fo("Playing",e)})),e.on("pause",(function(){fo("Pause",e)})),e.on("ended",(function(){fo("Ended",e)})),e.on("seeked",(function(){fo("Seeked",e)})),e.on("timeupdate",(function(){fo("TimeUpdate",e)})),e.on("enterfullscreen",(function(){fo("EnterFullScreen",e)})),e.on("exitfullscreen",(function(){fo("ExitFullScreen",e)})),document.addEventListener("visibilitychange",(function(){fo("hidden"===document.visibilityState?"Hidden":"Visible",e)})),e.on("statechange",(function(t){var i;switch(null==t||null===(i=t.detail)||void 0===i?void 0:i.code){case 0:fo("Ended",e);break;case 1:fo("Play",e);break;case 2:fo("Pause",e)}}))};function fo(e,t){window.wp.hooks.doAction("presto.player".concat(e),t)}var go,mo=Date.now(),vo=function(e){var t,i;if(e.automations){(null===(i=null===(t=null===window||void 0===window?void 0:window.wp)||void 0===t?void 0:t.hooks)||void 0===i?void 0:i.hasAction("presto.nonceRefreshed","presto-player.progress"))||window.wp.hooks.addAction("presto.nonceRefreshed","presto-player.progress",(function(e){go=e})),null===window||void 0===window||window.wp.hooks.addAction("presto.playerTimeUpdate","presto-player",r),null===window||void 0===window||window.wp.hooks.addAction("presto.playerEnded","presto-player",(function(e){return r(e,100)}));var n={0:!1,10:!1,20:!1,30:!1,40:!1,50:!1,60:!1,70:!1,80:!1,90:!1,100:!1}}function r(e){var t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;go&&(null===(t=null==e?void 0:e.config)||void 0===t?void 0:t.ajaxProgress)&&(i||(i=parseFloat(e.currentTime)/parseFloat(e.duration)*100),e.watched=e.watched||{},Object.keys(n).forEach((function(t){var n,r,a,o,s,l,c,h,d,u=parseInt(t);if(!e.watched[u]&&i>=u){e.watched[u]=!0;var p=new FormData;if(p.append("action","presto_player_progress_percent"),p.append("id",null===(n=null==e?void 0:e.config)||void 0===n?void 0:n.id),p.append("percent",u.toString()),p.append("visit_time",mo.toString()),p.append("nonce",go),(null===(r=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===r?void 0:r.debug)&&console.log("".concat(u," percent watched.")),null===(a=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===a?void 0:a.debug_navigator)window.jQuery.ajax({type:"POST",url:null===(h=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===h?void 0:h.ajaxurl,dataType:"json",cache:!1,data:{action:"presto_player_progress_percent",id:null===(d=null==e?void 0:e.config)||void 0===d?void 0:d.id,visit_time:mo,percent:u,nonce:go}});else{var f=navigator.sendBeacon(null===(o=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===o?void 0:o.ajaxurl,p);(null===(s=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===s?void 0:s.debug)&&(f?console.log("Successfully queued progress:",{id:null===(l=null==e?void 0:e.config)||void 0===l?void 0:l.id,percent:u,visit_time:mo,nonce:go}):console.log("Failed to queue progress",{id:null===(c=null==e?void 0:e.config)||void 0===c?void 0:c.id,percent:u,visit_time:mo,nonce:go}))}}})))}},yo=!1,bo=!1;function xo(e){return e.status>=200&&e.status<300?Promise.resolve(e):Promise.reject(new Error(e.statusText))}var wo=function(e){var t,i;(e.config.analytics||e.config.automations)&&(null===(i=null===(t=null===window||void 0===window?void 0:window.wp)||void 0===t?void 0:t.hooks)||void 0===i||i.addAction("presto.playerPlaying","presto-player",(function(){null===window||void 0===window||window.wp.hooks.doAction("presto.playerGetNonce")})),null===window||void 0===window||window.wp.hooks.addAction("presto.playerGetNonce","presto-player",(function(){var e;yo||bo||(bo=!0,fetch("".concat(null===(e=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===e?void 0:e.ajaxurl,"?action=presto_refresh_progress_nonce")).then(xo).then((function(e){return e.json()})).then((function(e){var t=e.data;null===window||void 0===window||window.wp.hooks.doAction("presto.nonceRefreshed",t),yo=!0})).catch((function(e){console.log("Request failed",e)})).finally((function(){bo=!1})))})))},ko=function(e){var t=window.navigator.userAgent;if(!!t.match(/iPad/i)||!!t.match(/iPhone/i)){var i=function(e,t){for(var i,n,r,a=null==e||null===(i=e.elements)||void 0===i||null===(n=i.container)||void 0===n||null===(r=n.getRootNode())||void 0===r?void 0:r.host;(null!=a?a.nodeType:void 0)===Node.ELEMENT_NODE&&"BODY"!==a.tagName&&"HTML"!==a.tagName;)t?a.classList.add("presto-player-fullscreen-open"):a.classList.remove("presto-player-fullscreen-open"),a=a.parentNode};wp.hooks.addAction("presto.playerEnterFullScreen","presto-player",(function(){var t;null!=e&&null!==(t=e.fullscreen)&&void 0!==t&&t.active&&i(e,!0)})),wp.hooks.addAction("presto.playerExitFullScreen","presto-player",(function(){var t;null!=e&&null!==(t=e.fullscreen)&&void 0!==t&&t.active||i(e,!1)}))}},_o=function(){var e,t=(e=w.a.mark((function e(t){var n,r,a,o;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("ResizeObserver"in window!=0){e.next=5;break}return e.next=3,i.e(0).then(i.bind(null,48));case 3:a=e.sent,window.ResizeObserver=a.ResizeObserver;case 5:if(o=new ResizeObserver((function(e){var t,i=rn(e);try{for(i.s();!(t=i.n()).done;){var n=t.value,r=n.contentRect;jQuery(n.target).find(".plyr__menu__container").css({maxHeight:"".concat(r.height-48,"px")})}}catch(e){i.e(e)}finally{i.f()}})),null!=t&&null!==(n=t.elements)&&void 0!==n&&n.container){e.next=8;break}return e.abrupt("return");case 8:o.observe(null==t||null===(r=t.elements)||void 0===r?void 0:r.container),t.on("playing",(function(){var e,i,n=null==t||null===(e=t.elements)||void 0===e?void 0:e.container.getBoundingClientRect();jQuery(null==t||null===(i=t.elements)||void 0===i?void 0:i.container).find(".plyr__menu__container").css({maxHeight:"".concat(n.height-48,"px")})}));case 10:case"end":return e.stop()}}),e)})),function(){var t=this,i=arguments;return new Promise((function(n,r){var a=e.apply(t,i);function o(e){Gi(a,n,r,o,s,"next",e)}function s(e){Gi(a,n,r,o,s,"throw",e)}o(void 0)}))});return function(e){return t.apply(this,arguments)}}();function So(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=Wi(Wi(Wi({},r),{iconUrl:"".concat(null===(t=window)||void 0===t||null===(n=t.prestoPlayer)||void 0===n?void 0:n.plugin_url,"img/sprite.svg")}),{chapters:(null==r?void 0:r.chapters)||[],controls:(null==r?void 0:r.controls)||[],settings:Object.keys((null==r?void 0:r.settings)||{}).length?r.settings:{}}),o=new Ra(e,a);return"undefined"!=typeof learndash_video_data&&i.e(5).then(i.bind(null,49)).then((function(e){(0,e.default)(o)})),"undefined"!=typeof _tutorobject&&i.e(6).then(i.bind(null,50)).then((function(e){(0,e.default)(o)})),po(o),ko(o),_o(o),ho(o),uo(o),Za(o),prestoPlayer.isAdmin||(wo(o),vo(a),Fa(o),co(o)),o}function Ao(e){return"string"==typeof e&&e.includes(".m3u8")}var Co=function(e){var t=e.config,n=e.selector,r=e.src,a=e.preload;return r&&Ao(r)?i.e(4).then(i.bind(null,51)).then((function(e){return(0,e.default)({config:t,selector:n,src:r,preload:a})})):new Promise((function(e){return e(new So(n,Wi({},t)))}))},To=function(e,t){if(t){var i=document.createElement("style");e.shadowRoot.append(i),i.appendChild(document.createTextNode(t))}};var Po=function(e){Object(c.a)(k,e);var t,a,h,d,u,p,f,g,m,v,y,b,x=Li(k);function k(){var e;return Object(o.a)(this,k),(e=x.call(this)).__registerHost(),si(Object(l.a)(e)),e.loaded=Rt(Object(l.a)(e),"loaded",7),e.previouslyPlaying=!1,e}return Object(s.a)(k,[{key:"play",value:(b=Object(r.a)(w.a.mark((function e(){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.shouldLazyLoad=!1,e.abrupt("return",this.player.play());case 2:case"end":return e.stop()}}),e,this)}))),function(){return b.apply(this,arguments)})},{key:"restart",value:(y=Object(r.a)(w.a.mark((function e(){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.shouldLazyLoad=!1,e.abrupt("return",this.player.restart());case 2:case"end":return e.stop()}}),e,this)}))),function(){return y.apply(this,arguments)})},{key:"pause",value:(v=Object(r.a)(w.a.mark((function e(){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.player.pause());case 1:case"end":return e.stop()}}),e,this)}))),function(){return v.apply(this,arguments)})},{key:"stop",value:(m=Object(r.a)(w.a.mark((function e(){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.player.stop());case 1:case"end":return e.stop()}}),e,this)}))),function(){return m.apply(this,arguments)})},{key:"fullscreenToggle",value:(g=Object(r.a)(w.a.mark((function e(t){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.player.fullscreen.toggle(t));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return g.apply(this,arguments)})},{key:"on",value:(f=Object(r.a)(w.a.mark((function e(t,i){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.player.on(t,i));case 1:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"off",value:(p=Object(r.a)(w.a.mark((function e(t,i){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.player.off(t,i));case 1:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"handleCurrentTimeChange",value:function(){this.currentTime&&this.currentTime!==this.player.currentTime&&(this.player.currentTime=this.currentTime)}},{key:"handleStickyChange",value:function(){var e=this;(function(e){for(var t=[];e.parentNode&&"body"!=e.parentNode.nodeName.toLowerCase();)e=e.parentNode,t.push(e);return t})(this.el).forEach((function(t){t.classList.toggle("presto-sticky-parent",e.isSticky)}))}},{key:"getConfig",value:function(){return Object.assign(Object.assign({},function(e){var t,i,r,a,o=e.preset,s=void 0===o?{}:o,l=e.chapters,c=e.branding,h=e.src,d=e.analytics,u=e.automations,p=e.autoplay,f=e.blockAttributes,g=void 0===f?{}:f,m=e.provider,v=void 0===m?"":m,y=e.provider_video_id,b=void 0===y?"":y,x=e.youtube,w=e.type,k=e.isAdmin,_=e.i18n,S=e.storage,A=void 0===S?{enabled:!k,key:"presto-player-".concat(s.id)}:S,C=["settings"],T=Object(n.a)(["youtube","vimeo"].includes(v)?["pip"]:[]),P=["play-large","rewind","play","fast-forward","progress","current-time","mute","volume","captions","settings","pip","fullscreen"].filter((function(e){return((null==s?void 0:s[e])||C.includes(e))&&!T.includes(e)}));(null===(t=null==g?void 0:g.mutedPreview)||void 0===t?void 0:t.enabled)&&(A={enabled:!1});var L=Object.assign(Object.assign(Object.assign(Object.assign({id:null==g?void 0:g.id,title:(null==g?void 0:g.title)||"",blockAttributes:Object.assign(Object.assign({},g),{type:w}),src:h,ajaxProgress:!0,analytics:d,automations:u,mutedPreview:{enabled:null===(i=null==g?void 0:g.mutedPreview)||void 0===i?void 0:i.enabled},chapters:l,controls:P,settings:["captions","quality","loop"].concat(Object(n.a)((null==s?void 0:s.speed)?["speed"]:[])),hideControls:null==s?void 0:s.auto_hide,captions:{active:null==s?void 0:s.captions_enabled,language:"auto",update:!1},logo:null==c?void 0:c.logo,logo_width:null==c?void 0:c.logo_width,hide_logo:null==s?void 0:s.hide_logo,lazy_load_youtube:null==s?void 0:s.lazy_load_youtube,save_player_position:!!(null==s?void 0:s.save_player_position),sticky_scroll:null==s?void 0:s.sticky_scroll,play_video_viewport:null==s?void 0:s.play_video_viewport,autoplay:!(!p||(null===(r=window.wp)||void 0===r?void 0:r.blocks))},v?{provider:v}:{}),b?{provider_video_id:b}:{}),(null==g?void 0:g.poster)?{poster:g.poster}:{}),{invertTime:!0,storage:A,resetOnEnd:!!(null==s?void 0:s.reset_on_end),vimeo:{byline:!1,portrait:!1,title:!1,speed:!0,transparent:!1,customControls:!0,premium:!1,playsinline:!!(null==g?void 0:g.playsInline)},youtube:{rel:0,showinfo:0,iv_load_policy:3,modestbranding:1,customControls:!0,noCookie:!!(null==x?void 0:x.noCookie),playsinline:!!(null==g?void 0:g.playsInline)},tooltips:{controls:!0,seek:!0},i18n:_});return(null===(a=null===window||void 0===window?void 0:window.wp)||void 0===a?void 0:a.hooks)&&(L=window.wp.hooks.applyFilters("presto.playerSettings",L)),L}({preset:this.preset,chapters:this.chapters,branding:this.branding,analytics:!!this.analytics,automations:!!this.automations,autoplay:!this.isAdmin&&!!this.autoplay,blockAttributes:this.blockAttributes,provider:this.provider,youtube:this.youtube,provider_video_id:this.provider_video_id,i18n:this.i18n})),this.iconUrl?{iconUrl:this.iconUrl}:{})}},{key:"getPlayerData",value:function(){return{selector:this.playerEl,src:this.src||"",preload:this.preload,provider:this.provider,config:this.getConfig(),isAdmin:this.isAdmin}}},{key:"createPlayer",value:(u=Object(r.a)(w.a.mark((function e(){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Co(this.getPlayerData());case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)}))),function(){return u.apply(this,arguments)})},{key:"handlePlayerElementChange",value:function(){!function(e){var t=e.src,i=e.el,n=e.preload,r=e.currentTime;if(!i.getAttribute("hls_loaded")&&["metadata","none"].includes(n)&&Ao(t)){if(r>0)return i.style.height=null,i.style.paddingBottom=null,void i.setAttribute("hls_loaded","1");i.style.height="0px",i.style.paddingBottom="56.25%"}}({src:this.src,el:this.playerEl,preload:this.preload,currentTime:this.currentTime})}},{key:"handleMutedPreview",value:function(e){var t,i,n,r,a,o,s,l=this;this.player&&!this.isAdmin&&(!e&&this.preset.captions_enabled&&setTimeout((function(){var e;l.player.toggleCaptions(null===(e=null==l?void 0:l.preset)||void 0===e?void 0:e.captions_enabled)}),0),(null===(n=null===(i=null===(t=this.originalConfig)||void 0===t?void 0:t.blockAttributes)||void 0===i?void 0:i.mutedPreview)||void 0===n?void 0:n.enabled)&&function(e){var t=e.player,i=e.mutedPreview,n=e.captions,r=e.progress,a=e.savePosition,o=e.onPlay,s=window.navigator.userAgent;if(!s.match(/iPad/i)&&!s.match(/iPhone/i)){t.config.mutedPreview.enabled=i,t.muted=i,t.loop=i,t.config.ajaxProgress=!i&&r,t.config.save_player_position=!i&&a;try{t.toggleCaptions(!!i&&!!n)}catch(e){}return setTimeout((function(){Ya(t)||t.restart(),setTimeout((function(){t.muted=i,o()}),0)}),0),t}console.log("ios device, do not do muted autoplay")}({player:this.player,mutedPreview:this.mutedPreview,captions:!!(null===(a=null===(r=this.blockAttributes)||void 0===r?void 0:r.mutedPreview)||void 0===a?void 0:a.captions),progress:null===(o=this.originalConfig)||void 0===o?void 0:o.ajaxProgress,savePosition:null===(s=this.originalConfig)||void 0===s?void 0:s.save_player_position,onPlay:function(){return l.play()}}))}},{key:"onPlayerReady",value:function(){var e,t,i=this;this.observer&&(this.observer.disconnect(),this.observer.observe(this.el)),this.currentTime=this.player.currentTime,this.duration=this.player.duration,this.mutedPreview=null===(t=null===(e=this.blockAttributes)||void 0===e?void 0:e.mutedPreview)||void 0===t?void 0:t.enabled,this.player.on("timeupdate loadedmetadata",(function(){i.currentTime=i.player.currentTime,i.duration=i.player.duration})),this.player.on("playing",(function(){return i.playClass="presto-player--playing"})),this.player.on("pause",(function(){return i.playClass="presto-player--paused"})),this.player.on("ended",(function(){return i.playClass="presto-player--ended"}))}},{key:"handlePlayerEvents",value:function(e){var t=this;e.on("ready",(function(e){t.player=e.detail.plyr,t.onPlayerReady()}))}},{key:"handleLazyLoadChange",value:function(){var e=this;"youtube"!==this.provider||this.shouldLazyLoad||this.isAdmin||setTimeout((function(){e.onReload("play")}),50)}},{key:"shouldLazyLoadVideo",value:function(){var e,t,i;return"youtube"===this.provider&&!this.autoplay&&!(null===(t=null===(e=this.blockAttributes)||void 0===e?void 0:e.mutedPreview)||void 0===t?void 0:t.enabled)&&!!(null===(i=this.preset)||void 0===i?void 0:i.lazy_load_youtube)}},{key:"componentWillLoad",value:function(){var e,t,i=null===(e=this.el.children)||void 0===e?void 0:e[0];i&&i.classList&&i.classList.contains("presto-iframe-fallback-container")&&i.remove(),this.shouldLazyLoad=this.shouldLazyLoadVideo(),this.i18n=null===(t=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===t?void 0:t.i18n,this.originalConfig||(this.originalConfig=this.getConfig()),this.trackIntersection()}},{key:"componentDidLoad",value:(d=Object(r.a)(w.a.mark((function e(){var t=this;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:setTimeout((function(){t.initialize(),t.loaded.emit(!0)}),0);case 1:case"end":return e.stop()}}),e)}))),function(){return d.apply(this,arguments)})},{key:"initialize",value:(h=Object(r.a)(w.a.mark((function e(){var t;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.createPlayer();case 2:return t=e.sent,this.handlePlayerEvents(t),this.syncVideoHeight(),To(this.el,this.css),e.abrupt("return",t);case 7:case"end":return e.stop()}}),e,this)}))),function(){return h.apply(this,arguments)})},{key:"onReload",value:(a=Object(r.a)(w.a.mark((function e(t){var i,n=this;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.initialize();case 2:i=e.sent,"play"==t&&i.on("ready",(function(){n.play(),i.muted=!0,i.muted=!1,i.off("ready",n.play)}));case 4:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"syncVideoHeight",value:(t=Object(r.a)(w.a.mark((function e(){var t,n=this;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("ResizeObserver"in window!=0){e.next=5;break}return e.next=3,i.e(0).then(i.bind(null,48));case 3:t=e.sent,window.ResizeObserver=t.ResizeObserver;case 5:new ResizeObserver((function(){n.isSticky||(n.videoHeight=n.el.getBoundingClientRect().height)})).observe(this.el);case 7:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"playVideoOnlyInViewport",value:function(){var e;!this.isAdmin&&(null===(e=this.preset)||void 0===e?void 0:e.play_video_viewport)&&this.player&&("visible"===document.visibilityState?this.observer.observe(this.el):(this.player.playing&&(this.previouslyPlaying=!0),this.pause(),this.observer.disconnect()))}},{key:"trackIntersection",value:function(){var e=this;this.observer=new IntersectionObserver((function(t){e.handleVisibilityIntersection(null==t?void 0:t[0])})),this.observer.observe(this.el)}},{key:"handleVisibilityIntersection",value:function(e){e&&(this.handleStickyScroll(e),this.handleVisibilityPlayChange(e))}},{key:"handleStickyScroll",value:function(e){var t,i,n=this;if(null===(t=this.preset)||void 0===t?void 0:t.sticky_scroll)if(this.isAdmin||this.mutedPreview||!(null===(i=null==this?void 0:this.player)||void 0===i?void 0:i.playing))this.isSticky=!1;else{var r=e.boundingClientRect;if(this.isSticky=r.height<-r.top,"visible"===document.visibilityState&&this.isSticky&&this.player){var a=function e(){window.removeEventListener("scroll",e),n.player.paused&&(n.isSticky=!1)};this.player.once("pause",(function(){window.addEventListener("scroll",a)}))}}}},{key:"handleVisibilityPlayChange",value:function(e){var t,i,n,r=this;if(!this.isAdmin&&(null===(t=this.preset)||void 0===t?void 0:t.play_video_viewport)&&(!this.player&&this.originalConfig.autoplay&&(this.previouslyPlaying=!0,this.autoplay=!!(null==e?void 0:e.isIntersecting)),this.player)){if(null==e?void 0:e.isIntersecting)return this.originalConfig.autoplay&&(this.autoplay=!0),this.previouslyPlaying&&this.play(),void(this.previouslyPlaying=!1);if("visible"!==document.visibilityState||!this.isSticky){if(null===(n=null===(i=this.blockAttributes)||void 0===i?void 0:i.mutedPreview)||void 0===n?void 0:n.enabled)return this.previouslyPlaying=!0,this.pause(),void this.player.once("playing",(function(){r.previouslyPlaying=!0,r.pause()}));this.player.playing&&(this.previouslyPlaying=!0),this.pause()}}}},{key:"renderMutedOverlay",value:function(){var e,t=this;if(this.player&&this.mutedPreview&&!this.isAdmin)return dt("presto-muted-overlay",{mutedOverlay:null===(e=this.player.config.blockAttributes)||void 0===e?void 0:e.mutedOverlay,preset:this.preset,onPlayVideo:function(){t.mutedPreview=!1,t.play()}})}},{key:"renderVideo",value:function(){var e,t=this;switch(this.provider){case"vimeo":return dt("presto-vimeo",{player:this.player,getRef:function(e){return t.playerEl=e},poster:this.poster,src:this.src});case"youtube":return dt("presto-youtube",{onReload:function(e){return t.onReload(null==e?void 0:e.detail)},player:this.player,getRef:function(e){return t.playerEl=e},lazyLoad:this.shouldLazyLoad,poster:this.poster,src:this.src});case"bunny":return dt("presto-bunny",{thumbnail:null===(e=null==this?void 0:this.bunny)||void 0===e?void 0:e.thumbnail,getRef:function(e){return t.playerEl=e},player:this.player,autoplay:this.autoplay,preload:this.preload,poster:this.poster,playsinline:this.playsinline,src:this.src,tracks:this.tracks});default:return dt("presto-video",{getRef:function(e){return t.playerEl=e},player:this.player,autoplay:this.autoplay,preload:this.preload,poster:this.poster,playsinline:this.playsinline,src:this.src,tracks:this.tracks})}}},{key:"renderCTA",value:function(){var e,t,i,n=this;if((null===(e=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===e?void 0:e.isPremium)&&!this.isAdmin&&(null===(i=null===(t=this.preset)||void 0===t?void 0:t.email_collection)||void 0===i?void 0:i.enabled))return dt("presto-cta-overlay",{direction:this.direction,player:this.player,preset:this.preset,i18n:this.i18n,onPlayVideo:function(){n.mutedPreview=!1,n.play()},onRewatchVideo:function(){n.mutedPreview=!1},"current-time":this.currentTime,duration:this.duration})}},{key:"renderEmailOverlay",value:function(){var e,t,i=this;if((null===(e=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===e?void 0:e.isPremium)&&!this.isAdmin&&!(null===(t=null===window||void 0===window?void 0:window.prestoPlayer)||void 0===t?void 0:t.logged_in))return dt("presto-email-overlay",{direction:this.direction,player:this.player,preset:this.preset,videoId:this.video_id,i18n:this.i18n,onPlayVideo:function(){i.mutedPreview=!1,i.play()},currentTime:this.currentTime,duration:this.duration})}},{key:"renderActionBar",value:function(){var e,t;if(null===(t=null===(e=this.preset)||void 0===e?void 0:e.action_bar)||void 0===t?void 0:t.enabled)return dt("presto-action-bar",{config:this.preset.action_bar,currentTime:this.currentTime,duration:this.duration,youtube:this.youtube})}},{key:"stickyPositionClass",value:function(){var e,t;return this.isSticky?(null===(e=this.preset)||void 0===e?void 0:e.sticky_scroll_position)?"presto-sticky--".concat(null===(t=this.preset)||void 0===t?void 0:t.sticky_scroll_position.replace(/\s+/g,"-")):"presto-sticky--bottom-right":""}},{key:"renderDynamicOverlays",value:function(){var e,t,i;return dt("presto-dynamic-overlays",{overlays:this.overlays,"current-time":this.currentTime,enabled:!(null===(i=null===(t=null===(e=this.player)||void 0===e?void 0:e.config)||void 0===t?void 0:t.mutedPreview)||void 0===i?void 0:i.enabled)})}},{key:"render",value:function(){var e,t,i,n,r;return dt(pt,{style:{height:this.isSticky?"".concat(this.videoHeight,"px"):"auto"}},dt("div",{part:"wrapper",dir:this.direction,class:"presto-player__wrapper fitvidsignore\n presto-video-id-".concat(this.video_id,"\n ").concat(this.isSticky?"presto-sticky":"","\n ").concat(this.stickyPositionClass(),"\n ").concat("rtl"===this.direction?"rtl":"","\n ").concat(!!(null===(e=this.preset)||void 0===e?void 0:e.skin)&&"skin-".concat(null===(t=this.preset)||void 0===t?void 0:t.skin),"\n ").concat((null===(i=this.preset)||void 0===i?void 0:i.hide_youtube)?"hide-youtube-ui":"","\n ").concat((null===(n=this.preset)||void 0===n?void 0:n.caption_style)?"caption-style-".concat(null===(r=this.preset)||void 0===r?void 0:r.caption_style):"","\n ").concat(this.mutedPreview?"is-muted-overlay":"","\n ").concat(this.playClass?this.playClass:"")},dt("div",null,dt("slot",{name:"player-start"}),this.renderDynamicOverlays(),this.renderCTA(),this.renderEmailOverlay(),dt("slot",{name:"player-before-video"}),this.renderVideo(),dt("slot",{name:"player-after-video"}),this.renderActionBar(),this.renderMutedOverlay(),dt("slot",{name:"player-end"}))))}},{key:"el",get:function(){return this}}],[{key:"watchers",get:function(){return{currentTime:["handleCurrentTimeChange","handlePlayerElementChange"],isSticky:["handleStickyChange"],playerEl:["handlePlayerElementChange"],mutedPreview:["handleMutedPreview"],shouldLazyLoad:["handleLazyLoadChange"]}}},{key:"style",get:function(){return'@charset "UTF-8";@keyframes plyr-progress{to{background-position:var(--plyr-progress-loading-size, 25px) 0}}@keyframes plyr-popup{0%{opacity:0.5;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}@keyframes plyr-fade-in{from{opacity:0}to{opacity:1}}.plyr{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;align-items:center;direction:ltr;display:flex;flex-direction:column;font-family:var(--plyr-font-family, inherit);font-variant-numeric:tabular-nums;font-weight:var(--plyr-font-weight-regular, 400);line-height:var(--plyr-line-height, 1.7);max-width:100%;min-width:200px;position:relative;text-shadow:none;transition:box-shadow 0.3s ease;z-index:0}.plyr video,.plyr audio,.plyr iframe{display:block;height:100%;width:100%}.plyr button{font:inherit;line-height:inherit;width:auto}.plyr:focus{outline:0}.plyr--full-ui{box-sizing:border-box}.plyr--full-ui *,.plyr--full-ui *::after,.plyr--full-ui *::before{box-sizing:inherit}.plyr--full-ui a,.plyr--full-ui button,.plyr--full-ui input,.plyr--full-ui label{touch-action:manipulation}.plyr__badge{background:var(--plyr-badge-background, #4a5464);border-radius:var(--plyr-badge-border-radius, 2px);color:var(--plyr-badge-text-color, #fff);font-size:var(--plyr-font-size-badge, 9px);line-height:1;padding:3px 4px}.plyr--full-ui ::-webkit-media-text-track-container{display:none}.plyr__captions{animation:plyr-fade-in 0.3s ease;bottom:0;display:none;font-size:var(--plyr-font-size-small, 13px);left:0;padding:var(--plyr-control-spacing, 10px);position:absolute;text-align:center;transition:transform 0.4s ease-in-out;width:100%}.plyr__captions span:empty{display:none}@media (min-width: 480px){.plyr__captions{font-size:var(--plyr-font-size-base, 15px);padding:calc(var(--plyr-control-spacing, 10px) * 2)}}@media (min-width: 768px){.plyr__captions{font-size:var(--plyr-font-size-large, 18px)}}.plyr--captions-active .plyr__captions{display:block}.plyr:not(.plyr--hide-controls) .plyr__controls:not(:empty)~.plyr__captions{transform:translateY(calc(var(--plyr-control-spacing, 10px) * -4))}.plyr__caption{background:var(--plyr-captions-background, rgba(0, 0, 0, 0.8));border-radius:2px;box-decoration-break:clone;color:var(--plyr-captions-text-color, #fff);line-height:185%;padding:0.2em 0.5em;white-space:pre-wrap}.plyr__caption div{display:inline}.plyr__control{background:transparent;border:0;border-radius:var(--plyr-control-radius, 3px);color:inherit;cursor:pointer;flex-shrink:0;overflow:visible;padding:calc(var(--plyr-control-spacing, 10px) * 0.7);position:relative;transition:all 0.3s ease}.plyr__control svg{display:block;fill:currentColor;height:var(--plyr-control-icon-size, 18px);pointer-events:none;width:var(--plyr-control-icon-size, 18px)}.plyr__control:focus{outline:0}.plyr__control.plyr__tab-focus{outline-color:var(--plyr-tab-focus-color, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));outline-offset:2px;outline-style:dotted;outline-width:3px}a.plyr__control{text-decoration:none}a.plyr__control::after,a.plyr__control::before{display:none}.plyr__control:not(.plyr__control--pressed) .icon--pressed,.plyr__control.plyr__control--pressed .icon--not-pressed,.plyr__control:not(.plyr__control--pressed) .label--pressed,.plyr__control.plyr__control--pressed .label--not-pressed{display:none}.plyr--full-ui ::-webkit-media-controls{display:none}.plyr__controls{align-items:center;display:flex;justify-content:flex-end;text-align:center}.plyr__controls .plyr__progress__container{flex:1;min-width:0}.plyr__controls .plyr__controls__item{margin-left:calc(var(--plyr-control-spacing, 10px) / 4)}.plyr__controls .plyr__controls__item:first-child{margin-left:0;margin-right:auto}.plyr__controls .plyr__controls__item.plyr__progress__container{padding-left:calc(var(--plyr-control-spacing, 10px) / 4)}.plyr__controls .plyr__controls__item.plyr__time{padding:0 calc(var(--plyr-control-spacing, 10px) / 2)}.plyr__controls .plyr__controls__item.plyr__progress__container:first-child,.plyr__controls .plyr__controls__item.plyr__time:first-child,.plyr__controls .plyr__controls__item.plyr__time+.plyr__time{padding-left:0}.plyr__controls:empty{display:none}.plyr [data-plyr=captions],.plyr [data-plyr=pip],.plyr [data-plyr=airplay],.plyr [data-plyr=fullscreen]{display:none}.plyr--captions-enabled [data-plyr=captions],.plyr--pip-supported [data-plyr=pip],.plyr--airplay-supported [data-plyr=airplay],.plyr--fullscreen-enabled [data-plyr=fullscreen]{display:inline-block}.plyr__menu{display:flex;position:relative}.plyr__menu .plyr__control svg{transition:transform 0.3s ease}.plyr__menu .plyr__control[aria-expanded=true] svg{transform:rotate(90deg)}.plyr__menu .plyr__control[aria-expanded=true] .plyr__tooltip{display:none}.plyr__menu__container{animation:plyr-popup 0.2s ease;background:var(--plyr-menu-background, rgba(255, 255, 255, 0.9));border-radius:4px;bottom:100%;box-shadow:var(--plyr-menu-shadow, 0 1px 2px rgba(0, 0, 0, 0.15));color:var(--plyr-menu-color, #4a5464);font-size:var(--plyr-font-size-base, 15px);margin-bottom:10px;position:absolute;right:-3px;text-align:left;white-space:nowrap;z-index:3}.plyr__menu__container>div{overflow:hidden;transition:height 0.35s cubic-bezier(0.4, 0, 0.2, 1), width 0.35s cubic-bezier(0.4, 0, 0.2, 1)}.plyr__menu__container::after{border:var(--plyr-menu-arrow-size, 4px) solid transparent;border-top-color:var(--plyr-menu-background, rgba(255, 255, 255, 0.9));content:"";height:0;position:absolute;right:calc(((var(--plyr-control-icon-size, 18px) / 2) + calc(var(--plyr-control-spacing, 10px) * 0.7)) - (var(--plyr-menu-arrow-size, 4px) / 2));top:100%;width:0}.plyr__menu__container [role=menu]{padding:calc(var(--plyr-control-spacing, 10px) * 0.7)}.plyr__menu__container [role=menuitem],.plyr__menu__container [role=menuitemradio]{margin-top:2px}.plyr__menu__container [role=menuitem]:first-child,.plyr__menu__container [role=menuitemradio]:first-child{margin-top:0}.plyr__menu__container .plyr__control{align-items:center;color:var(--plyr-menu-color, #4a5464);display:flex;font-size:var(--plyr-font-size-menu, var(--plyr-font-size-small, 13px));padding-bottom:calc(calc(var(--plyr-control-spacing, 10px) * 0.7) / 1.5);padding-left:calc(calc(var(--plyr-control-spacing, 10px) * 0.7) * 1.5);padding-right:calc(calc(var(--plyr-control-spacing, 10px) * 0.7) * 1.5);padding-top:calc(calc(var(--plyr-control-spacing, 10px) * 0.7) / 1.5);user-select:none;width:100%}.plyr__menu__container .plyr__control>span{align-items:inherit;display:flex;width:100%}.plyr__menu__container .plyr__control::after{border:var(--plyr-menu-item-arrow-size, 4px) solid transparent;content:"";position:absolute;top:50%;transform:translateY(-50%)}.plyr__menu__container .plyr__control--forward{padding-right:calc(calc(var(--plyr-control-spacing, 10px) * 0.7) * 4)}.plyr__menu__container .plyr__control--forward::after{border-left-color:var(--plyr-menu-arrow-color, #728197);right:calc((calc(var(--plyr-control-spacing, 10px) * 0.7) * 1.5) - var(--plyr-menu-item-arrow-size, 4px))}.plyr__menu__container .plyr__control--forward.plyr__tab-focus::after,.plyr__menu__container .plyr__control--forward:hover::after{border-left-color:currentColor}.plyr__menu__container .plyr__control--back{font-weight:var(--plyr-font-weight-regular, 400);margin:calc(var(--plyr-control-spacing, 10px) * 0.7);margin-bottom:calc(calc(var(--plyr-control-spacing, 10px) * 0.7) / 2);padding-left:calc(calc(var(--plyr-control-spacing, 10px) * 0.7) * 4);position:relative;width:calc(100% - (calc(var(--plyr-control-spacing, 10px) * 0.7) * 2))}.plyr__menu__container .plyr__control--back::after{border-right-color:var(--plyr-menu-arrow-color, #728197);left:calc((calc(var(--plyr-control-spacing, 10px) * 0.7) * 1.5) - var(--plyr-menu-item-arrow-size, 4px))}.plyr__menu__container .plyr__control--back::before{background:var(--plyr-menu-back-border-color, #dcdfe5);box-shadow:0 1px 0 var(--plyr-menu-back-border-shadow-color, #fff);content:"";height:1px;left:0;margin-top:calc(calc(var(--plyr-control-spacing, 10px) * 0.7) / 2);overflow:hidden;position:absolute;right:0;top:100%}.plyr__menu__container .plyr__control--back.plyr__tab-focus::after,.plyr__menu__container .plyr__control--back:hover::after{border-right-color:currentColor}.plyr__menu__container .plyr__control[role=menuitemradio]{padding-left:calc(var(--plyr-control-spacing, 10px) * 0.7)}.plyr__menu__container .plyr__control[role=menuitemradio]::before,.plyr__menu__container .plyr__control[role=menuitemradio]::after{border-radius:100%}.plyr__menu__container .plyr__control[role=menuitemradio]::before{background:rgba(0, 0, 0, 0.1);content:"";display:block;flex-shrink:0;height:16px;margin-right:var(--plyr-control-spacing, 10px);transition:all 0.3s ease;width:16px}.plyr__menu__container .plyr__control[role=menuitemradio]::after{background:#fff;border:0;height:6px;left:12px;opacity:0;top:50%;transform:translateY(-50%) scale(0);transition:transform 0.3s ease, opacity 0.3s ease;width:6px}.plyr__menu__container .plyr__control[role=menuitemradio][aria-checked=true]::before{background:var(--plyr-control-toggle-checked-background, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)))}.plyr__menu__container .plyr__control[role=menuitemradio][aria-checked=true]::after{opacity:1;transform:translateY(-50%) scale(1)}.plyr__menu__container .plyr__control[role=menuitemradio].plyr__tab-focus::before,.plyr__menu__container .plyr__control[role=menuitemradio]:hover::before{background:rgba(35, 40, 47, 0.1)}.plyr__menu__container .plyr__menu__value{align-items:center;display:flex;margin-left:auto;margin-right:calc((calc(var(--plyr-control-spacing, 10px) * 0.7) - 2) * -1);overflow:hidden;padding-left:calc(calc(var(--plyr-control-spacing, 10px) * 0.7) * 3.5);pointer-events:none}.plyr--full-ui input[type=range]{-webkit-appearance:none;background:transparent;border:0;border-radius:calc(var(--plyr-range-thumb-height, 13px) * 2);color:var(--plyr-range-fill-background, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));display:block;height:calc((var(--plyr-range-thumb-active-shadow-width, 3px) * 2) + var(--plyr-range-thumb-height, 13px));margin:0;min-width:0;padding:0;transition:box-shadow 0.3s ease;width:100%}.plyr--full-ui input[type=range]::-webkit-slider-runnable-track{background:transparent;border:0;border-radius:calc(var(--plyr-range-track-height, 5px) / 2);height:var(--plyr-range-track-height, 5px);transition:box-shadow 0.3s ease;user-select:none;background-image:linear-gradient(to right, currentColor var(--value, 0%), transparent var(--value, 0%))}.plyr--full-ui input[type=range]::-webkit-slider-thumb{background:var(--plyr-range-thumb-background, #fff);border:0;border-radius:100%;box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.15), 0 0 0 1px rgba(35, 40, 47, 0.2));height:var(--plyr-range-thumb-height, 13px);position:relative;transition:all 0.2s ease;width:var(--plyr-range-thumb-height, 13px);-webkit-appearance:none;margin-top:calc(((var(--plyr-range-thumb-height, 13px) - var(--plyr-range-track-height, 5px)) / 2) * -1)}.plyr--full-ui input[type=range]::-moz-range-track{background:transparent;border:0;border-radius:calc(var(--plyr-range-track-height, 5px) / 2);height:var(--plyr-range-track-height, 5px);transition:box-shadow 0.3s ease;user-select:none}.plyr--full-ui input[type=range]::-moz-range-thumb{background:var(--plyr-range-thumb-background, #fff);border:0;border-radius:100%;box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.15), 0 0 0 1px rgba(35, 40, 47, 0.2));height:var(--plyr-range-thumb-height, 13px);position:relative;transition:all 0.2s ease;width:var(--plyr-range-thumb-height, 13px)}.plyr--full-ui input[type=range]::-moz-range-progress{background:currentColor;border-radius:calc(var(--plyr-range-track-height, 5px) / 2);height:var(--plyr-range-track-height, 5px)}.plyr--full-ui input[type=range]::-ms-track{background:transparent;border:0;border-radius:calc(var(--plyr-range-track-height, 5px) / 2);height:var(--plyr-range-track-height, 5px);transition:box-shadow 0.3s ease;user-select:none;color:transparent}.plyr--full-ui input[type=range]::-ms-fill-upper{background:transparent;border:0;border-radius:calc(var(--plyr-range-track-height, 5px) / 2);height:var(--plyr-range-track-height, 5px);transition:box-shadow 0.3s ease;user-select:none}.plyr--full-ui input[type=range]::-ms-fill-lower{background:transparent;border:0;border-radius:calc(var(--plyr-range-track-height, 5px) / 2);height:var(--plyr-range-track-height, 5px);transition:box-shadow 0.3s ease;user-select:none;background:currentColor}.plyr--full-ui input[type=range]::-ms-thumb{background:var(--plyr-range-thumb-background, #fff);border:0;border-radius:100%;box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.15), 0 0 0 1px rgba(35, 40, 47, 0.2));height:var(--plyr-range-thumb-height, 13px);position:relative;transition:all 0.2s ease;width:var(--plyr-range-thumb-height, 13px);margin-top:0}.plyr--full-ui input[type=range]::-ms-tooltip{display:none}.plyr--full-ui input[type=range]:focus{outline:0}.plyr--full-ui input[type=range]::-moz-focus-outer{border:0}.plyr--full-ui input[type=range].plyr__tab-focus::-webkit-slider-runnable-track{outline-color:var(--plyr-tab-focus-color, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));outline-offset:2px;outline-style:dotted;outline-width:3px}.plyr--full-ui input[type=range].plyr__tab-focus::-moz-range-track{outline-color:var(--plyr-tab-focus-color, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));outline-offset:2px;outline-style:dotted;outline-width:3px}.plyr--full-ui input[type=range].plyr__tab-focus::-ms-track{outline-color:var(--plyr-tab-focus-color, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));outline-offset:2px;outline-style:dotted;outline-width:3px}.plyr__poster{background-color:var(--plyr-video-background, var(--plyr-video-background, black));background-position:50% 50%;background-repeat:no-repeat;background-size:contain;height:100%;left:0;opacity:0;position:absolute;top:0;transition:opacity 0.2s ease;width:100%;z-index:1}.plyr--stopped.plyr__poster-enabled .plyr__poster{opacity:1}.plyr--youtube.plyr--paused.plyr__poster-enabled:not(.plyr--stopped) .plyr__poster{display:none}.plyr__time{font-size:var(--plyr-font-size-time, var(--plyr-font-size-small, 13px))}.plyr__time+.plyr__time::before{content:"⁄";margin-right:var(--plyr-control-spacing, 10px)}@media (max-width: 767px){.plyr__time+.plyr__time{display:none}}.plyr__tooltip{background:var(--plyr-tooltip-background, rgba(255, 255, 255, 0.9));border-radius:var(--plyr-tooltip-radius, 3px);bottom:100%;box-shadow:var(--plyr-tooltip-shadow, 0 1px 2px rgba(0, 0, 0, 0.15));color:var(--plyr-tooltip-color, #4a5464);font-size:var(--plyr-font-size-small, 13px);font-weight:var(--plyr-font-weight-regular, 400);left:50%;line-height:1.3;margin-bottom:calc(calc(var(--plyr-control-spacing, 10px) / 2) * 2);opacity:0;padding:calc(var(--plyr-control-spacing, 10px) / 2) calc(calc(var(--plyr-control-spacing, 10px) / 2) * 1.5);pointer-events:none;position:absolute;transform:translate(-50%, 10px) scale(0.8);transform-origin:50% 100%;transition:transform 0.2s 0.1s ease, opacity 0.2s 0.1s ease;white-space:nowrap;z-index:2}.plyr__tooltip::before{border-left:var(--plyr-tooltip-arrow-size, 4px) solid transparent;border-right:var(--plyr-tooltip-arrow-size, 4px) solid transparent;border-top:var(--plyr-tooltip-arrow-size, 4px) solid var(--plyr-tooltip-background, rgba(255, 255, 255, 0.9));bottom:calc(var(--plyr-tooltip-arrow-size, 4px) * -1);content:"";height:0;left:50%;position:absolute;transform:translateX(-50%);width:0;z-index:2}.plyr .plyr__control:hover .plyr__tooltip,.plyr .plyr__control.plyr__tab-focus .plyr__tooltip,.plyr__tooltip--visible{opacity:1;transform:translate(-50%, 0) scale(1)}.plyr .plyr__control:hover .plyr__tooltip{z-index:3}.plyr__controls>.plyr__control:first-child .plyr__tooltip,.plyr__controls>.plyr__control:first-child+.plyr__control .plyr__tooltip{left:0;transform:translate(0, 10px) scale(0.8);transform-origin:0 100%}.plyr__controls>.plyr__control:first-child .plyr__tooltip::before,.plyr__controls>.plyr__control:first-child+.plyr__control .plyr__tooltip::before{left:calc((var(--plyr-control-icon-size, 18px) / 2) + calc(var(--plyr-control-spacing, 10px) * 0.7))}.plyr__controls>.plyr__control:last-child .plyr__tooltip{left:auto;right:0;transform:translate(0, 10px) scale(0.8);transform-origin:100% 100%}.plyr__controls>.plyr__control:last-child .plyr__tooltip::before{left:auto;right:calc((var(--plyr-control-icon-size, 18px) / 2) + calc(var(--plyr-control-spacing, 10px) * 0.7));transform:translateX(50%)}.plyr__controls>.plyr__control:first-child:hover .plyr__tooltip,.plyr__controls>.plyr__control:first-child.plyr__tab-focus .plyr__tooltip,.plyr__controls>.plyr__control:first-child .plyr__tooltip--visible,.plyr__controls>.plyr__control:first-child+.plyr__control:hover .plyr__tooltip,.plyr__controls>.plyr__control:first-child+.plyr__control.plyr__tab-focus .plyr__tooltip,.plyr__controls>.plyr__control:first-child+.plyr__control .plyr__tooltip--visible,.plyr__controls>.plyr__control:last-child:hover .plyr__tooltip,.plyr__controls>.plyr__control:last-child.plyr__tab-focus .plyr__tooltip,.plyr__controls>.plyr__control:last-child .plyr__tooltip--visible{transform:translate(0, 0) scale(1)}.plyr__progress{left:calc(var(--plyr-range-thumb-height, 13px) * 0.5);margin-right:var(--plyr-range-thumb-height, 13px);position:relative}.plyr__progress input[type=range],.plyr__progress__buffer{margin-left:calc(var(--plyr-range-thumb-height, 13px) * -0.5);margin-right:calc(var(--plyr-range-thumb-height, 13px) * -0.5);width:calc(100% + var(--plyr-range-thumb-height, 13px))}.plyr__progress input[type=range]{position:relative;z-index:2}.plyr__progress .plyr__tooltip{font-size:var(--plyr-font-size-time, var(--plyr-font-size-small, 13px));left:0}.plyr__progress__buffer{-webkit-appearance:none;background:transparent;border:0;border-radius:100px;height:var(--plyr-range-track-height, 5px);left:0;margin-top:calc((var(--plyr-range-track-height, 5px) / 2) * -1);padding:0;position:absolute;top:50%}.plyr__progress__buffer::-webkit-progress-bar{background:transparent}.plyr__progress__buffer::-webkit-progress-value{background:currentColor;border-radius:100px;min-width:var(--plyr-range-track-height, 5px);transition:width 0.2s ease}.plyr__progress__buffer::-moz-progress-bar{background:currentColor;border-radius:100px;min-width:var(--plyr-range-track-height, 5px);transition:width 0.2s ease}.plyr__progress__buffer::-ms-fill{border-radius:100px;transition:width 0.2s ease}.plyr--loading .plyr__progress__buffer{animation:plyr-progress 1s linear infinite;background-image:linear-gradient(-45deg, var(--plyr-progress-loading-background, rgba(35, 40, 47, 0.6)) 25%, transparent 25%, transparent 50%, var(--plyr-progress-loading-background, rgba(35, 40, 47, 0.6)) 50%, var(--plyr-progress-loading-background, rgba(35, 40, 47, 0.6)) 75%, transparent 75%, transparent);background-repeat:repeat-x;background-size:var(--plyr-progress-loading-size, 25px) var(--plyr-progress-loading-size, 25px);color:transparent}.plyr--video.plyr--loading .plyr__progress__buffer{background-color:var(--plyr-video-progress-buffered-background, rgba(255, 255, 255, 0.25))}.plyr--audio.plyr--loading .plyr__progress__buffer{background-color:var(--plyr-audio-progress-buffered-background, rgba(193, 200, 209, 0.6))}.plyr__volume{align-items:center;display:flex;max-width:110px;min-width:80px;position:relative;width:20%}.plyr__volume input[type=range]{margin-left:calc(var(--plyr-control-spacing, 10px) / 2);margin-right:calc(var(--plyr-control-spacing, 10px) / 2);position:relative;z-index:2}.plyr--is-ios .plyr__volume{min-width:0;width:auto}.plyr--audio{display:block}.plyr--audio .plyr__controls{background:var(--plyr-audio-controls-background, #fff);border-radius:inherit;color:var(--plyr-audio-control-color, #4a5464);padding:var(--plyr-control-spacing, 10px)}.plyr--audio .plyr__control.plyr__tab-focus,.plyr--audio .plyr__control:hover,.plyr--audio .plyr__control[aria-expanded=true]{background:var(--plyr-audio-control-background-hover, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));color:var(--plyr-audio-control-color-hover, #fff)}.plyr--full-ui.plyr--audio input[type=range]::-webkit-slider-runnable-track{background-color:var(--plyr-audio-range-track-background, var(--plyr-audio-progress-buffered-background, rgba(193, 200, 209, 0.6)))}.plyr--full-ui.plyr--audio input[type=range]::-moz-range-track{background-color:var(--plyr-audio-range-track-background, var(--plyr-audio-progress-buffered-background, rgba(193, 200, 209, 0.6)))}.plyr--full-ui.plyr--audio input[type=range]::-ms-track{background-color:var(--plyr-audio-range-track-background, var(--plyr-audio-progress-buffered-background, rgba(193, 200, 209, 0.6)))}.plyr--full-ui.plyr--audio input[type=range]:active::-webkit-slider-thumb{box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.15), 0 0 0 1px rgba(35, 40, 47, 0.2)), 0 0 0 var(--plyr-range-thumb-active-shadow-width, 3px) var(--plyr-audio-range-thumb-active-shadow-color, rgba(35, 40, 47, 0.1))}.plyr--full-ui.plyr--audio input[type=range]:active::-moz-range-thumb{box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.15), 0 0 0 1px rgba(35, 40, 47, 0.2)), 0 0 0 var(--plyr-range-thumb-active-shadow-width, 3px) var(--plyr-audio-range-thumb-active-shadow-color, rgba(35, 40, 47, 0.1))}.plyr--full-ui.plyr--audio input[type=range]:active::-ms-thumb{box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.15), 0 0 0 1px rgba(35, 40, 47, 0.2)), 0 0 0 var(--plyr-range-thumb-active-shadow-width, 3px) var(--plyr-audio-range-thumb-active-shadow-color, rgba(35, 40, 47, 0.1))}.plyr--audio .plyr__progress__buffer{color:var(--plyr-audio-progress-buffered-background, rgba(193, 200, 209, 0.6))}.plyr--video{background:var(--plyr-video-background, var(--plyr-video-background, black));overflow:hidden}.plyr--video.plyr--menu-open{overflow:visible}.plyr__video-wrapper{background:var(--plyr-video-background, var(--plyr-video-background, black));margin:auto;overflow:hidden;position:relative;width:100%}.plyr__video-embed,.plyr__video-wrapper--fixed-ratio{aspect-ratio:16/9}@supports not (aspect-ratio: 16/9){.plyr__video-embed,.plyr__video-wrapper--fixed-ratio{height:0;padding-bottom:56.25%;position:relative}}.plyr__video-embed iframe,.plyr__video-wrapper--fixed-ratio video{border:0;height:100%;left:0;position:absolute;top:0;width:100%}.plyr--full-ui .plyr__video-embed>.plyr__video-embed__container{padding-bottom:240%;position:relative;transform:translateY(-38.28125%)}.plyr--video .plyr__controls{background:var(--plyr-video-controls-background, linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.75)));border-bottom-left-radius:inherit;border-bottom-right-radius:inherit;bottom:0;color:var(--plyr-video-control-color, #fff);left:0;padding:calc(var(--plyr-control-spacing, 10px) / 2);padding-top:calc(var(--plyr-control-spacing, 10px) * 2);position:absolute;right:0;transition:opacity 0.4s ease-in-out, transform 0.4s ease-in-out;z-index:3}@media (min-width: 480px){.plyr--video .plyr__controls{padding:var(--plyr-control-spacing, 10px);padding-top:calc(var(--plyr-control-spacing, 10px) * 3.5)}}.plyr--video.plyr--hide-controls .plyr__controls{opacity:0;pointer-events:none;transform:translateY(100%)}.plyr--video .plyr__control.plyr__tab-focus,.plyr--video .plyr__control:hover,.plyr--video .plyr__control[aria-expanded=true]{background:var(--plyr-video-control-background-hover, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));color:var(--plyr-video-control-color-hover, #fff)}.plyr__control--overlaid{background:var(--plyr-video-control-background-hover, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));border:0;border-radius:100%;color:var(--plyr-video-control-color, #fff);display:none;left:50%;opacity:0.9;padding:calc(var(--plyr-control-spacing, 10px) * 1.5);position:absolute;top:50%;transform:translate(-50%, -50%);transition:0.3s;z-index:2}.plyr__control--overlaid svg{left:2px;position:relative}.plyr__control--overlaid:hover,.plyr__control--overlaid:focus{opacity:1}.plyr--playing .plyr__control--overlaid{opacity:0;visibility:hidden}.plyr--full-ui.plyr--video .plyr__control--overlaid{display:block}.plyr--full-ui.plyr--video input[type=range]::-webkit-slider-runnable-track{background-color:var(--plyr-video-range-track-background, var(--plyr-video-progress-buffered-background, rgba(255, 255, 255, 0.25)))}.plyr--full-ui.plyr--video input[type=range]::-moz-range-track{background-color:var(--plyr-video-range-track-background, var(--plyr-video-progress-buffered-background, rgba(255, 255, 255, 0.25)))}.plyr--full-ui.plyr--video input[type=range]::-ms-track{background-color:var(--plyr-video-range-track-background, var(--plyr-video-progress-buffered-background, rgba(255, 255, 255, 0.25)))}.plyr--full-ui.plyr--video input[type=range]:active::-webkit-slider-thumb{box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.15), 0 0 0 1px rgba(35, 40, 47, 0.2)), 0 0 0 var(--plyr-range-thumb-active-shadow-width, 3px) var(--plyr-audio-range-thumb-active-shadow-color, rgba(255, 255, 255, 0.5))}.plyr--full-ui.plyr--video input[type=range]:active::-moz-range-thumb{box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.15), 0 0 0 1px rgba(35, 40, 47, 0.2)), 0 0 0 var(--plyr-range-thumb-active-shadow-width, 3px) var(--plyr-audio-range-thumb-active-shadow-color, rgba(255, 255, 255, 0.5))}.plyr--full-ui.plyr--video input[type=range]:active::-ms-thumb{box-shadow:var(--plyr-range-thumb-shadow, 0 1px 1px rgba(35, 40, 47, 0.15), 0 0 0 1px rgba(35, 40, 47, 0.2)), 0 0 0 var(--plyr-range-thumb-active-shadow-width, 3px) var(--plyr-audio-range-thumb-active-shadow-color, rgba(255, 255, 255, 0.5))}.plyr--video .plyr__progress__buffer{color:var(--plyr-video-progress-buffered-background, rgba(255, 255, 255, 0.25))}.plyr:fullscreen{background:#000;border-radius:0 !important;height:100%;margin:0;width:100%}.plyr:fullscreen video{height:100%}.plyr:fullscreen .plyr__control .icon--exit-fullscreen{display:block}.plyr:fullscreen .plyr__control .icon--exit-fullscreen+svg{display:none}.plyr:fullscreen.plyr--hide-controls{cursor:none}@media (min-width: 1024px){.plyr:fullscreen .plyr__captions{font-size:var(--plyr-font-size-xlarge, 21px)}}.plyr:-webkit-full-screen{background:#000;border-radius:0 !important;height:100%;margin:0;width:100%}.plyr:-webkit-full-screen video{height:100%}.plyr:-webkit-full-screen .plyr__control .icon--exit-fullscreen{display:block}.plyr:-webkit-full-screen .plyr__control .icon--exit-fullscreen+svg{display:none}.plyr:-webkit-full-screen.plyr--hide-controls{cursor:none}@media (min-width: 1024px){.plyr:-webkit-full-screen .plyr__captions{font-size:var(--plyr-font-size-xlarge, 21px)}}.plyr:-moz-full-screen{background:#000;border-radius:0 !important;height:100%;margin:0;width:100%}.plyr:-moz-full-screen video{height:100%}.plyr:-moz-full-screen .plyr__control .icon--exit-fullscreen{display:block}.plyr:-moz-full-screen .plyr__control .icon--exit-fullscreen+svg{display:none}.plyr:-moz-full-screen.plyr--hide-controls{cursor:none}@media (min-width: 1024px){.plyr:-moz-full-screen .plyr__captions{font-size:var(--plyr-font-size-xlarge, 21px)}}.plyr:-ms-fullscreen{background:#000;border-radius:0 !important;height:100%;margin:0;width:100%}.plyr:-ms-fullscreen video{height:100%}.plyr:-ms-fullscreen .plyr__control .icon--exit-fullscreen{display:block}.plyr:-ms-fullscreen .plyr__control .icon--exit-fullscreen+svg{display:none}.plyr:-ms-fullscreen.plyr--hide-controls{cursor:none}@media (min-width: 1024px){.plyr:-ms-fullscreen .plyr__captions{font-size:var(--plyr-font-size-xlarge, 21px)}}.plyr--fullscreen-fallback{background:#000;border-radius:0 !important;height:100%;margin:0;width:100%;bottom:0;display:block;left:0;position:fixed;right:0;top:0;z-index:10000000}.plyr--fullscreen-fallback video{height:100%}.plyr--fullscreen-fallback .plyr__control .icon--exit-fullscreen{display:block}.plyr--fullscreen-fallback .plyr__control .icon--exit-fullscreen+svg{display:none}.plyr--fullscreen-fallback.plyr--hide-controls{cursor:none}@media (min-width: 1024px){.plyr--fullscreen-fallback .plyr__captions{font-size:var(--plyr-font-size-xlarge, 21px)}}.plyr__ads{border-radius:inherit;bottom:0;cursor:pointer;left:0;overflow:hidden;position:absolute;right:0;top:0;z-index:-1}.plyr__ads>div,.plyr__ads>div iframe{height:100%;position:absolute;width:100%}.plyr__ads::after{background:#23282f;border-radius:2px;bottom:var(--plyr-control-spacing, 10px);color:#fff;content:attr(data-badge-text);font-size:11px;padding:2px 6px;pointer-events:none;position:absolute;right:var(--plyr-control-spacing, 10px);z-index:3}.plyr__ads::after:empty{display:none}.plyr__cues{background:currentColor;display:block;height:var(--plyr-range-track-height, 5px);left:0;margin:-var(--plyr-range-track-height, 5px)/2 0 0;opacity:0.8;position:absolute;top:50%;width:3px;z-index:3}.plyr__preview-thumb{background-color:var(--plyr-tooltip-background, rgba(255, 255, 255, 0.9));border-radius:3px;bottom:100%;box-shadow:var(--plyr-tooltip-shadow, 0 1px 2px rgba(0, 0, 0, 0.15));margin-bottom:calc(calc(var(--plyr-control-spacing, 10px) / 2) * 2);opacity:0;padding:var(--plyr-tooltip-radius, 3px);pointer-events:none;position:absolute;transform:translate(0, 10px) scale(0.8);transform-origin:50% 100%;transition:transform 0.2s 0.1s ease, opacity 0.2s 0.1s ease;z-index:2}.plyr__preview-thumb--is-shown{opacity:1;transform:translate(0, 0) scale(1)}.plyr__preview-thumb::before{border-left:var(--plyr-tooltip-arrow-size, 4px) solid transparent;border-right:var(--plyr-tooltip-arrow-size, 4px) solid transparent;border-top:var(--plyr-tooltip-arrow-size, 4px) solid var(--plyr-tooltip-background, rgba(255, 255, 255, 0.9));bottom:calc(var(--plyr-tooltip-arrow-size, 4px) * -1);content:"";height:0;left:50%;position:absolute;transform:translateX(-50%);width:0;z-index:2}.plyr__preview-thumb__image-container{background:#c1c8d1;border-radius:calc(var(--plyr-tooltip-radius, 3px) - 1px);overflow:hidden;position:relative;z-index:0}.plyr__preview-thumb__image-container img{height:100%;left:0;max-height:none;max-width:none;position:absolute;top:0;width:100%}.plyr__preview-thumb__time-container{bottom:6px;left:0;position:absolute;right:0;white-space:nowrap;z-index:3}.plyr__preview-thumb__time-container span{background-color:rgba(0, 0, 0, 0.55);border-radius:calc(var(--plyr-tooltip-radius, 3px) - 1px);color:#fff;font-size:var(--plyr-font-size-time, var(--plyr-font-size-small, 13px));padding:3px 6px}.plyr__preview-scrubbing{bottom:0;filter:blur(1px);height:100%;left:0;margin:auto;opacity:0;overflow:hidden;pointer-events:none;position:absolute;right:0;top:0;transition:opacity 0.3s ease;width:100%;z-index:1}.plyr__preview-scrubbing--is-shown{opacity:1}.plyr__preview-scrubbing img{height:100%;left:0;max-height:none;max-width:none;object-fit:contain;position:absolute;top:0;width:100%}.plyr--no-transition{transition:none !important}.plyr__sr-only{clip:rect(1px, 1px, 1px, 1px);overflow:hidden;border:0 !important;height:1px !important;padding:0 !important;position:absolute !important;width:1px !important}.plyr [hidden]{display:none !important}video,iframe{max-width:100%}.plyr__video-wrapper{height:100%}.presto-player__wrapper{position:relative;font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"}.presto-player__wrapper.rtl{direction:rtl}.presto-player__wrapper img{max-width:100%}.presto-player__wrapper .plyr.plyr--video.plyr--menu-open{overflow:hidden}.presto-player__wrapper .plyr--fullscreen-fallback.plyr--vimeo .plyr__video-wrapper{top:50%;transform:translateY(-50%)}.presto-player__wrapper .plyr--fullscreen-fallback.plyr{border-radius:0 !important}.presto-player__wrapper .plyr--fullscreen-fallback.plyr iframe{border-radius:0 !important}.presto-player__wrapper .plyr__menu__container{overflow:auto}.presto-player__wrapper .plyr__menu__container:after{display:none}.presto-player__wrapper img{border:none}.presto-player__wrapper video{margin:auto}.presto-player__wrapper iframe{height:100%}.presto-player__wrapper .plyr--video .plyr__control:active,.presto-player__wrapper .plyr--video .plyr__control:focus{background:#00b3ff;background:var(--plyr-video-control-background-hover, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));color:#fff;color:var(--plyr-video-control-color-hover, #fff)}.presto-player__wrapper .plyr__poster{background-size:cover;z-index:2}.presto-player__wrapper .presto-player__logo{margin:0;display:block;position:absolute;z-index:3;opacity:0.5;object-fit:contain;transition:bottom 0.4s ease-in-out;max-width:var(--presto-player-logo-width, 75px)}.presto-player__wrapper .presto-player__logo.is-bottom-right{left:auto;right:20px;top:auto;bottom:60px}.presto-player__wrapper .presto-player__logo.is-bottom-left{left:20px;right:auto;top:auto;bottom:60px}@media screen and (min-width: 380px){.presto-player__wrapper.presto-player--hide-controls .presto-player__logo.is-bottom-right,.presto-player__wrapper.presto-player--hide-controls .presto-player__logo.is-bottom-left,.presto-player__wrapper .plyr--hide-controls .presto-player__logo.is-bottom-right,.presto-player__wrapper .plyr--hide-controls .presto-player__logo.is-bottom-left{bottom:20px}}.presto-player__wrapper .presto-player-progress__marker{width:16px;height:16px;padding:0;border:2px solid rgba(255, 255, 255, 0.5);position:absolute;border-radius:9999px;bottom:calc(50% - 8px);z-index:9;margin-left:-8px !important}.presto-player__wrapper.presto-player--ended .plyr--youtube .plyr__poster{display:none}.presto-player__wrapper.presto-player--ended .plyr--youtube .plyr__control.plyr__control--overlaid{display:none}.presto-player__wrapper button.plyr__control.plyr__control--overlaid:focus{background:inherit;border:none;outline:0;position:absolute;top:50%;transform:translate(-50%, -50%)}.presto-player__wrapper .plyr__controls__item.plyr__progress__container{position:relative}.presto-player__wrapper .plyr--full-ui.plyr--video input[type=range]::-webkit-slider-runnable-track{box-shadow:none}.presto-player__wrapper .plyr--video .plyr__controls{background:var(--plyr-video-controls-background, linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.75)))}.presto-player__wrapper .presto-player-toc{font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";line-height:1.4;position:absolute;top:auto;right:0;left:0;bottom:0;max-height:calc(100%);max-width:calc(100%);background:rgba(255, 255, 255, 0.9);background:var(--plyr-menu-background, rgba(255, 255, 255, 0.9));left:auto;padding:20px 15px;border-radius:4px;width:100%;z-index:9;box-shadow:0 1px 2px rgba(0, 0, 0, 0.15);box-shadow:var(--plyr-menu-shadow, 0 1px 2px rgba(0, 0, 0, 0.15));color:#4a5464;color:var(--plyr-menu-color, #4a5464);font-size:15px;font-size:var(--plyr-font-size-base, 15px);white-space:nowrap;z-index:3;display:flex;flex-direction:column;transition:bottom 0.25s ease}@media screen and (min-width: 380px){.presto-player__wrapper .presto-player-toc{right:20px;bottom:60px;width:300px;max-height:calc(100% - 80px);max-width:calc(100vw - 70px)}}.presto-player__wrapper .presto-player-toc__wrapper{position:absolute;top:0;left:0;bottom:0;right:0;z-index:3;visibility:hidden;opacity:0;transition:opacity 0.3s ease-in-out, visibility 0.3s ease-in-out}.presto-player__wrapper .presto-player-toc__wrapper.is-showing{visibility:visible;opacity:1}.presto-player__wrapper .presto-player-toc__cover{position:absolute;top:0;left:0;bottom:0;right:0;z-index:3}.presto-player__wrapper .presto-player-toc__list{flex:1;overflow:auto}.presto-player__wrapper .presto-player-toc__title{font-size:12px;font-weight:bold;margin-bottom:10px;margin-left:10px;margin-right:10px;display:none}@media screen and (min-width: 380px){.presto-player__wrapper .presto-player-toc__title{display:block}}.presto-player__wrapper .presto-player-toc__name{white-space:nowrap;overflow:hidden;width:100%;text-overflow:ellipsis}.presto-player__wrapper .presto-player-toc__chapter{padding:12px;border-radius:3px;cursor:pointer;line-height:1;display:flex;align-items:center;transition:background-color 0.4s ease, color 0.4s ease;margin-bottom:2px;position:relative}.presto-player__wrapper .presto-player-toc__chapter:last-child{margin-bottom:0}.presto-player__wrapper .presto-player-toc__chapter.is-highlighted,.presto-player__wrapper .presto-player-toc__chapter:hover{background:#00b3ff;background:var(--plyr-video-control-background-hover, var(--plyr-color-main, var(--plyr-color-main, #00b3ff)));color:#fff;color:var(--plyr-video-control-color-hover, #fff)}.presto-player__wrapper .presto-player-toc__chapter.is-highlighted{padding-right:30px}.presto-player__wrapper .presto-player-toc__chapter.is-highlighted:after{background:rgba(255, 255, 255, 0.5);content:"";display:block;flex-shrink:0;height:8px;width:8px;margin-right:10px;margin-right:var(--plyr-control-spacing, 10px);transition:all 0.3s ease;border-radius:9999px;position:absolute;right:7px}.presto-player__wrapper .presto-player-toc__order{margin-right:12px;opacity:0.5}.presto-player__wrapper.rtl{direction:rtl}.presto-player__wrapper.rtl .presto-player-toc__order{order:2;margin-left:12px;margin-right:0}.presto-player__wrapper.rtl .presto-player-toc__name{direction:rtl}.presto-player__wrapper .presto-player-error{position:absolute;top:0;left:0;bottom:0;right:0;background:rgba(0, 0, 0, 0.9);color:#fff;display:flex;align-items:center;justify-content:center;z-index:10;text-align:center}.presto-player__wrapper .presto-player-error__title{font-size:18px;font-weight:bold;margin-bottom:8px}.presto-player__wrapper .presto-player-error__description{opacity:0.75}.presto-player__wrapper.hide-youtube-ui .plyr__video-embed iframe{top:-50%;height:200%}.presto-player__wrapper .plyr--vimeo.plyr--playing .plyr__video-embed__container{pointer-events:none}.presto-player__wrapper .plyr__control--overlaid{border-radius:6px;padding-left:26px;padding-right:26px;position:absolute !important;top:50% !important}.presto-player__wrapper.skin-stacked .plyr__controls{flex-wrap:wrap}.presto-player__wrapper.skin-stacked .presto-player-progress__marker{transform:scale(0.75)}.presto-player__wrapper.skin-stacked .plyr__controls{justify-content:flex-start}.presto-player__wrapper.skin-stacked .plyr__controls__item.plyr__progress__container{order:-1;flex:1 0 100%}.presto-player__wrapper.skin-stacked .plyr__controls__item.plyr__progress__container+:not(.plyr__time),.presto-player__wrapper.skin-stacked .plyr__controls__item.plyr__progress__container+.plyr__time+*{margin-left:auto}.presto-player__wrapper.skin-stacked .plyr__controls .plyr__controls__item:first-child{margin:0}.presto-player__wrapper.skin-stacked .plyr__progress{height:19px;display:flex;align-items:center}.presto-player__wrapper.skin-stacked .plyr__progress .plyr__progress__buffer{height:3px;transition:all 0.25s ease;position:absolute;top:calc(50% + 1px)}.presto-player__wrapper.skin-stacked .plyr__progress input[type=range]::-moz-range-track{height:3px;transition:all 0.25s ease}.presto-player__wrapper.skin-stacked .plyr__progress input[type=range]::-webkit-slider-runnable-track{height:3px;transition:all 0.25s ease}.presto-player__wrapper.skin-stacked .plyr__progress input[type=range]::-ms-track{height:3px;transition:all 0.25s ease}.presto-player__wrapper.skin-stacked .plyr__progress input[type=range]::-ms-fill-upper{height:3px;transition:all 0.25s ease}.presto-player__wrapper.skin-stacked .plyr__progress input[type=range]::-ms-fill-lower{height:3px;transition:height 0.25s ease}.presto-player__wrapper.skin-stacked .plyr__progress input[type=range]::-webkit-slider-thumb{visibility:hidden;opacity:0;transition:opacity 0.25s ease}.presto-player__wrapper.skin-stacked .plyr__progress input[type=range]::-moz-range-thumb{visibility:hidden;opacity:0;transition:opacity 0.25s ease}.presto-player__wrapper.skin-stacked .plyr__progress input[type=range]::-ms-thumb{visibility:hidden;opacity:0;transition:opacity 0.25s ease}.presto-player__wrapper.skin-stacked .plyr__progress__container:hover .presto-player-progress__marker{transform:scale(1)}.presto-player__wrapper.skin-stacked .plyr__progress__container:hover .plyr__progress .plyr__progress__buffer{height:5px;top:calc(50%)}.presto-player__wrapper.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]{overflow:visible}.presto-player__wrapper.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-moz-range-track{height:5px}.presto-player__wrapper.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-webkit-slider-runnable-track{height:5px}.presto-player__wrapper.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-ms-track{height:5px}.presto-player__wrapper.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-ms-fill-upper{height:5px}.presto-player__wrapper.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-ms-fill-lower{height:5px}.presto-player__wrapper.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-webkit-slider-thumb{visibility:visible;opacity:1}.presto-player__wrapper.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-moz-range-thumb{visibility:visible;opacity:1}.presto-player__wrapper.skin-stacked .plyr__progress__container:hover .plyr__progress input[type=range]::-ms-thumb{visibility:visible;opacity:1}.presto-sticky-parent{z-index:99998}@media screen and (min-width: 960px){.presto-sticky{--presto-sticky-space:15px;position:fixed;z-index:3000;max-width:var(--presto-sticky-width, 380px);width:100vw}.presto-sticky .plyr__controls,.presto-sticky .presto-player-toc__wrapper,.presto-sticky presto-action-bar,.presto-sticky .presto-player__logo{display:none}.presto-sticky--top-left{top:var(--presto-sticky-space);left:var(--presto-sticky-space)}.presto-sticky--top-center{top:var(--presto-sticky-space);left:0;right:0;margin:0 auto}.presto-sticky--top-right{top:var(--presto-sticky-space);right:var(--presto-sticky-space)}.presto-sticky--center-left{top:0;bottom:0;margin:auto 0;left:var(--presto-sticky-space);display:flex;align-items:center}.presto-sticky--center-center{top:0;bottom:0;right:0;left:0;margin:auto;display:flex;align-items:center}.presto-sticky--center-right{top:0;bottom:0;margin:auto 0;right:var(--presto-sticky-space);display:flex;align-items:center}.presto-sticky--bottom-left{bottom:var(--presto-sticky-space);left:var(--presto-sticky-space)}.presto-sticky--bottom-center{bottom:var(--presto-sticky-space);left:0;right:0;margin:0 auto}.presto-sticky--bottom-right{bottom:var(--presto-sticky-space);right:var(--presto-sticky-space)}}.presto-player__overlay{position:absolute;top:50%;left:50%;z-index:3}.presto-player__muted-overlay{position:absolute;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center}.presto-player__muted-overlay .plyr__control--overlaid{display:block;opacity:1;visibility:visible}.presto-player__wrapper.is-muted-overlay{cursor:pointer}.presto-player__wrapper.is-muted-overlay .plyr--playing .presto-player__muted-overlay .plyr__control--overlaid{opacity:1;visibility:visible}.presto-player__wrapper.is-muted-overlay .presto-player__logo{display:none}.presto-player__wrapper.is-muted-overlay .plyr__controls{display:none}.presto-player__wrapper.is-muted-overlay .plyr .plyr__controls:not(:empty)~.plyr__captions{transform:translateY(0) !important}.presto-player__wrapper.rtl .plyr__captions{direction:rtl}.presto-player__wrapper.caption-style-full .plyr__captions{background:var(--plyr-captions-background, rgba(0, 0, 0, 0.8));padding-top:0;padding-bottom:0}.presto-player__wrapper.caption-style-full .plyr:not(.plyr--hide-controls):not(.is-muted-overlay) .plyr__controls:not(:empty)~.plyr__captions{transform:translateY(calc(var(--plyr-control-spacing, 13px) * -4))}.presto-player__wrapper.caption-style-full.skin-stacked .plyr:not(.plyr--hide-controls):not(.is-muted-overlay) .plyr__controls:not(:empty)~.plyr__captions{transform:translateY(calc(var(--plyr-control-spacing, 17px) * -4))}.presto-player__play-cover{cursor:pointer;position:absolute;top:0;left:0;right:0;bottom:0;z-index:99}.presto-player__chapters{width:100%;position:absolute;top:0;height:100%}.presto-player__chapter-markers{margin:0 8px;height:100%;position:relative}.presto-player-progress__marker.plyr__controls__item.plyr__control:hover{border:0;background:#fff}.presto-iframe-fallback-container{position:relative;padding-bottom:56.25%;padding-top:30px;height:0;overflow:hidden}.presto-iframe-fallback-container embed,.presto-iframe-fallback-container iframe,.presto-iframe-fallback-container object{position:absolute;top:0;left:0;width:100%;height:100%}'}}]),k}(g(HTMLElement)),Lo=function(e,t){return en(t)},Eo=function(e){Object(c.a)(i,e);var t=Li(i);function i(){var e;return Object(o.a)(this,i),(e=t.call(this)).__registerHost(),si(Object(l.a)(e)),e.prestoBlur=Rt(Object(l.a)(e),"prestoBlur",7),e.prestoFocus=Rt(Object(l.a)(e),"prestoFocus",7),e.hasFocus=!1,e.hasLabel=!1,e.hasPrefix=!1,e.hasSuffix=!1,e.type="default",e.size="medium",e.full=!1,e.disabled=!1,e.submit=!1,e}return Object(s.a)(i,[{key:"componentWillLoad",value:function(){this.handleSlotChange()}},{key:"click",value:function(){this.button.click()}},{key:"focus",value:function(e){this.button.focus(e)}},{key:"blur",value:function(){this.button.blur()}},{key:"handleSlotChange",value:function(){this.hasLabel=!!this.button.children,this.hasPrefix=!!this.button.querySelector('[slot="prefix"]'),this.hasSuffix=!!this.button.querySelector('[slot="suffix"]')}},{key:"handleBlur",value:function(){this.hasFocus=!1,this.prestoBlur.emit()}},{key:"handleFocus",value:function(){this.hasFocus=!0,this.prestoFocus.emit()}},{key:"handleClick",value:function(e){this.disabled&&(e.preventDefault(),e.stopPropagation())}},{key:"render",value:function(){var e=this,t=!!this.href,i=dt(Lo,null,dt("span",{part:"prefix",class:"button__prefix"},dt("slot",{onSlotchange:function(){return e.handleSlotChange()},name:"prefix"})),dt("span",{part:"label",class:"button__label"},dt("slot",{onSlotchange:function(){return e.handleSlotChange()}})),dt("span",{part:"suffix",class:"button__suffix"},dt("slot",{onSlotchange:function(){return e.handleSlotChange()},name:"suffix"}))),n=dt("button",{part:"base",class:{button:!0,"button--default":"default"===this.type,"button--primary":"primary"===this.type,"button--success":"success"===this.type,"button--info":"info"===this.type,"button--warning":"warning"===this.type,"button--danger":"danger"===this.type,"button--text":"text"===this.type,"button--small":"small"===this.size,"button--medium":"medium"===this.size,"button--large":"large"===this.size,"button--disabled":this.disabled,"button--focused":this.hasFocus,"button--has-label":this.hasLabel,"button--has-prefix":this.hasPrefix,"button--has-suffix":this.hasSuffix},disabled:this.disabled,type:this.submit?"submit":"button",name:this.name,value:this.value,onBlur:function(){return e.handleBlur},onFocus:function(){return e.handleFocus},onClick:function(){return e.handleClick}},i),r=dt("a",{part:"base",class:{button:!0,"button--default":"default"===this.type,"button--primary":"primary"===this.type,"button--success":"success"===this.type,"button--info":"info"===this.type,"button--warning":"warning"===this.type,"button--danger":"danger"===this.type,"button--text":"text"===this.type,"button--small":"small"===this.size,"button--medium":"medium"===this.size,"button--large":"large"===this.size,"button--disabled":this.disabled,"button--focused":this.hasFocus,"button--has-label":this.hasLabel,"button--has-prefix":this.hasPrefix,"button--has-suffix":this.hasSuffix},href:this.href,target:this.target,download:this.download,rel:this.target?"noreferrer noopener":void 0,role:"button","aria-disabled":this.disabled?"true":"false",tabindex:this.disabled?"-1":"0",onBlur:function(){return e.handleBlur},onFocus:function(){return e.handleFocus},onClick:function(){return e.handleClick}},i);return t?r:n}},{key:"button",get:function(){return this}}],[{key:"style",get:function(){return":host{display:inline-block;width:auto;cursor:pointer}:host([full]){display:block}.button{display:inline-flex;align-items:stretch;justify-content:center;width:100%;border-style:solid;border-width:var(--presto-player-button-border-width);font-family:var(--plyr-font-family, inherit);font-weight:var(--presto-player-button-font-weight, 500);text-decoration:none;user-select:none;white-space:nowrap;vertical-align:middle;padding:0;transition:var(--presto--player-transition-fast, 150ms) background-color, var(--presto-player-transition-fast, 150ms) color, var(--presto-player-transition-fast, 150ms) border, var(--presto--player-transition-fast, 150ms) box-shadow;cursor:inherit;border-radius:var(--presto-player-button-border-radius, 0.25rem)}.button::-moz-focus-inner{border:0}.button:focus{outline:none}.button.button--disabled{opacity:0.5;cursor:not-allowed}.button.button--disabled *{pointer-events:none}.button ::slotted(.presto--icon){pointer-events:none}.button__prefix,.button__suffix{flex:0 0 auto;display:flex;align-items:center}.button__label{display:flex;align-items:center}.button__label ::slotted(presto-icon){vertical-align:-2px}.button.button--default{background-color:var(--presto-player-color-white, #fff);border-color:var(--presto-player-color-gray-300, #d1d5db);color:var(--presto-player-color-gray-600, #4b5563)}.button.button--default:hover:not(.button--disabled){border-color:var(--presto-player-button-color, var(--plyr-color-main));color:var(--presto-player-button-color, var(--plyr-color-main));opacity:0.75}.button.button--default:focus:not(.button--disabled){border-color:var(--presto-player-button-color, var(--plyr-color-main));color:var(--presto-player-button-color, var(--plyr-color-main));opacity:1}.button.button--default:active:not(.button--disabled){border-color:var(--presto-player-button-color, var(--plyr-color-main));color:var(--presto-player-button-color, var(--plyr-color-main));opacity:1}.button.button--primary{background-color:var(--presto-player-button-color, var(--plyr-color-main));border-color:var(--presto-player-button-color, var(--plyr-color-main));color:var(--presto-player-button-text, #fff)}.button.button--primary:hover:not(.button--disabled){opacity:0.9}.button.button--primary:focus:not(.button--disabled){opacity:1}.button.button--primary:active:not(.button--disabled){opacity:1}.button--text{background-color:transparent;border-color:transparent;color:var(--presto-player-button-color, var(--plyr-color-main))}.button--text:hover:not(.button--disabled){background-color:transparent;border-color:transparent;opacity:0.8}.button--text:focus:not(.button--disabled){background-color:transparent;border-color:transparent;opacity:0.7}.button--text:active:not(.button--disabled){background-color:transparent;border-color:transparent;opacity:0.7}.button--small{font-size:var(--presto-player-button-font-size-small, 0.875rem);height:var(--presto-player-button-height-small, 1.875rem);line-height:calc(var(--presto-player-button-height-small, 1.875rem) - var(--presto-player-button-border-width, 1px) * 2)}.button--medium{font-size:var(--presto-player-button-font-size-medium, 1rem);height:var(--presto-player-button-height-medium, 2.5rem);line-height:calc(var(--presto-player-button-height-medium, 2.5rem) - var(--presto-player-button-border-width, 1px) * 2)}.button--large{font-size:var(--presto-player-button-font-size-large, 1.25rem);height:var(--presto-player-button-height-large, 3.125rem);line-height:calc(var(--presto-player-button-height-large, 3.125rem) - var(--presto-player-button-border-width, 1px) * 2)}.button--full{display:block}.button--has-label.button--small .button__label{padding:0 var(--presto-player-button-spacing-small, 0.75rem)}.button--has-label.button--medium .button__label{padding:0 var(--presto-player-button-spacing-medium, 1rem)}.button--has-label.button--large .button__label{padding:0 var(--presto-player-button-spacing-large, 1.25rem)}.button--has-prefix.button--small{padding-left:var(--presto-player-button-spacing-x-small, 0.5rem)}.button--has-prefix.button--small .button__label{padding-left:var(--presto-player-button-spacing-x-small, 0.5rem)}.button--has-prefix.button--medium{padding-left:var(--presto-player-button-spacing-small, 0.75rem)}.button--has-prefix.button--medium .button__label{padding-left:var(--presto-player-button-spacing-small, 0.75rem)}.button--has-prefix.button--large{padding-left:var(--presto-player-button-spacing-small, 0.75rem)}.button--has-prefix.button--large .button__label{padding-left:var(--presto-player-button-spacing-small, 0.75rem)}.button--has-suffix.button--small,.button--caret.button--small{padding-right:var(--presto-player-button-spacing-x-small, 0.5rem)}.button--has-suffix.button--small .button__label,.button--caret.button--small .button__label{padding-right:var(--presto-player-button-spacing-x-small, 0.5rem)}.button--has-suffix.button--medium,.button--caret.button--medium{padding-right:var(--presto-player-button-spacing-small, 0.75rem)}.button--has-suffix.button--medium .button__label,.button--caret.button--medium .button__label{padding-right:var(--presto-player-button-spacing-small, 0.75rem)}.button--has-suffix.button--large,.button--caret.button--large{padding-right:var(--presto-player-button-spacing-small, 0.75rem)}.button--has-suffix.button--large .button__label,.button--caret.button--large .button__label{padding-right:var(--presto-player-button-spacing-small, 0.75rem)}"}}]),i}(g(HTMLElement)),Mo=function(e){Object(c.a)(i,e);var t=Li(i);function i(){var e;return Object(o.a)(this,i),(e=t.call(this)).__registerHost(),si(Object(l.a)(e)),e.effect="sheen",e}return Object(s.a)(i,[{key:"render",value:function(){return dt("div",{part:"base",class:{skeleton:!0,"skeleton--pulse":"pulse"===this.effect,"skeleton--sheen":"sheen"===this.effect},"aria-busy":"true","aria-live":"polite"},dt("div",{part:"indicator",class:"skeleton__indicator"}))}}],[{key:"style",get:function(){return":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:inherit}:host{--border-radius:var(--presto-player-border-radius-pill);--color:#e5e7eb;--sheen-color:#f3f4f6;display:block;position:relative}.skeleton{display:flex;width:100%;height:100%;min-height:1rem}.skeleton__indicator{flex:1 1 auto;background:var(--color);border-radius:var(--border-radius)}.skeleton--sheen .skeleton__indicator{background:linear-gradient(270deg, var(--sheen-color), var(--color), var(--color), var(--sheen-color));background-size:400% 100%;background-size:400% 100%;animation:sheen 8s ease-in-out infinite}.skeleton--pulse .skeleton__indicator{animation:pulse 2s ease-in-out 0.5s infinite}@keyframes sheen{0%{background-position:200% 0}to{background-position:-200% 0}}@keyframes pulse{0%{opacity:1}50%{opacity:0.4}100%{opacity:1}}"}}]),i}(g(HTMLElement)),Oo=function(e){Object(c.a)(i,e);var t=Li(i);function i(){var e;return Object(o.a)(this,i),(e=t.call(this)).__registerHost(),si(Object(l.a)(e)),e}return Object(s.a)(i,[{key:"render",value:function(){return dt("span",{part:"base",class:"spinner","aria-busy":"true","aria-live":"polite"})}}],[{key:"style",get:function(){return":host{position:relative;box-sizing:border-box;--track-color:#0d131e20;--indicator-color:var(--plyr-color-main);--stroke-width:2px;display:inline-flex}:host *,:host *:before,:host *:after{box-sizing:inherit}.spinner{display:inline-block;width:1em;height:1em;border-radius:50%;border:solid var(--stroke-width) var(--track-color);border-top-color:var(--indicator-color);border-right-color:var(--indicator-color);animation:1s linear infinite spin}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}"}}]),i}(g(HTMLElement)),Io=function(e){Object(c.a)(i,e);var t=Li(i);function i(){var e;return Object(o.a)(this,i),(e=t.call(this)).__registerHost(),e}return Object(s.a)(i,[{key:"render",value:function(){return dt("video",{class:"presto-player__player",part:"video",ref:this.getRef,autoplay:this.autoplay,preload:this.preload,"data-poster":this.poster,playsinline:this.playsinline},dt("source",{src:this.src}),!!this.tracks&&!!this.tracks.length&&this.tracks.map((function(e){return dt("track",{kind:"captions",label:(null==e?void 0:e.label)?e.label:"Captions",src:null==e?void 0:e.src,srclang:(null==e?void 0:e.srcLang)?null==e?void 0:e.srcLang:"en"})})))}}],[{key:"style",get:function(){return":host{display:block}"}}]),i}(g(HTMLElement)),Do=function(e){Object(c.a)(i,e);var t=Li(i);function i(){var e;return Object(o.a)(this,i),(e=t.call(this)).__registerHost(),si(Object(l.a)(e)),e}return Object(s.a)(i,[{key:"render",value:function(){return dt("div",{class:"curtain"},dt("div",{class:"content",part:"curtain-content"},dt("slot",null)))}}],[{key:"style",get:function(){return':host{font-size:16px}.curtain{font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";background-color:#000;text-align:center;color:#fff;padding-bottom:56.25%;position:relative;font-size:1.5em}::slotted(:not(:first-child)){margin-top:14px}.content{position:absolute;inset:0;display:flex;justify-content:center;align-items:center;flex-direction:column;padding:48px}'}}]),i}(g(HTMLElement)),zo=function(e){Object(c.a)(i,e);var t=Li(i);function i(){var e;return Object(o.a)(this,i),(e=t.call(this)).__registerHost(),e}return Object(s.a)(i,[{key:"getId",value:function(e){var t=/^.*(vimeo\.com\/)((channels\/[A-z]+\/)|(groups\/[A-z]+\/videos\/))?([0-9]+)/.exec(e||"");return(null==t?void 0:t[5])||""}},{key:"render",value:function(){if(this.src)return Oi()?dt("div",{class:"presto-iframe-fallback-container"},dt("iframe",{src:"https://player.vimeo.com/video/".concat(this.getId(this.src),"?loop=false&amp;byline=false&amp;portrait=false&amp;title=false&amp;speed=true&amp;transparent=0&amp;gesture=media"),allowFullScreen:!0,allowTransparency:!0,allow:"autoplay",style:{width:"100%"},class:"presto-fallback-iframe"})):dt("div",{class:"plyr__video-embed",part:"embed",ref:this.getRef,"data-plyr-provider":"vimeo","data-plyr-embed-id":this.getId(this.src)})}}],[{key:"style",get:function(){return":host{display:block}"}}]),i}(g(HTMLElement)),No=function(e){Object(c.a)(i,e);var t=Li(i);function i(){var e;return Object(o.a)(this,i),(e=t.call(this)).__registerHost(),e.reload=Rt(Object(l.a)(e),"reload",7),e}return Object(s.a)(i,[{key:"handlePlayerChange",value:function(){this.player&&(this.player.ratio="16:9",this.fixes())}},{key:"fixes",value:function(){var e=this;this.player.on("statechange",(function(t){var i,n,r,a,o;1===t.detail.code&&((null===(o=null===(a=null===(r=null===(n=null===(i=null==t?void 0:t.detail)||void 0===i?void 0:i.plyr)||void 0===n?void 0:n.config)||void 0===r?void 0:r.blockAttributes)||void 0===a?void 0:a.mutedPreview)||void 0===o?void 0:o.enabled)||(e.player.muted=!1))}))}},{key:"getId",value:function(e){var t,i=(e||"").match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/);return i&&11===(null===(t=null==i?void 0:i[2])||void 0===t?void 0:t.length)?i[2]:null}},{key:"loadPlayer",value:function(){this.lazyLoad=!1,this.reloadPlayer=!0}},{key:"componentDidRender",value:function(){this.reloadPlayer&&(this.reloadPlayer=!1,this.reload.emit("play"))}},{key:"setWebView",value:function(){var e,t=null===(e=window.navigator)||void 0===e?void 0:e.standalone,i=window.navigator.userAgent.toLowerCase(),n=/safari/.test(i),r=/iphone|ipod|ipad/.test(i);this.isWebView=r?!t&&!n:i.includes("wv")}},{key:"componentWillLoad",value:function(){this.setWebView(),this.poster||(this.poster="//img.youtube.com/vi/".concat(this.getId(this.src),"/maxresdefault.jpg")),this.lazyLoad&&"iOS"===Mi()&&(this.lazyLoad=!1)}},{key:"render",value:function(){var e=this;return this.isWebView?dt("div",{class:"fallback-container"},dt("iframe",{src:this.src,allowFullScreen:!0,allowtransparency:!0,allow:"autoplay"})):this.lazyLoad?dt("div",null,dt("presto-video",{part:"video",getRef:this.getRef,poster:this.poster,src:""}),dt("div",{class:"presto-player__play-cover",onClick:function(){return e.loadPlayer()}})):dt("div",{class:"plyr__video-embed",part:"embed",ref:this.getRef,"data-plyr-provider":"youtube","data-plyr-embed-id":this.getId(this.src)})}}],[{key:"watchers",get:function(){return{player:["handlePlayerChange"]}}},{key:"style",get:function(){return":host{display:block}.fallback-container{position:relative;padding-bottom:56.25%;padding-top:30px;height:0;overflow:hidden}.fallback-container iframe,.fallback-container object,.fallback-container embed{position:absolute;top:0;left:0;width:100%;height:100%}"}}]),i}(g(HTMLElement)),Ro=function(e){Object(c.a)(i,e);var t=Li(i);function i(){var e;return Object(o.a)(this,i),(e=t.call(this)).__registerHost(),e.layout="default",e}return Object(s.a)(i,[{key:"waitForApi",value:function(e){var t=setInterval((function(){var i;(null===(i=null===window||void 0===window?void 0:window.gapi)||void 0===i?void 0:i.ytsubscribe)&&(clearInterval(t),e())}),50)}},{key:"componentDidLoad",value:function(){var e=this,t=document.createElement("script");t.type="text/javascript",t.async=!1,t.src="https://apis.google.com/js/platform.js";var i=document.getElementsByTagName("script")[0];i&&i.parentNode.insertBefore(t,i),this.waitForApi((function(){window.gapi.ytsubscribe.render(e.textInput,{channelId:e.channel,layout:e.layout,count:e.showCount?"default":"hidden"})}))}},{key:"render",value:function(){var e=this;return dt("div",{class:"g-ytsubscribe",ref:function(t){return e.textInput=t}})}}],[{key:"style",get:function(){return":host{display:block}"}}]),i}(g(HTMLElement)),Fo=oi(Ii,[1,"presto-action-bar",{config:[16],currentTime:[2,"current-time"],duration:[2],direction:[1],youtube:[16],show:[32],youtubeRenderKey:[32]}]),Ho=oi(Di,[1,"presto-action-bar-ui",{open:[4]}]),Yo=oi(zi,[0,"presto-bunny",{getRef:[1040],autoplay:[4],src:[1],preload:[1],poster:[1025],player:[8],tracks:[16],playsinline:[4],provider:[1],thumbnail:[1],previewUrl:[1,"preview-url"]}]),jo=oi(Ni,[0,"presto-cta-overlay",{player:[8],preset:[16],videoId:[2,"video-id"],i18n:[16],currentTime:[2,"current-time"],duration:[2],direction:[1],enabled:[32],show:[32],loading:[32],error:[32],skipped:[32],percentagePassed:[32],ended:[32]}]),$o=oi(Fi,[1,"presto-cta-overlay-ui",{headline:[1],defaultHeadline:[1,"default-headline"],bottomText:[1,"bottom-text"],showButton:[4,"show-button"],buttonText:[1,"button-text"],buttonType:[1,"button-type"],buttonLink:[16],allowRewatch:[4,"allow-rewatch"],allowSkip:[4,"allow-skip"],skipText:[1,"skip-text"],rewatchText:[1,"rewatch-text"],direction:[1]}]),Xo=oi(Hi,[1,"presto-dynamic-overlay-ui",{href:[1],target:[1],position:[1]}]),Bo=oi(Yi,[1,"presto-dynamic-overlays",{overlays:[16],currentTime:[2,"current-time"],enabled:[4]}]),Wo=oi(ji,[0,"presto-email-overlay",{player:[8],preset:[16],videoId:[2,"video-id"],i18n:[16],currentTime:[2,"current-time"],duration:[2],direction:[1],enabled:[32],show:[32],loading:[32],error:[32]}]),Vo=oi($i,[1,"presto-email-overlay-ui",{headline:[1],defaultHeadline:[1,"default-headline"],bottomText:[1,"bottom-text"],buttonText:[1,"button-text"],placeholder:[1],allowSkip:[4,"allow-skip"],borderRadius:[2,"border-radius"],skipText:[1,"skip-text"],isLoading:[4,"is-loading"],errorMessage:[1,"error-message"],direction:[1],email:[32]}]),Go=oi(Xi,[0,"presto-muted-overlay",{mutedPreview:[4,"muted-preview"],mutedOverlay:[16],preset:[16]}]),Uo=oi(Po,[1,"presto-player",{video_id:[2],iconUrl:[1,"icon-url"],src:[1],bunny:[16],branding:[16],config:[16],preset:[16],chapters:[16],overlays:[16],blockAttributes:[16],tracks:[16],analytics:[4],automations:[4],provider:[1],provider_video_id:[1],actionBar:[16],youtube:[16],type:[1],autoplay:[1540],preload:[1],poster:[1],playsinline:[4],isAdmin:[4,"is-admin"],direction:[1],css:[1],currentTime:[1026,"current-time"],player:[32],playerEl:[32],shouldLazyLoad:[32],mutedPreview:[32],duration:[32],isSticky:[32],videoHeight:[32],playClass:[32],previouslyPlaying:[32]},[[8,"visibilitychange","playVideoOnlyInViewport"]]]),qo=oi(Eo,[1,"presto-player-button",{type:[513],size:[513],full:[516],disabled:[516],submit:[516],name:[1],value:[1],href:[1],target:[513],download:[1],hasFocus:[32],hasLabel:[32],hasPrefix:[32],hasSuffix:[32]}]),Zo=oi(Mo,[1,"presto-player-skeleton",{effect:[1]}]),Jo=oi(Oo,[1,"presto-player-spinner"]),Qo=oi(Io,[0,"presto-video",{getRef:[1040],autoplay:[4],src:[1],preload:[1],poster:[1],player:[8],tracks:[16],playsinline:[4],provider:[1]}]),Ko=oi(Do,[1,"presto-video-curtain-ui",{actionUrl:[1,"action-url"]}]),es=oi(zo,[0,"presto-vimeo",{src:[1],poster:[1],player:[8],getRef:[1040]}]),ts=oi(No,[0,"presto-youtube",{src:[1],poster:[1025],lazyLoad:[1028,"lazy-load"],player:[8],getRef:[1040],reloadPlayer:[32],isWebView:[32]}]),is=oi(Ro,[0,"presto-youtube-subscribe-button",{channel:[1],layout:[1],showCount:[4,"show-count"]}]),ns=function(e){"undefined"!=typeof customElements&&[Fo,Ho,Yo,jo,$o,Xo,Bo,Wo,Vo,Go,Uo,qo,Zo,Jo,Qo,Ko,es,ts,is].forEach((function(t){customElements.get(t.is)||customElements.define(t.is,t,e)}))}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t){(function(t){e.exports=t}).call(this,{})},function(e,t,i){"use strict";var n=Object.prototype.hasOwnProperty;function r(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}function a(e){try{return encodeURIComponent(e)}catch(e){return null}}t.stringify=function(e,t){t=t||"";var i,r,o=[];for(r in"string"!=typeof t&&(t="?"),e)if(n.call(e,r)){if((i=e[r])||null!=i&&!isNaN(i)||(i=""),r=a(r),i=a(i),null===r||null===i)continue;o.push(r+"="+i)}return o.length?t+o.join("&"):""},t.parse=function(e){for(var t,i=/([^=?#&]+)=?([^&]*)/g,n={};t=i.exec(e);){var a=r(t[1]),o=r(t[2]);null===a||null===o||a in n||(n[a]=o)}return n}},function(e,t,i){(function(e){var n,r,a,o,s=i(12);window,o=function(){return function(e){var t={};function i(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==s(e)&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=4)}([function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(t,i,n){void 0===t&&(t=null),void 0===i&&(i=null),void 0===n&&(n="en-US"),this.dateInstance="object"==s(i)&&null!==i?i.parse(t instanceof e?t.clone().toJSDate():t):"string"==typeof i?e.parseDateTime(t,i,n):t?e.parseDateTime(t):e.parseDateTime(new Date),this.lang=n}return e.parseDateTime=function(t,i,n){if(void 0===i&&(i="YYYY-MM-DD"),void 0===n&&(n="en-US"),!t)return new Date(NaN);if(t instanceof Date)return new Date(t);if(t instanceof e)return t.clone().toJSDate();if(/^-?\d{10,}$/.test(t))return e.getDateZeroTime(new Date(Number(t)));if("string"==typeof t){for(var r=[],a=null;null!=(a=e.regex.exec(i));)"\\"!==a[1]&&r.push(a);if(r.length){var o={year:null,month:null,shortMonth:null,longMonth:null,day:null,value:""};r[0].index>0&&(o.value+=".*?");for(var s=0,l=Object.entries(r);s<l.length;s++){var c=l[s],h=c[0],d=c[1],u=Number(h),p=e.formatPatterns(d[0],n),f=p.group,g=p.pattern;o[f]=u+1,o.value+=g,o.value+=".*?"}var m=new RegExp("^"+o.value+"$");if(m.test(t)){var v=m.exec(t),y=Number(v[o.year]),b=null;o.month?b=Number(v[o.month])-1:o.shortMonth?b=e.shortMonths(n).indexOf(v[o.shortMonth]):o.longMonth&&(b=e.longMonths(n).indexOf(v[o.longMonth]));var x=Number(v[o.day])||1;return new Date(y,b,x,0,0,0,0)}}}return e.getDateZeroTime(new Date(t))},e.convertArray=function(t,i){return t.map((function(t){return t instanceof Array?t.map((function(t){return new e(t,i)})):new e(t,i)}))},e.getDateZeroTime=function(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0,0)},e.shortMonths=function(t){return e.MONTH_JS.map((function(e){return new Date(2019,e).toLocaleString(t,{month:"short"})}))},e.longMonths=function(t){return e.MONTH_JS.map((function(e){return new Date(2019,e).toLocaleString(t,{month:"long"})}))},e.formatPatterns=function(t,i){switch(t){case"YY":case"YYYY":return{group:"year",pattern:"(\\d{"+t.length+"})"};case"M":return{group:"month",pattern:"(\\d{1,2})"};case"MM":return{group:"month",pattern:"(\\d{2})"};case"MMM":return{group:"shortMonth",pattern:"("+e.shortMonths(i).join("|")+")"};case"MMMM":return{group:"longMonth",pattern:"("+e.longMonths(i).join("|")+")"};case"D":return{group:"day",pattern:"(\\d{1,2})"};case"DD":return{group:"day",pattern:"(\\d{2})"}}},e.prototype.toJSDate=function(){return this.dateInstance},e.prototype.toLocaleString=function(e,t){return this.dateInstance.toLocaleString(e,t)},e.prototype.toDateString=function(){return this.dateInstance.toDateString()},e.prototype.getSeconds=function(){return this.dateInstance.getSeconds()},e.prototype.getDay=function(){return this.dateInstance.getDay()},e.prototype.getTime=function(){return this.dateInstance.getTime()},e.prototype.getDate=function(){return this.dateInstance.getDate()},e.prototype.getMonth=function(){return this.dateInstance.getMonth()},e.prototype.getFullYear=function(){return this.dateInstance.getFullYear()},e.prototype.setMonth=function(e){return this.dateInstance.setMonth(e)},e.prototype.setHours=function(e,t,i,n){void 0===e&&(e=0),void 0===t&&(t=0),void 0===i&&(i=0),void 0===n&&(n=0),this.dateInstance.setHours(e,t,i,n)},e.prototype.setSeconds=function(e){return this.dateInstance.setSeconds(e)},e.prototype.setDate=function(e){return this.dateInstance.setDate(e)},e.prototype.setFullYear=function(e){return this.dateInstance.setFullYear(e)},e.prototype.getWeek=function(e){var t=new Date(this.timestamp()),i=(this.getDay()+(7-e))%7;t.setDate(t.getDate()-i);var n=t.getTime();return t.setMonth(0,1),t.getDay()!==e&&t.setMonth(0,1+(4-t.getDay()+7)%7),1+Math.ceil((n-t.getTime())/6048e5)},e.prototype.clone=function(){return new e(this.toJSDate())},e.prototype.isBetween=function(e,t,i){switch(void 0===i&&(i="()"),i){default:case"()":return this.timestamp()>e.getTime()&&this.timestamp()<t.getTime();case"[)":return this.timestamp()>=e.getTime()&&this.timestamp()<t.getTime();case"(]":return this.timestamp()>e.getTime()&&this.timestamp()<=t.getTime();case"[]":return this.timestamp()>=e.getTime()&&this.timestamp()<=t.getTime()}},e.prototype.isBefore=function(e,t){switch(void 0===t&&(t="seconds"),t){case"second":case"seconds":return e.getTime()>this.getTime();case"day":case"days":return new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()>new Date(this.getFullYear(),this.getMonth(),this.getDate()).getTime();case"month":case"months":return new Date(e.getFullYear(),e.getMonth(),1).getTime()>new Date(this.getFullYear(),this.getMonth(),1).getTime();case"year":case"years":return e.getFullYear()>this.getFullYear()}throw new Error("isBefore: Invalid unit!")},e.prototype.isSameOrBefore=function(e,t){switch(void 0===t&&(t="seconds"),t){case"second":case"seconds":return e.getTime()>=this.getTime();case"day":case"days":return new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()>=new Date(this.getFullYear(),this.getMonth(),this.getDate()).getTime();case"month":case"months":return new Date(e.getFullYear(),e.getMonth(),1).getTime()>=new Date(this.getFullYear(),this.getMonth(),1).getTime()}throw new Error("isSameOrBefore: Invalid unit!")},e.prototype.isAfter=function(e,t){switch(void 0===t&&(t="seconds"),t){case"second":case"seconds":return this.getTime()>e.getTime();case"day":case"days":return new Date(this.getFullYear(),this.getMonth(),this.getDate()).getTime()>new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime();case"month":case"months":return new Date(this.getFullYear(),this.getMonth(),1).getTime()>new Date(e.getFullYear(),e.getMonth(),1).getTime();case"year":case"years":return this.getFullYear()>e.getFullYear()}throw new Error("isAfter: Invalid unit!")},e.prototype.isSameOrAfter=function(e,t){switch(void 0===t&&(t="seconds"),t){case"second":case"seconds":return this.getTime()>=e.getTime();case"day":case"days":return new Date(this.getFullYear(),this.getMonth(),this.getDate()).getTime()>=new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime();case"month":case"months":return new Date(this.getFullYear(),this.getMonth(),1).getTime()>=new Date(e.getFullYear(),e.getMonth(),1).getTime()}throw new Error("isSameOrAfter: Invalid unit!")},e.prototype.isSame=function(e,t){switch(void 0===t&&(t="seconds"),t){case"second":case"seconds":return this.getTime()===e.getTime();case"day":case"days":return new Date(this.getFullYear(),this.getMonth(),this.getDate()).getTime()===new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime();case"month":case"months":return new Date(this.getFullYear(),this.getMonth(),1).getTime()===new Date(e.getFullYear(),e.getMonth(),1).getTime()}throw new Error("isSame: Invalid unit!")},e.prototype.add=function(e,t){switch(void 0===t&&(t="seconds"),t){case"second":case"seconds":this.setSeconds(this.getSeconds()+e);break;case"day":case"days":this.setDate(this.getDate()+e);break;case"month":case"months":this.setMonth(this.getMonth()+e)}return this},e.prototype.subtract=function(e,t){switch(void 0===t&&(t="seconds"),t){case"second":case"seconds":this.setSeconds(this.getSeconds()-e);break;case"day":case"days":this.setDate(this.getDate()-e);break;case"month":case"months":this.setMonth(this.getMonth()-e)}return this},e.prototype.diff=function(e,t){switch(void 0===t&&(t="seconds"),t){default:case"second":case"seconds":return this.getTime()-e.getTime();case"day":case"days":return Math.round((this.timestamp()-e.getTime())/864e5);case"month":case"months":}},e.prototype.format=function(t,i){if(void 0===i&&(i="en-US"),"object"==s(t))return t.output(this.clone().toJSDate());for(var n="",r=[],a=null;null!=(a=e.regex.exec(t));)"\\"!==a[1]&&r.push(a);if(r.length){r[0].index>0&&(n+=t.substring(0,r[0].index));for(var o=0,l=Object.entries(r);o<l.length;o++){var c=l[o],h=c[0],d=c[1],u=Number(h);n+=this.formatTokens(d[0],i),r[u+1]&&(n+=t.substring(d.index+d[0].length,r[u+1].index)),u===r.length-1&&(n+=t.substring(d.index+d[0].length))}}return n.replace(/\\/g,"")},e.prototype.timestamp=function(){return new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0,0).getTime()},e.prototype.formatTokens=function(t,i){switch(t){case"YY":return String(this.getFullYear()).slice(-2);case"YYYY":return String(this.getFullYear());case"M":return String(this.getMonth()+1);case"MM":return("0"+(this.getMonth()+1)).slice(-2);case"MMM":return e.shortMonths(i)[this.getMonth()];case"MMMM":return e.longMonths(i)[this.getMonth()];case"D":return String(this.getDate());case"DD":return("0"+this.getDate()).slice(-2);default:return""}},e.regex=/(\\)?(Y{2,4}|M{1,4}|D{1,2}|d{1,4})/g,e.MONTH_JS=[0,1,2,3,4,5,6,7,8,9,10,11],e}();t.DateTime=n},function(e,t,i){"use strict";var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(e,t)},function(e,t){function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),a=this&&this.__spreadArrays||function(){for(var e=0,t=0,i=arguments.length;t<i;t++)e+=arguments[t].length;var n=Array(e),r=0;for(t=0;t<i;t++)for(var a=arguments[t],o=0,s=a.length;o<s;o++,r++)n[r]=a[o];return n};Object.defineProperty(t,"__esModule",{value:!0});var o=i(5),s=i(0),l=i(3),c=i(2),h=function(e){function t(t){var i=e.call(this,t)||this;return i.preventClick=!1,i.bindEvents(),i}return r(t,e),t.prototype.scrollToDate=function(e){if(this.options.scrollToDate){var t=this.options.startDate instanceof s.DateTime?this.options.startDate.clone():null,i=this.options.endDate instanceof s.DateTime?this.options.endDate.clone():null;!this.options.startDate||e&&e!==this.options.element?e&&this.options.endDate&&e===this.options.elementEnd&&(i.setDate(1),this.options.numberOfMonths>1&&i.isAfter(t)&&i.setMonth(i.getMonth()-(this.options.numberOfMonths-1)),this.calendars[0]=i.clone()):(t.setDate(1),this.calendars[0]=t.clone())}},t.prototype.bindEvents=function(){document.addEventListener("click",this.onClick.bind(this),!0),this.ui=document.createElement("div"),this.ui.className=l.litepicker,this.ui.style.display="none",this.ui.addEventListener("mouseenter",this.onMouseEnter.bind(this),!0),this.ui.addEventListener("mouseleave",this.onMouseLeave.bind(this),!1),this.options.autoRefresh?(this.options.element instanceof HTMLElement&&this.options.element.addEventListener("keyup",this.onInput.bind(this),!0),this.options.elementEnd instanceof HTMLElement&&this.options.elementEnd.addEventListener("keyup",this.onInput.bind(this),!0)):(this.options.element instanceof HTMLElement&&this.options.element.addEventListener("change",this.onInput.bind(this),!0),this.options.elementEnd instanceof HTMLElement&&this.options.elementEnd.addEventListener("change",this.onInput.bind(this),!0)),this.options.parentEl?this.options.parentEl instanceof HTMLElement?this.options.parentEl.appendChild(this.ui):document.querySelector(this.options.parentEl).appendChild(this.ui):this.options.inlineMode?this.options.element instanceof HTMLInputElement?this.options.element.parentNode.appendChild(this.ui):this.options.element.appendChild(this.ui):document.body.appendChild(this.ui),this.updateInput(),this.init(),"function"==typeof this.options.setup&&this.options.setup.call(this,this),this.render(),this.options.inlineMode&&this.show()},t.prototype.updateInput=function(){if(this.options.element instanceof HTMLInputElement){var e=this.options.startDate,t=this.options.endDate;if(this.options.singleMode&&e)this.options.element.value=e.format(this.options.format,this.options.lang);else if(!this.options.singleMode&&e&&t){var i=e.format(this.options.format,this.options.lang),n=t.format(this.options.format,this.options.lang);this.options.elementEnd instanceof HTMLInputElement?(this.options.element.value=i,this.options.elementEnd.value=n):this.options.element.value=""+i+this.options.delimiter+n}e||t||(this.options.element.value="",this.options.elementEnd instanceof HTMLInputElement&&(this.options.elementEnd.value=""))}},t.prototype.isSamePicker=function(e){return e.closest("."+l.litepicker)===this.ui},t.prototype.shouldShown=function(e){return!e.disabled&&(e===this.options.element||this.options.elementEnd&&e===this.options.elementEnd)},t.prototype.shouldResetDatePicked=function(){return this.options.singleMode||2===this.datePicked.length},t.prototype.shouldSwapDatePicked=function(){return 2===this.datePicked.length&&this.datePicked[0].getTime()>this.datePicked[1].getTime()},t.prototype.shouldCheckLockDays=function(){return this.options.disallowLockDaysInRange&&2===this.datePicked.length},t.prototype.onClick=function(e){var t=e.target;if(t&&this.ui)if(this.shouldShown(t))this.show(t);else if(t.closest("."+l.litepicker)||!this.isShowning()){if(this.isSamePicker(t))if(this.emit("before:click",t),this.preventClick)this.preventClick=!1;else{if(t.classList.contains(l.dayItem)){if(e.preventDefault(),t.classList.contains(l.isLocked))return;if(this.shouldResetDatePicked()&&(this.datePicked.length=0),this.datePicked[this.datePicked.length]=new s.DateTime(t.dataset.time),this.shouldSwapDatePicked()){var i=this.datePicked[1].clone();this.datePicked[1]=this.datePicked[0].clone(),this.datePicked[0]=i.clone()}return this.shouldCheckLockDays()&&c.rangeIsLocked(this.datePicked,this.options)&&(this.emit("error:range",this.datePicked),this.datePicked.length=0),this.render(),this.emit.apply(this,a(["preselect"],a(this.datePicked).map((function(e){return e.clone()})))),void(this.options.autoApply&&(this.options.singleMode&&this.datePicked.length?(this.setDate(this.datePicked[0]),this.hide()):this.options.singleMode||2!==this.datePicked.length||(this.setDateRange(this.datePicked[0],this.datePicked[1]),this.hide())))}if(t.classList.contains(l.buttonPreviousMonth)){e.preventDefault();var n=0,r=this.options.switchingMonths||this.options.numberOfMonths;if(this.options.splitView){var o=t.closest("."+l.monthItem);n=c.findNestedMonthItem(o),r=1}return this.calendars[n].setMonth(this.calendars[n].getMonth()-r),this.gotoDate(this.calendars[n],n),void this.emit("change:month",this.calendars[n],n)}if(t.classList.contains(l.buttonNextMonth))return e.preventDefault(),n=0,r=this.options.switchingMonths||this.options.numberOfMonths,this.options.splitView&&(o=t.closest("."+l.monthItem),n=c.findNestedMonthItem(o),r=1),this.calendars[n].setMonth(this.calendars[n].getMonth()+r),this.gotoDate(this.calendars[n],n),void this.emit("change:month",this.calendars[n],n);t.classList.contains(l.buttonCancel)&&(e.preventDefault(),this.hide(),this.emit("button:cancel")),t.classList.contains(l.buttonApply)&&(e.preventDefault(),this.options.singleMode&&this.datePicked.length?this.setDate(this.datePicked[0]):this.options.singleMode||2!==this.datePicked.length||this.setDateRange(this.datePicked[0],this.datePicked[1]),this.hide(),this.emit("button:apply",this.options.startDate,this.options.endDate))}}else this.hide()},t.prototype.showTooltip=function(e,t){var i=this.ui.querySelector("."+l.containerTooltip);i.style.visibility="visible",i.innerHTML=t;var n=this.ui.getBoundingClientRect(),r=i.getBoundingClientRect(),a=e.getBoundingClientRect(),o=a.top,s=a.left;if(this.options.inlineMode&&this.options.parentEl){var c=this.ui.parentNode.getBoundingClientRect();o-=c.top,s-=c.left}else o-=n.top,s-=n.left;o-=r.height,s-=r.width/2,s+=a.width/2,i.style.top=o+"px",i.style.left=s+"px",this.emit("tooltip",i,e)},t.prototype.hideTooltip=function(){this.ui.querySelector("."+l.containerTooltip).style.visibility="hidden"},t.prototype.shouldAllowMouseEnter=function(e){return!this.options.singleMode&&!e.classList.contains(l.isLocked)},t.prototype.shouldAllowRepick=function(){return this.options.elementEnd&&this.options.allowRepick&&this.options.startDate&&this.options.endDate},t.prototype.isDayItem=function(e){return e.classList.contains(l.dayItem)},t.prototype.onMouseEnter=function(e){var t=this,i=e.target;if(this.isDayItem(i)&&this.shouldAllowMouseEnter(i)){if(this.shouldAllowRepick()&&(this.triggerElement===this.options.element?this.datePicked[0]=this.options.endDate.clone():this.triggerElement===this.options.elementEnd&&(this.datePicked[0]=this.options.startDate.clone())),1!==this.datePicked.length)return;var n=this.ui.querySelector("."+l.dayItem+'[data-time="'+this.datePicked[0].getTime()+'"]'),r=this.datePicked[0].clone(),a=new s.DateTime(i.dataset.time),o=!1;if(r.getTime()>a.getTime()){var c=r.clone();r=a.clone(),a=c.clone(),o=!0}if(Array.prototype.slice.call(this.ui.querySelectorAll("."+l.dayItem)).forEach((function(e){var i=new s.DateTime(e.dataset.time),n=t.renderDay(i);i.isBetween(r,a)&&n.classList.add(l.isInRange),e.className=n.className})),i.classList.add(l.isEndDate),o?(n&&n.classList.add(l.isFlipped),i.classList.add(l.isFlipped)):(n&&n.classList.remove(l.isFlipped),i.classList.remove(l.isFlipped)),this.options.showTooltip){var h=a.diff(r,"day")+1;if("function"==typeof this.options.tooltipNumber&&(h=this.options.tooltipNumber.call(this,h)),h>0){var d=this.pluralSelector(h),u=h+" "+(this.options.tooltipText[d]?this.options.tooltipText[d]:"["+d+"]");this.showTooltip(i,u);var p=window.navigator.userAgent,f=/(iphone|ipad)/i.test(p),g=/OS 1([0-2])/i.test(p);f&&g&&i.dispatchEvent(new Event("click"))}else this.hideTooltip()}}},t.prototype.onMouseLeave=function(e){e.target,this.options.allowRepick&&(!this.options.allowRepick||this.options.startDate||this.options.endDate)&&(this.datePicked.length=0,this.render())},t.prototype.onInput=function(e){var t=this.parseInput(),i=t[0],n=t[1],r=this.options.format;if(this.options.elementEnd?i instanceof s.DateTime&&n instanceof s.DateTime&&i.format(r)===this.options.element.value&&n.format(r)===this.options.elementEnd.value:this.options.singleMode?i instanceof s.DateTime&&i.format(r)===this.options.element.value:i instanceof s.DateTime&&n instanceof s.DateTime&&""+i.format(r)+this.options.delimiter+n.format(r)===this.options.element.value){if(n&&i.getTime()>n.getTime()){var a=i.clone();i=n.clone(),n=a.clone()}this.options.startDate=new s.DateTime(i,this.options.format,this.options.lang),n&&(this.options.endDate=new s.DateTime(n,this.options.format,this.options.lang)),this.updateInput(),this.render();var o=i.clone(),l=0;(this.options.elementEnd?i.format(r)===e.target.value:e.target.value.startsWith(i.format(r)))||(o=n.clone(),l=this.options.numberOfMonths-1),this.emit("selected",this.getStartDate(),this.getEndDate()),this.gotoDate(o,l)}},t}(o.Calendar);t.Litepicker=h},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findNestedMonthItem=function(e){for(var t=e.parentNode.childNodes,i=0;i<t.length;i+=1)if(t.item(i)===e)return i;return 0},t.dateIsLocked=function(e,t,i){var n=!1;return t.lockDays.length&&(n=t.lockDays.filter((function(i){return i instanceof Array?e.isBetween(i[0],i[1],t.lockDaysInclusivity):i.isSame(e,"day")})).length),n||"function"!=typeof t.lockDaysFilter||(n=t.lockDaysFilter.call(this,e.clone(),null,i)),n},t.rangeIsLocked=function(e,t){var i=!1;return t.lockDays.length&&(i=t.lockDays.filter((function(i){if(i instanceof Array){var n=e[0].toDateString()===i[0].toDateString()&&e[1].toDateString()===i[1].toDateString();return i[0].isBetween(e[0],e[1],t.lockDaysInclusivity)||i[1].isBetween(e[0],e[1],t.lockDaysInclusivity)||n}return i.isBetween(e[0],e[1],t.lockDaysInclusivity)})).length),i||"function"!=typeof t.lockDaysFilter||(i=t.lockDaysFilter.call(this,e[0].clone(),e[1].clone(),e)),i}},function(e,t,i){var n=i(8);"string"==typeof n&&(n=[[e.i,n,""]]);var r={insert:function(e){var t=document.querySelector("head"),i=window._lastElementInsertedByStyleLoader;window.disableLitepickerStyles||(i?i.nextSibling?t.insertBefore(e,i.nextSibling):t.appendChild(e):t.insertBefore(e,t.firstChild),window._lastElementInsertedByStyleLoader=e)},singleton:!1};i(10)(n,r),n.locals&&(e.exports=n.locals)},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(1);t.Litepicker=n.Litepicker,i(11),window.Litepicker=n.Litepicker,t.default=n.Litepicker},function(e,t,i){"use strict";var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(e,t)},function(e,t){function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var a=i(6),o=i(0),s=i(3),l=i(2),c=function(e){function t(t){return e.call(this,t)||this}return r(t,e),t.prototype.render=function(){var e=this;this.emit("before:render",this.ui);var t=document.createElement("div");t.className=s.containerMain;var i=document.createElement("div");i.className=s.containerMonths,s["columns"+this.options.numberOfColumns]&&(i.classList.remove(s.columns2,s.columns3,s.columns4),i.classList.add(s["columns"+this.options.numberOfColumns])),this.options.splitView&&i.classList.add(s.splitView),this.options.showWeekNumbers&&i.classList.add(s.showWeekNumbers);for(var n=this.calendars[0].clone(),r=n.getMonth(),a=n.getMonth()+this.options.numberOfMonths,o=0,l=r;l<a;l+=1){var c=n.clone();c.setDate(1),c.setHours(0,0,0,0),this.options.splitView?c=this.calendars[o].clone():c.setMonth(l),i.appendChild(this.renderMonth(c,o)),o+=1}if(this.ui.innerHTML="",t.appendChild(i),this.options.resetButton){var h=void 0;"function"==typeof this.options.resetButton?h=this.options.resetButton.call(this):((h=document.createElement("button")).type="button",h.className=s.resetButton,h.innerHTML=this.options.buttonText.reset),h.addEventListener("click",(function(t){t.preventDefault(),e.clearSelection()})),t.querySelector("."+s.monthItem+":last-child").querySelector("."+s.monthItemHeader).appendChild(h)}this.ui.appendChild(t),this.options.autoApply&&!this.options.footerHTML||this.ui.appendChild(this.renderFooter()),this.options.showTooltip&&this.ui.appendChild(this.renderTooltip()),this.ui.dataset.plugins=(this.options.plugins||[]).join("|"),this.emit("render",this.ui)},t.prototype.renderMonth=function(e,t){var i=this,n=e.clone(),r=32-new Date(n.getFullYear(),n.getMonth(),32).getDate(),a=document.createElement("div");a.className=s.monthItem;var c=document.createElement("div");c.className=s.monthItemHeader;var h=document.createElement("div");if(this.options.dropdowns.months){var d=document.createElement("select");d.className=s.monthItemName;for(var u=0;u<12;u+=1){var p=document.createElement("option"),f=new o.DateTime(new Date(e.getFullYear(),u,2,0,0,0)),g=new o.DateTime(new Date(e.getFullYear(),u,1,0,0,0));p.value=String(u),p.text=f.toLocaleString(this.options.lang,{month:"long"}),p.disabled=this.options.minDate&&g.isBefore(new o.DateTime(this.options.minDate),"month")||this.options.maxDate&&g.isAfter(new o.DateTime(this.options.maxDate),"month"),p.selected=g.getMonth()===e.getMonth(),d.appendChild(p)}d.addEventListener("change",(function(e){var t=e.target,n=0;if(i.options.splitView){var r=t.closest("."+s.monthItem);n=l.findNestedMonthItem(r)}i.calendars[n].setMonth(Number(t.value)),i.render(),i.emit("change:month",i.calendars[n],n,e)})),h.appendChild(d)}else(f=document.createElement("strong")).className=s.monthItemName,f.innerHTML=e.toLocaleString(this.options.lang,{month:"long"}),h.appendChild(f);if(this.options.dropdowns.years){var m=document.createElement("select");m.className=s.monthItemYear;var v=this.options.dropdowns.minYear,y=this.options.dropdowns.maxYear?this.options.dropdowns.maxYear:(new Date).getFullYear();for(e.getFullYear()>y&&((p=document.createElement("option")).value=String(e.getFullYear()),p.text=String(e.getFullYear()),p.selected=!0,p.disabled=!0,m.appendChild(p)),u=y;u>=v;u-=1){p=document.createElement("option");var b=new o.DateTime(new Date(u,0,1,0,0,0));p.value=String(u),p.text=String(u),p.disabled=this.options.minDate&&b.isBefore(new o.DateTime(this.options.minDate),"year")||this.options.maxDate&&b.isAfter(new o.DateTime(this.options.maxDate),"year"),p.selected=e.getFullYear()===u,m.appendChild(p)}if(e.getFullYear()<v&&((p=document.createElement("option")).value=String(e.getFullYear()),p.text=String(e.getFullYear()),p.selected=!0,p.disabled=!0,m.appendChild(p)),"asc"===this.options.dropdowns.years){var x=Array.prototype.slice.call(m.childNodes).reverse();m.innerHTML="",x.forEach((function(e){e.innerHTML=e.value,m.appendChild(e)}))}m.addEventListener("change",(function(e){var t=e.target,n=0;if(i.options.splitView){var r=t.closest("."+s.monthItem);n=l.findNestedMonthItem(r)}i.calendars[n].setFullYear(Number(t.value)),i.render(),i.emit("change:year",i.calendars[n],n,e)})),h.appendChild(m)}else{var w=document.createElement("span");w.className=s.monthItemYear,w.innerHTML=String(e.getFullYear()),h.appendChild(w)}var k=document.createElement("button");k.type="button",k.className=s.buttonPreviousMonth,k.innerHTML=this.options.buttonText.previousMonth;var _=document.createElement("button");_.type="button",_.className=s.buttonNextMonth,_.innerHTML=this.options.buttonText.nextMonth,c.appendChild(k),c.appendChild(h),c.appendChild(_),this.options.minDate&&n.isSameOrBefore(new o.DateTime(this.options.minDate),"month")&&a.classList.add(s.noPreviousMonth),this.options.maxDate&&n.isSameOrAfter(new o.DateTime(this.options.maxDate),"month")&&a.classList.add(s.noNextMonth);var S=document.createElement("div");S.className=s.monthItemWeekdaysRow,this.options.showWeekNumbers&&(S.innerHTML="<div>W</div>");for(var A=1;A<=7;A+=1){var C=3+this.options.firstDay+A,T=document.createElement("div");T.innerHTML=this.weekdayName(C),T.title=this.weekdayName(C,"long"),S.appendChild(T)}var P=document.createElement("div");P.className=s.containerDays;var L=this.calcSkipDays(n);this.options.showWeekNumbers&&L&&P.appendChild(this.renderWeekNumber(n));for(var E=0;E<L;E+=1){var M=document.createElement("div");P.appendChild(M)}for(E=1;E<=r;E+=1)n.setDate(E),this.options.showWeekNumbers&&n.getDay()===this.options.firstDay&&P.appendChild(this.renderWeekNumber(n)),P.appendChild(this.renderDay(n));return a.appendChild(c),a.appendChild(S),a.appendChild(P),this.emit("render:month",a,e),a},t.prototype.renderDay=function(e){e.setHours();var t=document.createElement("div");if(t.className=s.dayItem,t.innerHTML=String(e.getDate()),t.dataset.time=String(e.getTime()),e.toDateString()===(new Date).toDateString()&&t.classList.add(s.isToday),this.datePicked.length)this.datePicked[0].toDateString()===e.toDateString()&&(t.classList.add(s.isStartDate),this.options.singleMode&&t.classList.add(s.isEndDate)),2===this.datePicked.length&&this.datePicked[1].toDateString()===e.toDateString()&&t.classList.add(s.isEndDate),2===this.datePicked.length&&e.isBetween(this.datePicked[0],this.datePicked[1])&&t.classList.add(s.isInRange);else if(this.options.startDate){var i=this.options.startDate,n=this.options.endDate;i.toDateString()===e.toDateString()&&(t.classList.add(s.isStartDate),this.options.singleMode&&t.classList.add(s.isEndDate)),n&&n.toDateString()===e.toDateString()&&t.classList.add(s.isEndDate),i&&n&&e.isBetween(i,n)&&t.classList.add(s.isInRange)}if(this.options.minDate&&e.isBefore(new o.DateTime(this.options.minDate))&&t.classList.add(s.isLocked),this.options.maxDate&&e.isAfter(new o.DateTime(this.options.maxDate))&&t.classList.add(s.isLocked),this.options.minDays>1&&1===this.datePicked.length){var r=this.options.minDays-1,a=this.datePicked[0].clone().subtract(r,"day"),c=this.datePicked[0].clone().add(r,"day");e.isBetween(a,this.datePicked[0],"(]")&&t.classList.add(s.isLocked),e.isBetween(this.datePicked[0],c,"[)")&&t.classList.add(s.isLocked)}if(this.options.maxDays&&1===this.datePicked.length){var h=this.options.maxDays;a=this.datePicked[0].clone().subtract(h,"day"),c=this.datePicked[0].clone().add(h,"day"),e.isSameOrBefore(a)&&t.classList.add(s.isLocked),e.isSameOrAfter(c)&&t.classList.add(s.isLocked)}return this.options.selectForward&&1===this.datePicked.length&&e.isBefore(this.datePicked[0])&&t.classList.add(s.isLocked),this.options.selectBackward&&1===this.datePicked.length&&e.isAfter(this.datePicked[0])&&t.classList.add(s.isLocked),l.dateIsLocked(e,this.options,this.datePicked)&&t.classList.add(s.isLocked),this.options.highlightedDays.length&&this.options.highlightedDays.filter((function(t){return t instanceof Array?e.isBetween(t[0],t[1],"[]"):t.isSame(e,"day")})).length&&t.classList.add(s.isHighlighted),t.tabIndex=t.classList.contains("is-locked")?-1:0,this.emit("render:day",t,e),t},t.prototype.renderFooter=function(){var e=document.createElement("div");if(e.className=s.containerFooter,this.options.footerHTML?e.innerHTML=this.options.footerHTML:e.innerHTML='\n <span class="'+s.previewDateRange+'"></span>\n <button type="button" class="'+s.buttonCancel+'">'+this.options.buttonText.cancel+'</button>\n <button type="button" class="'+s.buttonApply+'">'+this.options.buttonText.apply+"</button>\n ",this.options.singleMode){if(1===this.datePicked.length){var t=this.datePicked[0].format(this.options.format,this.options.lang);e.querySelector("."+s.previewDateRange).innerHTML=t}}else if(1===this.datePicked.length&&e.querySelector("."+s.buttonApply).setAttribute("disabled",""),2===this.datePicked.length){t=this.datePicked[0].format(this.options.format,this.options.lang);var i=this.datePicked[1].format(this.options.format,this.options.lang);e.querySelector("."+s.previewDateRange).innerHTML=""+t+this.options.delimiter+i}return this.emit("render:footer",e),e},t.prototype.renderWeekNumber=function(e){var t=document.createElement("div"),i=e.getWeek(this.options.firstDay);return t.className=s.weekNumber,t.innerHTML=53===i&&0===e.getMonth()?"53 / 1":i,t},t.prototype.renderTooltip=function(){var e=document.createElement("div");return e.className=s.containerTooltip,e},t.prototype.weekdayName=function(e,t){return void 0===t&&(t="short"),new Date(1970,0,e,12,0,0,0).toLocaleString(this.options.lang,{weekday:t})},t.prototype.calcSkipDays=function(e){var t=e.getDay()-this.options.firstDay;return t<0&&(t+=7),t},t}(a.LPCore);t.Calendar=c},function(e,t,i){"use strict";var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(e,t)},function(e,t){function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),a=this&&this.__assign||function(){return(a=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=i(7),s=i(0),l=i(1),c=function(e){function t(t){var i=e.call(this)||this;i.datePicked=[],i.calendars=[],i.options={element:null,elementEnd:null,parentEl:null,firstDay:1,format:"YYYY-MM-DD",lang:"en-US",delimiter:" - ",numberOfMonths:1,numberOfColumns:1,startDate:null,endDate:null,zIndex:9999,position:"auto",selectForward:!1,selectBackward:!1,splitView:!1,inlineMode:!1,singleMode:!0,autoApply:!0,allowRepick:!1,showWeekNumbers:!1,showTooltip:!0,scrollToDate:!0,mobileFriendly:!0,resetButton:!1,autoRefresh:!1,lockDaysFormat:"YYYY-MM-DD",lockDays:[],disallowLockDaysInRange:!1,lockDaysInclusivity:"[]",highlightedDaysFormat:"YYYY-MM-DD",highlightedDays:[],dropdowns:{minYear:1990,maxYear:null,months:!1,years:!1},buttonText:{apply:"Apply",cancel:"Cancel",previousMonth:'<svg width="11" height="16" xmlns="http://www.w3.org/2000/svg"><path d="M7.919 0l2.748 2.667L5.333 8l5.334 5.333L7.919 16 0 8z" fill-rule="nonzero"/></svg>',nextMonth:'<svg width="11" height="16" xmlns="http://www.w3.org/2000/svg"><path d="M2.748 16L0 13.333 5.333 8 0 2.667 2.748 0l7.919 8z" fill-rule="nonzero"/></svg>',reset:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24">\n <path d="M0 0h24v24H0z" fill="none"/>\n <path d="M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z"/>\n </svg>'},tooltipText:{one:"day",other:"days"}},i.options=a(a({},i.options),t.element.dataset),Object.keys(i.options).forEach((function(e){"true"!==i.options[e]&&"false"!==i.options[e]||(i.options[e]="true"===i.options[e])}));var n=a(a({},i.options.dropdowns),t.dropdowns),r=a(a({},i.options.buttonText),t.buttonText),o=a(a({},i.options.tooltipText),t.tooltipText);i.options=a(a({},i.options),t),i.options.dropdowns=a({},n),i.options.buttonText=a({},r),i.options.tooltipText=a({},o),i.options.elementEnd||(i.options.allowRepick=!1),i.options.lockDays.length&&(i.options.lockDays=s.DateTime.convertArray(i.options.lockDays,i.options.lockDaysFormat)),i.options.highlightedDays.length&&(i.options.highlightedDays=s.DateTime.convertArray(i.options.highlightedDays,i.options.highlightedDaysFormat));var l=i.parseInput(),c=l[0],h=l[1];i.options.startDate&&(i.options.singleMode||i.options.endDate)&&(c=new s.DateTime(i.options.startDate,i.options.format,i.options.lang)),c&&i.options.endDate&&(h=new s.DateTime(i.options.endDate,i.options.format,i.options.lang)),c instanceof s.DateTime&&!isNaN(c.getTime())&&(i.options.startDate=c),i.options.startDate&&h instanceof s.DateTime&&!isNaN(h.getTime())&&(i.options.endDate=h),!i.options.singleMode||i.options.startDate instanceof s.DateTime||(i.options.startDate=null),i.options.singleMode||i.options.startDate instanceof s.DateTime&&i.options.endDate instanceof s.DateTime||(i.options.startDate=null,i.options.endDate=null);for(var d=0;d<i.options.numberOfMonths;d+=1){var u=i.options.startDate instanceof s.DateTime?i.options.startDate.clone():new s.DateTime;if(!i.options.startDate&&(0===d||i.options.splitView)){var p=i.options.maxDate?new s.DateTime(i.options.maxDate):null,f=i.options.minDate?new s.DateTime(i.options.minDate):null,g=i.options.numberOfMonths-1;f&&p&&u.isAfter(p)?(u=f.clone()).setDate(1):!f&&p&&u.isAfter(p)&&((u=p.clone()).setDate(1),u.setMonth(u.getMonth()-g))}u.setDate(1),u.setMonth(u.getMonth()+d),i.calendars[d]=u}if(i.options.showTooltip)if(i.options.tooltipPluralSelector)i.pluralSelector=i.options.tooltipPluralSelector;else try{var m=new Intl.PluralRules(i.options.lang);i.pluralSelector=m.select.bind(m)}catch(e){i.pluralSelector=function(e){return 0===Math.abs(e)?"one":"other"}}return i}return r(t,e),t.add=function(e,t){l.Litepicker.prototype[e]=t},t.prototype.DateTime=function(e,t){return e?new s.DateTime(e,t):new s.DateTime},t.prototype.init=function(){var e=this;this.options.plugins&&this.options.plugins.length&&this.options.plugins.forEach((function(t){l.Litepicker.prototype.hasOwnProperty(t)?l.Litepicker.prototype[t].init.call(e,e):console.warn("Litepicker: plugin «"+t+"» not found.")}))},t.prototype.parseInput=function(){var e=this.options.delimiter,t=new RegExp(""+e),i=this.options.element instanceof HTMLInputElement?this.options.element.value.split(e):[];if(this.options.elementEnd){if(this.options.element instanceof HTMLInputElement&&this.options.element.value.length&&this.options.elementEnd instanceof HTMLInputElement&&this.options.elementEnd.value.length)return[new s.DateTime(this.options.element.value,this.options.format),new s.DateTime(this.options.elementEnd.value,this.options.format)]}else if(this.options.singleMode){if(this.options.element instanceof HTMLInputElement&&this.options.element.value.length)return[new s.DateTime(this.options.element.value,this.options.format)]}else if(this.options.element instanceof HTMLInputElement&&t.test(this.options.element.value)&&i.length&&i.length%2==0){var n=i.slice(0,i.length/2).join(e),r=i.slice(i.length/2).join(e);return[new s.DateTime(n,this.options.format),new s.DateTime(r,this.options.format)]}return[]},t.prototype.isShowning=function(){return this.ui&&"none"!==this.ui.style.display},t.prototype.findPosition=function(e){var t=e.getBoundingClientRect(),i=this.ui.getBoundingClientRect(),n=this.options.position.split(" "),r=window.scrollX||window.pageXOffset,a=window.scrollY||window.pageYOffset,o=0,s=0;if("auto"!==n[0]&&/top|bottom/.test(n[0]))o=t[n[0]]+a,"top"===n[0]&&(o-=i.height);else{o=t.bottom+a;var l=t.bottom+i.height>window.innerHeight,c=t.top+a-i.height>=i.height;l&&c&&(o=t.top+a-i.height)}if(/left|right/.test(n[0])||n[1]&&"auto"!==n[1]&&/left|right/.test(n[1]))s=/left|right/.test(n[0])?t[n[0]]+r:t[n[1]]+r,"right"!==n[0]&&"right"!==n[1]||(s-=i.width);else{s=t.left+r,l=t.left+i.width>window.innerWidth;var h=t.right+r-i.width>=0;l&&h&&(s=t.right+r-i.width)}return{left:s,top:o}},t}(o.EventEmitter);t.LPCore=c},function(e,t,i){"use strict";var n,r="object"==("undefined"==typeof Reflect?"undefined":s(Reflect))?Reflect:null,a=r&&"function"==typeof r.apply?r.apply:function(e,t,i){return Function.prototype.apply.call(e,t,i)};n=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function l(){l.init.call(this)}e.exports=l,l.EventEmitter=l,l.prototype._events=void 0,l.prototype._eventsCount=0,l.prototype._maxListeners=void 0;var c=10;function h(e){return void 0===e._maxListeners?l.defaultMaxListeners:e._maxListeners}function d(e,t,i,n){var r,a,o,l;if("function"!=typeof i)throw new TypeError('The "listener" argument must be of type Function. Received type '+s(i));if(void 0===(a=e._events)?(a=e._events=Object.create(null),e._eventsCount=0):(void 0!==a.newListener&&(e.emit("newListener",t,i.listener?i.listener:i),a=e._events),o=a[t]),void 0===o)o=a[t]=i,++e._eventsCount;else if("function"==typeof o?o=a[t]=n?[i,o]:[o,i]:n?o.unshift(i):o.push(i),(r=h(e))>0&&o.length>r&&!o.warned){o.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=o.length,l=c,console&&console.warn&&console.warn(l)}return e}function u(){for(var e=[],t=0;t<arguments.length;t++)e.push(arguments[t]);this.fired||(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,a(this.listener,this.target,e))}function p(e,t,i){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:i},r=u.bind(n);return r.listener=i,n.wrapFn=r,r}function f(e,t,i){var n=e._events;if(void 0===n)return[];var r=n[t];return void 0===r?[]:"function"==typeof r?i?[r.listener||r]:[r]:i?function(e){for(var t=new Array(e.length),i=0;i<t.length;++i)t[i]=e[i].listener||e[i];return t}(r):m(r,r.length)}function g(e){var t=this._events;if(void 0!==t){var i=t[e];if("function"==typeof i)return 1;if(void 0!==i)return i.length}return 0}function m(e,t){for(var i=new Array(t),n=0;n<t;++n)i[n]=e[n];return i}Object.defineProperty(l,"defaultMaxListeners",{enumerable:!0,get:function(){return c},set:function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");c=e}}),l.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},l.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},l.prototype.getMaxListeners=function(){return h(this)},l.prototype.emit=function(e){for(var t=[],i=1;i<arguments.length;i++)t.push(arguments[i]);var n="error"===e,r=this._events;if(void 0!==r)n=n&&void 0===r.error;else if(!n)return!1;if(n){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var l=r[e];if(void 0===l)return!1;if("function"==typeof l)a(l,this,t);else{var c=l.length,h=m(l,c);for(i=0;i<c;++i)a(h[i],this,t)}return!0},l.prototype.addListener=function(e,t){return d(this,e,t,!1)},l.prototype.on=l.prototype.addListener,l.prototype.prependListener=function(e,t){return d(this,e,t,!0)},l.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+s(t));return this.on(e,p(this,e,t)),this},l.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+s(t));return this.prependListener(e,p(this,e,t)),this},l.prototype.removeListener=function(e,t){var i,n,r,a,o;if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+s(t));if(void 0===(n=this._events))return this;if(void 0===(i=n[e]))return this;if(i===t||i.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,i.listener||t));else if("function"!=typeof i){for(r=-1,a=i.length-1;a>=0;a--)if(i[a]===t||i[a].listener===t){o=i[a].listener,r=a;break}if(r<0)return this;0===r?i.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(i,r),1===i.length&&(n[e]=i[0]),void 0!==n.removeListener&&this.emit("removeListener",e,o||t)}return this},l.prototype.off=l.prototype.removeListener,l.prototype.removeAllListeners=function(e){var t,i,n;if(void 0===(i=this._events))return this;if(void 0===i.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==i[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete i[e]),this;if(0===arguments.length){var r,a=Object.keys(i);for(n=0;n<a.length;++n)"removeListener"!==(r=a[n])&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=i[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},l.prototype.listeners=function(e){return f(this,e,!0)},l.prototype.rawListeners=function(e){return f(this,e,!1)},l.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):g.call(e,t)},l.prototype.listenerCount=g,l.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},function(e,t,i){(t=i(9)(!1)).push([e.i,':root{--litepicker-container-months-color-bg: #fff;--litepicker-container-months-box-shadow-color: #ddd;--litepicker-footer-color-bg: #fafafa;--litepicker-footer-box-shadow-color: #ddd;--litepicker-tooltip-color-bg: #fff;--litepicker-month-header-color: #333;--litepicker-button-prev-month-color: #9e9e9e;--litepicker-button-next-month-color: #9e9e9e;--litepicker-button-prev-month-color-hover: #2196f3;--litepicker-button-next-month-color-hover: #2196f3;--litepicker-month-width: calc(var(--litepicker-day-width) * 7);--litepicker-month-weekday-color: #9e9e9e;--litepicker-month-week-number-color: #9e9e9e;--litepicker-day-width: 38px;--litepicker-day-color: #333;--litepicker-day-color-hover: #2196f3;--litepicker-is-today-color: #f44336;--litepicker-is-in-range-color: #bbdefb;--litepicker-is-locked-color: #9e9e9e;--litepicker-is-start-color: #fff;--litepicker-is-start-color-bg: #2196f3;--litepicker-is-end-color: #fff;--litepicker-is-end-color-bg: #2196f3;--litepicker-button-cancel-color: #fff;--litepicker-button-cancel-color-bg: #9e9e9e;--litepicker-button-apply-color: #fff;--litepicker-button-apply-color-bg: #2196f3;--litepicker-button-reset-color: #909090;--litepicker-button-reset-color-hover: #2196f3;--litepicker-highlighted-day-color: #333;--litepicker-highlighted-day-color-bg: #ffeb3b}.show-week-numbers{--litepicker-month-width: calc(var(--litepicker-day-width) * 8)}.litepicker{font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;font-size:0.8em;display:none}.litepicker button{border:none;background:none}.litepicker .container__main{display:-webkit-box;display:-ms-flexbox;display:flex}.litepicker .container__months{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;background-color:var(--litepicker-container-months-color-bg);border-radius:5px;-webkit-box-shadow:0 0 5px var(--litepicker-container-months-box-shadow-color);box-shadow:0 0 5px var(--litepicker-container-months-box-shadow-color);width:calc(var(--litepicker-month-width) + 10px);-webkit-box-sizing:content-box;box-sizing:content-box}.litepicker .container__months.columns-2{width:calc((var(--litepicker-month-width) * 2) + 20px)}.litepicker .container__months.columns-3{width:calc((var(--litepicker-month-width) * 3) + 30px)}.litepicker .container__months.columns-4{width:calc((var(--litepicker-month-width) * 4) + 40px)}.litepicker .container__months.split-view .month-item-header .button-previous-month,.litepicker .container__months.split-view .month-item-header .button-next-month{visibility:visible}.litepicker .container__months .month-item{padding:5px;width:var(--litepicker-month-width);-webkit-box-sizing:content-box;box-sizing:content-box}.litepicker .container__months .month-item-header{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;font-weight:500;padding:10px 5px;text-align:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:var(--litepicker-month-header-color)}.litepicker .container__months .month-item-header div{-webkit-box-flex:1;-ms-flex:1;flex:1}.litepicker .container__months .month-item-header div>.month-item-name{margin-right:5px}.litepicker .container__months .month-item-header div>.month-item-year{padding:0}.litepicker .container__months .month-item-header .reset-button{color:var(--litepicker-button-reset-color)}.litepicker .container__months .month-item-header .reset-button>svg{fill:var(--litepicker-button-reset-color)}.litepicker .container__months .month-item-header .reset-button *{pointer-events:none}.litepicker .container__months .month-item-header .reset-button:hover{color:var(--litepicker-button-reset-color-hover)}.litepicker .container__months .month-item-header .reset-button:hover>svg{fill:var(--litepicker-button-reset-color-hover)}.litepicker .container__months .month-item-header .button-previous-month,.litepicker .container__months .month-item-header .button-next-month{visibility:hidden;text-decoration:none;padding:3px 5px;border-radius:3px;-webkit-transition:color 0.3s, border 0.3s;transition:color 0.3s, border 0.3s;cursor:default}.litepicker .container__months .month-item-header .button-previous-month *,.litepicker .container__months .month-item-header .button-next-month *{pointer-events:none}.litepicker .container__months .month-item-header .button-previous-month{color:var(--litepicker-button-prev-month-color)}.litepicker .container__months .month-item-header .button-previous-month>svg,.litepicker .container__months .month-item-header .button-previous-month>img{fill:var(--litepicker-button-prev-month-color)}.litepicker .container__months .month-item-header .button-previous-month:hover{color:var(--litepicker-button-prev-month-color-hover)}.litepicker .container__months .month-item-header .button-previous-month:hover>svg{fill:var(--litepicker-button-prev-month-color-hover)}.litepicker .container__months .month-item-header .button-next-month{color:var(--litepicker-button-next-month-color)}.litepicker .container__months .month-item-header .button-next-month>svg,.litepicker .container__months .month-item-header .button-next-month>img{fill:var(--litepicker-button-next-month-color)}.litepicker .container__months .month-item-header .button-next-month:hover{color:var(--litepicker-button-next-month-color-hover)}.litepicker .container__months .month-item-header .button-next-month:hover>svg{fill:var(--litepicker-button-next-month-color-hover)}.litepicker .container__months .month-item-weekdays-row{display:-webkit-box;display:-ms-flexbox;display:flex;justify-self:center;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;color:var(--litepicker-month-weekday-color)}.litepicker .container__months .month-item-weekdays-row>div{padding:5px 0;font-size:85%;-webkit-box-flex:1;-ms-flex:1;flex:1;width:var(--litepicker-day-width);text-align:center}.litepicker .container__months .month-item:first-child .button-previous-month{visibility:visible}.litepicker .container__months .month-item:last-child .button-next-month{visibility:visible}.litepicker .container__months .month-item.no-previous-month .button-previous-month{visibility:hidden}.litepicker .container__months .month-item.no-next-month .button-next-month{visibility:hidden}.litepicker .container__days{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;justify-self:center;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:center;-webkit-box-sizing:content-box;box-sizing:content-box}.litepicker .container__days>div,.litepicker .container__days>a{padding:5px 0;width:var(--litepicker-day-width)}.litepicker .container__days .day-item{color:var(--litepicker-day-color);text-align:center;text-decoration:none;border-radius:3px;-webkit-transition:color 0.3s, border 0.3s;transition:color 0.3s, border 0.3s;cursor:default}.litepicker .container__days .day-item:hover{color:var(--litepicker-day-color-hover);-webkit-box-shadow:inset 0 0 0 1px var(--litepicker-day-color-hover);box-shadow:inset 0 0 0 1px var(--litepicker-day-color-hover)}.litepicker .container__days .day-item.is-today{color:var(--litepicker-is-today-color)}.litepicker .container__days .day-item.is-locked{color:var(--litepicker-is-locked-color)}.litepicker .container__days .day-item.is-locked:hover{color:var(--litepicker-is-locked-color);-webkit-box-shadow:none;box-shadow:none;cursor:default}.litepicker .container__days .day-item.is-in-range{background-color:var(--litepicker-is-in-range-color);border-radius:0}.litepicker .container__days .day-item.is-start-date{color:var(--litepicker-is-start-color);background-color:var(--litepicker-is-start-color-bg);border-top-left-radius:5px;border-bottom-left-radius:5px;border-top-right-radius:0;border-bottom-right-radius:0}.litepicker .container__days .day-item.is-start-date.is-flipped{border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:5px;border-bottom-right-radius:5px}.litepicker .container__days .day-item.is-end-date{color:var(--litepicker-is-end-color);background-color:var(--litepicker-is-end-color-bg);border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:5px;border-bottom-right-radius:5px}.litepicker .container__days .day-item.is-end-date.is-flipped{border-top-left-radius:5px;border-bottom-left-radius:5px;border-top-right-radius:0;border-bottom-right-radius:0}.litepicker .container__days .day-item.is-start-date.is-end-date{border-top-left-radius:5px;border-bottom-left-radius:5px;border-top-right-radius:5px;border-bottom-right-radius:5px}.litepicker .container__days .day-item.is-highlighted{color:var(--litepicker-highlighted-day-color);background-color:var(--litepicker-highlighted-day-color-bg)}.litepicker .container__days .week-number{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;color:var(--litepicker-month-week-number-color);font-size:85%}.litepicker .container__footer{text-align:right;padding:10px 5px;margin:0 5px;background-color:var(--litepicker-footer-color-bg);-webkit-box-shadow:inset 0px 3px 3px 0px var(--litepicker-footer-box-shadow-color);box-shadow:inset 0px 3px 3px 0px var(--litepicker-footer-box-shadow-color);border-bottom-left-radius:5px;border-bottom-right-radius:5px}.litepicker .container__footer .preview-date-range{margin-right:10px;font-size:90%}.litepicker .container__footer .button-cancel{background-color:var(--litepicker-button-cancel-color-bg);color:var(--litepicker-button-cancel-color);border:0;padding:3px 7px 4px;border-radius:3px}.litepicker .container__footer .button-cancel *{pointer-events:none}.litepicker .container__footer .button-apply{background-color:var(--litepicker-button-apply-color-bg);color:var(--litepicker-button-apply-color);border:0;padding:3px 7px 4px;border-radius:3px;margin-left:10px;margin-right:10px}.litepicker .container__footer .button-apply:disabled{opacity:0.7}.litepicker .container__footer .button-apply *{pointer-events:none}.litepicker .container__tooltip{position:absolute;margin-top:-4px;padding:4px 8px;border-radius:4px;background-color:var(--litepicker-tooltip-color-bg);-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.25);box-shadow:0 1px 3px rgba(0,0,0,0.25);white-space:nowrap;font-size:11px;pointer-events:none;visibility:hidden}.litepicker .container__tooltip:before{position:absolute;bottom:-5px;left:calc(50% - 5px);border-top:5px solid rgba(0,0,0,0.12);border-right:5px solid transparent;border-left:5px solid transparent;content:""}.litepicker .container__tooltip:after{position:absolute;bottom:-4px;left:calc(50% - 4px);border-top:4px solid var(--litepicker-tooltip-color-bg);border-right:4px solid transparent;border-left:4px solid transparent;content:""}\n',""]),t.locals={showWeekNumbers:"show-week-numbers",litepicker:"litepicker",containerMain:"container__main",containerMonths:"container__months",columns2:"columns-2",columns3:"columns-3",columns4:"columns-4",splitView:"split-view",monthItemHeader:"month-item-header",buttonPreviousMonth:"button-previous-month",buttonNextMonth:"button-next-month",monthItem:"month-item",monthItemName:"month-item-name",monthItemYear:"month-item-year",resetButton:"reset-button",monthItemWeekdaysRow:"month-item-weekdays-row",noPreviousMonth:"no-previous-month",noNextMonth:"no-next-month",containerDays:"container__days",dayItem:"day-item",isToday:"is-today",isLocked:"is-locked",isInRange:"is-in-range",isStartDate:"is-start-date",isFlipped:"is-flipped",isEndDate:"is-end-date",isHighlighted:"is-highlighted",weekNumber:"week-number",containerFooter:"container__footer",previewDateRange:"preview-date-range",buttonCancel:"button-cancel",buttonApply:"button-apply",containerTooltip:"container__tooltip"},e.exports=t},function(e,t,i){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var i=function(e,t){var i,n,r,a=e[1]||"",o=e[3];if(!o)return a;if(t&&"function"==typeof btoa){var s=(i=o,n=btoa(unescape(encodeURIComponent(JSON.stringify(i)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(n),"/*# ".concat(r," */")),l=o.sources.map((function(e){return"/*# sourceURL=".concat(o.sourceRoot||"").concat(e," */")}));return[a].concat(l).concat([s]).join("\n")}return[a].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(i,"}"):i})).join("")},t.i=function(e,i,n){"string"==typeof e&&(e=[[null,e,""]]);var r={};if(n)for(var a=0;a<this.length;a++){var o=this[a][0];null!=o&&(r[o]=!0)}for(var s=0;s<e.length;s++){var l=[].concat(e[s]);n&&r[l[0]]||(i&&(l[2]?l[2]="".concat(i," and ").concat(l[2]):l[2]=i),t.push(l))}},t}},function(e,t,i){"use strict";var n,r={},a=function(){var e={};return function(t){if(void 0===e[t]){var i=document.querySelector(t);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(e){i=null}e[t]=i}return e[t]}}();function o(e,t){for(var i=[],n={},r=0;r<e.length;r++){var a=e[r],o=t.base?a[0]+t.base:a[0],s={css:a[1],media:a[2],sourceMap:a[3]};n[o]?n[o].parts.push(s):i.push(n[o]={id:o,parts:[s]})}return i}function l(e,t){for(var i=0;i<e.length;i++){var n=e[i],a=r[n.id],o=0;if(a){for(a.refs++;o<a.parts.length;o++)a.parts[o](n.parts[o]);for(;o<n.parts.length;o++)a.parts.push(m(n.parts[o],t))}else{for(var s=[];o<n.parts.length;o++)s.push(m(n.parts[o],t));r[n.id]={id:n.id,refs:1,parts:s}}}}function c(e){var t=document.createElement("style");if(void 0===e.attributes.nonce){var n=i.nc;n&&(e.attributes.nonce=n)}if(Object.keys(e.attributes).forEach((function(i){t.setAttribute(i,e.attributes[i])})),"function"==typeof e.insert)e.insert(t);else{var r=a(e.insert||"head");if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(t)}return t}var h,d=(h=[],function(e,t){return h[e]=t,h.filter(Boolean).join("\n")});function u(e,t,i,n){var r=i?"":n.css;if(e.styleSheet)e.styleSheet.cssText=d(t,r);else{var a=document.createTextNode(r),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(a,o[t]):e.appendChild(a)}}function p(e,t,i){var n=i.css,r=i.media,a=i.sourceMap;if(r&&e.setAttribute("media",r),a&&btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}var f=null,g=0;function m(e,t){var i,n,r;if(t.singleton){var a=g++;i=f||(f=c(t)),n=u.bind(null,i,a,!1),r=u.bind(null,i,a,!0)}else i=c(t),n=p.bind(null,i,t),r=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(i)};return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else r()}}e.exports=function(e,t){(t=t||{}).attributes="object"==s(t.attributes)?t.attributes:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=(void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n));var i=o(e,t);return l(i,t),function(e){for(var n=[],a=0;a<i.length;a++){var s=i[a],c=r[s.id];c&&(c.refs--,n.push(c))}e&&l(o(e,t),t);for(var h=0;h<n.length;h++){var d=n[h];if(0===d.refs){for(var u=0;u<d.parts.length;u++)d.parts[u]();delete r[d.id]}}}}},function(e,t,i){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var r=i(0),a=i(1),o=i(2);a.Litepicker.prototype.show=function(e){void 0===e&&(e=null),this.emit("before:show",e);var t=e||this.options.element;if(this.triggerElement=t,!this.isShowning()){if(this.options.inlineMode)return this.ui.style.position="relative",this.ui.style.display="inline-block",this.ui.style.top=null,this.ui.style.left=null,this.ui.style.bottom=null,void(this.ui.style.right=null);this.scrollToDate(e),this.render(),this.ui.style.position="absolute",this.ui.style.display="block",this.ui.style.zIndex=this.options.zIndex;var i=this.findPosition(t);this.ui.style.top=i.top+"px",this.ui.style.left=i.left+"px",this.ui.style.right=null,this.ui.style.bottom=null,this.emit("show",e)}},a.Litepicker.prototype.hide=function(){this.isShowning()&&(this.datePicked.length=0,this.updateInput(),this.options.inlineMode?this.render():(this.ui.style.display="none",this.emit("hide")))},a.Litepicker.prototype.getDate=function(){return this.getStartDate()},a.Litepicker.prototype.getStartDate=function(){return this.options.startDate?this.options.startDate.clone():null},a.Litepicker.prototype.getEndDate=function(){return this.options.endDate?this.options.endDate.clone():null},a.Litepicker.prototype.setDate=function(e,t){void 0===t&&(t=!1);var i=new r.DateTime(e,this.options.format,this.options.lang);o.dateIsLocked(i,this.options,[i])&&!t?this.emit("error:date",i):(this.setStartDate(e),this.options.inlineMode&&this.render(),this.emit("selected",this.getDate()))},a.Litepicker.prototype.setStartDate=function(e){e&&(this.options.startDate=new r.DateTime(e,this.options.format,this.options.lang),this.updateInput())},a.Litepicker.prototype.setEndDate=function(e){e&&(this.options.endDate=new r.DateTime(e,this.options.format,this.options.lang),this.options.startDate.getTime()>this.options.endDate.getTime()&&(this.options.endDate=this.options.startDate.clone(),this.options.startDate=new r.DateTime(e,this.options.format,this.options.lang)),this.updateInput())},a.Litepicker.prototype.setDateRange=function(e,t,i){void 0===i&&(i=!1),this.triggerElement=void 0;var n=new r.DateTime(e,this.options.format,this.options.lang),a=new r.DateTime(t,this.options.format,this.options.lang);(this.options.disallowLockDaysInRange?o.rangeIsLocked([n,a],this.options):o.dateIsLocked(n,this.options,[n,a])||o.dateIsLocked(a,this.options,[n,a]))&&!i?this.emit("error:range",[n,a]):(this.setStartDate(n),this.setEndDate(a),this.options.inlineMode&&this.render(),this.updateInput(),this.emit("selected",this.getStartDate(),this.getEndDate()))},a.Litepicker.prototype.gotoDate=function(e,t){void 0===t&&(t=0);var i=new r.DateTime(e);i.setDate(1),this.calendars[t]=i.clone(),this.render()},a.Litepicker.prototype.setLockDays=function(e){this.options.lockDays=r.DateTime.convertArray(e,this.options.lockDaysFormat),this.render()},a.Litepicker.prototype.setHighlightedDays=function(e){this.options.highlightedDays=r.DateTime.convertArray(e,this.options.highlightedDaysFormat),this.render()},a.Litepicker.prototype.setOptions=function(e){delete e.element,delete e.elementEnd,delete e.parentEl,e.startDate&&(e.startDate=new r.DateTime(e.startDate,this.options.format,this.options.lang)),e.endDate&&(e.endDate=new r.DateTime(e.endDate,this.options.format,this.options.lang));var t=n(n({},this.options.dropdowns),e.dropdowns),i=n(n({},this.options.buttonText),e.buttonText),a=n(n({},this.options.tooltipText),e.tooltipText);this.options=n(n({},this.options),e),this.options.dropdowns=n({},t),this.options.buttonText=n({},i),this.options.tooltipText=n({},a),!this.options.singleMode||this.options.startDate instanceof r.DateTime||(this.options.startDate=null,this.options.endDate=null),this.options.singleMode||this.options.startDate instanceof r.DateTime&&this.options.endDate instanceof r.DateTime||(this.options.startDate=null,this.options.endDate=null);for(var o=0;o<this.options.numberOfMonths;o+=1){var s=this.options.startDate?this.options.startDate.clone():new r.DateTime;s.setDate(1),s.setMonth(s.getMonth()+o),this.calendars[o]=s}this.options.lockDays.length&&(this.options.lockDays=r.DateTime.convertArray(this.options.lockDays,this.options.lockDaysFormat)),this.options.highlightedDays.length&&(this.options.highlightedDays=r.DateTime.convertArray(this.options.highlightedDays,this.options.highlightedDaysFormat)),this.render(),this.options.inlineMode&&this.show(),this.updateInput()},a.Litepicker.prototype.clearSelection=function(){this.options.startDate=null,this.options.endDate=null,this.datePicked.length=0,this.updateInput(),this.isShowning()&&this.render(),this.emit("clear:selection")},a.Litepicker.prototype.destroy=function(){this.ui&&this.ui.parentNode&&(this.ui.parentNode.removeChild(this.ui),this.ui=null),this.emit("destroy")}}])},"object"==s(t)&&"object"==s(e)?e.exports=o():(r=[],void 0===(a="function"==typeof(n=o)?n.apply(t,r):n)||(e.exports=a))}).call(this,i(25)(e))},function(e,t,i){"use strict";function n(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}i.d(t,"a",(function(){return w}));var a=i(23),o=i.n(a);function s(e,t){return!t||"object"!==o()(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var c=i(18),h=i.n(c),d=function(e){return e.replace(/([A-Z])/g,(function(e){return"-".concat(e[0].toLowerCase())}))};function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var p=function(e,t,i){var n=t.className||t.class,r=i.className||i.class,a=m(e),o=m(n?n.split(" "):[]),s=m(r?r.split(" "):[]),l=[];return a.forEach((function(e){o.has(e)?(l.push(e),o.delete(e)):s.has(e)||l.push(e)})),o.forEach((function(e){return l.push(e)})),l.join(" ")},f=function(e,t){var i="on"+e,n=i in t;if(!n){var r=t.createElement("div");r.setAttribute(i,"return;"),n="function"==typeof r[i]}return n},g=function(e,t,i){var n=e.__events||(e.__events={}),r=n[t];r&&e.removeEventListener(t,r),e.addEventListener(t,n[t]=function(e){i&&i.call(this,e)})},m=function(e){var t=new Map;return e.forEach((function(e){return t.set(e,e)})),t},v=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return function(e){return t.forEach((function(t){"function"==typeof t?t(e):null!=t&&(t.current=e)}))}};function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=l(e);if(t){var r=l(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return s(this,i)}}var b=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(i[n[r]]=e[n[r]])}return i},x=function(e,t,i){var a=e.toLowerCase().split("-").map((function(e){return e.charAt(0).toUpperCase()+e.slice(1)})).join(""),o=function(t){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}(m,t);var o,s,l,c=y(m);function m(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,m),(t=c.call(this,e)).setComponentElRef=function(e){t.componentEl=e},t}return o=m,l=[{key:"displayName",get:function(){return a}}],(s=[{key:"componentDidMount",value:function(){this.componentDidUpdate(this.props)}},{key:"componentDidUpdate",value:function(e){!function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e instanceof Element){var n=p(e.classList,t,i);""!==n&&(e.className=n),Object.keys(t).forEach((function(i){if("children"!==i&&"style"!==i&&"ref"!==i&&"class"!==i&&"className"!==i&&"forwardedRef"!==i)if(0===i.indexOf("on")&&i[2]===i[2].toUpperCase()){var n=i.substring(2),r=n[0].toLowerCase()+n.substring(1);"undefined"==typeof document||f(r,document)||g(e,r,t[i])}else e[i]=t[i],"string"===u(t[i])?e.setAttribute(d(i),t[i]):e[i]=t[i]}))}}(this.componentEl,this.props,e)}},{key:"render",value:function(){var t=this.props,n=t.children,r=t.forwardedRef,a=t.style,o=(t.className,t.ref,b(t,["children","forwardedRef","style","className","ref"])),s=Object.keys(o).reduce((function(e,t){if(0===t.indexOf("on")&&t[2]===t[2].toUpperCase()){var i=t.substring(2).toLowerCase();"undefined"!=typeof document&&f(i,document)&&(e[t]=o[t])}else e[t]=o[t];return e}),{});i&&(s=i(this.props,s));var l=Object.assign(Object.assign({},s),{ref:v(r,this.setComponentElRef),style:a});return h.a.createElement(e,l,n)}}])&&n(o.prototype,s),l&&n(o,l),m}(h.a.Component);return t&&(o.contextType=t),function(e,t){var i=function(t,i){return h.a.createElement(e,Object.assign({},t,{forwardedRef:i}))};return i.displayName=t,h.a.forwardRef(i)}(o,a)},w=x("presto-player")},function(e,t,i){"use strict";function n(){return(n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e}).apply(this,arguments)}i.d(t,"a",(function(){return u}));var r,a=r||(r={});a.Pop="POP",a.Push="PUSH",a.Replace="REPLACE";var o=function(e){return e};function s(e){e.preventDefault(),e.returnValue=""}function l(){var e=[];return{get length(){return e.length},push:function(t){return e.push(t),function(){e=e.filter((function(e){return e!==t}))}},call:function(t){e.forEach((function(e){return e&&e(t)}))}}}function c(){return Math.random().toString(36).substr(2,8)}function h(e){var t=e.pathname,i=e.search;return(void 0===t?"/":t)+(void 0===i?"":i)+(void 0===(e=e.hash)?"":e)}function d(e){var t={};if(e){var i=e.indexOf("#");0<=i&&(t.hash=e.substr(i),e=e.substr(0,i)),0<=(i=e.indexOf("?"))&&(t.search=e.substr(i),e=e.substr(0,i)),e&&(t.pathname=e)}return t}function u(e){function t(){var e=f.location,t=g.state||{};return[t.idx,o({pathname:e.pathname,search:e.search,hash:e.hash,state:t.usr||null,key:t.key||"default"})]}function i(e){return"string"==typeof e?e:h(e)}function a(e,t){return void 0===t&&(t=null),o(n({},b,{},"string"==typeof e?d(e):e,{state:t,key:c()}))}function u(e){v=e,e=t(),y=e[0],b=e[1],x.call({action:v,location:b})}function p(e){g.go(e)}void 0===e&&(e={});var f=void 0===(e=e.window)?document.defaultView:e,g=f.history,m=null;f.addEventListener("popstate",(function(){if(m)w.call(m),m=null;else{var e=r.Pop,i=t(),n=i[0];if(i=i[1],w.length){if(null!=n){var a=y-n;a&&(m={action:e,location:i,retry:function(){p(-1*a)}},p(a))}}else u(e)}}));var v=r.Pop,y=(e=t())[0],b=e[1],x=l(),w=l();return null==y&&(y=0,g.replaceState(n({},g.state,{idx:y}),"")),{get action(){return v},get location(){return b},createHref:i,push:function e(t,n){var o=r.Push,s=a(t,n);if(!w.length||(w.call({action:o,location:s,retry:function(){e(t,n)}}),0)){var l=[{usr:s.state,key:s.key,idx:y+1},i(s)];s=l[0],l=l[1];try{g.pushState(s,"",l)}catch(e){f.location.assign(l)}u(o)}},replace:function e(t,n){var o=r.Replace,s=a(t,n);w.length&&(w.call({action:o,location:s,retry:function(){e(t,n)}}),1)||(s=[{usr:s.state,key:s.key,idx:y},i(s)],g.replaceState(s[0],"",s[1]),u(o))},go:p,back:function(){p(-1)},forward:function(){p(1)},listen:function(e){return x.push(e)},block:function(e){var t=w.push(e);return 1===w.length&&f.addEventListener("beforeunload",s),function(){t(),w.length||f.removeEventListener("beforeunload",s)}}}}},,function(e,t,i){var n="prestoPlayerdist".replace(/[^a-zA-Z0-9_-]/g,"");i.p=window["__wpackIo".concat(n)]},function(e,t,i){(function(e){var t=i(12),n=function(e){"use strict";var i=Object.prototype,n=i.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},a=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",s=r.toStringTag||"@@toStringTag";function l(e,t,i){return Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,i){return e[t]=i}}function c(e,t,i,n){var r=t&&t.prototype instanceof u?t:u,a=Object.create(r.prototype),o=new S(n||[]);return a._invoke=function(e,t,i){var n="suspendedStart";return function(r,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===r)throw a;return C()}for(i.method=r,i.arg=a;;){var o=i.delegate;if(o){var s=w(o,i);if(s){if(s===d)continue;return s}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===n)throw n="completed",i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);n="executing";var l=h(e,t,i);if("normal"===l.type){if(n=i.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:i.done}}"throw"===l.type&&(n="completed",i.method="throw",i.arg=l.arg)}}}(e,i,o),a}function h(e,t,i){try{return{type:"normal",arg:e.call(t,i)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var d={};function u(){}function p(){}function f(){}var g={};g[a]=function(){return this};var m=Object.getPrototypeOf,v=m&&m(m(A([])));v&&v!==i&&n.call(v,a)&&(g=v);var y=f.prototype=u.prototype=Object.create(g);function b(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,i){var r;this._invoke=function(a,o){function s(){return new i((function(r,s){!function r(a,o,s,l){var c=h(e[a],e,o);if("throw"!==c.type){var d=c.arg,u=d.value;return u&&"object"===t(u)&&n.call(u,"__await")?i.resolve(u.__await).then((function(e){r("next",e,s,l)}),(function(e){r("throw",e,s,l)})):i.resolve(u).then((function(e){d.value=e,s(d)}),(function(e){return r("throw",e,s,l)}))}l(c.arg)}(a,o,r,s)}))}return r=r?r.then(s,s):s()}}function w(e,t){var i=e.iterator[t.method];if(void 0===i){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return d;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var n=h(i,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,d;var r=n.arg;return r?r.done?(t[e.resultName]=r.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):r:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function A(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,r=function t(){for(;++i<e.length;)if(n.call(e,i))return t.value=e[i],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:C}}function C(){return{value:void 0,done:!0}}return p.prototype=y.constructor=f,f.constructor=p,p.displayName=l(f,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,l(e,s,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},b(x.prototype),x.prototype[o]=function(){return this},e.AsyncIterator=x,e.async=function(t,i,n,r,a){void 0===a&&(a=Promise);var o=new x(c(t,i,n,r),a);return e.isGeneratorFunction(i)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},b(y),l(y,s,"Generator"),y[a]=function(){return this},y.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var i in e)t.push(i);return t.reverse(),function i(){for(;t.length;){var n=t.pop();if(n in e)return i.value=n,i.done=!1,i}return i.done=!0,i}},e.values=A,S.prototype={constructor:S,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(_),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function i(i,n){return o.type="throw",o.arg=e,t.next=i,n&&(t.method="next",t.arg=void 0),!!n}for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r],o=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(s&&l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var i=this.tryEntries.length-1;i>=0;--i){var r=this.tryEntries[i];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var a=r;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,d):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var i=this.tryEntries[t];if(i.finallyLoc===e)return this.complete(i.completion,i.afterLoc),_(i),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var i=this.tryEntries[t];if(i.tryLoc===e){var n=i.completion;if("throw"===n.type){var r=n.arg;_(i)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,i){return this.delegate={iterator:A(e),resultName:t,nextLoc:i},"next"===this.method&&(this.arg=void 0),d}},e}("object"===t(e)?e.exports:{});try{regeneratorRuntime=n}catch(e){Function("r","regeneratorRuntime = r")(n)}}).call(this,i(25)(e))},,function(e,t,i){"use strict";var n,r=i(12);
24
+ /*!
25
+ * ApexCharts v3.27.1
26
+ * (c) 2018-2021 Juned Chhipa
27
+ * Released under the MIT License.
28
+ */function a(e){return(a="function"==typeof Symbol&&"symbol"==r(Symbol.iterator)?function(e){return r(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":r(e)})(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function l(e,t,i){return t&&s(e.prototype,t),i&&s(e,i),e}function c(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function h(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function d(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?h(Object(i),!0).forEach((function(t){c(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):h(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&function(e,t){(Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}(e,t)}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function f(e,t){return!t||"object"!=r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,n=p(e);if(t){var r=p(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return f(this,i)}}function m(e){return function(e){if(Array.isArray(e))return v(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return v(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?v(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}var y=function(){function e(){o(this,e)}return l(e,[{key:"shadeRGBColor",value:function(e,t){var i=t.split(","),n=e<0?0:255,r=e<0?-1*e:e,a=parseInt(i[0].slice(4),10),o=parseInt(i[1],10),s=parseInt(i[2],10);return"rgb("+(Math.round((n-a)*r)+a)+","+(Math.round((n-o)*r)+o)+","+(Math.round((n-s)*r)+s)+")"}},{key:"shadeHexColor",value:function(e,t){var i=parseInt(t.slice(1),16),n=e<0?0:255,r=e<0?-1*e:e,a=i>>16,o=i>>8&255,s=255&i;return"#"+(16777216+65536*(Math.round((n-a)*r)+a)+256*(Math.round((n-o)*r)+o)+(Math.round((n-s)*r)+s)).toString(16).slice(1)}},{key:"shadeColor",value:function(t,i){return e.isColorHex(i)?this.shadeHexColor(t,i):this.shadeRGBColor(t,i)}}],[{key:"bind",value:function(e,t){return function(){return e.apply(t,arguments)}}},{key:"isObject",value:function(e){return e&&"object"===a(e)&&!Array.isArray(e)&&null!=e}},{key:"listToArray",value:function(e){var t,i=[];for(t=0;t<e.length;t++)i[t]=e[t];return i}},{key:"extend",value:function(e,t){var i=this;"function"!=typeof Object.assign&&(Object.assign=function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),i=1;i<arguments.length;i++){var n=arguments[i];if(null!=n)for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])}return t});var n=Object.assign({},e);return this.isObject(e)&&this.isObject(t)&&Object.keys(t).forEach((function(r){i.isObject(t[r])&&r in e?n[r]=i.extend(e[r],t[r]):Object.assign(n,c({},r,t[r]))})),n}},{key:"extendArray",value:function(t,i){var n=[];return t.map((function(t){n.push(e.extend(i,t))})),n}},{key:"monthMod",value:function(e){return e%12}},{key:"clone",value:function(e){if("[object Array]"===Object.prototype.toString.call(e)){for(var t=[],i=0;i<e.length;i++)t[i]=this.clone(e[i]);return t}if("[object Null]"===Object.prototype.toString.call(e))return null;if("[object Date]"===Object.prototype.toString.call(e))return e;if("object"===a(e)){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]=this.clone(e[r]));return n}return e}},{key:"log10",value:function(e){return Math.log(e)/Math.LN10}},{key:"roundToBase10",value:function(e){return Math.pow(10,Math.floor(Math.log10(e)))}},{key:"roundToBase",value:function(e,t){return Math.pow(t,Math.floor(Math.log(e)/Math.log(t)))}},{key:"parseNumber",value:function(e){return null===e?e:parseFloat(e)}},{key:"randomId",value:function(){return(Math.random()+1).toString(36).substring(4)}},{key:"noExponents",value:function(e){var t=String(e).split(/[eE]/);if(1===t.length)return t[0];var i="",n=e<0?"-":"",r=t[0].replace(".",""),a=Number(t[1])+1;if(a<0){for(i=n+"0.";a++;)i+="0";return i+r.replace(/^-/,"")}for(a-=r.length;a--;)i+="0";return r+i}},{key:"getDimensions",value:function(e){var t=getComputedStyle(e,null),i=e.clientHeight,n=e.clientWidth;return i-=parseFloat(t.paddingTop)+parseFloat(t.paddingBottom),[n-=parseFloat(t.paddingLeft)+parseFloat(t.paddingRight),i]}},{key:"getBoundingClientRect",value:function(e){var t=e.getBoundingClientRect();return{top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:e.clientWidth,height:e.clientHeight,x:t.left,y:t.top}}},{key:"getLargestStringFromArr",value:function(e){return e.reduce((function(e,t){return Array.isArray(t)&&(t=t.reduce((function(e,t){return e.length>t.length?e:t}))),e.length>t.length?e:t}),0)}},{key:"hexToRgba",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"#999999",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.6;"#"!==e.substring(0,1)&&(e="#999999");var i=e.replace("#","");i=i.match(new RegExp("(.{"+i.length/3+"})","g"));for(var n=0;n<i.length;n++)i[n]=parseInt(1===i[n].length?i[n]+i[n]:i[n],16);return void 0!==t&&i.push(t),"rgba("+i.join(",")+")"}},{key:"getOpacityFromRGBA",value:function(e){return parseFloat(e.replace(/^.*,(.+)\)/,"$1"))}},{key:"rgb2hex",value:function(e){return(e=e.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===e.length?"#"+("0"+parseInt(e[1],10).toString(16)).slice(-2)+("0"+parseInt(e[2],10).toString(16)).slice(-2)+("0"+parseInt(e[3],10).toString(16)).slice(-2):""}},{key:"isColorHex",value:function(e){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)|(^#[0-9A-F]{8}$)/i.test(e)}},{key:"getPolygonPos",value:function(e,t){for(var i=[],n=2*Math.PI/t,r=0;r<t;r++){var a={};a.x=e*Math.sin(r*n),a.y=-e*Math.cos(r*n),i.push(a)}return i}},{key:"polarToCartesian",value:function(e,t,i,n){var r=(n-90)*Math.PI/180;return{x:e+i*Math.cos(r),y:t+i*Math.sin(r)}}},{key:"escapeString",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"x",i=e.toString().slice();return i.replace(/[` ~!@#$%^&*()_|+\-=?;:'",.<>{}[\]\\/]/gi,t)}},{key:"negToZero",value:function(e){return e<0?0:e}},{key:"moveIndexInArray",value:function(e,t,i){if(i>=e.length)for(var n=i-e.length+1;n--;)e.push(void 0);return e.splice(i,0,e.splice(t,1)[0]),e}},{key:"extractNumber",value:function(e){return parseFloat(e.replace(/[^\d.]*/g,""))}},{key:"findAncestor",value:function(e,t){for(;(e=e.parentElement)&&!e.classList.contains(t););return e}},{key:"setELstyles",value:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e.style.key=t[i])}},{key:"isNumber",value:function(e){return!isNaN(e)&&parseFloat(Number(e))===e&&!isNaN(parseInt(e,10))}},{key:"isFloat",value:function(e){return Number(e)===e&&e%1!=0}},{key:"isSafari",value:function(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}},{key:"isFirefox",value:function(){return navigator.userAgent.toLowerCase().indexOf("firefox")>-1}},{key:"isIE11",value:function(){if(-1!==window.navigator.userAgent.indexOf("MSIE")||window.navigator.appVersion.indexOf("Trident/")>-1)return!0}},{key:"isIE",value:function(){var e=window.navigator.userAgent,t=e.indexOf("MSIE ");if(t>0)return parseInt(e.substring(t+5,e.indexOf(".",t)),10);if(e.indexOf("Trident/")>0){var i=e.indexOf("rv:");return parseInt(e.substring(i+3,e.indexOf(".",i)),10)}var n=e.indexOf("Edge/");return n>0&&parseInt(e.substring(n+5,e.indexOf(".",n)),10)}},{key:"sanitizeDom",value:function(e){return e.replace(/\&/g,"&amp;").replace(/\</g,"&lt;").replace(/\>/g,"&gt;").replace(/\"/g,"&quot;")}}]),e}(),b=function(){function e(t){o(this,e),this.ctx=t,this.w=t.w,this.setEasingFunctions()}return l(e,[{key:"setEasingFunctions",value:function(){var e;if(!this.w.globals.easing){switch(this.w.config.chart.animations.easing){case"linear":e="-";break;case"easein":e="<";break;case"easeout":e=">";break;case"easeinout":e="<>";break;case"swing":e=function(e){var t=1.70158;return(e-=1)*e*((t+1)*e+t)+1};break;case"bounce":e=function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375};break;case"elastic":e=function(e){return e===!!e?e:Math.pow(2,-10*e)*Math.sin((e-.075)*(2*Math.PI)/.3)+1};break;default:e="<>"}this.w.globals.easing=e}}},{key:"animateLine",value:function(e,t,i,n){e.attr(t).animate(n).attr(i)}},{key:"animateMarker",value:function(e,t,i,n,r,a){t||(t=0),e.attr({r:t,width:t,height:t}).animate(n,r).attr({r:i,width:i.width,height:i.height}).afterAll((function(){a()}))}},{key:"animateCircle",value:function(e,t,i,n,r){e.attr({r:t.r,cx:t.cx,cy:t.cy}).animate(n,r).attr({r:i.r,cx:i.cx,cy:i.cy})}},{key:"animateRect",value:function(e,t,i,n,r){e.attr(t).animate(n).attr(i).afterAll((function(){return r()}))}},{key:"animatePathsGradually",value:function(e){var t=e.el,i=e.realIndex,n=e.j,r=e.fill,a=e.pathFrom,o=e.pathTo,s=e.speed,l=e.delay,c=this.w,h=0;c.config.chart.animations.animateGradually.enabled&&(h=c.config.chart.animations.animateGradually.delay),c.config.chart.animations.dynamicAnimation.enabled&&c.globals.dataChanged&&"bar"!==c.config.chart.type&&(h=0),this.morphSVG(t,i,n,"line"!==c.config.chart.type||c.globals.comboCharts?r:"stroke",a,o,s,l*h)}},{key:"showDelayedElements",value:function(){this.w.globals.delayedElements.forEach((function(e){e.el.classList.remove("apexcharts-element-hidden")}))}},{key:"animationCompleted",value:function(e){var t=this.w;t.globals.animationEnded||(t.globals.animationEnded=!0,this.showDelayedElements(),"function"==typeof t.config.chart.events.animationEnd&&t.config.chart.events.animationEnd(this.ctx,{el:e,w:t}))}},{key:"morphSVG",value:function(e,t,i,n,r,a,o,s){var l=this,c=this.w;r||(r=e.attr("pathFrom")),a||(a=e.attr("pathTo"));var h=function(e){return"radar"===c.config.chart.type&&(o=1),"M 0 ".concat(c.globals.gridHeight)};(!r||r.indexOf("undefined")>-1||r.indexOf("NaN")>-1)&&(r=h()),(!a||a.indexOf("undefined")>-1||a.indexOf("NaN")>-1)&&(a=h()),c.globals.shouldAnimate||(o=1),e.plot(r).animate(1,c.globals.easing,s).plot(r).animate(o,c.globals.easing,s).plot(a).afterAll((function(){y.isNumber(i)?i===c.globals.series[c.globals.maxValsInArrayIndex].length-2&&c.globals.shouldAnimate&&l.animationCompleted(e):"none"!==n&&c.globals.shouldAnimate&&(!c.globals.comboCharts&&t===c.globals.series.length-1||c.globals.comboCharts)&&l.animationCompleted(e),l.showDelayedElements()}))}}]),e}(),x=function(){function e(t){o(this,e),this.ctx=t,this.w=t.w}return l(e,[{key:"getDefaultFilter",value:function(e,t){var i=this.w;e.unfilter(!0),(new window.SVG.Filter).size("120%","180%","-5%","-40%"),"none"!==i.config.states.normal.filter?this.applyFilter(e,t,i.config.states.normal.filter.type,i.config.states.normal.filter.value):i.config.chart.dropShadow.enabled&&this.dropShadow(e,i.config.chart.dropShadow,t)}},{key:"addNormalFilter",value:function(e,t){var i=this.w;i.config.chart.dropShadow.enabled&&!e.node.classList.contains("apexcharts-marker")&&this.dropShadow(e,i.config.chart.dropShadow,t)}},{key:"addLightenFilter",value:function(e,t,i){var n=this,r=this.w,a=i.intensity;e.unfilter(!0),new window.SVG.Filter,e.filter((function(e){var i=r.config.chart.dropShadow;(i.enabled?n.addShadow(e,t,i):e).componentTransfer({rgb:{type:"linear",slope:1.5,intercept:a}})})),e.filterer.node.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(e.filterer.node)}},{key:"addDarkenFilter",value:function(e,t,i){var n=this,r=this.w,a=i.intensity;e.unfilter(!0),new window.SVG.Filter,e.filter((function(e){var i=r.config.chart.dropShadow;(i.enabled?n.addShadow(e,t,i):e).componentTransfer({rgb:{type:"linear",slope:a}})})),e.filterer.node.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(e.filterer.node)}},{key:"applyFilter",value:function(e,t,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.5;switch(i){case"none":this.addNormalFilter(e,t);break;case"lighten":this.addLightenFilter(e,t,{intensity:n});break;case"darken":this.addDarkenFilter(e,t,{intensity:n})}}},{key:"addShadow",value:function(e,t,i){var n=i.blur,r=i.top,a=i.left,o=i.color,s=i.opacity,l=e.flood(Array.isArray(o)?o[t]:o,s).composite(e.sourceAlpha,"in").offset(a,r).gaussianBlur(n).merge(e.source);return e.blend(e.source,l)}},{key:"dropShadow",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=t.top,r=t.left,a=t.blur,o=t.color,s=t.opacity,l=t.noUserSpaceOnUse,c=this.w;return e.unfilter(!0),y.isIE()&&"radialBar"===c.config.chart.type||(o=Array.isArray(o)?o[i]:o,e.filter((function(e){var t;t=y.isSafari()||y.isFirefox()||y.isIE()?e.flood(o,s).composite(e.sourceAlpha,"in").offset(r,n).gaussianBlur(a):e.flood(o,s).composite(e.sourceAlpha,"in").offset(r,n).gaussianBlur(a).merge(e.source),e.blend(e.source,t)})),l||e.filterer.node.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(e.filterer.node)),e}},{key:"setSelectionFilter",value:function(e,t,i){var n=this.w;if(void 0!==n.globals.selectedDataPoints[t]&&n.globals.selectedDataPoints[t].indexOf(i)>-1){e.node.setAttribute("selected",!0);var r=n.config.states.active.filter;"none"!==r&&this.applyFilter(e,t,r.type,r.value)}}},{key:"_scaleFilterSize",value:function(e){!function(t){for(var i in t)t.hasOwnProperty(i)&&e.setAttribute(i,t[i])}({width:"200%",height:"200%",x:"-50%",y:"-50%"})}}]),e}(),w=function(){function e(t){o(this,e),this.ctx=t,this.w=t.w}return l(e,[{key:"drawLine",value:function(e,t,i,n){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"#a8a8a8",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,s=this.w,l=s.globals.dom.Paper.line().attr({x1:e,y1:t,x2:i,y2:n,stroke:r,"stroke-dasharray":a,"stroke-width":o});return l}},{key:"drawRect",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"#fefefe",o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1,s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,l=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null,c=arguments.length>9&&void 0!==arguments[9]?arguments[9]:0,h=this.w,d=h.globals.dom.Paper.rect();return d.attr({x:e,y:t,width:i>0?i:0,height:n>0?n:0,rx:r,ry:r,opacity:o,"stroke-width":null!==s?s:0,stroke:null!==l?l:"none","stroke-dasharray":c}),d.node.setAttribute("fill",a),d}},{key:"drawPolygon",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#e1e1e1",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"none",r=this.w,a=r.globals.dom.Paper.polygon(e).attr({fill:n,stroke:t,"stroke-width":i});return a}},{key:"drawCircle",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.w;e<0&&(e=0);var n=i.globals.dom.Paper.circle(2*e);return null!==t&&n.attr(t),n}},{key:"drawPath",value:function(e){var t=e.d,i=void 0===t?"":t,n=e.stroke,r=void 0===n?"#a8a8a8":n,a=e.strokeWidth,o=void 0===a?1:a,s=e.fill,l=e.fillOpacity,c=void 0===l?1:l,h=e.strokeOpacity,d=void 0===h?1:h,u=e.classes,p=e.strokeLinecap,f=void 0===p?null:p,g=e.strokeDashArray,m=void 0===g?0:g,v=this.w;return null===f&&(f=v.config.stroke.lineCap),(i.indexOf("undefined")>-1||i.indexOf("NaN")>-1)&&(i="M 0 ".concat(v.globals.gridHeight)),v.globals.dom.Paper.path(i).attr({fill:s,"fill-opacity":c,stroke:r,"stroke-opacity":d,"stroke-linecap":f,"stroke-width":o,"stroke-dasharray":m,class:u})}},{key:"group",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=this.w,i=t.globals.dom.Paper.group();return null!==e&&i.attr(e),i}},{key:"move",value:function(e,t){return["M",e,t].join(" ")}},{key:"line",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=null;return null===i?n=["L",e,t].join(" "):"H"===i?n=["H",e].join(" "):"V"===i&&(n=["V",t].join(" ")),n}},{key:"curve",value:function(e,t,i,n,r,a){return["C",e,t,i,n,r,a].join(" ")}},{key:"quadraticCurve",value:function(e,t,i,n){return["Q",e,t,i,n].join(" ")}},{key:"arc",value:function(e,t,i,n,r,a,o){var s=arguments.length>7&&void 0!==arguments[7]&&arguments[7],l="A";s&&(l="a");var c=[l,e,t,i,n,r,a,o].join(" ");return c}},{key:"renderPaths",value:function(e){var t,i=e.j,n=e.realIndex,r=e.pathFrom,a=e.pathTo,o=e.stroke,s=e.strokeWidth,l=e.strokeLinecap,c=e.fill,h=e.animationDelay,u=e.initialSpeed,p=e.dataChangeSpeed,f=e.className,g=e.shouldClipToGrid,m=void 0===g||g,v=e.bindEventsOnPaths,y=void 0===v||v,w=e.drawShadow,k=void 0===w||w,_=this.w,S=new x(this.ctx),A=new b(this.ctx),C=this.w.config.chart.animations.enabled,T=C&&this.w.config.chart.animations.dynamicAnimation.enabled,P=!!(C&&!_.globals.resized||T&&_.globals.dataChanged&&_.globals.shouldAnimate);P?t=r:(t=a,_.globals.animationEnded=!0);var L,E=_.config.stroke.dashArray;L=Array.isArray(E)?E[n]:_.config.stroke.dashArray;var M=this.drawPath({d:t,stroke:o,strokeWidth:s,fill:c,fillOpacity:1,classes:f,strokeLinecap:l,strokeDashArray:L});if(M.attr("index",n),m&&M.attr({"clip-path":"url(#gridRectMask".concat(_.globals.cuid,")")}),"none"!==_.config.states.normal.filter.type)S.getDefaultFilter(M,n);else if(_.config.chart.dropShadow.enabled&&k&&(!_.config.chart.dropShadow.enabledOnSeries||_.config.chart.dropShadow.enabledOnSeries&&-1!==_.config.chart.dropShadow.enabledOnSeries.indexOf(n))){var O=_.config.chart.dropShadow;S.dropShadow(M,O,n)}y&&(M.node.addEventListener("mouseenter",this.pathMouseEnter.bind(this,M)),M.node.addEventListener("mouseleave",this.pathMouseLeave.bind(this,M)),M.node.addEventListener("mousedown",this.pathMouseDown.bind(this,M))),M.attr({pathTo:a,pathFrom:r});var I={el:M,j:i,realIndex:n,pathFrom:r,pathTo:a,fill:c,strokeWidth:s,delay:h};return!C||_.globals.resized||_.globals.dataChanged?!_.globals.resized&&_.globals.dataChanged||A.showDelayedElements():A.animatePathsGradually(d(d({},I),{},{speed:u})),_.globals.dataChanged&&T&&P&&A.animatePathsGradually(d(d({},I),{},{speed:p})),M}},{key:"drawPattern",value:function(e,t,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"#a8a8a8",r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=this.w,o=a.globals.dom.Paper.pattern(t,i,(function(a){"horizontalLines"===e?a.line(0,0,i,0).stroke({color:n,width:r+1}):"verticalLines"===e?a.line(0,0,0,t).stroke({color:n,width:r+1}):"slantedLines"===e?a.line(0,0,t,i).stroke({color:n,width:r}):"squares"===e?a.rect(t,i).fill("none").stroke({color:n,width:r}):"circles"===e&&a.circle(t).fill("none").stroke({color:n,width:r})}));return o}},{key:"drawGradient",value:function(e,t,i,n,r){var a,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,l=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,c=arguments.length>8&&void 0!==arguments[8]?arguments[8]:0,h=this.w;t.length<9&&0===t.indexOf("#")&&(t=y.hexToRgba(t,n)),i.length<9&&0===i.indexOf("#")&&(i=y.hexToRgba(i,r));var d=0,u=1,p=1,f=null;null!==s&&(d=void 0!==s[0]?s[0]/100:0,u=void 0!==s[1]?s[1]/100:1,p=void 0!==s[2]?s[2]/100:1,f=void 0!==s[3]?s[3]/100:null);var g=!("donut"!==h.config.chart.type&&"pie"!==h.config.chart.type&&"polarArea"!==h.config.chart.type&&"bubble"!==h.config.chart.type);if(a=null===l||0===l.length?h.globals.dom.Paper.gradient(g?"radial":"linear",(function(e){e.at(d,t,n),e.at(u,i,r),e.at(p,i,r),null!==f&&e.at(f,t,n)})):h.globals.dom.Paper.gradient(g?"radial":"linear",(function(e){(Array.isArray(l[c])?l[c]:l).forEach((function(t){e.at(t.offset/100,t.color,t.opacity)}))})),g){var m=h.globals.gridWidth/2,v=h.globals.gridHeight/2;"bubble"!==h.config.chart.type?a.attr({gradientUnits:"userSpaceOnUse",cx:m,cy:v,r:o}):a.attr({cx:.5,cy:.5,r:.8,fx:.2,fy:.2})}else"vertical"===e?a.from(0,0).to(0,1):"diagonal"===e?a.from(0,0).to(1,1):"horizontal"===e?a.from(0,1).to(1,1):"diagonal2"===e&&a.from(1,0).to(0,1);return a}},{key:"drawText",value:function(e){var t,i=e.x,n=e.y,r=e.text,a=e.textAnchor,o=e.fontSize,s=e.fontFamily,l=e.fontWeight,c=e.foreColor,h=e.opacity,d=e.cssClass,u=void 0===d?"":d,p=e.isPlainText,f=void 0===p||p,g=this.w;return void 0===r&&(r=""),a||(a="start"),c&&c.length||(c=g.config.chart.foreColor),s=s||g.config.chart.fontFamily,l=l||"regular",(t=Array.isArray(r)?g.globals.dom.Paper.text((function(e){for(var t=0;t<r.length;t++)0===t?e.tspan(r[t]):e.tspan(r[t]).newLine()})):f?g.globals.dom.Paper.plain(r):g.globals.dom.Paper.text((function(e){return e.tspan(r)}))).attr({x:i,y:n,"text-anchor":a,"dominant-baseline":"auto","font-size":o,"font-family":s,"font-weight":l,fill:c,class:"apexcharts-text "+u}),t.node.style.fontFamily=s,t.node.style.opacity=h,t}},{key:"drawMarker",value:function(e,t,i){e=e||0;var n=i.pSize||0,r=null;if("square"===i.shape||"rect"===i.shape){var a=void 0===i.pRadius?n/2:i.pRadius;null!==t&&n||(n=0,a=0);var o=1.2*n+a,s=this.drawRect(o,o,o,o,a);s.attr({x:e-o/2,y:t-o/2,cx:e,cy:t,class:i.class?i.class:"",fill:i.pointFillColor,"fill-opacity":i.pointFillOpacity?i.pointFillOpacity:1,stroke:i.pointStrokeColor,"stroke-width":i.pointStrokeWidth?i.pointStrokeWidth:0,"stroke-opacity":i.pointStrokeOpacity?i.pointStrokeOpacity:1}),r=s}else"circle"!==i.shape&&i.shape||(y.isNumber(t)||(n=0,t=0),r=this.drawCircle(n,{cx:e,cy:t,class:i.class?i.class:"",stroke:i.pointStrokeColor,fill:i.pointFillColor,"fill-opacity":i.pointFillOpacity?i.pointFillOpacity:1,"stroke-width":i.pointStrokeWidth?i.pointStrokeWidth:0,"stroke-opacity":i.pointStrokeOpacity?i.pointStrokeOpacity:1}));return r}},{key:"pathMouseEnter",value:function(e,t){var i=this.w,n=new x(this.ctx),r=parseInt(e.node.getAttribute("index"),10),a=parseInt(e.node.getAttribute("j"),10);if("function"==typeof i.config.chart.events.dataPointMouseEnter&&i.config.chart.events.dataPointMouseEnter(t,this.ctx,{seriesIndex:r,dataPointIndex:a,w:i}),this.ctx.events.fireEvent("dataPointMouseEnter",[t,this.ctx,{seriesIndex:r,dataPointIndex:a,w:i}]),("none"===i.config.states.active.filter.type||"true"!==e.node.getAttribute("selected"))&&"none"!==i.config.states.hover.filter.type&&"none"!==i.config.states.active.filter.type&&!i.globals.isTouchDevice){var o=i.config.states.hover.filter;n.applyFilter(e,r,o.type,o.value)}}},{key:"pathMouseLeave",value:function(e,t){var i=this.w,n=new x(this.ctx),r=parseInt(e.node.getAttribute("index"),10),a=parseInt(e.node.getAttribute("j"),10);"function"==typeof i.config.chart.events.dataPointMouseLeave&&i.config.chart.events.dataPointMouseLeave(t,this.ctx,{seriesIndex:r,dataPointIndex:a,w:i}),this.ctx.events.fireEvent("dataPointMouseLeave",[t,this.ctx,{seriesIndex:r,dataPointIndex:a,w:i}]),"none"!==i.config.states.active.filter.type&&"true"===e.node.getAttribute("selected")||"none"!==i.config.states.hover.filter.type&&n.getDefaultFilter(e,r)}},{key:"pathMouseDown",value:function(e,t){var i=this.w,n=new x(this.ctx),r=parseInt(e.node.getAttribute("index"),10),a=parseInt(e.node.getAttribute("j"),10),o="false";if("true"===e.node.getAttribute("selected")){if(e.node.setAttribute("selected","false"),i.globals.selectedDataPoints[r].indexOf(a)>-1){var s=i.globals.selectedDataPoints[r].indexOf(a);i.globals.selectedDataPoints[r].splice(s,1)}}else{if(!i.config.states.active.allowMultipleDataPointsSelection&&i.globals.selectedDataPoints.length>0){i.globals.selectedDataPoints=[];var l=i.globals.dom.Paper.select(".apexcharts-series path").members,c=i.globals.dom.Paper.select(".apexcharts-series circle, .apexcharts-series rect").members,h=function(e){Array.prototype.forEach.call(e,(function(e){e.node.setAttribute("selected","false"),n.getDefaultFilter(e,r)}))};h(l),h(c)}e.node.setAttribute("selected","true"),o="true",void 0===i.globals.selectedDataPoints[r]&&(i.globals.selectedDataPoints[r]=[]),i.globals.selectedDataPoints[r].push(a)}if("true"===o){var d=i.config.states.active.filter;"none"!==d&&n.applyFilter(e,r,d.type,d.value)}else"none"!==i.config.states.active.filter.type&&n.getDefaultFilter(e,r);"function"==typeof i.config.chart.events.dataPointSelection&&i.config.chart.events.dataPointSelection(t,this.ctx,{selectedDataPoints:i.globals.selectedDataPoints,seriesIndex:r,dataPointIndex:a,w:i}),t&&this.ctx.events.fireEvent("dataPointSelection",[t,this.ctx,{selectedDataPoints:i.globals.selectedDataPoints,seriesIndex:r,dataPointIndex:a,w:i}])}},{key:"rotateAroundCenter",value:function(e){var t=e.getBBox();return{x:t.x+t.width/2,y:t.y+t.height/2}}},{key:"getTextRects",value:function(e,t,i,n){var r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=this.w,o=this.drawText({x:-200,y:-200,text:e,textAnchor:"start",fontSize:t,fontFamily:i,foreColor:"#fff",opacity:0});n&&o.attr("transform",n),a.globals.dom.Paper.add(o);var s=o.bbox();return r||(s=o.node.getBoundingClientRect()),o.remove(),{width:s.width,height:s.height}}},{key:"placeTextWithEllipsis",value:function(e,t,i){if("function"==typeof e.getComputedTextLength&&(e.textContent=t,t.length>0&&e.getComputedTextLength()>=i/1.1)){for(var n=t.length-3;n>0;n-=3)if(e.getSubStringLength(0,n)<=i/1.1)return void(e.textContent=t.substring(0,n)+"...");e.textContent="."}}}],[{key:"setAttrs",value:function(e,t){for(var i in t)t.hasOwnProperty(i)&&e.setAttribute(i,t[i])}}]),e}(),k=function(){function e(t){o(this,e),this.w=t.w,this.annoCtx=t}return l(e,[{key:"setOrientations",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.w;if("vertical"===e.label.orientation){var n=null!==t?t:0,r=i.globals.dom.baseEl.querySelector(".apexcharts-xaxis-annotations .apexcharts-xaxis-annotation-label[rel='".concat(n,"']"));if(null!==r){var a=r.getBoundingClientRect();r.setAttribute("x",parseFloat(r.getAttribute("x"))-a.height+4),"top"===e.label.position?r.setAttribute("y",parseFloat(r.getAttribute("y"))+a.width):r.setAttribute("y",parseFloat(r.getAttribute("y"))-a.width);var o=this.annoCtx.graphics.rotateAroundCenter(r),s=o.x,l=o.y;r.setAttribute("transform","rotate(-90 ".concat(s," ").concat(l,")"))}}}},{key:"addBackgroundToAnno",value:function(e,t){var i=this.w;if(!e||!t.label.text||t.label.text&&!t.label.text.trim())return null;var n=i.globals.dom.baseEl.querySelector(".apexcharts-grid").getBoundingClientRect(),r=e.getBoundingClientRect(),a=t.label.style.padding.left,o=t.label.style.padding.right,s=t.label.style.padding.top,l=t.label.style.padding.bottom;"vertical"===t.label.orientation&&(s=t.label.style.padding.left,l=t.label.style.padding.right,a=t.label.style.padding.top,o=t.label.style.padding.bottom);var c=r.left-n.left-a,h=r.top-n.top-s,d=this.annoCtx.graphics.drawRect(c-i.globals.barPadForNumericAxis,h,r.width+a+o,r.height+s+l,t.label.borderRadius,t.label.style.background,1,t.label.borderWidth,t.label.borderColor,0);return t.id&&d.node.classList.add(t.id),d}},{key:"annotationsBackground",value:function(){var e=this,t=this.w,i=function(i,n,r){var a=t.globals.dom.baseEl.querySelector(".apexcharts-".concat(r,"-annotations .apexcharts-").concat(r,"-annotation-label[rel='").concat(n,"']"));if(a){var o=a.parentNode,s=e.addBackgroundToAnno(a,i);s&&o.insertBefore(s.node,a)}};t.config.annotations.xaxis.map((function(e,t){i(e,t,"xaxis")})),t.config.annotations.yaxis.map((function(e,t){i(e,t,"yaxis")})),t.config.annotations.points.map((function(e,t){i(e,t,"point")}))}},{key:"getStringX",value:function(e){var t=this.w,i=e;t.config.xaxis.convertedCatToNumeric&&t.globals.categoryLabels.length&&(e=t.globals.categoryLabels.indexOf(e)+1);var n=t.globals.labels.indexOf(e),r=t.globals.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g text:nth-child("+(n+1)+")");return r&&(i=parseFloat(r.getAttribute("x"))),i}}]),e}(),_=function(){function e(t){o(this,e),this.w=t.w,this.annoCtx=t,this.invertAxis=this.annoCtx.invertAxis}return l(e,[{key:"addXaxisAnnotation",value:function(e,t,i){var n=this.w,r=this.invertAxis?n.globals.minY:n.globals.minX,a=this.invertAxis?n.globals.maxY:n.globals.maxX,o=this.invertAxis?n.globals.yRange[0]:n.globals.xRange,s=(e.x-r)/(o/n.globals.gridWidth);this.annoCtx.inversedReversedAxis&&(s=(a-e.x)/(o/n.globals.gridWidth));var l=e.label.text;"category"!==n.config.xaxis.type&&!n.config.xaxis.convertedCatToNumeric||this.invertAxis||n.globals.dataFormatXNumeric||(s=this.annoCtx.helpers.getStringX(e.x));var c=e.strokeDashArray;if(y.isNumber(s)){if(null===e.x2||void 0===e.x2){var h=this.annoCtx.graphics.drawLine(s+e.offsetX,0+e.offsetY,s+e.offsetX,n.globals.gridHeight+e.offsetY,e.borderColor,c,e.borderWidth);t.appendChild(h.node),e.id&&h.node.classList.add(e.id)}else{var d=(e.x2-r)/(o/n.globals.gridWidth);if(this.annoCtx.inversedReversedAxis&&(d=(a-e.x2)/(o/n.globals.gridWidth)),"category"!==n.config.xaxis.type&&!n.config.xaxis.convertedCatToNumeric||this.invertAxis||n.globals.dataFormatXNumeric||(d=this.annoCtx.helpers.getStringX(e.x2)),d<s){var u=s;s=d,d=u}var p=this.annoCtx.graphics.drawRect(s+e.offsetX,0+e.offsetY,d-s,n.globals.gridHeight+e.offsetY,0,e.fillColor,e.opacity,1,e.borderColor,c);p.node.classList.add("apexcharts-annotation-rect"),p.attr("clip-path","url(#gridRectMask".concat(n.globals.cuid,")")),t.appendChild(p.node),e.id&&p.node.classList.add(e.id)}var f="top"===e.label.position?4:n.globals.gridHeight,g=this.annoCtx.graphics.getTextRects(l,parseFloat(e.label.style.fontSize)),m=this.annoCtx.graphics.drawText({x:s+e.label.offsetX,y:f+e.label.offsetY-("vertical"===e.label.orientation?"top"===e.label.position?g.width/2-12:-g.width/2:0),text:l,textAnchor:e.label.textAnchor,fontSize:e.label.style.fontSize,fontFamily:e.label.style.fontFamily,fontWeight:e.label.style.fontWeight,foreColor:e.label.style.color,cssClass:"apexcharts-xaxis-annotation-label ".concat(e.label.style.cssClass," ").concat(e.id?e.id:"")});m.attr({rel:i}),t.appendChild(m.node),this.annoCtx.helpers.setOrientations(e,i)}}},{key:"drawXAxisAnnotations",value:function(){var e=this,t=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-xaxis-annotations"});return t.config.annotations.xaxis.map((function(t,n){e.addXaxisAnnotation(t,i.node,n)})),i}}]),e}(),S=function(){function e(t){o(this,e),this.ctx=t,this.w=t.w}return l(e,[{key:"getStackedSeriesTotals",value:function(){var e=this.w,t=[];if(0===e.globals.series.length)return t;for(var i=0;i<e.globals.series[e.globals.maxValsInArrayIndex].length;i++){for(var n=0,r=0;r<e.globals.series.length;r++)void 0!==e.globals.series[r][i]&&(n+=e.globals.series[r][i]);t.push(n)}return e.globals.stackedSeriesTotals=t,t}},{key:"getSeriesTotalByIndex",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return null===e?this.w.config.series.reduce((function(e,t){return e+t}),0):this.w.globals.series[e].reduce((function(e,t){return e+t}),0)}},{key:"isSeriesNull",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return 0===(null===e?this.w.config.series.filter((function(e){return null!==e})):this.w.config.series[e].data.filter((function(e){return null!==e}))).length}},{key:"seriesHaveSameValues",value:function(e){return this.w.globals.series[e].every((function(e,t,i){return e===i[0]}))}},{key:"getCategoryLabels",value:function(e){var t=this.w,i=e.slice();return t.config.xaxis.convertedCatToNumeric&&(i=e.map((function(e,i){return t.config.xaxis.labels.formatter(e-t.globals.minX+1)}))),i}},{key:"getLargestSeries",value:function(){var e=this.w;e.globals.maxValsInArrayIndex=e.globals.series.map((function(e){return e.length})).indexOf(Math.max.apply(Math,e.globals.series.map((function(e){return e.length}))))}},{key:"getLargestMarkerSize",value:function(){var e=this.w,t=0;return e.globals.markers.size.forEach((function(e){t=Math.max(t,e)})),e.globals.markers.largestSize=t,t}},{key:"getSeriesTotals",value:function(){var e=this.w;e.globals.seriesTotals=e.globals.series.map((function(e,t){var i=0;if(Array.isArray(e))for(var n=0;n<e.length;n++)i+=e[n];else i+=e;return i}))}},{key:"getSeriesTotalsXRange",value:function(e,t){var i=this.w;return i.globals.series.map((function(n,r){for(var a=0,o=0;o<n.length;o++)i.globals.seriesX[r][o]>e&&i.globals.seriesX[r][o]<t&&(a+=n[o]);return a}))}},{key:"getPercentSeries",value:function(){var e=this.w;e.globals.seriesPercent=e.globals.series.map((function(t,i){var n=[];if(Array.isArray(t))for(var r=0;r<t.length;r++){var a=e.globals.stackedSeriesTotals[r],o=0;a&&(o=100*t[r]/a),n.push(o)}else{var s=100*t/e.globals.seriesTotals.reduce((function(e,t){return e+t}),0);n.push(s)}return n}))}},{key:"getCalculatedRatios",value:function(){var e,t,i,n,r=this.w.globals,a=[],o=0,s=[],l=.1,c=0;if(r.yRange=[],r.isMultipleYAxis)for(var h=0;h<r.minYArr.length;h++)r.yRange.push(Math.abs(r.minYArr[h]-r.maxYArr[h])),s.push(0);else r.yRange.push(Math.abs(r.minY-r.maxY));r.xRange=Math.abs(r.maxX-r.minX),r.zRange=Math.abs(r.maxZ-r.minZ);for(var d=0;d<r.yRange.length;d++)a.push(r.yRange[d]/r.gridHeight);if(t=r.xRange/r.gridWidth,i=Math.abs(r.initialMaxX-r.initialMinX)/r.gridWidth,e=r.yRange/r.gridWidth,n=r.xRange/r.gridHeight,(o=r.zRange/r.gridHeight*16)||(o=1),r.minY!==Number.MIN_VALUE&&0!==Math.abs(r.minY)&&(r.hasNegs=!0),r.isMultipleYAxis){s=[];for(var u=0;u<a.length;u++)s.push(-r.minYArr[u]/a[u])}else s.push(-r.minY/a[0]),r.minY!==Number.MIN_VALUE&&0!==Math.abs(r.minY)&&(l=-r.minY/e,c=r.minX/t);return{yRatio:a,invertedYRatio:e,zRatio:o,xRatio:t,initialXRatio:i,invertedXRatio:n,baseLineInvertedY:l,baseLineY:s,baseLineX:c}}},{key:"getLogSeries",value:function(e){var t=this,i=this.w;return i.globals.seriesLog=e.map((function(e,n){return i.config.yaxis[n]&&i.config.yaxis[n].logarithmic?e.map((function(e){return null===e?null:t.getLogVal(e,n)})):e})),i.globals.invalidLogScale?e:i.globals.seriesLog}},{key:"getLogVal",value:function(e,t){var i=this.w;return(Math.log(e)-Math.log(i.globals.minYArr[t]))/(Math.log(i.globals.maxYArr[t])-Math.log(i.globals.minYArr[t]))}},{key:"getLogYRatios",value:function(e){var t=this,i=this.w,n=this.w.globals;return n.yLogRatio=e.slice(),n.logYRange=n.yRange.map((function(e,r){if(i.config.yaxis[r]&&t.w.config.yaxis[r].logarithmic){var a,o=-Number.MAX_VALUE,s=Number.MIN_VALUE;return n.seriesLog.forEach((function(e,t){e.forEach((function(e){i.config.yaxis[t]&&i.config.yaxis[t].logarithmic&&(o=Math.max(e,o),s=Math.min(e,s))}))})),a=Math.pow(n.yRange[r],Math.abs(s-o)/n.yRange[r]),n.yLogRatio[r]=a/n.gridHeight,a}})),n.invalidLogScale?e.slice():n.yLogRatio}}],[{key:"checkComboSeries",value:function(e){var t=!1,i=0,n=0;return e.length&&void 0!==e[0].type&&e.forEach((function(e){"bar"!==e.type&&"column"!==e.type&&"candlestick"!==e.type&&"boxPlot"!==e.type||i++,void 0!==e.type&&n++})),n>1&&(t=!0),{comboBarCount:i,comboCharts:t}}},{key:"extendArrayProps",value:function(e,t,i){return t.yaxis&&(t=e.extendYAxis(t,i)),t.annotations&&(t.annotations.yaxis&&(t=e.extendYAxisAnnotations(t)),t.annotations.xaxis&&(t=e.extendXAxisAnnotations(t)),t.annotations.points&&(t=e.extendPointAnnotations(t))),t}}]),e}(),A=function(){function e(t){o(this,e),this.w=t.w,this.annoCtx=t}return l(e,[{key:"addYaxisAnnotation",value:function(e,t,i){var n,r=this.w,a=e.strokeDashArray,o=this._getY1Y2("y1",e),s=e.label.text;if(null===e.y2||void 0===e.y2){var l=this.annoCtx.graphics.drawLine(0+e.offsetX,o+e.offsetY,this._getYAxisAnnotationWidth(e),o+e.offsetY,e.borderColor,a,e.borderWidth);t.appendChild(l.node),e.id&&l.node.classList.add(e.id)}else{if((n=this._getY1Y2("y2",e))>o){var c=o;o=n,n=c}var h=this.annoCtx.graphics.drawRect(0+e.offsetX,n+e.offsetY,this._getYAxisAnnotationWidth(e),o-n,0,e.fillColor,e.opacity,1,e.borderColor,a);h.node.classList.add("apexcharts-annotation-rect"),h.attr("clip-path","url(#gridRectMask".concat(r.globals.cuid,")")),t.appendChild(h.node),e.id&&h.node.classList.add(e.id)}var d="right"===e.label.position?r.globals.gridWidth:0,u=this.annoCtx.graphics.drawText({x:d+e.label.offsetX,y:(n||o)+e.label.offsetY-3,text:s,textAnchor:e.label.textAnchor,fontSize:e.label.style.fontSize,fontFamily:e.label.style.fontFamily,fontWeight:e.label.style.fontWeight,foreColor:e.label.style.color,cssClass:"apexcharts-yaxis-annotation-label ".concat(e.label.style.cssClass," ").concat(e.id?e.id:"")});u.attr({rel:i}),t.appendChild(u.node)}},{key:"_getY1Y2",value:function(e,t){var i,n="y1"===e?t.y:t.y2,r=this.w;if(this.annoCtx.invertAxis){var a=r.globals.labels.indexOf(n);r.config.xaxis.convertedCatToNumeric&&(a=r.globals.categoryLabels.indexOf(n));var o=r.globals.dom.baseEl.querySelector(".apexcharts-yaxis-texts-g text:nth-child("+(a+1)+")");o&&(i=parseFloat(o.getAttribute("y")))}else{var s;s=r.config.yaxis[t.yAxisIndex].logarithmic?(n=new S(this.annoCtx.ctx).getLogVal(n,t.yAxisIndex))/r.globals.yLogRatio[t.yAxisIndex]:(n-r.globals.minYArr[t.yAxisIndex])/(r.globals.yRange[t.yAxisIndex]/r.globals.gridHeight),i=r.globals.gridHeight-s,r.config.yaxis[t.yAxisIndex]&&r.config.yaxis[t.yAxisIndex].reversed&&(i=s)}return i}},{key:"_getYAxisAnnotationWidth",value:function(e){var t=this.w;return t.globals.gridWidth,(e.width.indexOf("%")>-1?t.globals.gridWidth*parseInt(e.width,10)/100:parseInt(e.width,10))+e.offsetX}},{key:"drawYAxisAnnotations",value:function(){var e=this,t=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-yaxis-annotations"});return t.config.annotations.yaxis.map((function(t,n){e.addYaxisAnnotation(t,i.node,n)})),i}}]),e}(),C=function(){function e(t){o(this,e),this.w=t.w,this.annoCtx=t}return l(e,[{key:"addPointAnnotation",value:function(e,t,i){var n=this.w,r=0,a=0,o=0;this.annoCtx.invertAxis&&console.warn("Point annotation is not supported in horizontal bar charts.");var s=parseFloat(e.y);if("string"==typeof e.x){var l=n.globals.labels.indexOf(e.x);n.config.xaxis.convertedCatToNumeric&&(l=n.globals.categoryLabels.indexOf(e.x)),r=this.annoCtx.helpers.getStringX(e.x),null===e.y&&(s=n.globals.series[e.seriesIndex][l])}else r=(e.x-n.globals.minX)/(n.globals.xRange/n.globals.gridWidth);for(var c,h=[],d=0,u=0;u<=e.seriesIndex;u++){var p=n.config.yaxis[u].seriesName;if(p)for(var f=u+1;f<=e.seriesIndex;f++)n.config.yaxis[f].seriesName===p&&-1===h.indexOf(p)&&(d++,h.push(p))}if(n.config.yaxis[e.yAxisIndex].logarithmic)c=(s=new S(this.annoCtx.ctx).getLogVal(s,e.yAxisIndex))/n.globals.yLogRatio[e.yAxisIndex];else{var g=e.yAxisIndex+d;c=(s-n.globals.minYArr[g])/(n.globals.yRange[g]/n.globals.gridHeight)}if(a=n.globals.gridHeight-c-parseFloat(e.label.style.fontSize)-e.marker.size,o=n.globals.gridHeight-c,n.config.yaxis[e.yAxisIndex]&&n.config.yaxis[e.yAxisIndex].reversed&&(a=c+parseFloat(e.label.style.fontSize)+e.marker.size,o=c),y.isNumber(r)){var m={pSize:e.marker.size,pointStrokeWidth:e.marker.strokeWidth,pointFillColor:e.marker.fillColor,pointStrokeColor:e.marker.strokeColor,shape:e.marker.shape,pRadius:e.marker.radius,class:"apexcharts-point-annotation-marker ".concat(e.marker.cssClass," ").concat(e.id?e.id:"")},v=this.annoCtx.graphics.drawMarker(r+e.marker.offsetX,o+e.marker.offsetY,m);t.appendChild(v.node);var b=e.label.text?e.label.text:"",x=this.annoCtx.graphics.drawText({x:r+e.label.offsetX,y:a+e.label.offsetY,text:b,textAnchor:e.label.textAnchor,fontSize:e.label.style.fontSize,fontFamily:e.label.style.fontFamily,fontWeight:e.label.style.fontWeight,foreColor:e.label.style.color,cssClass:"apexcharts-point-annotation-label ".concat(e.label.style.cssClass," ").concat(e.id?e.id:"")});if(x.attr({rel:i}),t.appendChild(x.node),e.customSVG.SVG){var w=this.annoCtx.graphics.group({class:"apexcharts-point-annotations-custom-svg "+e.customSVG.cssClass});w.attr({transform:"translate(".concat(r+e.customSVG.offsetX,", ").concat(a+e.customSVG.offsetY,")")}),w.node.innerHTML=e.customSVG.SVG,t.appendChild(w.node)}if(e.image.path){var k=e.image.width?e.image.width:20,_=e.image.height?e.image.height:20;this.annoCtx.addImage({x:r+e.image.offsetX-k/2,y:a+e.image.offsetY-_/2,width:k,height:_,path:e.image.path,appendTo:".apexcharts-point-annotations"})}}}},{key:"drawPointAnnotations",value:function(){var e=this,t=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-point-annotations"});return t.config.annotations.points.map((function(t,n){e.addPointAnnotation(t,i.node,n)})),i}}]),e}(),T={name:"en",options:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],toolbar:{exportToSVG:"Download SVG",exportToPNG:"Download PNG",exportToCSV:"Download CSV",menu:"Menu",selection:"Selection",selectionZoom:"Selection Zoom",zoomIn:"Zoom In",zoomOut:"Zoom Out",pan:"Panning",reset:"Reset Zoom"}}},P=function(){function e(){o(this,e),this.yAxis={show:!0,showAlways:!1,showForNullSeries:!0,seriesName:void 0,opposite:!1,reversed:!1,logarithmic:!1,tickAmount:void 0,forceNiceScale:!1,max:void 0,min:void 0,floating:!1,decimalsInFloat:void 0,labels:{show:!0,minWidth:0,maxWidth:160,offsetX:0,offsetY:0,align:void 0,rotate:0,padding:20,style:{colors:[],fontSize:"11px",fontWeight:400,fontFamily:void 0,cssClass:""},formatter:void 0},axisBorder:{show:!1,color:"#e0e0e0",width:1,offsetX:0,offsetY:0},axisTicks:{show:!1,color:"#e0e0e0",width:6,offsetX:0,offsetY:0},title:{text:void 0,rotate:-90,offsetY:0,offsetX:0,style:{color:void 0,fontSize:"11px",fontWeight:900,fontFamily:void 0,cssClass:""}},tooltip:{enabled:!1,offsetX:0},crosshairs:{show:!0,position:"front",stroke:{color:"#b6b6b6",width:1,dashArray:0}}},this.pointAnnotation={x:0,y:null,yAxisIndex:0,seriesIndex:0,marker:{size:4,fillColor:"#fff",strokeWidth:2,strokeColor:"#333",shape:"circle",offsetX:0,offsetY:0,radius:2,cssClass:""},label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",offsetX:0,offsetY:0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}},customSVG:{SVG:void 0,cssClass:void 0,offsetX:0,offsetY:0},image:{path:void 0,width:20,height:20,offsetX:0,offsetY:0}},this.yAxisAnnotation={y:0,y2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,width:"100%",yAxisIndex:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"end",position:"right",offsetX:0,offsetY:-3,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.xAxisAnnotation={x:0,x2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",orientation:"vertical",position:"top",offsetX:0,offsetY:0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.text={x:0,y:0,text:"",textAnchor:"start",foreColor:void 0,fontSize:"13px",fontFamily:void 0,fontWeight:400,appendTo:".apexcharts-annotations",backgroundColor:"transparent",borderColor:"#c2c2c2",borderRadius:0,borderWidth:0,paddingLeft:4,paddingRight:4,paddingTop:2,paddingBottom:2}}return l(e,[{key:"init",value:function(){return{annotations:{position:"front",yaxis:[this.yAxisAnnotation],xaxis:[this.xAxisAnnotation],points:[this.pointAnnotation],texts:[],images:[],shapes:[]},chart:{animations:{enabled:!0,easing:"easeinout",speed:800,animateGradually:{delay:150,enabled:!0},dynamicAnimation:{enabled:!0,speed:350}},background:"transparent",locales:[T],defaultLocale:"en",dropShadow:{enabled:!1,enabledOnSeries:void 0,top:2,left:2,blur:4,color:"#000",opacity:.35},events:{animationEnd:void 0,beforeMount:void 0,mounted:void 0,updated:void 0,click:void 0,mouseMove:void 0,legendClick:void 0,markerClick:void 0,selection:void 0,dataPointSelection:void 0,dataPointMouseEnter:void 0,dataPointMouseLeave:void 0,beforeZoom:void 0,beforeResetZoom:void 0,zoomed:void 0,scrolled:void 0,brushScrolled:void 0},foreColor:"#373d3f",fontFamily:"Helvetica, Arial, sans-serif",height:"auto",parentHeightOffset:15,redrawOnParentResize:!0,redrawOnWindowResize:!0,id:void 0,group:void 0,offsetX:0,offsetY:0,selection:{enabled:!1,type:"x",fill:{color:"#24292e",opacity:.1},stroke:{width:1,color:"#24292e",opacity:.4,dashArray:3},xaxis:{min:void 0,max:void 0},yaxis:{min:void 0,max:void 0}},sparkline:{enabled:!1},brush:{enabled:!1,autoScaleYaxis:!0,target:void 0},stacked:!1,stackType:"normal",toolbar:{show:!0,offsetX:0,offsetY:0,tools:{download:!0,selection:!0,zoom:!0,zoomin:!0,zoomout:!0,pan:!0,reset:!0,customIcons:[]},export:{csv:{filename:void 0,columnDelimiter:",",headerCategory:"category",headerValue:"value",dateFormatter:function(e){return new Date(e).toDateString()}},png:{filename:void 0},svg:{filename:void 0}},autoSelected:"zoom"},type:"line",width:"100%",zoom:{enabled:!0,type:"x",autoScaleYaxis:!1,zoomedArea:{fill:{color:"#90CAF9",opacity:.4},stroke:{color:"#0D47A1",opacity:.4,width:1}}}},plotOptions:{area:{fillTo:"origin"},bar:{horizontal:!1,columnWidth:"70%",barHeight:"70%",distributed:!1,borderRadius:0,rangeBarOverlap:!0,rangeBarGroupRows:!1,colors:{ranges:[],backgroundBarColors:[],backgroundBarOpacity:1,backgroundBarRadius:0},dataLabels:{position:"top",maxItems:100,hideOverflowingLabels:!0,orientation:"horizontal"}},bubble:{minBubbleRadius:void 0,maxBubbleRadius:void 0},candlestick:{colors:{upward:"#00B746",downward:"#EF403C"},wick:{useFillColor:!0}},boxPlot:{colors:{upper:"#00E396",lower:"#008FFB"}},heatmap:{radius:2,enableShades:!0,shadeIntensity:.5,reverseNegativeShade:!1,distributed:!1,useFillColorAsStroke:!1,colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},treemap:{enableShades:!0,shadeIntensity:.5,distributed:!1,reverseNegativeShade:!1,useFillColorAsStroke:!1,colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},radialBar:{inverseOrder:!1,startAngle:0,endAngle:360,offsetX:0,offsetY:0,hollow:{margin:5,size:"50%",background:"transparent",image:void 0,imageWidth:150,imageHeight:150,imageOffsetX:0,imageOffsetY:0,imageClipped:!0,position:"front",dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},track:{show:!0,startAngle:void 0,endAngle:void 0,background:"#f2f2f2",strokeWidth:"97%",opacity:1,margin:5,dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},dataLabels:{show:!0,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:0,formatter:function(e){return e}},value:{show:!0,fontSize:"14px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:16,formatter:function(e){return e+"%"}},total:{show:!1,label:"Total",fontSize:"16px",fontWeight:600,fontFamily:void 0,color:void 0,formatter:function(e){return e.globals.seriesTotals.reduce((function(e,t){return e+t}),0)/e.globals.series.length+"%"}}}},pie:{customScale:1,offsetX:0,offsetY:0,startAngle:0,endAngle:360,expandOnClick:!0,dataLabels:{offset:0,minAngleToShowLabel:10},donut:{size:"65%",background:"transparent",labels:{show:!1,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:-10,formatter:function(e){return e}},value:{show:!0,fontSize:"20px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:10,formatter:function(e){return e}},total:{show:!1,showAlways:!1,label:"Total",fontSize:"16px",fontWeight:400,fontFamily:void 0,color:void 0,formatter:function(e){return e.globals.seriesTotals.reduce((function(e,t){return e+t}),0)}}}}},polarArea:{rings:{strokeWidth:1,strokeColor:"#e8e8e8"},spokes:{strokeWidth:1,connectorColors:"#e8e8e8"}},radar:{size:void 0,offsetX:0,offsetY:0,polygons:{strokeWidth:1,strokeColors:"#e8e8e8",connectorColors:"#e8e8e8",fill:{colors:void 0}}}},colors:void 0,dataLabels:{enabled:!0,enabledOnSeries:void 0,formatter:function(e){return null!==e?e:""},textAnchor:"middle",distributed:!1,offsetX:0,offsetY:0,style:{fontSize:"12px",fontFamily:void 0,fontWeight:600,colors:void 0},background:{enabled:!0,foreColor:"#fff",borderRadius:2,padding:4,opacity:.9,borderWidth:1,borderColor:"#fff",dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.45}},dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.45}},fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]},image:{src:[],width:void 0,height:void 0},pattern:{style:"squares",width:6,height:6,strokeWidth:2}},grid:{show:!0,borderColor:"#e0e0e0",strokeDashArray:0,position:"back",xaxis:{lines:{show:!1}},yaxis:{lines:{show:!0}},row:{colors:void 0,opacity:.5},column:{colors:void 0,opacity:.5},padding:{top:0,right:10,bottom:0,left:12}},labels:[],legend:{show:!0,showForSingleSeries:!1,showForNullSeries:!0,showForZeroSeries:!0,floating:!1,position:"bottom",horizontalAlign:"center",inverseOrder:!1,fontSize:"12px",fontFamily:void 0,fontWeight:400,width:void 0,height:void 0,formatter:void 0,tooltipHoverFormatter:void 0,offsetX:-20,offsetY:4,customLegendItems:[],labels:{colors:void 0,useSeriesColors:!1},markers:{width:12,height:12,strokeWidth:0,fillColors:void 0,strokeColor:"#fff",radius:12,customHTML:void 0,offsetX:0,offsetY:0,onClick:void 0},itemMargin:{horizontal:5,vertical:2},onItemClick:{toggleDataSeries:!0},onItemHover:{highlightDataSeries:!0}},markers:{discrete:[],size:0,colors:void 0,strokeColors:"#fff",strokeWidth:2,strokeOpacity:.9,strokeDashArray:0,fillOpacity:1,shape:"circle",width:8,height:8,radius:2,offsetX:0,offsetY:0,onClick:void 0,onDblClick:void 0,showNullDataPoints:!0,hover:{size:void 0,sizeOffset:3}},noData:{text:void 0,align:"center",verticalAlign:"middle",offsetX:0,offsetY:0,style:{color:void 0,fontSize:"14px",fontFamily:void 0}},responsive:[],series:void 0,states:{normal:{filter:{type:"none",value:0}},hover:{filter:{type:"lighten",value:.1}},active:{allowMultipleDataPointsSelection:!1,filter:{type:"darken",value:.5}}},title:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:0,floating:!1,style:{fontSize:"14px",fontWeight:900,fontFamily:void 0,color:void 0}},subtitle:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:30,floating:!1,style:{fontSize:"12px",fontWeight:400,fontFamily:void 0,color:void 0}},stroke:{show:!0,curve:"smooth",lineCap:"butt",width:2,colors:void 0,dashArray:0},tooltip:{enabled:!0,enabledOnSeries:void 0,shared:!0,followCursor:!1,intersect:!1,inverseOrder:!1,custom:void 0,fillSeriesColor:!1,theme:"light",style:{fontSize:"12px",fontFamily:void 0},onDatasetHover:{highlightDataSeries:!1},x:{show:!0,format:"dd MMM",formatter:void 0},y:{formatter:void 0,title:{formatter:function(e){return e?e+": ":""}}},z:{formatter:void 0,title:"Size: "},marker:{show:!0,fillColors:void 0},items:{display:"flex"},fixed:{enabled:!1,position:"topRight",offsetX:0,offsetY:0}},xaxis:{type:"category",categories:[],convertedCatToNumeric:!1,offsetX:0,offsetY:0,overwriteCategories:void 0,labels:{show:!0,rotate:-45,rotateAlways:!1,hideOverlappingLabels:!0,trim:!1,minHeight:void 0,maxHeight:120,showDuplicates:!0,style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""},offsetX:0,offsetY:0,format:void 0,formatter:void 0,datetimeUTC:!0,datetimeFormatter:{year:"yyyy",month:"MMM 'yy",day:"dd MMM",hour:"HH:mm",minute:"HH:mm:ss",second:"HH:mm:ss"}},axisBorder:{show:!0,color:"#e0e0e0",width:"100%",height:1,offsetX:0,offsetY:0},axisTicks:{show:!0,color:"#e0e0e0",height:6,offsetX:0,offsetY:0},tickAmount:void 0,tickPlacement:"on",min:void 0,max:void 0,range:void 0,floating:!1,decimalsInFloat:void 0,position:"bottom",title:{text:void 0,offsetX:0,offsetY:0,style:{color:void 0,fontSize:"12px",fontWeight:900,fontFamily:void 0,cssClass:""}},crosshairs:{show:!0,width:1,position:"back",opacity:.9,stroke:{color:"#b6b6b6",width:1,dashArray:3},fill:{type:"solid",color:"#B1B9C4",gradient:{colorFrom:"#D8E3F0",colorTo:"#BED1E6",stops:[0,100],opacityFrom:.4,opacityTo:.5}},dropShadow:{enabled:!1,left:0,top:0,blur:1,opacity:.4}},tooltip:{enabled:!0,offsetY:0,formatter:void 0,style:{fontSize:"12px",fontFamily:void 0}}},yaxis:this.yAxis,theme:{mode:"light",palette:"palette1",monochrome:{enabled:!1,color:"#008FFB",shadeTo:"light",shadeIntensity:.65}}}}}]),e}(),L=function(){function e(t){o(this,e),this.ctx=t,this.w=t.w,this.graphics=new w(this.ctx),this.w.globals.isBarHorizontal&&(this.invertAxis=!0),this.helpers=new k(this),this.xAxisAnnotations=new _(this),this.yAxisAnnotations=new A(this),this.pointsAnnotations=new C(this),this.w.globals.isBarHorizontal&&this.w.config.yaxis[0].reversed&&(this.inversedReversedAxis=!0),this.xDivision=this.w.globals.gridWidth/this.w.globals.dataPoints}return l(e,[{key:"drawAxesAnnotations",value:function(){var e=this.w;if(e.globals.axisCharts){for(var t=this.yAxisAnnotations.drawYAxisAnnotations(),i=this.xAxisAnnotations.drawXAxisAnnotations(),n=this.pointsAnnotations.drawPointAnnotations(),r=e.config.chart.animations.enabled,a=[t,i,n],o=[i.node,t.node,n.node],s=0;s<3;s++)e.globals.dom.elGraphical.add(a[s]),!r||e.globals.resized||e.globals.dataChanged||"scatter"!==e.config.chart.type&&"bubble"!==e.config.chart.type&&e.globals.dataPoints>1&&o[s].classList.add("apexcharts-element-hidden"),e.globals.delayedElements.push({el:o[s],index:0});this.helpers.annotationsBackground()}}},{key:"drawImageAnnos",value:function(){var e=this;this.w.config.annotations.images.map((function(t,i){e.addImage(t,i)}))}},{key:"drawTextAnnos",value:function(){var e=this;this.w.config.annotations.texts.map((function(t,i){e.addText(t,i)}))}},{key:"addXaxisAnnotation",value:function(e,t,i){this.xAxisAnnotations.addXaxisAnnotation(e,t,i)}},{key:"addYaxisAnnotation",value:function(e,t,i){this.yAxisAnnotations.addYaxisAnnotation(e,t,i)}},{key:"addPointAnnotation",value:function(e,t,i){this.pointsAnnotations.addPointAnnotation(e,t,i)}},{key:"addText",value:function(e,t){var i=e.x,n=e.y,r=e.text,a=e.textAnchor,o=e.foreColor,s=e.fontSize,l=e.fontFamily,c=e.fontWeight,h=e.cssClass,d=e.backgroundColor,u=e.borderWidth,p=e.strokeDashArray,f=e.borderRadius,g=e.borderColor,m=e.appendTo,v=void 0===m?".apexcharts-annotations":m,y=e.paddingLeft,b=void 0===y?4:y,x=e.paddingRight,w=void 0===x?4:x,k=e.paddingBottom,_=void 0===k?2:k,S=e.paddingTop,A=void 0===S?2:S,C=this.w,T=this.graphics.drawText({x:i,y:n,text:r,textAnchor:a||"start",fontSize:s||"12px",fontWeight:c||"regular",fontFamily:l||C.config.chart.fontFamily,foreColor:o||C.config.chart.foreColor,cssClass:h}),P=C.globals.dom.baseEl.querySelector(v);P&&P.appendChild(T.node);var L=T.bbox();if(r){var E=this.graphics.drawRect(L.x-b,L.y-A,L.width+b+w,L.height+_+A,f,d||"transparent",1,u,g,p);P.insertBefore(E.node,T.node)}}},{key:"addImage",value:function(e,t){var i=this.w,n=e.path,r=e.x,a=void 0===r?0:r,o=e.y,s=void 0===o?0:o,l=e.width,c=void 0===l?20:l,h=e.height,d=void 0===h?20:h,u=e.appendTo,p=void 0===u?".apexcharts-annotations":u,f=i.globals.dom.Paper.image(n);f.size(c,d).move(a,s);var g=i.globals.dom.baseEl.querySelector(p);g&&g.appendChild(f.node)}},{key:"addXaxisAnnotationExternal",value:function(e,t,i){return this.addAnnotationExternal({params:e,pushToMemory:t,context:i,type:"xaxis",contextMethod:i.addXaxisAnnotation}),i}},{key:"addYaxisAnnotationExternal",value:function(e,t,i){return this.addAnnotationExternal({params:e,pushToMemory:t,context:i,type:"yaxis",contextMethod:i.addYaxisAnnotation}),i}},{key:"addPointAnnotationExternal",value:function(e,t,i){return void 0===this.invertAxis&&(this.invertAxis=i.w.globals.isBarHorizontal),this.addAnnotationExternal({params:e,pushToMemory:t,context:i,type:"point",contextMethod:i.addPointAnnotation}),i}},{key:"addAnnotationExternal",value:function(e){var t=e.params,i=e.pushToMemory,n=e.context,r=e.type,a=e.contextMethod,o=n,s=o.w,l=s.globals.dom.baseEl.querySelector(".apexcharts-".concat(r,"-annotations")),c=l.childNodes.length+1,h=new P,d=Object.assign({},"xaxis"===r?h.xAxisAnnotation:"yaxis"===r?h.yAxisAnnotation:h.pointAnnotation),u=y.extend(d,t);switch(r){case"xaxis":this.addXaxisAnnotation(u,l,c);break;case"yaxis":this.addYaxisAnnotation(u,l,c);break;case"point":this.addPointAnnotation(u,l,c)}var p=s.globals.dom.baseEl.querySelector(".apexcharts-".concat(r,"-annotations .apexcharts-").concat(r,"-annotation-label[rel='").concat(c,"']")),f=this.helpers.addBackgroundToAnno(p,u);return f&&l.insertBefore(f.node,p),i&&s.globals.memory.methodsToExec.push({context:o,id:u.id?u.id:y.randomId(),method:a,label:"addAnnotation",params:t}),n}},{key:"clearAnnotations",value:function(e){var t=e.w,i=t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis-annotations, .apexcharts-xaxis-annotations, .apexcharts-point-annotations");t.globals.memory.methodsToExec.map((function(e,i){"addText"!==e.label&&"addAnnotation"!==e.label||t.globals.memory.methodsToExec.splice(i,1)})),i=y.listToArray(i),Array.prototype.forEach.call(i,(function(e){for(;e.firstChild;)e.removeChild(e.firstChild)}))}},{key:"removeAnnotation",value:function(e,t){var i=e.w,n=i.globals.dom.baseEl.querySelectorAll(".".concat(t));n&&(i.globals.memory.methodsToExec.map((function(e,n){e.id===t&&i.globals.memory.methodsToExec.splice(n,1)})),Array.prototype.forEach.call(n,(function(e){e.parentElement.removeChild(e)})))}}]),e}(),E=function(){function e(t){o(this,e),this.ctx=t,this.w=t.w,this.opts=null,this.seriesIndex=0}return l(e,[{key:"clippedImgArea",value:function(e){var t=this.w,i=t.config,n=parseInt(t.globals.gridWidth,10),r=parseInt(t.globals.gridHeight,10),a=n>r?n:r,o=e.image,s=0,l=0;void 0===e.width&&void 0===e.height?void 0!==i.fill.image.width&&void 0!==i.fill.image.height?(s=i.fill.image.width+1,l=i.fill.image.height):(s=a+1,l=a):(s=e.width,l=e.height);var c=document.createElementNS(t.globals.SVGNS,"pattern");w.setAttrs(c,{id:e.patternID,patternUnits:e.patternUnits?e.patternUnits:"userSpaceOnUse",width:s+"px",height:l+"px"});var h=document.createElementNS(t.globals.SVGNS,"image");c.appendChild(h),h.setAttributeNS(window.SVG.xlink,"href",o),w.setAttrs(h,{x:0,y:0,preserveAspectRatio:"none",width:s+"px",height:l+"px"}),h.style.opacity=e.opacity,t.globals.dom.elDefs.node.appendChild(c)}},{key:"getSeriesIndex",value:function(e){var t=this.w;return("bar"===t.config.chart.type||"rangeBar"===t.config.chart.type)&&t.config.plotOptions.bar.distributed||"heatmap"===t.config.chart.type||"treemap"===t.config.chart.type?this.seriesIndex=e.seriesNumber:this.seriesIndex=e.seriesNumber%t.globals.series.length,this.seriesIndex}},{key:"fillPath",value:function(e){var t=this.w;this.opts=e;var i,n,r,a=this.w.config;this.seriesIndex=this.getSeriesIndex(e);var o=this.getFillColors()[this.seriesIndex];void 0!==t.globals.seriesColors[this.seriesIndex]&&(o=t.globals.seriesColors[this.seriesIndex]),"function"==typeof o&&(o=o({seriesIndex:this.seriesIndex,dataPointIndex:e.dataPointIndex,value:e.value,w:t}));var s=this.getFillType(this.seriesIndex),l=Array.isArray(a.fill.opacity)?a.fill.opacity[this.seriesIndex]:a.fill.opacity;e.color&&(o=e.color);var c=o;if(-1===o.indexOf("rgb")?o.length<9&&(c=y.hexToRgba(o,l)):o.indexOf("rgba")>-1&&(l=y.getOpacityFromRGBA(o)),e.opacity&&(l=e.opacity),"pattern"===s&&(n=this.handlePatternFill(n,o,l,c)),"gradient"===s&&(r=this.handleGradientFill(o,l,this.seriesIndex)),"image"===s){var h=a.fill.image.src,d=e.patternID?e.patternID:"";this.clippedImgArea({opacity:l,image:Array.isArray(h)?e.seriesNumber<h.length?h[e.seriesNumber]:h[0]:h,width:e.width?e.width:void 0,height:e.height?e.height:void 0,patternUnits:e.patternUnits,patternID:"pattern".concat(t.globals.cuid).concat(e.seriesNumber+1).concat(d)}),i="url(#pattern".concat(t.globals.cuid).concat(e.seriesNumber+1).concat(d,")")}else i="gradient"===s?r:"pattern"===s?n:c;return e.solid&&(i=c),i}},{key:"getFillType",value:function(e){var t=this.w;return Array.isArray(t.config.fill.type)?t.config.fill.type[e]:t.config.fill.type}},{key:"getFillColors",value:function(){var e=this.w,t=e.config,i=this.opts,n=[];return e.globals.comboCharts?"line"===e.config.series[this.seriesIndex].type?Array.isArray(e.globals.stroke.colors)?n=e.globals.stroke.colors:n.push(e.globals.stroke.colors):Array.isArray(e.globals.fill.colors)?n=e.globals.fill.colors:n.push(e.globals.fill.colors):"line"===t.chart.type?Array.isArray(e.globals.stroke.colors)?n=e.globals.stroke.colors:n.push(e.globals.stroke.colors):Array.isArray(e.globals.fill.colors)?n=e.globals.fill.colors:n.push(e.globals.fill.colors),void 0!==i.fillColors&&(n=[],Array.isArray(i.fillColors)?n=i.fillColors.slice():n.push(i.fillColors)),n}},{key:"handlePatternFill",value:function(e,t,i,n){var r=this.w.config,a=this.opts,o=new w(this.ctx),s=void 0===r.fill.pattern.strokeWidth?Array.isArray(r.stroke.width)?r.stroke.width[this.seriesIndex]:r.stroke.width:Array.isArray(r.fill.pattern.strokeWidth)?r.fill.pattern.strokeWidth[this.seriesIndex]:r.fill.pattern.strokeWidth,l=t;return Array.isArray(r.fill.pattern.style)?void 0!==r.fill.pattern.style[a.seriesNumber]?o.drawPattern(r.fill.pattern.style[a.seriesNumber],r.fill.pattern.width,r.fill.pattern.height,l,s,i):n:o.drawPattern(r.fill.pattern.style,r.fill.pattern.width,r.fill.pattern.height,l,s,i)}},{key:"handleGradientFill",value:function(e,t,i){var n,r=this.w.config,a=this.opts,o=new w(this.ctx),s=new y,l=r.fill.gradient.type,c=e,h=void 0===r.fill.gradient.opacityFrom?t:Array.isArray(r.fill.gradient.opacityFrom)?r.fill.gradient.opacityFrom[i]:r.fill.gradient.opacityFrom;c.indexOf("rgba")>-1&&(h=y.getOpacityFromRGBA(c));var d=void 0===r.fill.gradient.opacityTo?t:Array.isArray(r.fill.gradient.opacityTo)?r.fill.gradient.opacityTo[i]:r.fill.gradient.opacityTo;if(void 0===r.fill.gradient.gradientToColors||0===r.fill.gradient.gradientToColors.length)n="dark"===r.fill.gradient.shade?s.shadeColor(-1*parseFloat(r.fill.gradient.shadeIntensity),e.indexOf("rgb")>-1?y.rgb2hex(e):e):s.shadeColor(parseFloat(r.fill.gradient.shadeIntensity),e.indexOf("rgb")>-1?y.rgb2hex(e):e);else if(r.fill.gradient.gradientToColors[a.seriesNumber]){var u=r.fill.gradient.gradientToColors[a.seriesNumber];n=u,u.indexOf("rgba")>-1&&(d=y.getOpacityFromRGBA(u))}else n=e;if(r.fill.gradient.inverseColors){var p=c;c=n,n=p}return c.indexOf("rgb")>-1&&(c=y.rgb2hex(c)),n.indexOf("rgb")>-1&&(n=y.rgb2hex(n)),o.drawGradient(l,c,n,h,d,a.size,r.fill.gradient.stops,r.fill.gradient.colorStops,i)}}]),e}(),M=function(){function e(t,i){o(this,e),this.ctx=t,this.w=t.w}return l(e,[{key:"setGlobalMarkerSize",value:function(){var e=this.w;if(e.globals.markers.size=Array.isArray(e.config.markers.size)?e.config.markers.size:[e.config.markers.size],e.globals.markers.size.length>0){if(e.globals.markers.size.length<e.globals.series.length+1)for(var t=0;t<=e.globals.series.length;t++)void 0===e.globals.markers.size[t]&&e.globals.markers.size.push(e.globals.markers.size[0])}else e.globals.markers.size=e.config.series.map((function(t){return e.config.markers.size}))}},{key:"plotChartMarkers",value:function(e,t,i,n){var r,a=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=this.w,s=t,l=e,c=null,h=new w(this.ctx);if((o.globals.markers.size[t]>0||a)&&(c=h.group({class:a?"":"apexcharts-series-markers"})).attr("clip-path","url(#gridRectMarkerMask".concat(o.globals.cuid,")")),Array.isArray(l.x))for(var d=0;d<l.x.length;d++){var u=i;1===i&&0===d&&(u=0),1===i&&1===d&&(u=1);var p="apexcharts-marker";"line"!==o.config.chart.type&&"area"!==o.config.chart.type||o.globals.comboCharts||o.config.tooltip.intersect||(p+=" no-pointer-events");var f=Array.isArray(o.config.markers.size)?o.globals.markers.size[t]>0:o.config.markers.size>0;if(f||a){y.isNumber(l.y[d])?p+=" w".concat(y.randomId()):p="apexcharts-nullpoint";var g=this.getMarkerConfig(p,t,u);o.config.series[s].data[u]&&(o.config.series[s].data[u].fillColor&&(g.pointFillColor=o.config.series[s].data[u].fillColor),o.config.series[s].data[u].strokeColor&&(g.pointStrokeColor=o.config.series[s].data[u].strokeColor)),n&&(g.pSize=n),(r=h.drawMarker(l.x[d],l.y[d],g)).attr("rel",u),r.attr("j",u),r.attr("index",t),r.node.setAttribute("default-marker-size",g.pSize);var m=new x(this.ctx);m.setSelectionFilter(r,t,u),this.addEvents(r),c&&c.add(r)}else void 0===o.globals.pointsArray[t]&&(o.globals.pointsArray[t]=[]),o.globals.pointsArray[t].push([l.x[d],l.y[d]])}return c}},{key:"getMarkerConfig",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=this.w,r=this.getMarkerStyle(t),a=n.globals.markers.size[t],o=n.config.markers;return null!==i&&o.discrete.length&&o.discrete.map((function(e){e.seriesIndex===t&&e.dataPointIndex===i&&(r.pointStrokeColor=e.strokeColor,r.pointFillColor=e.fillColor,a=e.size)})),{pSize:a,pRadius:o.radius,width:Array.isArray(o.width)?o.width[t]:o.width,height:Array.isArray(o.height)?o.height[t]:o.height,pointStrokeWidth:Array.isArray(o.strokeWidth)?o.strokeWidth[t]:o.strokeWidth,pointStrokeColor:r.pointStrokeColor,pointFillColor:r.pointFillColor,shape:Array.isArray(o.shape)?o.shape[t]:o.shape,class:e,pointStrokeOpacity:Array.isArray(o.strokeOpacity)?o.strokeOpacity[t]:o.strokeOpacity,pointStrokeDashArray:Array.isArray(o.strokeDashArray)?o.strokeDashArray[t]:o.strokeDashArray,pointFillOpacity:Array.isArray(o.fillOpacity)?o.fillOpacity[t]:o.fillOpacity,seriesIndex:t}}},{key:"addEvents",value:function(e){var t=this.w,i=new w(this.ctx);e.node.addEventListener("mouseenter",i.pathMouseEnter.bind(this.ctx,e)),e.node.addEventListener("mouseleave",i.pathMouseLeave.bind(this.ctx,e)),e.node.addEventListener("mousedown",i.pathMouseDown.bind(this.ctx,e)),e.node.addEventListener("click",t.config.markers.onClick),e.node.addEventListener("dblclick",t.config.markers.onDblClick),e.node.addEventListener("touchstart",i.pathMouseDown.bind(this.ctx,e),{passive:!0})}},{key:"getMarkerStyle",value:function(e){var t=this.w,i=t.globals.markers.colors,n=t.config.markers.strokeColor||t.config.markers.strokeColors;return{pointStrokeColor:Array.isArray(n)?n[e]:n,pointFillColor:Array.isArray(i)?i[e]:i}}}]),e}(),O=function(){function e(t){o(this,e),this.ctx=t,this.w=t.w,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled}return l(e,[{key:"draw",value:function(e,t,i){var n=this.w,r=new w(this.ctx),a=i.realIndex,o=i.pointsPos,s=i.zRatio,l=i.elParent,c=r.group({class:"apexcharts-series-markers apexcharts-series-".concat(n.config.chart.type)});if(c.attr("clip-path","url(#gridRectMarkerMask".concat(n.globals.cuid,")")),Array.isArray(o.x))for(var h=0;h<o.x.length;h++){var d=t+1,u=!0;0===t&&0===h&&(d=0),0===t&&1===h&&(d=1);var p=0,f=n.globals.markers.size[a];if(s!==1/0){f=n.globals.seriesZ[a][d]/s;var g=n.config.plotOptions.bubble;g.minBubbleRadius&&f<g.minBubbleRadius&&(f=g.minBubbleRadius),g.maxBubbleRadius&&f>g.maxBubbleRadius&&(f=g.maxBubbleRadius)}n.config.chart.animations.enabled||(p=f);var m=o.x[h],v=o.y[h];if(p=p||0,null!==v&&void 0!==n.globals.series[a][d]||(u=!1),u){var y=this.drawPoint(m,v,p,f,a,d,t);c.add(y)}l.add(c)}}},{key:"drawPoint",value:function(e,t,i,n,r,a,o){var s,l=this.w,c=r,h=new b(this.ctx),d=new x(this.ctx),u=new E(this.ctx),p=new M(this.ctx),f=new w(this.ctx),g=p.getMarkerConfig("apexcharts-marker",c),m=u.fillPath({seriesNumber:r,dataPointIndex:a,patternUnits:"objectBoundingBox",value:l.globals.series[r][o]});if("circle"===g.shape?s=f.drawCircle(i):"square"!==g.shape&&"rect"!==g.shape||(s=f.drawRect(0,0,g.width-g.pointStrokeWidth/2,g.height-g.pointStrokeWidth/2,g.pRadius)),l.config.series[c].data[a]&&l.config.series[c].data[a].fillColor&&(m=l.config.series[c].data[a].fillColor),s.attr({x:e-g.width/2-g.pointStrokeWidth/2,y:t-g.height/2-g.pointStrokeWidth/2,cx:e,cy:t,fill:m,"fill-opacity":g.pointFillOpacity,stroke:g.pointStrokeColor,r:n,"stroke-width":g.pointStrokeWidth,"stroke-dasharray":g.pointStrokeDashArray,"stroke-opacity":g.pointStrokeOpacity}),l.config.chart.dropShadow.enabled){var v=l.config.chart.dropShadow;d.dropShadow(s,v,r)}if(!this.initialAnim||l.globals.dataChanged||l.globals.resized)l.globals.animationEnded=!0;else{var y=l.config.chart.animations.speed;h.animateMarker(s,0,"circle"===g.shape?n:{width:g.width,height:g.height},y,l.globals.easing,(function(){window.setTimeout((function(){h.animationCompleted(s)}),100)}))}if(l.globals.dataChanged&&"circle"===g.shape)if(this.dynamicAnim){var k,_,S,A,C=l.config.chart.animations.dynamicAnimation.speed;null!=(A=l.globals.previousPaths[r]&&l.globals.previousPaths[r][o])&&(k=A.x,_=A.y,S=void 0!==A.r?A.r:n);for(var T=0;T<l.globals.collapsedSeries.length;T++)l.globals.collapsedSeries[T].index===r&&(C=1,n=0);0===e&&0===t&&(n=0),h.animateCircle(s,{cx:k,cy:_,r:S},{cx:e,cy:t,r:n},C,l.globals.easing)}else s.attr({r:n});return s.attr({rel:a,j:a,index:r,"default-marker-size":n}),d.setSelectionFilter(s,r,a),p.addEvents(s),s.node.classList.add("apexcharts-marker"),s}},{key:"centerTextInBubble",value:function(e){var t=this.w;return{y:e+=parseInt(t.config.dataLabels.style.fontSize,10)/4}}}]),e}(),I=function(){function e(t){o(this,e),this.ctx=t,this.w=t.w}return l(e,[{key:"dataLabelsCorrection",value:function(e,t,i,n,r,a,o){var s=this.w,l=!1,c=new w(this.ctx).getTextRects(i,o),h=c.width,d=c.height;t<0&&(t=0),t>s.globals.gridHeight+d&&(t=s.globals.gridHeight+d/2),void 0===s.globals.dataLabelsRects[n]&&(s.globals.dataLabelsRects[n]=[]),s.globals.dataLabelsRects[n].push({x:e,y:t,width:h,height:d});var u=s.globals.dataLabelsRects[n].length-2,p=void 0!==s.globals.lastDrawnDataLabelsIndexes[n]?s.globals.lastDrawnDataLabelsIndexes[n][s.globals.lastDrawnDataLabelsIndexes[n].length-1]:0;if(void 0!==s.globals.dataLabelsRects[n][u]){var f=s.globals.dataLabelsRects[n][p];(e>f.x+f.width+2||t>f.y+f.height+2||e+h<f.x)&&(l=!0)}return(0===r||a)&&(l=!0),{x:e,y:t,textRects:c,drawnextLabel:l}}},{key:"drawDataLabel",value:function(e,t,i){var n=this,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:2,a=this.w,o=new w(this.ctx),s=a.config.dataLabels,l=0,c=0,h=i,d=null;if(!s.enabled||!Array.isArray(e.x))return d;d=o.group({class:"apexcharts-data-labels"});for(var u=0;u<e.x.length;u++)if(l=e.x[u]+s.offsetX,c=e.y[u]+s.offsetY+r,!isNaN(l)){1===i&&0===u&&(h=0),1===i&&1===u&&(h=1);var p=a.globals.series[t][h],f="",g=function(e){return a.config.dataLabels.formatter(e,{ctx:n.ctx,seriesIndex:t,dataPointIndex:h,w:a})};if("bubble"===a.config.chart.type){f=g(p=a.globals.seriesZ[t][h]),c=e.y[u];var m=new O(this.ctx),v=m.centerTextInBubble(c,t,h);c=v.y}else void 0!==p&&(f=g(p));this.plotDataLabelsText({x:l,y:c,text:f,i:t,j:h,parent:d,offsetCorrection:!0,dataLabelsConfig:a.config.dataLabels})}return d}},{key:"plotDataLabelsText",value:function(e){var t=this.w,i=new w(this.ctx),n=e.x,r=e.y,a=e.i,o=e.j,s=e.text,l=e.textAnchor,c=e.fontSize,h=e.parent,d=e.dataLabelsConfig,u=e.color,p=e.alwaysDrawDataLabel,f=e.offsetCorrection;if(!(Array.isArray(t.config.dataLabels.enabledOnSeries)&&t.config.dataLabels.enabledOnSeries.indexOf(a)<0)){var g={x:n,y:r,drawnextLabel:!0};f&&(g=this.dataLabelsCorrection(n,r,s,a,o,p,parseInt(d.style.fontSize,10))),t.globals.zoomed||(n=g.x,r=g.y),g.textRects&&(n<-10-g.textRects.width||n>t.globals.gridWidth+g.textRects.width+10)&&(s="");var m=t.globals.dataLabels.style.colors[a];(("bar"===t.config.chart.type||"rangeBar"===t.config.chart.type)&&t.config.plotOptions.bar.distributed||t.config.dataLabels.distributed)&&(m=t.globals.dataLabels.style.colors[o]),"function"==typeof m&&(m=m({series:t.globals.series,seriesIndex:a,dataPointIndex:o,w:t})),u&&(m=u);var v=d.offsetX,y=d.offsetY;if("bar"!==t.config.chart.type&&"rangeBar"!==t.config.chart.type||(v=0,y=0),g.drawnextLabel){var b=i.drawText({width:100,height:parseInt(d.style.fontSize,10),x:n+v,y:r+y,foreColor:m,textAnchor:l||d.textAnchor,text:s,fontSize:c||d.style.fontSize,fontFamily:d.style.fontFamily,fontWeight:d.style.fontWeight||"normal"});if(b.attr({class:"apexcharts-datalabel",cx:n,cy:r}),d.dropShadow.enabled){var k=d.dropShadow;new x(this.ctx).dropShadow(b,k)}h.add(b),void 0===t.globals.lastDrawnDataLabelsIndexes[a]&&(t.globals.lastDrawnDataLabelsIndexes[a]=[]),t.globals.lastDrawnDataLabelsIndexes[a].push(o)}}}},{key:"addBackgroundToDataLabel",value:function(e,t){var i=this.w,n=i.config.dataLabels.background,r=n.padding,a=n.padding/2,o=t.width,s=t.height,l=new w(this.ctx).drawRect(t.x-r,t.y-a/2,o+2*r,s+a,n.borderRadius,"transparent"===i.config.chart.background?"#fff":i.config.chart.background,n.opacity,n.borderWidth,n.borderColor);return n.dropShadow.enabled&&new x(this.ctx).dropShadow(l,n.dropShadow),l}},{key:"dataLabelsBackground",value:function(){var e=this.w;if("bubble"!==e.config.chart.type)for(var t=e.globals.dom.baseEl.querySelectorAll(".apexcharts-datalabels text"),i=0;i<t.length;i++){var n=t[i],r=n.getBBox(),a=null;if(r.width&&r.height&&(a=this.addBackgroundToDataLabel(n,r)),a){n.parentNode.insertBefore(a.node,n);var o=n.getAttribute("fill");!e.config.chart.animations.enabled||e.globals.resized||e.globals.dataChanged?a.attr({fill:o}):a.animate().attr({fill:o}),n.setAttribute("fill",e.config.dataLabels.background.foreColor)}}}},{key:"bringForward",value:function(){for(var e=this.w,t=e.globals.dom.baseEl.querySelectorAll(".apexcharts-datalabels"),i=e.globals.dom.baseEl.querySelector(".apexcharts-plot-series:last-child"),n=0;n<t.length;n++)i&&i.insertBefore(t[n],i.nextSibling)}}]),e}(),D=function(){function e(t){o(this,e),this.w=t.w,this.barCtx=t}return l(e,[{key:"handleBarDataLabels",value:function(e){var t=e.x,i=e.y,n=e.y1,r=e.y2,a=e.i,o=e.j,s=e.realIndex,l=e.series,c=e.barHeight,h=e.barWidth,d=e.barYPosition,u=e.visibleSeries,p=e.renderedPath,f=this.w,g=new w(this.barCtx.ctx),m=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[s]:this.barCtx.strokeWidth,v=t+parseFloat(h*u),y=i+parseFloat(c*u);f.globals.isXNumeric&&!f.globals.isBarHorizontal&&(v=t+parseFloat(h*(u+1)),y=i+parseFloat(c*(u+1))-m);var b,x=t,k=i,_=f.config.dataLabels,S=this.barCtx.barOptions.dataLabels;void 0!==d&&this.barCtx.isTimelineBar&&(y=d,k=d);var A=_.offsetX,C=_.offsetY,T={width:0,height:0};if(f.config.dataLabels.enabled){var P=this.barCtx.series[a][o];T=g.getTextRects(f.globals.yLabelFormatters[0](P),parseFloat(_.style.fontSize))}var L={x:t,y:i,i:a,j:o,renderedPath:p,bcx:v,bcy:y,barHeight:c,barWidth:h,textRects:T,strokeWidth:m,dataLabelsX:x,dataLabelsY:k,barDataLabelsConfig:S,offX:A,offY:C};return b=this.barCtx.isHorizontal?this.calculateBarsDataLabelsPosition(L):this.calculateColumnsDataLabelsPosition(L),p.attr({cy:b.bcy,cx:b.bcx,j:o,val:l[a][o],barHeight:c,barWidth:h}),this.drawCalculatedDataLabels({x:b.dataLabelsX,y:b.dataLabelsY,val:this.barCtx.isTimelineBar?[n,r]:l[a][o],i:s,j:o,barWidth:h,barHeight:c,textRects:T,dataLabelsConfig:_})}},{key:"calculateColumnsDataLabelsPosition",value:function(e){var t,i=this.w,n=e.i,r=e.j,a=e.y,o=e.bcx,s=e.barWidth,l=e.barHeight,c=e.textRects,h=e.dataLabelsY,d=e.barDataLabelsConfig,u=e.strokeWidth,p=e.offX,f=e.offY;l=Math.abs(l);var g="vertical"===i.config.plotOptions.bar.dataLabels.orientation;o-=u/2;var m=i.globals.gridWidth/i.globals.dataPoints;t=i.globals.isXNumeric?o-s/2+p:o-m+s/2+p,g&&(t=t+c.height/2-u/2-2);var v=this.barCtx.series[n][r]<0,y=a;switch(this.barCtx.isReversed&&(y=a-l+(v?2*l:0),a-=l),d.position){case"center":h=g?v?y+l/2+f:y+l/2-f:v?y-l/2+c.height/2+f:y+l/2+c.height/2-f;break;case"bottom":h=g?v?y+l+f:y+l-f:v?y-l+c.height+u+f:y+l-c.height/2+u-f;break;case"top":h=g?v?y+f:y-f:v?y-c.height/2-f:y+c.height+f}return i.config.chart.stacked||(h<0?h=0+u:h+c.height/3>i.globals.gridHeight&&(h=i.globals.gridHeight-u)),{bcx:o,bcy:a,dataLabelsX:t,dataLabelsY:h}}},{key:"calculateBarsDataLabelsPosition",value:function(e){var t=this.w,i=e.x,n=e.i,r=e.j,a=e.bcy,o=e.barHeight,s=e.barWidth,l=e.textRects,c=e.dataLabelsX,h=e.strokeWidth,d=e.barDataLabelsConfig,u=e.offX,p=e.offY,f=t.globals.gridHeight/t.globals.dataPoints;s=Math.abs(s);var g=a-(this.barCtx.isTimelineBar?0:f)+o/2+l.height/2+p-3,m=this.barCtx.series[n][r]<0,v=i;switch(this.barCtx.isReversed&&(v=i+s-(m?2*s:0),i=t.globals.gridWidth-s),d.position){case"center":c=m?v+s/2-u:Math.max(l.width/2,v-s/2)+u;break;case"bottom":c=m?v+s-h-Math.round(l.width/2)-u:v-s+h+Math.round(l.width/2)+u;break;case"top":c=m?v-h+Math.round(l.width/2)-u:v-h-Math.round(l.width/2)+u}return t.config.chart.stacked||(c<0?c=c+l.width+h:c+l.width/2>t.globals.gridWidth&&(c=t.globals.gridWidth-l.width-h)),{bcx:i,bcy:a,dataLabelsX:c,dataLabelsY:g}}},{key:"drawCalculatedDataLabels",value:function(e){var t=e.x,i=e.y,n=e.val,r=e.i,a=e.j,o=e.textRects,s=e.barHeight,l=e.barWidth,c=e.dataLabelsConfig,h=this.w,u="rotate(0)";"vertical"===h.config.plotOptions.bar.dataLabels.orientation&&(u="rotate(-90, ".concat(t,", ").concat(i,")"));var p=new I(this.barCtx.ctx),f=new w(this.barCtx.ctx),g=c.formatter,m=null,v=h.globals.collapsedSeriesIndices.indexOf(r)>-1;if(c.enabled&&!v){m=f.group({class:"apexcharts-data-labels",transform:u});var y="";void 0!==n&&(y=g(n,{seriesIndex:r,dataPointIndex:a,w:h}));var b=h.globals.series[r][a]<0,x=h.config.plotOptions.bar.dataLabels.position;"vertical"===h.config.plotOptions.bar.dataLabels.orientation&&("top"===x&&(c.textAnchor=b?"end":"start"),"center"===x&&(c.textAnchor="middle"),"bottom"===x&&(c.textAnchor=b?"end":"start")),this.barCtx.isTimelineBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&l<f.getTextRects(y,parseFloat(c.style.fontSize)).width&&(y=""),h.config.chart.stacked&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&(this.barCtx.isHorizontal?(l>0&&o.width/1.6>l||l<0&&o.width/1.6<l)&&(y=""):o.height/1.6>s&&(y=""));var k=d({},c);this.barCtx.isHorizontal&&n<0&&("start"===c.textAnchor?k.textAnchor="end":"end"===c.textAnchor&&(k.textAnchor="start")),p.plotDataLabelsText({x:t,y:i,text:y,i:r,j:a,parent:m,dataLabelsConfig:k,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return m}}]),e}(),z=function(){function e(t){o(this,e),this.ctx=t,this.w=t.w,this.legendInactiveClass="legend-mouseover-inactive"}return l(e,[{key:"getAllSeriesEls",value:function(){return this.w.globals.dom.baseEl.getElementsByClassName("apexcharts-series")}},{key:"getSeriesByName",value:function(e){return this.w.globals.dom.baseEl.querySelector(".apexcharts-inner .apexcharts-series[seriesName='".concat(y.escapeString(e),"']"))}},{key:"isSeriesHidden",value:function(e){var t=this.getSeriesByName(e),i=parseInt(t.getAttribute("data:realIndex"),10);return{isHidden:t.classList.contains("apexcharts-series-collapsed"),realIndex:i}}},{key:"addCollapsedClassToSeries",value:function(e,t){var i=this.w;function n(i){for(var n=0;n<i.length;n++)i[n].index===t&&e.node.classList.add("apexcharts-series-collapsed")}n(i.globals.collapsedSeries),n(i.globals.ancillaryCollapsedSeries)}},{key:"toggleSeries",value:function(e){var t=this.isSeriesHidden(e);return this.ctx.legend.legendHelpers.toggleDataSeries(t.realIndex,t.isHidden),t.isHidden}},{key:"showSeries",value:function(e){var t=this.isSeriesHidden(e);t.isHidden&&this.ctx.legend.legendHelpers.toggleDataSeries(t.realIndex,!0)}},{key:"hideSeries",value:function(e){var t=this.isSeriesHidden(e);t.isHidden||this.ctx.legend.legendHelpers.toggleDataSeries(t.realIndex,!1)}},{key:"resetSeries",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=this.w,r=y.clone(n.globals.initialSeries);n.globals.previousPaths=[],i?(n.globals.collapsedSeries=[],n.globals.ancillaryCollapsedSeries=[],n.globals.collapsedSeriesIndices=[],n.globals.ancillaryCollapsedSeriesIndices=[]):r=this.emptyCollapsedSeries(r),n.config.series=r,e&&(t&&(n.globals.zoomed=!1,this.ctx.updateHelpers.revertDefaultAxisMinMax()),this.ctx.updateHelpers._updateSeries(r,n.config.chart.animations.dynamicAnimation.enabled))}},{key:"emptyCollapsedSeries",value:function(e){for(var t=this.w,i=0;i<e.length;i++)t.globals.collapsedSeriesIndices.indexOf(i)>-1&&(e[i].data=[]);return e}},{key:"toggleSeriesOnHover",value:function(e,t){var i=this.w,n=i.globals.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels");if("mousemove"===e.type){var r=parseInt(t.getAttribute("rel"),10)-1,a=null,o=null;i.globals.axisCharts||"radialBar"===i.config.chart.type?i.globals.axisCharts?(a=i.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(r,"']")),o=i.globals.dom.baseEl.querySelector(".apexcharts-datalabels[data\\:realIndex='".concat(r,"']"))):a=i.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(r+1,"']")):a=i.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(r+1,"'] path"));for(var s=0;s<n.length;s++)n[s].classList.add(this.legendInactiveClass);null!==a&&(i.globals.axisCharts||a.parentNode.classList.remove(this.legendInactiveClass),a.classList.remove(this.legendInactiveClass),null!==o&&o.classList.remove(this.legendInactiveClass))}else if("mouseout"===e.type)for(var l=0;l<n.length;l++)n[l].classList.remove(this.legendInactiveClass)}},{key:"highlightRangeInSeries",value:function(e,t){var i=this,n=this.w,r=n.globals.dom.baseEl.getElementsByClassName("apexcharts-heatmap-rect"),a=function(e){for(var t=0;t<r.length;t++)r[t].classList[e](i.legendInactiveClass)};if("mousemove"===e.type){var o=parseInt(t.getAttribute("rel"),10)-1;a("add"),function(e){for(var t=0;t<r.length;t++){var n=parseInt(r[t].getAttribute("val"),10);n>=e.from&&n<=e.to&&r[t].classList.remove(i.legendInactiveClass)}}(n.config.plotOptions.heatmap.colorScale.ranges[o])}else"mouseout"===e.type&&a("remove")}},{key:"getActiveConfigSeriesIndex",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"asc",i=this.w,n=0;if(i.config.series.length>1)for(var r=i.config.series.map((function(t,n){var r=!1;return e&&(r="bar"===i.config.series[n].type||"column"===i.config.series[n].type),t.data&&t.data.length>0&&!r?n:-1})),a="asc"===t?0:r.length-1;"asc"===t?a<r.length:a>=0;"asc"===t?a++:a--)if(-1!==r[a]){n=r[a];break}return n}},{key:"getPreviousPaths",value:function(){var e=this.w;function t(t,i,n){for(var r=t[i].childNodes,a={type:n,paths:[],realIndex:t[i].getAttribute("data:realIndex")},o=0;o<r.length;o++)if(r[o].hasAttribute("pathTo")){var s=r[o].getAttribute("pathTo");a.paths.push({d:s})}e.globals.previousPaths.push(a)}e.globals.previousPaths=[],["line","area","bar","rangebar","candlestick","radar"].forEach((function(i){for(var n,r=(n=i,e.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(n,"-series .apexcharts-series"))),a=0;a<r.length;a++)t(r,a,i)})),this.handlePrevBubbleScatterPaths("bubble"),this.handlePrevBubbleScatterPaths("scatter");var i=e.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(e.config.chart.type," .apexcharts-series"));if(i.length>0)for(var n=function(t){for(var i=e.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(e.config.chart.type," .apexcharts-series[data\\:realIndex='").concat(t,"'] rect")),n=[],r=function(e){var t=function(t){return i[e].getAttribute(t)},r={x:parseFloat(t("x")),y:parseFloat(t("y")),width:parseFloat(t("width")),height:parseFloat(t("height"))};n.push({rect:r,color:i[e].getAttribute("color")})},a=0;a<i.length;a++)r(a);e.globals.previousPaths.push(n)},r=0;r<i.length;r++)n(r);e.globals.axisCharts||(e.globals.previousPaths=e.globals.series)}},{key:"handlePrevBubbleScatterPaths",value:function(e){var t=this.w,i=t.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(e,"-series .apexcharts-series"));if(i.length>0)for(var n=0;n<i.length;n++){for(var r=t.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(e,"-series .apexcharts-series[data\\:realIndex='").concat(n,"'] circle")),a=[],o=0;o<r.length;o++)a.push({x:r[o].getAttribute("cx"),y:r[o].getAttribute("cy"),r:r[o].getAttribute("r")});t.globals.previousPaths.push(a)}}},{key:"clearPreviousPaths",value:function(){var e=this.w;e.globals.previousPaths=[],e.globals.allSeriesCollapsed=!1}},{key:"handleNoData",value:function(){var e=this.w,t=e.config.noData,i=new w(this.ctx),n=e.globals.svgWidth/2,r=e.globals.svgHeight/2,a="middle";if(e.globals.noData=!0,e.globals.animationEnded=!0,"left"===t.align?(n=10,a="start"):"right"===t.align&&(n=e.globals.svgWidth-10,a="end"),"top"===t.verticalAlign?r=50:"bottom"===t.verticalAlign&&(r=e.globals.svgHeight-50),n+=t.offsetX,r=r+parseInt(t.style.fontSize,10)+2+t.offsetY,void 0!==t.text&&""!==t.text){var o=i.drawText({x:n,y:r,text:t.text,textAnchor:a,fontSize:t.style.fontSize,fontFamily:t.style.fontFamily,foreColor:t.style.color,opacity:1,class:"apexcharts-text-nodata"});e.globals.dom.Paper.add(o)}}},{key:"setNullSeriesToZeroValues",value:function(e){for(var t=this.w,i=0;i<e.length;i++)if(0===e[i].length)for(var n=0;n<e[t.globals.maxValsInArrayIndex].length;n++)e[i].push(0);return e}},{key:"hasAllSeriesEqualX",value:function(){for(var e=!0,t=this.w,i=this.filteredSeriesX(),n=0;n<i.length-1;n++)if(i[n][0]!==i[n+1][0]){e=!1;break}return t.globals.allSeriesHasEqualX=e,e}},{key:"filteredSeriesX",value:function(){return this.w.globals.seriesX.map((function(e){return e.length>0?e:[]}))}}]),e}(),N=function(){function e(t){o(this,e),this.w=t.w,this.barCtx=t}return l(e,[{key:"initVariables",value:function(e){var t=this.w;this.barCtx.series=e,this.barCtx.totalItems=0,this.barCtx.seriesLen=0,this.barCtx.visibleI=-1,this.barCtx.visibleItems=1;for(var i=0;i<e.length;i++)if(e[i].length>0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=e[i].length),t.globals.isXNumeric)for(var n=0;n<e[i].length;n++)t.globals.seriesX[i][n]>t.globals.minX&&t.globals.seriesX[i][n]<t.globals.maxX&&this.barCtx.visibleItems++;else this.barCtx.visibleItems=t.globals.dataPoints;0===this.barCtx.seriesLen&&(this.barCtx.seriesLen=1),this.barCtx.zeroSerieses=[],this.barCtx.radiusOnSeriesNumber=e.length-1,t.globals.comboCharts||this.checkZeroSeries({series:e})}},{key:"initialPositions",value:function(){var e,t,i,n,r,a,o,s,l=this.w,c=l.globals.dataPoints;this.barCtx.isTimelineBar&&(c=l.globals.labels.length);var h=this.barCtx.seriesLen;if(l.config.plotOptions.bar.rangeBarGroupRows&&(h=1),this.barCtx.isHorizontal)r=(i=l.globals.gridHeight/c)/h,l.globals.isXNumeric&&(r=(i=l.globals.gridHeight/this.barCtx.totalItems)/this.barCtx.seriesLen),r=r*parseInt(this.barCtx.barOptions.barHeight,10)/100,s=this.barCtx.baseLineInvertedY+l.globals.padHorizontal+(this.barCtx.isReversed?l.globals.gridWidth:0)-(this.barCtx.isReversed?2*this.barCtx.baseLineInvertedY:0),t=(i-r*this.barCtx.seriesLen)/2;else{if(n=l.globals.gridWidth/this.barCtx.visibleItems,l.config.xaxis.convertedCatToNumeric&&(n=l.globals.gridWidth/l.globals.dataPoints),a=n/this.barCtx.seriesLen*parseInt(this.barCtx.barOptions.columnWidth,10)/100,l.globals.isXNumeric){var d=this.barCtx.xRatio;l.config.xaxis.convertedCatToNumeric&&(d=this.barCtx.initialXRatio),l.globals.minXDiff&&.5!==l.globals.minXDiff&&l.globals.minXDiff/d>0&&(n=l.globals.minXDiff/d),(a=n/this.barCtx.seriesLen*parseInt(this.barCtx.barOptions.columnWidth,10)/100)<1&&(a=1)}o=l.globals.gridHeight-this.barCtx.baseLineY[this.barCtx.yaxisIndex]-(this.barCtx.isReversed?l.globals.gridHeight:0)+(this.barCtx.isReversed?2*this.barCtx.baseLineY[this.barCtx.yaxisIndex]:0),e=l.globals.padHorizontal+(n-a*this.barCtx.seriesLen)/2}return{x:e,y:t,yDivision:i,xDivision:n,barHeight:r,barWidth:a,zeroH:o,zeroW:s}}},{key:"getPathFillColor",value:function(e,t,i,n){var r=this.w,a=new E(this.barCtx.ctx),o=null,s=this.barCtx.barOptions.distributed?i:t;return this.barCtx.barOptions.colors.ranges.length>0&&this.barCtx.barOptions.colors.ranges.map((function(n){e[t][i]>=n.from&&e[t][i]<=n.to&&(o=n.color)})),r.config.series[t].data[i]&&r.config.series[t].data[i].fillColor&&(o=r.config.series[t].data[i].fillColor),a.fillPath({seriesNumber:this.barCtx.barOptions.distributed?s:n,dataPointIndex:i,color:o,value:e[t][i]})}},{key:"getStrokeWidth",value:function(e,t,i){var n=0,r=this.w;return void 0===this.barCtx.series[e][t]||null===this.barCtx.series[e][t]?this.barCtx.isNullValue=!0:this.barCtx.isNullValue=!1,r.config.stroke.show&&(this.barCtx.isNullValue||(n=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[i]:this.barCtx.strokeWidth)),n}},{key:"barBackground",value:function(e){var t=e.j,i=e.i,n=e.x1,r=e.x2,a=e.y1,o=e.y2,s=e.elSeries,l=this.w,c=new w(this.barCtx.ctx),h=new z(this.barCtx.ctx).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&h===i){t>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(t-=this.barCtx.barOptions.colors.backgroundBarColors.length);var d=this.barCtx.barOptions.colors.backgroundBarColors[t],u=c.drawRect(void 0!==n?n:0,void 0!==a?a:0,void 0!==r?r:l.globals.gridWidth,void 0!==o?o:l.globals.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,d,this.barCtx.barOptions.colors.backgroundBarOpacity);s.add(u),u.node.classList.add("apexcharts-backgroundBar")}}},{key:"getColumnPaths",value:function(e){var t=e.barWidth,i=e.barXPosition,n=e.yRatio,r=e.y1,a=e.y2,o=e.strokeWidth,s=e.series,l=e.realIndex,c=e.i,h=e.j,d=e.w,u=new w(this.barCtx.ctx);(o=Array.isArray(o)?o[l]:o)||(o=0);var p={barWidth:t,strokeWidth:o,yRatio:n,barXPosition:i,y1:r,y2:a},f=this.getRoundedBars(d,p,s,c,h),g=i,m=i+t,v=u.move(g,r),y=u.move(g,r),b=u.line(m-o,r);return d.globals.previousPaths.length>0&&(y=this.barCtx.getPreviousPath(l,h,!1)),v=v+u.line(g,f.y2)+f.pathWithRadius+u.line(m-o,f.y2)+b+b+"z",y=y+u.line(g,r)+b+b+b+b+b+u.line(g,r),d.config.chart.stacked&&(this.barCtx.yArrj.push(f.y2),this.barCtx.yArrjF.push(Math.abs(r-f.y2)),this.barCtx.yArrjVal.push(this.barCtx.series[c][h])),{pathTo:v,pathFrom:y}}},{key:"getBarpaths",value:function(e){var t=e.barYPosition,i=e.barHeight,n=e.x1,r=e.x2,a=e.strokeWidth,o=e.series,s=e.realIndex,l=e.i,c=e.j,h=e.w,d=new w(this.barCtx.ctx);(a=Array.isArray(a)?a[s]:a)||(a=0);var u={barHeight:i,strokeWidth:a,barYPosition:t,x2:r,x1:n},p=this.getRoundedBars(h,u,o,l,c),f=d.move(n,t),g=d.move(n,t);h.globals.previousPaths.length>0&&(g=this.barCtx.getPreviousPath(s,c,!1));var m=t,v=t+i,y=d.line(n,v-a);return f=f+d.line(p.x2,m)+p.pathWithRadius+d.line(p.x2,v-a)+y+y+"z",g=g+d.line(n,m)+y+y+y+y+y+d.line(n,m),h.config.chart.stacked&&(this.barCtx.xArrj.push(p.x2),this.barCtx.xArrjF.push(Math.abs(n-p.x2)),this.barCtx.xArrjVal.push(this.barCtx.series[l][c])),{pathTo:f,pathFrom:g}}},{key:"getRoundedBars",value:function(e,t,i,n,r){var a=new w(this.barCtx.ctx),o=e.config.plotOptions.bar.borderRadius;if(e.config.chart.stacked&&i.length>1&&n!==this.barCtx.radiusOnSeriesNumber&&(o=0),this.barCtx.isHorizontal){var s="",l=t.x2;if(Math.abs(t.x1-t.x2)<o&&(o=Math.abs(t.x1-t.x2)),void 0!==i[n][r]||null!==i[n][r]){var c=this.barCtx.isReversed?i[n][r]>0:i[n][r]<0;c&&(o*=-1),l-=o,s=a.quadraticCurve(l+o,t.barYPosition,l+o,t.barYPosition+(c?-1*o:o))+a.line(l+o,t.barYPosition+t.barHeight-t.strokeWidth-(c?-1*o:o))+a.quadraticCurve(l+o,t.barYPosition+t.barHeight-t.strokeWidth,l,t.barYPosition+t.barHeight-t.strokeWidth)}return{pathWithRadius:s,x2:l}}var h="",d=t.y2;if(Math.abs(t.y1-t.y2)<o&&(o=Math.abs(t.y1-t.y2)),void 0!==i[n][r]||null!==i[n][r]){var u=i[n][r]<0;u&&(o*=-1),d+=o,h=a.quadraticCurve(t.barXPosition,d-o,t.barXPosition+(u?-1*o:o),d-o)+a.line(t.barXPosition+t.barWidth-t.strokeWidth-(u?-1*o:o),d-o)+a.quadraticCurve(t.barXPosition+t.barWidth-t.strokeWidth,d-o,t.barXPosition+t.barWidth-t.strokeWidth,d)}return{pathWithRadius:h,y2:d}}},{key:"checkZeroSeries",value:function(e){for(var t=e.series,i=this.w,n=0;n<t.length;n++){for(var r=0,a=0;a<t[i.globals.maxValsInArrayIndex].length;a++)r+=t[n][a];0===r&&this.barCtx.zeroSerieses.push(n)}for(var o=t.length-1;o>=0;o--)this.barCtx.zeroSerieses.indexOf(o)>-1&&o===this.radiusOnSeriesNumber&&(this.barCtx.radiusOnSeriesNumber-=1);for(var s=t.length-1;s>=0;s--)i.globals.collapsedSeriesIndices.indexOf(this.barCtx.radiusOnSeriesNumber)>-1&&(this.barCtx.radiusOnSeriesNumber-=1)}},{key:"getXForValue",value:function(e,t){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=i?t:null;return null!=e&&(n=t+e/this.barCtx.invertedYRatio-2*(this.barCtx.isReversed?e/this.barCtx.invertedYRatio:0)),n}},{key:"getYForValue",value:function(e,t){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=i?t:null;return null!=e&&(n=t-e/this.barCtx.yRatio[this.barCtx.yaxisIndex]+2*(this.barCtx.isReversed?e/this.barCtx.yRatio[this.barCtx.yaxisIndex]:0)),n}},{key:"getGoalValues",value:function(e,t,i,n,r){var a=this,o=this.w,s=[];return o.globals.seriesGoals[n]&&o.globals.seriesGoals[n][r]&&Array.isArray(o.globals.seriesGoals[n][r])&&o.globals.seriesGoals[n][r].forEach((function(n){var r;s.push((c(r={},e,"x"===e?a.getXForValue(n.value,t,!1):a.getYForValue(n.value,i,!1)),c(r,"attrs",n),r))})),s}},{key:"drawGoalLine",value:function(e){var t=e.barXPosition,i=e.barYPosition,n=e.goalX,r=e.goalY,a=e.barWidth,o=e.barHeight,s=this.w,l=new w(this.barCtx.ctx),c=l.group({className:"apexcharts-bar-goals-groups"}),h=null;return s.globals.isBarHorizontal?Array.isArray(n)&&n.forEach((function(e){h=l.drawLine(e.x,i,e.x,i+o,e.attrs.strokeColor?e.attrs.strokeColor:void 0,0,e.attrs.strokeWidth?e.attrs.strokeWidth:2),c.add(h)})):Array.isArray(r)&&r.forEach((function(e){h=l.drawLine(t,e.y,t+a,e.y,e.attrs.strokeColor?e.attrs.strokeColor:void 0,0,e.attrs.strokeWidth?e.attrs.strokeWidth:2),c.add(h)})),c}}]),e}(),R=function(){function e(t,i){o(this,e),this.ctx=t,this.w=t.w;var n=this.w;this.barOptions=n.config.plotOptions.bar,this.isHorizontal=this.barOptions.horizontal,this.strokeWidth=n.config.stroke.width,this.isNullValue=!1,this.isTimelineBar="datetime"===n.config.xaxis.type&&n.globals.seriesRangeBarTimeline.length,this.xyRatios=i,null!==this.xyRatios&&(this.xRatio=i.xRatio,this.initialXRatio=i.initialXRatio,this.yRatio=i.yRatio,this.invertedXRatio=i.invertedXRatio,this.invertedYRatio=i.invertedYRatio,this.baseLineY=i.baseLineY,this.baseLineInvertedY=i.baseLineInvertedY),this.yaxisIndex=0,this.seriesLen=0,this.barHelpers=new N(this)}return l(e,[{key:"draw",value:function(e,t){var i=this.w,n=new w(this.ctx),r=new S(this.ctx,i);e=r.getLogSeries(e),this.series=e,this.yRatio=r.getLogYRatios(this.yRatio),this.barHelpers.initVariables(e);var a=n.group({class:"apexcharts-bar-series apexcharts-plot-series"});i.config.dataLabels.enabled&&this.totalItems>this.barOptions.dataLabels.maxItems&&console.warn("WARNING: DataLabels are enabled but there are too many to display. This may cause performance issue when rendering.");for(var o=0,s=0;o<e.length;o++,s++){var l,c,h,u,p=void 0,f=void 0,g=[],m=[],v=i.globals.comboCharts?t[o]:o,b=n.group({class:"apexcharts-series",rel:o+1,seriesName:y.escapeString(i.globals.seriesNames[v]),"data:realIndex":v});this.ctx.series.addCollapsedClassToSeries(b,v),e[o].length>0&&(this.visibleI=this.visibleI+1);var x=0,k=0;this.yRatio.length>1&&(this.yaxisIndex=v),this.isReversed=i.config.yaxis[this.yaxisIndex]&&i.config.yaxis[this.yaxisIndex].reversed;var _=this.barHelpers.initialPositions();f=_.y,x=_.barHeight,c=_.yDivision,u=_.zeroW,p=_.x,k=_.barWidth,l=_.xDivision,h=_.zeroH,this.horizontal||m.push(p+k/2);for(var A=n.group({class:"apexcharts-datalabels","data:realIndex":v}),C=n.group({class:"apexcharts-bar-goals-markers",style:"pointer-events: none"}),T=0;T<i.globals.dataPoints;T++){var P=this.barHelpers.getStrokeWidth(o,T,v),L=null,E={indexes:{i:o,j:T,realIndex:v,bc:s},x:p,y:f,strokeWidth:P,elSeries:b};this.isHorizontal?(L=this.drawBarPaths(d(d({},E),{},{barHeight:x,zeroW:u,yDivision:c})),k=this.series[o][T]/this.invertedYRatio):(L=this.drawColumnPaths(d(d({},E),{},{xDivision:l,barWidth:k,zeroH:h})),x=this.series[o][T]/this.yRatio[this.yaxisIndex]);var M=this.barHelpers.drawGoalLine({barXPosition:L.barXPosition,barYPosition:L.barYPosition,goalX:L.goalX,goalY:L.goalY,barHeight:x,barWidth:k});M&&C.add(M),f=L.y,p=L.x,T>0&&m.push(p+k/2),g.push(f);var O=this.barHelpers.getPathFillColor(e,o,T,v);this.renderSeries({realIndex:v,pathFill:O,j:T,i:o,pathFrom:L.pathFrom,pathTo:L.pathTo,strokeWidth:P,elSeries:b,x:p,y:f,series:e,barHeight:x,barWidth:k,elDataLabelsWrap:A,elGoalsMarkers:C,visibleSeries:this.visibleI,type:"bar"})}i.globals.seriesXvalues[v]=m,i.globals.seriesYvalues[v]=g,a.add(b)}return a}},{key:"renderSeries",value:function(e){var t=e.realIndex,i=e.pathFill,n=e.lineFill,r=e.j,a=e.i,o=e.pathFrom,s=e.pathTo,l=e.strokeWidth,c=e.elSeries,h=e.x,d=e.y,u=e.y1,p=e.y2,f=e.series,g=e.barHeight,m=e.barWidth,v=e.barYPosition,y=e.elDataLabelsWrap,b=e.elGoalsMarkers,k=e.visibleSeries,_=e.type,S=this.w,A=new w(this.ctx);n||(n=this.barOptions.distributed?S.globals.stroke.colors[r]:S.globals.stroke.colors[t]),S.config.series[a].data[r]&&S.config.series[a].data[r].strokeColor&&(n=S.config.series[a].data[r].strokeColor),this.isNullValue&&(i="none");var C=r/S.config.chart.animations.animateGradually.delay*(S.config.chart.animations.speed/S.globals.dataPoints)/2.4,T=A.renderPaths({i:a,j:r,realIndex:t,pathFrom:o,pathTo:s,stroke:n,strokeWidth:l,strokeLineCap:S.config.stroke.lineCap,fill:i,animationDelay:C,initialSpeed:S.config.chart.animations.speed,dataChangeSpeed:S.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(_,"-area")});T.attr("clip-path","url(#gridRectMask".concat(S.globals.cuid,")")),void 0!==u&&void 0!==p&&(T.attr("data-range-y1",u),T.attr("data-range-y2",p)),new x(this.ctx).setSelectionFilter(T,t,r),c.add(T);var P=new D(this).handleBarDataLabels({x:h,y:d,y1:u,y2:p,i:a,j:r,series:f,realIndex:t,barHeight:g,barWidth:m,barYPosition:v,renderedPath:T,visibleSeries:k});return null!==P&&y.add(P),c.add(y),b&&c.add(b),c}},{key:"drawBarPaths",value:function(e){var t=e.indexes,i=e.barHeight,n=e.strokeWidth,r=e.zeroW,a=e.x,o=e.y,s=e.yDivision,l=e.elSeries,c=this.w,h=t.i,d=t.j;c.globals.isXNumeric&&(o=(c.globals.seriesX[h][d]-c.globals.minX)/this.invertedXRatio-i);var u=o+i*this.visibleI;a=this.barHelpers.getXForValue(this.series[h][d],r);var p=this.barHelpers.getBarpaths({barYPosition:u,barHeight:i,x1:r,x2:a,strokeWidth:n,series:this.series,realIndex:t.realIndex,i:h,j:d,w:c});return c.globals.isXNumeric||(o+=s),this.barHelpers.barBackground({j:d,i:h,y1:u-i*this.visibleI,y2:i*this.seriesLen,elSeries:l}),{pathTo:p.pathTo,pathFrom:p.pathFrom,x:a,y:o,goalX:this.barHelpers.getGoalValues("x",r,null,h,d),barYPosition:u}}},{key:"drawColumnPaths",value:function(e){var t=e.indexes,i=e.x,n=e.y,r=e.xDivision,a=e.barWidth,o=e.zeroH,s=e.strokeWidth,l=e.elSeries,c=this.w,h=t.realIndex,d=t.i,u=t.j,p=t.bc;if(c.globals.isXNumeric){var f=h;c.globals.seriesX[h].length||(f=c.globals.maxValsInArrayIndex),i=(c.globals.seriesX[f][u]-c.globals.minX)/this.xRatio-a*this.seriesLen/2}var g=i+a*this.visibleI;n=this.barHelpers.getYForValue(this.series[d][u],o);var m=this.barHelpers.getColumnPaths({barXPosition:g,barWidth:a,y1:o,y2:n,strokeWidth:s,series:this.series,realIndex:t.realIndex,i:d,j:u,w:c});return c.globals.isXNumeric||(i+=r),this.barHelpers.barBackground({bc:p,j:u,i:d,x1:g-s/2-a*this.visibleI,x2:a*this.seriesLen+s/2,elSeries:l}),{pathTo:m.pathTo,pathFrom:m.pathFrom,x:i,y:n,goalY:this.barHelpers.getGoalValues("y",null,o,d,u),barXPosition:g}}},{key:"getPreviousPath",value:function(e,t){for(var i,n=this.w,r=0;r<n.globals.previousPaths.length;r++){var a=n.globals.previousPaths[r];a.paths&&a.paths.length>0&&parseInt(a.realIndex,10)===parseInt(e,10)&&void 0!==n.globals.previousPaths[r].paths[t]&&(i=n.globals.previousPaths[r].paths[t].d)}return i}}]),e}(),F=function(){function e(t){o(this,e),this.ctx=t,this.w=t.w,this.months31=[1,3,5,7,8,10,12],this.months30=[2,4,6,9,11],this.daysCntOfYear=[0,31,59,90,120,151,181,212,243,273,304,334]}return l(e,[{key:"isValidDate",value:function(e){return!isNaN(this.parseDate(e))}},{key:"getTimeStamp",value:function(e){return Date.parse(e)?this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(e).toISOString().substr(0,25)).getTime():new Date(e).getTime():e}},{key:"getDate",value:function(e){return this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(e).toUTCString()):new Date(e)}},{key:"parseDate",value:function(e){var t=Date.parse(e);if(!isNaN(t))return this.getTimeStamp(e);var i=Date.parse(e.replace(/-/g,"/").replace(/[a-z]+/gi," "));return this.getTimeStamp(i)}},{key:"parseDateWithTimezone",value:function(e){return Date.parse(e.replace(/-/g,"/").replace(/[a-z]+/gi," "))}},{key:"formatDate",value:function(e,t){var i=this.w.globals.locale,n=this.w.config.xaxis.labels.datetimeUTC,r=["\0"].concat(m(i.months)),a=[""].concat(m(i.shortMonths)),o=[""].concat(m(i.days)),s=[""].concat(m(i.shortDays));function l(e,t){var i=e+"";for(t=t||2;i.length<t;)i="0"+i;return i}var c=n?e.getUTCFullYear():e.getFullYear();t=(t=(t=t.replace(/(^|[^\\])yyyy+/g,"$1"+c)).replace(/(^|[^\\])yy/g,"$1"+c.toString().substr(2,2))).replace(/(^|[^\\])y/g,"$1"+c);var h=(n?e.getUTCMonth():e.getMonth())+1;t=(t=(t=(t=t.replace(/(^|[^\\])MMMM+/g,"$1"+r[0])).replace(/(^|[^\\])MMM/g,"$1"+a[0])).replace(/(^|[^\\])MM/g,"$1"+l(h))).replace(/(^|[^\\])M/g,"$1"+h);var d=n?e.getUTCDate():e.getDate();t=(t=(t=(t=t.replace(/(^|[^\\])dddd+/g,"$1"+o[0])).replace(/(^|[^\\])ddd/g,"$1"+s[0])).replace(/(^|[^\\])dd/g,"$1"+l(d))).replace(/(^|[^\\])d/g,"$1"+d);var u=n?e.getUTCHours():e.getHours(),p=u>12?u-12:0===u?12:u;t=(t=(t=(t=t.replace(/(^|[^\\])HH+/g,"$1"+l(u))).replace(/(^|[^\\])H/g,"$1"+u)).replace(/(^|[^\\])hh+/g,"$1"+l(p))).replace(/(^|[^\\])h/g,"$1"+p);var f=n?e.getUTCMinutes():e.getMinutes();t=(t=t.replace(/(^|[^\\])mm+/g,"$1"+l(f))).replace(/(^|[^\\])m/g,"$1"+f);var g=n?e.getUTCSeconds():e.getSeconds();t=(t=t.replace(/(^|[^\\])ss+/g,"$1"+l(g))).replace(/(^|[^\\])s/g,"$1"+g);var v=n?e.getUTCMilliseconds():e.getMilliseconds();t=t.replace(/(^|[^\\])fff+/g,"$1"+l(v,3)),v=Math.round(v/10),t=t.replace(/(^|[^\\])ff/g,"$1"+l(v)),v=Math.round(v/10);var y=u<12?"AM":"PM";t=(t=(t=t.replace(/(^|[^\\])f/g,"$1"+v)).replace(/(^|[^\\])TT+/g,"$1"+y)).replace(/(^|[^\\])T/g,"$1"+y.charAt(0));var b=y.toLowerCase();t=(t=t.replace(/(^|[^\\])tt+/g,"$1"+b)).replace(/(^|[^\\])t/g,"$1"+b.charAt(0));var x=-e.getTimezoneOffset(),w=n||!x?"Z":x>0?"+":"-";if(!n){var k=(x=Math.abs(x))%60;w+=l(Math.floor(x/60))+":"+l(k)}t=t.replace(/(^|[^\\])K/g,"$1"+w);var _=(n?e.getUTCDay():e.getDay())+1;return(t=(t=(t=(t=t.replace(new RegExp(o[0],"g"),o[_])).replace(new RegExp(s[0],"g"),s[_])).replace(new RegExp(r[0],"g"),r[h])).replace(new RegExp(a[0],"g"),a[h])).replace(/\\(.)/g,"$1")}},{key:"getTimeUnitsfromTimestamp",value:function(e,t,i){var n=this.w;void 0!==n.config.xaxis.min&&(e=n.config.xaxis.min),void 0!==n.config.xaxis.max&&(t=n.config.xaxis.max);var r=this.getDate(e),a=this.getDate(t),o=this.formatDate(r,"yyyy MM dd HH mm ss fff").split(" "),s=this.formatDate(a,"yyyy MM dd HH mm ss fff").split(" ");return{minMillisecond:parseInt(o[6],10),maxMillisecond:parseInt(s[6],10),minSecond:parseInt(o[5],10),maxSecond:parseInt(s[5],10),minMinute:parseInt(o[4],10),maxMinute:parseInt(s[4],10),minHour:parseInt(o[3],10),maxHour:parseInt(s[3],10),minDate:parseInt(o[2],10),maxDate:parseInt(s[2],10),minMonth:parseInt(o[1],10)-1,maxMonth:parseInt(s[1],10)-1,minYear:parseInt(o[0],10),maxYear:parseInt(s[0],10)}}},{key:"isLeapYear",value:function(e){return e%4==0&&e%100!=0||e%400==0}},{key:"calculcateLastDaysOfMonth",value:function(e,t,i){return this.determineDaysOfMonths(e,t)-i}},{key:"determineDaysOfYear",value:function(e){var t=365;return this.isLeapYear(e)&&(t=366),t}},{key:"determineRemainingDaysOfYear",value:function(e,t,i){var n=this.daysCntOfYear[t]+i;return t>1&&this.isLeapYear()&&n++,n}},{key:"determineDaysOfMonths",value:function(e,t){var i=30;switch(e=y.monthMod(e),!0){case this.months30.indexOf(e)>-1:2===e&&(i=this.isLeapYear(t)?29:28);break;case this.months31.indexOf(e)>-1:default:i=31}return i}}]),e}(),H=function(e){u(i,R);var t=g(i);function i(){return o(this,i),t.apply(this,arguments)}return l(i,[{key:"draw",value:function(e,t){var i=this.w,n=new w(this.ctx);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=e,this.seriesRangeStart=i.globals.seriesRangeStart,this.seriesRangeEnd=i.globals.seriesRangeEnd,this.barHelpers.initVariables(e);for(var r=n.group({class:"apexcharts-rangebar-series apexcharts-plot-series"}),a=0;a<e.length;a++){var o,s,l,c=void 0,h=void 0,u=void 0,p=i.globals.comboCharts?t[a]:a,f=n.group({class:"apexcharts-series",seriesName:y.escapeString(i.globals.seriesNames[p]),rel:a+1,"data:realIndex":p});e[a].length>0&&(this.visibleI=this.visibleI+1);var g=0,m=0;this.yRatio.length>1&&(this.yaxisIndex=p);var v=this.barHelpers.initialPositions();h=v.y,l=v.zeroW,c=v.x,m=v.barWidth,o=v.xDivision,s=v.zeroH;for(var b=n.group({class:"apexcharts-datalabels","data:realIndex":p}),x=0;x<i.globals.dataPoints;x++){var k=this.barHelpers.getStrokeWidth(a,x,p),_=this.seriesRangeStart[a][x],S=this.seriesRangeEnd[a][x],A=null,C=null,T={x:c,y:h,strokeWidth:k,elSeries:f};if(u=v.yDivision,g=v.barHeight,this.isHorizontal){C=h+g*this.visibleI;var P=this.seriesLen;i.config.plotOptions.bar.rangeBarGroupRows&&(P=1);var L=(u-g*P)/2;if(void 0===i.config.series[a].data[x])break;if(this.isTimelineBar&&i.config.series[a].data[x].x){var E=this.detectOverlappingBars({i:a,j:x,barYPosition:C,srty:L,barHeight:g,yDivision:u,initPositions:v});g=E.barHeight,C=E.barYPosition}m=(A=this.drawRangeBarPaths(d({indexes:{i:a,j:x,realIndex:p},barHeight:g,barYPosition:C,zeroW:l,yDivision:u,y1:_,y2:S},T))).barWidth}else g=(A=this.drawRangeColumnPaths(d({indexes:{i:a,j:x,realIndex:p},zeroH:s,barWidth:m,xDivision:o},T))).barHeight;h=A.y,c=A.x;var M=this.barHelpers.getPathFillColor(e,a,x,p),O=i.globals.stroke.colors[p];this.renderSeries({realIndex:p,pathFill:M,lineFill:O,j:x,i:a,x:c,y:h,y1:_,y2:S,pathFrom:A.pathFrom,pathTo:A.pathTo,strokeWidth:k,elSeries:f,series:e,barHeight:g,barYPosition:C,barWidth:m,elDataLabelsWrap:b,visibleSeries:this.visibleI,type:"rangebar"})}r.add(f)}return r}},{key:"detectOverlappingBars",value:function(e){var t=e.i,i=e.j,n=e.barYPosition,r=e.srty,a=e.barHeight,o=e.yDivision,s=e.initPositions,l=this.w,c=[],h=l.config.series[t].data[i].rangeName,d=l.config.series[t].data[i].x,u=l.globals.labels.indexOf(d),p=l.globals.seriesRangeBarTimeline[t].findIndex((function(e){return e.x===d&&e.overlaps.length>0}));return n=l.config.plotOptions.bar.rangeBarGroupRows?r+o*u:r+a*this.visibleI+o*u,p>-1&&!l.config.plotOptions.bar.rangeBarOverlap&&(c=l.globals.seriesRangeBarTimeline[t][p].overlaps).indexOf(h)>-1&&(n=(a=s.barHeight/c.length)*this.visibleI+o*(100-parseInt(this.barOptions.barHeight,10))/100/2+a*(this.visibleI+c.indexOf(h))+o*u),{barYPosition:n,barHeight:a}}},{key:"drawRangeColumnPaths",value:function(e){var t=e.indexes,i=e.x,n=(e.strokeWidth,e.xDivision),r=e.barWidth,a=e.zeroH,o=this.w,s=t.i,l=t.j,c=this.yRatio[this.yaxisIndex],h=t.realIndex,d=this.getRangeValue(h,l),u=Math.min(d.start,d.end),p=Math.max(d.start,d.end);o.globals.isXNumeric&&(i=(o.globals.seriesX[s][l]-o.globals.minX)/this.xRatio-r/2);var f=i+r*this.visibleI;void 0===this.series[s][l]||null===this.series[s][l]?u=a:(u=a-u/c,p=a-p/c);var g=Math.abs(p-u),m=this.barHelpers.getColumnPaths({barXPosition:f,barWidth:r,y1:u,y2:p,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:t.realIndex,i:h,j:l,w:o});return o.globals.isXNumeric||(i+=n),{pathTo:m.pathTo,pathFrom:m.pathFrom,barHeight:g,x:i,y:p,barXPosition:f}}},{key:"drawRangeBarPaths",value:function(e){var t=e.indexes,i=e.y,n=e.y1,r=e.y2,a=e.yDivision,o=e.barHeight,s=e.barYPosition,l=e.zeroW,c=this.w,h=l+n/this.invertedYRatio,d=l+r/this.invertedYRatio,u=Math.abs(d-h),p=this.barHelpers.getBarpaths({barYPosition:s,barHeight:o,x1:h,x2:d,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:t.realIndex,realIndex:t.realIndex,j:t.j,w:c});return c.globals.isXNumeric||(i+=a),{pathTo:p.pathTo,pathFrom:p.pathFrom,barWidth:u,x:d,y:i}}},{key:"getRangeValue",value:function(e,t){var i=this.w;return{start:i.globals.seriesRangeStart[e][t],end:i.globals.seriesRangeEnd[e][t]}}},{key:"getTooltipValues",value:function(e){var t=e.ctx,i=e.seriesIndex,n=e.dataPointIndex,r=e.y1,a=e.y2,o=e.w,s=o.globals.seriesRangeStart[i][n],l=o.globals.seriesRangeEnd[i][n],c=o.globals.labels[n],h=o.config.series[i].name?o.config.series[i].name:"",d=o.config.tooltip.y.formatter,u=o.config.tooltip.y.title.formatter,p={w:o,seriesIndex:i,dataPointIndex:n,start:s,end:l};"function"==typeof u&&(h=u(h,p)),Number.isFinite(r)&&Number.isFinite(a)&&(s=r,l=a,o.config.series[i].data[n].x&&(c=o.config.series[i].data[n].x+":"),"function"==typeof d&&(c=d(c,p)));var f="",g="",m=o.globals.colors[i];if(void 0===o.config.tooltip.x.formatter)if("datetime"===o.config.xaxis.type){var v=new F(t);f=v.formatDate(v.getDate(s),o.config.tooltip.x.format),g=v.formatDate(v.getDate(l),o.config.tooltip.x.format)}else f=s,g=l;else f=o.config.tooltip.x.formatter(s),g=o.config.tooltip.x.formatter(l);return{start:s,end:l,startVal:f,endVal:g,ylabel:c,color:m,seriesName:h}}},{key:"buildCustomTooltipHTML",value:function(e){return'<div class="apexcharts-tooltip-rangebar"><div> <span class="series-name" style="color: '+e.color+'">'+(e.seriesName||"")+'</span></div><div> <span class="category">'+e.ylabel+' </span> <span class="value start-value">'+e.start+'</span> <span class="separator">-</span> <span class="value end-value">'+e.end+"</span></div></div>"}}]),i}(),Y=function(){function e(t){o(this,e),this.opts=t}return l(e,[{key:"line",value:function(){return{chart:{animations:{easing:"swing"}},dataLabels:{enabled:!1},stroke:{width:5,curve:"straight"},markers:{size:0,hover:{sizeOffset:6}},xaxis:{crosshairs:{width:1}}}}},{key:"sparkline",value:function(e){return this.opts.yaxis[0].show=!1,this.opts.yaxis[0].title.text="",this.opts.yaxis[0].axisBorder.show=!1,this.opts.yaxis[0].axisTicks.show=!1,this.opts.yaxis[0].floating=!0,y.extend(e,{grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},legend:{show:!1},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}},chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1}})}},{key:"bar",value:function(){return{chart:{stacked:!1,animations:{easing:"swing"}},plotOptions:{bar:{dataLabels:{position:"center"}}},dataLabels:{style:{colors:["#fff"]},background:{enabled:!1}},stroke:{width:0,lineCap:"round"},fill:{opacity:.85},legend:{markers:{shape:"square",radius:2,size:8}},tooltip:{shared:!1,intersect:!0},xaxis:{tooltip:{enabled:!1},tickPlacement:"between",crosshairs:{width:"barWidth",position:"back",fill:{type:"gradient"},dropShadow:{enabled:!1},stroke:{width:0}}}}}},{key:"candlestick",value:function(){var e=this;return{stroke:{width:1,colors:["#333"]},fill:{opacity:1},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(t){var i=t.seriesIndex,n=t.dataPointIndex,r=t.w;return e._getBoxTooltip(r,i,n,["Open","High","","Low","Close"],"candlestick")}},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}},{key:"boxPlot",value:function(){var e=this;return{chart:{animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:["#24292e"]},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(t){var i=t.seriesIndex,n=t.dataPointIndex,r=t.w;return e._getBoxTooltip(r,i,n,["Minimum","Q1","Median","Q3","Maximum"],"boxPlot")}},markers:{size:5,strokeWidth:1,strokeColors:"#111"},xaxis:{crosshairs:{width:1}}}}},{key:"rangeBar",value:function(){return{stroke:{width:0,lineCap:"square"},plotOptions:{bar:{borderRadius:0,dataLabels:{position:"center"}}},dataLabels:{enabled:!1,formatter:function(e,t){t.ctx;var i=t.seriesIndex,n=t.dataPointIndex,r=t.w,a=r.globals.seriesRangeStart[i][n];return r.globals.seriesRangeEnd[i][n]-a},background:{enabled:!1},style:{colors:["#fff"]}},tooltip:{shared:!1,followCursor:!0,custom:function(e){return e.w.config.plotOptions&&e.w.config.plotOptions.bar&&e.w.config.plotOptions.bar.horizontal?function(e){var t=new H(e.ctx,null),i=t.getTooltipValues(e),n=i.color,r=i.seriesName,a=i.ylabel,o=i.startVal,s=i.endVal;return t.buildCustomTooltipHTML({color:n,seriesName:r,ylabel:a,start:o,end:s})}(e):function(e){var t=new H(e.ctx,null),i=t.getTooltipValues(e),n=i.color,r=i.seriesName,a=i.ylabel,o=i.start,s=i.end;return t.buildCustomTooltipHTML({color:n,seriesName:r,ylabel:a,start:o,end:s})}(e)}},xaxis:{tickPlacement:"between",tooltip:{enabled:!1},crosshairs:{stroke:{width:0}}}}}},{key:"area",value:function(){return{stroke:{width:4},fill:{type:"gradient",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}},markers:{size:0,hover:{sizeOffset:6}},tooltip:{followCursor:!1}}}},{key:"brush",value:function(e){return y.extend(e,{chart:{toolbar:{autoSelected:"selection",show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1},stroke:{width:1},tooltip:{enabled:!1},xaxis:{tooltip:{enabled:!1}}})}},{key:"stacked100",value:function(e){e.dataLabels=e.dataLabels||{},e.dataLabels.formatter=e.dataLabels.formatter||void 0;var t=e.dataLabels.formatter;return e.yaxis.forEach((function(t,i){e.yaxis[i].min=0,e.yaxis[i].max=100})),"bar"===e.chart.type&&(e.dataLabels.formatter=t||function(e){return"number"==typeof e&&e?e.toFixed(0)+"%":e}),e}},{key:"convertCatToNumeric",value:function(e){return e.xaxis.convertedCatToNumeric=!0,e}},{key:"convertCatToNumericXaxis",value:function(e,t,i){e.xaxis.type="numeric",e.xaxis.labels=e.xaxis.labels||{},e.xaxis.labels.formatter=e.xaxis.labels.formatter||function(e){return y.isNumber(e)?Math.floor(e):e};var n=e.xaxis.labels.formatter,r=e.xaxis.categories&&e.xaxis.categories.length?e.xaxis.categories:e.labels;return i&&i.length&&(r=i.map((function(e){return Array.isArray(e)?e:String(e)}))),r&&r.length&&(e.xaxis.labels.formatter=function(e){return y.isNumber(e)?n(r[Math.floor(e)-1]):n(e)}),e.xaxis.categories=[],e.labels=[],e.xaxis.tickAmount=e.xaxis.tickAmount||"dataPoints",e}},{key:"bubble",value:function(){return{dataLabels:{style:{colors:["#fff"]}},tooltip:{shared:!1,intersect:!0},xaxis:{crosshairs:{width:0}},fill:{type:"solid",gradient:{shade:"light",inverse:!0,shadeIntensity:.55,opacityFrom:.4,opacityTo:.8}}}}},{key:"scatter",value:function(){return{dataLabels:{enabled:!1},tooltip:{shared:!1,intersect:!0},markers:{size:6,strokeWidth:1,hover:{sizeOffset:2}}}}},{key:"heatmap",value:function(){return{chart:{stacked:!1},fill:{opacity:1},dataLabels:{style:{colors:["#fff"]}},stroke:{colors:["#fff"]},tooltip:{followCursor:!0,marker:{show:!1},x:{show:!1}},legend:{position:"top",markers:{shape:"square",size:10,offsetY:2}},grid:{padding:{right:20}}}}},{key:"treemap",value:function(){return{chart:{zoom:{enabled:!1}},dataLabels:{style:{fontSize:14,fontWeight:600,colors:["#fff"]}},stroke:{show:!0,width:2,colors:["#fff"]},legend:{show:!1},fill:{gradient:{stops:[0,100]}},tooltip:{followCursor:!0,x:{show:!1}},grid:{padding:{left:0,right:0}},xaxis:{crosshairs:{show:!1},tooltip:{enabled:!1}}}}},{key:"pie",value:function(){return{chart:{toolbar:{show:!1}},plotOptions:{pie:{donut:{labels:{show:!1}}}},dataLabels:{formatter:function(e){return e.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",stops:[0,100]}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"}}}},{key:"donut",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(e){return e.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",shadeIntensity:.35,stops:[80,100],opacityFrom:1,opacityTo:1}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"}}}},{key:"polarArea",value:function(){return this.opts.yaxis[0].tickAmount=this.opts.yaxis[0].tickAmount?this.opts.yaxis[0].tickAmount:6,{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(e){return e.toFixed(1)+"%"},enabled:!1},stroke:{show:!0,width:2},fill:{opacity:.7},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"}}}},{key:"radar",value:function(){return this.opts.yaxis[0].labels.offsetY=this.opts.yaxis[0].labels.offsetY?this.opts.yaxis[0].labels.offsetY:6,{dataLabels:{enabled:!1,style:{fontSize:"11px"}},stroke:{width:2},markers:{size:3,strokeWidth:1,strokeOpacity:1},fill:{opacity:.2},tooltip:{shared:!1,intersect:!0,followCursor:!0},grid:{show:!1},xaxis:{labels:{formatter:function(e){return e},style:{colors:["#a8a8a8"],fontSize:"11px"}},tooltip:{enabled:!1},crosshairs:{show:!1}}}}},{key:"radialBar",value:function(){return{chart:{animations:{dynamicAnimation:{enabled:!0,speed:800}},toolbar:{show:!1}},fill:{gradient:{shade:"dark",shadeIntensity:.4,inverseColors:!1,type:"diagonal2",opacityFrom:1,opacityTo:1,stops:[70,98,100]}},legend:{show:!1,position:"right"},tooltip:{enabled:!1,fillSeriesColor:!0}}}},{key:"_getBoxTooltip",value:function(e,t,i,n,r){var a=e.globals.seriesCandleO[t][i],o=e.globals.seriesCandleH[t][i],s=e.globals.seriesCandleM[t][i],l=e.globals.seriesCandleL[t][i],c=e.globals.seriesCandleC[t][i];return e.config.series[t].type&&e.config.series[t].type!==r?'<div class="apexcharts-custom-tooltip">\n '.concat(e.config.series[t].name?e.config.series[t].name:"series-"+(t+1),": <strong>").concat(e.globals.series[t][i],"</strong>\n </div>"):'<div class="apexcharts-tooltip-box apexcharts-tooltip-'.concat(e.config.chart.type,'">')+"<div>".concat(n[0],': <span class="value">')+a+"</span></div>"+"<div>".concat(n[1],': <span class="value">')+o+"</span></div>"+(s?"<div>".concat(n[2],': <span class="value">')+s+"</span></div>":"")+"<div>".concat(n[3],': <span class="value">')+l+"</span></div>"+"<div>".concat(n[4],': <span class="value">')+c+"</span></div></div>"}}]),e}(),j=function(){function e(t){o(this,e),this.opts=t}return l(e,[{key:"init",value:function(e){var t=e.responsiveOverride,i=this.opts,n=new P,r=new Y(i);this.chartType=i.chart.type,"histogram"===this.chartType&&(i.chart.type="bar",i=y.extend({plotOptions:{bar:{columnWidth:"99.99%"}}},i)),i=this.extendYAxis(i),i=this.extendAnnotations(i);var o=n.init(),s={};if(i&&"object"===a(i)){var l={};l=-1!==["line","area","bar","candlestick","boxPlot","rangeBar","histogram","bubble","scatter","heatmap","treemap","pie","polarArea","donut","radar","radialBar"].indexOf(i.chart.type)?r[i.chart.type]():r.line(),i.chart.brush&&i.chart.brush.enabled&&(l=r.brush(l)),i.chart.stacked&&"100%"===i.chart.stackType&&(i=r.stacked100(i)),this.checkForDarkTheme(window.Apex),this.checkForDarkTheme(i),i.xaxis=i.xaxis||window.Apex.xaxis||{},t||(i.xaxis.convertedCatToNumeric=!1),((i=this.checkForCatToNumericXAxis(this.chartType,l,i)).chart.sparkline&&i.chart.sparkline.enabled||window.Apex.chart&&window.Apex.chart.sparkline&&window.Apex.chart.sparkline.enabled)&&(l=r.sparkline(l)),s=y.extend(o,l)}var c=y.extend(s,window.Apex);return o=y.extend(c,i),this.handleUserInputErrors(o)}},{key:"checkForCatToNumericXAxis",value:function(e,t,i){var n=new Y(i),r="bar"===e&&i.plotOptions&&i.plotOptions.bar&&i.plotOptions.bar.horizontal,a="pie"===e||"polarArea"===e||"donut"===e||"radar"===e||"radialBar"===e||"heatmap"===e,o="datetime"!==i.xaxis.type&&"numeric"!==i.xaxis.type,s=i.xaxis.tickPlacement?i.xaxis.tickPlacement:t.xaxis&&t.xaxis.tickPlacement;return r||a||!o||"between"===s||(i=n.convertCatToNumeric(i)),i}},{key:"extendYAxis",value:function(e,t){var i=new P;(void 0===e.yaxis||!e.yaxis||Array.isArray(e.yaxis)&&0===e.yaxis.length)&&(e.yaxis={}),e.yaxis.constructor!==Array&&window.Apex.yaxis&&window.Apex.yaxis.constructor!==Array&&(e.yaxis=y.extend(e.yaxis,window.Apex.yaxis)),e.yaxis.constructor!==Array?e.yaxis=[y.extend(i.yAxis,e.yaxis)]:e.yaxis=y.extendArray(e.yaxis,i.yAxis);var n=!1;e.yaxis.forEach((function(e){e.logarithmic&&(n=!0)}));var r=e.series;return t&&!r&&(r=t.config.series),n&&r.length!==e.yaxis.length&&r.length&&(e.yaxis=r.map((function(t,n){if(t.name||(r[n].name="series-".concat(n+1)),e.yaxis[n])return e.yaxis[n].seriesName=r[n].name,e.yaxis[n];var a=y.extend(i.yAxis,e.yaxis[0]);return a.show=!1,a}))),n&&r.length>1&&r.length!==e.yaxis.length&&console.warn("A multi-series logarithmic chart should have equal number of series and y-axes. Please make sure to equalize both."),e}},{key:"extendAnnotations",value:function(e){return void 0===e.annotations&&(e.annotations={},e.annotations.yaxis=[],e.annotations.xaxis=[],e.annotations.points=[]),e=this.extendYAxisAnnotations(e),e=this.extendXAxisAnnotations(e),this.extendPointAnnotations(e)}},{key:"extendYAxisAnnotations",value:function(e){var t=new P;return e.annotations.yaxis=y.extendArray(void 0!==e.annotations.yaxis?e.annotations.yaxis:[],t.yAxisAnnotation),e}},{key:"extendXAxisAnnotations",value:function(e){var t=new P;return e.annotations.xaxis=y.extendArray(void 0!==e.annotations.xaxis?e.annotations.xaxis:[],t.xAxisAnnotation),e}},{key:"extendPointAnnotations",value:function(e){var t=new P;return e.annotations.points=y.extendArray(void 0!==e.annotations.points?e.annotations.points:[],t.pointAnnotation),e}},{key:"checkForDarkTheme",value:function(e){e.theme&&"dark"===e.theme.mode&&(e.tooltip||(e.tooltip={}),"light"!==e.tooltip.theme&&(e.tooltip.theme="dark"),e.chart.foreColor||(e.chart.foreColor="#f6f7f8"),e.chart.background||(e.chart.background="#424242"),e.theme.palette||(e.theme.palette="palette4"))}},{key:"handleUserInputErrors",value:function(e){var t=e;if(t.tooltip.shared&&t.tooltip.intersect)throw new Error("tooltip.shared cannot be enabled when tooltip.intersect is true. Turn off any other option by setting it to false.");if("bar"===t.chart.type&&t.plotOptions.bar.horizontal){if(t.yaxis.length>1)throw new Error("Multiple Y Axis for bars are not supported. Switch to column chart by setting plotOptions.bar.horizontal=false");t.yaxis[0].reversed&&(t.yaxis[0].opposite=!0),t.xaxis.tooltip.enabled=!1,t.yaxis[0].tooltip.enabled=!1,t.chart.zoom.enabled=!1}return"bar"!==t.chart.type&&"rangeBar"!==t.chart.type||t.tooltip.shared&&"barWidth"===t.xaxis.crosshairs.width&&t.series.length>1&&(console.warn('crosshairs.width = "barWidth" is only supported in single series, not in a multi-series barChart.'),t.xaxis.crosshairs.width="tickWidth"),"candlestick"!==t.chart.type&&"boxPlot"!==t.chart.type||t.yaxis[0].reversed&&(console.warn("Reversed y-axis in ".concat(t.chart.type," chart is not supported.")),t.yaxis[0].reversed=!1),t.chart.group&&0===t.yaxis[0].labels.minWidth&&console.warn("It looks like you have multiple charts in synchronization. You must provide yaxis.labels.minWidth which must be EQUAL for all grouped charts to prevent incorrect behaviour."),Array.isArray(t.stroke.width)&&"line"!==t.chart.type&&"area"!==t.chart.type&&(console.warn("stroke.width option accepts array only for line and area charts. Reverted back to Number"),t.stroke.width=t.stroke.width[0]),t}}]),e}(),$=function(){function e(){o(this,e)}return l(e,[{key:"initGlobalVars",value:function(e){e.series=[],e.seriesCandleO=[],e.seriesCandleH=[],e.seriesCandleM=[],e.seriesCandleL=[],e.seriesCandleC=[],e.seriesRangeStart=[],e.seriesRangeEnd=[],e.seriesRangeBarTimeline=[],e.seriesPercent=[],e.seriesGoals=[],e.seriesX=[],e.seriesZ=[],e.seriesNames=[],e.seriesTotals=[],e.seriesLog=[],e.seriesColors=[],e.stackedSeriesTotals=[],e.seriesXvalues=[],e.seriesYvalues=[],e.labels=[],e.categoryLabels=[],e.timescaleLabels=[],e.noLabelsProvided=!1,e.resizeTimer=null,e.selectionResizeTimer=null,e.delayedElements=[],e.pointsArray=[],e.dataLabelsRects=[],e.isXNumeric=!1,e.xaxisLabelsCount=0,e.skipLastTimelinelabel=!1,e.skipFirstTimelinelabel=!1,e.isDataXYZ=!1,e.isMultiLineX=!1,e.isMultipleYAxis=!1,e.maxY=-Number.MAX_VALUE,e.minY=Number.MIN_VALUE,e.minYArr=[],e.maxYArr=[],e.maxX=-Number.MAX_VALUE,e.minX=Number.MAX_VALUE,e.initialMaxX=-Number.MAX_VALUE,e.initialMinX=Number.MAX_VALUE,e.maxDate=0,e.minDate=Number.MAX_VALUE,e.minZ=Number.MAX_VALUE,e.maxZ=-Number.MAX_VALUE,e.minXDiff=Number.MAX_VALUE,e.yAxisScale=[],e.xAxisScale=null,e.xAxisTicksPositions=[],e.yLabelsCoords=[],e.yTitleCoords=[],e.barPadForNumericAxis=0,e.padHorizontal=0,e.xRange=0,e.yRange=[],e.zRange=0,e.dataPoints=0,e.xTickAmount=0}},{key:"globalVars",value:function(e){return{chartID:null,cuid:null,events:{beforeMount:[],mounted:[],updated:[],clicked:[],selection:[],dataPointSelection:[],zoomed:[],scrolled:[]},colors:[],clientX:null,clientY:null,fill:{colors:[]},stroke:{colors:[]},dataLabels:{style:{colors:[]}},radarPolygons:{fill:{colors:[]}},markers:{colors:[],size:e.markers.size,largestSize:0},animationEnded:!1,isTouchDevice:"ontouchstart"in window||navigator.msMaxTouchPoints,isDirty:!1,isExecCalled:!1,initialConfig:null,initialSeries:[],lastXAxis:[],lastYAxis:[],columnSeries:null,labels:[],timescaleLabels:[],noLabelsProvided:!1,allSeriesCollapsed:!1,collapsedSeries:[],collapsedSeriesIndices:[],ancillaryCollapsedSeries:[],ancillaryCollapsedSeriesIndices:[],risingSeries:[],dataFormatXNumeric:!1,capturedSeriesIndex:-1,capturedDataPointIndex:-1,selectedDataPoints:[],goldenPadding:35,invalidLogScale:!1,ignoreYAxisIndexes:[],yAxisSameScaleIndices:[],maxValsInArrayIndex:0,radialSize:0,selection:void 0,zoomEnabled:"zoom"===e.chart.toolbar.autoSelected&&e.chart.toolbar.tools.zoom&&e.chart.zoom.enabled,panEnabled:"pan"===e.chart.toolbar.autoSelected&&e.chart.toolbar.tools.pan,selectionEnabled:"selection"===e.chart.toolbar.autoSelected&&e.chart.toolbar.tools.selection,yaxis:null,mousedown:!1,lastClientPosition:{},visibleXRange:void 0,yValueDecimal:0,total:0,SVGNS:"http://www.w3.org/2000/svg",svgWidth:0,svgHeight:0,noData:!1,locale:{},dom:{},memory:{methodsToExec:[]},shouldAnimate:!0,skipLastTimelinelabel:!1,skipFirstTimelinelabel:!1,delayedElements:[],axisCharts:!0,isDataXYZ:!1,resized:!1,resizeTimer:null,comboCharts:!1,dataChanged:!1,previousPaths:[],allSeriesHasEqualX:!0,pointsArray:[],dataLabelsRects:[],lastDrawnDataLabelsIndexes:[],hasNullValues:!1,easing:null,zoomed:!1,gridWidth:0,gridHeight:0,rotateXLabels:!1,defaultLabels:!1,xLabelFormatter:void 0,yLabelFormatters:[],xaxisTooltipFormatter:void 0,ttKeyFormatter:void 0,ttVal:void 0,ttZFormatter:void 0,LINE_HEIGHT_RATIO:1.618,xAxisLabelsHeight:0,xAxisLabelsWidth:0,yAxisLabelsWidth:0,scaleX:1,scaleY:1,translateX:0,translateY:0,translateYAxisX:[],yAxisWidths:[],translateXAxisY:0,translateXAxisX:0,tooltip:null}}},{key:"init",value:function(e){var t=this.globalVars(e);return this.initGlobalVars(t),t.initialConfig=y.extend({},e),t.initialSeries=y.clone(e.series),t.lastXAxis=y.clone(t.initialConfig.xaxis),t.lastYAxis=y.clone(t.initialConfig.yaxis),t}}]),e}(),X=function(){function e(t){o(this,e),this.opts=t}return l(e,[{key:"init",value:function(){var e=new j(this.opts).init({responsiveOverride:!1});return{config:e,globals:(new $).init(e)}}}]),e}(),B=function(){function e(t){o(this,e),this.ctx=t,this.w=t.w,this.twoDSeries=[],this.threeDSeries=[],this.twoDSeriesX=[],this.seriesGoals=[],this.coreUtils=new S(this.ctx)}return l(e,[{key:"isMultiFormat",value:function(){return this.isFormatXY()||this.isFormat2DArray()}},{key:"isFormatXY",value:function(){var e=this.w.config.series.slice(),t=new z(this.ctx);if(this.activeSeriesIndex=t.getActiveConfigSeriesIndex(),void 0!==e[this.activeSeriesIndex].data&&e[this.activeSeriesIndex].data.length>0&&null!==e[this.activeSeriesIndex].data[0]&&void 0!==e[this.activeSeriesIndex].data[0].x&&null!==e[this.activeSeriesIndex].data[0])return!0}},{key:"isFormat2DArray",value:function(){var e=this.w.config.series.slice(),t=new z(this.ctx);if(this.activeSeriesIndex=t.getActiveConfigSeriesIndex(),void 0!==e[this.activeSeriesIndex].data&&e[this.activeSeriesIndex].data.length>0&&void 0!==e[this.activeSeriesIndex].data[0]&&null!==e[this.activeSeriesIndex].data[0]&&e[this.activeSeriesIndex].data[0].constructor===Array)return!0}},{key:"handleFormat2DArray",value:function(e,t){for(var i=this.w.config,n=this.w.globals,r="boxPlot"===i.chart.type||"boxPlot"===i.series[t].type,a=0;a<e[t].data.length;a++)if(void 0!==e[t].data[a][1]&&(Array.isArray(e[t].data[a][1])&&4===e[t].data[a][1].length&&!r?this.twoDSeries.push(y.parseNumber(e[t].data[a][1][3])):e[t].data[a].length>=5?this.twoDSeries.push(y.parseNumber(e[t].data[a][4])):this.twoDSeries.push(y.parseNumber(e[t].data[a][1])),n.dataFormatXNumeric=!0),"datetime"===i.xaxis.type){var o=new Date(e[t].data[a][0]);o=new Date(o).getTime(),this.twoDSeriesX.push(o)}else this.twoDSeriesX.push(e[t].data[a][0]);for(var s=0;s<e[t].data.length;s++)void 0!==e[t].data[s][2]&&(this.threeDSeries.push(e[t].data[s][2]),n.isDataXYZ=!0)}},{key:"handleFormatXY",value:function(e,t){var i=this.w.config,n=this.w.globals,r=new F(this.ctx),a=t;n.collapsedSeriesIndices.indexOf(t)>-1&&(a=this.activeSeriesIndex);for(var o=0;o<e[t].data.length;o++)void 0!==e[t].data[o].y&&(Array.isArray(e[t].data[o].y)?this.twoDSeries.push(y.parseNumber(e[t].data[o].y[e[t].data[o].y.length-1])):this.twoDSeries.push(y.parseNumber(e[t].data[o].y))),void 0!==e[t].data[o].goals&&Array.isArray(e[t].data[o].goals)?(void 0===this.seriesGoals[t]&&(this.seriesGoals[t]=[]),this.seriesGoals[t].push(e[t].data[o].goals)):(void 0===this.seriesGoals[t]&&(this.seriesGoals[t]=[]),this.seriesGoals[t].push(null));for(var s=0;s<e[a].data.length;s++){var l="string"==typeof e[a].data[s].x,c=Array.isArray(e[a].data[s].x),h=!c&&!!r.isValidDate(e[a].data[s].x.toString());if(l||h)if(l||i.xaxis.convertedCatToNumeric){var d=n.isBarHorizontal&&n.isRangeData;"datetime"!==i.xaxis.type||d?(this.fallbackToCategory=!0,this.twoDSeriesX.push(e[a].data[s].x)):this.twoDSeriesX.push(r.parseDate(e[a].data[s].x))}else"datetime"===i.xaxis.type?this.twoDSeriesX.push(r.parseDate(e[a].data[s].x.toString())):(n.dataFormatXNumeric=!0,n.isXNumeric=!0,this.twoDSeriesX.push(parseFloat(e[a].data[s].x)));else c?(this.fallbackToCategory=!0,this.twoDSeriesX.push(e[a].data[s].x)):(n.isXNumeric=!0,n.dataFormatXNumeric=!0,this.twoDSeriesX.push(e[a].data[s].x))}if(e[t].data[0]&&void 0!==e[t].data[0].z){for(var u=0;u<e[t].data.length;u++)this.threeDSeries.push(e[t].data[u].z);n.isDataXYZ=!0}}},{key:"handleRangeData",value:function(e,t){var i=this.w.config,n=this.w.globals,r={};return this.isFormat2DArray()?r=this.handleRangeDataFormat("array",e,t):this.isFormatXY()&&(r=this.handleRangeDataFormat("xy",e,t)),n.seriesRangeStart.push(r.start),n.seriesRangeEnd.push(r.end),"datetime"===i.xaxis.type&&n.seriesRangeBarTimeline.push(r.rangeUniques),n.seriesRangeBarTimeline.forEach((function(e,t){e&&e.forEach((function(e,t){e.y.forEach((function(t,i){for(var n=0;n<e.y.length;n++)if(i!==n){var r=t.y1,a=t.y2,o=e.y[n].y1;r<=e.y[n].y2&&o<=a&&(e.overlaps.indexOf(t.rangeName)<0&&e.overlaps.push(t.rangeName),e.overlaps.indexOf(e.y[n].rangeName)<0&&e.overlaps.push(e.y[n].rangeName))}}))}))})),r}},{key:"handleCandleStickBoxData",value:function(e,t){var i=this.w.globals,n={};return this.isFormat2DArray()?n=this.handleCandleStickBoxDataFormat("array",e,t):this.isFormatXY()&&(n=this.handleCandleStickBoxDataFormat("xy",e,t)),i.seriesCandleO[t]=n.o,i.seriesCandleH[t]=n.h,i.seriesCandleM[t]=n.m,i.seriesCandleL[t]=n.l,i.seriesCandleC[t]=n.c,n}},{key:"handleRangeDataFormat",value:function(e,t,i){var n=[],r=[],a=t[i].data.filter((function(e,t,i){return t===i.findIndex((function(t){return t.x===e.x}))})).map((function(e,t){return{x:e.x,overlaps:[],y:[]}})),o="Please provide [Start, End] values in valid format. Read more https://apexcharts.com/docs/series/#rangecharts",s=new z(this.ctx).getActiveConfigSeriesIndex();if("array"===e){if(2!==t[s].data[0][1].length)throw new Error(o);for(var l=0;l<t[i].data.length;l++)n.push(t[i].data[l][1][0]),r.push(t[i].data[l][1][1])}else if("xy"===e){if(2!==t[s].data[0].y.length)throw new Error(o);for(var c=function(e){var o=y.randomId(),s=t[i].data[e].x,l={y1:t[i].data[e].y[0],y2:t[i].data[e].y[1],rangeName:o};t[i].data[e].rangeName=o;var c=a.findIndex((function(e){return e.x===s}));a[c].y.push(l),n.push(l.y1),r.push(l.y2)},h=0;h<t[i].data.length;h++)c(h)}return{start:n,end:r,rangeUniques:a}}},{key:"handleCandleStickBoxDataFormat",value:function(e,t,i){var n=this.w,r="boxPlot"===n.config.chart.type||"boxPlot"===n.config.series[i].type,a=[],o=[],s=[],l=[],c=[];if("array"===e)if(r&&6===t[i].data[0].length||!r&&5===t[i].data[0].length)for(var h=0;h<t[i].data.length;h++)a.push(t[i].data[h][1]),o.push(t[i].data[h][2]),r?(s.push(t[i].data[h][3]),l.push(t[i].data[h][4]),c.push(t[i].data[h][5])):(l.push(t[i].data[h][3]),c.push(t[i].data[h][4]));else for(var d=0;d<t[i].data.length;d++)Array.isArray(t[i].data[d][1])&&(a.push(t[i].data[d][1][0]),o.push(t[i].data[d][1][1]),r?(s.push(t[i].data[d][1][2]),l.push(t[i].data[d][1][3]),c.push(t[i].data[d][1][4])):(l.push(t[i].data[d][1][2]),c.push(t[i].data[d][1][3])));else if("xy"===e)for(var u=0;u<t[i].data.length;u++)Array.isArray(t[i].data[u].y)&&(a.push(t[i].data[u].y[0]),o.push(t[i].data[u].y[1]),r?(s.push(t[i].data[u].y[2]),l.push(t[i].data[u].y[3]),c.push(t[i].data[u].y[4])):(l.push(t[i].data[u].y[2]),c.push(t[i].data[u].y[3])));return{o:a,h:o,m:s,l:l,c:c}}},{key:"parseDataAxisCharts",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.ctx,n=this.w.config,r=this.w.globals,a=new F(i),o=n.labels.length>0?n.labels.slice():n.xaxis.categories.slice();r.isTimelineBar="rangeBar"===n.chart.type&&"datetime"===n.xaxis.type;for(var s=function(){for(var e=0;e<o.length;e++)if("string"==typeof o[e]){if(!a.isValidDate(o[e]))throw new Error("You have provided invalid Date format. Please provide a valid JavaScript Date");t.twoDSeriesX.push(a.parseDate(o[e]))}else t.twoDSeriesX.push(o[e])},l=0;l<e.length;l++){if(this.twoDSeries=[],this.twoDSeriesX=[],this.threeDSeries=[],void 0===e[l].data)return void console.error("It is a possibility that you may have not included 'data' property in series.");if("rangeBar"!==n.chart.type&&"rangeArea"!==n.chart.type&&"rangeBar"!==e[l].type&&"rangeArea"!==e[l].type||(r.isRangeData=!0,this.handleRangeData(e,l)),this.isMultiFormat())this.isFormat2DArray()?this.handleFormat2DArray(e,l):this.isFormatXY()&&this.handleFormatXY(e,l),"candlestick"!==n.chart.type&&"candlestick"!==e[l].type&&"boxPlot"!==n.chart.type&&"boxPlot"!==e[l].type||this.handleCandleStickBoxData(e,l),r.series.push(this.twoDSeries),r.labels.push(this.twoDSeriesX),r.seriesX.push(this.twoDSeriesX),r.seriesGoals=this.seriesGoals,l!==this.activeSeriesIndex||this.fallbackToCategory||(r.isXNumeric=!0);else{"datetime"===n.xaxis.type?(r.isXNumeric=!0,s(),r.seriesX.push(this.twoDSeriesX)):"numeric"===n.xaxis.type&&(r.isXNumeric=!0,o.length>0&&(this.twoDSeriesX=o,r.seriesX.push(this.twoDSeriesX))),r.labels.push(this.twoDSeriesX);var c=e[l].data.map((function(e){return y.parseNumber(e)}));r.series.push(c)}r.seriesZ.push(this.threeDSeries),void 0!==e[l].name?r.seriesNames.push(e[l].name):r.seriesNames.push("series-"+parseInt(l+1,10)),void 0!==e[l].color?r.seriesColors.push(e[l].color):r.seriesColors.push(void 0)}return this.w}},{key:"parseDataNonAxisCharts",value:function(e){var t=this.w.globals,i=this.w.config;t.series=e.slice(),t.seriesNames=i.labels.slice();for(var n=0;n<t.series.length;n++)void 0===t.seriesNames[n]&&t.seriesNames.push("series-"+(n+1));return this.w}},{key:"handleExternalLabelsData",value:function(e){var t=this.w.config,i=this.w.globals;t.xaxis.categories.length>0?i.labels=t.xaxis.categories:t.labels.length>0?i.labels=t.labels.slice():this.fallbackToCategory?(i.labels=i.labels[0],i.seriesRangeBarTimeline.length&&(i.seriesRangeBarTimeline.map((function(e){e.forEach((function(e){i.labels.indexOf(e.x)<0&&e.x&&i.labels.push(e.x)}))})),i.labels=i.labels.filter((function(e,t,i){return i.indexOf(e)===t}))),t.xaxis.convertedCatToNumeric&&(new Y(t).convertCatToNumericXaxis(t,this.ctx,i.seriesX[0]),this._generateExternalLabels(e))):this._generateExternalLabels(e)}},{key:"_generateExternalLabels",value:function(e){var t=this.w.globals,i=this.w.config,n=[];if(t.axisCharts){if(t.series.length>0)for(var r=0;r<t.series[t.maxValsInArrayIndex].length;r++)n.push(r+1);t.seriesX=[];for(var a=0;a<e.length;a++)t.seriesX.push(n);t.isXNumeric=!0}if(0===n.length){n=t.axisCharts?[]:t.series.map((function(e,t){return t+1}));for(var o=0;o<e.length;o++)t.seriesX.push(n)}t.labels=n,i.xaxis.convertedCatToNumeric&&(t.categoryLabels=n.map((function(e){return i.xaxis.labels.formatter(e)}))),t.noLabelsProvided=!0}},{key:"parseData",value:function(e){var t=this.w,i=t.config,n=t.globals;if(this.excludeCollapsedSeriesInYAxis(),this.fallbackToCategory=!1,this.ctx.core.resetGlobals(),this.ctx.core.isMultipleY(),n.axisCharts?this.parseDataAxisCharts(e):this.parseDataNonAxisCharts(e),this.coreUtils.getLargestSeries(),"bar"===i.chart.type&&i.chart.stacked){var r=new z(this.ctx);n.series=r.setNullSeriesToZeroValues(n.series)}this.coreUtils.getSeriesTotals(),n.axisCharts&&this.coreUtils.getStackedSeriesTotals(),this.coreUtils.getPercentSeries(),n.dataFormatXNumeric||n.isXNumeric&&("numeric"!==i.xaxis.type||0!==i.labels.length||0!==i.xaxis.categories.length)||this.handleExternalLabelsData(e);for(var a=this.coreUtils.getCategoryLabels(n.labels),o=0;o<a.length;o++)if(Array.isArray(a[o])){n.isMultiLineX=!0;break}}},{key:"excludeCollapsedSeriesInYAxis",value:function(){var e=this,t=this.w;t.globals.ignoreYAxisIndexes=t.globals.collapsedSeries.map((function(i,n){if(e.w.globals.isMultipleYAxis&&!t.config.chart.stacked)return i.index}))}}]),e}(),W=function(){function e(t){o(this,e),this.ctx=t,this.w=t.w,this.tooltipKeyFormat="dd MMM"}return l(e,[{key:"xLabelFormat",value:function(e,t,i,n){var r=this.w;if("datetime"===r.config.xaxis.type&&void 0===r.config.xaxis.labels.formatter&&void 0===r.config.tooltip.x.formatter){var a=new F(this.ctx);return a.formatDate(a.getDate(t),r.config.tooltip.x.format)}return e(t,i,n)}},{key:"defaultGeneralFormatter",value:function(e){return Array.isArray(e)?e.map((function(e){return e})):e}},{key:"defaultYFormatter",value:function(e,t,i){var n=this.w;return y.isNumber(e)&&(e=0!==n.globals.yValueDecimal?e.toFixed(void 0!==t.decimalsInFloat?t.decimalsInFloat:n.globals.yValueDecimal):n.globals.maxYArr[i]-n.globals.minYArr[i]<5?e.toFixed(1):e.toFixed(0)),e}},{key:"setLabelFormatters",value:function(){var e=this,t=this.w;return t.globals.xaxisTooltipFormatter=function(t){return e.defaultGeneralFormatter(t)},t.globals.ttKeyFormatter=function(t){return e.defaultGeneralFormatter(t)},t.globals.ttZFormatter=function(e){return e},t.globals.legendFormatter=function(t){return e.defaultGeneralFormatter(t)},void 0!==t.config.xaxis.labels.formatter?t.globals.xLabelFormatter=t.config.xaxis.labels.formatter:t.globals.xLabelFormatter=function(e){if(y.isNumber(e)){if(!t.config.xaxis.convertedCatToNumeric&&"numeric"===t.config.xaxis.type){if(y.isNumber(t.config.xaxis.decimalsInFloat))return e.toFixed(t.config.xaxis.decimalsInFloat);var i=t.globals.maxX-t.globals.minX;return i>0&&i<100?e.toFixed(1):e.toFixed(0)}return t.globals.isBarHorizontal&&t.globals.maxY-t.globals.minYArr<4?e.toFixed(1):e.toFixed(0)}return e},"function"==typeof t.config.tooltip.x.formatter?t.globals.ttKeyFormatter=t.config.tooltip.x.formatter:t.globals.ttKeyFormatter=t.globals.xLabelFormatter,"function"==typeof t.config.xaxis.tooltip.formatter&&(t.globals.xaxisTooltipFormatter=t.config.xaxis.tooltip.formatter),(Array.isArray(t.config.tooltip.y)||void 0!==t.config.tooltip.y.formatter)&&(t.globals.ttVal=t.config.tooltip.y),void 0!==t.config.tooltip.z.formatter&&(t.globals.ttZFormatter=t.config.tooltip.z.formatter),void 0!==t.config.legend.formatter&&(t.globals.legendFormatter=t.config.legend.formatter),t.config.yaxis.forEach((function(i,n){void 0!==i.labels.formatter?t.globals.yLabelFormatters[n]=i.labels.formatter:t.globals.yLabelFormatters[n]=function(r){return t.globals.xyCharts?Array.isArray(r)?r.map((function(t){return e.defaultYFormatter(t,i,n)})):e.defaultYFormatter(r,i,n):r}})),t.globals}},{key:"heatmapLabelFormatters",value:function(){var e=this.w;if("heatmap"===e.config.chart.type){e.globals.yAxisScale[0].result=e.globals.seriesNames.slice();var t=e.globals.seriesNames.reduce((function(e,t){return e.length>t.length?e:t}),0);e.globals.yAxisScale[0].niceMax=t,e.globals.yAxisScale[0].niceMin=t}}}]),e}(),V=function(){function e(t){o(this,e),this.ctx=t,this.w=t.w}return l(e,[{key:"getLabel",value:function(e,t,i,n){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"12px",o=this.w,s=void 0===e[n]?"":e[n],l=s,c=o.globals.xLabelFormatter,h=o.config.xaxis.labels.formatter,d=!1,u=new W(this.ctx),p=s;l=u.xLabelFormat(c,s,p,{i:n,dateFormatter:new F(this.ctx).formatDate,w:o}),void 0!==h&&(l=h(s,e[n],{i:n,dateFormatter:new F(this.ctx).formatDate,w:o}));var f=function(e){var i=null;return t.forEach((function(e){"month"===e.unit?i="year":"day"===e.unit?i="month":"hour"===e.unit?i="day":"minute"===e.unit&&(i="hour")})),i===e};t.length>0?(d=f(t[n].unit),i=t[n].position,l=t[n].value):"datetime"===o.config.xaxis.type&&void 0===h&&(l=""),void 0===l&&(l=""),l=Array.isArray(l)?l:l.toString();var g=new w(this.ctx),m={};m=o.globals.rotateXLabels?g.getTextRects(l,parseInt(a,10),null,"rotate(".concat(o.config.xaxis.labels.rotate," 0 0)"),!1):g.getTextRects(l,parseInt(a,10));var v=!o.config.xaxis.labels.showDuplicates&&this.ctx.timeScale;return!Array.isArray(l)&&(0===l.indexOf("NaN")||0===l.toLowerCase().indexOf("invalid")||l.toLowerCase().indexOf("infinity")>=0||r.indexOf(l)>=0&&v)&&(l=""),{x:i,text:l,textRect:m,isBold:d}}},{key:"checkLabelBasedOnTickamount",value:function(e,t,i){var n=this.w,r=n.config.xaxis.tickAmount;return"dataPoints"===r&&(r=Math.round(n.globals.gridWidth/120)),r>i||e%Math.round(i/(r+1))==0||(t.text=""),t}},{key:"checkForOverflowingLabels",value:function(e,t,i,n,r){var a=this.w;if(0===e&&a.globals.skipFirstTimelinelabel&&(t.text=""),e===i-1&&a.globals.skipLastTimelinelabel&&(t.text=""),a.config.xaxis.labels.hideOverlappingLabels&&n.length>0){var o=r[r.length-1];t.x<o.textRect.width/(a.globals.rotateXLabels?Math.abs(a.config.xaxis.labels.rotate)/12:1.01)+o.x&&(t.text="")}return t}},{key:"checkForReversedLabels",value:function(e,t){var i=this.w;return i.config.yaxis[e]&&i.config.yaxis[e].reversed&&t.reverse(),t}},{key:"isYAxisHidden",value:function(e){var t=this.w,i=new S(this.ctx);return!t.config.yaxis[e].show||!t.config.yaxis[e].showForNullSeries&&i.isSeriesNull(e)&&-1===t.globals.collapsedSeriesIndices.indexOf(e)}},{key:"getYAxisForeColor",value:function(e,t){var i=this.w;return Array.isArray(e)&&i.globals.yAxisScale[t]&&this.ctx.theme.pushExtraColors(e,i.globals.yAxisScale[t].result.length,!1),e}},{key:"drawYAxisTicks",value:function(e,t,i,n,r,a,o){var s=this.w,l=new w(this.ctx),c=s.globals.translateY;if(n.show&&t>0){!0===s.config.yaxis[r].opposite&&(e+=n.width);for(var h=t;h>=0;h--){var d=c+t/10+s.config.yaxis[r].labels.offsetY-1;s.globals.isBarHorizontal&&(d=a*h),"heatmap"===s.config.chart.type&&(d+=a/2);var u=l.drawLine(e+i.offsetX-n.width+n.offsetX,d+n.offsetY,e+i.offsetX+n.offsetX,d+n.offsetY,n.color);o.add(u),c+=a}}}}]),e}(),G=function(){function e(t){o(this,e),c(this,"scaleSvgNode",(function(e,t){var i=parseFloat(e.getAttributeNS(null,"width")),n=parseFloat(e.getAttributeNS(null,"height"));e.setAttributeNS(null,"width",i*t),e.setAttributeNS(null,"height",n*t),e.setAttributeNS(null,"viewBox","0 0 "+i+" "+n)})),this.ctx=t,this.w=t.w}return l(e,[{key:"fixSvgStringForIe11",value:function(e){if(!y.isIE11())return e;var t=0,i=e.replace(/xmlns="http:\/\/www.w3.org\/2000\/svg"/g,(function(e){return 2==++t?'xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.com/svgjs"':e}));return(i=i.replace(/xmlns:NS\d+=""/g,"")).replace(/NS\d+:(\w+:\w+=")/g,"$1")}},{key:"getSvgString",value:function(e){var t=this.w.globals.dom.Paper.svg();if(1!==e){var i=this.w.globals.dom.Paper.node.cloneNode(!0);this.scaleSvgNode(i,e),t=(new XMLSerializer).serializeToString(i)}return this.fixSvgStringForIe11(t)}},{key:"cleanup",value:function(){var e=this.w,t=e.globals.dom.baseEl.getElementsByClassName("apexcharts-xcrosshairs"),i=e.globals.dom.baseEl.getElementsByClassName("apexcharts-ycrosshairs"),n=e.globals.dom.baseEl.querySelectorAll(".apexcharts-zoom-rect, .apexcharts-selection-rect");Array.prototype.forEach.call(n,(function(e){e.setAttribute("width",0)})),t&&t[0]&&(t[0].setAttribute("x",-500),t[0].setAttribute("x1",-500),t[0].setAttribute("x2",-500)),i&&i[0]&&(i[0].setAttribute("y",-100),i[0].setAttribute("y1",-100),i[0].setAttribute("y2",-100))}},{key:"svgUrl",value:function(){this.cleanup();var e=this.getSvgString(),t=new Blob([e],{type:"image/svg+xml;charset=utf-8"});return URL.createObjectURL(t)}},{key:"dataURI",value:function(e){var t=this;return new Promise((function(i){var n=t.w,r=e?e.scale||e.width/n.globals.svgWidth:1;t.cleanup();var a=document.createElement("canvas");a.width=n.globals.svgWidth*r,a.height=parseInt(n.globals.dom.elWrap.style.height,10)*r;var o="transparent"===n.config.chart.background?"#fff":n.config.chart.background,s=a.getContext("2d");s.fillStyle=o,s.fillRect(0,0,a.width*r,a.height*r);var l=t.getSvgString(r);if(window.canvg&&y.isIE11()){var c=window.canvg.Canvg.fromString(s,l,{ignoreClear:!0,ignoreDimensions:!0});c.start();var h=a.msToBlob();c.stop(),i({blob:h})}else{var d="data:image/svg+xml,"+encodeURIComponent(l),u=new Image;u.crossOrigin="anonymous",u.onload=function(){if(s.drawImage(u,0,0),a.msToBlob){var e=a.msToBlob();i({blob:e})}else{var t=a.toDataURL("image/png");i({imgURI:t})}},u.src=d}}))}},{key:"exportToSVG",value:function(){this.triggerDownload(this.svgUrl(),this.w.config.chart.toolbar.export.svg.filename,".svg")}},{key:"exportToPng",value:function(){var e=this;this.dataURI().then((function(t){var i=t.imgURI,n=t.blob;n?navigator.msSaveOrOpenBlob(n,e.w.globals.chartID+".png"):e.triggerDownload(i,e.w.config.chart.toolbar.export.png.filename,".png")}))}},{key:"exportToCSV",value:function(e){var t=this,i=e.series,n=e.columnDelimiter,r=e.lineDelimiter,a=void 0===r?"\n":r,o=this.w,s=[],l=[],c="data:text/csv;charset=utf-8,\ufeff",h=new B(this.ctx),d=new V(this.ctx),u=function(e){var i="";if(o.globals.axisCharts){if("category"===o.config.xaxis.type||o.config.xaxis.convertedCatToNumeric)if(o.globals.isBarHorizontal){var r=o.globals.yLabelFormatters[0],a=new z(t.ctx).getActiveConfigSeriesIndex();i=r(o.globals.labels[e],{seriesIndex:a,dataPointIndex:e,w:o})}else i=d.getLabel(o.globals.labels,o.globals.timescaleLabels,0,e).text;"datetime"===o.config.xaxis.type&&(o.config.xaxis.categories.length?i=o.config.xaxis.categories[e]:o.config.labels.length&&(i=o.config.labels[e]))}else i=o.config.labels[e];return Array.isArray(i)&&(i=i.join(" ")),y.isNumber(i)?i:i.split(n).join("")};s.push(o.config.chart.toolbar.export.csv.headerCategory),i.map((function(e,t){var i=e.name?e.name:"series-".concat(t);o.globals.axisCharts&&s.push(i.split(n).join("")?i.split(n).join(""):"series-".concat(t))})),o.globals.axisCharts||(s.push(o.config.chart.toolbar.export.csv.headerValue),l.push(s.join(n))),i.map((function(e,t){o.globals.axisCharts?function(e,t){if(s.length&&0===t&&l.push(s.join(n)),e.data&&e.data.length)for(var r=0;r<e.data.length;r++){s=[];var a=u(r);if(a||(h.isFormatXY()?a=i[t].data[r].x:h.isFormat2DArray()&&(a=i[t].data[r]?i[t].data[r][0]:"")),0===t){s.push((d=a,"datetime"===o.config.xaxis.type&&String(d).length>=10?o.config.chart.toolbar.export.csv.dateFormatter(a):y.isNumber(a)?a:a.split(n).join("")));for(var c=0;c<o.globals.series.length;c++)s.push(o.globals.series[c][r])}("candlestick"===o.config.chart.type||e.type&&"candlestick"===e.type)&&(s.pop(),s.push(o.globals.seriesCandleO[t][r]),s.push(o.globals.seriesCandleH[t][r]),s.push(o.globals.seriesCandleL[t][r]),s.push(o.globals.seriesCandleC[t][r])),("boxPlot"===o.config.chart.type||e.type&&"boxPlot"===e.type)&&(s.pop(),s.push(o.globals.seriesCandleO[t][r]),s.push(o.globals.seriesCandleH[t][r]),s.push(o.globals.seriesCandleM[t][r]),s.push(o.globals.seriesCandleL[t][r]),s.push(o.globals.seriesCandleC[t][r])),"rangeBar"===o.config.chart.type&&(s.pop(),s.push(o.globals.seriesRangeStart[t][r]),s.push(o.globals.seriesRangeEnd[t][r])),s.length&&l.push(s.join(n))}var d}(e,t):((s=[]).push(o.globals.labels[t].split(n).join("")),s.push(o.globals.series[t]),l.push(s.join(n)))})),c+=l.join(a),this.triggerDownload(encodeURI(c),o.config.chart.toolbar.export.csv.filename,".csv")}},{key:"triggerDownload",value:function(e,t,i){var n=document.createElement("a");n.href=e,n.download=(t||this.w.globals.chartID)+i,document.body.appendChild(n),n.click(),document.body.removeChild(n)}}]),e}(),U=function(){function e(t){o(this,e),this.ctx=t,this.w=t.w;var i=this.w;this.axesUtils=new V(t),this.xaxisLabels=i.globals.labels.slice(),i.globals.timescaleLabels.length>0&&!i.globals.isBarHorizontal&&(this.xaxisLabels=i.globals.timescaleLabels.slice()),i.config.xaxis.overwriteCategories&&(this.xaxisLabels=i.config.xaxis.overwriteCategories),this.drawnLabels=[],this.drawnLabelsRects=[],"top"===i.config.xaxis.position?this.offY=0:this.offY=i.globals.gridHeight+1,this.offY=this.offY+i.config.xaxis.axisBorder.offsetY,this.isCategoryBarHorizontal="bar"===i.config.chart.type&&i.config.plotOptions.bar.horizontal,this.xaxisFontSize=i.config.xaxis.labels.style.fontSize,this.xaxisFontFamily=i.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=i.config.xaxis.labels.style.colors,this.xaxisBorderWidth=i.config.xaxis.axisBorder.width,this.isCategoryBarHorizontal&&(this.xaxisBorderWidth=i.config.yaxis[0].axisBorder.width.toString()),this.xaxisBorderWidth.indexOf("%")>-1?this.xaxisBorderWidth=i.globals.gridWidth*parseInt(this.xaxisBorderWidth,10)/100:this.xaxisBorderWidth=parseInt(this.xaxisBorderWidth,10),this.xaxisBorderHeight=i.config.xaxis.axisBorder.height,this.yaxis=i.config.yaxis[0]}return l(e,[{key:"drawXaxis",value:function(){var e,t=this,i=this.w,n=new w(this.ctx),r=n.group({class:"apexcharts-xaxis",transform:"translate(".concat(i.config.xaxis.offsetX,", ").concat(i.config.xaxis.offsetY,")")}),a=n.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(i.globals.translateXAxisX,", ").concat(i.globals.translateXAxisY,")")});r.add(a);for(var o=i.globals.padHorizontal,s=[],l=0;l<this.xaxisLabels.length;l++)s.push(this.xaxisLabels[l]);var c=s.length;if(i.globals.isXNumeric){var h=c>1?c-1:c;e=i.globals.gridWidth/h,o=o+e/2+i.config.xaxis.labels.offsetX}else e=i.globals.gridWidth/s.length,o=o+e+i.config.xaxis.labels.offsetX;for(var d=function(r){var l=o-e/2+i.config.xaxis.labels.offsetX;0===r&&1===c&&e/2===o&&1===i.globals.dataPoints&&(l=i.globals.gridWidth/2);var h=t.axesUtils.getLabel(s,i.globals.timescaleLabels,l,r,t.drawnLabels,t.xaxisFontSize),d=28;if(i.globals.rotateXLabels&&(d=22),(h=void 0!==i.config.xaxis.tickAmount&&"dataPoints"!==i.config.xaxis.tickAmount&&"datetime"!==i.config.xaxis.type?t.axesUtils.checkLabelBasedOnTickamount(r,h,c):t.axesUtils.checkForOverflowingLabels(r,h,c,t.drawnLabels,t.drawnLabelsRects)).text&&i.globals.xaxisLabelsCount++,i.config.xaxis.labels.show){var u=n.drawText({x:h.x,y:t.offY+i.config.xaxis.labels.offsetY+d-("top"===i.config.xaxis.position?i.globals.xAxisHeight+i.config.xaxis.axisTicks.height-2:0),text:h.text,textAnchor:"middle",fontWeight:h.isBold?600:i.config.xaxis.labels.style.fontWeight,fontSize:t.xaxisFontSize,fontFamily:t.xaxisFontFamily,foreColor:Array.isArray(t.xaxisForeColors)?i.config.xaxis.convertedCatToNumeric?t.xaxisForeColors[i.globals.minX+r-1]:t.xaxisForeColors[r]:t.xaxisForeColors,isPlainText:!1,cssClass:"apexcharts-xaxis-label "+i.config.xaxis.labels.style.cssClass});a.add(u);var p=document.createElementNS(i.globals.SVGNS,"title");p.textContent=Array.isArray(h.text)?h.text.join(" "):h.text,u.node.appendChild(p),""!==h.text&&(t.drawnLabels.push(h.text),t.drawnLabelsRects.push(h))}o+=e},u=0;u<=c-1;u++)d(u);if(void 0!==i.config.xaxis.title.text){var p=n.group({class:"apexcharts-xaxis-title"}),f=n.drawText({x:i.globals.gridWidth/2+i.config.xaxis.title.offsetX,y:this.offY+parseFloat(this.xaxisFontSize)+i.globals.xAxisLabelsHeight+i.config.xaxis.title.offsetY,text:i.config.xaxis.title.text,textAnchor:"middle",fontSize:i.config.xaxis.title.style.fontSize,fontFamily:i.config.xaxis.title.style.fontFamily,fontWeight:i.config.xaxis.title.style.fontWeight,foreColor:i.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text "+i.config.xaxis.title.style.cssClass});p.add(f),r.add(p)}if(i.config.xaxis.axisBorder.show){var g=i.globals.barPadForNumericAxis,m=n.drawLine(i.globals.padHorizontal+i.config.xaxis.axisBorder.offsetX-g,this.offY,this.xaxisBorderWidth+g,this.offY,i.config.xaxis.axisBorder.color,0,this.xaxisBorderHeight);r.add(m)}return r}},{key:"drawXaxisInversed",value:function(e){var t,i,n=this,r=this.w,a=new w(this.ctx),o=r.config.yaxis[0].opposite?r.globals.translateYAxisX[e]:0,s=a.group({class:"apexcharts-yaxis apexcharts-xaxis-inversed",rel:e}),l=a.group({class:"apexcharts-yaxis-texts-g apexcharts-xaxis-inversed-texts-g",transform:"translate("+o+", 0)"});s.add(l);var c=[];if(r.config.yaxis[e].show)for(var h=0;h<this.xaxisLabels.length;h++)c.push(this.xaxisLabels[h]);t=r.globals.gridHeight/c.length,i=-t/2.2;var d=r.globals.yLabelFormatters[0],u=r.config.yaxis[0].labels;if(u.show)for(var p=function(o){var s=void 0===c[o]?"":c[o];s=d(s,{seriesIndex:e,dataPointIndex:o,w:r});var h=n.axesUtils.getYAxisForeColor(u.style.colors,e),p=0;Array.isArray(s)&&(p=s.length/2*parseInt(u.style.fontSize,10));var f=a.drawText({x:u.offsetX-15,y:i+t+u.offsetY-p,text:s,textAnchor:n.yaxis.opposite?"start":"end",foreColor:Array.isArray(h)?h[o]:h,fontSize:u.style.fontSize,fontFamily:u.style.fontFamily,fontWeight:u.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-yaxis-label "+u.style.cssClass});l.add(f);var g=document.createElementNS(r.globals.SVGNS,"title");if(g.textContent=Array.isArray(s)?s.join(" "):s,f.node.appendChild(g),0!==r.config.yaxis[e].labels.rotate){var m=a.rotateAroundCenter(f.node);f.node.setAttribute("transform","rotate(".concat(r.config.yaxis[e].labels.rotate," 0 ").concat(m.y,")"))}i+=t},f=0;f<=c.length-1;f++)p(f);if(void 0!==r.config.yaxis[0].title.text){var g=a.group({class:"apexcharts-yaxis-title apexcharts-xaxis-title-inversed",transform:"translate("+o+", 0)"}),m=a.drawText({x:0,y:r.globals.gridHeight/2,text:r.config.yaxis[0].title.text,textAnchor:"middle",foreColor:r.config.yaxis[0].title.style.color,fontSize:r.config.yaxis[0].title.style.fontSize,fontWeight:r.config.yaxis[0].title.style.fontWeight,fontFamily:r.config.yaxis[0].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text "+r.config.yaxis[0].title.style.cssClass});g.add(m),s.add(g)}var v=0;this.isCategoryBarHorizontal&&r.config.yaxis[0].opposite&&(v=r.globals.gridWidth);var y=r.config.xaxis.axisBorder;if(y.show){var b=a.drawLine(r.globals.padHorizontal+y.offsetX+v,1+y.offsetY,r.globals.padHorizontal+y.offsetX+v,r.globals.gridHeight+y.offsetY,y.color,0);s.add(b)}return r.config.yaxis[0].axisTicks.show&&this.axesUtils.drawYAxisTicks(v,c.length,r.config.yaxis[0].axisBorder,r.config.yaxis[0].axisTicks,0,t,s),s}},{key:"drawXaxisTicks",value:function(e,t){var i=this.w,n=e;if(!(e<0||e-2>i.globals.gridWidth)){var r=this.offY+i.config.xaxis.axisTicks.offsetY,a=r+i.config.xaxis.axisTicks.height;if("top"===i.config.xaxis.position&&(a=r-i.config.xaxis.axisTicks.height),i.config.xaxis.axisTicks.show){var o=new w(this.ctx).drawLine(e+i.config.xaxis.axisTicks.offsetX,r+i.config.xaxis.offsetY,n+i.config.xaxis.axisTicks.offsetX,a+i.config.xaxis.offsetY,i.config.xaxis.axisTicks.color);t.add(o),o.node.classList.add("apexcharts-xaxis-tick")}}}},{key:"getXAxisTicksPositions",value:function(){var e=this.w,t=[],i=this.xaxisLabels.length,n=e.globals.padHorizontal;if(e.globals.timescaleLabels.length>0)for(var r=0;r<i;r++)n=this.xaxisLabels[r].position,t.push(n);else for(var a=i,o=0;o<a;o++){var s=a;e.globals.isXNumeric&&"bar"!==e.config.chart.type&&(s-=1),n+=e.globals.gridWidth/s,t.push(n)}return t}},{key:"xAxisLabelCorrections",value:function(){var e=this.w,t=new w(this.ctx),i=e.globals.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g"),n=e.globals.dom.baseEl.querySelectorAll(".apexcharts-xaxis-texts-g text"),r=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis-inversed text"),a=e.globals.dom.baseEl.querySelectorAll(".apexcharts-xaxis-inversed-texts-g text tspan");if(e.globals.rotateXLabels||e.config.xaxis.labels.rotateAlways)for(var o=0;o<n.length;o++){var s=t.rotateAroundCenter(n[o]);s.y=s.y-1,s.x=s.x+1,n[o].setAttribute("transform","rotate(".concat(e.config.xaxis.labels.rotate," ").concat(s.x," ").concat(s.y,")")),n[o].setAttribute("text-anchor","end"),i.setAttribute("transform","translate(0, ".concat(-10,")"));var l=n[o].childNodes;e.config.xaxis.labels.trim&&Array.prototype.forEach.call(l,(function(i){t.placeTextWithEllipsis(i,i.textContent,e.globals.xAxisLabelsHeight-("bottom"===e.config.legend.position?20:10))}))}else!function(){for(var i=e.globals.gridWidth/(e.globals.labels.length+1),r=0;r<n.length;r++){var a=n[r].childNodes;e.config.xaxis.labels.trim&&"datetime"!==e.config.xaxis.type&&Array.prototype.forEach.call(a,(function(e){t.placeTextWithEllipsis(e,e.textContent,i)}))}}();if(r.length>0){var c=r[r.length-1].getBBox(),h=r[0].getBBox();c.x<-20&&r[r.length-1].parentNode.removeChild(r[r.length-1]),h.x+h.width>e.globals.gridWidth&&!e.globals.isBarHorizontal&&r[0].parentNode.removeChild(r[0]);for(var d=0;d<a.length;d++)t.placeTextWithEllipsis(a[d],a[d].textContent,e.config.yaxis[0].labels.maxWidth-2*parseFloat(e.config.yaxis[0].title.style.fontSize)-20)}}}]),e}(),q=function(){function e(t){o(this,e),this.ctx=t,this.w=t.w;var i=this.w;this.xaxisLabels=i.globals.labels.slice(),this.axesUtils=new V(t),this.isTimelineBar="datetime"===i.config.xaxis.type&&i.globals.seriesRangeBarTimeline.length,i.globals.timescaleLabels.length>0&&(this.xaxisLabels=i.globals.timescaleLabels.slice())}return l(e,[{key:"drawGridArea",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=this.w,i=new w(this.ctx);null===e&&(e=i.group({class:"apexcharts-grid"}));var n=i.drawLine(t.globals.padHorizontal,1,t.globals.padHorizontal,t.globals.gridHeight,"transparent"),r=i.drawLine(t.globals.padHorizontal,t.globals.gridHeight,t.globals.gridWidth,t.globals.gridHeight,"transparent");return e.add(r),e.add(n),e}},{key:"drawGrid",value:function(){var e=null;return this.w.globals.axisCharts&&(e=this.renderGrid(),this.drawGridArea(e.el)),e}},{key:"createGridMask",value:function(){var e=this.w,t=e.globals,i=new w(this.ctx),n=Array.isArray(e.config.stroke.width)?0:e.config.stroke.width;if(Array.isArray(e.config.stroke.width)){var r=0;e.config.stroke.width.forEach((function(e){r=Math.max(r,e)})),n=r}t.dom.elGridRectMask=document.createElementNS(t.SVGNS,"clipPath"),t.dom.elGridRectMask.setAttribute("id","gridRectMask".concat(t.cuid)),t.dom.elGridRectMarkerMask=document.createElementNS(t.SVGNS,"clipPath"),t.dom.elGridRectMarkerMask.setAttribute("id","gridRectMarkerMask".concat(t.cuid));var a=e.config.chart.type,o=0,s=0;("bar"===a||"rangeBar"===a||"candlestick"===a||"boxPlot"===a||e.globals.comboBarCount>0)&&e.globals.isXNumeric&&!e.globals.isBarHorizontal&&(o=e.config.grid.padding.left,s=e.config.grid.padding.right,t.barPadForNumericAxis>o&&(o=t.barPadForNumericAxis,s=t.barPadForNumericAxis)),t.dom.elGridRect=i.drawRect(-n/2-o-2,-n/2,t.gridWidth+n+s+o+4,t.gridHeight+n,0,"#fff"),new S(this).getLargestMarkerSize();var l=e.globals.markers.largestSize+1;t.dom.elGridRectMarker=i.drawRect(2*-l,2*-l,t.gridWidth+4*l,t.gridHeight+4*l,0,"#fff"),t.dom.elGridRectMask.appendChild(t.dom.elGridRect.node),t.dom.elGridRectMarkerMask.appendChild(t.dom.elGridRectMarker.node);var c=t.dom.baseEl.querySelector("defs");c.appendChild(t.dom.elGridRectMask),c.appendChild(t.dom.elGridRectMarkerMask)}},{key:"_drawGridLines",value:function(e){var t=e.i,i=e.x1,n=e.y1,r=e.x2,a=e.y2,o=e.xCount,s=e.parent,l=this.w;0===t&&l.globals.skipFirstTimelinelabel||t===o-1&&l.globals.skipLastTimelinelabel&&!l.config.xaxis.labels.formatter||"radar"===l.config.chart.type||(l.config.grid.xaxis.lines.show&&this._drawGridLine({x1:i,y1:n,x2:r,y2:a,parent:s}),new U(this.ctx).drawXaxisTicks(i,this.elg))}},{key:"_drawGridLine",value:function(e){var t=e.x1,i=e.y1,n=e.x2,r=e.y2,a=e.parent,o=this.w,s=a.node.classList.contains("apexcharts-gridlines-horizontal"),l=o.config.grid.strokeDashArray,c=o.globals.barPadForNumericAxis,h=new w(this).drawLine(t-(s?c:0),i,n+(s?c:0),r,o.config.grid.borderColor,l);h.node.classList.add("apexcharts-gridline"),a.add(h)}},{key:"_drawGridBandRect",value:function(e){var t=e.c,i=e.x1,n=e.y1,r=e.x2,a=e.y2,o=e.type,s=this.w,l=new w(this.ctx),c=s.globals.barPadForNumericAxis;if("column"!==o||"datetime"!==s.config.xaxis.type){var h=s.config.grid[o].colors[t],d=l.drawRect(i-("row"===o?c:0),n,r+("row"===o?2*c:0),a,0,h,s.config.grid[o].opacity);this.elg.add(d),d.attr("clip-path","url(#gridRectMask".concat(s.globals.cuid,")")),d.node.classList.add("apexcharts-grid-".concat(o))}}},{key:"_drawXYLines",value:function(e){var t=this,i=e.xCount,n=e.tickAmount,r=this.w;if(r.config.grid.xaxis.lines.show||r.config.xaxis.axisTicks.show){var a,o=r.globals.padHorizontal,s=r.globals.gridHeight;r.globals.timescaleLabels.length?function(e){for(var n=e.xC,r=e.x1,a=e.y1,o=e.x2,s=e.y2,l=0;l<n;l++)r=t.xaxisLabels[l].position,o=t.xaxisLabels[l].position,t._drawGridLines({i:l,x1:r,y1:a,x2:o,y2:s,xCount:i,parent:t.elgridLinesV})}({xC:i,x1:o,y1:0,x2:a,y2:s}):(r.globals.isXNumeric&&(i=r.globals.xAxisScale.result.length),r.config.xaxis.convertedCatToNumeric&&(i=r.globals.xaxisLabelsCount),function(e){var n=e.xC,a=e.x1,o=e.y1,s=e.x2,l=e.y2;if(void 0!==r.config.xaxis.tickAmount&&"dataPoints"!==r.config.xaxis.tickAmount)r.globals.dom.baseEl.querySelectorAll(".apexcharts-text.apexcharts-xaxis-label tspan:not(:empty)").forEach((function(e,n){var r=e.getBBox();t._drawGridLines({i:n,x1:r.x+r.width/2,y1:o,x2:r.x+r.width/2,y2:l,xCount:i,parent:t.elgridLinesV})}));else for(var c=0;c<n+(r.globals.isXNumeric?0:1);c++)0===c&&1===n&&1===r.globals.dataPoints&&(s=a=r.globals.gridWidth/2),t._drawGridLines({i:c,x1:a,y1:o,x2:s,y2:l,xCount:i,parent:t.elgridLinesV}),s=a+=r.globals.gridWidth/(r.globals.isXNumeric?n-1:n)}({xC:i,x1:o,y1:0,x2:a,y2:s}))}if(r.config.grid.yaxis.lines.show){var l=0,c=0,h=r.globals.gridWidth,d=n+1;this.isTimelineBar&&(d=r.globals.labels.length);for(var u=0;u<d+(this.isTimelineBar?1:0);u++)this._drawGridLine({x1:0,y1:l,x2:h,y2:c,parent:this.elgridLinesH}),c=l+=r.globals.gridHeight/(this.isTimelineBar?d:n)}}},{key:"_drawInvertedXYLines",value:function(e){var t=e.xCount,i=this.w;if(i.config.grid.xaxis.lines.show||i.config.xaxis.axisTicks.show)for(var n,r=i.globals.padHorizontal,a=i.globals.gridHeight,o=0;o<t+1;o++)i.config.grid.xaxis.lines.show&&this._drawGridLine({x1:r,y1:0,x2:n,y2:a,parent:this.elgridLinesV}),new U(this.ctx).drawXaxisTicks(r,this.elg),n=r=r+i.globals.gridWidth/t+.3;if(i.config.grid.yaxis.lines.show)for(var s=0,l=0,c=i.globals.gridWidth,h=0;h<i.globals.dataPoints+1;h++)this._drawGridLine({x1:0,y1:s,x2:c,y2:l,parent:this.elgridLinesH}),l=s+=i.globals.gridHeight/i.globals.dataPoints}},{key:"renderGrid",value:function(){var e=this.w,t=new w(this.ctx);this.elg=t.group({class:"apexcharts-grid"}),this.elgridLinesH=t.group({class:"apexcharts-gridlines-horizontal"}),this.elgridLinesV=t.group({class:"apexcharts-gridlines-vertical"}),this.elg.add(this.elgridLinesH),this.elg.add(this.elgridLinesV),e.config.grid.show||(this.elgridLinesV.hide(),this.elgridLinesH.hide());for(var i,n=e.globals.yAxisScale.length?e.globals.yAxisScale[0].result.length-1:5,r=0;r<e.globals.series.length&&(void 0!==e.globals.yAxisScale[r]&&(n=e.globals.yAxisScale[r].result.length-1),!(n>2));r++);return!e.globals.isBarHorizontal||this.isTimelineBar?(i=this.xaxisLabels.length,this.isTimelineBar&&(n=e.globals.labels.length,e.config.xaxis.tickAmount&&e.config.xaxis.labels.formatter&&(i=e.config.xaxis.tickAmount)),this._drawXYLines({xCount:i,tickAmount:n})):(i=n,n=e.globals.xTickAmount,this._drawInvertedXYLines({xCount:i,tickAmount:n})),this.drawGridBands(i,n),{el:this.elg,xAxisTickWidth:e.globals.gridWidth/i}}},{key:"drawGridBands",value:function(e,t){var i=this.w;if(void 0!==i.config.grid.row.colors&&i.config.grid.row.colors.length>0)for(var n=0,r=i.globals.gridHeight/t,a=i.globals.gridWidth,o=0,s=0;o<t;o++,s++)s>=i.config.grid.row.colors.length&&(s=0),this._drawGridBandRect({c:s,x1:0,y1:n,x2:a,y2:r,type:"row"}),n+=i.globals.gridHeight/t;if(void 0!==i.config.grid.column.colors&&i.config.grid.column.colors.length>0)for(var l=i.globals.isBarHorizontal||"category"!==i.config.xaxis.type&&!i.config.xaxis.convertedCatToNumeric?e:e-1,c=i.globals.padHorizontal,h=i.globals.padHorizontal+i.globals.gridWidth/l,d=i.globals.gridHeight,u=0,p=0;u<e;u++,p++)p>=i.config.grid.column.colors.length&&(p=0),this._drawGridBandRect({c:p,x1:c,y1:0,x2:h,y2:d,type:"column"}),c+=i.globals.gridWidth/l}}]),e}(),Z=function(){function e(t){o(this,e),this.ctx=t,this.w=t.w}return l(e,[{key:"niceScale",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=arguments.length>4?arguments[4]:void 0,a=this.w,o=Math.abs(t-e);if("dataPoints"===(i=this._adjustTicksForSmallRange(i,n,o))&&(i=a.globals.dataPoints-1),e===Number.MIN_VALUE&&0===t||!y.isNumber(e)&&!y.isNumber(t)||e===Number.MIN_VALUE&&t===-Number.MAX_VALUE){e=0,t=i;var s=this.linearScale(e,t,i);return s}e>t?(console.warn("axis.min cannot be greater than axis.max"),t=e+.1):e===t&&(e=0===e?0:e-.5,t=0===t?2:t+.5);var l=[];o<1&&r&&("candlestick"===a.config.chart.type||"candlestick"===a.config.series[n].type||"boxPlot"===a.config.chart.type||"boxPlot"===a.config.series[n].type||a.globals.isRangeData)&&(t*=1.01);var c=i+1;c<2?c=2:c>2&&(c-=2);var h=o/c,d=Math.floor(y.log10(h)),u=Math.pow(10,d),p=Math.round(h/u);p<1&&(p=1);var f=p*u,g=f*Math.floor(e/f),m=f*Math.ceil(t/f),v=g;if(r&&o>2){for(;l.push(v),!((v+=f)>m););return{result:l,niceMin:l[0],niceMax:l[l.length-1]}}var b=e;(l=[]).push(b);for(var x=Math.abs(t-e)/i,w=0;w<=i;w++)b+=x,l.push(b);return l[l.length-2]>=t&&l.pop(),{result:l,niceMin:l[0],niceMax:l[l.length-1]}}},{key:"linearScale",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,n=arguments.length>3?arguments[3]:void 0,r=Math.abs(t-e);"dataPoints"===(i=this._adjustTicksForSmallRange(i,n,r))&&(i=this.w.globals.dataPoints-1);var a=r/i;i===Number.MAX_VALUE&&(i=10,a=1);for(var o=[],s=e;i>=0;)o.push(s),s+=a,i-=1;return{result:o,niceMin:o[0],niceMax:o[o.length-1]}}},{key:"logarithmicScale",value:function(e){for(var t=[],i=Math.ceil(Math.log10(e))+1,n=0;n<i;n++)t.push(Math.pow(10,n));return{result:t,niceMin:t[0],niceMax:t[t.length-1]}}},{key:"_adjustTicksForSmallRange",value:function(e,t,i){var n=e;if(void 0!==t&&this.w.config.yaxis[t].labels.formatter&&void 0===this.w.config.yaxis[t].tickAmount){var r=this.w.config.yaxis[t].labels.formatter(1);y.isNumber(Number(r))&&!y.isFloat(r)&&(n=Math.ceil(i))}return n<e?n:e}},{key:"setYScaleForIndex",value:function(e,t,i){var n=this.w.globals,r=this.w.config,a=n.isBarHorizontal?r.xaxis:r.yaxis[e];void 0===n.yAxisScale[e]&&(n.yAxisScale[e]=[]);var o=Math.abs(i-t);if(a.logarithmic&&o<=5&&(n.invalidLogScale=!0),a.logarithmic&&o>5)n.allSeriesCollapsed=!1,n.yAxisScale[e]=this.logarithmicScale(i);else if(i!==-Number.MAX_VALUE&&y.isNumber(i))if(n.allSeriesCollapsed=!1,void 0===a.min&&void 0===a.max||a.forceNiceScale){var s=void 0===r.yaxis[e].max&&void 0===r.yaxis[e].min||r.yaxis[e].forceNiceScale;n.yAxisScale[e]=this.niceScale(t,i,a.tickAmount?a.tickAmount:o<5&&o>1?o+1:5,e,s)}else n.yAxisScale[e]=this.linearScale(t,i,a.tickAmount,e);else n.yAxisScale[e]=this.linearScale(0,5,5)}},{key:"setXScale",value:function(e,t){var i=this.w,n=i.globals,r=i.config.xaxis,a=Math.abs(t-e);return t!==-Number.MAX_VALUE&&y.isNumber(t)?n.xAxisScale=this.linearScale(e,t,r.tickAmount?r.tickAmount:a<5&&a>1?a+1:5,0):n.xAxisScale=this.linearScale(0,5,5),n.xAxisScale}},{key:"setMultipleYScales",value:function(){var e=this,t=this.w.globals,i=this.w.config,n=t.minYArr.concat([]),r=t.maxYArr.concat([]),a=[];i.yaxis.forEach((function(t,o){var s=o;i.series.forEach((function(e,i){e.name===t.seriesName&&(s=i,o!==i?a.push({index:i,similarIndex:o,alreadyExists:!0}):a.push({index:i}))}));var l=n[s],c=r[s];e.setYScaleForIndex(o,l,c)})),this.sameScaleInMultipleAxes(n,r,a)}},{key:"sameScaleInMultipleAxes",value:function(e,t,i){var n=this,r=this.w.config,a=this.w.globals,o=[];i.forEach((function(e){e.alreadyExists&&(void 0===o[e.index]&&(o[e.index]=[]),o[e.index].push(e.index),o[e.index].push(e.similarIndex))})),a.yAxisSameScaleIndices=o,o.forEach((function(e,t){o.forEach((function(i,n){var r,a;t!==n&&(r=e,a=i,r.filter((function(e){return-1!==a.indexOf(e)}))).length>0&&(o[t]=o[t].concat(o[n]))}))}));var s=o.map((function(e){return e.filter((function(t,i){return e.indexOf(t)===i}))})).map((function(e){return e.sort()}));o=o.filter((function(e){return!!e}));var l=s.slice(),c=l.map((function(e){return JSON.stringify(e)}));l=l.filter((function(e,t){return c.indexOf(JSON.stringify(e))===t}));var h=[],d=[];e.forEach((function(e,i){l.forEach((function(n,r){n.indexOf(i)>-1&&(void 0===h[r]&&(h[r]=[],d[r]=[]),h[r].push({key:i,value:e}),d[r].push({key:i,value:t[i]}))}))}));var u=Array.apply(null,Array(l.length)).map(Number.prototype.valueOf,Number.MIN_VALUE),p=Array.apply(null,Array(l.length)).map(Number.prototype.valueOf,-Number.MAX_VALUE);h.forEach((function(e,t){e.forEach((function(e,i){u[t]=Math.min(e.value,u[t])}))})),d.forEach((function(e,t){e.forEach((function(e,i){p[t]=Math.max(e.value,p[t])}))})),e.forEach((function(e,t){d.forEach((function(e,i){var o=u[i],s=p[i];r.chart.stacked&&(s=0,e.forEach((function(e,t){e.value!==-Number.MAX_VALUE&&(s+=e.value),o!==Number.MIN_VALUE&&(o+=h[i][t].value)}))),e.forEach((function(i,l){e[l].key===t&&(void 0!==r.yaxis[t].min&&(o="function"==typeof r.yaxis[t].min?r.yaxis[t].min(a.minY):r.yaxis[t].min),void 0!==r.yaxis[t].max&&(s="function"==typeof r.yaxis[t].max?r.yaxis[t].max(a.maxY):r.yaxis[t].max),n.setYScaleForIndex(t,o,s))}))}))}))}},{key:"autoScaleY",value:function(e,t,i){e||(e=this);var n=e.w;if(n.globals.isMultipleYAxis||n.globals.collapsedSeries.length)return console.warn("autoScaleYaxis is not supported in a multi-yaxis chart."),t;var r=n.globals.seriesX[0],a=n.config.chart.stacked;return t.forEach((function(e,o){for(var s=0,l=0;l<r.length;l++)if(r[l]>=i.xaxis.min){s=l;break}var c,h,d=n.globals.minYArr[o],u=n.globals.maxYArr[o],p=n.globals.stackedSeriesTotals;n.globals.series.forEach((function(o,l){var f=o[s];a?(f=p[s],c=h=f,p.forEach((function(e,t){r[t]<=i.xaxis.max&&r[t]>=i.xaxis.min&&(e>h&&null!==e&&(h=e),o[t]<c&&null!==o[t]&&(c=o[t]))}))):(c=h=f,o.forEach((function(e,t){if(r[t]<=i.xaxis.max&&r[t]>=i.xaxis.min){var a=e,o=e;n.globals.series.forEach((function(i,n){null!==e&&(a=Math.min(i[t],a),o=Math.max(i[t],o))})),o>h&&null!==o&&(h=o),a<c&&null!==a&&(c=a)}}))),void 0===c&&void 0===h&&(c=d,h=u),(h*=h<0?.9:1.1)<0&&h<u&&(h=u),(c*=c<0?1.1:.9)<0&&c>d&&(c=d),t.length>1?(t[l].min=void 0===e.min?c:e.min,t[l].max=void 0===e.max?h:e.max):(t[0].min=void 0===e.min?c:e.min,t[0].max=void 0===e.max?h:e.max)}))})),t}}]),e}(),J=function(){function e(t){o(this,e),this.ctx=t,this.w=t.w,this.scales=new Z(t)}return l(e,[{key:"init",value:function(){this.setYRange(),this.setXRange(),this.setZRange()}},{key:"getMinYMaxY",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-Number.MAX_VALUE,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,r=this.w.config,a=this.w.globals,o=-Number.MAX_VALUE,s=Number.MIN_VALUE;null===n&&(n=e+1);var l=a.series,c=l,h=l;"candlestick"===r.chart.type?(c=a.seriesCandleL,h=a.seriesCandleH):"boxPlot"===r.chart.type?(c=a.seriesCandleO,h=a.seriesCandleC):a.isRangeData&&(c=a.seriesRangeStart,h=a.seriesRangeEnd);for(var d=e;d<n;d++){a.dataPoints=Math.max(a.dataPoints,l[d].length);for(var u=0;u<a.series[d].length;u++){var p=l[d][u];null!==p&&y.isNumber(p)?(void 0!==h[d][u]&&(o=Math.max(o,h[d][u])),void 0!==c[d][u]&&(t=Math.min(t,c[d][u]),i=Math.max(i,c[d][u])),"candlestick"!==this.w.config.chart.type&&"boxPlot"!==this.w.config.chart.type||(void 0!==a.seriesCandleC[d][u]&&(o=Math.max(o,a.seriesCandleO[d][u]),o=Math.max(o,a.seriesCandleH[d][u]),o=Math.max(o,a.seriesCandleL[d][u]),o=Math.max(o,a.seriesCandleC[d][u]),"boxPlot"===this.w.config.chart.type&&(o=Math.max(o,a.seriesCandleM[d][u]))),!r.series[d].type||"candlestick"===r.series[d].type&&"boxPlot"===r.series[d].type||(o=Math.max(o,a.series[d][u]),t=Math.min(t,a.series[d][u])),i=o),a.seriesGoals[d]&&a.seriesGoals[d][u]&&Array.isArray(a.seriesGoals[d][u])&&a.seriesGoals[d][u].forEach((function(e){o=Math.max(o,e.value),i=o})),y.isFloat(p)&&(p=y.noExponents(p),a.yValueDecimal=Math.max(a.yValueDecimal,p.toString().split(".")[1].length)),s>c[d][u]&&c[d][u]<0&&(s=c[d][u])):a.hasNullValues=!0}}return"rangeBar"===r.chart.type&&a.seriesRangeStart.length&&a.isBarHorizontal&&"datetime"===r.xaxis.type&&(s=t),"bar"===r.chart.type&&(s<0&&o<0&&(o=0),s===Number.MIN_VALUE&&(s=0)),{minY:s,maxY:o,lowestY:t,highestY:i}}},{key:"setYRange",value:function(){var e=this.w.globals,t=this.w.config;e.maxY=-Number.MAX_VALUE,e.minY=Number.MIN_VALUE;var i=Number.MAX_VALUE;if(e.isMultipleYAxis)for(var n=0;n<e.series.length;n++){var r=this.getMinYMaxY(n,i,null,n+1);e.minYArr.push(r.minY),e.maxYArr.push(r.maxY),i=r.lowestY}var a=this.getMinYMaxY(0,i,null,e.series.length);if(e.minY=a.minY,e.maxY=a.maxY,i=a.lowestY,t.chart.stacked&&this._setStackedMinMax(),("line"===t.chart.type||"area"===t.chart.type||"candlestick"===t.chart.type||"boxPlot"===t.chart.type||"rangeBar"===t.chart.type&&!e.isBarHorizontal)&&e.minY===Number.MIN_VALUE&&i!==-Number.MAX_VALUE&&i!==e.maxY){var o=e.maxY-i;(i>=0&&i<=10||void 0!==t.yaxis[0].min||void 0!==t.yaxis[0].max)&&(o=0),e.minY=i-5*o/100,i>0&&e.minY<0&&(e.minY=0),e.maxY=e.maxY+5*o/100}return t.yaxis.forEach((function(t,i){void 0!==t.max&&("number"==typeof t.max?e.maxYArr[i]=t.max:"function"==typeof t.max&&(e.maxYArr[i]=t.max(e.isMultipleYAxis?e.maxYArr[i]:e.maxY)),e.maxY=e.maxYArr[i]),void 0!==t.min&&("number"==typeof t.min?e.minYArr[i]=t.min:"function"==typeof t.min&&(e.minYArr[i]=t.min(e.isMultipleYAxis?e.minYArr[i]===Number.MIN_VALUE?0:e.minYArr[i]:e.minY)),e.minY=e.minYArr[i])})),e.isBarHorizontal&&["min","max"].forEach((function(i){void 0!==t.xaxis[i]&&"number"==typeof t.xaxis[i]&&("min"===i?e.minY=t.xaxis[i]:e.maxY=t.xaxis[i])})),e.isMultipleYAxis?(this.scales.setMultipleYScales(),e.minY=i,e.yAxisScale.forEach((function(t,i){e.minYArr[i]=t.niceMin,e.maxYArr[i]=t.niceMax}))):(this.scales.setYScaleForIndex(0,e.minY,e.maxY),e.minY=e.yAxisScale[0].niceMin,e.maxY=e.yAxisScale[0].niceMax,e.minYArr[0]=e.yAxisScale[0].niceMin,e.maxYArr[0]=e.yAxisScale[0].niceMax),{minY:e.minY,maxY:e.maxY,minYArr:e.minYArr,maxYArr:e.maxYArr,yAxisScale:e.yAxisScale}}},{key:"setXRange",value:function(){var e=this.w.globals,t=this.w.config,i="numeric"===t.xaxis.type||"datetime"===t.xaxis.type||"category"===t.xaxis.type&&!e.noLabelsProvided||e.noLabelsProvided||e.isXNumeric;if(e.isXNumeric&&function(){for(var t=0;t<e.series.length;t++)if(e.labels[t])for(var i=0;i<e.labels[t].length;i++)null!==e.labels[t][i]&&y.isNumber(e.labels[t][i])&&(e.maxX=Math.max(e.maxX,e.labels[t][i]),e.initialMaxX=Math.max(e.maxX,e.labels[t][i]),e.minX=Math.min(e.minX,e.labels[t][i]),e.initialMinX=Math.min(e.minX,e.labels[t][i]))}(),e.noLabelsProvided&&0===t.xaxis.categories.length&&(e.maxX=e.labels[e.labels.length-1],e.initialMaxX=e.labels[e.labels.length-1],e.minX=1,e.initialMinX=1),e.isXNumeric||e.noLabelsProvided||e.dataFormatXNumeric){var n;if(void 0===t.xaxis.tickAmount?(n=Math.round(e.svgWidth/150),"numeric"===t.xaxis.type&&e.dataPoints<30&&(n=e.dataPoints-1),n>e.dataPoints&&0!==e.dataPoints&&(n=e.dataPoints-1)):"dataPoints"===t.xaxis.tickAmount?(e.series.length>1&&(n=e.series[e.maxValsInArrayIndex].length-1),e.isXNumeric&&(n=e.maxX-e.minX-1)):n=t.xaxis.tickAmount,e.xTickAmount=n,void 0!==t.xaxis.max&&"number"==typeof t.xaxis.max&&(e.maxX=t.xaxis.max),void 0!==t.xaxis.min&&"number"==typeof t.xaxis.min&&(e.minX=t.xaxis.min),void 0!==t.xaxis.range&&(e.minX=e.maxX-t.xaxis.range),e.minX!==Number.MAX_VALUE&&e.maxX!==-Number.MAX_VALUE)if(t.xaxis.convertedCatToNumeric&&!e.dataFormatXNumeric){for(var r=[],a=e.minX-1;a<e.maxX;a++)r.push(a+1);e.xAxisScale={result:r,niceMin:r[0],niceMax:r[r.length-1]}}else e.xAxisScale=this.scales.setXScale(e.minX,e.maxX);else e.xAxisScale=this.scales.linearScale(1,n,n),e.noLabelsProvided&&e.labels.length>0&&(e.xAxisScale=this.scales.linearScale(1,e.labels.length,n-1),e.seriesX=e.labels.slice());i&&(e.labels=e.xAxisScale.result.slice())}return e.isBarHorizontal&&e.labels.length&&(e.xTickAmount=e.labels.length),this._handleSingleDataPoint(),this._getMinXDiff(),{minX:e.minX,maxX:e.maxX}}},{key:"setZRange",value:function(){var e=this.w.globals;if(e.isDataXYZ)for(var t=0;t<e.series.length;t++)if(void 0!==e.seriesZ[t])for(var i=0;i<e.seriesZ[t].length;i++)null!==e.seriesZ[t][i]&&y.isNumber(e.seriesZ[t][i])&&(e.maxZ=Math.max(e.maxZ,e.seriesZ[t][i]),e.minZ=Math.min(e.minZ,e.seriesZ[t][i]))}},{key:"_handleSingleDataPoint",value:function(){var e=this.w.globals,t=this.w.config;if(e.minX===e.maxX){var i=new F(this.ctx);if("datetime"===t.xaxis.type){var n=i.getDate(e.minX);n.setUTCDate(n.getDate()-2),e.minX=new Date(n).getTime();var r=i.getDate(e.maxX);r.setUTCDate(r.getDate()+2),e.maxX=new Date(r).getTime()}else("numeric"===t.xaxis.type||"category"===t.xaxis.type&&!e.noLabelsProvided)&&(e.minX=e.minX-2,e.initialMinX=e.minX,e.maxX=e.maxX+2,e.initialMaxX=e.maxX)}}},{key:"_getMinXDiff",value:function(){var e=this.w.globals;e.isXNumeric&&e.seriesX.forEach((function(t,i){1===t.length&&t.push(e.seriesX[e.maxValsInArrayIndex][e.seriesX[e.maxValsInArrayIndex].length-1]);var n=t.slice();n.sort((function(e,t){return e-t})),n.forEach((function(t,i){if(i>0){var r=t-n[i-1];r>0&&(e.minXDiff=Math.min(r,e.minXDiff))}})),1===e.dataPoints&&e.minXDiff===Number.MAX_VALUE&&(e.minXDiff=.5)}))}},{key:"_setStackedMinMax",value:function(){var e=this.w.globals,t=[],i=[];if(e.series.length)for(var n=0;n<e.series[e.maxValsInArrayIndex].length;n++)for(var r=0,a=0,o=0;o<e.series.length;o++)null!==e.series[o][n]&&y.isNumber(e.series[o][n])&&(e.series[o][n]>0?r=r+parseFloat(e.series[o][n])+1e-4:a+=parseFloat(e.series[o][n])),o===e.series.length-1&&(t.push(r),i.push(a));for(var s=0;s<t.length;s++)e.maxY=Math.max(e.maxY,t[s]),e.minY=Math.min(e.minY,i[s])}}]),e}(),Q=function(){function e(t){o(this,e),this.ctx=t,this.w=t.w;var i=this.w;this.xaxisFontSize=i.config.xaxis.labels.style.fontSize,this.axisFontFamily=i.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=i.config.xaxis.labels.style.colors,this.isCategoryBarHorizontal="bar"===i.config.chart.type&&i.config.plotOptions.bar.horizontal,this.xAxisoffX=0,"bottom"===i.config.xaxis.position&&(this.xAxisoffX=i.globals.gridHeight),this.drawnLabels=[],this.axesUtils=new V(t)}return l(e,[{key:"drawYaxis",value:function(e){var t=this,i=this.w,n=new w(this.ctx),r=i.config.yaxis[e].labels.style,a=r.fontSize,o=r.fontFamily,s=r.fontWeight,l=n.group({class:"apexcharts-yaxis",rel:e,transform:"translate("+i.globals.translateYAxisX[e]+", 0)"});if(this.axesUtils.isYAxisHidden(e))return l;var c=n.group({class:"apexcharts-yaxis-texts-g"});l.add(c);var h=i.globals.yAxisScale[e].result.length-1,d=i.globals.gridHeight/h,u=i.globals.translateY,p=i.globals.yLabelFormatters[e],f=i.globals.yAxisScale[e].result.slice();f=this.axesUtils.checkForReversedLabels(e,f);var g="";if(i.config.yaxis[e].labels.show)for(var m=function(l){var m=f[l];m=p(m,l,i);var v=i.config.yaxis[e].labels.padding;i.config.yaxis[e].opposite&&0!==i.config.yaxis.length&&(v*=-1);var y=t.axesUtils.getYAxisForeColor(r.colors,e),b=n.drawText({x:v,y:u+h/10+i.config.yaxis[e].labels.offsetY+1,text:m,textAnchor:i.config.yaxis[e].opposite?"start":"end",fontSize:a,fontFamily:o,fontWeight:s,foreColor:Array.isArray(y)?y[l]:y,isPlainText:!1,cssClass:"apexcharts-yaxis-label "+r.cssClass});l===h&&(g=b),c.add(b);var x=document.createElementNS(i.globals.SVGNS,"title");if(x.textContent=Array.isArray(m)?m.join(" "):m,b.node.appendChild(x),0!==i.config.yaxis[e].labels.rotate){var w=n.rotateAroundCenter(g.node),k=n.rotateAroundCenter(b.node);b.node.setAttribute("transform","rotate(".concat(i.config.yaxis[e].labels.rotate," ").concat(w.x," ").concat(k.y,")"))}u+=d},v=h;v>=0;v--)m(v);if(void 0!==i.config.yaxis[e].title.text){var y=n.group({class:"apexcharts-yaxis-title"}),b=0;i.config.yaxis[e].opposite&&(b=i.globals.translateYAxisX[e]);var x=n.drawText({x:b,y:i.globals.gridHeight/2+i.globals.translateY+i.config.yaxis[e].title.offsetY,text:i.config.yaxis[e].title.text,textAnchor:"end",foreColor:i.config.yaxis[e].title.style.color,fontSize:i.config.yaxis[e].title.style.fontSize,fontWeight:i.config.yaxis[e].title.style.fontWeight,fontFamily:i.config.yaxis[e].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text "+i.config.yaxis[e].title.style.cssClass});y.add(x),l.add(y)}var k=i.config.yaxis[e].axisBorder,_=31+k.offsetX;if(i.config.yaxis[e].opposite&&(_=-31-k.offsetX),k.show){var S=n.drawLine(_,i.globals.translateY+k.offsetY-2,_,i.globals.gridHeight+i.globals.translateY+k.offsetY+2,k.color,0,k.width);l.add(S)}return i.config.yaxis[e].axisTicks.show&&this.axesUtils.drawYAxisTicks(_,h,k,i.config.yaxis[e].axisTicks,e,d,l),l}},{key:"drawYaxisInversed",value:function(e){var t=this.w,i=new w(this.ctx),n=i.group({class:"apexcharts-xaxis apexcharts-yaxis-inversed"}),r=i.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(t.globals.translateXAxisX,", ").concat(t.globals.translateXAxisY,")")});n.add(r);var a=t.globals.yAxisScale[e].result.length-1,o=t.globals.gridWidth/a+.1,s=o+t.config.xaxis.labels.offsetX,l=t.globals.xLabelFormatter,c=t.globals.yAxisScale[e].result.slice(),h=t.globals.timescaleLabels;h.length>0&&(this.xaxisLabels=h.slice(),a=(c=h.slice()).length),c=this.axesUtils.checkForReversedLabels(e,c);var d=h.length;if(t.config.xaxis.labels.show)for(var u=d?0:a;d?u<d:u>=0;d?u++:u--){var p=c[u];p=l(p,u,t);var f=t.globals.gridWidth+t.globals.padHorizontal-(s-o+t.config.xaxis.labels.offsetX);if(h.length){var g=this.axesUtils.getLabel(c,h,f,u,this.drawnLabels,this.xaxisFontSize);f=g.x,p=g.text,this.drawnLabels.push(g.text),0===u&&t.globals.skipFirstTimelinelabel&&(p=""),u===c.length-1&&t.globals.skipLastTimelinelabel&&(p="")}var m=i.drawText({x:f,y:this.xAxisoffX+t.config.xaxis.labels.offsetY+30-("top"===t.config.xaxis.position?t.globals.xAxisHeight+t.config.xaxis.axisTicks.height-2:0),text:p,textAnchor:"middle",foreColor:Array.isArray(this.xaxisForeColors)?this.xaxisForeColors[e]:this.xaxisForeColors,fontSize:this.xaxisFontSize,fontFamily:this.xaxisFontFamily,fontWeight:t.config.xaxis.labels.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-xaxis-label "+t.config.xaxis.labels.style.cssClass});r.add(m),m.tspan(p);var v=document.createElementNS(t.globals.SVGNS,"title");v.textContent=p,m.node.appendChild(v),s+=o}return this.inversedYAxisTitleText(n),this.inversedYAxisBorder(n),n}},{key:"inversedYAxisBorder",value:function(e){var t=this.w,i=new w(this.ctx),n=t.config.xaxis.axisBorder;if(n.show){var r=0;"bar"===t.config.chart.type&&t.globals.isXNumeric&&(r-=15);var a=i.drawLine(t.globals.padHorizontal+r+n.offsetX,this.xAxisoffX,t.globals.gridWidth,this.xAxisoffX,n.color,0,n.height);e.add(a)}}},{key:"inversedYAxisTitleText",value:function(e){var t=this.w,i=new w(this.ctx);if(void 0!==t.config.xaxis.title.text){var n=i.group({class:"apexcharts-xaxis-title apexcharts-yaxis-title-inversed"}),r=i.drawText({x:t.globals.gridWidth/2+t.config.xaxis.title.offsetX,y:this.xAxisoffX+parseFloat(this.xaxisFontSize)+parseFloat(t.config.xaxis.title.style.fontSize)+t.config.xaxis.title.offsetY+20,text:t.config.xaxis.title.text,textAnchor:"middle",fontSize:t.config.xaxis.title.style.fontSize,fontFamily:t.config.xaxis.title.style.fontFamily,fontWeight:t.config.xaxis.title.style.fontWeight,foreColor:t.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text "+t.config.xaxis.title.style.cssClass});n.add(r),e.add(n)}}},{key:"yAxisTitleRotate",value:function(e,t){var i=this.w,n=new w(this.ctx),r={width:0,height:0},a={width:0,height:0},o=i.globals.dom.baseEl.querySelector(" .apexcharts-yaxis[rel='".concat(e,"'] .apexcharts-yaxis-texts-g"));null!==o&&(r=o.getBoundingClientRect());var s=i.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(e,"'] .apexcharts-yaxis-title text"));if(null!==s&&(a=s.getBoundingClientRect()),null!==s){var l=this.xPaddingForYAxisTitle(e,r,a,t);s.setAttribute("x",l.xPos-(t?10:0))}if(null!==s){var c=n.rotateAroundCenter(s);s.setAttribute("transform","rotate(".concat(t?-1*i.config.yaxis[e].title.rotate:i.config.yaxis[e].title.rotate," ").concat(c.x," ").concat(c.y,")"))}}},{key:"xPaddingForYAxisTitle",value:function(e,t,i,n){var r=this.w,a=0,o=0,s=10;return void 0===r.config.yaxis[e].title.text||e<0?{xPos:o,padd:0}:(n?(o=t.width+r.config.yaxis[e].title.offsetX+i.width/2+s/2,0===(a+=1)&&(o-=s/2)):(o=-1*t.width+r.config.yaxis[e].title.offsetX+s/2+i.width/2,r.globals.isBarHorizontal&&(s=25,o=-1*t.width-r.config.yaxis[e].title.offsetX-s)),{xPos:o,padd:s})}},{key:"setYAxisXPosition",value:function(e,t){var i=this.w,n=0,r=0,a=18,o=1;i.config.yaxis.length>1&&(this.multipleYs=!0),i.config.yaxis.map((function(s,l){var c=i.globals.ignoreYAxisIndexes.indexOf(l)>-1||!s.show||s.floating||0===e[l].width,h=e[l].width+t[l].width;s.opposite?i.globals.isBarHorizontal?(r=i.globals.gridWidth+i.globals.translateX-1,i.globals.translateYAxisX[l]=r-s.labels.offsetX):(r=i.globals.gridWidth+i.globals.translateX+o,c||(o=o+h+20),i.globals.translateYAxisX[l]=r-s.labels.offsetX+20):(n=i.globals.translateX-a,c||(a=a+h+20),i.globals.translateYAxisX[l]=n+s.labels.offsetX)}))}},{key:"setYAxisTextAlignments",value:function(){var e=this.w,t=e.globals.dom.baseEl.getElementsByClassName("apexcharts-yaxis");(t=y.listToArray(t)).forEach((function(t,i){var n=e.config.yaxis[i];if(n&&void 0!==n.labels.align){var r=e.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(i,"'] .apexcharts-yaxis-texts-g")),a=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(i,"'] .apexcharts-yaxis-label"));a=y.listToArray(a);var o=r.getBoundingClientRect();"left"===n.labels.align?(a.forEach((function(e,t){e.setAttribute("text-anchor","start")})),n.opposite||r.setAttribute("transform","translate(-".concat(o.width,", 0)"))):"center"===n.labels.align?(a.forEach((function(e,t){e.setAttribute("text-anchor","middle")})),r.setAttribute("transform","translate(".concat(o.width/2*(n.opposite?1:-1),", 0)"))):"right"===n.labels.align&&(a.forEach((function(e,t){e.setAttribute("text-anchor","end")})),n.opposite&&r.setAttribute("transform","translate(".concat(o.width,", 0)")))}}))}}]),e}(),K=function(){function e(t){o(this,e),this.ctx=t,this.w=t.w,this.documentEvent=y.bind(this.documentEvent,this)}return l(e,[{key:"addEventListener",value:function(e,t){var i=this.w;i.globals.events.hasOwnProperty(e)?i.globals.events[e].push(t):i.globals.events[e]=[t]}},{key:"removeEventListener",value:function(e,t){var i=this.w;if(i.globals.events.hasOwnProperty(e)){var n=i.globals.events[e].indexOf(t);-1!==n&&i.globals.events[e].splice(n,1)}}},{key:"fireEvent",value:function(e,t){var i=this.w;if(i.globals.events.hasOwnProperty(e)){t&&t.length||(t=[]);for(var n=i.globals.events[e],r=n.length,a=0;a<r;a++)n[a].apply(null,t)}}},{key:"setupEventHandlers",value:function(){var e=this,t=this.w,i=this.ctx,n=t.globals.dom.baseEl.querySelector(t.globals.chartClass);this.ctx.eventList.forEach((function(e){n.addEventListener(e,(function(e){var n=Object.assign({},t,{seriesIndex:t.globals.capturedSeriesIndex,dataPointIndex:t.globals.capturedDataPointIndex});"mousemove"===e.type||"touchmove"===e.type?"function"==typeof t.config.chart.events.mouseMove&&t.config.chart.events.mouseMove(e,i,n):("mouseup"===e.type&&1===e.which||"touchend"===e.type)&&("function"==typeof t.config.chart.events.click&&t.config.chart.events.click(e,i,n),i.ctx.events.fireEvent("click",[e,i,n]))}),{capture:!1,passive:!0})})),this.ctx.eventList.forEach((function(i){t.globals.dom.baseEl.addEventListener(i,e.documentEvent,{passive:!0})})),this.ctx.core.setupBrushHandler()}},{key:"documentEvent",value:function(e){var t=this.w,i=e.target.className;if("click"===e.type){var n=t.globals.dom.baseEl.querySelector(".apexcharts-menu");n&&n.classList.contains("apexcharts-menu-open")&&"apexcharts-menu-icon"!==i&&n.classList.remove("apexcharts-menu-open")}t.globals.clientX="touchmove"===e.type?e.touches[0].clientX:e.clientX,t.globals.clientY="touchmove"===e.type?e.touches[0].clientY:e.clientY}}]),e}(),ee=function(){function e(t){o(this,e),this.ctx=t,this.w=t.w}return l(e,[{key:"setCurrentLocaleValues",value:function(e){var t=this.w.config.chart.locales;window.Apex.chart&&window.Apex.chart.locales&&window.Apex.chart.locales.length>0&&(t=this.w.config.chart.locales.concat(window.Apex.chart.locales));var i=t.filter((function(t){return t.name===e}))[0];if(!i)throw new Error("Wrong locale name provided. Please make sure you set the correct locale name in options");var n=y.extend(T,i);this.w.globals.locale=n.options}}]),e}(),te=function(){function e(t){o(this,e),this.ctx=t,this.w=t.w}return l(e,[{key:"drawAxis",value:function(e,t){var i,n,r=this.w.globals,a=this.w.config,o=new U(this.ctx),s=new Q(this.ctx);r.axisCharts&&"radar"!==e&&(r.isBarHorizontal?(n=s.drawYaxisInversed(0),i=o.drawXaxisInversed(0),r.dom.elGraphical.add(i),r.dom.elGraphical.add(n)):(i=o.drawXaxis(),r.dom.elGraphical.add(i),a.yaxis.map((function(e,t){-1===r.ignoreYAxisIndexes.indexOf(t)&&(n=s.drawYaxis(t),r.dom.Paper.add(n))}))))}}]),e}(),ie=function(){function e(t){o(this,e),this.ctx=t,this.w=t.w}return l(e,[{key:"drawXCrosshairs",value:function(){var e=this.w,t=new w(this.ctx),i=new x(this.ctx),n=e.config.xaxis.crosshairs.fill.gradient,r=e.config.xaxis.crosshairs.dropShadow,a=e.config.xaxis.crosshairs.fill.type,o=n.colorFrom,s=n.colorTo,l=n.opacityFrom,c=n.opacityTo,h=n.stops,d=r.enabled,u=r.left,p=r.top,f=r.blur,g=r.color,m=r.opacity,v=e.config.xaxis.crosshairs.fill.color;if(e.config.xaxis.crosshairs.show){"gradient"===a&&(v=t.drawGradient("vertical",o,s,l,c,null,h,null));var b=t.drawRect();1===e.config.xaxis.crosshairs.width&&(b=t.drawLine()),b.attr({class:"apexcharts-xcrosshairs",x:0,y:0,y2:e.globals.gridHeight,width:y.isNumber(e.config.xaxis.crosshairs.width)?e.config.xaxis.crosshairs.width:0,height:e.globals.gridHeight,fill:v,filter:"none","fill-opacity":e.config.xaxis.crosshairs.opacity,stroke:e.config.xaxis.crosshairs.stroke.color,"stroke-width":e.config.xaxis.crosshairs.stroke.width,"stroke-dasharray":e.config.xaxis.crosshairs.stroke.dashArray}),d&&(b=i.dropShadow(b,{left:u,top:p,blur:f,color:g,opacity:m})),e.globals.dom.elGraphical.add(b)}}},{key:"drawYCrosshairs",value:function(){var e=this.w,t=new w(this.ctx),i=e.config.yaxis[0].crosshairs,n=e.globals.barPadForNumericAxis;if(e.config.yaxis[0].crosshairs.show){var r=t.drawLine(-n,0,e.globals.gridWidth+n,0,i.stroke.color,i.stroke.dashArray,i.stroke.width);r.attr({class:"apexcharts-ycrosshairs"}),e.globals.dom.elGraphical.add(r)}var a=t.drawLine(-n,0,e.globals.gridWidth+n,0,i.stroke.color,0,0);a.attr({class:"apexcharts-ycrosshairs-hidden"}),e.globals.dom.elGraphical.add(a)}}]),e}(),ne=function(){function e(t){o(this,e),this.ctx=t,this.w=t.w}return l(e,[{key:"checkResponsiveConfig",value:function(e){var t=this,i=this.w,n=i.config;if(0!==n.responsive.length){var r=n.responsive.slice();r.sort((function(e,t){return e.breakpoint>t.breakpoint?1:t.breakpoint>e.breakpoint?-1:0})).reverse();var a=new j({}),o=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=r[0].breakpoint,o=window.innerWidth>0?window.innerWidth:screen.width;if(o>n){var s=S.extendArrayProps(a,i.globals.initialConfig,i);e=y.extend(s,e),e=y.extend(i.config,e),t.overrideResponsiveOptions(e)}else for(var l=0;l<r.length;l++)o<r[l].breakpoint&&(e=S.extendArrayProps(a,r[l].options,i),e=y.extend(i.config,e),t.overrideResponsiveOptions(e))};if(e){var s=S.extendArrayProps(a,e,i);s=y.extend(i.config,s),o(s=y.extend(s,e))}else o({})}}},{key:"overrideResponsiveOptions",value:function(e){var t=new j(e).init({responsiveOverride:!0});this.w.config=t}}]),e}(),re=function(){function e(t){o(this,e),this.ctx=t,this.colors=[],this.w=t.w;var i=this.w;this.isColorFn=!1,this.isHeatmapDistributed="treemap"===i.config.chart.type&&i.config.plotOptions.treemap.distributed||"heatmap"===i.config.chart.type&&i.config.plotOptions.heatmap.distributed,this.isBarDistributed=i.config.plotOptions.bar.distributed&&("bar"===i.config.chart.type||"rangeBar"===i.config.chart.type)}return l(e,[{key:"init",value:function(){this.setDefaultColors()}},{key:"setDefaultColors",value:function(){var e=this,t=this.w,i=new y;if(t.globals.dom.elWrap.classList.add("apexcharts-theme-".concat(t.config.theme.mode)),void 0===t.config.colors?t.globals.colors=this.predefined():(t.globals.colors=t.config.colors,Array.isArray(t.config.colors)&&t.config.colors.length>0&&"function"==typeof t.config.colors[0]&&(t.globals.colors=t.config.series.map((function(i,n){var r=t.config.colors[n];return r||(r=t.config.colors[0]),"function"==typeof r?(e.isColorFn=!0,r({value:t.globals.axisCharts?t.globals.series[n][0]?t.globals.series[n][0]:0:t.globals.series[n],seriesIndex:n,dataPointIndex:n,w:t})):r})))),t.globals.seriesColors.map((function(e,i){e&&(t.globals.colors[i]=e)})),t.config.theme.monochrome.enabled){var n=[],r=t.globals.series.length;(this.isBarDistributed||this.isHeatmapDistributed)&&(r=t.globals.series[0].length*t.globals.series.length);for(var a=t.config.theme.monochrome.color,o=1/(r/t.config.theme.monochrome.shadeIntensity),s=t.config.theme.monochrome.shadeTo,l=0,c=0;c<r;c++){var h=void 0;"dark"===s?(h=i.shadeColor(-1*l,a),l+=o):(h=i.shadeColor(l,a),l+=o),n.push(h)}t.globals.colors=n.slice()}var d=t.globals.colors.slice();this.pushExtraColors(t.globals.colors),["fill","stroke"].forEach((function(i){void 0===t.config[i].colors?t.globals[i].colors=e.isColorFn?t.config.colors:d:t.globals[i].colors=t.config[i].colors.slice(),e.pushExtraColors(t.globals[i].colors)})),void 0===t.config.dataLabels.style.colors?t.globals.dataLabels.style.colors=d:t.globals.dataLabels.style.colors=t.config.dataLabels.style.colors.slice(),this.pushExtraColors(t.globals.dataLabels.style.colors,50),void 0===t.config.plotOptions.radar.polygons.fill.colors?t.globals.radarPolygons.fill.colors=["dark"===t.config.theme.mode?"#424242":"none"]:t.globals.radarPolygons.fill.colors=t.config.plotOptions.radar.polygons.fill.colors.slice(),this.pushExtraColors(t.globals.radarPolygons.fill.colors,20),void 0===t.config.markers.colors?t.globals.markers.colors=d:t.globals.markers.colors=t.config.markers.colors.slice(),this.pushExtraColors(t.globals.markers.colors)}},{key:"pushExtraColors",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=this.w,r=t||n.globals.series.length;if(null===i&&(i=this.isBarDistributed||this.isHeatmapDistributed||"heatmap"===n.config.chart.type&&n.config.plotOptions.heatmap.colorScale.inverse),i&&n.globals.series.length&&(r=n.globals.series[n.globals.maxValsInArrayIndex].length*n.globals.series.length),e.length<r)for(var a=r-e.length,o=0;o<a;o++)e.push(e[o])}},{key:"updateThemeOptions",value:function(e){e.chart=e.chart||{},e.tooltip=e.tooltip||{};var t=e.theme.mode||"light",i=e.theme.palette?e.theme.palette:"dark"===t?"palette4":"palette1",n=e.chart.foreColor?e.chart.foreColor:"dark"===t?"#f6f7f8":"#373d3f";return e.tooltip.theme=t,e.chart.foreColor=n,e.theme.palette=i,e}},{key:"predefined",value:function(){switch(this.w.config.theme.palette){case"palette1":this.colors=["#008FFB","#00E396","#FEB019","#FF4560","#775DD0"];break;case"palette2":this.colors=["#3f51b5","#03a9f4","#4caf50","#f9ce1d","#FF9800"];break;case"palette3":this.colors=["#33b2df","#546E7A","#d4526e","#13d8aa","#A5978B"];break;case"palette4":this.colors=["#4ecdc4","#c7f464","#81D4FA","#fd6a6a","#546E7A"];break;case"palette5":this.colors=["#2b908f","#f9a3a4","#90ee7e","#fa4443","#69d2e7"];break;case"palette6":this.colors=["#449DD1","#F86624","#EA3546","#662E9B","#C5D86D"];break;case"palette7":this.colors=["#D7263D","#1B998B","#2E294E","#F46036","#E2C044"];break;case"palette8":this.colors=["#662E9B","#F86624","#F9C80E","#EA3546","#43BCCD"];break;case"palette9":this.colors=["#5C4742","#A5978B","#8D5B4C","#5A2A27","#C4BBAF"];break;case"palette10":this.colors=["#A300D6","#7D02EB","#5653FE","#2983FF","#00B1F2"];break;default:this.colors=["#008FFB","#00E396","#FEB019","#FF4560","#775DD0"]}return this.colors}}]),e}(),ae=function(){function e(t){o(this,e),this.ctx=t,this.w=t.w}return l(e,[{key:"draw",value:function(){this.drawTitleSubtitle("title"),this.drawTitleSubtitle("subtitle")}},{key:"drawTitleSubtitle",value:function(e){var t=this.w,i="title"===e?t.config.title:t.config.subtitle,n=t.globals.svgWidth/2,r=i.offsetY,a="middle";if("left"===i.align?(n=10,a="start"):"right"===i.align&&(n=t.globals.svgWidth-10,a="end"),n+=i.offsetX,r=r+parseInt(i.style.fontSize,10)+i.margin/2,void 0!==i.text){var o=new w(this.ctx).drawText({x:n,y:r,text:i.text,textAnchor:a,fontSize:i.style.fontSize,fontFamily:i.style.fontFamily,fontWeight:i.style.fontWeight,foreColor:i.style.color,opacity:1});o.node.setAttribute("class","apexcharts-".concat(e,"-text")),t.globals.dom.Paper.add(o)}}}]),e}(),oe=function(){function e(t){o(this,e),this.w=t.w,this.dCtx=t}return l(e,[{key:"getTitleSubtitleCoords",value:function(e){var t=this.w,i=0,n=0,r="title"===e?t.config.title.floating:t.config.subtitle.floating,a=t.globals.dom.baseEl.querySelector(".apexcharts-".concat(e,"-text"));if(null!==a&&!r){var o=a.getBoundingClientRect();i=o.width,n=t.globals.axisCharts?o.height+5:o.height}return{width:i,height:n}}},{key:"getLegendsRect",value:function(){var e=this.w,t=e.globals.dom.baseEl.querySelector(".apexcharts-legend");e.config.legend.height||"top"!==e.config.legend.position&&"bottom"!==e.config.legend.position||(t.style.maxHeight=e.globals.svgHeight/2+"px");var i=Object.assign({},y.getBoundingClientRect(t));return null!==t&&!e.config.legend.floating&&e.config.legend.show?this.dCtx.lgRect={x:i.x,y:i.y,height:i.height,width:0===i.height?0:i.width}:this.dCtx.lgRect={x:0,y:0,height:0,width:0},"left"!==e.config.legend.position&&"right"!==e.config.legend.position||1.5*this.dCtx.lgRect.width>e.globals.svgWidth&&(this.dCtx.lgRect.width=e.globals.svgWidth/1.5),this.dCtx.lgRect}},{key:"getLargestStringFromMultiArr",value:function(e,t){var i=e;if(this.w.globals.isMultiLineX){var n=t.map((function(e,t){return Array.isArray(e)?e.length:1})),r=Math.max.apply(Math,m(n));i=t[n.indexOf(r)]}return i}}]),e}(),se=function(){function e(t){o(this,e),this.w=t.w,this.dCtx=t}return l(e,[{key:"getxAxisLabelsCoords",value:function(){var e,t=this.w,i=t.globals.labels.slice();if(t.config.xaxis.convertedCatToNumeric&&0===i.length&&(i=t.globals.categoryLabels),t.globals.timescaleLabels.length>0){var n=this.getxAxisTimeScaleLabelsCoords();e={width:n.width,height:n.height},t.globals.rotateXLabels=!1}else{this.dCtx.lgWidthForSideLegends="left"!==t.config.legend.position&&"right"!==t.config.legend.position||t.config.legend.floating?0:this.dCtx.lgRect.width;var r=t.globals.xLabelFormatter,a=y.getLargestStringFromArr(i),o=this.dCtx.dimHelpers.getLargestStringFromMultiArr(a,i);t.globals.isBarHorizontal&&(o=a=t.globals.yAxisScale[0].result.reduce((function(e,t){return e.length>t.length?e:t}),0));var s=new W(this.dCtx.ctx),l=a;a=s.xLabelFormat(r,a,l,{i:void 0,dateFormatter:new F(this.dCtx.ctx).formatDate,w:t}),o=s.xLabelFormat(r,o,l,{i:void 0,dateFormatter:new F(this.dCtx.ctx).formatDate,w:t}),(t.config.xaxis.convertedCatToNumeric&&void 0===a||""===String(a).trim())&&(o=a="1");var c=new w(this.dCtx.ctx),h=c.getTextRects(a,t.config.xaxis.labels.style.fontSize),d=h;if(a!==o&&(d=c.getTextRects(o,t.config.xaxis.labels.style.fontSize)),(e={width:h.width>=d.width?h.width:d.width,height:h.height>=d.height?h.height:d.height}).width*i.length>t.globals.svgWidth-this.dCtx.lgWidthForSideLegends-this.dCtx.yAxisWidth-this.dCtx.gridPad.left-this.dCtx.gridPad.right&&0!==t.config.xaxis.labels.rotate||t.config.xaxis.labels.rotateAlways){if(!t.globals.isBarHorizontal){t.globals.rotateXLabels=!0;var u=function(e){return c.getTextRects(e,t.config.xaxis.labels.style.fontSize,t.config.xaxis.labels.style.fontFamily,"rotate(".concat(t.config.xaxis.labels.rotate," 0 0)"),!1)};h=u(a),a!==o&&(d=u(o)),e.height=(h.height>d.height?h.height:d.height)/1.5,e.width=h.width>d.width?h.width:d.width}}else t.globals.rotateXLabels=!1}return t.config.xaxis.labels.show||(e={width:0,height:0}),{width:e.width,height:e.height}}},{key:"getxAxisTitleCoords",value:function(){var e=this.w,t=0,i=0;if(void 0!==e.config.xaxis.title.text){var n=new w(this.dCtx.ctx).getTextRects(e.config.xaxis.title.text,e.config.xaxis.title.style.fontSize);t=n.width,i=n.height}return{width:t,height:i}}},{key:"getxAxisTimeScaleLabelsCoords",value:function(){var e,t=this.w;this.dCtx.timescaleLabels=t.globals.timescaleLabels.slice();var i=this.dCtx.timescaleLabels.map((function(e){return e.value})),n=i.reduce((function(e,t){return void 0===e?(console.error("You have possibly supplied invalid Date format. Please supply a valid JavaScript Date"),0):e.length>t.length?e:t}),0);return 1.05*(e=new w(this.dCtx.ctx).getTextRects(n,t.config.xaxis.labels.style.fontSize)).width*i.length>t.globals.gridWidth&&0!==t.config.xaxis.labels.rotate&&(t.globals.overlappingXLabels=!0),e}},{key:"additionalPaddingXLabels",value:function(e){var t=this,i=this.w,n=i.globals,r=i.config,a=r.xaxis.type,o=e.width;n.skipLastTimelinelabel=!1,n.skipFirstTimelinelabel=!1;var s=i.config.yaxis[0].opposite&&i.globals.isBarHorizontal,l=function(e,s){(function(e){return-1!==n.collapsedSeriesIndices.indexOf(e)})(s)||function(e){if(t.dCtx.timescaleLabels&&t.dCtx.timescaleLabels.length){var s=t.dCtx.timescaleLabels[0],l=t.dCtx.timescaleLabels[t.dCtx.timescaleLabels.length-1].position+o/1.75-t.dCtx.yAxisWidthRight,c=s.position-o/1.75+t.dCtx.yAxisWidthLeft,h="right"===i.config.legend.position&&t.dCtx.lgRect.width>0?t.dCtx.lgRect.width:0;l>n.svgWidth-n.translateX-h&&(n.skipLastTimelinelabel=!0),c<-(e.show&&!e.floating||"bar"!==r.chart.type&&"candlestick"!==r.chart.type&&"rangeBar"!==r.chart.type&&"boxPlot"!==r.chart.type?10:o/1.75)&&(n.skipFirstTimelinelabel=!0)}else"datetime"===a?t.dCtx.gridPad.right<o&&!n.rotateXLabels&&(n.skipLastTimelinelabel=!0):"datetime"!==a&&t.dCtx.gridPad.right<o/2-t.dCtx.yAxisWidthRight&&!n.rotateXLabels&&("between"!==i.config.xaxis.tickPlacement||i.globals.isBarHorizontal)&&(t.dCtx.xPadRight=o/2+1)}(e)};r.yaxis.forEach((function(e,i){s?(t.dCtx.gridPad.left<o&&(t.dCtx.xPadLeft=o/2+1),t.dCtx.xPadRight=o/2+1):l(e,i)}))}}]),e}(),le=function(){function e(t){o(this,e),this.w=t.w,this.dCtx=t}return l(e,[{key:"getyAxisLabelsCoords",value:function(){var e=this,t=this.w,i=[],n=10,r=new V(this.dCtx.ctx);return t.config.yaxis.map((function(a,o){var s=t.globals.yAxisScale[o],l=0;if(!r.isYAxisHidden(o)&&a.labels.show&&void 0!==a.labels.minWidth&&(l=a.labels.minWidth),!r.isYAxisHidden(o)&&a.labels.show&&s.result.length){var c=t.globals.yLabelFormatters[o],h=s.niceMin===Number.MIN_VALUE?0:s.niceMin,d=String(h).length>String(s.niceMax).length?h:s.niceMax,u=c(d,{seriesIndex:o,dataPointIndex:-1,w:t}),p=u;if(void 0!==u&&0!==u.length||(u=d),t.globals.isBarHorizontal){n=0;var f=t.globals.labels.slice();u=c(u=y.getLargestStringFromArr(f),{seriesIndex:o,dataPointIndex:-1,w:t}),p=e.dCtx.dimHelpers.getLargestStringFromMultiArr(u,f)}var g=new w(e.dCtx.ctx),m="rotate(".concat(a.labels.rotate," 0 0)"),v=g.getTextRects(u,a.labels.style.fontSize,a.labels.style.fontFamily,m,!1),b=v;u!==p&&(b=g.getTextRects(p,a.labels.style.fontSize,a.labels.style.fontFamily,m,!1)),i.push({width:(l>b.width||l>v.width?l:b.width>v.width?b.width:v.width)+n,height:b.height>v.height?b.height:v.height})}else i.push({width:0,height:0})})),i}},{key:"getyAxisTitleCoords",value:function(){var e=this,t=this.w,i=[];return t.config.yaxis.map((function(t,n){if(t.show&&void 0!==t.title.text){var r=new w(e.dCtx.ctx),a="rotate(".concat(t.title.rotate," 0 0)"),o=r.getTextRects(t.title.text,t.title.style.fontSize,t.title.style.fontFamily,a,!1);i.push({width:o.width,height:o.height})}else i.push({width:0,height:0})})),i}},{key:"getTotalYAxisWidth",value:function(){var e=this.w,t=0,i=0,n=0,r=e.globals.yAxisScale.length>1?10:0,a=new V(this.dCtx.ctx),o=function(o,s){var l=e.config.yaxis[s].floating,c=0;o.width>0&&!l?(c=o.width+r,function(t){return e.globals.ignoreYAxisIndexes.indexOf(t)>-1}(s)&&(c=c-o.width-r)):c=l||a.isYAxisHidden(s)?0:5,e.config.yaxis[s].opposite?n+=c:i+=c,t+=c};return e.globals.yLabelsCoords.map((function(e,t){o(e,t)})),e.globals.yTitleCoords.map((function(e,t){o(e,t)})),e.globals.isBarHorizontal&&!e.config.yaxis[0].floating&&(t=e.globals.yLabelsCoords[0].width+e.globals.yTitleCoords[0].width+15),this.dCtx.yAxisWidthLeft=i,this.dCtx.yAxisWidthRight=n,t}}]),e}(),ce=function(){function e(t){o(this,e),this.w=t.w,this.dCtx=t}return l(e,[{key:"gridPadForColumnsInNumericAxis",value:function(e){var t=this.w;if(t.globals.noData||t.globals.allSeriesCollapsed)return 0;var i=function(e){return"bar"===e||"rangeBar"===e||"candlestick"===e||"boxPlot"===e},n=t.config.chart.type,r=0,a=i(n)?t.config.series.length:1;if(t.globals.comboBarCount>0&&(a=t.globals.comboBarCount),t.globals.collapsedSeries.forEach((function(e){i(e.type)&&(a-=1)})),t.config.chart.stacked&&(a=1),(i(n)||t.globals.comboBarCount>0)&&t.globals.isXNumeric&&!t.globals.isBarHorizontal&&a>0){var o,s,l=Math.abs(t.globals.initialMaxX-t.globals.initialMinX);l<=3&&(l=t.globals.dataPoints),o=l/e,t.globals.minXDiff&&t.globals.minXDiff/o>0&&(s=t.globals.minXDiff/o),s>e/2&&(s/=2),(r=s/a*parseInt(t.config.plotOptions.bar.columnWidth,10)/100)<1&&(r=1),r=r/(a>1?1:1.5)+5,t.globals.barPadForNumericAxis=r}return r}},{key:"gridPadFortitleSubtitle",value:function(){var e=this,t=this.w,i=t.globals,n=this.dCtx.isSparkline||!t.globals.axisCharts?0:10;["title","subtitle"].forEach((function(i){void 0!==t.config[i].text?n+=t.config[i].margin:n+=e.dCtx.isSparkline||!t.globals.axisCharts?0:5})),!t.config.legend.show||"bottom"!==t.config.legend.position||t.config.legend.floating||t.globals.axisCharts||(n+=10);var r=this.dCtx.dimHelpers.getTitleSubtitleCoords("title"),a=this.dCtx.dimHelpers.getTitleSubtitleCoords("subtitle");i.gridHeight=i.gridHeight-r.height-a.height-n,i.translateY=i.translateY+r.height+a.height+n}},{key:"setGridXPosForDualYAxis",value:function(e,t){var i=this.w,n=new V(this.dCtx.ctx);i.config.yaxis.map((function(r,a){-1!==i.globals.ignoreYAxisIndexes.indexOf(a)||r.floating||n.isYAxisHidden(a)||(r.opposite&&(i.globals.translateX=i.globals.translateX-(t[a].width+e[a].width)-parseInt(i.config.yaxis[a].labels.style.fontSize,10)/1.2-12),i.globals.translateX<2&&(i.globals.translateX=2))}))}}]),e}(),he=function(){function e(t){o(this,e),this.ctx=t,this.w=t.w,this.lgRect={},this.yAxisWidth=0,this.yAxisWidthLeft=0,this.yAxisWidthRight=0,this.xAxisHeight=0,this.isSparkline=this.w.config.chart.sparkline.enabled,this.dimHelpers=new oe(this),this.dimYAxis=new le(this),this.dimXAxis=new se(this),this.dimGrid=new ce(this),this.lgWidthForSideLegends=0,this.gridPad=this.w.config.grid.padding,this.xPadRight=0,this.xPadLeft=0}return l(e,[{key:"plotCoords",value:function(){var e=this.w.globals;this.lgRect=this.dimHelpers.getLegendsRect(),e.axisCharts?this.setDimensionsForAxisCharts():this.setDimensionsForNonAxisCharts(),this.dimGrid.gridPadFortitleSubtitle(),e.gridHeight=e.gridHeight-this.gridPad.top-this.gridPad.bottom,e.gridWidth=e.gridWidth-this.gridPad.left-this.gridPad.right-this.xPadRight-this.xPadLeft;var t=this.dimGrid.gridPadForColumnsInNumericAxis(e.gridWidth);e.gridWidth=e.gridWidth-2*t,e.translateX=e.translateX+this.gridPad.left+this.xPadLeft+(t>0?t+4:0),e.translateY=e.translateY+this.gridPad.top}},{key:"setDimensionsForAxisCharts",value:function(){var e=this,t=this.w,i=t.globals,n=this.dimYAxis.getyAxisLabelsCoords(),r=this.dimYAxis.getyAxisTitleCoords();t.globals.yLabelsCoords=[],t.globals.yTitleCoords=[],t.config.yaxis.map((function(e,i){t.globals.yLabelsCoords.push({width:n[i].width,index:i}),t.globals.yTitleCoords.push({width:r[i].width,index:i})})),this.yAxisWidth=this.dimYAxis.getTotalYAxisWidth();var a=this.dimXAxis.getxAxisLabelsCoords(),o=this.dimXAxis.getxAxisTitleCoords();this.conditionalChecksForAxisCoords(a,o),i.translateXAxisY=t.globals.rotateXLabels?this.xAxisHeight/8:-4,i.translateXAxisX=t.globals.rotateXLabels&&t.globals.isXNumeric&&t.config.xaxis.labels.rotate<=-45?-this.xAxisWidth/4:0,t.globals.isBarHorizontal&&(i.rotateXLabels=!1,i.translateXAxisY=parseInt(t.config.xaxis.labels.style.fontSize,10)/1.5*-1),i.translateXAxisY=i.translateXAxisY+t.config.xaxis.labels.offsetY,i.translateXAxisX=i.translateXAxisX+t.config.xaxis.labels.offsetX;var s=this.yAxisWidth,l=this.xAxisHeight;i.xAxisLabelsHeight=this.xAxisHeight-o.height,i.xAxisLabelsWidth=this.xAxisWidth,i.xAxisHeight=this.xAxisHeight;var c=10;("radar"===t.config.chart.type||this.isSparkline)&&(s=0,l=i.goldenPadding),this.isSparkline&&(this.lgRect={height:0,width:0}),(this.isSparkline||"treemap"===t.config.chart.type)&&(s=0,l=0,c=0),this.isSparkline||this.dimXAxis.additionalPaddingXLabels(a);var h=function(){i.translateX=s,i.gridHeight=i.svgHeight-e.lgRect.height-l-(e.isSparkline||"treemap"===t.config.chart.type?0:t.globals.rotateXLabels?10:15),i.gridWidth=i.svgWidth-s};switch("top"===t.config.xaxis.position&&(c=i.xAxisHeight-t.config.xaxis.axisTicks.height-5),t.config.legend.position){case"bottom":i.translateY=c,h();break;case"top":i.translateY=this.lgRect.height+c,h();break;case"left":i.translateY=c,i.translateX=this.lgRect.width+s,i.gridHeight=i.svgHeight-l-12,i.gridWidth=i.svgWidth-this.lgRect.width-s;break;case"right":i.translateY=c,i.translateX=s,i.gridHeight=i.svgHeight-l-12,i.gridWidth=i.svgWidth-this.lgRect.width-s-5;break;default:throw new Error("Legend position not supported")}this.dimGrid.setGridXPosForDualYAxis(r,n),new Q(this.ctx).setYAxisXPosition(n,r)}},{key:"setDimensionsForNonAxisCharts",value:function(){var e=this.w,t=e.globals,i=e.config,n=0;e.config.legend.show&&!e.config.legend.floating&&(n=20);var r="pie"===i.chart.type||"polarArea"===i.chart.type||"donut"===i.chart.type?"pie":"radialBar",a=i.plotOptions[r].offsetY,o=i.plotOptions[r].offsetX;if(!i.legend.show||i.legend.floating)return t.gridHeight=t.svgHeight-i.grid.padding.left+i.grid.padding.right,t.gridWidth=t.gridHeight,t.translateY=a,void(t.translateX=o+(t.svgWidth-t.gridWidth)/2);switch(i.legend.position){case"bottom":t.gridHeight=t.svgHeight-this.lgRect.height-t.goldenPadding,t.gridWidth=t.svgWidth,t.translateY=a-10,t.translateX=o+(t.svgWidth-t.gridWidth)/2;break;case"top":t.gridHeight=t.svgHeight-this.lgRect.height-t.goldenPadding,t.gridWidth=t.svgWidth,t.translateY=this.lgRect.height+a+10,t.translateX=o+(t.svgWidth-t.gridWidth)/2;break;case"left":t.gridWidth=t.svgWidth-this.lgRect.width-n,t.gridHeight="auto"!==i.chart.height?t.svgHeight:t.gridWidth,t.translateY=a,t.translateX=o+this.lgRect.width+n;break;case"right":t.gridWidth=t.svgWidth-this.lgRect.width-n-5,t.gridHeight="auto"!==i.chart.height?t.svgHeight:t.gridWidth,t.translateY=a,t.translateX=o+10;break;default:throw new Error("Legend position not supported")}}},{key:"conditionalChecksForAxisCoords",value:function(e,t){var i=this.w;this.xAxisHeight=(e.height+t.height)*(i.globals.isMultiLineX?1.2:i.globals.LINE_HEIGHT_RATIO)+(i.globals.rotateXLabels?22:10),this.xAxisWidth=e.width,this.xAxisHeight-t.height>i.config.xaxis.labels.maxHeight&&(this.xAxisHeight=i.config.xaxis.labels.maxHeight),i.config.xaxis.labels.minHeight&&this.xAxisHeight<i.config.xaxis.labels.minHeight&&(this.xAxisHeight=i.config.xaxis.labels.minHeight),i.config.xaxis.floating&&(this.xAxisHeight=0);var n=0,r=0;i.config.yaxis.forEach((function(e){n+=e.labels.minWidth,r+=e.labels.maxWidth})),this.yAxisWidth<n&&(this.yAxisWidth=n),this.yAxisWidth>r&&(this.yAxisWidth=r)}}]),e}(),de=function(){function e(t){o(this,e),this.w=t.w,this.lgCtx=t}return l(e,[{key:"getLegendStyles",value:function(){var e=document.createElement("style");e.setAttribute("type","text/css");var t=document.createTextNode("\t\n \t\n .apexcharts-legend {\t\n display: flex;\t\n overflow: auto;\t\n padding: 0 10px;\t\n }\t\n .apexcharts-legend.position-bottom, .apexcharts-legend.position-top {\t\n flex-wrap: wrap\t\n }\t\n .apexcharts-legend.position-right, .apexcharts-legend.position-left {\t\n flex-direction: column;\t\n bottom: 0;\t\n }\t\n .apexcharts-legend.position-bottom.apexcharts-align-left, .apexcharts-legend.position-top.apexcharts-align-left, .apexcharts-legend.position-right, .apexcharts-legend.position-left {\t\n justify-content: flex-start;\t\n }\t\n .apexcharts-legend.position-bottom.apexcharts-align-center, .apexcharts-legend.position-top.apexcharts-align-center {\t\n justify-content: center; \t\n }\t\n .apexcharts-legend.position-bottom.apexcharts-align-right, .apexcharts-legend.position-top.apexcharts-align-right {\t\n justify-content: flex-end;\t\n }\t\n .apexcharts-legend-series {\t\n cursor: pointer;\t\n line-height: normal;\t\n }\t\n .apexcharts-legend.position-bottom .apexcharts-legend-series, .apexcharts-legend.position-top .apexcharts-legend-series{\t\n display: flex;\t\n align-items: center;\t\n }\t\n .apexcharts-legend-text {\t\n position: relative;\t\n font-size: 14px;\t\n }\t\n .apexcharts-legend-text *, .apexcharts-legend-marker * {\t\n pointer-events: none;\t\n }\t\n .apexcharts-legend-marker {\t\n position: relative;\t\n display: inline-block;\t\n cursor: pointer;\t\n margin-right: 3px;\t\n border-style: solid;\n }\t\n \t\n .apexcharts-legend.apexcharts-align-right .apexcharts-legend-series, .apexcharts-legend.apexcharts-align-left .apexcharts-legend-series{\t\n display: inline-block;\t\n }\t\n .apexcharts-legend-series.apexcharts-no-click {\t\n cursor: auto;\t\n }\t\n .apexcharts-legend .apexcharts-hidden-zero-series, .apexcharts-legend .apexcharts-hidden-null-series {\t\n display: none !important;\t\n }\t\n .apexcharts-inactive-legend {\t\n opacity: 0.45;\t\n }");return e.appendChild(t),e}},{key:"getLegendBBox",value:function(){var e=this.w.globals.dom.baseEl.querySelector(".apexcharts-legend").getBoundingClientRect(),t=e.width;return{clwh:e.height,clww:t}}},{key:"appendToForeignObject",value:function(){var e=this.w.globals;e.dom.elLegendForeign=document.createElementNS(e.SVGNS,"foreignObject");var t=e.dom.elLegendForeign;t.setAttribute("x",0),t.setAttribute("y",0),t.setAttribute("width",e.svgWidth),t.setAttribute("height",e.svgHeight),e.dom.elLegendWrap.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),t.appendChild(e.dom.elLegendWrap),t.appendChild(this.getLegendStyles()),e.dom.Paper.node.insertBefore(t,e.dom.elGraphical.node)}},{key:"toggleDataSeries",value:function(e,t){var i=this,n=this.w;if(n.globals.axisCharts||"radialBar"===n.config.chart.type){n.globals.resized=!0;var r=null,a=null;n.globals.risingSeries=[],n.globals.axisCharts?(r=n.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(e,"']")),a=parseInt(r.getAttribute("data:realIndex"),10)):(r=n.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(e+1,"']")),a=parseInt(r.getAttribute("rel"),10)-1),t?[{cs:n.globals.collapsedSeries,csi:n.globals.collapsedSeriesIndices},{cs:n.globals.ancillaryCollapsedSeries,csi:n.globals.ancillaryCollapsedSeriesIndices}].forEach((function(e){i.riseCollapsedSeries(e.cs,e.csi,a)})):this.hideSeries({seriesEl:r,realIndex:a})}else{var o=n.globals.dom.Paper.select(" .apexcharts-series[rel='".concat(e+1,"'] path")),s=n.config.chart.type;if("pie"===s||"polarArea"===s||"donut"===s){var l=n.config.plotOptions.pie.donut.labels;new w(this.lgCtx.ctx).pathMouseDown(o.members[0],null),this.lgCtx.ctx.pie.printDataLabelsInner(o.members[0].node,l)}o.fire("click")}}},{key:"hideSeries",value:function(e){var t=e.seriesEl,i=e.realIndex,n=this.w,r=y.clone(n.config.series);if(n.globals.axisCharts){var a=!1;if(n.config.yaxis[i]&&n.config.yaxis[i].show&&n.config.yaxis[i].showAlways&&(a=!0,n.globals.ancillaryCollapsedSeriesIndices.indexOf(i)<0&&(n.globals.ancillaryCollapsedSeries.push({index:i,data:r[i].data.slice(),type:t.parentNode.className.baseVal.split("-")[1]}),n.globals.ancillaryCollapsedSeriesIndices.push(i))),!a){n.globals.collapsedSeries.push({index:i,data:r[i].data.slice(),type:t.parentNode.className.baseVal.split("-")[1]}),n.globals.collapsedSeriesIndices.push(i);var o=n.globals.risingSeries.indexOf(i);n.globals.risingSeries.splice(o,1)}}else n.globals.collapsedSeries.push({index:i,data:r[i]}),n.globals.collapsedSeriesIndices.push(i);for(var s=t.childNodes,l=0;l<s.length;l++)s[l].classList.contains("apexcharts-series-markers-wrap")&&(s[l].classList.contains("apexcharts-hide")?s[l].classList.remove("apexcharts-hide"):s[l].classList.add("apexcharts-hide"));n.globals.allSeriesCollapsed=n.globals.collapsedSeries.length===n.config.series.length,r=this._getSeriesBasedOnCollapsedState(r),this.lgCtx.ctx.updateHelpers._updateSeries(r,n.config.chart.animations.dynamicAnimation.enabled)}},{key:"riseCollapsedSeries",value:function(e,t,i){var n=this.w,r=y.clone(n.config.series);if(e.length>0){for(var a=0;a<e.length;a++)e[a].index===i&&(n.globals.axisCharts?(r[i].data=e[a].data.slice(),e.splice(a,1),t.splice(a,1),n.globals.risingSeries.push(i)):(r[i]=e[a].data,e.splice(a,1),t.splice(a,1),n.globals.risingSeries.push(i)));r=this._getSeriesBasedOnCollapsedState(r),this.lgCtx.ctx.updateHelpers._updateSeries(r,n.config.chart.animations.dynamicAnimation.enabled)}}},{key:"_getSeriesBasedOnCollapsedState",value:function(e){var t=this.w;return t.globals.axisCharts?e.forEach((function(i,n){t.globals.collapsedSeriesIndices.indexOf(n)>-1&&(e[n].data=[])})):e.forEach((function(i,n){t.globals.collapsedSeriesIndices.indexOf(n)>-1&&(e[n]=0)})),e}}]),e}(),ue=function(){function e(t,i){o(this,e),this.ctx=t,this.w=t.w,this.onLegendClick=this.onLegendClick.bind(this),this.onLegendHovered=this.onLegendHovered.bind(this),this.isBarsDistributed="bar"===this.w.config.chart.type&&this.w.config.plotOptions.bar.distributed&&1===this.w.config.series.length,this.legendHelpers=new de(this)}return l(e,[{key:"init",value:function(){var e=this.w,t=e.globals,i=e.config;if((i.legend.showForSingleSeries&&1===t.series.length||this.isBarsDistributed||t.series.length>1||!t.axisCharts)&&i.legend.show){for(;t.dom.elLegendWrap.firstChild;)t.dom.elLegendWrap.removeChild(t.dom.elLegendWrap.firstChild);this.drawLegends(),y.isIE11()?document.getElementsByTagName("head")[0].appendChild(this.legendHelpers.getLegendStyles()):this.legendHelpers.appendToForeignObject(),"bottom"===i.legend.position||"top"===i.legend.position?this.legendAlignHorizontal():"right"!==i.legend.position&&"left"!==i.legend.position||this.legendAlignVertical()}}},{key:"drawLegends",value:function(){var e=this,t=this.w,i=t.config.legend.fontFamily,n=t.globals.seriesNames,r=t.globals.colors.slice();if("heatmap"===t.config.chart.type){var a=t.config.plotOptions.heatmap.colorScale.ranges;n=a.map((function(e){return e.name?e.name:e.from+" - "+e.to})),r=a.map((function(e){return e.color}))}else this.isBarsDistributed&&(n=t.globals.labels.slice());t.config.legend.customLegendItems.length&&(n=t.config.legend.customLegendItems);for(var o=t.globals.legendFormatter,s=t.config.legend.inverseOrder,l=s?n.length-1:0;s?l>=0:l<=n.length-1;s?l--:l++){var c=o(n[l],{seriesIndex:l,w:t}),h=!1,d=!1;if(t.globals.collapsedSeries.length>0)for(var u=0;u<t.globals.collapsedSeries.length;u++)t.globals.collapsedSeries[u].index===l&&(h=!0);if(t.globals.ancillaryCollapsedSeriesIndices.length>0)for(var p=0;p<t.globals.ancillaryCollapsedSeriesIndices.length;p++)t.globals.ancillaryCollapsedSeriesIndices[p]===l&&(d=!0);var f=document.createElement("span");f.classList.add("apexcharts-legend-marker");var g=t.config.legend.markers.offsetX,m=t.config.legend.markers.offsetY,v=t.config.legend.markers.height,b=t.config.legend.markers.width,x=t.config.legend.markers.strokeWidth,k=t.config.legend.markers.strokeColor,_=t.config.legend.markers.radius,A=f.style;A.background=r[l],A.color=r[l],A.setProperty("background",r[l],"important"),t.config.legend.markers.fillColors&&t.config.legend.markers.fillColors[l]&&(A.background=t.config.legend.markers.fillColors[l]),void 0!==t.globals.seriesColors[l]&&(A.background=t.globals.seriesColors[l],A.color=t.globals.seriesColors[l]),A.height=Array.isArray(v)?parseFloat(v[l])+"px":parseFloat(v)+"px",A.width=Array.isArray(b)?parseFloat(b[l])+"px":parseFloat(b)+"px",A.left=(Array.isArray(g)?parseFloat(g[l]):parseFloat(g))+"px",A.top=(Array.isArray(m)?parseFloat(m[l]):parseFloat(m))+"px",A.borderWidth=Array.isArray(x)?x[l]:x,A.borderColor=Array.isArray(k)?k[l]:k,A.borderRadius=Array.isArray(_)?parseFloat(_[l])+"px":parseFloat(_)+"px",t.config.legend.markers.customHTML&&(Array.isArray(t.config.legend.markers.customHTML)?t.config.legend.markers.customHTML[l]&&(f.innerHTML=t.config.legend.markers.customHTML[l]()):f.innerHTML=t.config.legend.markers.customHTML()),w.setAttrs(f,{rel:l+1,"data:collapsed":h||d}),(h||d)&&f.classList.add("apexcharts-inactive-legend");var C=document.createElement("div"),T=document.createElement("span");T.classList.add("apexcharts-legend-text"),T.innerHTML=Array.isArray(c)?y.sanitizeDom(c.join(" ")):y.sanitizeDom(c);var P=t.config.legend.labels.useSeriesColors?t.globals.colors[l]:t.config.legend.labels.colors;P||(P=t.config.chart.foreColor),T.style.color=P,T.style.fontSize=parseFloat(t.config.legend.fontSize)+"px",T.style.fontWeight=t.config.legend.fontWeight,T.style.fontFamily=i||t.config.chart.fontFamily,w.setAttrs(T,{rel:l+1,i:l,"data:default-text":encodeURIComponent(c),"data:collapsed":h||d}),C.appendChild(f),C.appendChild(T);var L=new S(this.ctx);t.config.legend.showForZeroSeries||0===L.getSeriesTotalByIndex(l)&&L.seriesHaveSameValues(l)&&!L.isSeriesNull(l)&&-1===t.globals.collapsedSeriesIndices.indexOf(l)&&-1===t.globals.ancillaryCollapsedSeriesIndices.indexOf(l)&&C.classList.add("apexcharts-hidden-zero-series"),t.config.legend.showForNullSeries||L.isSeriesNull(l)&&-1===t.globals.collapsedSeriesIndices.indexOf(l)&&-1===t.globals.ancillaryCollapsedSeriesIndices.indexOf(l)&&C.classList.add("apexcharts-hidden-null-series"),t.globals.dom.elLegendWrap.appendChild(C),t.globals.dom.elLegendWrap.classList.add("apexcharts-align-".concat(t.config.legend.horizontalAlign)),t.globals.dom.elLegendWrap.classList.add("position-"+t.config.legend.position),C.classList.add("apexcharts-legend-series"),C.style.margin="".concat(t.config.legend.itemMargin.vertical,"px ").concat(t.config.legend.itemMargin.horizontal,"px"),t.globals.dom.elLegendWrap.style.width=t.config.legend.width?t.config.legend.width+"px":"",t.globals.dom.elLegendWrap.style.height=t.config.legend.height?t.config.legend.height+"px":"",w.setAttrs(C,{rel:l+1,seriesName:y.escapeString(n[l]),"data:collapsed":h||d}),(h||d)&&C.classList.add("apexcharts-inactive-legend"),t.config.legend.onItemClick.toggleDataSeries||C.classList.add("apexcharts-no-click")}t.globals.dom.elWrap.addEventListener("click",e.onLegendClick,!0),t.config.legend.onItemHover.highlightDataSeries&&0===t.config.legend.customLegendItems.length&&(t.globals.dom.elWrap.addEventListener("mousemove",e.onLegendHovered,!0),t.globals.dom.elWrap.addEventListener("mouseout",e.onLegendHovered,!0))}},{key:"setLegendWrapXY",value:function(e,t){var i=this.w,n=i.globals.dom.baseEl.querySelector(".apexcharts-legend"),r=n.getBoundingClientRect(),a=0,o=0;if("bottom"===i.config.legend.position)o+=i.globals.svgHeight-r.height/2;else if("top"===i.config.legend.position){var s=new he(this.ctx),l=s.dimHelpers.getTitleSubtitleCoords("title").height,c=s.dimHelpers.getTitleSubtitleCoords("subtitle").height;o=o+(l>0?l-10:0)+(c>0?c-10:0)}n.style.position="absolute",a=a+e+i.config.legend.offsetX,o=o+t+i.config.legend.offsetY,n.style.left=a+"px",n.style.top=o+"px","bottom"===i.config.legend.position?(n.style.top="auto",n.style.bottom=5-i.config.legend.offsetY+"px"):"right"===i.config.legend.position&&(n.style.left="auto",n.style.right=25+i.config.legend.offsetX+"px"),["width","height"].forEach((function(e){n.style[e]&&(n.style[e]=parseInt(i.config.legend[e],10)+"px")}))}},{key:"legendAlignHorizontal",value:function(){var e=this.w;e.globals.dom.baseEl.querySelector(".apexcharts-legend").style.right=0;var t=this.legendHelpers.getLegendBBox(),i=new he(this.ctx),n=i.dimHelpers.getTitleSubtitleCoords("title"),r=i.dimHelpers.getTitleSubtitleCoords("subtitle"),a=0;"bottom"===e.config.legend.position?a=-t.clwh/1.8:"top"===e.config.legend.position&&(a=n.height+r.height+e.config.title.margin+e.config.subtitle.margin-10),this.setLegendWrapXY(20,a)}},{key:"legendAlignVertical",value:function(){var e=this.w,t=this.legendHelpers.getLegendBBox(),i=0;"left"===e.config.legend.position&&(i=20),"right"===e.config.legend.position&&(i=e.globals.svgWidth-t.clww-10),this.setLegendWrapXY(i,20)}},{key:"onLegendHovered",value:function(e){var t=this.w,i=e.target.classList.contains("apexcharts-legend-text")||e.target.classList.contains("apexcharts-legend-marker");if("heatmap"===t.config.chart.type||this.isBarsDistributed){if(i){var n=parseInt(e.target.getAttribute("rel"),10)-1;this.ctx.events.fireEvent("legendHover",[this.ctx,n,this.w]),new z(this.ctx).highlightRangeInSeries(e,e.target)}}else!e.target.classList.contains("apexcharts-inactive-legend")&&i&&new z(this.ctx).toggleSeriesOnHover(e,e.target)}},{key:"onLegendClick",value:function(e){var t=this.w;if(!t.config.legend.customLegendItems.length&&(e.target.classList.contains("apexcharts-legend-text")||e.target.classList.contains("apexcharts-legend-marker"))){var i=parseInt(e.target.getAttribute("rel"),10)-1,n="true"===e.target.getAttribute("data:collapsed"),r=this.w.config.chart.events.legendClick;"function"==typeof r&&r(this.ctx,i,this.w),this.ctx.events.fireEvent("legendClick",[this.ctx,i,this.w]);var a=this.w.config.legend.markers.onClick;"function"==typeof a&&e.target.classList.contains("apexcharts-legend-marker")&&(a(this.ctx,i,this.w),this.ctx.events.fireEvent("legendMarkerClick",[this.ctx,i,this.w])),"treemap"!==t.config.chart.type&&"heatmap"!==t.config.chart.type&&!this.isBarsDistributed&&t.config.legend.onItemClick.toggleDataSeries&&this.legendHelpers.toggleDataSeries(i,n)}}}]),e}(),pe=function(){function e(t){o(this,e),this.ctx=t,this.w=t.w;var i=this.w;this.ev=this.w.config.chart.events,this.selectedClass="apexcharts-selected",this.localeValues=this.w.globals.locale.toolbar,this.minX=i.globals.minX,this.maxX=i.globals.maxX}return l(e,[{key:"createToolbar",value:function(){var e=this,t=this.w,i=function(){return document.createElement("div")},n=i();if(n.setAttribute("class","apexcharts-toolbar"),n.style.top=t.config.chart.toolbar.offsetY+"px",n.style.right=3-t.config.chart.toolbar.offsetX+"px",t.globals.dom.elWrap.appendChild(n),this.elZoom=i(),this.elZoomIn=i(),this.elZoomOut=i(),this.elPan=i(),this.elSelection=i(),this.elZoomReset=i(),this.elMenuIcon=i(),this.elMenu=i(),this.elCustomIcons=[],this.t=t.config.chart.toolbar.tools,Array.isArray(this.t.customIcons))for(var r=0;r<this.t.customIcons.length;r++)this.elCustomIcons.push(i());var a=[],o=function(i,n,r){var o=i.toLowerCase();e.t[o]&&t.config.chart.zoom.enabled&&a.push({el:n,icon:"string"==typeof e.t[o]?e.t[o]:r,title:e.localeValues[i],class:"apexcharts-".concat(o,"-icon")})};o("zoomIn",this.elZoomIn,'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n <path d="M0 0h24v24H0z" fill="none"/>\n <path d="M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4V7zm-1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/>\n</svg>\n'),o("zoomOut",this.elZoomOut,'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n <path d="M0 0h24v24H0z" fill="none"/>\n <path d="M7 11v2h10v-2H7zm5-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/>\n</svg>\n');var s=function(i){e.t[i]&&t.config.chart[i].enabled&&a.push({el:"zoom"===i?e.elZoom:e.elSelection,icon:"string"==typeof e.t[i]?e.t[i]:"zoom"===i?'<svg xmlns="http://www.w3.org/2000/svg" fill="#000000" height="24" viewBox="0 0 24 24" width="24">\n <path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/>\n <path d="M0 0h24v24H0V0z" fill="none"/>\n <path d="M12 10h-2v2H9v-2H7V9h2V7h1v2h2v1z"/>\n</svg>':'<svg fill="#6E8192" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">\n <path d="M0 0h24v24H0z" fill="none"/>\n <path d="M3 5h2V3c-1.1 0-2 .9-2 2zm0 8h2v-2H3v2zm4 8h2v-2H7v2zM3 9h2V7H3v2zm10-6h-2v2h2V3zm6 0v2h2c0-1.1-.9-2-2-2zM5 21v-2H3c0 1.1.9 2 2 2zm-2-4h2v-2H3v2zM9 3H7v2h2V3zm2 18h2v-2h-2v2zm8-8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2zm0-12h2V7h-2v2zm0 8h2v-2h-2v2zm-4 4h2v-2h-2v2zm0-16h2V3h-2v2z"/>\n</svg>',title:e.localeValues["zoom"===i?"selectionZoom":"selection"],class:t.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-".concat(i,"-icon")})};s("zoom"),s("selection"),this.t.pan&&t.config.chart.zoom.enabled&&a.push({el:this.elPan,icon:"string"==typeof this.t.pan?this.t.pan:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="#000000" height="24" viewBox="0 0 24 24" width="24">\n <defs>\n <path d="M0 0h24v24H0z" id="a"/>\n </defs>\n <clipPath id="b">\n <use overflow="visible" xlink:href="#a"/>\n </clipPath>\n <path clip-path="url(#b)" d="M23 5.5V20c0 2.2-1.8 4-4 4h-7.3c-1.08 0-2.1-.43-2.85-1.19L1 14.83s1.26-1.23 1.3-1.25c.22-.19.49-.29.79-.29.22 0 .42.06.6.16.04.01 4.31 2.46 4.31 2.46V4c0-.83.67-1.5 1.5-1.5S11 3.17 11 4v7h1V1.5c0-.83.67-1.5 1.5-1.5S15 .67 15 1.5V11h1V2.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5V11h1V5.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5z"/>\n</svg>',title:this.localeValues.pan,class:t.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-pan-icon"}),o("reset",this.elZoomReset,'<svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">\n <path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/>\n <path d="M0 0h24v24H0z" fill="none"/>\n</svg>'),this.t.download&&a.push({el:this.elMenuIcon,icon:"string"==typeof this.t.download?this.t.download:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0V0z"/><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"/></svg>',title:this.localeValues.menu,class:"apexcharts-menu-icon"});for(var l=0;l<this.elCustomIcons.length;l++)a.push({el:this.elCustomIcons[l],icon:this.t.customIcons[l].icon,title:this.t.customIcons[l].title,index:this.t.customIcons[l].index,class:"apexcharts-toolbar-custom-icon "+this.t.customIcons[l].class});a.forEach((function(e,t){e.index&&y.moveIndexInArray(a,t,e.index)}));for(var c=0;c<a.length;c++)w.setAttrs(a[c].el,{class:a[c].class,title:a[c].title}),a[c].el.innerHTML=a[c].icon,n.appendChild(a[c].el);this._createHamburgerMenu(n),t.globals.zoomEnabled?this.elZoom.classList.add(this.selectedClass):t.globals.panEnabled?this.elPan.classList.add(this.selectedClass):t.globals.selectionEnabled&&this.elSelection.classList.add(this.selectedClass),this.addToolbarEventListeners()}},{key:"_createHamburgerMenu",value:function(e){this.elMenuItems=[],e.appendChild(this.elMenu),w.setAttrs(this.elMenu,{class:"apexcharts-menu"});var t=[{name:"exportSVG",title:this.localeValues.exportToSVG},{name:"exportPNG",title:this.localeValues.exportToPNG},{name:"exportCSV",title:this.localeValues.exportToCSV}];this.w.globals.allSeriesHasEqualX||t.splice(2,1);for(var i=0;i<t.length;i++)this.elMenuItems.push(document.createElement("div")),this.elMenuItems[i].innerHTML=t[i].title,w.setAttrs(this.elMenuItems[i],{class:"apexcharts-menu-item ".concat(t[i].name),title:t[i].title}),this.elMenu.appendChild(this.elMenuItems[i])}},{key:"addToolbarEventListeners",value:function(){var e=this;this.elZoomReset.addEventListener("click",this.handleZoomReset.bind(this)),this.elSelection.addEventListener("click",this.toggleZoomSelection.bind(this,"selection")),this.elZoom.addEventListener("click",this.toggleZoomSelection.bind(this,"zoom")),this.elZoomIn.addEventListener("click",this.handleZoomIn.bind(this)),this.elZoomOut.addEventListener("click",this.handleZoomOut.bind(this)),this.elPan.addEventListener("click",this.togglePanning.bind(this)),this.elMenuIcon.addEventListener("click",this.toggleMenu.bind(this)),this.elMenuItems.forEach((function(t){t.classList.contains("exportSVG")?t.addEventListener("click",e.handleDownload.bind(e,"svg")):t.classList.contains("exportPNG")?t.addEventListener("click",e.handleDownload.bind(e,"png")):t.classList.contains("exportCSV")&&t.addEventListener("click",e.handleDownload.bind(e,"csv"))}));for(var t=0;t<this.t.customIcons.length;t++)this.elCustomIcons[t].addEventListener("click",this.t.customIcons[t].click.bind(this,this.ctx,this.ctx.w))}},{key:"toggleZoomSelection",value:function(e){this.ctx.getSyncedCharts().forEach((function(t){t.ctx.toolbar.toggleOtherControls();var i="selection"===e?t.ctx.toolbar.elSelection:t.ctx.toolbar.elZoom,n="selection"===e?"selectionEnabled":"zoomEnabled";t.w.globals[n]=!t.w.globals[n],i.classList.contains(t.ctx.toolbar.selectedClass)?i.classList.remove(t.ctx.toolbar.selectedClass):i.classList.add(t.ctx.toolbar.selectedClass)}))}},{key:"getToolbarIconsReference",value:function(){var e=this.w;this.elZoom||(this.elZoom=e.globals.dom.baseEl.querySelector(".apexcharts-zoom-icon")),this.elPan||(this.elPan=e.globals.dom.baseEl.querySelector(".apexcharts-pan-icon")),this.elSelection||(this.elSelection=e.globals.dom.baseEl.querySelector(".apexcharts-selection-icon"))}},{key:"enableZoomPanFromToolbar",value:function(e){this.toggleOtherControls(),"pan"===e?this.w.globals.panEnabled=!0:this.w.globals.zoomEnabled=!0;var t="pan"===e?this.elPan:this.elZoom,i="pan"===e?this.elZoom:this.elPan;t&&t.classList.add(this.selectedClass),i&&i.classList.remove(this.selectedClass)}},{key:"togglePanning",value:function(){this.ctx.getSyncedCharts().forEach((function(e){e.ctx.toolbar.toggleOtherControls(),e.w.globals.panEnabled=!e.w.globals.panEnabled,e.ctx.toolbar.elPan.classList.contains(e.ctx.toolbar.selectedClass)?e.ctx.toolbar.elPan.classList.remove(e.ctx.toolbar.selectedClass):e.ctx.toolbar.elPan.classList.add(e.ctx.toolbar.selectedClass)}))}},{key:"toggleOtherControls",value:function(){var e=this,t=this.w;t.globals.panEnabled=!1,t.globals.zoomEnabled=!1,t.globals.selectionEnabled=!1,this.getToolbarIconsReference(),[this.elPan,this.elSelection,this.elZoom].forEach((function(t){t&&t.classList.remove(e.selectedClass)}))}},{key:"handleZoomIn",value:function(){var e=this.w;e.globals.isTimelineBar&&(this.minX=e.globals.minY,this.maxX=e.globals.maxY);var t=(this.minX+this.maxX)/2,i=(this.minX+t)/2,n=(this.maxX+t)/2,r=this._getNewMinXMaxX(i,n);e.globals.disableZoomIn||this.zoomUpdateOptions(r.minX,r.maxX)}},{key:"handleZoomOut",value:function(){var e=this.w;if(e.globals.isTimelineBar&&(this.minX=e.globals.minY,this.maxX=e.globals.maxY),!("datetime"===e.config.xaxis.type&&new Date(this.minX).getUTCFullYear()<1e3)){var t=(this.minX+this.maxX)/2,i=this.minX-(t-this.minX),n=this.maxX-(t-this.maxX),r=this._getNewMinXMaxX(i,n);e.globals.disableZoomOut||this.zoomUpdateOptions(r.minX,r.maxX)}}},{key:"_getNewMinXMaxX",value:function(e,t){var i=this.w.config.xaxis.convertedCatToNumeric;return{minX:i?Math.floor(e):e,maxX:i?Math.floor(t):t}}},{key:"zoomUpdateOptions",value:function(e,t){var i=this.w;if(void 0!==e||void 0!==t){if(!(i.config.xaxis.convertedCatToNumeric&&(e<1&&(e=1,t=i.globals.dataPoints),t-e<2))){var n={min:e,max:t},r=this.getBeforeZoomRange(n);r&&(n=r.xaxis);var a={xaxis:n},o=y.clone(i.globals.initialConfig.yaxis);i.config.chart.zoom.autoScaleYaxis&&(o=new Z(this.ctx).autoScaleY(this.ctx,o,{xaxis:n})),i.config.chart.group||(a.yaxis=o),this.w.globals.zoomed=!0,this.ctx.updateHelpers._updateOptions(a,!1,this.w.config.chart.animations.dynamicAnimation.enabled),this.zoomCallback(n,o)}}else this.handleZoomReset()}},{key:"zoomCallback",value:function(e,t){"function"==typeof this.ev.zoomed&&this.ev.zoomed(this.ctx,{xaxis:e,yaxis:t})}},{key:"getBeforeZoomRange",value:function(e,t){var i=null;return"function"==typeof this.ev.beforeZoom&&(i=this.ev.beforeZoom(this,{xaxis:e,yaxis:t})),i}},{key:"toggleMenu",value:function(){var e=this;window.setTimeout((function(){e.elMenu.classList.contains("apexcharts-menu-open")?e.elMenu.classList.remove("apexcharts-menu-open"):e.elMenu.classList.add("apexcharts-menu-open")}),0)}},{key:"handleDownload",value:function(e){var t=this.w,i=new G(this.ctx);switch(e){case"svg":i.exportToSVG(this.ctx);break;case"png":i.exportToPng(this.ctx);break;case"csv":i.exportToCSV({series:t.config.series,columnDelimiter:t.config.chart.toolbar.export.csv.columnDelimiter})}}},{key:"handleZoomReset",value:function(e){this.ctx.getSyncedCharts().forEach((function(e){var t=e.w;if(t.globals.lastXAxis.min=void 0,t.globals.lastXAxis.max=void 0,e.updateHelpers.revertDefaultAxisMinMax(),"function"==typeof t.config.chart.events.beforeResetZoom){var i=t.config.chart.events.beforeResetZoom(e,t);i&&e.updateHelpers.revertDefaultAxisMinMax(i)}"function"==typeof t.config.chart.events.zoomed&&e.ctx.toolbar.zoomCallback({min:t.config.xaxis.min,max:t.config.xaxis.max}),t.globals.zoomed=!1;var n=e.ctx.series.emptyCollapsedSeries(y.clone(t.globals.initialSeries));e.updateHelpers._updateSeries(n,t.config.chart.animations.dynamicAnimation.enabled)}))}},{key:"destroy",value:function(){this.elZoom=null,this.elZoomIn=null,this.elZoomOut=null,this.elPan=null,this.elSelection=null,this.elZoomReset=null,this.elMenuIcon=null}}]),e}(),fe=function(e){u(i,pe);var t=g(i);function i(e){var n;return o(this,i),(n=t.call(this,e)).ctx=e,n.w=e.w,n.dragged=!1,n.graphics=new w(n.ctx),n.eventList=["mousedown","mouseleave","mousemove","touchstart","touchmove","mouseup","touchend"],n.clientX=0,n.clientY=0,n.startX=0,n.endX=0,n.dragX=0,n.startY=0,n.endY=0,n.dragY=0,n.moveDirection="none",n}return l(i,[{key:"init",value:function(e){var t=this,i=e.xyRatios,n=this.w,r=this;this.xyRatios=i,this.zoomRect=this.graphics.drawRect(0,0,0,0),this.selectionRect=this.graphics.drawRect(0,0,0,0),this.gridRect=n.globals.dom.baseEl.querySelector(".apexcharts-grid"),this.zoomRect.node.classList.add("apexcharts-zoom-rect"),this.selectionRect.node.classList.add("apexcharts-selection-rect"),n.globals.dom.elGraphical.add(this.zoomRect),n.globals.dom.elGraphical.add(this.selectionRect),"x"===n.config.chart.selection.type?this.slDraggableRect=this.selectionRect.draggable({minX:0,minY:0,maxX:n.globals.gridWidth,maxY:n.globals.gridHeight}).on("dragmove",this.selectionDragging.bind(this,"dragging")):"y"===n.config.chart.selection.type?this.slDraggableRect=this.selectionRect.draggable({minX:0,maxX:n.globals.gridWidth}).on("dragmove",this.selectionDragging.bind(this,"dragging")):this.slDraggableRect=this.selectionRect.draggable().on("dragmove",this.selectionDragging.bind(this,"dragging")),this.preselectedSelection(),this.hoverArea=n.globals.dom.baseEl.querySelector("".concat(n.globals.chartClass," .apexcharts-svg")),this.hoverArea.classList.add("apexcharts-zoomable"),this.eventList.forEach((function(e){t.hoverArea.addEventListener(e,r.svgMouseEvents.bind(r,i),{capture:!1,passive:!0})}))}},{key:"destroy",value:function(){this.slDraggableRect&&(this.slDraggableRect.draggable(!1),this.slDraggableRect.off(),this.selectionRect.off()),this.selectionRect=null,this.zoomRect=null,this.gridRect=null}},{key:"svgMouseEvents",value:function(e,t){var i=this.w,n=this,r=this.ctx.toolbar,a=i.globals.zoomEnabled?i.config.chart.zoom.type:i.config.chart.selection.type,o=i.config.chart.toolbar.autoSelected;t.shiftKey?(this.shiftWasPressed=!0,r.enableZoomPanFromToolbar("pan"===o?"zoom":"pan")):this.shiftWasPressed&&(r.enableZoomPanFromToolbar(o),this.shiftWasPressed=!1);var s=t.target.classList;if(!(s.contains("apexcharts-selection-rect")||s.contains("apexcharts-legend-marker")||s.contains("apexcharts-legend-text")||t.target.parentNode.classList.contains("apexcharts-toolbar"))){if(n.clientX="touchmove"===t.type||"touchstart"===t.type?t.touches[0].clientX:"touchend"===t.type?t.changedTouches[0].clientX:t.clientX,n.clientY="touchmove"===t.type||"touchstart"===t.type?t.touches[0].clientY:"touchend"===t.type?t.changedTouches[0].clientY:t.clientY,"mousedown"===t.type&&1===t.which){var l=n.gridRect.getBoundingClientRect();n.startX=n.clientX-l.left,n.startY=n.clientY-l.top,n.dragged=!1,n.w.globals.mousedown=!0}if(("mousemove"===t.type&&1===t.which||"touchmove"===t.type)&&(n.dragged=!0,i.globals.panEnabled?(i.globals.selection=null,n.w.globals.mousedown&&n.panDragging({context:n,zoomtype:a,xyRatios:e})):(n.w.globals.mousedown&&i.globals.zoomEnabled||n.w.globals.mousedown&&i.globals.selectionEnabled)&&(n.selection=n.selectionDrawing({context:n,zoomtype:a}))),"mouseup"===t.type||"touchend"===t.type||"mouseleave"===t.type){var c=n.gridRect.getBoundingClientRect();n.w.globals.mousedown&&(n.endX=n.clientX-c.left,n.endY=n.clientY-c.top,n.dragX=Math.abs(n.endX-n.startX),n.dragY=Math.abs(n.endY-n.startY),(i.globals.zoomEnabled||i.globals.selectionEnabled)&&n.selectionDrawn({context:n,zoomtype:a}),i.globals.panEnabled&&i.config.xaxis.convertedCatToNumeric&&n.delayedPanScrolled()),i.globals.zoomEnabled&&n.hideSelectionRect(this.selectionRect),n.dragged=!1,n.w.globals.mousedown=!1}this.makeSelectionRectDraggable()}}},{key:"makeSelectionRectDraggable",value:function(){var e=this.w;if(this.selectionRect){var t=this.selectionRect.node.getBoundingClientRect();t.width>0&&t.height>0&&this.slDraggableRect.selectize({points:"l, r",pointSize:8,pointType:"rect"}).resize({constraint:{minX:0,minY:0,maxX:e.globals.gridWidth,maxY:e.globals.gridHeight}}).on("resizing",this.selectionDragging.bind(this,"resizing"))}}},{key:"preselectedSelection",value:function(){var e=this.w,t=this.xyRatios;if(!e.globals.zoomEnabled)if(void 0!==e.globals.selection&&null!==e.globals.selection)this.drawSelectionRect(e.globals.selection);else if(void 0!==e.config.chart.selection.xaxis.min&&void 0!==e.config.chart.selection.xaxis.max){var i=(e.config.chart.selection.xaxis.min-e.globals.minX)/t.xRatio,n={x:i,y:0,width:e.globals.gridWidth-(e.globals.maxX-e.config.chart.selection.xaxis.max)/t.xRatio-i,height:e.globals.gridHeight,translateX:0,translateY:0,selectionEnabled:!0};this.drawSelectionRect(n),this.makeSelectionRectDraggable(),"function"==typeof e.config.chart.events.selection&&e.config.chart.events.selection(this.ctx,{xaxis:{min:e.config.chart.selection.xaxis.min,max:e.config.chart.selection.xaxis.max},yaxis:{}})}}},{key:"drawSelectionRect",value:function(e){var t=e.x,i=e.y,n=e.width,r=e.height,a=e.translateX,o=void 0===a?0:a,s=e.translateY,l=void 0===s?0:s,c=this.w,h=this.zoomRect,d=this.selectionRect;if(this.dragged||null!==c.globals.selection){var u={transform:"translate("+o+", "+l+")"};c.globals.zoomEnabled&&this.dragged&&(n<0&&(n=1),h.attr({x:t,y:i,width:n,height:r,fill:c.config.chart.zoom.zoomedArea.fill.color,"fill-opacity":c.config.chart.zoom.zoomedArea.fill.opacity,stroke:c.config.chart.zoom.zoomedArea.stroke.color,"stroke-width":c.config.chart.zoom.zoomedArea.stroke.width,"stroke-opacity":c.config.chart.zoom.zoomedArea.stroke.opacity}),w.setAttrs(h.node,u)),c.globals.selectionEnabled&&(d.attr({x:t,y:i,width:n>0?n:0,height:r>0?r:0,fill:c.config.chart.selection.fill.color,"fill-opacity":c.config.chart.selection.fill.opacity,stroke:c.config.chart.selection.stroke.color,"stroke-width":c.config.chart.selection.stroke.width,"stroke-dasharray":c.config.chart.selection.stroke.dashArray,"stroke-opacity":c.config.chart.selection.stroke.opacity}),w.setAttrs(d.node,u))}}},{key:"hideSelectionRect",value:function(e){e&&e.attr({x:0,y:0,width:0,height:0})}},{key:"selectionDrawing",value:function(e){var t,i=e.context,n=e.zoomtype,r=this.w,a=i,o=this.gridRect.getBoundingClientRect(),s=a.startX-1,l=a.startY,c=!1,h=!1,d=a.clientX-o.left-s,u=a.clientY-o.top-l;return Math.abs(d+s)>r.globals.gridWidth?d=r.globals.gridWidth-s:a.clientX-o.left<0&&(d=s),s>a.clientX-o.left&&(c=!0,d=Math.abs(d)),l>a.clientY-o.top&&(h=!0,u=Math.abs(u)),t="x"===n?{x:c?s-d:s,y:0,width:d,height:r.globals.gridHeight}:"y"===n?{x:0,y:h?l-u:l,width:r.globals.gridWidth,height:u}:{x:c?s-d:s,y:h?l-u:l,width:d,height:u},a.drawSelectionRect(t),a.selectionDragging("resizing"),t}},{key:"selectionDragging",value:function(e,t){var i=this,n=this.w,r=this.xyRatios,a=this.selectionRect,o=0;"resizing"===e&&(o=30);var s=function(e){return parseFloat(a.node.getAttribute(e))},l={x:s("x"),y:s("y"),width:s("width"),height:s("height")};n.globals.selection=l,"function"==typeof n.config.chart.events.selection&&n.globals.selectionEnabled&&(clearTimeout(this.w.globals.selectionResizeTimer),this.w.globals.selectionResizeTimer=window.setTimeout((function(){var e=i.gridRect.getBoundingClientRect(),t=a.node.getBoundingClientRect(),o={xaxis:{min:n.globals.xAxisScale.niceMin+(t.left-e.left)*r.xRatio,max:n.globals.xAxisScale.niceMin+(t.right-e.left)*r.xRatio},yaxis:{min:n.globals.yAxisScale[0].niceMin+(e.bottom-t.bottom)*r.yRatio[0],max:n.globals.yAxisScale[0].niceMax-(t.top-e.top)*r.yRatio[0]}};n.config.chart.events.selection(i.ctx,o),n.config.chart.brush.enabled&&void 0!==n.config.chart.events.brushScrolled&&n.config.chart.events.brushScrolled(i.ctx,o)}),o))}},{key:"selectionDrawn",value:function(e){var t=e.context,i=e.zoomtype,n=this.w,r=t,a=this.xyRatios,o=this.ctx.toolbar;if(r.startX>r.endX){var s=r.startX;r.startX=r.endX,r.endX=s}if(r.startY>r.endY){var l=r.startY;r.startY=r.endY,r.endY=l}var c=void 0,h=void 0;n.globals.isTimelineBar?(c=n.globals.yAxisScale[0].niceMin+r.startX*a.invertedYRatio,h=n.globals.yAxisScale[0].niceMin+r.endX*a.invertedYRatio):(c=n.globals.xAxisScale.niceMin+r.startX*a.xRatio,h=n.globals.xAxisScale.niceMin+r.endX*a.xRatio);var d=[],u=[];if(n.config.yaxis.forEach((function(e,t){d.push(n.globals.yAxisScale[t].niceMax-a.yRatio[t]*r.startY),u.push(n.globals.yAxisScale[t].niceMax-a.yRatio[t]*r.endY)})),r.dragged&&(r.dragX>10||r.dragY>10)&&c!==h)if(n.globals.zoomEnabled){var p=y.clone(n.globals.initialConfig.yaxis),f=y.clone(n.globals.initialConfig.xaxis);if(n.globals.zoomed=!0,n.config.xaxis.convertedCatToNumeric&&(c=Math.floor(c),h=Math.floor(h),c<1&&(c=1,h=n.globals.dataPoints),h-c<2&&(h=c+1)),"xy"!==i&&"x"!==i||(f={min:c,max:h}),"xy"!==i&&"y"!==i||p.forEach((function(e,t){p[t].min=u[t],p[t].max=d[t]})),n.config.chart.zoom.autoScaleYaxis){var g=new Z(r.ctx);p=g.autoScaleY(r.ctx,p,{xaxis:f})}if(o){var m=o.getBeforeZoomRange(f,p);m&&(f=m.xaxis?m.xaxis:f,p=m.yaxis?m.yaxis:p)}var v={xaxis:f};n.config.chart.group||(v.yaxis=p),r.ctx.updateHelpers._updateOptions(v,!1,r.w.config.chart.animations.dynamicAnimation.enabled),"function"==typeof n.config.chart.events.zoomed&&o.zoomCallback(f,p)}else if(n.globals.selectionEnabled){var b,x=null;b={min:c,max:h},"xy"!==i&&"y"!==i||(x=y.clone(n.config.yaxis)).forEach((function(e,t){x[t].min=u[t],x[t].max=d[t]})),n.globals.selection=r.selection,"function"==typeof n.config.chart.events.selection&&n.config.chart.events.selection(r.ctx,{xaxis:b,yaxis:x})}}},{key:"panDragging",value:function(e){var t=e.context,i=this.w,n=t;if(void 0!==i.globals.lastClientPosition.x){var r=i.globals.lastClientPosition.x-n.clientX,a=i.globals.lastClientPosition.y-n.clientY;Math.abs(r)>Math.abs(a)&&r>0?this.moveDirection="left":Math.abs(r)>Math.abs(a)&&r<0?this.moveDirection="right":Math.abs(a)>Math.abs(r)&&a>0?this.moveDirection="up":Math.abs(a)>Math.abs(r)&&a<0&&(this.moveDirection="down")}i.globals.lastClientPosition={x:n.clientX,y:n.clientY};var o=i.globals.isTimelineBar?i.globals.minY:i.globals.minX,s=i.globals.isTimelineBar?i.globals.maxY:i.globals.maxX;i.config.xaxis.convertedCatToNumeric||n.panScrolled(o,s)}},{key:"delayedPanScrolled",value:function(){var e=this.w,t=e.globals.minX,i=e.globals.maxX,n=(e.globals.maxX-e.globals.minX)/2;"left"===this.moveDirection?(t=e.globals.minX+n,i=e.globals.maxX+n):"right"===this.moveDirection&&(t=e.globals.minX-n,i=e.globals.maxX-n),t=Math.floor(t),i=Math.floor(i),this.updateScrolledChart({xaxis:{min:t,max:i}},t,i)}},{key:"panScrolled",value:function(e,t){var i=this.w,n=this.xyRatios,r=y.clone(i.globals.initialConfig.yaxis),a=n.xRatio,o=i.globals.minX,s=i.globals.maxX;i.globals.isTimelineBar&&(a=n.invertedYRatio,o=i.globals.minY,s=i.globals.maxY),"left"===this.moveDirection?(e=o+i.globals.gridWidth/15*a,t=s+i.globals.gridWidth/15*a):"right"===this.moveDirection&&(e=o-i.globals.gridWidth/15*a,t=s-i.globals.gridWidth/15*a),i.globals.isTimelineBar||(e<i.globals.initialMinX||t>i.globals.initialMaxX)&&(e=o,t=s);var l={min:e,max:t};i.config.chart.zoom.autoScaleYaxis&&(r=new Z(this.ctx).autoScaleY(this.ctx,r,{xaxis:l}));var c={xaxis:{min:e,max:t}};i.config.chart.group||(c.yaxis=r),this.updateScrolledChart(c,e,t)}},{key:"updateScrolledChart",value:function(e,t,i){var n=this.w;this.ctx.updateHelpers._updateOptions(e,!1,!1),"function"==typeof n.config.chart.events.scrolled&&n.config.chart.events.scrolled(this.ctx,{xaxis:{min:t,max:i}})}}]),i}(),ge=function(){function e(t){o(this,e),this.w=t.w,this.ttCtx=t,this.ctx=t.ctx}return l(e,[{key:"getNearestValues",value:function(e){var t=e.hoverArea,i=e.elGrid,n=e.clientX,r=e.clientY,a=this.w,o=a.globals.gridWidth,s=a.globals.gridHeight,l=o/(a.globals.dataPoints-1),c=s/a.globals.dataPoints,h=i.getBoundingClientRect(),d=this.hasBars();!a.globals.comboCharts&&!d||a.config.xaxis.convertedCatToNumeric||(l=o/a.globals.dataPoints);var u=n-h.left-a.globals.barPadForNumericAxis,p=r-h.top;u<0||p<0||u>a.globals.gridWidth||p>a.globals.gridHeight?(t.classList.remove("hovering-zoom"),t.classList.remove("hovering-pan")):a.globals.zoomEnabled?(t.classList.remove("hovering-pan"),t.classList.add("hovering-zoom")):a.globals.panEnabled&&(t.classList.remove("hovering-zoom"),t.classList.add("hovering-pan"));var f=Math.round(u/l),g=Math.floor(p/c);d&&!a.config.xaxis.convertedCatToNumeric&&(f=Math.ceil(u/l),f-=1);for(var m,v=null,b=null,x=[],w=0;w<a.globals.seriesXvalues.length;w++)x.push([a.globals.seriesXvalues[w][0]-1e-6].concat(a.globals.seriesXvalues[w]));return x=x.map((function(e){return e.filter((function(e){return e}))})),m=a.globals.seriesYvalues.map((function(e){return e.filter((function(e){return y.isNumber(e)}))})),a.globals.isXNumeric&&(v=(b=this.closestInMultiArray(u,p,x,m)).index,f=b.j,null!==v&&(x=a.globals.seriesXvalues[v],f=(b=this.closestInArray(u,x)).index)),a.globals.capturedSeriesIndex=null===v?-1:v,(!f||f<1)&&(f=0),a.globals.capturedDataPointIndex=f,{capturedSeries:v,j:a.globals.isBarHorizontal?g:f,hoverX:u,hoverY:p}}},{key:"closestInMultiArray",value:function(e,t,i,n){var r=this.w,a=0,o=null,s=-1;r.globals.series.length>1?a=this.getFirstActiveXArray(i):o=0;var l=n[a][0],c=i[a][0],h=Math.abs(e-c),d=Math.abs(t-l),u=d+h;return n.map((function(r,a){r.map((function(r,l){var c=Math.abs(t-n[a][l]),p=Math.abs(e-i[a][l]),f=p+c;f<u&&(u=f,h=p,d=c,o=a,s=l)}))})),{index:o,j:s}}},{key:"getFirstActiveXArray",value:function(e){for(var t=0,i=e.map((function(e,t){return e.length>0?t:-1})),n=0;n<i.length;n++)if(-1!==i[n]){t=i[n];break}return t}},{key:"closestInArray",value:function(e,t){for(var i=t[0],n=null,r=Math.abs(e-i),a=0;a<t.length;a++){var o=Math.abs(e-t[a]);o<r&&(r=o,n=a)}return{index:n}}},{key:"isXoverlap",value:function(e){var t=[],i=this.w.globals.seriesX.filter((function(e){return void 0!==e[0]}));if(i.length>0)for(var n=0;n<i.length-1;n++)void 0!==i[n][e]&&void 0!==i[n+1][e]&&i[n][e]!==i[n+1][e]&&t.push("unEqual");return 0===t.length}},{key:"isInitialSeriesSameLen",value:function(){for(var e=!0,t=this.w.globals.initialSeries,i=0;i<t.length-1;i++)if(t[i].data.length!==t[i+1].data.length){e=!1;break}return e}},{key:"getBarsHeight",value:function(e){return m(e).reduce((function(e,t){return e+t.getBBox().height}),0)}},{key:"getElMarkers",value:function(){return this.w.globals.dom.baseEl.querySelectorAll(" .apexcharts-series-markers")}},{key:"getAllMarkers",value:function(){var e=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap");(e=m(e)).sort((function(e,t){return Number(t.getAttribute("data:realIndex"))<Number(e.getAttribute("data:realIndex"))?0:-1}));var t=[];return e.forEach((function(e){t.push(e.querySelector(".apexcharts-marker"))})),t}},{key:"hasMarkers",value:function(){return this.getElMarkers().length>0}},{key:"getElBars",value:function(){return this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-bar-series, .apexcharts-candlestick-series, .apexcharts-boxPlot-series, .apexcharts-rangebar-series")}},{key:"hasBars",value:function(){return this.getElBars().length>0}},{key:"getHoverMarkerSize",value:function(e){var t=this.w,i=t.config.markers.hover.size;return void 0===i&&(i=t.globals.markers.size[e]+t.config.markers.hover.sizeOffset),i}},{key:"toggleAllTooltipSeriesGroups",value:function(e){var t=this.w,i=this.ttCtx;0===i.allTooltipSeriesGroups.length&&(i.allTooltipSeriesGroups=t.globals.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group"));for(var n=i.allTooltipSeriesGroups,r=0;r<n.length;r++)"enable"===e?(n[r].classList.add("apexcharts-active"),n[r].style.display=t.config.tooltip.items.display):(n[r].classList.remove("apexcharts-active"),n[r].style.display="none")}}]),e}(),me=function(){function e(t){o(this,e),this.w=t.w,this.ctx=t.ctx,this.ttCtx=t,this.tooltipUtil=new ge(t)}return l(e,[{key:"drawSeriesTexts",value:function(e){var t=e.shared,i=void 0===t||t,n=e.ttItems,r=e.i,a=void 0===r?0:r,o=e.j,s=void 0===o?null:o,l=e.y1,c=e.y2,h=e.e,d=this.w;void 0!==d.config.tooltip.custom?this.handleCustomTooltip({i:a,j:s,y1:l,y2:c,w:d}):this.toggleActiveInactiveSeries(i);var u=this.getValuesToPrint({i:a,j:s});this.printLabels({i:a,j:s,values:u,ttItems:n,shared:i,e:h});var p=this.ttCtx.getElTooltip();this.ttCtx.tooltipRect.ttWidth=p.getBoundingClientRect().width,this.ttCtx.tooltipRect.ttHeight=p.getBoundingClientRect().height}},{key:"printLabels",value:function(e){var t,i=this,n=e.i,r=e.j,a=e.values,o=e.ttItems,s=e.shared,l=e.e,c=this.w,h=[],u=function(e){return c.globals.seriesGoals[e]&&c.globals.seriesGoals[e][r]&&Array.isArray(c.globals.seriesGoals[e][r])},p=a.xVal,f=a.zVal,g=a.xAxisTTVal,m="",v=c.globals.colors[n];null!==r&&c.config.plotOptions.bar.distributed&&(v=c.globals.colors[r]);for(var y=function(e,a){var y=i.getFormatters(n);m=i.getSeriesName({fn:y.yLbTitleFormatter,index:n,seriesIndex:n,j:r}),"treemap"===c.config.chart.type&&(m=y.yLbTitleFormatter(String(c.config.series[n].data[r].x),{series:c.globals.series,seriesIndex:n,dataPointIndex:r,w:c}));var b=c.config.tooltip.inverseOrder?a:e;if(c.globals.axisCharts){var x=function(e){return y.yLbFormatter(c.globals.series[e][r],{series:c.globals.series,seriesIndex:e,dataPointIndex:r,w:c})};s?(y=i.getFormatters(b),m=i.getSeriesName({fn:y.yLbTitleFormatter,index:b,seriesIndex:n,j:r}),v=c.globals.colors[b],t=x(b),u(b)&&(h=c.globals.seriesGoals[b][r].map((function(e){return{attrs:e,val:y.yLbFormatter(e.value,{seriesIndex:b,dataPointIndex:r,w:c})}})))):(l&&l.target&&l.target.getAttribute("fill")&&(v=l.target.getAttribute("fill")),t=x(n),u(n)&&Array.isArray(c.globals.seriesGoals[n][r])&&(h=c.globals.seriesGoals[n][r].map((function(e){return{attrs:e,val:y.yLbFormatter(e.value,{seriesIndex:n,dataPointIndex:r,w:c})}}))))}null===r&&(t=y.yLbFormatter(c.globals.series[n],d(d({},c),{},{seriesIndex:n,dataPointIndex:n}))),i.DOMHandling({i:n,t:b,j:r,ttItems:o,values:{val:t,goalVals:h,xVal:p,xAxisTTVal:g,zVal:f},seriesName:m,shared:s,pColor:v})},b=0,x=c.globals.series.length-1;b<c.globals.series.length;b++,x--)y(b,x)}},{key:"getFormatters",value:function(e){var t,i=this.w,n=i.globals.yLabelFormatters[e];return void 0!==i.globals.ttVal?Array.isArray(i.globals.ttVal)?(n=i.globals.ttVal[e]&&i.globals.ttVal[e].formatter,t=i.globals.ttVal[e]&&i.globals.ttVal[e].title&&i.globals.ttVal[e].title.formatter):(n=i.globals.ttVal.formatter,"function"==typeof i.globals.ttVal.title.formatter&&(t=i.globals.ttVal.title.formatter)):t=i.config.tooltip.y.title.formatter,"function"!=typeof n&&(n=i.globals.yLabelFormatters[0]?i.globals.yLabelFormatters[0]:function(e){return e}),"function"!=typeof t&&(t=function(e){return e}),{yLbFormatter:n,yLbTitleFormatter:t}}},{key:"getSeriesName",value:function(e){var t=e.fn,i=e.index,n=e.seriesIndex,r=e.j,a=this.w;return t(String(a.globals.seriesNames[i]),{series:a.globals.series,seriesIndex:n,dataPointIndex:r,w:a})}},{key:"DOMHandling",value:function(e){e.i;var t=e.t,i=e.j,n=e.ttItems,r=e.values,a=e.seriesName,o=e.shared,s=e.pColor,l=this.w,c=this.ttCtx;Object.keys(r).forEach((function(e){"string"==typeof r[e]&&(r[e]=y.sanitizeDom(r[e]))}));var h=r.val,d=r.goalVals,u=r.xVal,p=r.xAxisTTVal,f=r.zVal,g=null;g=n[t].children,l.config.tooltip.fillSeriesColor&&(n[t].style.backgroundColor=s,g[0].style.display="none"),c.showTooltipTitle&&(null===c.tooltipTitle&&(c.tooltipTitle=l.globals.dom.baseEl.querySelector(".apexcharts-tooltip-title")),c.tooltipTitle.innerHTML=u),c.blxaxisTooltip&&(c.xaxisTooltipText.innerHTML=""!==p?p:u);var m=n[t].querySelector(".apexcharts-tooltip-text-y-label");m&&(m.innerHTML=a?y.sanitizeDom(a):"");var v=n[t].querySelector(".apexcharts-tooltip-text-y-value");v&&(v.innerHTML=void 0!==h?h:""),g[0]&&g[0].classList.contains("apexcharts-tooltip-marker")&&(l.config.tooltip.marker.fillColors&&Array.isArray(l.config.tooltip.marker.fillColors)&&(s=l.config.tooltip.marker.fillColors[t]),g[0].style.backgroundColor=s),l.config.tooltip.marker.show||(g[0].style.display="none");var b=n[t].querySelector(".apexcharts-tooltip-text-goals-label"),x=n[t].querySelector(".apexcharts-tooltip-text-goals-value");if(d.length&&l.globals.seriesGoals[t]){var w=function(){var e="<div >",t="<div>";d.forEach((function(i,n){e+=' <div style="display: flex"><span class="apexcharts-tooltip-marker" style="background-color: '.concat(i.attrs.strokeColor,'; height: 3px; border-radius: 0; top: 5px;"></span> ').concat(i.attrs.name,"</div>"),t+="<div>".concat(i.val,"</div>")})),b.innerHTML=e+"</div>",x.innerHTML=t+"</div>"};o?l.globals.seriesGoals[t][i]&&Array.isArray(l.globals.seriesGoals[t][i])?w():(b.innerHTML="",x.innerHTML=""):w()}else b.innerHTML="",x.innerHTML="";null!==f&&(n[t].querySelector(".apexcharts-tooltip-text-z-label").innerHTML=l.config.tooltip.z.title,n[t].querySelector(".apexcharts-tooltip-text-z-value").innerHTML=void 0!==f?f:""),o&&g[0]&&(null==h||l.globals.collapsedSeriesIndices.indexOf(t)>-1?g[0].parentNode.style.display="none":g[0].parentNode.style.display=l.config.tooltip.items.display)}},{key:"toggleActiveInactiveSeries",value:function(e){var t=this.w;if(e)this.tooltipUtil.toggleAllTooltipSeriesGroups("enable");else{this.tooltipUtil.toggleAllTooltipSeriesGroups("disable");var i=t.globals.dom.baseEl.querySelector(".apexcharts-tooltip-series-group");i&&(i.classList.add("apexcharts-active"),i.style.display=t.config.tooltip.items.display)}}},{key:"getValuesToPrint",value:function(e){var t=e.i,i=e.j,n=this.w,r=this.ctx.series.filteredSeriesX(),a="",o="",s=null,l=null,c={series:n.globals.series,seriesIndex:t,dataPointIndex:i,w:n},h=n.globals.ttZFormatter;null===i?l=n.globals.series[t]:n.globals.isXNumeric&&"treemap"!==n.config.chart.type?(a=r[t][i],0===r[t].length&&(a=r[this.tooltipUtil.getFirstActiveXArray(r)][i])):a=void 0!==n.globals.labels[i]?n.globals.labels[i]:"";var d=a;return a=n.globals.isXNumeric&&"datetime"===n.config.xaxis.type?new W(this.ctx).xLabelFormat(n.globals.ttKeyFormatter,d,d,{i:void 0,dateFormatter:new F(this.ctx).formatDate,w:this.w}):n.globals.isBarHorizontal?n.globals.yLabelFormatters[0](d,c):n.globals.xLabelFormatter(d,c),void 0!==n.config.tooltip.x.formatter&&(a=n.globals.ttKeyFormatter(d,c)),n.globals.seriesZ.length>0&&n.globals.seriesZ[t].length>0&&(s=h(n.globals.seriesZ[t][i],n)),o="function"==typeof n.config.xaxis.tooltip.formatter?n.globals.xaxisTooltipFormatter(d,c):a,{val:Array.isArray(l)?l.join(" "):l,xVal:Array.isArray(a)?a.join(" "):a,xAxisTTVal:Array.isArray(o)?o.join(" "):o,zVal:s}}},{key:"handleCustomTooltip",value:function(e){var t=e.i,i=e.j,n=e.y1,r=e.y2,a=e.w,o=this.ttCtx.getElTooltip(),s=a.config.tooltip.custom;Array.isArray(s)&&s[t]&&(s=s[t]),o.innerHTML=s({ctx:this.ctx,series:a.globals.series,seriesIndex:t,dataPointIndex:i,y1:n,y2:r,w:a})}}]),e}(),ve=function(){function e(t){o(this,e),this.ttCtx=t,this.ctx=t.ctx,this.w=t.w}return l(e,[{key:"moveXCrosshairs",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.ttCtx,n=this.w,r=i.getElXCrosshairs(),a=e-i.xcrosshairsWidth/2,o=n.globals.labels.slice().length;if(null!==t&&(a=n.globals.gridWidth/o*t),null!==r&&(r.setAttribute("x",a),r.setAttribute("x1",a),r.setAttribute("x2",a),r.setAttribute("y2",n.globals.gridHeight),r.classList.add("apexcharts-active")),a<0&&(a=0),a>n.globals.gridWidth&&(a=n.globals.gridWidth),i.blxaxisTooltip){var s=a;"tickWidth"!==n.config.xaxis.crosshairs.width&&"barWidth"!==n.config.xaxis.crosshairs.width||(s=a+i.xcrosshairsWidth/2),this.moveXAxisTooltip(s)}}},{key:"moveYCrosshairs",value:function(e){var t=this.ttCtx;null!==t.ycrosshairs&&w.setAttrs(t.ycrosshairs,{y1:e,y2:e}),null!==t.ycrosshairsHidden&&w.setAttrs(t.ycrosshairsHidden,{y1:e,y2:e})}},{key:"moveXAxisTooltip",value:function(e){var t=this.w,i=this.ttCtx;if(null!==i.xaxisTooltip){i.xaxisTooltip.classList.add("apexcharts-active");var n,r=i.xaxisOffY+t.config.xaxis.tooltip.offsetY+t.globals.translateY+1+t.config.xaxis.offsetY;if(e-=i.xaxisTooltip.getBoundingClientRect().width/2,!isNaN(e))e+=t.globals.translateX,n=new w(this.ctx).getTextRects(i.xaxisTooltipText.innerHTML),i.xaxisTooltipText.style.minWidth=n.width+"px",i.xaxisTooltip.style.left=e+"px",i.xaxisTooltip.style.top=r+"px"}}},{key:"moveYAxisTooltip",value:function(e){var t=this.w,i=this.ttCtx;null===i.yaxisTTEls&&(i.yaxisTTEls=t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));var n=parseInt(i.ycrosshairsHidden.getAttribute("y1"),10),r=t.globals.translateY+n,a=i.yaxisTTEls[e].getBoundingClientRect().height,o=t.globals.translateYAxisX[e]-2;t.config.yaxis[e].opposite&&(o-=26),r-=a/2,-1===t.globals.ignoreYAxisIndexes.indexOf(e)?(i.yaxisTTEls[e].classList.add("apexcharts-active"),i.yaxisTTEls[e].style.top=r+"px",i.yaxisTTEls[e].style.left=o+t.config.yaxis[e].tooltip.offsetX+"px"):i.yaxisTTEls[e].classList.remove("apexcharts-active")}},{key:"moveTooltip",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=this.w,r=this.ttCtx,a=r.getElTooltip(),o=r.tooltipRect,s=null!==i?parseFloat(i):1,l=parseFloat(e)+s+5,c=parseFloat(t)+s/2;if(l>n.globals.gridWidth/2&&(l=l-o.ttWidth-s-15),l>n.globals.gridWidth-o.ttWidth-10&&(l=n.globals.gridWidth-o.ttWidth),l<-20&&(l=-20),n.config.tooltip.followCursor){var h=r.getElGrid(),d=h.getBoundingClientRect();c=r.e.clientY+n.globals.translateY-d.top-o.ttHeight/2}else n.globals.isBarHorizontal?c-=o.ttHeight:(o.ttHeight/2+c>n.globals.gridHeight&&(c=n.globals.gridHeight-o.ttHeight+n.globals.translateY),c<0&&(c=0));isNaN(l)||(l+=n.globals.translateX,a.style.left=l+"px",a.style.top=c+"px")}},{key:"moveMarkers",value:function(e,t){var i=this.w,n=this.ttCtx;if(i.globals.markers.size[e]>0)for(var r=i.globals.dom.baseEl.querySelectorAll(" .apexcharts-series[data\\:realIndex='".concat(e,"'] .apexcharts-marker")),a=0;a<r.length;a++)parseInt(r[a].getAttribute("rel"),10)===t&&(n.marker.resetPointsSize(),n.marker.enlargeCurrentPoint(t,r[a]));else n.marker.resetPointsSize(),this.moveDynamicPointOnHover(t,e)}},{key:"moveDynamicPointOnHover",value:function(e,t){var i,n,r=this.w,a=this.ttCtx,o=r.globals.pointsArray,s=a.tooltipUtil.getHoverMarkerSize(t),l=r.config.series[t].type;if(!l||"column"!==l&&"candlestick"!==l&&"boxPlot"!==l){i=o[t][e][0],n=o[t][e][1]?o[t][e][1]:0;var c=r.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(t,"'] .apexcharts-series-markers circle"));c&&n<r.globals.gridHeight&&n>0&&(c.setAttribute("r",s),c.setAttribute("cx",i),c.setAttribute("cy",n)),this.moveXCrosshairs(i),a.fixedTooltip||this.moveTooltip(i,n,s)}}},{key:"moveDynamicPointsOnHover",value:function(e){var t,i=this.ttCtx,n=i.w,r=0,a=0,o=n.globals.pointsArray;t=new z(this.ctx).getActiveConfigSeriesIndex(!0);var s=i.tooltipUtil.getHoverMarkerSize(t);o[t]&&(r=o[t][e][0],a=o[t][e][1]);var l=i.tooltipUtil.getAllMarkers();if(null!==l)for(var c=0;c<n.globals.series.length;c++){var h=o[c];if(n.globals.comboCharts&&void 0===h&&l.splice(c,0,null),h&&h.length){var d=o[c][e][1];l[c].setAttribute("cx",r),null!==d&&!isNaN(d)&&d<n.globals.gridHeight&&d>0?(l[c]&&l[c].setAttribute("r",s),l[c]&&l[c].setAttribute("cy",d)):l[c]&&l[c].setAttribute("r",0)}}if(this.moveXCrosshairs(r),!i.fixedTooltip){var u=a||n.globals.gridHeight;this.moveTooltip(r,u,s)}}},{key:"moveStickyTooltipOverBars",value:function(e){var t=this.w,i=this.ttCtx,n=t.globals.columnSeries?t.globals.columnSeries.length:t.globals.series.length,r=n>=2&&n%2==0?Math.floor(n/2):Math.floor(n/2)+1;t.globals.isBarHorizontal&&(r=new z(this.ctx).getActiveConfigSeriesIndex(!1,"desc")+1);var a=t.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[rel='".concat(r,"'] path[j='").concat(e,"'], .apexcharts-candlestick-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(e,"'], .apexcharts-boxPlot-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(e,"'], .apexcharts-rangebar-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(e,"']")),o=a?parseFloat(a.getAttribute("cx")):0,s=a?parseFloat(a.getAttribute("cy")):0,l=a?parseFloat(a.getAttribute("barWidth")):0,c=a?parseFloat(a.getAttribute("barHeight")):0,h=i.getElGrid().getBoundingClientRect();if(t.globals.isXNumeric?(o-=n%2!=0?l/2:0,a&&(a.classList.contains("apexcharts-candlestick-area")||a.classList.contains("apexcharts-boxPlot-area"))&&t.globals.comboCharts&&(o-=l/2)):t.globals.isBarHorizontal||(o=i.xAxisTicksPositions[e-1]+i.dataPointsDividedWidth/2,isNaN(o)&&(o=i.xAxisTicksPositions[e]-i.dataPointsDividedWidth/2)),t.globals.isBarHorizontal?s+=c/3:s=i.e.clientY-h.top-i.tooltipRect.ttHeight/2,t.globals.isBarHorizontal||this.moveXCrosshairs(o),!i.fixedTooltip){var d=s||t.globals.gridHeight;this.moveTooltip(o,d)}}}]),e}(),ye=function(){function e(t){o(this,e),this.w=t.w,this.ttCtx=t,this.ctx=t.ctx,this.tooltipPosition=new ve(t)}return l(e,[{key:"drawDynamicPoints",value:function(){var e=this.w,t=new w(this.ctx),i=new M(this.ctx),n=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series");n=m(n),e.config.chart.stacked&&n.sort((function(e,t){return parseFloat(e.getAttribute("data:realIndex"))-parseFloat(t.getAttribute("data:realIndex"))}));for(var r=0;r<n.length;r++){var a=n[r].querySelector(".apexcharts-series-markers-wrap");if(null!==a){var o=void 0,s="apexcharts-marker w".concat((Math.random()+1).toString(36).substring(4));"line"!==e.config.chart.type&&"area"!==e.config.chart.type||e.globals.comboCharts||e.config.tooltip.intersect||(s+=" no-pointer-events");var l=i.getMarkerConfig(s,r);(o=t.drawMarker(0,0,l)).node.setAttribute("default-marker-size",0);var c=document.createElementNS(e.globals.SVGNS,"g");c.classList.add("apexcharts-series-markers"),c.appendChild(o.node),a.appendChild(c)}}}},{key:"enlargeCurrentPoint",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,r=this.w;"bubble"!==r.config.chart.type&&this.newPointSize(e,t);var a=t.getAttribute("cx"),o=t.getAttribute("cy");if(null!==i&&null!==n&&(a=i,o=n),this.tooltipPosition.moveXCrosshairs(a),!this.fixedTooltip){if("radar"===r.config.chart.type){var s=this.ttCtx.getElGrid(),l=s.getBoundingClientRect();a=this.ttCtx.e.clientX-l.left}this.tooltipPosition.moveTooltip(a,o,r.config.markers.hover.size)}}},{key:"enlargePoints",value:function(e){for(var t=this.w,i=this,n=this.ttCtx,r=e,a=t.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),o=t.config.markers.hover.size,s=0;s<a.length;s++){var l=a[s].getAttribute("rel"),c=a[s].getAttribute("index");if(void 0===o&&(o=t.globals.markers.size[c]+t.config.markers.hover.sizeOffset),r===parseInt(l,10)){i.newPointSize(r,a[s]);var h=a[s].getAttribute("cx"),d=a[s].getAttribute("cy");i.tooltipPosition.moveXCrosshairs(h),n.fixedTooltip||i.tooltipPosition.moveTooltip(h,d,o)}else i.oldPointSize(a[s])}}},{key:"newPointSize",value:function(e,t){var i=this.w,n=i.config.markers.hover.size,r=0===e?t.parentNode.firstChild:t.parentNode.lastChild;if("0"!==r.getAttribute("default-marker-size")){var a=parseInt(r.getAttribute("index"),10);void 0===n&&(n=i.globals.markers.size[a]+i.config.markers.hover.sizeOffset),n<0&&(n=0),r.setAttribute("r",n)}}},{key:"oldPointSize",value:function(e){var t=parseFloat(e.getAttribute("default-marker-size"));e.setAttribute("r",t)}},{key:"resetPointsSize",value:function(){for(var e=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),t=0;t<e.length;t++){var i=parseFloat(e[t].getAttribute("default-marker-size"));y.isNumber(i)&&i>=0?e[t].setAttribute("r",i):e[t].setAttribute("r",0)}}}]),e}(),be=function(){function e(t){o(this,e),this.w=t.w,this.ttCtx=t}return l(e,[{key:"getAttr",value:function(e,t){return parseFloat(e.target.getAttribute(t))}},{key:"handleHeatTreeTooltip",value:function(e){var t=e.e,i=e.opt,n=e.x,r=e.y,a=e.type,o=this.ttCtx,s=this.w;if(t.target.classList.contains("apexcharts-".concat(a,"-rect"))){var l=this.getAttr(t,"i"),c=this.getAttr(t,"j"),h=this.getAttr(t,"cx"),d=this.getAttr(t,"cy"),u=this.getAttr(t,"width"),p=this.getAttr(t,"height");if(o.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:l,j:c,shared:!1,e:t}),s.globals.capturedSeriesIndex=l,s.globals.capturedDataPointIndex=c,n=h+o.tooltipRect.ttWidth/2+u,r=d+o.tooltipRect.ttHeight/2-p/2,o.tooltipPosition.moveXCrosshairs(h+u/2),n>s.globals.gridWidth/2&&(n=h-o.tooltipRect.ttWidth/2+u),o.w.config.tooltip.followCursor){var f=s.globals.dom.elWrap.getBoundingClientRect();n=s.globals.clientX-f.left-o.tooltipRect.ttWidth/2,r=s.globals.clientY-f.top-o.tooltipRect.ttHeight-5}}return{x:n,y:r}}},{key:"handleMarkerTooltip",value:function(e){var t,i,n=e.e,r=e.opt,a=e.x,o=e.y,s=this.w,l=this.ttCtx;if(n.target.classList.contains("apexcharts-marker")){var c=parseInt(r.paths.getAttribute("cx"),10),h=parseInt(r.paths.getAttribute("cy"),10),d=parseFloat(r.paths.getAttribute("val"));if(i=parseInt(r.paths.getAttribute("rel"),10),t=parseInt(r.paths.parentNode.parentNode.parentNode.getAttribute("rel"),10)-1,l.intersect){var u=y.findAncestor(r.paths,"apexcharts-series");u&&(t=parseInt(u.getAttribute("data:realIndex"),10))}if(l.tooltipLabels.drawSeriesTexts({ttItems:r.ttItems,i:t,j:i,shared:!l.showOnIntersect&&s.config.tooltip.shared,e:n}),"mouseup"===n.type&&l.markerClick(n,t,i),s.globals.capturedSeriesIndex=t,s.globals.capturedDataPointIndex=i,a=c,o=h+s.globals.translateY-1.4*l.tooltipRect.ttHeight,l.w.config.tooltip.followCursor){var p=l.getElGrid().getBoundingClientRect();o=l.e.clientY+s.globals.translateY-p.top}d<0&&(o=h),l.marker.enlargeCurrentPoint(i,r.paths,a,o)}return{x:a,y:o}}},{key:"handleBarTooltip",value:function(e){var t,i,n=e.e,r=e.opt,a=this.w,o=this.ttCtx,s=o.getElTooltip(),l=0,c=0,h=0,d=this.getBarTooltipXY({e:n,opt:r});t=d.i;var u=d.barHeight,p=d.j;a.globals.capturedSeriesIndex=t,a.globals.capturedDataPointIndex=p,a.globals.isBarHorizontal&&o.tooltipUtil.hasBars()||!a.config.tooltip.shared?(c=d.x,h=d.y,i=Array.isArray(a.config.stroke.width)?a.config.stroke.width[t]:a.config.stroke.width,l=c):a.globals.comboCharts||a.config.tooltip.shared||(l/=2),isNaN(h)?h=a.globals.svgHeight-o.tooltipRect.ttHeight:h<0&&(h=0);var f=parseInt(r.paths.parentNode.getAttribute("data:realIndex"),10),g=a.globals.isMultipleYAxis?a.config.yaxis[f]&&a.config.yaxis[f].reversed:a.config.yaxis[0].reversed;if(c+o.tooltipRect.ttWidth>a.globals.gridWidth&&!g?c-=o.tooltipRect.ttWidth:c<0&&(c=0),o.w.config.tooltip.followCursor){var m=o.getElGrid().getBoundingClientRect();h=o.e.clientY-m.top}null===o.tooltip&&(o.tooltip=a.globals.dom.baseEl.querySelector(".apexcharts-tooltip")),a.config.tooltip.shared||(a.globals.comboBarCount>0?o.tooltipPosition.moveXCrosshairs(l+i/2):o.tooltipPosition.moveXCrosshairs(l)),!o.fixedTooltip&&(!a.config.tooltip.shared||a.globals.isBarHorizontal&&o.tooltipUtil.hasBars())&&(g&&(c-=o.tooltipRect.ttWidth)<0&&(c=0),s.style.left=c+a.globals.translateX+"px",!g||a.globals.isBarHorizontal&&o.tooltipUtil.hasBars()||(h=h+u-2*(a.globals.series[t][p]<0?u:0)),o.tooltipRect.ttHeight+h>a.globals.gridHeight?(h=a.globals.gridHeight-o.tooltipRect.ttHeight+a.globals.translateY,s.style.top=h+"px"):s.style.top=h+a.globals.translateY-o.tooltipRect.ttHeight/2+"px")}},{key:"getBarTooltipXY",value:function(e){var t=e.e,i=e.opt,n=this.w,r=null,a=this.ttCtx,o=0,s=0,l=0,c=0,h=0,d=t.target.classList;if(d.contains("apexcharts-bar-area")||d.contains("apexcharts-candlestick-area")||d.contains("apexcharts-boxPlot-area")||d.contains("apexcharts-rangebar-area")){var u=t.target,p=u.getBoundingClientRect(),f=i.elGrid.getBoundingClientRect(),g=p.height;h=p.height;var m=p.width,v=parseInt(u.getAttribute("cx"),10),y=parseInt(u.getAttribute("cy"),10);c=parseFloat(u.getAttribute("barWidth"));var b="touchmove"===t.type?t.touches[0].clientX:t.clientX;r=parseInt(u.getAttribute("j"),10),o=parseInt(u.parentNode.getAttribute("rel"),10)-1;var x=u.getAttribute("data-range-y1"),w=u.getAttribute("data-range-y2");n.globals.comboCharts&&(o=parseInt(u.parentNode.getAttribute("data:realIndex"),10)),a.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:o,j:r,y1:x?parseInt(x,10):null,y2:w?parseInt(w,10):null,shared:!a.showOnIntersect&&n.config.tooltip.shared,e:t}),n.config.tooltip.followCursor?n.globals.isBarHorizontal?(s=b-f.left+15,l=y-a.dataPointsDividedHeight+g/2-a.tooltipRect.ttHeight/2):(s=n.globals.isXNumeric?v-m/2:v-a.dataPointsDividedWidth+m/2,l=t.clientY-f.top-a.tooltipRect.ttHeight/2-15):n.globals.isBarHorizontal?((s=v)<a.xyRatios.baseLineInvertedY&&(s=v-a.tooltipRect.ttWidth),l=y-a.dataPointsDividedHeight+g/2-a.tooltipRect.ttHeight/2):(s=n.globals.isXNumeric?v-m/2:v-a.dataPointsDividedWidth+m/2,l=y)}return{x:s,y:l,barHeight:h,barWidth:c,i:o,j:r}}}]),e}(),xe=function(){function e(t){o(this,e),this.w=t.w,this.ttCtx=t}return l(e,[{key:"drawXaxisTooltip",value:function(){var e=this.w,t=this.ttCtx,i="bottom"===e.config.xaxis.position;t.xaxisOffY=i?e.globals.gridHeight+1:-e.globals.xAxisHeight-e.config.xaxis.axisTicks.height+3;var n=i?"apexcharts-xaxistooltip apexcharts-xaxistooltip-bottom":"apexcharts-xaxistooltip apexcharts-xaxistooltip-top",r=e.globals.dom.elWrap;t.blxaxisTooltip&&null===e.globals.dom.baseEl.querySelector(".apexcharts-xaxistooltip")&&(t.xaxisTooltip=document.createElement("div"),t.xaxisTooltip.setAttribute("class",n+" apexcharts-theme-"+e.config.tooltip.theme),r.appendChild(t.xaxisTooltip),t.xaxisTooltipText=document.createElement("div"),t.xaxisTooltipText.classList.add("apexcharts-xaxistooltip-text"),t.xaxisTooltipText.style.fontFamily=e.config.xaxis.tooltip.style.fontFamily||e.config.chart.fontFamily,t.xaxisTooltipText.style.fontSize=e.config.xaxis.tooltip.style.fontSize,t.xaxisTooltip.appendChild(t.xaxisTooltipText))}},{key:"drawYaxisTooltip",value:function(){for(var e=this.w,t=this.ttCtx,i=function(i){var n=e.config.yaxis[i].opposite||e.config.yaxis[i].crosshairs.opposite;t.yaxisOffX=n?e.globals.gridWidth+1:1;var r="apexcharts-yaxistooltip apexcharts-yaxistooltip-".concat(i,n?" apexcharts-yaxistooltip-right":" apexcharts-yaxistooltip-left");e.globals.yAxisSameScaleIndices.map((function(t,n){t.map((function(t,n){n===i&&(r+=e.config.yaxis[n].show?" ":" apexcharts-yaxistooltip-hidden")}))}));var a=e.globals.dom.elWrap;null===e.globals.dom.baseEl.querySelector(".apexcharts-yaxistooltip apexcharts-yaxistooltip-".concat(i))&&(t.yaxisTooltip=document.createElement("div"),t.yaxisTooltip.setAttribute("class",r+" apexcharts-theme-"+e.config.tooltip.theme),a.appendChild(t.yaxisTooltip),0===i&&(t.yaxisTooltipText=[]),t.yaxisTooltipText[i]=document.createElement("div"),t.yaxisTooltipText[i].classList.add("apexcharts-yaxistooltip-text"),t.yaxisTooltip.appendChild(t.yaxisTooltipText[i]))},n=0;n<e.config.yaxis.length;n++)i(n)}},{key:"setXCrosshairWidth",value:function(){var e=this.w,t=this.ttCtx,i=t.getElXCrosshairs();if(t.xcrosshairsWidth=parseInt(e.config.xaxis.crosshairs.width,10),e.globals.comboCharts){var n=e.globals.dom.baseEl.querySelector(".apexcharts-bar-area");if(null!==n&&"barWidth"===e.config.xaxis.crosshairs.width){var r=parseFloat(n.getAttribute("barWidth"));t.xcrosshairsWidth=r}else if("tickWidth"===e.config.xaxis.crosshairs.width){var a=e.globals.labels.length;t.xcrosshairsWidth=e.globals.gridWidth/a}}else if("tickWidth"===e.config.xaxis.crosshairs.width){var o=e.globals.labels.length;t.xcrosshairsWidth=e.globals.gridWidth/o}else if("barWidth"===e.config.xaxis.crosshairs.width){var s=e.globals.dom.baseEl.querySelector(".apexcharts-bar-area");if(null!==s){var l=parseFloat(s.getAttribute("barWidth"));t.xcrosshairsWidth=l}else t.xcrosshairsWidth=1}e.globals.isBarHorizontal&&(t.xcrosshairsWidth=0),null!==i&&t.xcrosshairsWidth>0&&i.setAttribute("width",t.xcrosshairsWidth)}},{key:"handleYCrosshair",value:function(){var e=this.w,t=this.ttCtx;t.ycrosshairs=e.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs"),t.ycrosshairsHidden=e.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs-hidden")}},{key:"drawYaxisTooltipText",value:function(e,t,i){var n=this.ttCtx,r=this.w,a=r.globals.yLabelFormatters[e];if(n.yaxisTooltips[e]){var o=n.getElGrid().getBoundingClientRect(),s=(t-o.top)*i.yRatio[e],l=r.globals.maxYArr[e]-r.globals.minYArr[e],c=r.globals.minYArr[e]+(l-s);n.tooltipPosition.moveYCrosshairs(t-o.top),n.yaxisTooltipText[e].innerHTML=a(c),n.tooltipPosition.moveYAxisTooltip(e)}}}]),e}(),we=function(){function e(t){o(this,e),this.ctx=t,this.w=t.w;var i=this.w;this.tConfig=i.config.tooltip,this.tooltipUtil=new ge(this),this.tooltipLabels=new me(this),this.tooltipPosition=new ve(this),this.marker=new ye(this),this.intersect=new be(this),this.axesTooltip=new xe(this),this.showOnIntersect=this.tConfig.intersect,this.showTooltipTitle=this.tConfig.x.show,this.fixedTooltip=this.tConfig.fixed.enabled,this.xaxisTooltip=null,this.yaxisTTEls=null,this.isBarShared=!i.globals.isBarHorizontal&&this.tConfig.shared}return l(e,[{key:"getElTooltip",value:function(e){return e||(e=this),e.w.globals.dom.baseEl.querySelector(".apexcharts-tooltip")}},{key:"getElXCrosshairs",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-xcrosshairs")}},{key:"getElGrid",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-grid")}},{key:"drawTooltip",value:function(e){var t=this.w;this.xyRatios=e,this.blxaxisTooltip=t.config.xaxis.tooltip.enabled&&t.globals.axisCharts,this.yaxisTooltips=t.config.yaxis.map((function(e,i){return!!(e.show&&e.tooltip.enabled&&t.globals.axisCharts)})),this.allTooltipSeriesGroups=[],t.globals.axisCharts||(this.showTooltipTitle=!1);var i=document.createElement("div");if(i.classList.add("apexcharts-tooltip"),i.classList.add("apexcharts-theme-".concat(this.tConfig.theme)),t.globals.dom.elWrap.appendChild(i),t.globals.axisCharts){this.axesTooltip.drawXaxisTooltip(),this.axesTooltip.drawYaxisTooltip(),this.axesTooltip.setXCrosshairWidth(),this.axesTooltip.handleYCrosshair();var n=new U(this.ctx);this.xAxisTicksPositions=n.getXAxisTicksPositions()}if(!t.globals.comboCharts&&!this.tConfig.intersect&&"rangeBar"!==t.config.chart.type||this.tConfig.shared||(this.showOnIntersect=!0),0!==t.config.markers.size&&0!==t.globals.markers.largestSize||this.marker.drawDynamicPoints(this),t.globals.collapsedSeries.length!==t.globals.series.length){this.dataPointsDividedHeight=t.globals.gridHeight/t.globals.dataPoints,this.dataPointsDividedWidth=t.globals.gridWidth/t.globals.dataPoints,this.showTooltipTitle&&(this.tooltipTitle=document.createElement("div"),this.tooltipTitle.classList.add("apexcharts-tooltip-title"),this.tooltipTitle.style.fontFamily=this.tConfig.style.fontFamily||t.config.chart.fontFamily,this.tooltipTitle.style.fontSize=this.tConfig.style.fontSize,i.appendChild(this.tooltipTitle));var r=t.globals.series.length;(t.globals.xyCharts||t.globals.comboCharts)&&this.tConfig.shared&&(r=this.showOnIntersect?1:t.globals.series.length),this.legendLabels=t.globals.dom.baseEl.querySelectorAll(".apexcharts-legend-text"),this.ttItems=this.createTTElements(r),this.addSVGEvents()}}},{key:"createTTElements",value:function(e){for(var t=this,i=this.w,n=[],r=this.getElTooltip(),a=function(a){var o=document.createElement("div");o.classList.add("apexcharts-tooltip-series-group"),o.style.order=i.config.tooltip.inverseOrder?e-a:a+1,t.tConfig.shared&&t.tConfig.enabledOnSeries&&Array.isArray(t.tConfig.enabledOnSeries)&&t.tConfig.enabledOnSeries.indexOf(a)<0&&o.classList.add("apexcharts-tooltip-series-group-hidden");var s=document.createElement("span");s.classList.add("apexcharts-tooltip-marker"),s.style.backgroundColor=i.globals.colors[a],o.appendChild(s);var l=document.createElement("div");l.classList.add("apexcharts-tooltip-text"),l.style.fontFamily=t.tConfig.style.fontFamily||i.config.chart.fontFamily,l.style.fontSize=t.tConfig.style.fontSize,["y","goals","z"].forEach((function(e){var t=document.createElement("div");t.classList.add("apexcharts-tooltip-".concat(e,"-group"));var i=document.createElement("span");i.classList.add("apexcharts-tooltip-text-".concat(e,"-label")),t.appendChild(i);var n=document.createElement("span");n.classList.add("apexcharts-tooltip-text-".concat(e,"-value")),t.appendChild(n),l.appendChild(t)})),o.appendChild(l),r.appendChild(o),n.push(o)},o=0;o<e;o++)a(o);return n}},{key:"addSVGEvents",value:function(){var e=this.w,t=e.config.chart.type,i=this.getElTooltip(),n=!("bar"!==t&&"candlestick"!==t&&"boxPlot"!==t&&"rangeBar"!==t),r="area"===t||"line"===t||"scatter"===t||"bubble"===t||"radar"===t,a=e.globals.dom.Paper.node,o=this.getElGrid();o&&(this.seriesBound=o.getBoundingClientRect());var s,l=[],c=[],h={hoverArea:a,elGrid:o,tooltipEl:i,tooltipY:l,tooltipX:c,ttItems:this.ttItems};if(e.globals.axisCharts&&(r?s=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series[data\\:longestSeries='true'] .apexcharts-marker"):n?s=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series .apexcharts-bar-area, .apexcharts-series .apexcharts-candlestick-area, .apexcharts-series .apexcharts-boxPlot-area, .apexcharts-series .apexcharts-rangebar-area"):"heatmap"!==t&&"treemap"!==t||(s=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series .apexcharts-heatmap, .apexcharts-series .apexcharts-treemap")),s&&s.length))for(var d=0;d<s.length;d++)l.push(s[d].getAttribute("cy")),c.push(s[d].getAttribute("cx"));if(e.globals.xyCharts&&!this.showOnIntersect||e.globals.comboCharts&&!this.showOnIntersect||n&&this.tooltipUtil.hasBars()&&this.tConfig.shared)this.addPathsEventListeners([a],h);else if(n&&!e.globals.comboCharts||r&&this.showOnIntersect)this.addDatapointEventsListeners(h);else if(!e.globals.axisCharts||"heatmap"===t||"treemap"===t){var u=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series");this.addPathsEventListeners(u,h)}if(this.showOnIntersect){var p=e.globals.dom.baseEl.querySelectorAll(".apexcharts-line-series .apexcharts-marker, .apexcharts-area-series .apexcharts-marker");p.length>0&&this.addPathsEventListeners(p,h),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(h)}}},{key:"drawFixedTooltipRect",value:function(){var e=this.w,t=this.getElTooltip(),i=t.getBoundingClientRect(),n=i.width+10,r=i.height+10,a=this.tConfig.fixed.offsetX,o=this.tConfig.fixed.offsetY,s=this.tConfig.fixed.position.toLowerCase();return s.indexOf("right")>-1&&(a=a+e.globals.svgWidth-n+10),s.indexOf("bottom")>-1&&(o=o+e.globals.svgHeight-r-10),t.style.left=a+"px",t.style.top=o+"px",{x:a,y:o,ttWidth:n,ttHeight:r}}},{key:"addDatapointEventsListeners",value:function(e){var t=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers .apexcharts-marker, .apexcharts-bar-area, .apexcharts-candlestick-area, .apexcharts-boxPlot-area, .apexcharts-rangebar-area");this.addPathsEventListeners(t,e)}},{key:"addPathsEventListeners",value:function(e,t){for(var i=this,n=function(n){var r={paths:e[n],tooltipEl:t.tooltipEl,tooltipY:t.tooltipY,tooltipX:t.tooltipX,elGrid:t.elGrid,hoverArea:t.hoverArea,ttItems:t.ttItems};["mousemove","mouseup","touchmove","mouseout","touchend"].map((function(t){return e[n].addEventListener(t,i.seriesHover.bind(i,r),{capture:!1,passive:!0})}))},r=0;r<e.length;r++)n(r)}},{key:"seriesHover",value:function(e,t){var i=this,n=[],r=this.w;r.config.chart.group&&(n=this.ctx.getGroupedCharts()),r.globals.axisCharts&&(r.globals.minX===-1/0&&r.globals.maxX===1/0||0===r.globals.dataPoints)||(n.length?n.forEach((function(n){var r=i.getElTooltip(n),a={paths:e.paths,tooltipEl:r,tooltipY:e.tooltipY,tooltipX:e.tooltipX,elGrid:e.elGrid,hoverArea:e.hoverArea,ttItems:n.w.globals.tooltip.ttItems};n.w.globals.minX===i.w.globals.minX&&n.w.globals.maxX===i.w.globals.maxX&&n.w.globals.tooltip.seriesHoverByContext({chartCtx:n,ttCtx:n.w.globals.tooltip,opt:a,e:t})})):this.seriesHoverByContext({chartCtx:this.ctx,ttCtx:this.w.globals.tooltip,opt:e,e:t}))}},{key:"seriesHoverByContext",value:function(e){var t=e.chartCtx,i=e.ttCtx,n=e.opt,r=e.e,a=t.w,o=this.getElTooltip();i.tooltipRect={x:0,y:0,ttWidth:o.getBoundingClientRect().width,ttHeight:o.getBoundingClientRect().height},i.e=r,!i.tooltipUtil.hasBars()||a.globals.comboCharts||i.isBarShared||this.tConfig.onDatasetHover.highlightDataSeries&&new z(t).toggleSeriesOnHover(r,r.target.parentNode),i.fixedTooltip&&i.drawFixedTooltipRect(),a.globals.axisCharts?i.axisChartsTooltips({e:r,opt:n,tooltipRect:i.tooltipRect}):i.nonAxisChartsTooltips({e:r,opt:n,tooltipRect:i.tooltipRect})}},{key:"axisChartsTooltips",value:function(e){var t,i,n=e.e,r=e.opt,a=this.w,o=r.elGrid.getBoundingClientRect(),s="touchmove"===n.type?n.touches[0].clientX:n.clientX,l="touchmove"===n.type?n.touches[0].clientY:n.clientY;if(this.clientY=l,this.clientX=s,a.globals.capturedSeriesIndex=-1,a.globals.capturedDataPointIndex=-1,l<o.top||l>o.top+o.height)this.handleMouseOut(r);else{if(Array.isArray(this.tConfig.enabledOnSeries)&&!a.config.tooltip.shared){var c=parseInt(r.paths.getAttribute("index"),10);if(this.tConfig.enabledOnSeries.indexOf(c)<0)return void this.handleMouseOut(r)}var h=this.getElTooltip(),d=this.getElXCrosshairs(),u=a.globals.xyCharts||"bar"===a.config.chart.type&&!a.globals.isBarHorizontal&&this.tooltipUtil.hasBars()&&this.tConfig.shared||a.globals.comboCharts&&this.tooltipUtil.hasBars();if("mousemove"===n.type||"touchmove"===n.type||"mouseup"===n.type){null!==d&&d.classList.add("apexcharts-active");var p=this.yaxisTooltips.filter((function(e){return!0===e}));if(null!==this.ycrosshairs&&p.length&&this.ycrosshairs.classList.add("apexcharts-active"),u&&!this.showOnIntersect)this.handleStickyTooltip(n,s,l,r);else if("heatmap"===a.config.chart.type||"treemap"===a.config.chart.type){var f=this.intersect.handleHeatTreeTooltip({e:n,opt:r,x:t,y:i,type:a.config.chart.type});t=f.x,i=f.y,h.style.left=t+"px",h.style.top=i+"px"}else this.tooltipUtil.hasBars()&&this.intersect.handleBarTooltip({e:n,opt:r}),this.tooltipUtil.hasMarkers()&&this.intersect.handleMarkerTooltip({e:n,opt:r,x:t,y:i});if(this.yaxisTooltips.length)for(var g=0;g<a.config.yaxis.length;g++)this.axesTooltip.drawYaxisTooltipText(g,l,this.xyRatios);r.tooltipEl.classList.add("apexcharts-active")}else"mouseout"!==n.type&&"touchend"!==n.type||this.handleMouseOut(r)}}},{key:"nonAxisChartsTooltips",value:function(e){var t=e.e,i=e.opt,n=e.tooltipRect,r=this.w,a=i.paths.getAttribute("rel"),o=this.getElTooltip(),s=r.globals.dom.elWrap.getBoundingClientRect();if("mousemove"===t.type||"touchmove"===t.type){o.classList.add("apexcharts-active"),this.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:parseInt(a,10)-1,shared:!1});var l=r.globals.clientX-s.left-n.ttWidth/2,c=r.globals.clientY-s.top-n.ttHeight-10;if(o.style.left=l+"px",o.style.top=c+"px",r.config.legend.tooltipHoverFormatter){var h=a-1,d=(0,r.config.legend.tooltipHoverFormatter)(this.legendLabels[h].getAttribute("data:default-text"),{seriesIndex:h,dataPointIndex:h,w:r});this.legendLabels[h].innerHTML=d}}else"mouseout"!==t.type&&"touchend"!==t.type||(o.classList.remove("apexcharts-active"),r.config.legend.tooltipHoverFormatter&&this.legendLabels.forEach((function(e){var t=e.getAttribute("data:default-text");e.innerHTML=decodeURIComponent(t)})))}},{key:"handleStickyTooltip",value:function(e,t,i,n){var r=this.w,a=this.tooltipUtil.getNearestValues({context:this,hoverArea:n.hoverArea,elGrid:n.elGrid,clientX:t,clientY:i}),o=a.j,s=a.capturedSeries;a.hoverX<0||a.hoverX>r.globals.gridWidth?this.handleMouseOut(n):null!==s?this.handleStickyCapturedSeries(e,s,n,o):(this.tooltipUtil.isXoverlap(o)||r.globals.isBarHorizontal)&&this.create(e,this,0,o,n.ttItems)}},{key:"handleStickyCapturedSeries",value:function(e,t,i,n){var r=this.w;null===r.globals.series[t][n]?this.handleMouseOut(i):void 0!==r.globals.series[t][n]?this.tConfig.shared&&this.tooltipUtil.isXoverlap(n)&&this.tooltipUtil.isInitialSeriesSameLen()?this.create(e,this,t,n,i.ttItems):this.create(e,this,t,n,i.ttItems,!1):this.tooltipUtil.isXoverlap(n)&&this.create(e,this,0,n,i.ttItems)}},{key:"deactivateHoverFilter",value:function(){for(var e=this.w,t=new w(this.ctx),i=e.globals.dom.Paper.select(".apexcharts-bar-area"),n=0;n<i.length;n++)t.pathMouseLeave(i[n])}},{key:"handleMouseOut",value:function(e){var t=this.w,i=this.getElXCrosshairs();if(e.tooltipEl.classList.remove("apexcharts-active"),this.deactivateHoverFilter(),"bubble"!==t.config.chart.type&&this.marker.resetPointsSize(),null!==i&&i.classList.remove("apexcharts-active"),null!==this.ycrosshairs&&this.ycrosshairs.classList.remove("apexcharts-active"),this.blxaxisTooltip&&this.xaxisTooltip.classList.remove("apexcharts-active"),this.yaxisTooltips.length){null===this.yaxisTTEls&&(this.yaxisTTEls=t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));for(var n=0;n<this.yaxisTTEls.length;n++)this.yaxisTTEls[n].classList.remove("apexcharts-active")}t.config.legend.tooltipHoverFormatter&&this.legendLabels.forEach((function(e){var t=e.getAttribute("data:default-text");e.innerHTML=decodeURIComponent(t)}))}},{key:"markerClick",value:function(e,t,i){var n=this.w;"function"==typeof n.config.chart.events.markerClick&&n.config.chart.events.markerClick(e,this.ctx,{seriesIndex:t,dataPointIndex:i,w:n}),this.ctx.events.fireEvent("markerClick",[e,this.ctx,{seriesIndex:t,dataPointIndex:i,w:n}])}},{key:"create",value:function(e,t,i,n,r){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,o=this.w,s=t;"mouseup"===e.type&&this.markerClick(e,i,n),null===a&&(a=this.tConfig.shared);var l=this.tooltipUtil.hasMarkers(),c=this.tooltipUtil.getElBars();if(o.config.legend.tooltipHoverFormatter){var h=o.config.legend.tooltipHoverFormatter,d=Array.from(this.legendLabels);d.forEach((function(e){var t=e.getAttribute("data:default-text");e.innerHTML=decodeURIComponent(t)}));for(var u=0;u<d.length;u++){var p=d[u],f=parseInt(p.getAttribute("i"),10),g=decodeURIComponent(p.getAttribute("data:default-text")),m=h(g,{seriesIndex:a?f:i,dataPointIndex:n,w:o});if(a)p.innerHTML=o.globals.collapsedSeriesIndices.indexOf(f)<0?m:g;else if(p.innerHTML=f===i?m:g,i===f)break}}if(a){if(s.tooltipLabels.drawSeriesTexts({ttItems:r,i:i,j:n,shared:!this.showOnIntersect&&this.tConfig.shared}),l&&(o.globals.markers.largestSize>0?s.marker.enlargePoints(n):s.tooltipPosition.moveDynamicPointsOnHover(n)),this.tooltipUtil.hasBars()&&(this.barSeriesHeight=this.tooltipUtil.getBarsHeight(c),this.barSeriesHeight>0)){var v=new w(this.ctx),y=o.globals.dom.Paper.select(".apexcharts-bar-area[j='".concat(n,"']"));this.deactivateHoverFilter(),this.tooltipPosition.moveStickyTooltipOverBars(n);for(var b=0;b<y.length;b++)v.pathMouseEnter(y[b])}}else s.tooltipLabels.drawSeriesTexts({shared:!1,ttItems:r,i:i,j:n}),this.tooltipUtil.hasBars()&&s.tooltipPosition.moveStickyTooltipOverBars(n),l&&s.tooltipPosition.moveMarkers(i,n)}}]),e}(),ke=function(e){u(i,R);var t=g(i);function i(){return o(this,i),t.apply(this,arguments)}return l(i,[{key:"draw",value:function(e,t){var i=this,n=this.w;this.graphics=new w(this.ctx),this.bar=new R(this.ctx,this.xyRatios);var r=new S(this.ctx,n);e=r.getLogSeries(e),this.yRatio=r.getLogYRatios(this.yRatio),this.barHelpers.initVariables(e),"100%"===n.config.chart.stackType&&(e=n.globals.seriesPercent.slice()),this.series=e,this.totalItems=0,this.prevY=[],this.prevX=[],this.prevYF=[],this.prevXF=[],this.prevYVal=[],this.prevXVal=[],this.xArrj=[],this.xArrjF=[],this.xArrjVal=[],this.yArrj=[],this.yArrjF=[],this.yArrjVal=[];for(var a=0;a<e.length;a++)e[a].length>0&&(this.totalItems+=e[a].length);for(var o=this.graphics.group({class:"apexcharts-bar-series apexcharts-plot-series"}),s=0,l=0,c=function(r,a){var c=void 0,h=void 0,u=void 0,p=void 0,f=[],g=[],m=n.globals.comboCharts?t[r]:r;i.yRatio.length>1&&(i.yaxisIndex=m),i.isReversed=n.config.yaxis[i.yaxisIndex]&&n.config.yaxis[i.yaxisIndex].reversed;var v=i.graphics.group({class:"apexcharts-series",seriesName:y.escapeString(n.globals.seriesNames[m]),rel:r+1,"data:realIndex":m});i.ctx.series.addCollapsedClassToSeries(v,m);var b=i.graphics.group({class:"apexcharts-datalabels","data:realIndex":m}),x=0,w=0,k=i.initialPositions(s,l,c,h,u,p);l=k.y,x=k.barHeight,h=k.yDivision,p=k.zeroW,s=k.x,w=k.barWidth,c=k.xDivision,u=k.zeroH,i.yArrj=[],i.yArrjF=[],i.yArrjVal=[],i.xArrj=[],i.xArrjF=[],i.xArrjVal=[],1===i.prevY.length&&i.prevY[0].every((function(e){return isNaN(e)}))&&(i.prevY[0]=i.prevY[0].map((function(e){return u})),i.prevYF[0]=i.prevYF[0].map((function(e){return 0})));for(var _=0;_<n.globals.dataPoints;_++){var S=i.barHelpers.getStrokeWidth(r,_,m),A={indexes:{i:r,j:_,realIndex:m,bc:a},strokeWidth:S,x:s,y:l,elSeries:v},C=null;i.isHorizontal?(C=i.drawStackedBarPaths(d(d({},A),{},{zeroW:p,barHeight:x,yDivision:h})),w=i.series[r][_]/i.invertedYRatio):(C=i.drawStackedColumnPaths(d(d({},A),{},{xDivision:c,barWidth:w,zeroH:u})),x=i.series[r][_]/i.yRatio[i.yaxisIndex]),l=C.y,s=C.x,f.push(s),g.push(l);var T=i.barHelpers.getPathFillColor(e,r,_,m);v=i.renderSeries({realIndex:m,pathFill:T,j:_,i:r,pathFrom:C.pathFrom,pathTo:C.pathTo,strokeWidth:S,elSeries:v,x:s,y:l,series:e,barHeight:x,barWidth:w,elDataLabelsWrap:b,type:"bar",visibleSeries:0})}n.globals.seriesXvalues[m]=f,n.globals.seriesYvalues[m]=g,i.prevY.push(i.yArrj),i.prevYF.push(i.yArrjF),i.prevYVal.push(i.yArrjVal),i.prevX.push(i.xArrj),i.prevXF.push(i.xArrjF),i.prevXVal.push(i.xArrjVal),o.add(v)},h=0,u=0;h<e.length;h++,u++)c(h,u);return o}},{key:"initialPositions",value:function(e,t,i,n,r,a){var o,s,l=this.w;return this.isHorizontal?(o=(o=n=l.globals.gridHeight/l.globals.dataPoints)*parseInt(l.config.plotOptions.bar.barHeight,10)/100,a=this.baseLineInvertedY+l.globals.padHorizontal+(this.isReversed?l.globals.gridWidth:0)-(this.isReversed?2*this.baseLineInvertedY:0),t=(n-o)/2):(s=i=l.globals.gridWidth/l.globals.dataPoints,s=l.globals.isXNumeric&&l.globals.dataPoints>1?(i=l.globals.minXDiff/this.xRatio)*parseInt(this.barOptions.columnWidth,10)/100:s*parseInt(l.config.plotOptions.bar.columnWidth,10)/100,r=this.baseLineY[this.yaxisIndex]+(this.isReversed?l.globals.gridHeight:0)-(this.isReversed?2*this.baseLineY[this.yaxisIndex]:0),e=l.globals.padHorizontal+(i-s)/2),{x:e,y:t,yDivision:n,xDivision:i,barHeight:o,barWidth:s,zeroH:r,zeroW:a}}},{key:"drawStackedBarPaths",value:function(e){for(var t,i=e.indexes,n=e.barHeight,r=e.strokeWidth,a=e.zeroW,o=e.x,s=e.y,l=e.yDivision,c=e.elSeries,h=this.w,d=s,u=i.i,p=i.j,f=0,g=0;g<this.prevXF.length;g++)f+=this.prevXF[g][p];if(u>0){var m=a;this.prevXVal[u-1][p]<0?m=this.series[u][p]>=0?this.prevX[u-1][p]+f-2*(this.isReversed?f:0):this.prevX[u-1][p]:this.prevXVal[u-1][p]>=0&&(m=this.series[u][p]>=0?this.prevX[u-1][p]:this.prevX[u-1][p]-f+2*(this.isReversed?f:0)),t=m}else t=a;o=null===this.series[u][p]?t:t+this.series[u][p]/this.invertedYRatio-2*(this.isReversed?this.series[u][p]/this.invertedYRatio:0);var v=this.barHelpers.getBarpaths({barYPosition:d,barHeight:n,x1:t,x2:o,strokeWidth:r,series:this.series,realIndex:i.realIndex,i:u,j:p,w:h});return this.barHelpers.barBackground({j:p,i:u,y1:d,y2:n,elSeries:c}),s+=l,{pathTo:v.pathTo,pathFrom:v.pathFrom,x:o,y:s}}},{key:"drawStackedColumnPaths",value:function(e){var t=e.indexes,i=e.x,n=e.y,r=e.xDivision,a=e.barWidth,o=e.zeroH,s=(e.strokeWidth,e.elSeries),l=this.w,c=t.i,h=t.j,d=t.bc;if(l.globals.isXNumeric){var u=l.globals.seriesX[c][h];u||(u=0),i=(u-l.globals.minX)/this.xRatio-a/2}for(var p,f=i,g=0,m=0;m<this.prevYF.length;m++)g+=isNaN(this.prevYF[m][h])?0:this.prevYF[m][h];if(c>0&&!l.globals.isXNumeric||c>0&&l.globals.isXNumeric&&l.globals.seriesX[c-1][h]===l.globals.seriesX[c][h]){var v,y,b=Math.min(this.yRatio.length+1,c+1);if(void 0!==this.prevY[c-1])for(var x=1;x<b;x++)if(!isNaN(this.prevY[c-x][h])){y=this.prevY[c-x][h];break}for(var w=1;w<b;w++){if(this.prevYVal[c-w][h]<0){v=this.series[c][h]>=0?y-g+2*(this.isReversed?g:0):y;break}if(this.prevYVal[c-w][h]>=0){v=this.series[c][h]>=0?y:y+g-2*(this.isReversed?g:0);break}}void 0===v&&(v=l.globals.gridHeight),p=this.prevYF[0].every((function(e){return 0===e}))&&this.prevYF.slice(1,c).every((function(e){return e.every((function(e){return isNaN(e)}))}))?l.globals.gridHeight-o:v}else p=l.globals.gridHeight-o;n=p-this.series[c][h]/this.yRatio[this.yaxisIndex]+2*(this.isReversed?this.series[c][h]/this.yRatio[this.yaxisIndex]:0);var k=this.barHelpers.getColumnPaths({barXPosition:f,barWidth:a,y1:p,y2:n,yRatio:this.yRatio[this.yaxisIndex],strokeWidth:this.strokeWidth,series:this.series,realIndex:t.realIndex,i:c,j:h,w:l});return this.barHelpers.barBackground({bc:d,j:h,i:c,x1:f,x2:a,elSeries:s}),i+=r,{pathTo:k.pathTo,pathFrom:k.pathFrom,x:l.globals.isXNumeric?i-r:i,y:n}}}]),i}(),_e=function(e){u(i,R);var t=g(i);function i(){return o(this,i),t.apply(this,arguments)}return l(i,[{key:"draw",value:function(e,t){var i=this,n=this.w,r=new w(this.ctx),a=new E(this.ctx);this.candlestickOptions=this.w.config.plotOptions.candlestick,this.boxOptions=this.w.config.plotOptions.boxPlot;var o=new S(this.ctx,n);e=o.getLogSeries(e),this.series=e,this.yRatio=o.getLogYRatios(this.yRatio),this.barHelpers.initVariables(e);for(var s=r.group({class:"apexcharts-".concat(n.config.chart.type,"-series apexcharts-plot-series")}),l=function(o){i.isBoxPlot="boxPlot"===n.config.chart.type||"boxPlot"===n.config.series[o].type;var l,c,h,d,u=void 0,p=void 0,f=[],g=[],m=n.globals.comboCharts?t[o]:o,v=r.group({class:"apexcharts-series",seriesName:y.escapeString(n.globals.seriesNames[m]),rel:o+1,"data:realIndex":m});e[o].length>0&&(i.visibleI=i.visibleI+1),i.yRatio.length>1&&(i.yaxisIndex=m);var b=i.barHelpers.initialPositions();p=b.y,h=b.barHeight,u=b.x,d=b.barWidth,l=b.xDivision,c=b.zeroH,g.push(u+d/2);for(var x=r.group({class:"apexcharts-datalabels","data:realIndex":m}),w=function(t){var r=i.barHelpers.getStrokeWidth(o,t,m),s=i.drawBoxPaths({indexes:{i:o,j:t,realIndex:m},x:u,y:p,xDivision:l,barWidth:d,zeroH:c,strokeWidth:r,elSeries:v});p=s.y,u=s.x,t>0&&g.push(u+d/2),f.push(p),s.pathTo.forEach((function(l,c){var f=!i.isBoxPlot&&i.candlestickOptions.wick.useFillColor?s.color[c]:n.globals.stroke.colors[o],g=a.fillPath({seriesNumber:m,dataPointIndex:t,color:s.color[c],value:e[o][t]});i.renderSeries({realIndex:m,pathFill:g,lineFill:f,j:t,i:o,pathFrom:s.pathFrom,pathTo:l,strokeWidth:r,elSeries:v,x:u,y:p,series:e,barHeight:h,barWidth:d,elDataLabelsWrap:x,visibleSeries:i.visibleI,type:n.config.chart.type})}))},k=0;k<n.globals.dataPoints;k++)w(k);n.globals.seriesXvalues[m]=g,n.globals.seriesYvalues[m]=f,s.add(v)},c=0;c<e.length;c++)l(c);return s}},{key:"drawBoxPaths",value:function(e){var t=e.indexes,i=e.x,n=(e.y,e.xDivision),r=e.barWidth,a=e.zeroH,o=e.strokeWidth,s=this.w,l=new w(this.ctx),c=t.i,h=t.j,d=!0,u=s.config.plotOptions.candlestick.colors.upward,p=s.config.plotOptions.candlestick.colors.downward,f="";this.isBoxPlot&&(f=[this.boxOptions.colors.lower,this.boxOptions.colors.upper]);var g=this.yRatio[this.yaxisIndex],m=t.realIndex,v=this.getOHLCValue(m,h),y=a,b=a;v.o>v.c&&(d=!1);var x=Math.min(v.o,v.c),k=Math.max(v.o,v.c),_=v.m;s.globals.isXNumeric&&(i=(s.globals.seriesX[m][h]-s.globals.minX)/this.xRatio-r/2);var S=i+r*this.visibleI;void 0===this.series[c][h]||null===this.series[c][h]?(x=a,k=a):(x=a-x/g,k=a-k/g,y=a-v.h/g,b=a-v.l/g,_=a-v.m/g);var A=l.move(S,a),C=l.move(S+r/2,x);return s.globals.previousPaths.length>0&&(C=this.getPreviousPath(m,h,!0)),A=this.isBoxPlot?[l.move(S,x)+l.line(S+r/2,x)+l.line(S+r/2,y)+l.line(S+r/4,y)+l.line(S+r-r/4,y)+l.line(S+r/2,y)+l.line(S+r/2,x)+l.line(S+r,x)+l.line(S+r,_)+l.line(S,_)+l.line(S,x+o/2),l.move(S,_)+l.line(S+r,_)+l.line(S+r,k)+l.line(S+r/2,k)+l.line(S+r/2,b)+l.line(S+r-r/4,b)+l.line(S+r/4,b)+l.line(S+r/2,b)+l.line(S+r/2,k)+l.line(S,k)+l.line(S,_)+"z"]:[l.move(S,k)+l.line(S+r/2,k)+l.line(S+r/2,y)+l.line(S+r/2,k)+l.line(S+r,k)+l.line(S+r,x)+l.line(S+r/2,x)+l.line(S+r/2,b)+l.line(S+r/2,x)+l.line(S,x)+l.line(S,k-o/2)],C+=l.move(S,x),s.globals.isXNumeric||(i+=n),{pathTo:A,pathFrom:C,x:i,y:k,barXPosition:S,color:this.isBoxPlot?f:d?[u]:[p]}}},{key:"getOHLCValue",value:function(e,t){var i=this.w;return{o:this.isBoxPlot?i.globals.seriesCandleH[e][t]:i.globals.seriesCandleO[e][t],h:this.isBoxPlot?i.globals.seriesCandleO[e][t]:i.globals.seriesCandleH[e][t],m:i.globals.seriesCandleM[e][t],l:this.isBoxPlot?i.globals.seriesCandleC[e][t]:i.globals.seriesCandleL[e][t],c:this.isBoxPlot?i.globals.seriesCandleL[e][t]:i.globals.seriesCandleC[e][t]}}}]),i}(),Se=function(){function e(t){o(this,e),this.ctx=t,this.w=t.w}return l(e,[{key:"checkColorRange",value:function(){var e=this.w,t=!1,i=e.config.plotOptions[e.config.chart.type];return i.colorScale.ranges.length>0&&i.colorScale.ranges.map((function(e,i){e.from<=0&&(t=!0)})),t}},{key:"getShadeColor",value:function(e,t,i,n){var r=this.w,a=1,o=r.config.plotOptions[e].shadeIntensity,s=this.determineColor(e,t,i);r.globals.hasNegs||n?a=r.config.plotOptions[e].reverseNegativeShade?s.percent<0?s.percent/100*(1.25*o):(1-s.percent/100)*(1.25*o):s.percent<=0?1-(1+s.percent/100)*o:(1-s.percent/100)*o:(a=1-s.percent/100,"treemap"===e&&(a=(1-s.percent/100)*(1.25*o)));var l=s.color,c=new y;return r.config.plotOptions[e].enableShades&&(l="dark"===this.w.config.theme.mode?y.hexToRgba(c.shadeColor(-1*a,s.color),r.config.fill.opacity):y.hexToRgba(c.shadeColor(a,s.color),r.config.fill.opacity)),{color:l,colorProps:s}}},{key:"determineColor",value:function(e,t,i){var n=this.w,r=n.globals.series[t][i],a=n.config.plotOptions[e],o=a.colorScale.inverse?i:t;n.config.plotOptions[e].distributed&&(o=i);var s=n.globals.colors[o],l=null,c=Math.min.apply(Math,m(n.globals.series[t])),h=Math.max.apply(Math,m(n.globals.series[t]));a.distributed||"heatmap"!==e||(c=n.globals.minY,h=n.globals.maxY),void 0!==a.colorScale.min&&(c=a.colorScale.min<n.globals.minY?a.colorScale.min:n.globals.minY,h=a.colorScale.max>n.globals.maxY?a.colorScale.max:n.globals.maxY);var d=Math.abs(h)+Math.abs(c),u=100*r/(0===d?d-1e-6:d);return a.colorScale.ranges.length>0&&a.colorScale.ranges.map((function(e,t){if(r>=e.from&&r<=e.to){s=e.color,l=e.foreColor?e.foreColor:null,c=e.from,h=e.to;var i=Math.abs(h)+Math.abs(c);u=100*r/(0===i?i-1e-6:i)}})),{color:s,foreColor:l,percent:u}}},{key:"calculateDataLabels",value:function(e){var t=e.text,i=e.x,n=e.y,r=e.i,a=e.j,o=e.colorProps,s=e.fontSize,l=this.w.config.dataLabels,c=new w(this.ctx),h=new I(this.ctx),d=null;if(l.enabled){d=c.group({class:"apexcharts-data-labels"});var u=l.offsetX,p=l.offsetY,f=i+u,g=n+parseFloat(l.style.fontSize)/3+p;h.plotDataLabelsText({x:f,y:g,text:t,i:r,j:a,color:o.foreColor,parent:d,fontSize:s,dataLabelsConfig:l})}return d}},{key:"addListeners",value:function(e){var t=new w(this.ctx);e.node.addEventListener("mouseenter",t.pathMouseEnter.bind(this,e)),e.node.addEventListener("mouseleave",t.pathMouseLeave.bind(this,e)),e.node.addEventListener("mousedown",t.pathMouseDown.bind(this,e))}}]),e}(),Ae=function(){function e(t,i){o(this,e),this.ctx=t,this.w=t.w,this.xRatio=i.xRatio,this.yRatio=i.yRatio,this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.helpers=new Se(t),this.rectRadius=this.w.config.plotOptions.heatmap.radius,this.strokeWidth=this.w.config.stroke.show?this.w.config.stroke.width:0}return l(e,[{key:"draw",value:function(e){var t=this.w,i=new w(this.ctx),n=i.group({class:"apexcharts-heatmap"});n.attr("clip-path","url(#gridRectMask".concat(t.globals.cuid,")"));var r=t.globals.gridWidth/t.globals.dataPoints,a=t.globals.gridHeight/t.globals.series.length,o=0,s=!1;this.negRange=this.helpers.checkColorRange();var l=e.slice();t.config.yaxis[0].reversed&&(s=!0,l.reverse());for(var c=s?0:l.length-1;s?c<l.length:c>=0;s?c++:c--){var h=i.group({class:"apexcharts-series apexcharts-heatmap-series",seriesName:y.escapeString(t.globals.seriesNames[c]),rel:c+1,"data:realIndex":c});if(this.ctx.series.addCollapsedClassToSeries(h,c),t.config.chart.dropShadow.enabled){var d=t.config.chart.dropShadow;new x(this.ctx).dropShadow(h,d,c)}for(var u=0,p=t.config.plotOptions.heatmap.shadeIntensity,f=0;f<l[c].length;f++){var g=this.helpers.getShadeColor(t.config.chart.type,c,f,this.negRange),m=g.color,v=g.colorProps;"image"===t.config.fill.type&&(m=new E(this.ctx).fillPath({seriesNumber:c,dataPointIndex:f,opacity:t.globals.hasNegs?v.percent<0?1-(1+v.percent/100):p+v.percent/100:v.percent/100,patternID:y.randomId(),width:t.config.fill.image.width?t.config.fill.image.width:r,height:t.config.fill.image.height?t.config.fill.image.height:a}));var b=this.rectRadius,k=i.drawRect(u,o,r,a,b);if(k.attr({cx:u,cy:o}),k.node.classList.add("apexcharts-heatmap-rect"),h.add(k),k.attr({fill:m,i:c,index:c,j:f,val:l[c][f],"stroke-width":this.strokeWidth,stroke:t.config.plotOptions.heatmap.useFillColorAsStroke?m:t.globals.stroke.colors[0],color:m}),this.helpers.addListeners(k),t.config.chart.animations.enabled&&!t.globals.dataChanged){var _=1;t.globals.resized||(_=t.config.chart.animations.speed),this.animateHeatMap(k,u,o,r,a,_)}if(t.globals.dataChanged){var S=1;if(this.dynamicAnim.enabled&&t.globals.shouldAnimate){S=this.dynamicAnim.speed;var A=t.globals.previousPaths[c]&&t.globals.previousPaths[c][f]&&t.globals.previousPaths[c][f].color;A||(A="rgba(255, 255, 255, 0)"),this.animateHeatColor(k,y.isColorHex(A)?A:y.rgb2hex(A),y.isColorHex(m)?m:y.rgb2hex(m),S)}}var C=(0,t.config.dataLabels.formatter)(t.globals.series[c][f],{value:t.globals.series[c][f],seriesIndex:c,dataPointIndex:f,w:t}),T=this.helpers.calculateDataLabels({text:C,x:u+r/2,y:o+a/2,i:c,j:f,colorProps:v,series:l});null!==T&&h.add(T),u+=r}o+=a,n.add(h)}var P=t.globals.yAxisScale[0].result.slice();t.config.yaxis[0].reversed?P.unshift(""):P.push(""),t.globals.yAxisScale[0].result=P;var L=t.globals.gridHeight/t.globals.series.length;return t.config.yaxis[0].labels.offsetY=-L/2,n}},{key:"animateHeatMap",value:function(e,t,i,n,r,a){var o=new b(this.ctx);o.animateRect(e,{x:t+n/2,y:i+r/2,width:0,height:0},{x:t,y:i,width:n,height:r},a,(function(){o.animationCompleted(e)}))}},{key:"animateHeatColor",value:function(e,t,i,n){e.attr({fill:t}).animate(n).attr({fill:i})}}]),e}(),Ce=function(){function e(t){o(this,e),this.ctx=t,this.w=t.w}return l(e,[{key:"drawYAxisTexts",value:function(e,t,i,n){var r=this.w,a=r.config.yaxis[0],o=r.globals.yLabelFormatters[0];return new w(this.ctx).drawText({x:e+a.labels.offsetX,y:t+a.labels.offsetY,text:o(n,i),textAnchor:"middle",fontSize:a.labels.style.fontSize,fontFamily:a.labels.style.fontFamily,foreColor:Array.isArray(a.labels.style.colors)?a.labels.style.colors[i]:a.labels.style.colors})}}]),e}(),Te=function(){function e(t){o(this,e),this.ctx=t,this.w=t.w;var i=this.w;this.chartType=this.w.config.chart.type,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled,this.animBeginArr=[0],this.animDur=0,this.donutDataLabels=this.w.config.plotOptions.pie.donut.labels,this.lineColorArr=void 0!==i.globals.stroke.colors?i.globals.stroke.colors:i.globals.colors,this.defaultSize=Math.min(i.globals.gridWidth,i.globals.gridHeight),this.centerY=this.defaultSize/2,this.centerX=i.globals.gridWidth/2,"radialBar"===i.config.chart.type?this.fullAngle=360:this.fullAngle=Math.abs(i.config.plotOptions.pie.endAngle-i.config.plotOptions.pie.startAngle),this.initialAngle=i.config.plotOptions.pie.startAngle%this.fullAngle,i.globals.radialSize=this.defaultSize/2.05-i.config.stroke.width-(i.config.chart.sparkline.enabled?0:i.config.chart.dropShadow.blur),this.donutSize=i.globals.radialSize*parseInt(i.config.plotOptions.pie.donut.size,10)/100,this.maxY=0,this.sliceLabels=[],this.sliceSizes=[],this.prevSectorAngleArr=[]}return l(e,[{key:"draw",value:function(e){var t=this,i=this.w,n=new w(this.ctx);if(this.ret=n.group({class:"apexcharts-pie"}),i.globals.noData)return this.ret;for(var r=0,a=0;a<e.length;a++)r+=y.negToZero(e[a]);var o=[],s=n.group();0===r&&(r=1e-5),e.forEach((function(e){t.maxY=Math.max(t.maxY,e)})),i.config.yaxis[0].max&&(this.maxY=i.config.yaxis[0].max),"back"===i.config.grid.position&&"polarArea"===this.chartType&&this.drawPolarElements(this.ret);for(var l=0;l<e.length;l++){var c=this.fullAngle*y.negToZero(e[l])/r;o.push(c),"polarArea"===this.chartType?(o[l]=this.fullAngle/e.length,this.sliceSizes.push(i.globals.radialSize*e[l]/this.maxY)):this.sliceSizes.push(i.globals.radialSize)}if(i.globals.dataChanged){for(var h,d=0,u=0;u<i.globals.previousPaths.length;u++)d+=y.negToZero(i.globals.previousPaths[u]);for(var p=0;p<i.globals.previousPaths.length;p++)h=this.fullAngle*y.negToZero(i.globals.previousPaths[p])/d,this.prevSectorAngleArr.push(h)}this.donutSize<0&&(this.donutSize=0);var f=i.config.plotOptions.pie.customScale,g=i.globals.gridWidth/2,m=i.globals.gridHeight/2,v=g-i.globals.gridWidth/2*f,b=m-i.globals.gridHeight/2*f;if("donut"===this.chartType){var x=n.drawCircle(this.donutSize);x.attr({cx:this.centerX,cy:this.centerY,fill:i.config.plotOptions.pie.donut.background?i.config.plotOptions.pie.donut.background:"transparent"}),s.add(x)}var k=this.drawArcs(o,e);if(this.sliceLabels.forEach((function(e){k.add(e)})),s.attr({transform:"translate(".concat(v,", ").concat(b,") scale(").concat(f,")")}),s.add(k),this.ret.add(s),this.donutDataLabels.show){var _=this.renderInnerDataLabels(this.donutDataLabels,{hollowSize:this.donutSize,centerX:this.centerX,centerY:this.centerY,opacity:this.donutDataLabels.show,translateX:v,translateY:b});this.ret.add(_)}return"front"===i.config.grid.position&&"polarArea"===this.chartType&&this.drawPolarElements(this.ret),this.ret}},{key:"drawArcs",value:function(e,t){var i=this.w,n=new x(this.ctx),r=new w(this.ctx),a=new E(this.ctx),o=r.group({class:"apexcharts-slices"}),s=this.initialAngle,l=this.initialAngle,c=this.initialAngle,h=this.initialAngle;this.strokeWidth=i.config.stroke.show?i.config.stroke.width:0;for(var d=0;d<e.length;d++){var u=r.group({class:"apexcharts-series apexcharts-pie-series",seriesName:y.escapeString(i.globals.seriesNames[d]),rel:d+1,"data:realIndex":d});o.add(u),l=h,c=(s=c)+e[d],h=l+this.prevSectorAngleArr[d];var p=c<s?this.fullAngle+c-s:c-s,f=a.fillPath({seriesNumber:d,size:this.sliceSizes[d],value:t[d]}),g=this.getChangedPath(l,h),m=r.drawPath({d:g,stroke:Array.isArray(this.lineColorArr)?this.lineColorArr[d]:this.lineColorArr,strokeWidth:0,fill:f,fillOpacity:i.config.fill.opacity,classes:"apexcharts-pie-area apexcharts-".concat(this.chartType.toLowerCase(),"-slice-").concat(d)});if(m.attr({index:0,j:d}),n.setSelectionFilter(m,0,d),i.config.chart.dropShadow.enabled){var v=i.config.chart.dropShadow;n.dropShadow(m,v,d)}this.addListeners(m,this.donutDataLabels),w.setAttrs(m.node,{"data:angle":p,"data:startAngle":s,"data:strokeWidth":this.strokeWidth,"data:value":t[d]});var b={x:0,y:0};"pie"===this.chartType||"polarArea"===this.chartType?b=y.polarToCartesian(this.centerX,this.centerY,i.globals.radialSize/1.25+i.config.plotOptions.pie.dataLabels.offset,(s+p/2)%this.fullAngle):"donut"===this.chartType&&(b=y.polarToCartesian(this.centerX,this.centerY,(i.globals.radialSize+this.donutSize)/2+i.config.plotOptions.pie.dataLabels.offset,(s+p/2)%this.fullAngle)),u.add(m);var k=0;if(!this.initialAnim||i.globals.resized||i.globals.dataChanged?this.animBeginArr.push(0):(0==(k=p/this.fullAngle*i.config.chart.animations.speed)&&(k=1),this.animDur=k+this.animDur,this.animBeginArr.push(this.animDur)),this.dynamicAnim&&i.globals.dataChanged?this.animatePaths(m,{size:this.sliceSizes[d],endAngle:c,startAngle:s,prevStartAngle:l,prevEndAngle:h,animateStartingPos:!0,i:d,animBeginArr:this.animBeginArr,shouldSetPrevPaths:!0,dur:i.config.chart.animations.dynamicAnimation.speed}):this.animatePaths(m,{size:this.sliceSizes[d],endAngle:c,startAngle:s,i:d,totalItems:e.length-1,animBeginArr:this.animBeginArr,dur:k}),i.config.plotOptions.pie.expandOnClick&&"polarArea"!==this.chartType&&m.click(this.pieClicked.bind(this,d)),void 0!==i.globals.selectedDataPoints[0]&&i.globals.selectedDataPoints[0].indexOf(d)>-1&&this.pieClicked(d),i.config.dataLabels.enabled){var _=b.x,S=b.y,A=100*p/this.fullAngle+"%";if(0!==p&&i.config.plotOptions.pie.dataLabels.minAngleToShowLabel<e[d]){var C=i.config.dataLabels.formatter;void 0!==C&&(A=C(i.globals.seriesPercent[d][0],{seriesIndex:d,w:i}));var T=i.globals.dataLabels.style.colors[d],P=r.group({class:"apexcharts-datalabels"}),L=r.drawText({x:_,y:S,text:A,textAnchor:"middle",fontSize:i.config.dataLabels.style.fontSize,fontFamily:i.config.dataLabels.style.fontFamily,fontWeight:i.config.dataLabels.style.fontWeight,foreColor:T});if(P.add(L),i.config.dataLabels.dropShadow.enabled){var M=i.config.dataLabels.dropShadow;n.dropShadow(L,M)}L.node.classList.add("apexcharts-pie-label"),i.config.chart.animations.animate&&!1===i.globals.resized&&(L.node.classList.add("apexcharts-pie-label-delay"),L.node.style.animationDelay=i.config.chart.animations.speed/940+"s"),this.sliceLabels.push(P)}}}return o}},{key:"addListeners",value:function(e,t){var i=new w(this.ctx);e.node.addEventListener("mouseenter",i.pathMouseEnter.bind(this,e)),e.node.addEventListener("mouseleave",i.pathMouseLeave.bind(this,e)),e.node.addEventListener("mouseleave",this.revertDataLabelsInner.bind(this,e.node,t)),e.node.addEventListener("mousedown",i.pathMouseDown.bind(this,e)),this.donutDataLabels.total.showAlways||(e.node.addEventListener("mouseenter",this.printDataLabelsInner.bind(this,e.node,t)),e.node.addEventListener("mousedown",this.printDataLabelsInner.bind(this,e.node,t)))}},{key:"animatePaths",value:function(e,t){var i=this.w,n=t.endAngle<t.startAngle?this.fullAngle+t.endAngle-t.startAngle:t.endAngle-t.startAngle,r=n,a=t.startAngle,o=t.startAngle;void 0!==t.prevStartAngle&&void 0!==t.prevEndAngle&&(a=t.prevEndAngle,r=t.prevEndAngle<t.prevStartAngle?this.fullAngle+t.prevEndAngle-t.prevStartAngle:t.prevEndAngle-t.prevStartAngle),t.i===i.config.series.length-1&&(n+o>this.fullAngle?t.endAngle=t.endAngle-(n+o):n+o<this.fullAngle&&(t.endAngle=t.endAngle+(this.fullAngle-(n+o)))),n===this.fullAngle&&(n=this.fullAngle-.01),this.animateArc(e,a,o,n,r,t)}},{key:"animateArc",value:function(e,t,i,n,r,a){var o,s=this,l=this.w,c=new b(this.ctx),h=a.size;(isNaN(t)||isNaN(r))&&(t=i,r=n,a.dur=0);var d=n,u=i,p=t<i?this.fullAngle+t-i:t-i;l.globals.dataChanged&&a.shouldSetPrevPaths&&a.prevEndAngle&&(o=s.getPiePath({me:s,startAngle:a.prevStartAngle,angle:a.prevEndAngle<a.prevStartAngle?this.fullAngle+a.prevEndAngle-a.prevStartAngle:a.prevEndAngle-a.prevStartAngle,size:h}),e.attr({d:o})),0!==a.dur?e.animate(a.dur,l.globals.easing,a.animBeginArr[a.i]).afterAll((function(){"pie"!==s.chartType&&"donut"!==s.chartType&&"polarArea"!==s.chartType||this.animate(l.config.chart.animations.dynamicAnimation.speed).attr({"stroke-width":s.strokeWidth}),a.i===l.config.series.length-1&&c.animationCompleted(e)})).during((function(l){d=p+(n-p)*l,a.animateStartingPos&&(d=r+(n-r)*l,u=t-r+(i-(t-r))*l),o=s.getPiePath({me:s,startAngle:u,angle:d,size:h}),e.node.setAttribute("data:pathOrig",o),e.attr({d:o})})):(o=s.getPiePath({me:s,startAngle:u,angle:n,size:h}),a.isTrack||(l.globals.animationEnded=!0),e.node.setAttribute("data:pathOrig",o),e.attr({d:o,"stroke-width":s.strokeWidth}))}},{key:"pieClicked",value:function(e){var t,i=this.w,n=this,r=n.sliceSizes[e]+(i.config.plotOptions.pie.expandOnClick?4:0),a=i.globals.dom.Paper.select(".apexcharts-".concat(n.chartType.toLowerCase(),"-slice-").concat(e)).members[0];if("true"!==a.attr("data:pieClicked")){var o=i.globals.dom.baseEl.getElementsByClassName("apexcharts-pie-area");Array.prototype.forEach.call(o,(function(e){e.setAttribute("data:pieClicked","false");var t=e.getAttribute("data:pathOrig");e.setAttribute("d",t)})),a.attr("data:pieClicked","true");var s=parseInt(a.attr("data:startAngle"),10),l=parseInt(a.attr("data:angle"),10);t=n.getPiePath({me:n,startAngle:s,angle:l,size:r}),360!==l&&a.plot(t)}else{a.attr({"data:pieClicked":"false"}),this.revertDataLabelsInner(a.node,this.donutDataLabels);var c=a.attr("data:pathOrig");a.attr({d:c})}}},{key:"getChangedPath",value:function(e,t){var i="";return this.dynamicAnim&&this.w.globals.dataChanged&&(i=this.getPiePath({me:this,startAngle:e,angle:t-e,size:this.size})),i}},{key:"getPiePath",value:function(e){var t=e.me,i=e.startAngle,n=e.angle,r=e.size,a=i,o=Math.PI*(a-90)/180,s=n+i;Math.ceil(s)>=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle&&(s=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle-.01),Math.ceil(s)>this.fullAngle&&(s-=this.fullAngle);var l=Math.PI*(s-90)/180,c=t.centerX+r*Math.cos(o),h=t.centerY+r*Math.sin(o),d=t.centerX+r*Math.cos(l),u=t.centerY+r*Math.sin(l),p=y.polarToCartesian(t.centerX,t.centerY,t.donutSize,s),f=y.polarToCartesian(t.centerX,t.centerY,t.donutSize,a),g=n>180?1:0,m=["M",c,h,"A",r,r,0,g,1,d,u];return"donut"===t.chartType?[].concat(m,["L",p.x,p.y,"A",t.donutSize,t.donutSize,0,g,0,f.x,f.y,"L",c,h,"z"]).join(" "):"pie"===t.chartType||"polarArea"===t.chartType?[].concat(m,["L",t.centerX,t.centerY,"L",c,h]).join(" "):[].concat(m).join(" ")}},{key:"drawPolarElements",value:function(e){var t=this.w,i=new Z(this.ctx),n=new w(this.ctx),r=new Ce(this.ctx),a=n.group(),o=n.group(),s=i.niceScale(0,Math.ceil(this.maxY),t.config.yaxis[0].tickAmount,0,!0),l=s.result.reverse(),c=s.result.length;this.maxY=s.niceMax;for(var h=t.globals.radialSize,d=h/(c-1),u=0;u<c-1;u++){var p=n.drawCircle(h);if(p.attr({cx:this.centerX,cy:this.centerY,fill:"none","stroke-width":t.config.plotOptions.polarArea.rings.strokeWidth,stroke:t.config.plotOptions.polarArea.rings.strokeColor}),t.config.yaxis[0].show){var f=r.drawYAxisTexts(this.centerX,this.centerY-h+parseInt(t.config.yaxis[0].labels.style.fontSize,10)/2,u,l[u]);o.add(f)}a.add(p),h-=d}this.drawSpokes(e),e.add(a),e.add(o)}},{key:"renderInnerDataLabels",value:function(e,t){var i=this.w,n=new w(this.ctx),r=n.group({class:"apexcharts-datalabels-group",transform:"translate(".concat(t.translateX?t.translateX:0,", ").concat(t.translateY?t.translateY:0,") scale(").concat(i.config.plotOptions.pie.customScale,")")}),a=e.total.show;r.node.style.opacity=t.opacity;var o,s,l=t.centerX,c=t.centerY;o=void 0===e.name.color?i.globals.colors[0]:e.name.color;var h=e.name.fontSize,d=e.name.fontFamily,u=e.value.fontWeight;s=void 0===e.value.color?i.config.chart.foreColor:e.value.color;var p=e.value.formatter,f="",g="";if(a?(o=e.total.color,h=e.total.fontSize,d=e.total.fontFamily,u=e.total.fontWeight,g=e.total.label,f=e.total.formatter(i)):1===i.globals.series.length&&(f=p(i.globals.series[0],i),g=i.globals.seriesNames[0]),g&&(g=e.name.formatter(g,e.total.show,i)),e.name.show){var m=n.drawText({x:l,y:c+parseFloat(e.name.offsetY),text:g,textAnchor:"middle",foreColor:o,fontSize:h,fontWeight:u,fontFamily:d});m.node.classList.add("apexcharts-datalabel-label"),r.add(m)}if(e.value.show){var v=e.name.show?parseFloat(e.value.offsetY)+16:e.value.offsetY,y=n.drawText({x:l,y:c+v,text:f,textAnchor:"middle",foreColor:s,fontWeight:e.value.fontWeight,fontSize:e.value.fontSize,fontFamily:e.value.fontFamily});y.node.classList.add("apexcharts-datalabel-value"),r.add(y)}return r}},{key:"printInnerLabels",value:function(e,t,i,n){var r,a=this.w;n?r=void 0===e.name.color?a.globals.colors[parseInt(n.parentNode.getAttribute("rel"),10)-1]:e.name.color:a.globals.series.length>1&&e.total.show&&(r=e.total.color);var o=a.globals.dom.baseEl.querySelector(".apexcharts-datalabel-label"),s=a.globals.dom.baseEl.querySelector(".apexcharts-datalabel-value");i=(0,e.value.formatter)(i,a),n||"function"!=typeof e.total.formatter||(i=e.total.formatter(a));var l=t===e.total.label;t=e.name.formatter(t,l,a),null!==o&&(o.textContent=t),null!==s&&(s.textContent=i),null!==o&&(o.style.fill=r)}},{key:"printDataLabelsInner",value:function(e,t){var i=this.w,n=e.getAttribute("data:value"),r=i.globals.seriesNames[parseInt(e.parentNode.getAttribute("rel"),10)-1];i.globals.series.length>1&&this.printInnerLabels(t,r,n,e);var a=i.globals.dom.baseEl.querySelector(".apexcharts-datalabels-group");null!==a&&(a.style.opacity=1)}},{key:"drawSpokes",value:function(e){var t=this,i=this.w,n=new w(this.ctx),r=i.config.plotOptions.polarArea.spokes;if(0!==r.strokeWidth){for(var a=[],o=360/i.globals.series.length,s=0;s<i.globals.series.length;s++)a.push(y.polarToCartesian(this.centerX,this.centerY,i.globals.radialSize,i.config.plotOptions.pie.startAngle+o*s));a.forEach((function(i,a){var o=n.drawLine(i.x,i.y,t.centerX,t.centerY,Array.isArray(r.connectorColors)?r.connectorColors[a]:r.connectorColors);e.add(o)}))}}},{key:"revertDataLabelsInner",value:function(e,t,i){var n=this,r=this.w,a=r.globals.dom.baseEl.querySelector(".apexcharts-datalabels-group"),o=!1,s=r.globals.dom.baseEl.getElementsByClassName("apexcharts-pie-area"),l=function(e){var i=e.makeSliceOut,r=e.printLabel;Array.prototype.forEach.call(s,(function(e){"true"===e.getAttribute("data:pieClicked")&&(i&&(o=!0),r&&n.printDataLabelsInner(e,t))}))};if(l({makeSliceOut:!0,printLabel:!1}),t.total.show&&r.globals.series.length>1)o&&!t.total.showAlways?l({makeSliceOut:!1,printLabel:!0}):this.printInnerLabels(t,t.total.label,t.total.formatter(r));else if(l({makeSliceOut:!1,printLabel:!0}),!o)if(r.globals.selectedDataPoints.length&&r.globals.series.length>1)if(r.globals.selectedDataPoints[0].length>0){var c=r.globals.selectedDataPoints[0],h=r.globals.dom.baseEl.querySelector(".apexcharts-".concat(this.chartType.toLowerCase(),"-slice-").concat(c));this.printDataLabelsInner(h,t)}else a&&r.globals.selectedDataPoints.length&&0===r.globals.selectedDataPoints[0].length&&(a.style.opacity=0);else a&&r.globals.series.length>1&&(a.style.opacity=0)}}]),e}(),Pe=function(){function e(t){o(this,e),this.ctx=t,this.w=t.w,this.chartType=this.w.config.chart.type,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled,this.animDur=0;var i=this.w;this.graphics=new w(this.ctx),this.lineColorArr=void 0!==i.globals.stroke.colors?i.globals.stroke.colors:i.globals.colors,this.defaultSize=i.globals.svgHeight<i.globals.svgWidth?i.globals.gridHeight+1.5*i.globals.goldenPadding:i.globals.gridWidth,this.isLog=i.config.yaxis[0].logarithmic,this.coreUtils=new S(this.ctx),this.maxValue=this.isLog?this.coreUtils.getLogVal(i.globals.maxY,0):i.globals.maxY,this.minValue=this.isLog?this.coreUtils.getLogVal(this.w.globals.minY,0):i.globals.minY,this.polygons=i.config.plotOptions.radar.polygons,this.strokeWidth=i.config.stroke.show?i.config.stroke.width:0,this.size=this.defaultSize/2.1-this.strokeWidth-i.config.chart.dropShadow.blur,i.config.xaxis.labels.show&&(this.size=this.size-i.globals.xAxisLabelsWidth/1.75),void 0!==i.config.plotOptions.radar.size&&(this.size=i.config.plotOptions.radar.size),this.dataRadiusOfPercent=[],this.dataRadius=[],this.angleArr=[],this.yaxisLabelsTextsPos=[]}return l(e,[{key:"draw",value:function(e){var t=this,i=this.w,n=new E(this.ctx),r=[],a=new I(this.ctx);e.length&&(this.dataPointsLen=e[i.globals.maxValsInArrayIndex].length),this.disAngle=2*Math.PI/this.dataPointsLen;var o=i.globals.gridWidth/2,s=i.globals.gridHeight/2,l=o+i.config.plotOptions.radar.offsetX,c=s+i.config.plotOptions.radar.offsetY,h=this.graphics.group({class:"apexcharts-radar-series apexcharts-plot-series",transform:"translate(".concat(l||0,", ").concat(c||0,")")}),u=[],p=null,f=null;if(this.yaxisLabels=this.graphics.group({class:"apexcharts-yaxis"}),e.forEach((function(e,o){var s=e.length===i.globals.dataPoints,l=t.graphics.group().attr({class:"apexcharts-series","data:longestSeries":s,seriesName:y.escapeString(i.globals.seriesNames[o]),rel:o+1,"data:realIndex":o});t.dataRadiusOfPercent[o]=[],t.dataRadius[o]=[],t.angleArr[o]=[],e.forEach((function(e,i){var n=Math.abs(t.maxValue-t.minValue);e+=Math.abs(t.minValue),t.isLog&&(e=t.coreUtils.getLogVal(e,0)),t.dataRadiusOfPercent[o][i]=e/n,t.dataRadius[o][i]=t.dataRadiusOfPercent[o][i]*t.size,t.angleArr[o][i]=i*t.disAngle})),u=t.getDataPointsPos(t.dataRadius[o],t.angleArr[o]);var c=t.createPaths(u,{x:0,y:0});p=t.graphics.group({class:"apexcharts-series-markers-wrap apexcharts-element-hidden"}),f=t.graphics.group({class:"apexcharts-datalabels","data:realIndex":o}),i.globals.delayedElements.push({el:p.node,index:o});var h={i:o,realIndex:o,animationDelay:o,initialSpeed:i.config.chart.animations.speed,dataChangeSpeed:i.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-radar",shouldClipToGrid:!1,bindEventsOnPaths:!1,stroke:i.globals.stroke.colors[o],strokeLineCap:i.config.stroke.lineCap},g=null;i.globals.previousPaths.length>0&&(g=t.getPreviousPath(o));for(var m=0;m<c.linePathsTo.length;m++){var v=t.graphics.renderPaths(d(d({},h),{},{pathFrom:null===g?c.linePathsFrom[m]:g,pathTo:c.linePathsTo[m],strokeWidth:Array.isArray(t.strokeWidth)?t.strokeWidth[o]:t.strokeWidth,fill:"none",drawShadow:!1}));l.add(v);var b=n.fillPath({seriesNumber:o}),w=t.graphics.renderPaths(d(d({},h),{},{pathFrom:null===g?c.areaPathsFrom[m]:g,pathTo:c.areaPathsTo[m],strokeWidth:0,fill:b,drawShadow:!1}));if(i.config.chart.dropShadow.enabled){var k=new x(t.ctx),_=i.config.chart.dropShadow;k.dropShadow(w,Object.assign({},_,{noUserSpaceOnUse:!0}),o)}l.add(w)}e.forEach((function(e,n){var r=new M(t.ctx).getMarkerConfig("apexcharts-marker",o,n),s=t.graphics.drawMarker(u[n].x,u[n].y,r);s.attr("rel",n),s.attr("j",n),s.attr("index",o),s.node.setAttribute("default-marker-size",r.pSize);var c=t.graphics.group({class:"apexcharts-series-markers"});c&&c.add(s),p.add(c),l.add(p);var h=i.config.dataLabels;if(h.enabled){var g=h.formatter(i.globals.series[o][n],{seriesIndex:o,dataPointIndex:n,w:i});a.plotDataLabelsText({x:u[n].x,y:u[n].y,text:g,textAnchor:"middle",i:o,j:o,parent:f,offsetCorrection:!1,dataLabelsConfig:d({},h)})}l.add(f)})),r.push(l)})),this.drawPolygons({parent:h}),i.config.xaxis.labels.show){var g=this.drawXAxisTexts();h.add(g)}return r.forEach((function(e){h.add(e)})),h.add(this.yaxisLabels),h}},{key:"drawPolygons",value:function(e){for(var t=this,i=this.w,n=e.parent,r=new Ce(this.ctx),a=i.globals.yAxisScale[0].result.reverse(),o=a.length,s=[],l=this.size/(o-1),c=0;c<o;c++)s[c]=l*c;s.reverse();var h=[],d=[];s.forEach((function(e,i){var n=y.getPolygonPos(e,t.dataPointsLen),r="";n.forEach((function(e,n){if(0===i){var a=t.graphics.drawLine(e.x,e.y,0,0,Array.isArray(t.polygons.connectorColors)?t.polygons.connectorColors[n]:t.polygons.connectorColors);d.push(a)}0===n&&t.yaxisLabelsTextsPos.push({x:e.x,y:e.y}),r+=e.x+","+e.y+" "})),h.push(r)})),h.forEach((function(e,r){var a=t.polygons.strokeColors,o=t.polygons.strokeWidth,s=t.graphics.drawPolygon(e,Array.isArray(a)?a[r]:a,Array.isArray(o)?o[r]:o,i.globals.radarPolygons.fill.colors[r]);n.add(s)})),d.forEach((function(e){n.add(e)})),i.config.yaxis[0].show&&this.yaxisLabelsTextsPos.forEach((function(e,i){var n=r.drawYAxisTexts(e.x,e.y,i,a[i]);t.yaxisLabels.add(n)}))}},{key:"drawXAxisTexts",value:function(){var e=this,t=this.w,i=t.config.xaxis.labels,n=this.graphics.group({class:"apexcharts-xaxis"}),r=y.getPolygonPos(this.size,this.dataPointsLen);return t.globals.labels.forEach((function(a,o){var s=t.config.xaxis.labels.formatter,l=new I(e.ctx);if(r[o]){var c=e.getTextPos(r[o],e.size),h=s(a,{seriesIndex:-1,dataPointIndex:o,w:t});l.plotDataLabelsText({x:c.newX,y:c.newY,text:h,textAnchor:c.textAnchor,i:o,j:o,parent:n,color:Array.isArray(i.style.colors)&&i.style.colors[o]?i.style.colors[o]:"#a8a8a8",dataLabelsConfig:d({textAnchor:c.textAnchor,dropShadow:{enabled:!1}},i),offsetCorrection:!1})}})),n}},{key:"createPaths",value:function(e,t){var i=this,n=[],r=[],a=[],o=[];if(e.length){r=[this.graphics.move(t.x,t.y)],o=[this.graphics.move(t.x,t.y)];var s=this.graphics.move(e[0].x,e[0].y),l=this.graphics.move(e[0].x,e[0].y);e.forEach((function(t,n){s+=i.graphics.line(t.x,t.y),l+=i.graphics.line(t.x,t.y),n===e.length-1&&(s+="Z",l+="Z")})),n.push(s),a.push(l)}return{linePathsFrom:r,linePathsTo:n,areaPathsFrom:o,areaPathsTo:a}}},{key:"getTextPos",value:function(e,t){var i="middle",n=e.x,r=e.y;return Math.abs(e.x)>=10?e.x>0?(i="start",n+=10):e.x<0&&(i="end",n-=10):i="middle",Math.abs(e.y)>=t-10&&(e.y<0?r-=10:e.y>0&&(r+=10)),{textAnchor:i,newX:n,newY:r}}},{key:"getPreviousPath",value:function(e){for(var t=this.w,i=null,n=0;n<t.globals.previousPaths.length;n++){var r=t.globals.previousPaths[n];r.paths.length>0&&parseInt(r.realIndex,10)===parseInt(e,10)&&void 0!==t.globals.previousPaths[n].paths[0]&&(i=t.globals.previousPaths[n].paths[0].d)}return i}},{key:"getDataPointsPos",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.dataPointsLen;e=e||[],t=t||[];for(var n=[],r=0;r<i;r++){var a={};a.x=e[r]*Math.sin(t[r]),a.y=-e[r]*Math.cos(t[r]),n.push(a)}return n}}]),e}(),Le=function(e){u(i,Te);var t=g(i);function i(e){var n;o(this,i),(n=t.call(this,e)).ctx=e,n.w=e.w,n.animBeginArr=[0],n.animDur=0;var r=n.w;return n.startAngle=r.config.plotOptions.radialBar.startAngle,n.endAngle=r.config.plotOptions.radialBar.endAngle,n.totalAngle=Math.abs(r.config.plotOptions.radialBar.endAngle-r.config.plotOptions.radialBar.startAngle),n.trackStartAngle=r.config.plotOptions.radialBar.track.startAngle,n.trackEndAngle=r.config.plotOptions.radialBar.track.endAngle,n.radialDataLabels=r.config.plotOptions.radialBar.dataLabels,n.trackStartAngle||(n.trackStartAngle=n.startAngle),n.trackEndAngle||(n.trackEndAngle=n.endAngle),360===n.endAngle&&(n.endAngle=359.99),n.margin=parseInt(r.config.plotOptions.radialBar.track.margin,10),n}return l(i,[{key:"draw",value:function(e){var t=this.w,i=new w(this.ctx),n=i.group({class:"apexcharts-radialbar"});if(t.globals.noData)return n;var r=i.group(),a=this.defaultSize/2,o=t.globals.gridWidth/2,s=this.defaultSize/2.05;t.config.chart.sparkline.enabled||(s=s-t.config.stroke.width-t.config.chart.dropShadow.blur);var l=t.globals.fill.colors;if(t.config.plotOptions.radialBar.track.show){var c=this.drawTracks({size:s,centerX:o,centerY:a,colorArr:l,series:e});r.add(c)}var h=this.drawArcs({size:s,centerX:o,centerY:a,colorArr:l,series:e}),d=360;t.config.plotOptions.radialBar.startAngle<0&&(d=this.totalAngle);var u=(360-d)/360;if(t.globals.radialSize=s-s*u,this.radialDataLabels.value.show){var p=Math.max(this.radialDataLabels.value.offsetY,this.radialDataLabels.name.offsetY);t.globals.radialSize+=p*u}return r.add(h.g),"front"===t.config.plotOptions.radialBar.hollow.position&&(h.g.add(h.elHollow),h.dataLabels&&h.g.add(h.dataLabels)),n.add(r),n}},{key:"drawTracks",value:function(e){var t=this.w,i=new w(this.ctx),n=i.group({class:"apexcharts-tracks"}),r=new x(this.ctx),a=new E(this.ctx),o=this.getStrokeWidth(e);e.size=e.size-o/2;for(var s=0;s<e.series.length;s++){var l=i.group({class:"apexcharts-radialbar-track apexcharts-track"});n.add(l),l.attr({rel:s+1}),e.size=e.size-o-this.margin;var c=t.config.plotOptions.radialBar.track,h=a.fillPath({seriesNumber:0,size:e.size,fillColors:Array.isArray(c.background)?c.background[s]:c.background,solid:!0}),d=this.trackStartAngle,u=this.trackEndAngle;Math.abs(u)+Math.abs(d)>=360&&(u=360-Math.abs(this.startAngle)-.1);var p=i.drawPath({d:"",stroke:h,strokeWidth:o*parseInt(c.strokeWidth,10)/100,fill:"none",strokeOpacity:c.opacity,classes:"apexcharts-radialbar-area"});if(c.dropShadow.enabled){var f=c.dropShadow;r.dropShadow(p,f)}l.add(p),p.attr("id","apexcharts-radialbarTrack-"+s),this.animatePaths(p,{centerX:e.centerX,centerY:e.centerY,endAngle:u,startAngle:d,size:e.size,i:s,totalItems:2,animBeginArr:0,dur:0,isTrack:!0,easing:t.globals.easing})}return n}},{key:"drawArcs",value:function(e){var t=this.w,i=new w(this.ctx),n=new E(this.ctx),r=new x(this.ctx),a=i.group(),o=this.getStrokeWidth(e);e.size=e.size-o/2;var s=t.config.plotOptions.radialBar.hollow.background,l=e.size-o*e.series.length-this.margin*e.series.length-o*parseInt(t.config.plotOptions.radialBar.track.strokeWidth,10)/100/2,c=l-t.config.plotOptions.radialBar.hollow.margin;void 0!==t.config.plotOptions.radialBar.hollow.image&&(s=this.drawHollowImage(e,a,l,s));var h=this.drawHollow({size:c,centerX:e.centerX,centerY:e.centerY,fill:s||"transparent"});if(t.config.plotOptions.radialBar.hollow.dropShadow.enabled){var d=t.config.plotOptions.radialBar.hollow.dropShadow;r.dropShadow(h,d)}var u=1;!this.radialDataLabels.total.show&&t.globals.series.length>1&&(u=0);var p=null;this.radialDataLabels.show&&(p=this.renderInnerDataLabels(this.radialDataLabels,{hollowSize:l,centerX:e.centerX,centerY:e.centerY,opacity:u})),"back"===t.config.plotOptions.radialBar.hollow.position&&(a.add(h),p&&a.add(p));var f=!1;t.config.plotOptions.radialBar.inverseOrder&&(f=!0);for(var g=f?e.series.length-1:0;f?g>=0:g<e.series.length;f?g--:g++){var m=i.group({class:"apexcharts-series apexcharts-radial-series",seriesName:y.escapeString(t.globals.seriesNames[g])});a.add(m),m.attr({rel:g+1,"data:realIndex":g}),this.ctx.series.addCollapsedClassToSeries(m,g),e.size=e.size-o-this.margin;var v=n.fillPath({seriesNumber:g,size:e.size,value:e.series[g]}),b=this.startAngle,k=void 0,_=y.negToZero(e.series[g]>100?100:e.series[g])/100,S=Math.round(this.totalAngle*_)+this.startAngle,A=void 0;t.globals.dataChanged&&(k=this.startAngle,A=Math.round(this.totalAngle*y.negToZero(t.globals.previousPaths[g])/100)+k),Math.abs(S)+Math.abs(b)>=360&&(S-=.01),Math.abs(A)+Math.abs(k)>=360&&(A-=.01);var C=S-b,T=Array.isArray(t.config.stroke.dashArray)?t.config.stroke.dashArray[g]:t.config.stroke.dashArray,P=i.drawPath({d:"",stroke:v,strokeWidth:o,fill:"none",fillOpacity:t.config.fill.opacity,classes:"apexcharts-radialbar-area apexcharts-radialbar-slice-"+g,strokeDashArray:T});if(w.setAttrs(P.node,{"data:angle":C,"data:value":e.series[g]}),t.config.chart.dropShadow.enabled){var L=t.config.chart.dropShadow;r.dropShadow(P,L,g)}r.setSelectionFilter(P,0,g),this.addListeners(P,this.radialDataLabels),m.add(P),P.attr({index:0,j:g});var M=0;!this.initialAnim||t.globals.resized||t.globals.dataChanged||(M=(S-b)/360*t.config.chart.animations.speed,this.animDur=M/(1.2*e.series.length)+this.animDur,this.animBeginArr.push(this.animDur)),t.globals.dataChanged&&(M=(S-b)/360*t.config.chart.animations.dynamicAnimation.speed,this.animDur=M/(1.2*e.series.length)+this.animDur,this.animBeginArr.push(this.animDur)),this.animatePaths(P,{centerX:e.centerX,centerY:e.centerY,endAngle:S,startAngle:b,prevEndAngle:A,prevStartAngle:k,size:e.size,i:g,totalItems:2,animBeginArr:this.animBeginArr,dur:M,shouldSetPrevPaths:!0,easing:t.globals.easing})}return{g:a,elHollow:h,dataLabels:p}}},{key:"drawHollow",value:function(e){var t=new w(this.ctx).drawCircle(2*e.size);return t.attr({class:"apexcharts-radialbar-hollow",cx:e.centerX,cy:e.centerY,r:e.size,fill:e.fill}),t}},{key:"drawHollowImage",value:function(e,t,i,n){var r=this.w,a=new E(this.ctx),o=y.randomId(),s=r.config.plotOptions.radialBar.hollow.image;if(r.config.plotOptions.radialBar.hollow.imageClipped)a.clippedImgArea({width:i,height:i,image:s,patternID:"pattern".concat(r.globals.cuid).concat(o)}),n="url(#pattern".concat(r.globals.cuid).concat(o,")");else{var l=r.config.plotOptions.radialBar.hollow.imageWidth,c=r.config.plotOptions.radialBar.hollow.imageHeight;if(void 0===l&&void 0===c){var h=r.globals.dom.Paper.image(s).loaded((function(t){this.move(e.centerX-t.width/2+r.config.plotOptions.radialBar.hollow.imageOffsetX,e.centerY-t.height/2+r.config.plotOptions.radialBar.hollow.imageOffsetY)}));t.add(h)}else{var d=r.globals.dom.Paper.image(s).loaded((function(t){this.move(e.centerX-l/2+r.config.plotOptions.radialBar.hollow.imageOffsetX,e.centerY-c/2+r.config.plotOptions.radialBar.hollow.imageOffsetY),this.size(l,c)}));t.add(d)}}return n}},{key:"getStrokeWidth",value:function(e){var t=this.w;return e.size*(100-parseInt(t.config.plotOptions.radialBar.hollow.size,10))/100/(e.series.length+1)-this.margin}}]),i}(),Ee=function(){function e(t){o(this,e),this.w=t.w,this.lineCtx=t}return l(e,[{key:"sameValueSeriesFix",value:function(e,t){var i=this.w;if("line"===i.config.chart.type&&("gradient"===i.config.fill.type||"gradient"===i.config.fill.type[e])&&new S(this.lineCtx.ctx,i).seriesHaveSameValues(e)){var n=t[e].slice();n[n.length-1]=n[n.length-1]+1e-6,t[e]=n}return t}},{key:"calculatePoints",value:function(e){var t=e.series,i=e.realIndex,n=e.x,r=e.y,a=e.i,o=e.j,s=e.prevY,l=this.w,c=[],h=[];if(0===o){var d=this.lineCtx.categoryAxisCorrection+l.config.markers.offsetX;l.globals.isXNumeric&&(d=(l.globals.seriesX[i][0]-l.globals.minX)/this.lineCtx.xRatio+l.config.markers.offsetX),c.push(d),h.push(y.isNumber(t[a][0])?s+l.config.markers.offsetY:null),c.push(n+l.config.markers.offsetX),h.push(y.isNumber(t[a][o+1])?r+l.config.markers.offsetY:null)}else c.push(n+l.config.markers.offsetX),h.push(y.isNumber(t[a][o+1])?r+l.config.markers.offsetY:null);return{x:c,y:h}}},{key:"checkPreviousPaths",value:function(e){for(var t=e.pathFromLine,i=e.pathFromArea,n=e.realIndex,r=this.w,a=0;a<r.globals.previousPaths.length;a++){var o=r.globals.previousPaths[a];("line"===o.type||"area"===o.type)&&o.paths.length>0&&parseInt(o.realIndex,10)===parseInt(n,10)&&("line"===o.type?(this.lineCtx.appendPathFrom=!1,t=r.globals.previousPaths[a].paths[0].d):"area"===o.type&&(this.lineCtx.appendPathFrom=!1,i=r.globals.previousPaths[a].paths[0].d,r.config.stroke.show&&r.globals.previousPaths[a].paths[1]&&(t=r.globals.previousPaths[a].paths[1].d)))}return{pathFromLine:t,pathFromArea:i}}},{key:"determineFirstPrevY",value:function(e){var t=e.i,i=e.series,n=e.prevY,r=e.lineYPosition,a=this.w;if(void 0!==i[t][0])n=(r=a.config.chart.stacked&&t>0?this.lineCtx.prevSeriesY[t-1][0]:this.lineCtx.zeroY)-i[t][0]/this.lineCtx.yRatio[this.lineCtx.yaxisIndex]+2*(this.lineCtx.isReversed?i[t][0]/this.lineCtx.yRatio[this.lineCtx.yaxisIndex]:0);else if(a.config.chart.stacked&&t>0&&void 0===i[t][0])for(var o=t-1;o>=0;o--)if(null!==i[o][0]&&void 0!==i[o][0]){n=r=this.lineCtx.prevSeriesY[o][0];break}return{prevY:n,lineYPosition:r}}}]),e}(),Me=function(){function e(t,i,n){o(this,e),this.ctx=t,this.w=t.w,this.xyRatios=i,this.pointsChart=!("bubble"!==this.w.config.chart.type&&"scatter"!==this.w.config.chart.type)||n,this.scatter=new O(this.ctx),this.noNegatives=this.w.globals.minX===Number.MAX_VALUE,this.lineHelpers=new Ee(this),this.markers=new M(this.ctx),this.prevSeriesY=[],this.categoryAxisCorrection=0,this.yaxisIndex=0}return l(e,[{key:"draw",value:function(e,t,i){var n=this.w,r=new w(this.ctx),a=n.globals.comboCharts?t:n.config.chart.type,o=r.group({class:"apexcharts-".concat(a,"-series apexcharts-plot-series")}),s=new S(this.ctx,n);this.yRatio=this.xyRatios.yRatio,this.zRatio=this.xyRatios.zRatio,this.xRatio=this.xyRatios.xRatio,this.baseLineY=this.xyRatios.baseLineY,e=s.getLogSeries(e),this.yRatio=s.getLogYRatios(this.yRatio);for(var l=[],c=0;c<e.length;c++){e=this.lineHelpers.sameValueSeriesFix(c,e);var h=n.globals.comboCharts?i[c]:c;this._initSerieVariables(e,c,h);var d=[],u=[],p=n.globals.padHorizontal+this.categoryAxisCorrection;this.ctx.series.addCollapsedClassToSeries(this.elSeries,h),n.globals.isXNumeric&&n.globals.seriesX.length>0&&(p=(n.globals.seriesX[h][0]-n.globals.minX)/this.xRatio),u.push(p);var f,g=p,m=g,v=this.zeroY;v=this.lineHelpers.determineFirstPrevY({i:c,series:e,prevY:v,lineYPosition:0}).prevY,d.push(v),f=v;var y=this._calculatePathsFrom({series:e,i:c,realIndex:h,prevX:m,prevY:v}),b=this._iterateOverDataPoints({series:e,realIndex:h,i:c,x:p,y:1,pX:g,pY:f,pathsFrom:y,linePaths:[],areaPaths:[],seriesIndex:i,lineYPosition:0,xArrj:u,yArrj:d});this._handlePaths({type:a,realIndex:h,i:c,paths:b}),this.elSeries.add(this.elPointsMain),this.elSeries.add(this.elDataLabelsWrap),l.push(this.elSeries)}if(n.config.chart.stacked)for(var x=l.length;x>0;x--)o.add(l[x-1]);else for(var k=0;k<l.length;k++)o.add(l[k]);return o}},{key:"_initSerieVariables",value:function(e,t,i){var n=this.w,r=new w(this.ctx);this.xDivision=n.globals.gridWidth/(n.globals.dataPoints-("on"===n.config.xaxis.tickPlacement?1:0)),this.strokeWidth=Array.isArray(n.config.stroke.width)?n.config.stroke.width[i]:n.config.stroke.width,this.yRatio.length>1&&(this.yaxisIndex=i),this.isReversed=n.config.yaxis[this.yaxisIndex]&&n.config.yaxis[this.yaxisIndex].reversed,this.zeroY=n.globals.gridHeight-this.baseLineY[this.yaxisIndex]-(this.isReversed?n.globals.gridHeight:0)+(this.isReversed?2*this.baseLineY[this.yaxisIndex]:0),this.areaBottomY=this.zeroY,(this.zeroY>n.globals.gridHeight||"end"===n.config.plotOptions.area.fillTo)&&(this.areaBottomY=n.globals.gridHeight),this.categoryAxisCorrection=this.xDivision/2,this.elSeries=r.group({class:"apexcharts-series",seriesName:y.escapeString(n.globals.seriesNames[i])}),this.elPointsMain=r.group({class:"apexcharts-series-markers-wrap","data:realIndex":i}),this.elDataLabelsWrap=r.group({class:"apexcharts-datalabels","data:realIndex":i});var a=e[t].length===n.globals.dataPoints;this.elSeries.attr({"data:longestSeries":a,rel:t+1,"data:realIndex":i}),this.appendPathFrom=!0}},{key:"_calculatePathsFrom",value:function(e){var t,i,n,r,a=e.series,o=e.i,s=e.realIndex,l=e.prevX,c=e.prevY,h=this.w,d=new w(this.ctx);if(null===a[o][0]){for(var u=0;u<a[o].length;u++)if(null!==a[o][u]){l=this.xDivision*u,c=this.zeroY-a[o][u]/this.yRatio[this.yaxisIndex],t=d.move(l,c),i=d.move(l,this.areaBottomY);break}}else t=d.move(l,c),i=d.move(l,this.areaBottomY)+d.line(l,c);if(n=d.move(-1,this.zeroY)+d.line(-1,this.zeroY),r=d.move(-1,this.zeroY)+d.line(-1,this.zeroY),h.globals.previousPaths.length>0){var p=this.lineHelpers.checkPreviousPaths({pathFromLine:n,pathFromArea:r,realIndex:s});n=p.pathFromLine,r=p.pathFromArea}return{prevX:l,prevY:c,linePath:t,areaPath:i,pathFromLine:n,pathFromArea:r}}},{key:"_handlePaths",value:function(e){var t=e.type,i=e.realIndex,n=e.i,r=e.paths,a=this.w,o=new w(this.ctx),s=new E(this.ctx);this.prevSeriesY.push(r.yArrj),a.globals.seriesXvalues[i]=r.xArrj,a.globals.seriesYvalues[i]=r.yArrj,this.pointsChart||a.globals.delayedElements.push({el:this.elPointsMain.node,index:i});var l={i:n,realIndex:i,animationDelay:n,initialSpeed:a.config.chart.animations.speed,dataChangeSpeed:a.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(t)};if("area"===t)for(var c=s.fillPath({seriesNumber:i}),h=0;h<r.areaPaths.length;h++){var u=o.renderPaths(d(d({},l),{},{pathFrom:r.pathFromArea,pathTo:r.areaPaths[h],stroke:"none",strokeWidth:0,strokeLineCap:null,fill:c}));this.elSeries.add(u)}if(a.config.stroke.show&&!this.pointsChart){var p;p="line"===t?s.fillPath({seriesNumber:i,i:n}):a.globals.stroke.colors[i];for(var f=0;f<r.linePaths.length;f++){var g=o.renderPaths(d(d({},l),{},{pathFrom:r.pathFromLine,pathTo:r.linePaths[f],stroke:p,strokeWidth:this.strokeWidth,strokeLineCap:a.config.stroke.lineCap,fill:"none"}));this.elSeries.add(g)}}}},{key:"_iterateOverDataPoints",value:function(e){for(var t=e.series,i=e.realIndex,n=e.i,r=e.x,a=e.y,o=e.pX,s=e.pY,l=e.pathsFrom,c=e.linePaths,h=e.areaPaths,d=e.seriesIndex,u=e.lineYPosition,p=e.xArrj,f=e.yArrj,g=this.w,m=new w(this.ctx),v=this.yRatio,b=l.prevY,x=l.linePath,k=l.areaPath,_=l.pathFromLine,S=l.pathFromArea,A=y.isNumber(g.globals.minYArr[i])?g.globals.minYArr[i]:g.globals.minY,C=g.globals.dataPoints>1?g.globals.dataPoints-1:g.globals.dataPoints,T=0;T<C;T++){var P=void 0===t[n][T+1]||null===t[n][T+1];if(g.globals.isXNumeric){var L=g.globals.seriesX[i][T+1];void 0===g.globals.seriesX[i][T+1]&&(L=g.globals.seriesX[i][C-1]),r=(L-g.globals.minX)/this.xRatio}else r+=this.xDivision;u=g.config.chart.stacked&&n>0&&g.globals.collapsedSeries.length<g.config.series.length-1?this.prevSeriesY[function(e){for(var t=e,i=0;i<g.globals.series.length;i++)if(g.globals.collapsedSeriesIndices.indexOf(e)>-1){t--;break}return t>=0?t:0}(n-1)][T+1]:this.zeroY,a=P?u-A/v[this.yaxisIndex]+2*(this.isReversed?A/v[this.yaxisIndex]:0):u-t[n][T+1]/v[this.yaxisIndex]+2*(this.isReversed?t[n][T+1]/v[this.yaxisIndex]:0),p.push(r),f.push(a);var E=this.lineHelpers.calculatePoints({series:t,x:r,y:a,realIndex:i,i:n,j:T,prevY:b}),M=this._createPaths({series:t,i:n,realIndex:i,j:T,x:r,y:a,pX:o,pY:s,linePath:x,areaPath:k,linePaths:c,areaPaths:h,seriesIndex:d});h=M.areaPaths,c=M.linePaths,o=M.pX,s=M.pY,k=M.areaPath,x=M.linePath,this.appendPathFrom&&(_+=m.line(r,this.zeroY),S+=m.line(r,this.zeroY)),this.handleNullDataPoints(t,E,n,T,i),this._handleMarkersAndLabels({pointsPos:E,series:t,x:r,y:a,prevY:b,i:n,j:T,realIndex:i})}return{yArrj:f,xArrj:p,pathFromArea:S,areaPaths:h,pathFromLine:_,linePaths:c}}},{key:"_handleMarkersAndLabels",value:function(e){var t=e.pointsPos,i=(e.series,e.x,e.y,e.prevY,e.i),n=e.j,r=e.realIndex,a=this.w,o=new I(this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,n,{realIndex:r,pointsPos:t,zRatio:this.zRatio,elParent:this.elPointsMain});else{a.globals.series[i].length>1&&this.elPointsMain.node.classList.add("apexcharts-element-hidden");var s=this.markers.plotChartMarkers(t,r,n+1);null!==s&&this.elPointsMain.add(s)}var l=o.drawDataLabel(t,r,n+1,null);null!==l&&this.elDataLabelsWrap.add(l)}},{key:"_createPaths",value:function(e){var t=e.series,i=e.i,n=e.realIndex,r=e.j,a=e.x,o=e.y,s=e.pX,l=e.pY,c=e.linePath,h=e.areaPath,d=e.linePaths,u=e.areaPaths,p=e.seriesIndex,f=this.w,g=new w(this.ctx),m=f.config.stroke.curve,v=this.areaBottomY;if(Array.isArray(f.config.stroke.curve)&&(m=Array.isArray(p)?f.config.stroke.curve[p[i]]:f.config.stroke.curve[i]),"smooth"===m){var y=.35*(a-s);f.globals.hasNullValues?(null!==t[i][r]&&(null!==t[i][r+1]?(c=g.move(s,l)+g.curve(s+y,l,a-y,o,a+1,o),h=g.move(s+1,l)+g.curve(s+y,l,a-y,o,a+1,o)+g.line(a,v)+g.line(s,v)+"z"):(c=g.move(s,l),h=g.move(s,l)+"z")),d.push(c),u.push(h)):(c+=g.curve(s+y,l,a-y,o,a,o),h+=g.curve(s+y,l,a-y,o,a,o)),s=a,l=o,r===t[i].length-2&&(h=h+g.curve(s,l,a,o,a,v)+g.move(a,o)+"z",f.globals.hasNullValues||(d.push(c),u.push(h)))}else{if(null===t[i][r+1]){c+=g.move(a,o);var b=f.globals.isXNumeric?(f.globals.seriesX[n][r]-f.globals.minX)/this.xRatio:a-this.xDivision;h=h+g.line(b,v)+g.move(a,o)+"z"}null===t[i][r]&&(c+=g.move(a,o),h+=g.move(a,v)),"stepline"===m?(c=c+g.line(a,null,"H")+g.line(null,o,"V"),h=h+g.line(a,null,"H")+g.line(null,o,"V")):"straight"===m&&(c+=g.line(a,o),h+=g.line(a,o)),r===t[i].length-2&&(h=h+g.line(a,v)+g.move(a,o)+"z",d.push(c),u.push(h))}return{linePaths:d,areaPaths:u,pX:s,pY:l,linePath:c,areaPath:h}}},{key:"handleNullDataPoints",value:function(e,t,i,n,r){var a=this.w;if(null===e[i][n]&&a.config.markers.showNullDataPoints||1===e[i].length){var o=this.markers.plotChartMarkers(t,r,n+1,this.strokeWidth-a.config.markers.strokeWidth/2,!0);null!==o&&this.elPointsMain.add(o)}}}]),e}();window.TreemapSquared={},window.TreemapSquared.generate=function(){function e(t,i,n,r){this.xoffset=t,this.yoffset=i,this.height=r,this.width=n,this.shortestEdge=function(){return Math.min(this.height,this.width)},this.getCoordinates=function(e){var t,i=[],n=this.xoffset,r=this.yoffset,o=a(e)/this.height,s=a(e)/this.width;if(this.width>=this.height)for(t=0;t<e.length;t++)i.push([n,r,n+o,r+e[t]/o]),r+=e[t]/o;else for(t=0;t<e.length;t++)i.push([n,r,n+e[t]/s,r+s]),n+=e[t]/s;return i},this.cutArea=function(t){var i;if(this.width>=this.height){var n=t/this.height,r=this.width-n;i=new e(this.xoffset+n,this.yoffset,r,this.height)}else{var a=t/this.width,o=this.height-a;i=new e(this.xoffset,this.yoffset+a,this.width,o)}return i}}function t(t,n,r,o,s){return o=void 0===o?0:o,s=void 0===s?0:s,function(e){var t,i,n=[];for(t=0;t<e.length;t++)for(i=0;i<e[t].length;i++)n.push(e[t][i]);return n}(i(function(e,t){var i,n=[],r=t/a(e);for(i=0;i<e.length;i++)n[i]=e[i]*r;return n}(t,n*r),[],new e(o,s,n,r),[]))}function i(e,t,r,o){var s,l,c;if(0!==e.length)return s=r.shortestEdge(),function(e,t,i){var r;return 0===e.length||((r=e.slice()).push(t),n(e,i)>=n(r,i))}(t,l=e[0],s)?(t.push(l),i(e.slice(1),t,r,o)):(c=r.cutArea(a(t),o),o.push(r.getCoordinates(t)),i(e,[],c,o)),o;o.push(r.getCoordinates(t))}function n(e,t){var i=Math.min.apply(Math,e),n=Math.max.apply(Math,e),r=a(e);return Math.max(Math.pow(t,2)*n/Math.pow(r,2),Math.pow(r,2)/(Math.pow(t,2)*i))}function r(e){return e&&e.constructor===Array}function a(e){var t,i=0;for(t=0;t<e.length;t++)i+=e[t];return i}function o(e){var t,i=0;if(r(e[0]))for(t=0;t<e.length;t++)i+=o(e[t]);else i=a(e);return i}return function e(i,n,a,s,l){s=void 0===s?0:s,l=void 0===l?0:l;var c,h,d=[],u=[];if(r(i[0])){for(h=0;h<i.length;h++)d[h]=o(i[h]);for(c=t(d,n,a,s,l),h=0;h<i.length;h++)u.push(e(i[h],c[h][2]-c[h][0],c[h][3]-c[h][1],c[h][0],c[h][1]))}else u=t(i,n,a,s,l);return u}}();var Oe,Ie,De=function(){function e(t,i){o(this,e),this.ctx=t,this.w=t.w,this.strokeWidth=this.w.config.stroke.width,this.helpers=new Se(t),this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.labels=[]}return l(e,[{key:"draw",value:function(e){var t=this,i=this.w,n=new w(this.ctx),r=new E(this.ctx),a=n.group({class:"apexcharts-treemap"});if(i.globals.noData)return a;var o=[];return e.forEach((function(e){var t=e.map((function(e){return Math.abs(e)}));o.push(t)})),this.negRange=this.helpers.checkColorRange(),i.config.series.forEach((function(e,i){e.data.forEach((function(e){Array.isArray(t.labels[i])||(t.labels[i]=[]),t.labels[i].push(e.x)}))})),window.TreemapSquared.generate(o,i.globals.gridWidth,i.globals.gridHeight).forEach((function(o,s){var l=n.group({class:"apexcharts-series apexcharts-treemap-series",seriesName:y.escapeString(i.globals.seriesNames[s]),rel:s+1,"data:realIndex":s});if(i.config.chart.dropShadow.enabled){var c=i.config.chart.dropShadow;new x(t.ctx).dropShadow(a,c,s)}var h=n.group({class:"apexcharts-data-labels"});o.forEach((function(a,o){var c=a[0],h=a[1],d=a[2],u=a[3],p=n.drawRect(c,h,d-c,u-h,0,"#fff",1,t.strokeWidth,i.config.plotOptions.treemap.useFillColorAsStroke?g:i.globals.stroke.colors[s]);p.attr({cx:c,cy:h,index:s,i:s,j:o,width:d-c,height:u-h});var f=t.helpers.getShadeColor(i.config.chart.type,s,o,t.negRange),g=f.color;void 0!==i.config.series[s].data[o]&&i.config.series[s].data[o].fillColor&&(g=i.config.series[s].data[o].fillColor);var m=r.fillPath({color:g,seriesNumber:s,dataPointIndex:o});p.node.classList.add("apexcharts-treemap-rect"),p.attr({fill:m}),t.helpers.addListeners(p);var v={x:c+(d-c)/2,y:h+(u-h)/2,width:0,height:0},y={x:c,y:h,width:d-c,height:u-h};if(i.config.chart.animations.enabled&&!i.globals.dataChanged){var b=1;i.globals.resized||(b=i.config.chart.animations.speed),t.animateTreemap(p,v,y,b)}if(i.globals.dataChanged){var x=1;t.dynamicAnim.enabled&&i.globals.shouldAnimate&&(x=t.dynamicAnim.speed,i.globals.previousPaths[s]&&i.globals.previousPaths[s][o]&&i.globals.previousPaths[s][o].rect&&(v=i.globals.previousPaths[s][o].rect),t.animateTreemap(p,v,y,x))}var w=t.getFontSize(a),k=i.config.dataLabels.formatter(t.labels[s][o],{value:i.globals.series[s][o],seriesIndex:s,dataPointIndex:o,w:i}),_=t.helpers.calculateDataLabels({text:k,x:(c+d)/2,y:(h+u)/2+t.strokeWidth/2+w/3,i:s,j:o,colorProps:f,fontSize:w,series:e});i.config.dataLabels.enabled&&_&&t.rotateToFitLabel(_,k,c,h,d,u),l.add(p),null!==_&&l.add(_)})),l.add(h),a.add(l)})),a}},{key:"getFontSize",value:function(e){var t,i,n=this.w,r=function e(t){var i,n=0;if(Array.isArray(t[0]))for(i=0;i<t.length;i++)n+=e(t[i]);else for(i=0;i<t.length;i++)n+=t[i].length;return n}(this.labels)/function e(t){var i,n=0;if(Array.isArray(t[0]))for(i=0;i<t.length;i++)n+=e(t[i]);else for(i=0;i<t.length;i++)n+=1;return n}(this.labels);return t=(e[2]-e[0])*(e[3]-e[1]),i=Math.pow(t,.5),Math.min(i/r,parseInt(n.config.dataLabels.style.fontSize,10))}},{key:"rotateToFitLabel",value:function(e,t,i,n,r,a){var o=new w(this.ctx),s=o.getTextRects(t);if(s.width+5>r-i&&s.width<=a-n){var l=o.rotateAroundCenter(e.node);e.node.setAttribute("transform","rotate(-90 ".concat(l.x," ").concat(l.y,")"))}}},{key:"animateTreemap",value:function(e,t,i,n){var r=new b(this.ctx);r.animateRect(e,{x:t.x,y:t.y,width:t.width,height:t.height},{x:i.x,y:i.y,width:i.width,height:i.height},n,(function(){r.animationCompleted(e)}))}}]),e}(),ze=function(){function e(t){o(this,e),this.ctx=t,this.w=t.w,this.timeScaleArray=[],this.utc=this.w.config.xaxis.labels.datetimeUTC}return l(e,[{key:"calculateTimeScaleTicks",value:function(e,t){var i=this,n=this.w;if(n.globals.allSeriesCollapsed)return n.globals.labels=[],n.globals.timescaleLabels=[],[];var r=new F(this.ctx),a=(t-e)/864e5;this.determineInterval(a),n.globals.disableZoomIn=!1,n.globals.disableZoomOut=!1,a<.00011574074074074075?n.globals.disableZoomIn=!0:a>5e4&&(n.globals.disableZoomOut=!0);var o=r.getTimeUnitsfromTimestamp(e,t,this.utc),s=n.globals.gridWidth/a,l=s/24,c=l/60,h=c/60,u=Math.floor(24*a),p=Math.floor(1440*a),f=Math.floor(86400*a),g=Math.floor(a),m=Math.floor(a/30),v=Math.floor(a/365),y={minMillisecond:o.minMillisecond,minSecond:o.minSecond,minMinute:o.minMinute,minHour:o.minHour,minDate:o.minDate,minMonth:o.minMonth,minYear:o.minYear},b={firstVal:y,currentMillisecond:y.minMillisecond,currentSecond:y.minSecond,currentMinute:y.minMinute,currentHour:y.minHour,currentMonthDate:y.minDate,currentDate:y.minDate,currentMonth:y.minMonth,currentYear:y.minYear,daysWidthOnXAxis:s,hoursWidthOnXAxis:l,minutesWidthOnXAxis:c,secondsWidthOnXAxis:h,numberOfSeconds:f,numberOfMinutes:p,numberOfHours:u,numberOfDays:g,numberOfMonths:m,numberOfYears:v};switch(this.tickInterval){case"years":this.generateYearScale(b);break;case"months":case"half_year":this.generateMonthScale(b);break;case"months_days":case"months_fortnight":case"days":case"week_days":this.generateDayScale(b);break;case"hours":this.generateHourScale(b);break;case"minutes_fives":case"minutes":this.generateMinuteScale(b);break;case"seconds_tens":case"seconds_fives":case"seconds":this.generateSecondScale(b)}var x=this.timeScaleArray.map((function(e){var t={position:e.position,unit:e.unit,year:e.year,day:e.day?e.day:1,hour:e.hour?e.hour:0,month:e.month+1};return"month"===e.unit?d(d({},t),{},{day:1,value:e.value+1}):"day"===e.unit||"hour"===e.unit?d(d({},t),{},{value:e.value}):"minute"===e.unit?d(d({},t),{},{value:e.value,minute:e.value}):"second"===e.unit?d(d({},t),{},{value:e.value,minute:e.minute,second:e.second}):e}));return x.filter((function(e){var t=1,r=Math.ceil(n.globals.gridWidth/120),a=e.value;void 0!==n.config.xaxis.tickAmount&&(r=n.config.xaxis.tickAmount),x.length>r&&(t=Math.floor(x.length/r));var o=!1,s=!1;switch(i.tickInterval){case"years":"year"===e.unit&&(o=!0);break;case"half_year":t=7,"year"===e.unit&&(o=!0);break;case"months":t=1,"year"===e.unit&&(o=!0);break;case"months_fortnight":t=15,"year"!==e.unit&&"month"!==e.unit||(o=!0),30===a&&(s=!0);break;case"months_days":t=10,"month"===e.unit&&(o=!0),30===a&&(s=!0);break;case"week_days":t=8,"month"===e.unit&&(o=!0);break;case"days":t=1,"month"===e.unit&&(o=!0);break;case"hours":"day"===e.unit&&(o=!0);break;case"minutes_fives":a%5!=0&&(s=!0);break;case"seconds_tens":a%10!=0&&(s=!0);break;case"seconds_fives":a%5!=0&&(s=!0)}if("hours"===i.tickInterval||"minutes_fives"===i.tickInterval||"seconds_tens"===i.tickInterval||"seconds_fives"===i.tickInterval){if(!s)return!0}else if((a%t==0||o)&&!s)return!0}))}},{key:"recalcDimensionsBasedOnFormat",value:function(e,t){var i=this.w,n=this.formatDates(e),r=this.removeOverlappingTS(n);i.globals.timescaleLabels=r.slice(),new he(this.ctx).plotCoords()}},{key:"determineInterval",value:function(e){var t=24*e,i=60*t;switch(!0){case e/365>5:this.tickInterval="years";break;case e>800:this.tickInterval="half_year";break;case e>180:this.tickInterval="months";break;case e>90:this.tickInterval="months_fortnight";break;case e>60:this.tickInterval="months_days";break;case e>30:this.tickInterval="week_days";break;case e>2:this.tickInterval="days";break;case t>2.4:this.tickInterval="hours";break;case i>15:this.tickInterval="minutes_fives";break;case i>5:this.tickInterval="minutes";break;case i>1:this.tickInterval="seconds_tens";break;case 60*i>20:this.tickInterval="seconds_fives";break;default:this.tickInterval="seconds"}}},{key:"generateYearScale",value:function(e){var t=e.firstVal,i=e.currentMonth,n=e.currentYear,r=e.daysWidthOnXAxis,a=e.numberOfYears,o=t.minYear,s=0,l=new F(this.ctx),c="year";if(t.minDate>1||t.minMonth>0){var h=l.determineRemainingDaysOfYear(t.minYear,t.minMonth,t.minDate);s=(l.determineDaysOfYear(t.minYear)-h+1)*r,o=t.minYear+1,this.timeScaleArray.push({position:s,value:o,unit:c,year:o,month:y.monthMod(i+1)})}else 1===t.minDate&&0===t.minMonth&&this.timeScaleArray.push({position:s,value:o,unit:c,year:n,month:y.monthMod(i+1)});for(var d=o,u=s,p=0;p<a;p++)d++,u=l.determineDaysOfYear(d-1)*r+u,this.timeScaleArray.push({position:u,value:d,unit:c,year:d,month:1})}},{key:"generateMonthScale",value:function(e){var t=e.firstVal,i=e.currentMonthDate,n=e.currentMonth,r=e.currentYear,a=e.daysWidthOnXAxis,o=e.numberOfMonths,s=n,l=0,c=new F(this.ctx),h="month",d=0;if(t.minDate>1){l=(c.determineDaysOfMonths(n+1,t.minYear)-i+1)*a,s=y.monthMod(n+1);var u=r+d,p=y.monthMod(s),f=s;0===s&&(h="year",f=u,p=1,u+=d+=1),this.timeScaleArray.push({position:l,value:f,unit:h,year:u,month:p})}else this.timeScaleArray.push({position:l,value:s,unit:h,year:r,month:y.monthMod(n)});for(var g=s+1,m=l,v=0,b=1;v<o;v++,b++){0===(g=y.monthMod(g))?(h="year",d+=1):h="month";var x=this._getYear(r,g,d);m=c.determineDaysOfMonths(g,x)*a+m;var w=0===g?x:g;this.timeScaleArray.push({position:m,value:w,unit:h,year:x,month:0===g?1:g}),g++}}},{key:"generateDayScale",value:function(e){var t=e.firstVal,i=e.currentMonth,n=e.currentYear,r=e.hoursWidthOnXAxis,a=e.numberOfDays,o=new F(this.ctx),s="day",l=t.minDate+1,c=l,h=function(e,t,i){return e>o.determineDaysOfMonths(t+1,i)?(c=1,s="month",u=t+=1,t):t},d=(24-t.minHour)*r,u=l,p=h(c,i,n);0===t.minHour&&1===t.minDate?(d=0,u=y.monthMod(t.minMonth),s="month",c=t.minDate,a++):1!==t.minDate&&0===t.minHour&&0===t.minMinute&&(d=0,l=t.minDate,u=l,p=h(c=l,i,n)),this.timeScaleArray.push({position:d,value:u,unit:s,year:this._getYear(n,p,0),month:y.monthMod(p),day:c});for(var f=d,g=0;g<a;g++){s="day",p=h(c+=1,p,this._getYear(n,p,0));var m=this._getYear(n,p,0);f=24*r+f;var v=1===c?y.monthMod(p):c;this.timeScaleArray.push({position:f,value:v,unit:s,year:m,month:y.monthMod(p),day:v})}}},{key:"generateHourScale",value:function(e){var t=e.firstVal,i=e.currentDate,n=e.currentMonth,r=e.currentYear,a=e.minutesWidthOnXAxis,o=e.numberOfHours,s=new F(this.ctx),l="hour",c=function(e,t){return e>s.determineDaysOfMonths(t+1,r)&&(g=1,t+=1),{month:t,date:g}},h=function(e,t){return e>s.determineDaysOfMonths(t+1,r)?t+=1:t},d=60-(t.minMinute+t.minSecond/60),u=d*a,p=t.minHour+1,f=p+1;60===d&&(u=0,f=(p=t.minHour)+1);var g=i,m=h(g,n);this.timeScaleArray.push({position:u,value:p,unit:l,day:g,hour:f,year:r,month:y.monthMod(m)});for(var v=u,b=0;b<o;b++){l="hour",f>=24&&(f=0,l="day",m=c(g+=1,m).month,m=h(g,m));var x=this._getYear(r,m,0);v=0===f&&0===b?d*a:60*a+v;var w=0===f?g:f;this.timeScaleArray.push({position:v,value:w,unit:l,hour:f,day:g,year:x,month:y.monthMod(m)}),f++}}},{key:"generateMinuteScale",value:function(e){for(var t=e.currentMillisecond,i=e.currentSecond,n=e.currentMinute,r=e.currentHour,a=e.currentDate,o=e.currentMonth,s=e.currentYear,l=e.minutesWidthOnXAxis,c=e.secondsWidthOnXAxis,h=e.numberOfMinutes,d=n+1,u=a,p=o,f=s,g=r,m=(60-i-t/1e3)*c,v=0;v<h;v++)d>=60&&(d=0,24===(g+=1)&&(g=0)),this.timeScaleArray.push({position:m,value:d,unit:"minute",hour:g,minute:d,day:u,year:this._getYear(f,p,0),month:y.monthMod(p)}),m+=l,d++}},{key:"generateSecondScale",value:function(e){for(var t=e.currentMillisecond,i=e.currentSecond,n=e.currentMinute,r=e.currentHour,a=e.currentDate,o=e.currentMonth,s=e.currentYear,l=e.secondsWidthOnXAxis,c=e.numberOfSeconds,h=i+1,d=n,u=a,p=o,f=s,g=r,m=(1e3-t)/1e3*l,v=0;v<c;v++)h>=60&&(h=0,++d>=60&&(d=0,24==++g&&(g=0))),this.timeScaleArray.push({position:m,value:h,unit:"second",hour:g,minute:d,second:h,day:u,year:this._getYear(f,p,0),month:y.monthMod(p)}),m+=l,h++}},{key:"createRawDateString",value:function(e,t){var i=e.year;return 0===e.month&&(e.month=1),i+="-"+("0"+e.month.toString()).slice(-2),"day"===e.unit?i+="day"===e.unit?"-"+("0"+t).slice(-2):"-01":i+="-"+("0"+(e.day?e.day:"1")).slice(-2),"hour"===e.unit?i+="hour"===e.unit?"T"+("0"+t).slice(-2):"T00":i+="T"+("0"+(e.hour?e.hour:"0")).slice(-2),"minute"===e.unit?i+=":"+("0"+t).slice(-2):i+=":"+(e.minute?("0"+e.minute).slice(-2):"00"),"second"===e.unit?i+=":"+("0"+t).slice(-2):i+=":00",this.utc&&(i+=".000Z"),i}},{key:"formatDates",value:function(e){var t=this,i=this.w;return e.map((function(e){var n=e.value.toString(),r=new F(t.ctx),a=t.createRawDateString(e,n),o=r.getDate(r.parseDate(a));if(t.utc||(o=r.getDate(r.parseDateWithTimezone(a))),void 0===i.config.xaxis.labels.format){var s="dd MMM",l=i.config.xaxis.labels.datetimeFormatter;"year"===e.unit&&(s=l.year),"month"===e.unit&&(s=l.month),"day"===e.unit&&(s=l.day),"hour"===e.unit&&(s=l.hour),"minute"===e.unit&&(s=l.minute),"second"===e.unit&&(s=l.second),n=r.formatDate(o,s)}else n=r.formatDate(o,i.config.xaxis.labels.format);return{dateString:a,position:e.position,value:n,unit:e.unit,year:e.year,month:e.month}}))}},{key:"removeOverlappingTS",value:function(e){var t,i=this,n=new w(this.ctx),r=!1;e.length>0&&e[0].value&&e.every((function(t){return t.value.length===e[0].value.length}))&&(r=!0,t=n.getTextRects(e[0].value).width);var a=0,o=e.map((function(o,s){if(s>0&&i.w.config.xaxis.labels.hideOverlappingLabels){var l=r?t:n.getTextRects(e[a].value).width,c=e[a].position;return o.position>c+l+10?(a=s,o):null}return o}));return o.filter((function(e){return null!==e}))}},{key:"_getYear",value:function(e,t,i){return e+Math.floor(t/12)+i}}]),e}(),Ne=function(){function e(t,i){o(this,e),this.ctx=i,this.w=i.w,this.el=t}return l(e,[{key:"setupElements",value:function(){var e=this.w.globals,t=this.w.config,i=t.chart.type;e.axisCharts=["line","area","bar","rangeBar","candlestick","boxPlot","scatter","bubble","radar","heatmap","treemap"].indexOf(i)>-1,e.xyCharts=["line","area","bar","rangeBar","candlestick","boxPlot","scatter","bubble"].indexOf(i)>-1,e.isBarHorizontal=("bar"===t.chart.type||"rangeBar"===t.chart.type)&&t.plotOptions.bar.horizontal,e.chartClass=".apexcharts"+e.chartID,e.dom.baseEl=this.el,e.dom.elWrap=document.createElement("div"),w.setAttrs(e.dom.elWrap,{id:e.chartClass.substring(1),class:"apexcharts-canvas "+e.chartClass.substring(1)}),this.el.appendChild(e.dom.elWrap),e.dom.Paper=new window.SVG.Doc(e.dom.elWrap),e.dom.Paper.attr({class:"apexcharts-svg","xmlns:data":"ApexChartsNS",transform:"translate(".concat(t.chart.offsetX,", ").concat(t.chart.offsetY,")")}),e.dom.Paper.node.style.background=t.chart.background,this.setSVGDimensions(),e.dom.elGraphical=e.dom.Paper.group().attr({class:"apexcharts-inner apexcharts-graphical"}),e.dom.elAnnotations=e.dom.Paper.group().attr({class:"apexcharts-annotations"}),e.dom.elDefs=e.dom.Paper.defs(),e.dom.elLegendWrap=document.createElement("div"),e.dom.elLegendWrap.classList.add("apexcharts-legend"),e.dom.elWrap.appendChild(e.dom.elLegendWrap),e.dom.Paper.add(e.dom.elGraphical),e.dom.elGraphical.add(e.dom.elDefs)}},{key:"plotChartType",value:function(e,t){var i=this.w,n=i.config,r=i.globals,a={series:[],i:[]},o={series:[],i:[]},s={series:[],i:[]},l={series:[],i:[]},c={series:[],i:[]},h={series:[],i:[]},d={series:[],i:[]};r.series.map((function(t,u){var p=0;void 0!==e[u].type?("column"===e[u].type||"bar"===e[u].type?(r.series.length>1&&n.plotOptions.bar.horizontal&&console.warn("Horizontal bars are not supported in a mixed/combo chart. Please turn off `plotOptions.bar.horizontal`"),c.series.push(t),c.i.push(u),p++,i.globals.columnSeries=c.series):"area"===e[u].type?(o.series.push(t),o.i.push(u),p++):"line"===e[u].type?(a.series.push(t),a.i.push(u),p++):"scatter"===e[u].type?(s.series.push(t),s.i.push(u)):"bubble"===e[u].type?(l.series.push(t),l.i.push(u),p++):"candlestick"===e[u].type?(h.series.push(t),h.i.push(u),p++):"boxPlot"===e[u].type?(d.series.push(t),d.i.push(u),p++):console.warn("You have specified an unrecognized chart type. Available types for this property are line/area/column/bar/scatter/bubble"),p>1&&(r.comboCharts=!0)):(a.series.push(t),a.i.push(u))}));var u=new Me(this.ctx,t),p=new _e(this.ctx,t);this.ctx.pie=new Te(this.ctx);var f=new Le(this.ctx);this.ctx.rangeBar=new H(this.ctx,t);var g=new Pe(this.ctx),m=[];if(r.comboCharts){if(o.series.length>0&&m.push(u.draw(o.series,"area",o.i)),c.series.length>0)if(i.config.chart.stacked){var v=new ke(this.ctx,t);m.push(v.draw(c.series,c.i))}else this.ctx.bar=new R(this.ctx,t),m.push(this.ctx.bar.draw(c.series,c.i));if(a.series.length>0&&m.push(u.draw(a.series,"line",a.i)),h.series.length>0&&m.push(p.draw(h.series,h.i)),d.series.length>0&&m.push(p.draw(d.series,d.i)),s.series.length>0){var y=new Me(this.ctx,t,!0);m.push(y.draw(s.series,"scatter",s.i))}if(l.series.length>0){var b=new Me(this.ctx,t,!0);m.push(b.draw(l.series,"bubble",l.i))}}else switch(n.chart.type){case"line":m=u.draw(r.series,"line");break;case"area":m=u.draw(r.series,"area");break;case"bar":n.chart.stacked?m=new ke(this.ctx,t).draw(r.series):(this.ctx.bar=new R(this.ctx,t),m=this.ctx.bar.draw(r.series));break;case"candlestick":case"boxPlot":m=new _e(this.ctx,t).draw(r.series);break;case"rangeBar":m=this.ctx.rangeBar.draw(r.series);break;case"heatmap":m=new Ae(this.ctx,t).draw(r.series);break;case"treemap":m=new De(this.ctx,t).draw(r.series);break;case"pie":case"donut":case"polarArea":m=this.ctx.pie.draw(r.series);break;case"radialBar":m=f.draw(r.series);break;case"radar":m=g.draw(r.series);break;default:m=u.draw(r.series)}return m}},{key:"setSVGDimensions",value:function(){var e=this.w.globals,t=this.w.config;e.svgWidth=t.chart.width,e.svgHeight=t.chart.height;var i=y.getDimensions(this.el),n=t.chart.width.toString().split(/[0-9]+/g).pop();"%"===n?y.isNumber(i[0])&&(0===i[0].width&&(i=y.getDimensions(this.el.parentNode)),e.svgWidth=i[0]*parseInt(t.chart.width,10)/100):"px"!==n&&""!==n||(e.svgWidth=parseInt(t.chart.width,10));var r=t.chart.height.toString().split(/[0-9]+/g).pop();if("auto"!==e.svgHeight&&""!==e.svgHeight)if("%"===r){var a=y.getDimensions(this.el.parentNode);e.svgHeight=a[1]*parseInt(t.chart.height,10)/100}else e.svgHeight=parseInt(t.chart.height,10);else e.axisCharts?e.svgHeight=e.svgWidth/1.61:e.svgHeight=e.svgWidth/1.2;if(e.svgWidth<0&&(e.svgWidth=0),e.svgHeight<0&&(e.svgHeight=0),w.setAttrs(e.dom.Paper.node,{width:e.svgWidth,height:e.svgHeight}),"%"!==r){var o=t.chart.sparkline.enabled?0:e.axisCharts?t.chart.parentHeightOffset:0;e.dom.Paper.node.parentNode.parentNode.style.minHeight=e.svgHeight+o+"px"}e.dom.elWrap.style.width=e.svgWidth+"px",e.dom.elWrap.style.height=e.svgHeight+"px"}},{key:"shiftGraphPosition",value:function(){var e=this.w.globals,t=e.translateY,i={transform:"translate("+e.translateX+", "+t+")"};w.setAttrs(e.dom.elGraphical.node,i)}},{key:"resizeNonAxisCharts",value:function(){var e=this.w,t=e.globals,i=0,n=e.config.chart.sparkline.enabled?1:15;n+=e.config.grid.padding.bottom,"top"!==e.config.legend.position&&"bottom"!==e.config.legend.position||!e.config.legend.show||e.config.legend.floating||(i=new ue(this.ctx).legendHelpers.getLegendBBox().clwh+10);var r=e.globals.dom.baseEl.querySelector(".apexcharts-radialbar, .apexcharts-pie"),a=2.05*e.globals.radialSize;if(r&&!e.config.chart.sparkline.enabled){var o=y.getBoundingClientRect(r);a=o.bottom;var s=o.bottom-o.top;a=Math.max(2.05*e.globals.radialSize,s)}var l=a+t.translateY+i+n;t.dom.elLegendForeign&&t.dom.elLegendForeign.setAttribute("height",l),t.dom.elWrap.style.height=l+"px",w.setAttrs(t.dom.Paper.node,{height:l}),t.dom.Paper.node.parentNode.parentNode.style.minHeight=l+"px"}},{key:"coreCalculations",value:function(){new J(this.ctx).init()}},{key:"resetGlobals",value:function(){var e=this,t=function(){return e.w.config.series.map((function(e){return[]}))},i=new $,n=this.w.globals;i.initGlobalVars(n),n.seriesXvalues=t(),n.seriesYvalues=t()}},{key:"isMultipleY",value:function(){if(this.w.config.yaxis.constructor===Array&&this.w.config.yaxis.length>1)return this.w.globals.isMultipleYAxis=!0,!0}},{key:"xySettings",value:function(){var e=null,t=this.w;if(t.globals.axisCharts){if("back"===t.config.xaxis.crosshairs.position&&new ie(this.ctx).drawXCrosshairs(),"back"===t.config.yaxis[0].crosshairs.position&&new ie(this.ctx).drawYCrosshairs(),"datetime"===t.config.xaxis.type&&void 0===t.config.xaxis.labels.formatter){this.ctx.timeScale=new ze(this.ctx);var i=[];isFinite(t.globals.minX)&&isFinite(t.globals.maxX)&&!t.globals.isBarHorizontal?i=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minX,t.globals.maxX):t.globals.isBarHorizontal&&(i=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minY,t.globals.maxY)),this.ctx.timeScale.recalcDimensionsBasedOnFormat(i)}e=new S(this.ctx).getCalculatedRatios()}return e}},{key:"updateSourceChart",value:function(e){this.ctx.w.globals.selection=void 0,this.ctx.updateHelpers._updateOptions({chart:{selection:{xaxis:{min:e.w.globals.minX,max:e.w.globals.maxX}}}},!1,!1)}},{key:"setupBrushHandler",value:function(){var e=this,t=this.w;if(t.config.chart.brush.enabled&&"function"!=typeof t.config.chart.events.selection){var i=t.config.chart.brush.targets||[t.config.chart.brush.target];i.forEach((function(t){var i=ApexCharts.getChartByID(t);i.w.globals.brushSource=e.ctx,"function"!=typeof i.w.config.chart.events.zoomed&&(i.w.config.chart.events.zoomed=function(){e.updateSourceChart(i)}),"function"!=typeof i.w.config.chart.events.scrolled&&(i.w.config.chart.events.scrolled=function(){e.updateSourceChart(i)})})),t.config.chart.events.selection=function(e,n){i.forEach((function(e){var i=ApexCharts.getChartByID(e),r=y.clone(t.config.yaxis);if(t.config.chart.brush.autoScaleYaxis&&1===i.w.globals.series.length){var a=new Z(i);r=a.autoScaleY(i,r,n)}var o=i.w.config.yaxis.reduce((function(e,t,n){return[].concat(m(e),[d(d({},i.w.config.yaxis[n]),{},{min:r[0].min,max:r[0].max})])}),[]);i.ctx.updateHelpers._updateOptions({xaxis:{min:n.xaxis.min,max:n.xaxis.max},yaxis:o},!1,!1,!1,!1)}))}}}}]),e}(),Re=function(){function e(t){o(this,e),this.ctx=t,this.w=t.w}return l(e,[{key:"_updateOptions",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],s=[this.ctx];r&&(s=this.ctx.getSyncedCharts()),this.ctx.w.globals.isExecCalled&&(s=[this.ctx],this.ctx.w.globals.isExecCalled=!1),s.forEach((function(r){var s=r.w;return s.globals.shouldAnimate=n,i||(s.globals.resized=!0,s.globals.dataChanged=!0,n&&r.series.getPreviousPaths()),e&&"object"===a(e)&&(r.config=new j(e),e=S.extendArrayProps(r.config,e,s),r.w.globals.chartID!==t.ctx.w.globals.chartID&&delete e.series,s.config=y.extend(s.config,e),o&&(s.globals.lastXAxis=e.xaxis?y.clone(e.xaxis):[],s.globals.lastYAxis=e.yaxis?y.clone(e.yaxis):[],s.globals.initialConfig=y.extend({},s.config),s.globals.initialSeries=y.clone(s.config.series))),r.update(e)}))}},{key:"_updateSeries",value:function(e,t){var i,n=this,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=this.w;return a.globals.shouldAnimate=t,a.globals.dataChanged=!0,t&&this.ctx.series.getPreviousPaths(),a.globals.axisCharts?(0===(i=e.map((function(e,t){return n._extendSeries(e,t)}))).length&&(i=[{data:[]}]),a.config.series=i):a.config.series=e.slice(),r&&(a.globals.initialSeries=y.clone(a.config.series)),this.ctx.update()}},{key:"_extendSeries",value:function(e,t){var i=this.w,n=i.config.series[t];return d(d({},i.config.series[t]),{},{name:e.name?e.name:n&&n.name,color:e.color?e.color:n&&n.color,type:e.type?e.type:n&&n.type,data:e.data?e.data:n&&n.data})}},{key:"toggleDataPointSelection",value:function(e,t){var i=this.w,n=null,r=".apexcharts-series[data\\:realIndex='".concat(e,"']");return i.globals.axisCharts?n=i.globals.dom.Paper.select("".concat(r," path[j='").concat(t,"'], ").concat(r," circle[j='").concat(t,"'], ").concat(r," rect[j='").concat(t,"']")).members[0]:void 0===t&&(n=i.globals.dom.Paper.select("".concat(r," path[j='").concat(e,"']")).members[0],"pie"!==i.config.chart.type&&"polarArea"!==i.config.chart.type&&"donut"!==i.config.chart.type||this.ctx.pie.pieClicked(e)),n?(new w(this.ctx).pathMouseDown(n,null),n.node?n.node:null):(console.warn("toggleDataPointSelection: Element not found"),null)}},{key:"forceXAxisUpdate",value:function(e){var t=this.w;if(["min","max"].forEach((function(i){void 0!==e.xaxis[i]&&(t.config.xaxis[i]=e.xaxis[i],t.globals.lastXAxis[i]=e.xaxis[i])})),e.xaxis.categories&&e.xaxis.categories.length&&(t.config.xaxis.categories=e.xaxis.categories),t.config.xaxis.convertedCatToNumeric){var i=new Y(e);e=i.convertCatToNumericXaxis(e,this.ctx)}return e}},{key:"forceYAxisUpdate",value:function(e){var t=this.w;return t.config.chart.stacked&&"100%"===t.config.chart.stackType&&(Array.isArray(e.yaxis)?e.yaxis.forEach((function(t,i){e.yaxis[i].min=0,e.yaxis[i].max=100})):(e.yaxis.min=0,e.yaxis.max=100)),e}},{key:"revertDefaultAxisMinMax",value:function(e){var t=this,i=this.w,n=i.globals.lastXAxis,r=i.globals.lastYAxis;e&&e.xaxis&&(n=e.xaxis),e&&e.yaxis&&(r=e.yaxis),i.config.xaxis.min=n.min,i.config.xaxis.max=n.max;i.config.yaxis.map((function(e,n){i.globals.zoomed||void 0!==r[n]?function(e){void 0!==r[e]&&(i.config.yaxis[e].min=r[e].min,i.config.yaxis[e].max=r[e].max)}(n):void 0!==t.ctx.opts.yaxis[n]&&(e.min=t.ctx.opts.yaxis[n].min,e.max=t.ctx.opts.yaxis[n].max)}))}}]),e}();Oe="undefined"!=typeof window?window:void 0,Ie=function(e,t){var i=(void 0!==this?this:e).SVG=function(e){if(i.supported)return e=new i.Doc(e),i.parser.draw||i.prepare(),e};if(i.ns="http://www.w3.org/2000/svg",i.xmlns="http://www.w3.org/2000/xmlns/",i.xlink="http://www.w3.org/1999/xlink",i.svgjs="http://svgjs.com/svgjs",i.supported=!0,!i.supported)return!1;i.did=1e3,i.eid=function(e){return"Svgjs"+d(e)+i.did++},i.create=function(e){var i=t.createElementNS(this.ns,e);return i.setAttribute("id",this.eid(e)),i},i.extend=function(){var e,t;t=(e=[].slice.call(arguments)).pop();for(var n=e.length-1;n>=0;n--)if(e[n])for(var r in t)e[n].prototype[r]=t[r];i.Set&&i.Set.inherit&&i.Set.inherit()},i.invent=function(e){var t="function"==typeof e.create?e.create:function(){this.constructor.call(this,i.create(e.create))};return e.inherit&&(t.prototype=new e.inherit),e.extend&&i.extend(t,e.extend),e.construct&&i.extend(e.parent||i.Container,e.construct),t},i.adopt=function(t){return t?t.instance?t.instance:((n="svg"==t.nodeName?t.parentNode instanceof e.SVGElement?new i.Nested:new i.Doc:"linearGradient"==t.nodeName?new i.Gradient("linear"):"radialGradient"==t.nodeName?new i.Gradient("radial"):i[d(t.nodeName)]?new(i[d(t.nodeName)]):new i.Element(t)).type=t.nodeName,n.node=t,t.instance=n,n instanceof i.Doc&&n.namespace().defs(),n.setData(JSON.parse(t.getAttribute("svgjs:data"))||{}),n):null;var n},i.prepare=function(){var e=t.getElementsByTagName("body")[0],n=(e?new i.Doc(e):i.adopt(t.documentElement).nested()).size(2,0);i.parser={body:e||t.documentElement,draw:n.style("opacity:0;position:absolute;left:-100%;top:-100%;overflow:hidden").node,poly:n.polyline().node,path:n.path().node,native:i.create("svg")}},i.parser={native:i.create("svg")},t.addEventListener("DOMContentLoaded",(function(){i.parser.draw||i.prepare()}),!1),i.regex={numberAndUnit:/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,hex:/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,rgb:/rgb\((\d+),(\d+),(\d+)\)/,reference:/#([a-z0-9\-_]+)/i,transforms:/\)\s*,?\s*/,whitespace:/\s/g,isHex:/^#[a-f0-9]{3,6}$/i,isRgb:/^rgb\(/,isCss:/[^:]+:[^;]+;?/,isBlank:/^(\s+)?$/,isNumber:/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,isPercent:/^-?[\d\.]+%$/,isImage:/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,delimiter:/[\s,]+/,hyphen:/([^e])\-/gi,pathLetters:/[MLHVCSQTAZ]/gi,isPathLetter:/[MLHVCSQTAZ]/i,numbersWithDots:/((\d?\.\d+(?:e[+-]?\d+)?)((?:\.\d+(?:e[+-]?\d+)?)+))+/gi,dots:/\./g},i.utils={map:function(e,t){for(var i=e.length,n=[],r=0;r<i;r++)n.push(t(e[r]));return n},filter:function(e,t){for(var i=e.length,n=[],r=0;r<i;r++)t(e[r])&&n.push(e[r]);return n},filterSVGElements:function(t){return this.filter(t,(function(t){return t instanceof e.SVGElement}))}},i.defaults={attrs:{"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","font-size":16,"font-family":"Helvetica, Arial, sans-serif","text-anchor":"start"}},i.Color=function(e){var t,n;this.r=0,this.g=0,this.b=0,e&&("string"==typeof e?i.regex.isRgb.test(e)?(t=i.regex.rgb.exec(e.replace(i.regex.whitespace,"")),this.r=parseInt(t[1]),this.g=parseInt(t[2]),this.b=parseInt(t[3])):i.regex.isHex.test(e)&&(t=i.regex.hex.exec(4==(n=e).length?["#",n.substring(1,2),n.substring(1,2),n.substring(2,3),n.substring(2,3),n.substring(3,4),n.substring(3,4)].join(""):n),this.r=parseInt(t[1],16),this.g=parseInt(t[2],16),this.b=parseInt(t[3],16)):"object"===a(e)&&(this.r=e.r,this.g=e.g,this.b=e.b))},i.extend(i.Color,{toString:function(){return this.toHex()},toHex:function(){return"#"+u(this.r)+u(this.g)+u(this.b)},toRgb:function(){return"rgb("+[this.r,this.g,this.b].join()+")"},brightness:function(){return this.r/255*.3+this.g/255*.59+this.b/255*.11},morph:function(e){return this.destination=new i.Color(e),this},at:function(e){return this.destination?(e=e<0?0:e>1?1:e,new i.Color({r:~~(this.r+(this.destination.r-this.r)*e),g:~~(this.g+(this.destination.g-this.g)*e),b:~~(this.b+(this.destination.b-this.b)*e)})):this}}),i.Color.test=function(e){return e+="",i.regex.isHex.test(e)||i.regex.isRgb.test(e)},i.Color.isRgb=function(e){return e&&"number"==typeof e.r&&"number"==typeof e.g&&"number"==typeof e.b},i.Color.isColor=function(e){return i.Color.isRgb(e)||i.Color.test(e)},i.Array=function(e,t){0==(e=(e||[]).valueOf()).length&&t&&(e=t.valueOf()),this.value=this.parse(e)},i.extend(i.Array,{toString:function(){return this.value.join(" ")},valueOf:function(){return this.value},parse:function(e){return e=e.valueOf(),Array.isArray(e)?e:this.split(e)}}),i.PointArray=function(e,t){i.Array.call(this,e,t||[[0,0]])},i.PointArray.prototype=new i.Array,i.PointArray.prototype.constructor=i.PointArray;for(var n={M:function(e,t,i){return t.x=i.x=e[0],t.y=i.y=e[1],["M",t.x,t.y]},L:function(e,t){return t.x=e[0],t.y=e[1],["L",e[0],e[1]]},H:function(e,t){return t.x=e[0],["H",e[0]]},V:function(e,t){return t.y=e[0],["V",e[0]]},C:function(e,t){return t.x=e[4],t.y=e[5],["C",e[0],e[1],e[2],e[3],e[4],e[5]]},Q:function(e,t){return t.x=e[2],t.y=e[3],["Q",e[0],e[1],e[2],e[3]]},Z:function(e,t,i){return t.x=i.x,t.y=i.y,["Z"]}},r="mlhvqtcsaz".split(""),o=0,s=r.length;o<s;++o)n[r[o]]=function(e){return function(t,i,r){if("H"==e)t[0]=t[0]+i.x;else if("V"==e)t[0]=t[0]+i.y;else if("A"==e)t[5]=t[5]+i.x,t[6]=t[6]+i.y;else for(var a=0,o=t.length;a<o;++a)t[a]=t[a]+(a%2?i.y:i.x);return n[e](t,i,r)}}(r[o].toUpperCase());i.PathArray=function(e,t){i.Array.call(this,e,t||[["M",0,0]])},i.PathArray.prototype=new i.Array,i.PathArray.prototype.constructor=i.PathArray,i.extend(i.PathArray,{toString:function(){return function(e){for(var t=0,i=e.length,n="";t<i;t++)n+=e[t][0],null!=e[t][1]&&(n+=e[t][1],null!=e[t][2]&&(n+=" ",n+=e[t][2],null!=e[t][3]&&(n+=" ",n+=e[t][3],n+=" ",n+=e[t][4],null!=e[t][5]&&(n+=" ",n+=e[t][5],n+=" ",n+=e[t][6],null!=e[t][7]&&(n+=" ",n+=e[t][7])))));return n+" "}(this.value)},move:function(e,t){var i=this.bbox();return i.x,i.y,this},at:function(e){if(!this.destination)return this;for(var t=this.value,n=this.destination.value,r=[],a=new i.PathArray,o=0,s=t.length;o<s;o++){r[o]=[t[o][0]];for(var l=1,c=t[o].length;l<c;l++)r[o][l]=t[o][l]+(n[o][l]-t[o][l])*e;"A"===r[o][0]&&(r[o][4]=+(0!=r[o][4]),r[o][5]=+(0!=r[o][5]))}return a.value=r,a},parse:function(e){if(e instanceof i.PathArray)return e.valueOf();var t,r={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0};e="string"==typeof e?e.replace(i.regex.numbersWithDots,c).replace(i.regex.pathLetters," $& ").replace(i.regex.hyphen,"$1 -").trim().split(i.regex.delimiter):e.reduce((function(e,t){return[].concat.call(e,t)}),[]);var a=[],o=new i.Point,s=new i.Point,l=0,h=e.length;do{i.regex.isPathLetter.test(e[l])?(t=e[l],++l):"M"==t?t="L":"m"==t&&(t="l"),a.push(n[t].call(null,e.slice(l,l+=r[t.toUpperCase()]).map(parseFloat),o,s))}while(h>l);return a},bbox:function(){return i.parser.draw||i.prepare(),i.parser.path.setAttribute("d",this.toString()),i.parser.path.getBBox()}}),i.Number=i.invent({create:function(e,t){this.value=0,this.unit=t||"","number"==typeof e?this.value=isNaN(e)?0:isFinite(e)?e:e<0?-34e37:34e37:"string"==typeof e?(t=e.match(i.regex.numberAndUnit))&&(this.value=parseFloat(t[1]),"%"==t[5]?this.value/=100:"s"==t[5]&&(this.value*=1e3),this.unit=t[5]):e instanceof i.Number&&(this.value=e.valueOf(),this.unit=e.unit)},extend:{toString:function(){return("%"==this.unit?~~(1e8*this.value)/1e6:"s"==this.unit?this.value/1e3:this.value)+this.unit},toJSON:function(){return this.toString()},valueOf:function(){return this.value},plus:function(e){return e=new i.Number(e),new i.Number(this+e,this.unit||e.unit)},minus:function(e){return e=new i.Number(e),new i.Number(this-e,this.unit||e.unit)},times:function(e){return e=new i.Number(e),new i.Number(this*e,this.unit||e.unit)},divide:function(e){return e=new i.Number(e),new i.Number(this/e,this.unit||e.unit)},to:function(e){var t=new i.Number(this);return"string"==typeof e&&(t.unit=e),t},morph:function(e){return this.destination=new i.Number(e),e.relative&&(this.destination.value+=this.value),this},at:function(e){return this.destination?new i.Number(this.destination).minus(this).times(e).plus(this):this}}}),i.Element=i.invent({create:function(e){this._stroke=i.defaults.attrs.stroke,this._event=null,this.dom={},(this.node=e)&&(this.type=e.nodeName,this.node.instance=this,this._stroke=e.getAttribute("stroke")||this._stroke)},extend:{x:function(e){return this.attr("x",e)},y:function(e){return this.attr("y",e)},cx:function(e){return null==e?this.x()+this.width()/2:this.x(e-this.width()/2)},cy:function(e){return null==e?this.y()+this.height()/2:this.y(e-this.height()/2)},move:function(e,t){return this.x(e).y(t)},center:function(e,t){return this.cx(e).cy(t)},width:function(e){return this.attr("width",e)},height:function(e){return this.attr("height",e)},size:function(e,t){var n=p(this,e,t);return this.width(new i.Number(n.width)).height(new i.Number(n.height))},clone:function(e){this.writeDataToDom();var t=m(this.node.cloneNode(!0));return e?e.add(t):this.after(t),t},remove:function(){return this.parent()&&this.parent().removeElement(this),this},replace:function(e){return this.after(e).remove(),e},addTo:function(e){return e.put(this)},putIn:function(e){return e.add(this)},id:function(e){return this.attr("id",e)},show:function(){return this.style("display","")},hide:function(){return this.style("display","none")},visible:function(){return"none"!=this.style("display")},toString:function(){return this.attr("id")},classes:function(){var e=this.attr("class");return null==e?[]:e.trim().split(i.regex.delimiter)},hasClass:function(e){return-1!=this.classes().indexOf(e)},addClass:function(e){if(!this.hasClass(e)){var t=this.classes();t.push(e),this.attr("class",t.join(" "))}return this},removeClass:function(e){return this.hasClass(e)&&this.attr("class",this.classes().filter((function(t){return t!=e})).join(" ")),this},toggleClass:function(e){return this.hasClass(e)?this.removeClass(e):this.addClass(e)},reference:function(e){return i.get(this.attr(e))},parent:function(t){var n=this;if(!n.node.parentNode)return null;if(n=i.adopt(n.node.parentNode),!t)return n;for(;n&&n.node instanceof e.SVGElement;){if("string"==typeof t?n.matches(t):n instanceof t)return n;if(!n.node.parentNode||"#document"==n.node.parentNode.nodeName)return null;n=i.adopt(n.node.parentNode)}},doc:function(){return this instanceof i.Doc?this:this.parent(i.Doc)},parents:function(e){var t=[],i=this;do{if(!(i=i.parent(e))||!i.node)break;t.push(i)}while(i.parent);return t},matches:function(e){return function(e,t){return(e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector).call(e,t)}(this.node,e)},native:function(){return this.node},svg:function(e){var n=t.createElement("svg");if(!(e&&this instanceof i.Parent))return n.appendChild(e=t.createElement("svg")),this.writeDataToDom(),e.appendChild(this.node.cloneNode(!0)),n.innerHTML.replace(/^<svg>/,"").replace(/<\/svg>$/,"");n.innerHTML="<svg>"+e.replace(/\n/,"").replace(/<([\w:-]+)([^<]+?)\/>/g,"<$1$2></$1>")+"</svg>";for(var r=0,a=n.firstChild.childNodes.length;r<a;r++)this.node.appendChild(n.firstChild.firstChild);return this},writeDataToDom:function(){return(this.each||this.lines)&&(this.each?this:this.lines()).each((function(){this.writeDataToDom()})),this.node.removeAttribute("svgjs:data"),Object.keys(this.dom).length&&this.node.setAttribute("svgjs:data",JSON.stringify(this.dom)),this},setData:function(e){return this.dom=e,this},is:function(e){return function(e,t){return e instanceof t}(this,e)}}}),i.easing={"-":function(e){return e},"<>":function(e){return-Math.cos(e*Math.PI)/2+.5},">":function(e){return Math.sin(e*Math.PI/2)},"<":function(e){return 1-Math.cos(e*Math.PI/2)}},i.morph=function(e){return function(t,n){return new i.MorphObj(t,n).at(e)}},i.Situation=i.invent({create:function(e){this.init=!1,this.reversed=!1,this.reversing=!1,this.duration=new i.Number(e.duration).valueOf(),this.delay=new i.Number(e.delay).valueOf(),this.start=+new Date+this.delay,this.finish=this.start+this.duration,this.ease=e.ease,this.loop=0,this.loops=!1,this.animations={},this.attrs={},this.styles={},this.transforms=[],this.once={}}}),i.FX=i.invent({create:function(e){this._target=e,this.situations=[],this.active=!1,this.situation=null,this.paused=!1,this.lastPos=0,this.pos=0,this.absPos=0,this._speed=1},extend:{animate:function(e,t,n){"object"===a(e)&&(t=e.ease,n=e.delay,e=e.duration);var r=new i.Situation({duration:e||1e3,delay:n||0,ease:i.easing[t||"-"]||t});return this.queue(r),this},target:function(e){return e&&e instanceof i.Element?(this._target=e,this):this._target},timeToAbsPos:function(e){return(e-this.situation.start)/(this.situation.duration/this._speed)},absPosToTime:function(e){return this.situation.duration/this._speed*e+this.situation.start},startAnimFrame:function(){this.stopAnimFrame(),this.animationFrame=e.requestAnimationFrame(function(){this.step()}.bind(this))},stopAnimFrame:function(){e.cancelAnimationFrame(this.animationFrame)},start:function(){return!this.active&&this.situation&&(this.active=!0,this.startCurrent()),this},startCurrent:function(){return this.situation.start=+new Date+this.situation.delay/this._speed,this.situation.finish=this.situation.start+this.situation.duration/this._speed,this.initAnimations().step()},queue:function(e){return("function"==typeof e||e instanceof i.Situation)&&this.situations.push(e),this.situation||(this.situation=this.situations.shift()),this},dequeue:function(){return this.stop(),this.situation=this.situations.shift(),this.situation&&(this.situation instanceof i.Situation?this.start():this.situation.call(this)),this},initAnimations:function(){var e,t=this.situation;if(t.init)return this;for(var n in t.animations){e=this.target()[n](),Array.isArray(e)||(e=[e]),Array.isArray(t.animations[n])||(t.animations[n]=[t.animations[n]]);for(var r=e.length;r--;)t.animations[n][r]instanceof i.Number&&(e[r]=new i.Number(e[r])),t.animations[n][r]=e[r].morph(t.animations[n][r])}for(var n in t.attrs)t.attrs[n]=new i.MorphObj(this.target().attr(n),t.attrs[n]);for(var n in t.styles)t.styles[n]=new i.MorphObj(this.target().style(n),t.styles[n]);return t.initialTransformation=this.target().matrixify(),t.init=!0,this},clearQueue:function(){return this.situations=[],this},clearCurrent:function(){return this.situation=null,this},stop:function(e,t){var i=this.active;return this.active=!1,t&&this.clearQueue(),e&&this.situation&&(!i&&this.startCurrent(),this.atEnd()),this.stopAnimFrame(),this.clearCurrent()},after:function(e){var t=this.last();return this.target().on("finished.fx",(function i(n){n.detail.situation==t&&(e.call(this,t),this.off("finished.fx",i))})),this._callStart()},during:function(e){var t=this.last(),n=function(n){n.detail.situation==t&&e.call(this,n.detail.pos,i.morph(n.detail.pos),n.detail.eased,t)};return this.target().off("during.fx",n).on("during.fx",n),this.after((function(){this.off("during.fx",n)})),this._callStart()},afterAll:function(e){var t=function t(i){e.call(this),this.off("allfinished.fx",t)};return this.target().off("allfinished.fx",t).on("allfinished.fx",t),this._callStart()},last:function(){return this.situations.length?this.situations[this.situations.length-1]:this.situation},add:function(e,t,i){return this.last()[i||"animations"][e]=t,this._callStart()},step:function(e){var t,i,n;e||(this.absPos=this.timeToAbsPos(+new Date)),!1!==this.situation.loops?(t=Math.max(this.absPos,0),i=Math.floor(t),!0===this.situation.loops||i<this.situation.loops?(this.pos=t-i,n=this.situation.loop,this.situation.loop=i):(this.absPos=this.situation.loops,this.pos=1,n=this.situation.loop-1,this.situation.loop=this.situation.loops),this.situation.reversing&&(this.situation.reversed=this.situation.reversed!=Boolean((this.situation.loop-n)%2))):(this.absPos=Math.min(this.absPos,1),this.pos=this.absPos),this.pos<0&&(this.pos=0),this.situation.reversed&&(this.pos=1-this.pos);var r=this.situation.ease(this.pos);for(var a in this.situation.once)a>this.lastPos&&a<=r&&(this.situation.once[a].call(this.target(),this.pos,r),delete this.situation.once[a]);return this.active&&this.target().fire("during",{pos:this.pos,eased:r,fx:this,situation:this.situation}),this.situation?(this.eachAt(),1==this.pos&&!this.situation.reversed||this.situation.reversed&&0==this.pos?(this.stopAnimFrame(),this.target().fire("finished",{fx:this,situation:this.situation}),this.situations.length||(this.target().fire("allfinished"),this.situations.length||(this.target().off(".fx"),this.active=!1)),this.active?this.dequeue():this.clearCurrent()):!this.paused&&this.active&&this.startAnimFrame(),this.lastPos=r,this):this},eachAt:function(){var e,t=this,n=this.target(),r=this.situation;for(var a in r.animations)e=[].concat(r.animations[a]).map((function(e){return"string"!=typeof e&&e.at?e.at(r.ease(t.pos),t.pos):e})),n[a].apply(n,e);for(var a in r.attrs)e=[a].concat(r.attrs[a]).map((function(e){return"string"!=typeof e&&e.at?e.at(r.ease(t.pos),t.pos):e})),n.attr.apply(n,e);for(var a in r.styles)e=[a].concat(r.styles[a]).map((function(e){return"string"!=typeof e&&e.at?e.at(r.ease(t.pos),t.pos):e})),n.style.apply(n,e);if(r.transforms.length){e=r.initialTransformation,a=0;for(var o=r.transforms.length;a<o;a++){var s=r.transforms[a];s instanceof i.Matrix?e=s.relative?e.multiply((new i.Matrix).morph(s).at(r.ease(this.pos))):e.morph(s).at(r.ease(this.pos)):(s.relative||s.undo(e.extract()),e=e.multiply(s.at(r.ease(this.pos))))}n.matrix(e)}return this},once:function(e,t,i){var n=this.last();return i||(e=n.ease(e)),n.once[e]=t,this},_callStart:function(){return setTimeout(function(){this.start()}.bind(this),0),this}},parent:i.Element,construct:{animate:function(e,t,n){return(this.fx||(this.fx=new i.FX(this))).animate(e,t,n)},delay:function(e){return(this.fx||(this.fx=new i.FX(this))).delay(e)},stop:function(e,t){return this.fx&&this.fx.stop(e,t),this},finish:function(){return this.fx&&this.fx.finish(),this}}}),i.MorphObj=i.invent({create:function(e,t){return i.Color.isColor(t)?new i.Color(e).morph(t):i.regex.delimiter.test(e)?i.regex.pathLetters.test(e)?new i.PathArray(e).morph(t):new i.Array(e).morph(t):i.regex.numberAndUnit.test(t)?new i.Number(e).morph(t):(this.value=e,void(this.destination=t))},extend:{at:function(e,t){return t<1?this.value:this.destination},valueOf:function(){return this.value}}}),i.extend(i.FX,{attr:function(e,t,i){if("object"===a(e))for(var n in e)this.attr(n,e[n]);else this.add(e,t,"attrs");return this},plot:function(e,t,i,n){return 4==arguments.length?this.plot([e,t,i,n]):this.add("plot",new(this.target().morphArray)(e))}}),i.Box=i.invent({create:function(e,t,n,r){if(!("object"!==a(e)||e instanceof i.Element))return i.Box.call(this,null!=e.left?e.left:e.x,null!=e.top?e.top:e.y,e.width,e.height);4==arguments.length&&(this.x=e,this.y=t,this.width=n,this.height=r),v(this)}}),i.BBox=i.invent({create:function(e){if(i.Box.apply(this,[].slice.call(arguments)),e instanceof i.Element){var n;try{if(!t.documentElement.contains){for(var r=e.node;r.parentNode;)r=r.parentNode;if(r!=t)throw new Error("Element not in the dom")}n=e.node.getBBox()}catch(t){if(e instanceof i.Shape){i.parser.draw||i.prepare();var a=e.clone(i.parser.draw.instance).show();n=a.node.getBBox(),a.remove()}else n={x:e.node.clientLeft,y:e.node.clientTop,width:e.node.clientWidth,height:e.node.clientHeight}}i.Box.call(this,n)}},inherit:i.Box,parent:i.Element,construct:{bbox:function(){return new i.BBox(this)}}}),i.BBox.prototype.constructor=i.BBox,i.Matrix=i.invent({create:function(e){var t=g([1,0,0,1,0,0]);e=e instanceof i.Element?e.matrixify():"string"==typeof e?g(e.split(i.regex.delimiter).map(parseFloat)):6==arguments.length?g([].slice.call(arguments)):Array.isArray(e)?g(e):"object"===a(e)?e:t;for(var n=b.length-1;n>=0;--n)this[b[n]]=null!=e[b[n]]?e[b[n]]:t[b[n]]},extend:{extract:function(){var e=f(this,0,1),t=(f(this,1,0),180/Math.PI*Math.atan2(e.y,e.x)-90);return{x:this.e,y:this.f,transformedX:(this.e*Math.cos(t*Math.PI/180)+this.f*Math.sin(t*Math.PI/180))/Math.sqrt(this.a*this.a+this.b*this.b),transformedY:(this.f*Math.cos(t*Math.PI/180)+this.e*Math.sin(-t*Math.PI/180))/Math.sqrt(this.c*this.c+this.d*this.d),rotation:t,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f,matrix:new i.Matrix(this)}},clone:function(){return new i.Matrix(this)},morph:function(e){return this.destination=new i.Matrix(e),this},multiply:function(e){return new i.Matrix(this.native().multiply(function(e){return e instanceof i.Matrix||(e=new i.Matrix(e)),e}(e).native()))},inverse:function(){return new i.Matrix(this.native().inverse())},translate:function(e,t){return new i.Matrix(this.native().translate(e||0,t||0))},native:function(){for(var e=i.parser.native.createSVGMatrix(),t=b.length-1;t>=0;t--)e[b[t]]=this[b[t]];return e},toString:function(){return"matrix("+y(this.a)+","+y(this.b)+","+y(this.c)+","+y(this.d)+","+y(this.e)+","+y(this.f)+")"}},parent:i.Element,construct:{ctm:function(){return new i.Matrix(this.node.getCTM())},screenCTM:function(){if(this instanceof i.Nested){var e=this.rect(1,1),t=e.node.getScreenCTM();return e.remove(),new i.Matrix(t)}return new i.Matrix(this.node.getScreenCTM())}}}),i.Point=i.invent({create:function(e,t){var i;i=Array.isArray(e)?{x:e[0],y:e[1]}:"object"===a(e)?{x:e.x,y:e.y}:null!=e?{x:e,y:null!=t?t:e}:{x:0,y:0},this.x=i.x,this.y=i.y},extend:{clone:function(){return new i.Point(this)},morph:function(e,t){return this.destination=new i.Point(e,t),this}}}),i.extend(i.Element,{point:function(e,t){return new i.Point(e,t).transform(this.screenCTM().inverse())}}),i.extend(i.Element,{attr:function(e,t,n){if(null==e){for(e={},n=(t=this.node.attributes).length-1;n>=0;n--)e[t[n].nodeName]=i.regex.isNumber.test(t[n].nodeValue)?parseFloat(t[n].nodeValue):t[n].nodeValue;return e}if("object"===a(e))for(var r in e)this.attr(r,e[r]);else if(null===t)this.node.removeAttribute(e);else{if(null==t)return null==(t=this.node.getAttribute(e))?i.defaults.attrs[e]:i.regex.isNumber.test(t)?parseFloat(t):t;"stroke-width"==e?this.attr("stroke",parseFloat(t)>0?this._stroke:null):"stroke"==e&&(this._stroke=t),"fill"!=e&&"stroke"!=e||(i.regex.isImage.test(t)&&(t=this.doc().defs().image(t,0,0)),t instanceof i.Image&&(t=this.doc().defs().pattern(0,0,(function(){this.add(t)})))),"number"==typeof t?t=new i.Number(t):i.Color.isColor(t)?t=new i.Color(t):Array.isArray(t)&&(t=new i.Array(t)),"leading"==e?this.leading&&this.leading(t):"string"==typeof n?this.node.setAttributeNS(n,e,t.toString()):this.node.setAttribute(e,t.toString()),!this.rebuild||"font-size"!=e&&"x"!=e||this.rebuild(e,t)}return this}}),i.extend(i.Element,{transform:function(e,t){var n;return"object"!==a(e)?(n=new i.Matrix(this).extract(),"string"==typeof e?n[e]:n):(n=new i.Matrix(this),t=!!t||!!e.relative,null!=e.a&&(n=t?n.multiply(new i.Matrix(e)):new i.Matrix(e)),this.attr("transform",n))}}),i.extend(i.Element,{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(i.regex.transforms).slice(0,-1).map((function(e){var t=e.trim().split("(");return[t[0],t[1].split(i.regex.delimiter).map((function(e){return parseFloat(e)}))]})).reduce((function(e,t){return"matrix"==t[0]?e.multiply(g(t[1])):e[t[0]].apply(e,t[1])}),new i.Matrix)},toParent:function(e){if(this==e)return this;var t=this.screenCTM(),i=e.screenCTM().inverse();return this.addTo(e).untransform().transform(i.multiply(t)),this},toDoc:function(){return this.toParent(this.doc())}}),i.Transformation=i.invent({create:function(e,t){if(arguments.length>1&&"boolean"!=typeof t)return this.constructor.call(this,[].slice.call(arguments));if(Array.isArray(e))for(var i=0,n=this.arguments.length;i<n;++i)this[this.arguments[i]]=e[i];else if("object"===a(e))for(i=0,n=this.arguments.length;i<n;++i)this[this.arguments[i]]=e[this.arguments[i]];this.inversed=!1,!0===t&&(this.inversed=!0)}}),i.Translate=i.invent({parent:i.Matrix,inherit:i.Transformation,create:function(e,t){this.constructor.apply(this,[].slice.call(arguments))},extend:{arguments:["transformedX","transformedY"],method:"translate"}}),i.extend(i.Element,{style:function(e,t){if(0==arguments.length)return this.node.style.cssText||"";if(arguments.length<2)if("object"===a(e))for(var n in e)this.style(n,e[n]);else{if(!i.regex.isCss.test(e))return this.node.style[h(e)];for(e=e.split(/\s*;\s*/).filter((function(e){return!!e})).map((function(e){return e.split(/\s*:\s*/)}));t=e.pop();)this.style(t[0],t[1])}else this.node.style[h(e)]=null===t||i.regex.isBlank.test(t)?"":t;return this}}),i.Parent=i.invent({create:function(e){this.constructor.call(this,e)},inherit:i.Element,extend:{children:function(){return i.utils.map(i.utils.filterSVGElements(this.node.childNodes),(function(e){return i.adopt(e)}))},add:function(e,t){return null==t?this.node.appendChild(e.node):e.node!=this.node.childNodes[t]&&this.node.insertBefore(e.node,this.node.childNodes[t]),this},put:function(e,t){return this.add(e,t),e},has:function(e){return this.index(e)>=0},index:function(e){return[].slice.call(this.node.childNodes).indexOf(e.node)},get:function(e){return i.adopt(this.node.childNodes[e])},first:function(){return this.get(0)},last:function(){return this.get(this.node.childNodes.length-1)},each:function(e,t){for(var n=this.children(),r=0,a=n.length;r<a;r++)n[r]instanceof i.Element&&e.apply(n[r],[r,n]),t&&n[r]instanceof i.Container&&n[r].each(e,t);return this},removeElement:function(e){return this.node.removeChild(e.node),this},clear:function(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return delete this._defs,this},defs:function(){return this.doc().defs()}}}),i.extend(i.Parent,{ungroup:function(e,t){return 0===t||this instanceof i.Defs||this.node==i.parser.draw||(e=e||(this instanceof i.Doc?this:this.parent(i.Parent)),t=t||1/0,this.each((function(){return this instanceof i.Defs?this:this instanceof i.Parent?this.ungroup(e,t-1):this.toParent(e)})),this.node.firstChild||this.remove()),this},flatten:function(e,t){return this.ungroup(e,t)}}),i.Container=i.invent({create:function(e){this.constructor.call(this,e)},inherit:i.Parent}),i.ViewBox=i.invent({parent:i.Container,construct:{}}),["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","touchstart","touchmove","touchleave","touchend","touchcancel"].forEach((function(e){i.Element.prototype[e]=function(t){return i.on(this.node,e,t),this}})),i.listeners=[],i.handlerMap=[],i.listenerId=0,i.on=function(e,t,n,r,a){var o=n.bind(r||e.instance||e),s=(i.handlerMap.indexOf(e)+1||i.handlerMap.push(e))-1,l=t.split(".")[0],c=t.split(".")[1]||"*";i.listeners[s]=i.listeners[s]||{},i.listeners[s][l]=i.listeners[s][l]||{},i.listeners[s][l][c]=i.listeners[s][l][c]||{},n._svgjsListenerId||(n._svgjsListenerId=++i.listenerId),i.listeners[s][l][c][n._svgjsListenerId]=o,e.addEventListener(l,o,a||{passive:!0})},i.off=function(e,t,n){var r=i.handlerMap.indexOf(e),a=t&&t.split(".")[0],o=t&&t.split(".")[1],s="";if(-1!=r)if(n){if("function"==typeof n&&(n=n._svgjsListenerId),!n)return;i.listeners[r][a]&&i.listeners[r][a][o||"*"]&&(e.removeEventListener(a,i.listeners[r][a][o||"*"][n],!1),delete i.listeners[r][a][o||"*"][n])}else if(o&&a){if(i.listeners[r][a]&&i.listeners[r][a][o]){for(var l in i.listeners[r][a][o])i.off(e,[a,o].join("."),l);delete i.listeners[r][a][o]}}else if(o)for(var c in i.listeners[r])for(var s in i.listeners[r][c])o===s&&i.off(e,[c,o].join("."));else if(a){if(i.listeners[r][a]){for(var s in i.listeners[r][a])i.off(e,[a,s].join("."));delete i.listeners[r][a]}}else{for(var c in i.listeners[r])i.off(e,c);delete i.listeners[r],delete i.handlerMap[r]}},i.extend(i.Element,{on:function(e,t,n,r){return i.on(this.node,e,t,n,r),this},off:function(e,t){return i.off(this.node,e,t),this},fire:function(t,n){return t instanceof e.Event?this.node.dispatchEvent(t):this.node.dispatchEvent(t=new i.CustomEvent(t,{detail:n,cancelable:!0})),this._event=t,this},event:function(){return this._event}}),i.Defs=i.invent({create:"defs",inherit:i.Container}),i.G=i.invent({create:"g",inherit:i.Container,extend:{x:function(e){return null==e?this.transform("x"):this.transform({x:e-this.x()},!0)}},construct:{group:function(){return this.put(new i.G)}}}),i.Doc=i.invent({create:function(e){e&&("svg"==(e="string"==typeof e?t.getElementById(e):e).nodeName?this.constructor.call(this,e):(this.constructor.call(this,i.create("svg")),e.appendChild(this.node),this.size("100%","100%")),this.namespace().defs())},inherit:i.Container,extend:{namespace:function(){return this.attr({xmlns:i.ns,version:"1.1"}).attr("xmlns:xlink",i.xlink,i.xmlns).attr("xmlns:svgjs",i.svgjs,i.xmlns)},defs:function(){var e;return this._defs||((e=this.node.getElementsByTagName("defs")[0])?this._defs=i.adopt(e):this._defs=new i.Defs,this.node.appendChild(this._defs.node)),this._defs},parent:function(){return this.node.parentNode&&"#document"!=this.node.parentNode.nodeName?this.node.parentNode:null},remove:function(){return this.parent()&&this.parent().removeChild(this.node),this},clear:function(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return delete this._defs,i.parser.draw&&!i.parser.draw.parentNode&&this.node.appendChild(i.parser.draw),this},clone:function(e){this.writeDataToDom();var t=this.node,i=m(t.cloneNode(!0));return e?(e.node||e).appendChild(i.node):t.parentNode.insertBefore(i.node,t.nextSibling),i}}}),i.extend(i.Element,{}),i.Gradient=i.invent({create:function(e){this.constructor.call(this,i.create(e+"Gradient")),this.type=e},inherit:i.Container,extend:{at:function(e,t,n){return this.put(new i.Stop).update(e,t,n)},update:function(e){return this.clear(),"function"==typeof e&&e.call(this,this),this},fill:function(){return"url(#"+this.id()+")"},toString:function(){return this.fill()},attr:function(e,t,n){return"transform"==e&&(e="gradientTransform"),i.Container.prototype.attr.call(this,e,t,n)}},construct:{gradient:function(e,t){return this.defs().gradient(e,t)}}}),i.extend(i.Gradient,i.FX,{from:function(e,t){return"radial"==(this._target||this).type?this.attr({fx:new i.Number(e),fy:new i.Number(t)}):this.attr({x1:new i.Number(e),y1:new i.Number(t)})},to:function(e,t){return"radial"==(this._target||this).type?this.attr({cx:new i.Number(e),cy:new i.Number(t)}):this.attr({x2:new i.Number(e),y2:new i.Number(t)})}}),i.extend(i.Defs,{gradient:function(e,t){return this.put(new i.Gradient(e)).update(t)}}),i.Stop=i.invent({create:"stop",inherit:i.Element,extend:{update:function(e){return("number"==typeof e||e instanceof i.Number)&&(e={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=e.opacity&&this.attr("stop-opacity",e.opacity),null!=e.color&&this.attr("stop-color",e.color),null!=e.offset&&this.attr("offset",new i.Number(e.offset)),this}}}),i.Pattern=i.invent({create:"pattern",inherit:i.Container,extend:{fill:function(){return"url(#"+this.id()+")"},update:function(e){return this.clear(),"function"==typeof e&&e.call(this,this),this},toString:function(){return this.fill()},attr:function(e,t,n){return"transform"==e&&(e="patternTransform"),i.Container.prototype.attr.call(this,e,t,n)}},construct:{pattern:function(e,t,i){return this.defs().pattern(e,t,i)}}}),i.extend(i.Defs,{pattern:function(e,t,n){return this.put(new i.Pattern).update(n).attr({x:0,y:0,width:e,height:t,patternUnits:"userSpaceOnUse"})}}),i.Shape=i.invent({create:function(e){this.constructor.call(this,e)},inherit:i.Element}),i.Symbol=i.invent({create:"symbol",inherit:i.Container,construct:{symbol:function(){return this.put(new i.Symbol)}}}),i.Use=i.invent({create:"use",inherit:i.Shape,extend:{element:function(e,t){return this.attr("href",(t||"")+"#"+e,i.xlink)}},construct:{use:function(e,t){return this.put(new i.Use).element(e,t)}}}),i.Rect=i.invent({create:"rect",inherit:i.Shape,construct:{rect:function(e,t){return this.put(new i.Rect).size(e,t)}}}),i.Circle=i.invent({create:"circle",inherit:i.Shape,construct:{circle:function(e){return this.put(new i.Circle).rx(new i.Number(e).divide(2)).move(0,0)}}}),i.extend(i.Circle,i.FX,{rx:function(e){return this.attr("r",e)},ry:function(e){return this.rx(e)}}),i.Ellipse=i.invent({create:"ellipse",inherit:i.Shape,construct:{ellipse:function(e,t){return this.put(new i.Ellipse).size(e,t).move(0,0)}}}),i.extend(i.Ellipse,i.Rect,i.FX,{rx:function(e){return this.attr("rx",e)},ry:function(e){return this.attr("ry",e)}}),i.extend(i.Circle,i.Ellipse,{x:function(e){return null==e?this.cx()-this.rx():this.cx(e+this.rx())},y:function(e){return null==e?this.cy()-this.ry():this.cy(e+this.ry())},cx:function(e){return null==e?this.attr("cx"):this.attr("cx",e)},cy:function(e){return null==e?this.attr("cy"):this.attr("cy",e)},width:function(e){return null==e?2*this.rx():this.rx(new i.Number(e).divide(2))},height:function(e){return null==e?2*this.ry():this.ry(new i.Number(e).divide(2))},size:function(e,t){var n=p(this,e,t);return this.rx(new i.Number(n.width).divide(2)).ry(new i.Number(n.height).divide(2))}}),i.Line=i.invent({create:"line",inherit:i.Shape,extend:{array:function(){return new i.PointArray([[this.attr("x1"),this.attr("y1")],[this.attr("x2"),this.attr("y2")]])},plot:function(e,t,n,r){return null==e?this.array():(e=void 0!==t?{x1:e,y1:t,x2:n,y2:r}:new i.PointArray(e).toLine(),this.attr(e))},move:function(e,t){return this.attr(this.array().move(e,t).toLine())},size:function(e,t){var i=p(this,e,t);return this.attr(this.array().size(i.width,i.height).toLine())}},construct:{line:function(e,t,n,r){return i.Line.prototype.plot.apply(this.put(new i.Line),null!=e?[e,t,n,r]:[0,0,0,0])}}}),i.Polyline=i.invent({create:"polyline",inherit:i.Shape,construct:{polyline:function(e){return this.put(new i.Polyline).plot(e||new i.PointArray)}}}),i.Polygon=i.invent({create:"polygon",inherit:i.Shape,construct:{polygon:function(e){return this.put(new i.Polygon).plot(e||new i.PointArray)}}}),i.extend(i.Polyline,i.Polygon,{array:function(){return this._array||(this._array=new i.PointArray(this.attr("points")))},plot:function(e){return null==e?this.array():this.clear().attr("points","string"==typeof e?e:this._array=new i.PointArray(e))},clear:function(){return delete this._array,this},move:function(e,t){return this.attr("points",this.array().move(e,t))},size:function(e,t){var i=p(this,e,t);return this.attr("points",this.array().size(i.width,i.height))}}),i.extend(i.Line,i.Polyline,i.Polygon,{morphArray:i.PointArray,x:function(e){return null==e?this.bbox().x:this.move(e,this.bbox().y)},y:function(e){return null==e?this.bbox().y:this.move(this.bbox().x,e)},width:function(e){var t=this.bbox();return null==e?t.width:this.size(e,t.height)},height:function(e){var t=this.bbox();return null==e?t.height:this.size(t.width,e)}}),i.Path=i.invent({create:"path",inherit:i.Shape,extend:{morphArray:i.PathArray,array:function(){return this._array||(this._array=new i.PathArray(this.attr("d")))},plot:function(e){return null==e?this.array():this.clear().attr("d","string"==typeof e?e:this._array=new i.PathArray(e))},clear:function(){return delete this._array,this}},construct:{path:function(e){return this.put(new i.Path).plot(e||new i.PathArray)}}}),i.Image=i.invent({create:"image",inherit:i.Shape,extend:{load:function(t){if(!t)return this;var n=this,r=new e.Image;return i.on(r,"load",(function(){i.off(r);var e=n.parent(i.Pattern);null!==e&&(0==n.width()&&0==n.height()&&n.size(r.width,r.height),e&&0==e.width()&&0==e.height()&&e.size(n.width(),n.height()),"function"==typeof n._loaded&&n._loaded.call(n,{width:r.width,height:r.height,ratio:r.width/r.height,url:t}))})),i.on(r,"error",(function(e){i.off(r),"function"==typeof n._error&&n._error.call(n,e)})),this.attr("href",r.src=this.src=t,i.xlink)},loaded:function(e){return this._loaded=e,this},error:function(e){return this._error=e,this}},construct:{image:function(e,t,n){return this.put(new i.Image).load(e).size(t||0,n||t||0)}}}),i.Text=i.invent({create:function(){this.constructor.call(this,i.create("text")),this.dom.leading=new i.Number(1.3),this._rebuild=!0,this._build=!1,this.attr("font-family",i.defaults.attrs["font-family"])},inherit:i.Shape,extend:{x:function(e){return null==e?this.attr("x"):this.attr("x",e)},text:function(e){if(void 0===e){e="";for(var t=this.node.childNodes,n=0,r=t.length;n<r;++n)0!=n&&3!=t[n].nodeType&&1==i.adopt(t[n]).dom.newLined&&(e+="\n"),e+=t[n].textContent;return e}if(this.clear().build(!0),"function"==typeof e)e.call(this,this);else{n=0;for(var a=(e=e.split("\n")).length;n<a;n++)this.tspan(e[n]).newLine()}return this.build(!1).rebuild()},size:function(e){return this.attr("font-size",e).rebuild()},leading:function(e){return null==e?this.dom.leading:(this.dom.leading=new i.Number(e),this.rebuild())},lines:function(){var e=(this.textPath&&this.textPath()||this).node,t=i.utils.map(i.utils.filterSVGElements(e.childNodes),(function(e){return i.adopt(e)}));return new i.Set(t)},rebuild:function(e){if("boolean"==typeof e&&(this._rebuild=e),this._rebuild){var t=this,n=0,r=this.dom.leading*new i.Number(this.attr("font-size"));this.lines().each((function(){this.dom.newLined&&(t.textPath()||this.attr("x",t.attr("x")),"\n"==this.text()?n+=r:(this.attr("dy",r+n),n=0))})),this.fire("rebuild")}return this},build:function(e){return this._build=!!e,this},setData:function(e){return this.dom=e,this.dom.leading=new i.Number(e.leading||1.3),this}},construct:{text:function(e){return this.put(new i.Text).text(e)},plain:function(e){return this.put(new i.Text).plain(e)}}}),i.Tspan=i.invent({create:"tspan",inherit:i.Shape,extend:{text:function(e){return null==e?this.node.textContent+(this.dom.newLined?"\n":""):("function"==typeof e?e.call(this,this):this.plain(e),this)},dx:function(e){return this.attr("dx",e)},dy:function(e){return this.attr("dy",e)},newLine:function(){var e=this.parent(i.Text);return this.dom.newLined=!0,this.dy(e.dom.leading*e.attr("font-size")).attr("x",e.x())}}}),i.extend(i.Text,i.Tspan,{plain:function(e){return!1===this._build&&this.clear(),this.node.appendChild(t.createTextNode(e)),this},tspan:function(e){var t=(this.textPath&&this.textPath()||this).node,n=new i.Tspan;return!1===this._build&&this.clear(),t.appendChild(n.node),n.text(e)},clear:function(){for(var e=(this.textPath&&this.textPath()||this).node;e.hasChildNodes();)e.removeChild(e.lastChild);return this},length:function(){return this.node.getComputedTextLength()}}),i.TextPath=i.invent({create:"textPath",inherit:i.Parent,parent:i.Text,construct:{morphArray:i.PathArray,array:function(){var e=this.track();return e?e.array():null},plot:function(e){var t=this.track(),i=null;return t&&(i=t.plot(e)),null==e?i:this},track:function(){var e=this.textPath();if(e)return e.reference("href")},textPath:function(){if(this.node.firstChild&&"textPath"==this.node.firstChild.nodeName)return i.adopt(this.node.firstChild)}}}),i.Nested=i.invent({create:function(){this.constructor.call(this,i.create("svg")),this.style("overflow","visible")},inherit:i.Container,construct:{nested:function(){return this.put(new i.Nested)}}});var l={stroke:["color","width","opacity","linecap","linejoin","miterlimit","dasharray","dashoffset"],fill:["color","opacity","rule"],prefix:function(e,t){return"color"==t?e:e+"-"+t}};function c(e,t,n,r){return n+r.replace(i.regex.dots," .")}function h(e){return e.toLowerCase().replace(/-(.)/g,(function(e,t){return t.toUpperCase()}))}function d(e){return e.charAt(0).toUpperCase()+e.slice(1)}function u(e){var t=e.toString(16);return 1==t.length?"0"+t:t}function p(e,t,i){if(null==t||null==i){var n=e.bbox();null==t?t=n.width/n.height*i:null==i&&(i=n.height/n.width*t)}return{width:t,height:i}}function f(e,t,i){return{x:t*e.a+i*e.c+0,y:t*e.b+i*e.d+0}}function g(e){return{a:e[0],b:e[1],c:e[2],d:e[3],e:e[4],f:e[5]}}function m(t){for(var n=t.childNodes.length-1;n>=0;n--)t.childNodes[n]instanceof e.SVGElement&&m(t.childNodes[n]);return i.adopt(t).id(i.eid(t.nodeName))}function v(e){return null==e.x&&(e.x=0,e.y=0,e.width=0,e.height=0),e.w=e.width,e.h=e.height,e.x2=e.x+e.width,e.y2=e.y+e.height,e.cx=e.x+e.width/2,e.cy=e.y+e.height/2,e}function y(e){return Math.abs(e)>1e-37?e:0}["fill","stroke"].forEach((function(e){var t={};t[e]=function(t){if(void 0===t)return this;if("string"==typeof t||i.Color.isRgb(t)||t&&"function"==typeof t.fill)this.attr(e,t);else for(var n=l[e].length-1;n>=0;n--)null!=t[l[e][n]]&&this.attr(l.prefix(e,l[e][n]),t[l[e][n]]);return this},i.extend(i.Element,i.FX,t)})),i.extend(i.Element,i.FX,{translate:function(e,t){return this.transform({x:e,y:t})},matrix:function(e){return this.attr("transform",new i.Matrix(6==arguments.length?[].slice.call(arguments):e))},opacity:function(e){return this.attr("opacity",e)},dx:function(e){return this.x(new i.Number(e).plus(this instanceof i.FX?0:this.x()),!0)},dy:function(e){return this.y(new i.Number(e).plus(this instanceof i.FX?0:this.y()),!0)}}),i.extend(i.Path,{length:function(){return this.node.getTotalLength()},pointAt:function(e){return this.node.getPointAtLength(e)}}),i.Set=i.invent({create:function(e){Array.isArray(e)?this.members=e:this.clear()},extend:{add:function(){for(var e=[].slice.call(arguments),t=0,i=e.length;t<i;t++)this.members.push(e[t]);return this},remove:function(e){var t=this.index(e);return t>-1&&this.members.splice(t,1),this},each:function(e){for(var t=0,i=this.members.length;t<i;t++)e.apply(this.members[t],[t,this.members]);return this},clear:function(){return this.members=[],this},length:function(){return this.members.length},has:function(e){return this.index(e)>=0},index:function(e){return this.members.indexOf(e)},get:function(e){return this.members[e]},first:function(){return this.get(0)},last:function(){return this.get(this.members.length-1)},valueOf:function(){return this.members}},construct:{set:function(e){return new i.Set(e)}}}),i.FX.Set=i.invent({create:function(e){this.set=e}}),i.Set.inherit=function(){var e=[];for(var t in i.Shape.prototype)"function"==typeof i.Shape.prototype[t]&&"function"!=typeof i.Set.prototype[t]&&e.push(t);for(var t in e.forEach((function(e){i.Set.prototype[e]=function(){for(var t=0,n=this.members.length;t<n;t++)this.members[t]&&"function"==typeof this.members[t][e]&&this.members[t][e].apply(this.members[t],arguments);return"animate"==e?this.fx||(this.fx=new i.FX.Set(this)):this}})),e=[],i.FX.prototype)"function"==typeof i.FX.prototype[t]&&"function"!=typeof i.FX.Set.prototype[t]&&e.push(t);e.forEach((function(e){i.FX.Set.prototype[e]=function(){for(var t=0,i=this.set.members.length;t<i;t++)this.set.members[t].fx[e].apply(this.set.members[t].fx,arguments);return this}}))},i.extend(i.Element,{}),i.extend(i.Element,{remember:function(e,t){if("object"===a(arguments[0]))for(var i in e)this.remember(i,e[i]);else{if(1==arguments.length)return this.memory()[e];this.memory()[e]=t}return this},forget:function(){if(0==arguments.length)this._memory={};else for(var e=arguments.length-1;e>=0;e--)delete this.memory()[arguments[e]];return this},memory:function(){return this._memory||(this._memory={})}}),i.get=function(e){var n=t.getElementById(function(e){var t=(e||"").toString().match(i.regex.reference);if(t)return t[1]}(e)||e);return i.adopt(n)},i.select=function(e,n){return new i.Set(i.utils.map((n||t).querySelectorAll(e),(function(e){return i.adopt(e)})))},i.extend(i.Parent,{select:function(e){return i.select(e,this.node)}});var b="abcdef".split("");if("function"!=typeof e.CustomEvent){var x=function(e,i){i=i||{bubbles:!1,cancelable:!1,detail:void 0};var n=t.createEvent("CustomEvent");return n.initCustomEvent(e,i.bubbles,i.cancelable,i.detail),n};x.prototype=e.Event.prototype,i.CustomEvent=x}else i.CustomEvent=e.CustomEvent;return i},void 0!==(n=function(){return Ie(Oe,Oe.document)}.call(t,i,t,e))&&(e.exports=n),
29
+ /*! svg.filter.js - v2.0.2 - 2016-02-24
30
+ * https://github.com/wout/svg.filter.js
31
+ * Copyright (c) 2016 Wout Fierens; Licensed MIT */
32
+ function(){SVG.Filter=SVG.invent({create:"filter",inherit:SVG.Parent,extend:{source:"SourceGraphic",sourceAlpha:"SourceAlpha",background:"BackgroundImage",backgroundAlpha:"BackgroundAlpha",fill:"FillPaint",stroke:"StrokePaint",autoSetIn:!0,put:function(e,t){return this.add(e,t),!e.attr("in")&&this.autoSetIn&&e.attr("in",this.source),e.attr("result")||e.attr("result",e),e},blend:function(e,t,i){return this.put(new SVG.BlendEffect(e,t,i))},colorMatrix:function(e,t){return this.put(new SVG.ColorMatrixEffect(e,t))},convolveMatrix:function(e){return this.put(new SVG.ConvolveMatrixEffect(e))},componentTransfer:function(e){return this.put(new SVG.ComponentTransferEffect(e))},composite:function(e,t,i){return this.put(new SVG.CompositeEffect(e,t,i))},flood:function(e,t){return this.put(new SVG.FloodEffect(e,t))},offset:function(e,t){return this.put(new SVG.OffsetEffect(e,t))},image:function(e){return this.put(new SVG.ImageEffect(e))},merge:function(){var e=[void 0];for(var t in arguments)e.push(arguments[t]);return this.put(new(SVG.MergeEffect.bind.apply(SVG.MergeEffect,e)))},gaussianBlur:function(e,t){return this.put(new SVG.GaussianBlurEffect(e,t))},morphology:function(e,t){return this.put(new SVG.MorphologyEffect(e,t))},diffuseLighting:function(e,t,i){return this.put(new SVG.DiffuseLightingEffect(e,t,i))},displacementMap:function(e,t,i,n,r){return this.put(new SVG.DisplacementMapEffect(e,t,i,n,r))},specularLighting:function(e,t,i,n){return this.put(new SVG.SpecularLightingEffect(e,t,i,n))},tile:function(){return this.put(new SVG.TileEffect)},turbulence:function(e,t,i,n,r){return this.put(new SVG.TurbulenceEffect(e,t,i,n,r))},toString:function(){return"url(#"+this.attr("id")+")"}}}),SVG.extend(SVG.Defs,{filter:function(e){var t=this.put(new SVG.Filter);return"function"==typeof e&&e.call(t,t),t}}),SVG.extend(SVG.Container,{filter:function(e){return this.defs().filter(e)}}),SVG.extend(SVG.Element,SVG.G,SVG.Nested,{filter:function(e){return this.filterer=e instanceof SVG.Element?e:this.doc().filter(e),this.doc()&&this.filterer.doc()!==this.doc()&&this.doc().defs().add(this.filterer),this.attr("filter",this.filterer),this.filterer},unfilter:function(e){return this.filterer&&!0===e&&this.filterer.remove(),delete this.filterer,this.attr("filter",null)}}),SVG.Effect=SVG.invent({create:function(){this.constructor.call(this)},inherit:SVG.Element,extend:{in:function(e){return null==e?this.parent()&&this.parent().select('[result="'+this.attr("in")+'"]').get(0)||this.attr("in"):this.attr("in",e)},result:function(e){return null==e?this.attr("result"):this.attr("result",e)},toString:function(){return this.result()}}}),SVG.ParentEffect=SVG.invent({create:function(){this.constructor.call(this)},inherit:SVG.Parent,extend:{in:function(e){return null==e?this.parent()&&this.parent().select('[result="'+this.attr("in")+'"]').get(0)||this.attr("in"):this.attr("in",e)},result:function(e){return null==e?this.attr("result"):this.attr("result",e)},toString:function(){return this.result()}}});var e={blend:function(e,t){return this.parent()&&this.parent().blend(this,e,t)},colorMatrix:function(e,t){return this.parent()&&this.parent().colorMatrix(e,t).in(this)},convolveMatrix:function(e){return this.parent()&&this.parent().convolveMatrix(e).in(this)},componentTransfer:function(e){return this.parent()&&this.parent().componentTransfer(e).in(this)},composite:function(e,t){return this.parent()&&this.parent().composite(this,e,t)},flood:function(e,t){return this.parent()&&this.parent().flood(e,t)},offset:function(e,t){return this.parent()&&this.parent().offset(e,t).in(this)},image:function(e){return this.parent()&&this.parent().image(e)},merge:function(){return this.parent()&&this.parent().merge.apply(this.parent(),[this].concat(arguments))},gaussianBlur:function(e,t){return this.parent()&&this.parent().gaussianBlur(e,t).in(this)},morphology:function(e,t){return this.parent()&&this.parent().morphology(e,t).in(this)},diffuseLighting:function(e,t,i){return this.parent()&&this.parent().diffuseLighting(e,t,i).in(this)},displacementMap:function(e,t,i,n){return this.parent()&&this.parent().displacementMap(this,e,t,i,n)},specularLighting:function(e,t,i,n){return this.parent()&&this.parent().specularLighting(e,t,i,n).in(this)},tile:function(){return this.parent()&&this.parent().tile().in(this)},turbulence:function(e,t,i,n,r){return this.parent()&&this.parent().turbulence(e,t,i,n,r).in(this)}};SVG.extend(SVG.Effect,e),SVG.extend(SVG.ParentEffect,e),SVG.ChildEffect=SVG.invent({create:function(){this.constructor.call(this)},inherit:SVG.Element,extend:{in:function(e){this.attr("in",e)}}});var t={blend:function(e,t,i){this.attr({in:e,in2:t,mode:i||"normal"})},colorMatrix:function(e,t){"matrix"==e&&(t=r(t)),this.attr({type:e,values:void 0===t?null:t})},convolveMatrix:function(e){e=r(e),this.attr({order:Math.sqrt(e.split(" ").length),kernelMatrix:e})},composite:function(e,t,i){this.attr({in:e,in2:t,operator:i})},flood:function(e,t){this.attr("flood-color",e),null!=t&&this.attr("flood-opacity",t)},offset:function(e,t){this.attr({dx:e,dy:t})},image:function(e){this.attr("href",e,SVG.xlink)},displacementMap:function(e,t,i,n,r){this.attr({in:e,in2:t,scale:i,xChannelSelector:n,yChannelSelector:r})},gaussianBlur:function(e,t){null!=e||null!=t?this.attr("stdDeviation",a(Array.prototype.slice.call(arguments))):this.attr("stdDeviation","0 0")},morphology:function(e,t){this.attr({operator:e,radius:t})},tile:function(){},turbulence:function(e,t,i,n,r){this.attr({numOctaves:t,seed:i,stitchTiles:n,baseFrequency:e,type:r})}},i={merge:function(){var e;if(arguments[0]instanceof SVG.Set){var t=this;arguments[0].each((function(e){this instanceof SVG.MergeNode?t.put(this):(this instanceof SVG.Effect||this instanceof SVG.ParentEffect)&&t.put(new SVG.MergeNode(this))}))}else{e=Array.isArray(arguments[0])?arguments[0]:arguments;for(var i=0;i<e.length;i++)e[i]instanceof SVG.MergeNode?this.put(e[i]):this.put(new SVG.MergeNode(e[i]))}},componentTransfer:function(e){if(this.rgb=new SVG.Set,["r","g","b","a"].forEach(function(e){this[e]=new(SVG["Func"+e.toUpperCase()])("identity"),this.rgb.add(this[e]),this.node.appendChild(this[e].node)}.bind(this)),e)for(var t in e.rgb&&(["r","g","b"].forEach(function(t){this[t].attr(e.rgb)}.bind(this)),delete e.rgb),e)this[t].attr(e[t])},diffuseLighting:function(e,t,i){this.attr({surfaceScale:e,diffuseConstant:t,kernelUnitLength:i})},specularLighting:function(e,t,i,n){this.attr({surfaceScale:e,diffuseConstant:t,specularExponent:i,kernelUnitLength:n})}},n={distantLight:function(e,t){this.attr({azimuth:e,elevation:t})},pointLight:function(e,t,i){this.attr({x:e,y:t,z:i})},spotLight:function(e,t,i,n,r,a){this.attr({x:e,y:t,z:i,pointsAtX:n,pointsAtY:r,pointsAtZ:a})},mergeNode:function(e){this.attr("in",e)}};function r(e){return Array.isArray(e)&&(e=new SVG.Array(e)),e.toString().replace(/^\s+/,"").replace(/\s+$/,"").replace(/\s+/g," ")}function a(e){if(!Array.isArray(e))return e;for(var t=0,i=e.length,n=[];t<i;t++)n.push(e[t]);return n.join(" ")}function o(){var e=function(){};for(var t in"function"==typeof arguments[arguments.length-1]&&(e=arguments[arguments.length-1],Array.prototype.splice.call(arguments,arguments.length-1,1)),arguments)for(var i in arguments[t])e(arguments[t][i],i,arguments[t])}["r","g","b","a"].forEach((function(e){n["Func"+e.toUpperCase()]=function(e){switch(this.attr("type",e),e){case"table":this.attr("tableValues",arguments[1]);break;case"linear":this.attr("slope",arguments[1]),this.attr("intercept",arguments[2]);break;case"gamma":this.attr("amplitude",arguments[1]),this.attr("exponent",arguments[2]),this.attr("offset",arguments[2])}}})),o(t,(function(e,t){var i=t.charAt(0).toUpperCase()+t.slice(1);SVG[i+"Effect"]=SVG.invent({create:function(){this.constructor.call(this,SVG.create("fe"+i)),e.apply(this,arguments),this.result(this.attr("id")+"Out")},inherit:SVG.Effect,extend:{}})})),o(i,(function(e,t){var i=t.charAt(0).toUpperCase()+t.slice(1);SVG[i+"Effect"]=SVG.invent({create:function(){this.constructor.call(this,SVG.create("fe"+i)),e.apply(this,arguments),this.result(this.attr("id")+"Out")},inherit:SVG.ParentEffect,extend:{}})})),o(n,(function(e,t){var i=t.charAt(0).toUpperCase()+t.slice(1);SVG[i]=SVG.invent({create:function(){this.constructor.call(this,SVG.create("fe"+i)),e.apply(this,arguments)},inherit:SVG.ChildEffect,extend:{}})})),SVG.extend(SVG.MergeEffect,{in:function(e){return e instanceof SVG.MergeNode?this.add(e,0):this.add(new SVG.MergeNode(e),0),this}}),SVG.extend(SVG.CompositeEffect,SVG.BlendEffect,SVG.DisplacementMapEffect,{in2:function(e){return null==e?this.parent()&&this.parent().select('[result="'+this.attr("in2")+'"]').get(0)||this.attr("in2"):this.attr("in2",e)}}),SVG.filter={sepiatone:[.343,.669,.119,0,0,.249,.626,.13,0,0,.172,.334,.111,0,0,0,0,0,1,0]}}.call(void 0),function(){function e(e,r,a,o,s,l,c){for(var h=e.slice(r,a||c),d=o.slice(s,l||c),u=0,p={pos:[0,0],start:[0,0]},f={pos:[0,0],start:[0,0]};h[u]=t.call(p,h[u]),d[u]=t.call(f,d[u]),h[u][0]!=d[u][0]||"M"==h[u][0]||"A"==h[u][0]&&(h[u][4]!=d[u][4]||h[u][5]!=d[u][5])?(Array.prototype.splice.apply(h,[u,1].concat(n.call(p,h[u]))),Array.prototype.splice.apply(d,[u,1].concat(n.call(f,d[u])))):(h[u]=i.call(p,h[u]),d[u]=i.call(f,d[u])),++u!=h.length||u!=d.length;)u==h.length&&h.push(["C",p.pos[0],p.pos[1],p.pos[0],p.pos[1],p.pos[0],p.pos[1]]),u==d.length&&d.push(["C",f.pos[0],f.pos[1],f.pos[0],f.pos[1],f.pos[0],f.pos[1]]);return{start:h,dest:d}}function t(e){switch(e[0]){case"z":case"Z":e[0]="L",e[1]=this.start[0],e[2]=this.start[1];break;case"H":e[0]="L",e[2]=this.pos[1];break;case"V":e[0]="L",e[2]=e[1],e[1]=this.pos[0];break;case"T":e[0]="Q",e[3]=e[1],e[4]=e[2],e[1]=this.reflection[1],e[2]=this.reflection[0];break;case"S":e[0]="C",e[6]=e[4],e[5]=e[3],e[4]=e[2],e[3]=e[1],e[2]=this.reflection[1],e[1]=this.reflection[0]}return e}function i(e){var t=e.length;return this.pos=[e[t-2],e[t-1]],-1!="SCQT".indexOf(e[0])&&(this.reflection=[2*this.pos[0]-e[t-4],2*this.pos[1]-e[t-3]]),e}function n(e){var t=[e];switch(e[0]){case"M":return this.pos=this.start=[e[1],e[2]],t;case"L":e[5]=e[3]=e[1],e[6]=e[4]=e[2],e[1]=this.pos[0],e[2]=this.pos[1];break;case"Q":e[6]=e[4],e[5]=e[3],e[4]=1*e[4]/3+2*e[2]/3,e[3]=1*e[3]/3+2*e[1]/3,e[2]=1*this.pos[1]/3+2*e[2]/3,e[1]=1*this.pos[0]/3+2*e[1]/3;break;case"A":e=(t=function(e,t){var i,n,r,a,o,s,l,c,h,d,u,p,f,g,m,v,y,b,x,w,k,_,S,A,C,T,P=Math.abs(t[1]),L=Math.abs(t[2]),E=t[3]%360,M=t[4],O=t[5],I=t[6],D=t[7],z=new SVG.Point(e),N=new SVG.Point(I,D),R=[];if(0===P||0===L||z.x===N.x&&z.y===N.y)return[["C",z.x,z.y,N.x,N.y,N.x,N.y]];for((n=(i=new SVG.Point((z.x-N.x)/2,(z.y-N.y)/2).transform((new SVG.Matrix).rotate(E))).x*i.x/(P*P)+i.y*i.y/(L*L))>1&&(P*=n=Math.sqrt(n),L*=n),r=(new SVG.Matrix).rotate(E).scale(1/P,1/L).rotate(-E),z=z.transform(r),s=(a=[(N=N.transform(r)).x-z.x,N.y-z.y])[0]*a[0]+a[1]*a[1],o=Math.sqrt(s),a[0]/=o,a[1]/=o,l=s<4?Math.sqrt(1-s/4):0,M===O&&(l*=-1),c=new SVG.Point((N.x+z.x)/2+l*-a[1],(N.y+z.y)/2+l*a[0]),h=new SVG.Point(z.x-c.x,z.y-c.y),d=new SVG.Point(N.x-c.x,N.y-c.y),u=Math.acos(h.x/Math.sqrt(h.x*h.x+h.y*h.y)),h.y<0&&(u*=-1),p=Math.acos(d.x/Math.sqrt(d.x*d.x+d.y*d.y)),d.y<0&&(p*=-1),O&&u>p&&(p+=2*Math.PI),!O&&u<p&&(p-=2*Math.PI),v=[],y=u,f=(p-u)/(g=Math.ceil(2*Math.abs(u-p)/Math.PI)),m=4*Math.tan(f/4)/3,k=0;k<=g;k++)x=Math.cos(y),b=Math.sin(y),w=new SVG.Point(c.x+x,c.y+b),v[k]=[new SVG.Point(w.x+m*b,w.y-m*x),w,new SVG.Point(w.x-m*b,w.y+m*x)],y+=f;for(v[0][0]=v[0][1].clone(),v[v.length-1][2]=v[v.length-1][1].clone(),r=(new SVG.Matrix).rotate(E).scale(P,L).rotate(-E),k=0,_=v.length;k<_;k++)v[k][0]=v[k][0].transform(r),v[k][1]=v[k][1].transform(r),v[k][2]=v[k][2].transform(r);for(k=1,_=v.length;k<_;k++)S=(w=v[k-1][2]).x,A=w.y,C=(w=v[k][0]).x,T=w.y,I=(w=v[k][1]).x,D=w.y,R.push(["C",S,A,C,T,I,D]);return R}(this.pos,e))[0]}return e[0]="C",this.pos=[e[5],e[6]],this.reflection=[2*e[5]-e[3],2*e[6]-e[4]],t}function r(e,t){if(!1===t)return!1;for(var i=t,n=e.length;i<n;++i)if("M"==e[i][0])return i;return!1}SVG.extend(SVG.PathArray,{morph:function(t){for(var i=this.value,n=this.parse(t),a=0,o=0,s=!1,l=!1;!1!==a||!1!==o;){var c;s=r(i,!1!==a&&a+1),l=r(n,!1!==o&&o+1),!1===a&&(a=0==(c=new SVG.PathArray(h.start).bbox()).height||0==c.width?i.push(i[0])-1:i.push(["M",c.x+c.width/2,c.y+c.height/2])-1),!1===o&&(o=0==(c=new SVG.PathArray(h.dest).bbox()).height||0==c.width?n.push(n[0])-1:n.push(["M",c.x+c.width/2,c.y+c.height/2])-1);var h=e(i,a,s,n,o,l);i=i.slice(0,a).concat(h.start,!1===s?[]:i.slice(s)),n=n.slice(0,o).concat(h.dest,!1===l?[]:n.slice(l)),a=!1!==s&&a+h.start.length,o=!1!==l&&o+h.dest.length}return this.value=i,this.destination=new SVG.PathArray,this.destination.value=n,this}})}(),
33
+ /*! svg.draggable.js - v2.2.2 - 2019-01-08
34
+ * https://github.com/svgdotjs/svg.draggable.js
35
+ * Copyright (c) 2019 Wout Fierens; Licensed MIT */
36
+ function(){function e(e){e.remember("_draggable",this),this.el=e}e.prototype.init=function(e,t){var i=this;this.constraint=e,this.value=t,this.el.on("mousedown.drag",(function(e){i.start(e)})),this.el.on("touchstart.drag",(function(e){i.start(e)}))},e.prototype.transformPoint=function(e,t){var i=(e=e||window.event).changedTouches&&e.changedTouches[0]||e;return this.p.x=i.clientX-(t||0),this.p.y=i.clientY,this.p.matrixTransform(this.m)},e.prototype.getBBox=function(){var e=this.el.bbox();return this.el instanceof SVG.Nested&&(e=this.el.rbox()),(this.el instanceof SVG.G||this.el instanceof SVG.Use||this.el instanceof SVG.Nested)&&(e.x=this.el.x(),e.y=this.el.y()),e},e.prototype.start=function(e){if("click"!=e.type&&"mousedown"!=e.type&&"mousemove"!=e.type||1==(e.which||e.buttons)){var t=this;if(this.el.fire("beforedrag",{event:e,handler:this}),!this.el.event().defaultPrevented){e.preventDefault(),e.stopPropagation(),this.parent=this.parent||this.el.parent(SVG.Nested)||this.el.parent(SVG.Doc),this.p=this.parent.node.createSVGPoint(),this.m=this.el.node.getScreenCTM().inverse();var i,n=this.getBBox();if(this.el instanceof SVG.Text)switch(i=this.el.node.getComputedTextLength(),this.el.attr("text-anchor")){case"middle":i/=2;break;case"start":i=0}this.startPoints={point:this.transformPoint(e,i),box:n,transform:this.el.transform()},SVG.on(window,"mousemove.drag",(function(e){t.drag(e)})),SVG.on(window,"touchmove.drag",(function(e){t.drag(e)})),SVG.on(window,"mouseup.drag",(function(e){t.end(e)})),SVG.on(window,"touchend.drag",(function(e){t.end(e)})),this.el.fire("dragstart",{event:e,p:this.startPoints.point,m:this.m,handler:this})}}},e.prototype.drag=function(e){var t=this.getBBox(),i=this.transformPoint(e),n=this.startPoints.box.x+i.x-this.startPoints.point.x,a=this.startPoints.box.y+i.y-this.startPoints.point.y,o=this.constraint,s=i.x-this.startPoints.point.x,l=i.y-this.startPoints.point.y;if(this.el.fire("dragmove",{event:e,p:i,m:this.m,handler:this}),this.el.event().defaultPrevented)return i;if("function"==typeof o){var c=o.call(this.el,n,a,this.m);"boolean"==typeof c&&(c={x:c,y:c}),!0===c.x?this.el.x(n):!1!==c.x&&this.el.x(c.x),!0===c.y?this.el.y(a):!1!==c.y&&this.el.y(c.y)}else"object"==r(o)&&(null!=o.minX&&n<o.minX?s=(n=o.minX)-this.startPoints.box.x:null!=o.maxX&&n>o.maxX-t.width&&(s=(n=o.maxX-t.width)-this.startPoints.box.x),null!=o.minY&&a<o.minY?l=(a=o.minY)-this.startPoints.box.y:null!=o.maxY&&a>o.maxY-t.height&&(l=(a=o.maxY-t.height)-this.startPoints.box.y),null!=o.snapToGrid&&(n-=n%o.snapToGrid,a-=a%o.snapToGrid,s-=s%o.snapToGrid,l-=l%o.snapToGrid),this.el instanceof SVG.G?this.el.matrix(this.startPoints.transform).transform({x:s,y:l},!0):this.el.move(n,a));return i},e.prototype.end=function(e){var t=this.drag(e);this.el.fire("dragend",{event:e,p:t,m:this.m,handler:this}),SVG.off(window,"mousemove.drag"),SVG.off(window,"touchmove.drag"),SVG.off(window,"mouseup.drag"),SVG.off(window,"touchend.drag")},SVG.extend(SVG.Element,{draggable:function(t,i){"function"!=typeof t&&"object"!=r(t)||(i=t,t=!0);var n=this.remember("_draggable")||new e(this);return(t=void 0===t||t)?n.init(i||{},t):(this.off("mousedown.drag"),this.off("touchstart.drag")),this}})}.call(void 0),function(){function e(e){this.el=e,e.remember("_selectHandler",this),this.pointSelection={isSelected:!1},this.rectSelection={isSelected:!1},this.pointsList={lt:[0,0],rt:["width",0],rb:["width","height"],lb:[0,"height"],t:["width",0],r:["width","height"],b:["width","height"],l:[0,"height"]},this.pointCoord=function(e,t,i){var n="string"!=typeof e?e:t[e];return i?n/2:n},this.pointCoords=function(e,t){var i=this.pointsList[e];return{x:this.pointCoord(i[0],t,"t"===e||"b"===e),y:this.pointCoord(i[1],t,"r"===e||"l"===e)}}}e.prototype.init=function(e,t){var i=this.el.bbox();this.options={};var n=this.el.selectize.defaults.points;for(var r in this.el.selectize.defaults)this.options[r]=this.el.selectize.defaults[r],void 0!==t[r]&&(this.options[r]=t[r]);var a=["points","pointsExclude"];for(var r in a){var o=this.options[a[r]];"string"==typeof o?o=o.length>0?o.split(/\s*,\s*/i):[]:"boolean"==typeof o&&"points"===a[r]&&(o=o?n:[]),this.options[a[r]]=o}this.options.points=[n,this.options.points].reduce((function(e,t){return e.filter((function(e){return t.indexOf(e)>-1}))})),this.options.points=[this.options.points,this.options.pointsExclude].reduce((function(e,t){return e.filter((function(e){return t.indexOf(e)<0}))})),this.parent=this.el.parent(),this.nested=this.nested||this.parent.group(),this.nested.matrix(new SVG.Matrix(this.el).translate(i.x,i.y)),this.options.deepSelect&&-1!==["line","polyline","polygon"].indexOf(this.el.type)?this.selectPoints(e):this.selectRect(e),this.observe(),this.cleanup()},e.prototype.selectPoints=function(e){return this.pointSelection.isSelected=e,this.pointSelection.set||(this.pointSelection.set=this.parent.set(),this.drawPoints()),this},e.prototype.getPointArray=function(){var e=this.el.bbox();return this.el.array().valueOf().map((function(t){return[t[0]-e.x,t[1]-e.y]}))},e.prototype.drawPoints=function(){for(var e=this,t=this.getPointArray(),i=0,n=t.length;i<n;++i){var r=function(t){return function(i){(i=i||window.event).preventDefault?i.preventDefault():i.returnValue=!1,i.stopPropagation();var n=i.pageX||i.touches[0].pageX,r=i.pageY||i.touches[0].pageY;e.el.fire("point",{x:n,y:r,i:t,event:i})}}(i),a=this.drawPoint(t[i][0],t[i][1]).addClass(this.options.classPoints).addClass(this.options.classPoints+"_point").on("touchstart",r).on("mousedown",r);this.pointSelection.set.add(a)}},e.prototype.drawPoint=function(e,t){var i=this.options.pointType;switch(i){case"circle":return this.drawCircle(e,t);case"rect":return this.drawRect(e,t);default:if("function"==typeof i)return i.call(this,e,t);throw new Error("Unknown "+i+" point type!")}},e.prototype.drawCircle=function(e,t){return this.nested.circle(this.options.pointSize).center(e,t)},e.prototype.drawRect=function(e,t){return this.nested.rect(this.options.pointSize,this.options.pointSize).center(e,t)},e.prototype.updatePointSelection=function(){var e=this.getPointArray();this.pointSelection.set.each((function(t){this.cx()===e[t][0]&&this.cy()===e[t][1]||this.center(e[t][0],e[t][1])}))},e.prototype.updateRectSelection=function(){var e=this,t=this.el.bbox();if(this.rectSelection.set.get(0).attr({width:t.width,height:t.height}),this.options.points.length&&this.options.points.map((function(i,n){var r=e.pointCoords(i,t);e.rectSelection.set.get(n+1).center(r.x,r.y)})),this.options.rotationPoint){var i=this.rectSelection.set.length();this.rectSelection.set.get(i-1).center(t.width/2,20)}},e.prototype.selectRect=function(e){var t=this,i=this.el.bbox();function n(e){return function(i){(i=i||window.event).preventDefault?i.preventDefault():i.returnValue=!1,i.stopPropagation();var n=i.pageX||i.touches[0].pageX,r=i.pageY||i.touches[0].pageY;t.el.fire(e,{x:n,y:r,event:i})}}if(this.rectSelection.isSelected=e,this.rectSelection.set=this.rectSelection.set||this.parent.set(),this.rectSelection.set.get(0)||this.rectSelection.set.add(this.nested.rect(i.width,i.height).addClass(this.options.classRect)),this.options.points.length&&this.rectSelection.set.length()<2&&(this.options.points.map((function(e,r){var a=t.pointCoords(e,i),o=t.drawPoint(a.x,a.y).attr("class",t.options.classPoints+"_"+e).on("mousedown",n(e)).on("touchstart",n(e));t.rectSelection.set.add(o)})),this.rectSelection.set.each((function(){this.addClass(t.options.classPoints)}))),this.options.rotationPoint&&(this.options.points&&!this.rectSelection.set.get(9)||!this.options.points&&!this.rectSelection.set.get(1))){var r=function(e){(e=e||window.event).preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation();var i=e.pageX||e.touches[0].pageX,n=e.pageY||e.touches[0].pageY;t.el.fire("rot",{x:i,y:n,event:e})},a=this.drawPoint(i.width/2,20).attr("class",this.options.classPoints+"_rot").on("touchstart",r).on("mousedown",r);this.rectSelection.set.add(a)}},e.prototype.handler=function(){var e=this.el.bbox();this.nested.matrix(new SVG.Matrix(this.el).translate(e.x,e.y)),this.rectSelection.isSelected&&this.updateRectSelection(),this.pointSelection.isSelected&&this.updatePointSelection()},e.prototype.observe=function(){var e=this;if(MutationObserver)if(this.rectSelection.isSelected||this.pointSelection.isSelected)this.observerInst=this.observerInst||new MutationObserver((function(){e.handler()})),this.observerInst.observe(this.el.node,{attributes:!0});else try{this.observerInst.disconnect(),delete this.observerInst}catch(e){}else this.el.off("DOMAttrModified.select"),(this.rectSelection.isSelected||this.pointSelection.isSelected)&&this.el.on("DOMAttrModified.select",(function(){e.handler()}))},e.prototype.cleanup=function(){!this.rectSelection.isSelected&&this.rectSelection.set&&(this.rectSelection.set.each((function(){this.remove()})),this.rectSelection.set.clear(),delete this.rectSelection.set),!this.pointSelection.isSelected&&this.pointSelection.set&&(this.pointSelection.set.each((function(){this.remove()})),this.pointSelection.set.clear(),delete this.pointSelection.set),this.pointSelection.isSelected||this.rectSelection.isSelected||(this.nested.remove(),delete this.nested)},SVG.extend(SVG.Element,{selectize:function(t,i){return"object"==r(t)&&(i=t,t=!0),(this.remember("_selectHandler")||new e(this)).init(void 0===t||t,i||{}),this}}),SVG.Element.prototype.selectize.defaults={points:["lt","rt","rb","lb","t","r","b","l"],pointsExclude:[],classRect:"svg_select_boundingRect",classPoints:"svg_select_points",pointSize:7,rotationPoint:!0,deepSelect:!1,pointType:"circle"}}(),function(){(function(){function e(e){e.remember("_resizeHandler",this),this.el=e,this.parameters={},this.lastUpdateCall=null,this.p=e.doc().node.createSVGPoint()}e.prototype.transformPoint=function(e,t,i){return this.p.x=e-(this.offset.x-window.pageXOffset),this.p.y=t-(this.offset.y-window.pageYOffset),this.p.matrixTransform(i||this.m)},e.prototype._extractPosition=function(e){return{x:null!=e.clientX?e.clientX:e.touches[0].clientX,y:null!=e.clientY?e.clientY:e.touches[0].clientY}},e.prototype.init=function(e){var t=this;if(this.stop(),"stop"!==e){for(var i in this.options={},this.el.resize.defaults)this.options[i]=this.el.resize.defaults[i],void 0!==e[i]&&(this.options[i]=e[i]);this.el.on("lt.resize",(function(e){t.resize(e||window.event)})),this.el.on("rt.resize",(function(e){t.resize(e||window.event)})),this.el.on("rb.resize",(function(e){t.resize(e||window.event)})),this.el.on("lb.resize",(function(e){t.resize(e||window.event)})),this.el.on("t.resize",(function(e){t.resize(e||window.event)})),this.el.on("r.resize",(function(e){t.resize(e||window.event)})),this.el.on("b.resize",(function(e){t.resize(e||window.event)})),this.el.on("l.resize",(function(e){t.resize(e||window.event)})),this.el.on("rot.resize",(function(e){t.resize(e||window.event)})),this.el.on("point.resize",(function(e){t.resize(e||window.event)})),this.update()}},e.prototype.stop=function(){return this.el.off("lt.resize"),this.el.off("rt.resize"),this.el.off("rb.resize"),this.el.off("lb.resize"),this.el.off("t.resize"),this.el.off("r.resize"),this.el.off("b.resize"),this.el.off("l.resize"),this.el.off("rot.resize"),this.el.off("point.resize"),this},e.prototype.resize=function(e){var t=this;this.m=this.el.node.getScreenCTM().inverse(),this.offset={x:window.pageXOffset,y:window.pageYOffset};var i=this._extractPosition(e.detail.event);if(this.parameters={type:this.el.type,p:this.transformPoint(i.x,i.y),x:e.detail.x,y:e.detail.y,box:this.el.bbox(),rotation:this.el.transform().rotation},"text"===this.el.type&&(this.parameters.fontSize=this.el.attr()["font-size"]),void 0!==e.detail.i){var n=this.el.array().valueOf();this.parameters.i=e.detail.i,this.parameters.pointCoords=[n[e.detail.i][0],n[e.detail.i][1]]}switch(e.type){case"lt":this.calc=function(e,t){var i=this.snapToGrid(e,t);if(this.parameters.box.width-i[0]>0&&this.parameters.box.height-i[1]>0){if("text"===this.parameters.type)return this.el.move(this.parameters.box.x+i[0],this.parameters.box.y),void this.el.attr("font-size",this.parameters.fontSize-i[0]);i=this.checkAspectRatio(i),this.el.move(this.parameters.box.x+i[0],this.parameters.box.y+i[1]).size(this.parameters.box.width-i[0],this.parameters.box.height-i[1])}};break;case"rt":this.calc=function(e,t){var i=this.snapToGrid(e,t,2);if(this.parameters.box.width+i[0]>0&&this.parameters.box.height-i[1]>0){if("text"===this.parameters.type)return this.el.move(this.parameters.box.x-i[0],this.parameters.box.y),void this.el.attr("font-size",this.parameters.fontSize+i[0]);i=this.checkAspectRatio(i,!0),this.el.move(this.parameters.box.x,this.parameters.box.y+i[1]).size(this.parameters.box.width+i[0],this.parameters.box.height-i[1])}};break;case"rb":this.calc=function(e,t){var i=this.snapToGrid(e,t,0);if(this.parameters.box.width+i[0]>0&&this.parameters.box.height+i[1]>0){if("text"===this.parameters.type)return this.el.move(this.parameters.box.x-i[0],this.parameters.box.y),void this.el.attr("font-size",this.parameters.fontSize+i[0]);i=this.checkAspectRatio(i),this.el.move(this.parameters.box.x,this.parameters.box.y).size(this.parameters.box.width+i[0],this.parameters.box.height+i[1])}};break;case"lb":this.calc=function(e,t){var i=this.snapToGrid(e,t,1);if(this.parameters.box.width-i[0]>0&&this.parameters.box.height+i[1]>0){if("text"===this.parameters.type)return this.el.move(this.parameters.box.x+i[0],this.parameters.box.y),void this.el.attr("font-size",this.parameters.fontSize-i[0]);i=this.checkAspectRatio(i,!0),this.el.move(this.parameters.box.x+i[0],this.parameters.box.y).size(this.parameters.box.width-i[0],this.parameters.box.height+i[1])}};break;case"t":this.calc=function(e,t){var i=this.snapToGrid(e,t,2);if(this.parameters.box.height-i[1]>0){if("text"===this.parameters.type)return;this.el.move(this.parameters.box.x,this.parameters.box.y+i[1]).height(this.parameters.box.height-i[1])}};break;case"r":this.calc=function(e,t){var i=this.snapToGrid(e,t,0);if(this.parameters.box.width+i[0]>0){if("text"===this.parameters.type)return;this.el.move(this.parameters.box.x,this.parameters.box.y).width(this.parameters.box.width+i[0])}};break;case"b":this.calc=function(e,t){var i=this.snapToGrid(e,t,0);if(this.parameters.box.height+i[1]>0){if("text"===this.parameters.type)return;this.el.move(this.parameters.box.x,this.parameters.box.y).height(this.parameters.box.height+i[1])}};break;case"l":this.calc=function(e,t){var i=this.snapToGrid(e,t,1);if(this.parameters.box.width-i[0]>0){if("text"===this.parameters.type)return;this.el.move(this.parameters.box.x+i[0],this.parameters.box.y).width(this.parameters.box.width-i[0])}};break;case"rot":this.calc=function(e,t){var i=e+this.parameters.p.x,n=t+this.parameters.p.y,r=Math.atan2(this.parameters.p.y-this.parameters.box.y-this.parameters.box.height/2,this.parameters.p.x-this.parameters.box.x-this.parameters.box.width/2),a=Math.atan2(n-this.parameters.box.y-this.parameters.box.height/2,i-this.parameters.box.x-this.parameters.box.width/2),o=this.parameters.rotation+180*(a-r)/Math.PI+this.options.snapToAngle/2;this.el.center(this.parameters.box.cx,this.parameters.box.cy).rotate(o-o%this.options.snapToAngle,this.parameters.box.cx,this.parameters.box.cy)};break;case"point":this.calc=function(e,t){var i=this.snapToGrid(e,t,this.parameters.pointCoords[0],this.parameters.pointCoords[1]),n=this.el.array().valueOf();n[this.parameters.i][0]=this.parameters.pointCoords[0]+i[0],n[this.parameters.i][1]=this.parameters.pointCoords[1]+i[1],this.el.plot(n)}}this.el.fire("resizestart",{dx:this.parameters.x,dy:this.parameters.y,event:e}),SVG.on(window,"touchmove.resize",(function(e){t.update(e||window.event)})),SVG.on(window,"touchend.resize",(function(){t.done()})),SVG.on(window,"mousemove.resize",(function(e){t.update(e||window.event)})),SVG.on(window,"mouseup.resize",(function(){t.done()}))},e.prototype.update=function(e){if(e){var t=this._extractPosition(e),i=this.transformPoint(t.x,t.y),n=i.x-this.parameters.p.x,r=i.y-this.parameters.p.y;this.lastUpdateCall=[n,r],this.calc(n,r),this.el.fire("resizing",{dx:n,dy:r,event:e})}else this.lastUpdateCall&&this.calc(this.lastUpdateCall[0],this.lastUpdateCall[1])},e.prototype.done=function(){this.lastUpdateCall=null,SVG.off(window,"mousemove.resize"),SVG.off(window,"mouseup.resize"),SVG.off(window,"touchmove.resize"),SVG.off(window,"touchend.resize"),this.el.fire("resizedone")},e.prototype.snapToGrid=function(e,t,i,n){var r;return void 0!==n?r=[(i+e)%this.options.snapToGrid,(n+t)%this.options.snapToGrid]:(i=null==i?3:i,r=[(this.parameters.box.x+e+(1&i?0:this.parameters.box.width))%this.options.snapToGrid,(this.parameters.box.y+t+(2&i?0:this.parameters.box.height))%this.options.snapToGrid]),e<0&&(r[0]-=this.options.snapToGrid),t<0&&(r[1]-=this.options.snapToGrid),e-=Math.abs(r[0])<this.options.snapToGrid/2?r[0]:r[0]-(e<0?-this.options.snapToGrid:this.options.snapToGrid),t-=Math.abs(r[1])<this.options.snapToGrid/2?r[1]:r[1]-(t<0?-this.options.snapToGrid:this.options.snapToGrid),this.constraintToBox(e,t,i,n)},e.prototype.constraintToBox=function(e,t,i,n){var r,a,o=this.options.constraint||{};return void 0!==n?(r=i,a=n):(r=this.parameters.box.x+(1&i?0:this.parameters.box.width),a=this.parameters.box.y+(2&i?0:this.parameters.box.height)),void 0!==o.minX&&r+e<o.minX&&(e=o.minX-r),void 0!==o.maxX&&r+e>o.maxX&&(e=o.maxX-r),void 0!==o.minY&&a+t<o.minY&&(t=o.minY-a),void 0!==o.maxY&&a+t>o.maxY&&(t=o.maxY-a),[e,t]},e.prototype.checkAspectRatio=function(e,t){if(!this.options.saveAspectRatio)return e;var i=e.slice(),n=this.parameters.box.width/this.parameters.box.height,r=this.parameters.box.width+e[0],a=this.parameters.box.height-e[1],o=r/a;return o<n?(i[1]=r/n-this.parameters.box.height,t&&(i[1]=-i[1])):o>n&&(i[0]=this.parameters.box.width-a*n,t&&(i[0]=-i[0])),i},SVG.extend(SVG.Element,{resize:function(t){return(this.remember("_resizeHandler")||new e(this)).init(t||{}),this}}),SVG.Element.prototype.resize.defaults={snapToAngle:.1,snapToGrid:1,constraint:{},saveAspectRatio:!1}}).call(this)}(),function(e,t){void 0===t&&(t={});var i=t.insertAt;if("undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===i&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}('.apexcharts-canvas {\n position: relative;\n user-select: none;\n /* cannot give overflow: hidden as it will crop tooltips which overflow outside chart area */\n}\n\n\n/* scrollbar is not visible by default for legend, hence forcing the visibility */\n.apexcharts-canvas ::-webkit-scrollbar {\n -webkit-appearance: none;\n width: 6px;\n}\n\n.apexcharts-canvas ::-webkit-scrollbar-thumb {\n border-radius: 4px;\n background-color: rgba(0, 0, 0, .5);\n box-shadow: 0 0 1px rgba(255, 255, 255, .5);\n -webkit-box-shadow: 0 0 1px rgba(255, 255, 255, .5);\n}\n\n\n.apexcharts-inner {\n position: relative;\n}\n\n.apexcharts-text tspan {\n font-family: inherit;\n}\n\n.legend-mouseover-inactive {\n transition: 0.15s ease all;\n opacity: 0.20;\n}\n\n.apexcharts-series-collapsed {\n opacity: 0;\n}\n\n.apexcharts-tooltip {\n border-radius: 5px;\n box-shadow: 2px 2px 6px -4px #999;\n cursor: default;\n font-size: 14px;\n left: 62px;\n opacity: 0;\n pointer-events: none;\n position: absolute;\n top: 20px;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n white-space: nowrap;\n z-index: 12;\n transition: 0.15s ease all;\n}\n\n.apexcharts-tooltip.apexcharts-active {\n opacity: 1;\n transition: 0.15s ease all;\n}\n\n.apexcharts-tooltip.apexcharts-theme-light {\n border: 1px solid #e3e3e3;\n background: rgba(255, 255, 255, 0.96);\n}\n\n.apexcharts-tooltip.apexcharts-theme-dark {\n color: #fff;\n background: rgba(30, 30, 30, 0.8);\n}\n\n.apexcharts-tooltip * {\n font-family: inherit;\n}\n\n\n.apexcharts-tooltip-title {\n padding: 6px;\n font-size: 15px;\n margin-bottom: 4px;\n}\n\n.apexcharts-tooltip.apexcharts-theme-light .apexcharts-tooltip-title {\n background: #ECEFF1;\n border-bottom: 1px solid #ddd;\n}\n\n.apexcharts-tooltip.apexcharts-theme-dark .apexcharts-tooltip-title {\n background: rgba(0, 0, 0, 0.7);\n border-bottom: 1px solid #333;\n}\n\n.apexcharts-tooltip-text-y-value,\n.apexcharts-tooltip-text-goals-value,\n.apexcharts-tooltip-text-z-value {\n display: inline-block;\n font-weight: 600;\n margin-left: 5px;\n}\n\n.apexcharts-tooltip-text-y-label:empty,\n.apexcharts-tooltip-text-y-value:empty,\n.apexcharts-tooltip-text-goals-label:empty,\n.apexcharts-tooltip-text-goals-value:empty,\n.apexcharts-tooltip-text-z-value:empty {\n display: none;\n}\n\n.apexcharts-tooltip-text-y-value,\n.apexcharts-tooltip-text-goals-value,\n.apexcharts-tooltip-text-z-value {\n font-weight: 600;\n}\n\n.apexcharts-tooltip-text-goals-label, \n.apexcharts-tooltip-text-goals-value {\n padding: 6px 0 5px;\n}\n\n.apexcharts-tooltip-goals-group, \n.apexcharts-tooltip-text-goals-label, \n.apexcharts-tooltip-text-goals-value {\n display: flex;\n}\n.apexcharts-tooltip-text-goals-label:not(:empty),\n.apexcharts-tooltip-text-goals-value:not(:empty) {\n margin-top: -6px;\n}\n\n.apexcharts-tooltip-marker {\n width: 12px;\n height: 12px;\n position: relative;\n top: 0px;\n margin-right: 10px;\n border-radius: 50%;\n}\n\n.apexcharts-tooltip-series-group {\n padding: 0 10px;\n display: none;\n text-align: left;\n justify-content: left;\n align-items: center;\n}\n\n.apexcharts-tooltip-series-group.apexcharts-active .apexcharts-tooltip-marker {\n opacity: 1;\n}\n\n.apexcharts-tooltip-series-group.apexcharts-active,\n.apexcharts-tooltip-series-group:last-child {\n padding-bottom: 4px;\n}\n\n.apexcharts-tooltip-series-group-hidden {\n opacity: 0;\n height: 0;\n line-height: 0;\n padding: 0 !important;\n}\n\n.apexcharts-tooltip-y-group {\n padding: 6px 0 5px;\n}\n\n.apexcharts-tooltip-box, .apexcharts-custom-tooltip {\n padding: 4px 8px;\n}\n\n.apexcharts-tooltip-boxPlot {\n display: flex;\n flex-direction: column-reverse;\n}\n\n.apexcharts-tooltip-box>div {\n margin: 4px 0;\n}\n\n.apexcharts-tooltip-box span.value {\n font-weight: bold;\n}\n\n.apexcharts-tooltip-rangebar {\n padding: 5px 8px;\n}\n\n.apexcharts-tooltip-rangebar .category {\n font-weight: 600;\n color: #777;\n}\n\n.apexcharts-tooltip-rangebar .series-name {\n font-weight: bold;\n display: block;\n margin-bottom: 5px;\n}\n\n.apexcharts-xaxistooltip {\n opacity: 0;\n padding: 9px 10px;\n pointer-events: none;\n color: #373d3f;\n font-size: 13px;\n text-align: center;\n border-radius: 2px;\n position: absolute;\n z-index: 10;\n background: #ECEFF1;\n border: 1px solid #90A4AE;\n transition: 0.15s ease all;\n}\n\n.apexcharts-xaxistooltip.apexcharts-theme-dark {\n background: rgba(0, 0, 0, 0.7);\n border: 1px solid rgba(0, 0, 0, 0.5);\n color: #fff;\n}\n\n.apexcharts-xaxistooltip:after,\n.apexcharts-xaxistooltip:before {\n left: 50%;\n border: solid transparent;\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none;\n}\n\n.apexcharts-xaxistooltip:after {\n border-color: rgba(236, 239, 241, 0);\n border-width: 6px;\n margin-left: -6px;\n}\n\n.apexcharts-xaxistooltip:before {\n border-color: rgba(144, 164, 174, 0);\n border-width: 7px;\n margin-left: -7px;\n}\n\n.apexcharts-xaxistooltip-bottom:after,\n.apexcharts-xaxistooltip-bottom:before {\n bottom: 100%;\n}\n\n.apexcharts-xaxistooltip-top:after,\n.apexcharts-xaxistooltip-top:before {\n top: 100%;\n}\n\n.apexcharts-xaxistooltip-bottom:after {\n border-bottom-color: #ECEFF1;\n}\n\n.apexcharts-xaxistooltip-bottom:before {\n border-bottom-color: #90A4AE;\n}\n\n.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:after {\n border-bottom-color: rgba(0, 0, 0, 0.5);\n}\n\n.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:before {\n border-bottom-color: rgba(0, 0, 0, 0.5);\n}\n\n.apexcharts-xaxistooltip-top:after {\n border-top-color: #ECEFF1\n}\n\n.apexcharts-xaxistooltip-top:before {\n border-top-color: #90A4AE;\n}\n\n.apexcharts-xaxistooltip-top.apexcharts-theme-dark:after {\n border-top-color: rgba(0, 0, 0, 0.5);\n}\n\n.apexcharts-xaxistooltip-top.apexcharts-theme-dark:before {\n border-top-color: rgba(0, 0, 0, 0.5);\n}\n\n.apexcharts-xaxistooltip.apexcharts-active {\n opacity: 1;\n transition: 0.15s ease all;\n}\n\n.apexcharts-yaxistooltip {\n opacity: 0;\n padding: 4px 10px;\n pointer-events: none;\n color: #373d3f;\n font-size: 13px;\n text-align: center;\n border-radius: 2px;\n position: absolute;\n z-index: 10;\n background: #ECEFF1;\n border: 1px solid #90A4AE;\n}\n\n.apexcharts-yaxistooltip.apexcharts-theme-dark {\n background: rgba(0, 0, 0, 0.7);\n border: 1px solid rgba(0, 0, 0, 0.5);\n color: #fff;\n}\n\n.apexcharts-yaxistooltip:after,\n.apexcharts-yaxistooltip:before {\n top: 50%;\n border: solid transparent;\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none;\n}\n\n.apexcharts-yaxistooltip:after {\n border-color: rgba(236, 239, 241, 0);\n border-width: 6px;\n margin-top: -6px;\n}\n\n.apexcharts-yaxistooltip:before {\n border-color: rgba(144, 164, 174, 0);\n border-width: 7px;\n margin-top: -7px;\n}\n\n.apexcharts-yaxistooltip-left:after,\n.apexcharts-yaxistooltip-left:before {\n left: 100%;\n}\n\n.apexcharts-yaxistooltip-right:after,\n.apexcharts-yaxistooltip-right:before {\n right: 100%;\n}\n\n.apexcharts-yaxistooltip-left:after {\n border-left-color: #ECEFF1;\n}\n\n.apexcharts-yaxistooltip-left:before {\n border-left-color: #90A4AE;\n}\n\n.apexcharts-yaxistooltip-left.apexcharts-theme-dark:after {\n border-left-color: rgba(0, 0, 0, 0.5);\n}\n\n.apexcharts-yaxistooltip-left.apexcharts-theme-dark:before {\n border-left-color: rgba(0, 0, 0, 0.5);\n}\n\n.apexcharts-yaxistooltip-right:after {\n border-right-color: #ECEFF1;\n}\n\n.apexcharts-yaxistooltip-right:before {\n border-right-color: #90A4AE;\n}\n\n.apexcharts-yaxistooltip-right.apexcharts-theme-dark:after {\n border-right-color: rgba(0, 0, 0, 0.5);\n}\n\n.apexcharts-yaxistooltip-right.apexcharts-theme-dark:before {\n border-right-color: rgba(0, 0, 0, 0.5);\n}\n\n.apexcharts-yaxistooltip.apexcharts-active {\n opacity: 1;\n}\n\n.apexcharts-yaxistooltip-hidden {\n display: none;\n}\n\n.apexcharts-xcrosshairs,\n.apexcharts-ycrosshairs {\n pointer-events: none;\n opacity: 0;\n transition: 0.15s ease all;\n}\n\n.apexcharts-xcrosshairs.apexcharts-active,\n.apexcharts-ycrosshairs.apexcharts-active {\n opacity: 1;\n transition: 0.15s ease all;\n}\n\n.apexcharts-ycrosshairs-hidden {\n opacity: 0;\n}\n\n.apexcharts-selection-rect {\n cursor: move;\n}\n\n.svg_select_boundingRect, .svg_select_points_rot {\n pointer-events: none;\n opacity: 0;\n visibility: hidden;\n}\n.apexcharts-selection-rect + g .svg_select_boundingRect,\n.apexcharts-selection-rect + g .svg_select_points_rot {\n opacity: 0;\n visibility: hidden;\n}\n\n.apexcharts-selection-rect + g .svg_select_points_l,\n.apexcharts-selection-rect + g .svg_select_points_r {\n cursor: ew-resize;\n opacity: 1;\n visibility: visible;\n}\n\n.svg_select_points {\n fill: #efefef;\n stroke: #333;\n rx: 2;\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-zoom {\n cursor: crosshair\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-pan {\n cursor: move\n}\n\n.apexcharts-zoom-icon,\n.apexcharts-zoomin-icon,\n.apexcharts-zoomout-icon,\n.apexcharts-reset-icon,\n.apexcharts-pan-icon,\n.apexcharts-selection-icon,\n.apexcharts-menu-icon,\n.apexcharts-toolbar-custom-icon {\n cursor: pointer;\n width: 20px;\n height: 20px;\n line-height: 24px;\n color: #6E8192;\n text-align: center;\n}\n\n.apexcharts-zoom-icon svg,\n.apexcharts-zoomin-icon svg,\n.apexcharts-zoomout-icon svg,\n.apexcharts-reset-icon svg,\n.apexcharts-menu-icon svg {\n fill: #6E8192;\n}\n\n.apexcharts-selection-icon svg {\n fill: #444;\n transform: scale(0.76)\n}\n\n.apexcharts-theme-dark .apexcharts-zoom-icon svg,\n.apexcharts-theme-dark .apexcharts-zoomin-icon svg,\n.apexcharts-theme-dark .apexcharts-zoomout-icon svg,\n.apexcharts-theme-dark .apexcharts-reset-icon svg,\n.apexcharts-theme-dark .apexcharts-pan-icon svg,\n.apexcharts-theme-dark .apexcharts-selection-icon svg,\n.apexcharts-theme-dark .apexcharts-menu-icon svg,\n.apexcharts-theme-dark .apexcharts-toolbar-custom-icon svg {\n fill: #f3f4f5;\n}\n\n.apexcharts-canvas .apexcharts-zoom-icon.apexcharts-selected svg,\n.apexcharts-canvas .apexcharts-selection-icon.apexcharts-selected svg,\n.apexcharts-canvas .apexcharts-reset-zoom-icon.apexcharts-selected svg {\n fill: #008FFB;\n}\n\n.apexcharts-theme-light .apexcharts-selection-icon:not(.apexcharts-selected):hover svg,\n.apexcharts-theme-light .apexcharts-zoom-icon:not(.apexcharts-selected):hover svg,\n.apexcharts-theme-light .apexcharts-zoomin-icon:hover svg,\n.apexcharts-theme-light .apexcharts-zoomout-icon:hover svg,\n.apexcharts-theme-light .apexcharts-reset-icon:hover svg,\n.apexcharts-theme-light .apexcharts-menu-icon:hover svg {\n fill: #333;\n}\n\n.apexcharts-selection-icon,\n.apexcharts-menu-icon {\n position: relative;\n}\n\n.apexcharts-reset-icon {\n margin-left: 5px;\n}\n\n.apexcharts-zoom-icon,\n.apexcharts-reset-icon,\n.apexcharts-menu-icon {\n transform: scale(0.85);\n}\n\n.apexcharts-zoomin-icon,\n.apexcharts-zoomout-icon {\n transform: scale(0.7)\n}\n\n.apexcharts-zoomout-icon {\n margin-right: 3px;\n}\n\n.apexcharts-pan-icon {\n transform: scale(0.62);\n position: relative;\n left: 1px;\n top: 0px;\n}\n\n.apexcharts-pan-icon svg {\n fill: #fff;\n stroke: #6E8192;\n stroke-width: 2;\n}\n\n.apexcharts-pan-icon.apexcharts-selected svg {\n stroke: #008FFB;\n}\n\n.apexcharts-pan-icon:not(.apexcharts-selected):hover svg {\n stroke: #333;\n}\n\n.apexcharts-toolbar {\n position: absolute;\n z-index: 11;\n max-width: 176px;\n text-align: right;\n border-radius: 3px;\n padding: 0px 6px 2px 6px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n\n.apexcharts-menu {\n background: #fff;\n position: absolute;\n top: 100%;\n border: 1px solid #ddd;\n border-radius: 3px;\n padding: 3px;\n right: 10px;\n opacity: 0;\n min-width: 110px;\n transition: 0.15s ease all;\n pointer-events: none;\n}\n\n.apexcharts-menu.apexcharts-menu-open {\n opacity: 1;\n pointer-events: all;\n transition: 0.15s ease all;\n}\n\n.apexcharts-menu-item {\n padding: 6px 7px;\n font-size: 12px;\n cursor: pointer;\n}\n\n.apexcharts-theme-light .apexcharts-menu-item:hover {\n background: #eee;\n}\n\n.apexcharts-theme-dark .apexcharts-menu {\n background: rgba(0, 0, 0, 0.7);\n color: #fff;\n}\n\n@media screen and (min-width: 768px) {\n .apexcharts-canvas:hover .apexcharts-toolbar {\n opacity: 1;\n }\n}\n\n.apexcharts-datalabel.apexcharts-element-hidden {\n opacity: 0;\n}\n\n.apexcharts-pie-label,\n.apexcharts-datalabels,\n.apexcharts-datalabel,\n.apexcharts-datalabel-label,\n.apexcharts-datalabel-value {\n cursor: default;\n pointer-events: none;\n}\n\n.apexcharts-pie-label-delay {\n opacity: 0;\n animation-name: opaque;\n animation-duration: 0.3s;\n animation-fill-mode: forwards;\n animation-timing-function: ease;\n}\n\n.apexcharts-canvas .apexcharts-element-hidden {\n opacity: 0;\n}\n\n.apexcharts-hide .apexcharts-series-points {\n opacity: 0;\n}\n\n.apexcharts-gridline,\n.apexcharts-annotation-rect,\n.apexcharts-tooltip .apexcharts-marker,\n.apexcharts-area-series .apexcharts-area,\n.apexcharts-line,\n.apexcharts-zoom-rect,\n.apexcharts-toolbar svg,\n.apexcharts-area-series .apexcharts-series-markers .apexcharts-marker.no-pointer-events,\n.apexcharts-line-series .apexcharts-series-markers .apexcharts-marker.no-pointer-events,\n.apexcharts-radar-series path,\n.apexcharts-radar-series polygon {\n pointer-events: none;\n}\n\n\n/* markers */\n\n.apexcharts-marker {\n transition: 0.15s ease all;\n}\n\n@keyframes opaque {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n\n\n/* Resize generated styles */\n\n@keyframes resizeanim {\n from {\n opacity: 0;\n }\n to {\n opacity: 0;\n }\n}\n\n.resize-triggers {\n animation: 1ms resizeanim;\n visibility: hidden;\n opacity: 0;\n}\n\n.resize-triggers,\n.resize-triggers>div,\n.contract-trigger:before {\n content: " ";\n display: block;\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n overflow: hidden;\n}\n\n.resize-triggers>div {\n background: #eee;\n overflow: auto;\n}\n\n.contract-trigger:before {\n width: 200%;\n height: 200%;\n}'),function(){function e(e){var t=e.__resizeTriggers__,i=t.firstElementChild,n=t.lastElementChild,r=i?i.firstElementChild:null;n&&(n.scrollLeft=n.scrollWidth,n.scrollTop=n.scrollHeight),r&&(r.style.width=i.offsetWidth+1+"px",r.style.height=i.offsetHeight+1+"px"),i&&(i.scrollLeft=i.scrollWidth,i.scrollTop=i.scrollHeight)}function t(t){var i=this;e(this),this.__resizeRAF__&&a(this.__resizeRAF__),this.__resizeRAF__=r((function(){(function(e){return e.offsetWidth!=e.__resizeLast__.width||e.offsetHeight!=e.__resizeLast__.height})(i)&&(i.__resizeLast__.width=i.offsetWidth,i.__resizeLast__.height=i.offsetHeight,i.__resizeListeners__.forEach((function(e){e.call(t)})))}))}var i,n,r=(i=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(e){return window.setTimeout(e,20)},function(e){return i(e)}),a=(n=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.clearTimeout,function(e){return n(e)}),o=!1,s="animationstart",l="Webkit Moz O ms".split(" "),c="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),h=document.createElement("fakeelement");if(void 0!==h.style.animationName&&(o=!0),!1===o)for(var d=0;d<l.length;d++)if(void 0!==h.style[l[d]+"AnimationName"]){s=c[d];break}window.addResizeListener=function(i,n){i.__resizeTriggers__||("static"==getComputedStyle(i).position&&(i.style.position="relative"),i.__resizeLast__={},i.__resizeListeners__=[],(i.__resizeTriggers__=document.createElement("div")).className="resize-triggers",i.__resizeTriggers__.innerHTML='<div class="expand-trigger"><div></div></div><div class="contract-trigger"></div>',i.appendChild(i.__resizeTriggers__),e(i),i.addEventListener("scroll",t,!0),s&&i.__resizeTriggers__.addEventListener(s,(function(t){"resizeanim"==t.animationName&&e(i)}))),i.__resizeListeners__.push(n)},window.removeResizeListener=function(e,i){e&&(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(i),1),e.__resizeListeners__.length||(e.removeEventListener("scroll",t),e.__resizeTriggers__.parentNode&&(e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__))))}}(),void 0===window.Apex&&(window.Apex={});var Fe=function(){function e(t){o(this,e),this.ctx=t,this.w=t.w}return l(e,[{key:"initModules",value:function(){this.ctx.publicMethods=["updateOptions","updateSeries","appendData","appendSeries","toggleSeries","showSeries","hideSeries","setLocale","resetSeries","zoomX","toggleDataPointSelection","dataURI","addXaxisAnnotation","addYaxisAnnotation","addPointAnnotation","clearAnnotations","removeAnnotation","paper","destroy"],this.ctx.eventList=["click","mousedown","mousemove","touchstart","touchmove","mouseup","touchend"],this.ctx.animations=new b(this.ctx),this.ctx.axes=new te(this.ctx),this.ctx.core=new Ne(this.ctx.el,this.ctx),this.ctx.config=new j({}),this.ctx.data=new B(this.ctx),this.ctx.grid=new q(this.ctx),this.ctx.graphics=new w(this.ctx),this.ctx.coreUtils=new S(this.ctx),this.ctx.crosshairs=new ie(this.ctx),this.ctx.events=new K(this.ctx),this.ctx.exports=new G(this.ctx),this.ctx.localization=new ee(this.ctx),this.ctx.options=new P,this.ctx.responsive=new ne(this.ctx),this.ctx.series=new z(this.ctx),this.ctx.theme=new re(this.ctx),this.ctx.formatters=new W(this.ctx),this.ctx.titleSubtitle=new ae(this.ctx),this.ctx.legend=new ue(this.ctx),this.ctx.toolbar=new pe(this.ctx),this.ctx.dimensions=new he(this.ctx),this.ctx.updateHelpers=new Re(this.ctx),this.ctx.zoomPanSelection=new fe(this.ctx),this.ctx.w.globals.tooltip=new we(this.ctx)}}]),e}(),He=function(){function e(t){o(this,e),this.ctx=t,this.w=t.w}return l(e,[{key:"clear",value:function(e){var t=e.isUpdating;this.ctx.zoomPanSelection&&this.ctx.zoomPanSelection.destroy(),this.ctx.toolbar&&this.ctx.toolbar.destroy(),this.ctx.animations=null,this.ctx.axes=null,this.ctx.annotations=null,this.ctx.core=null,this.ctx.data=null,this.ctx.grid=null,this.ctx.series=null,this.ctx.responsive=null,this.ctx.theme=null,this.ctx.formatters=null,this.ctx.titleSubtitle=null,this.ctx.legend=null,this.ctx.dimensions=null,this.ctx.options=null,this.ctx.crosshairs=null,this.ctx.zoomPanSelection=null,this.ctx.updateHelpers=null,this.ctx.toolbar=null,this.ctx.localization=null,this.ctx.w.globals.tooltip=null,this.clearDomElements({isUpdating:t})}},{key:"killSVG",value:function(e){e.each((function(e,t){this.removeClass("*"),this.off(),this.stop()}),!0),e.ungroup(),e.clear()}},{key:"clearDomElements",value:function(e){var t=this,i=e.isUpdating,n=this.w.globals.dom.Paper.node;n.parentNode&&n.parentNode.parentNode&&!i&&(n.parentNode.parentNode.style.minHeight="unset");var r=this.w.globals.dom.baseEl;r&&this.ctx.eventList.forEach((function(e){r.removeEventListener(e,t.ctx.events.documentEvent)}));var a=this.w.globals.dom;if(null!==this.ctx.el)for(;this.ctx.el.firstChild;)this.ctx.el.removeChild(this.ctx.el.firstChild);this.killSVG(a.Paper),a.Paper.remove(),a.elWrap=null,a.elGraphical=null,a.elAnnotations=null,a.elLegendWrap=null,a.baseEl=null,a.elGridRect=null,a.elGridRectMask=null,a.elGridRectMarkerMask=null,a.elDefs=null}}]),e}(),Ye=function(){function e(t,i){o(this,e),this.opts=i,this.ctx=this,this.w=new X(i).init(),this.el=t,this.w.globals.cuid=y.randomId(),this.w.globals.chartID=this.w.config.chart.id?y.escapeString(this.w.config.chart.id):this.w.globals.cuid,new Fe(this).initModules(),this.create=y.bind(this.create,this),this.windowResizeHandler=this._windowResizeHandler.bind(this),this.parentResizeHandler=this._parentResizeCallback.bind(this)}return l(e,[{key:"render",value:function(){var e=this;return new Promise((function(t,i){if(null!==e.el){void 0===Apex._chartInstances&&(Apex._chartInstances=[]),e.w.config.chart.id&&Apex._chartInstances.push({id:e.w.globals.chartID,group:e.w.config.chart.group,chart:e}),e.setLocale(e.w.config.chart.defaultLocale);var n=e.w.config.chart.events.beforeMount;"function"==typeof n&&n(e,e.w),e.events.fireEvent("beforeMount",[e,e.w]),window.addEventListener("resize",e.windowResizeHandler),window.addResizeListener(e.el.parentNode,e.parentResizeHandler);var r=e.create(e.w.config.series,{});if(!r)return t(e);e.mount(r).then((function(){"function"==typeof e.w.config.chart.events.mounted&&e.w.config.chart.events.mounted(e,e.w),e.events.fireEvent("mounted",[e,e.w]),t(r)})).catch((function(e){i(e)}))}else i(new Error("Element not found"))}))}},{key:"create",value:function(e,t){var i=this.w;new Fe(this).initModules();var n=this.w.globals;if(n.noData=!1,n.animationEnded=!1,this.responsive.checkResponsiveConfig(t),i.config.xaxis.convertedCatToNumeric&&new Y(i.config).convertCatToNumericXaxis(i.config,this.ctx),null===this.el)return n.animationEnded=!0,null;if(this.core.setupElements(),"treemap"===i.config.chart.type&&(i.config.grid.show=!1,i.config.yaxis[0].show=!1),0===n.svgWidth)return n.animationEnded=!0,null;var r=S.checkComboSeries(e);n.comboCharts=r.comboCharts,n.comboBarCount=r.comboBarCount;var a=e.every((function(e){return e.data&&0===e.data.length}));(0===e.length||a)&&this.series.handleNoData(),this.events.setupEventHandlers(),this.data.parseData(e),this.theme.init(),new M(this).setGlobalMarkerSize(),this.formatters.setLabelFormatters(),this.titleSubtitle.draw(),n.noData&&n.collapsedSeries.length!==n.series.length&&!i.config.legend.showForSingleSeries||this.legend.init(),this.series.hasAllSeriesEqualX(),n.axisCharts&&(this.core.coreCalculations(),"category"!==i.config.xaxis.type&&this.formatters.setLabelFormatters(),this.ctx.toolbar.minX=i.globals.minX,this.ctx.toolbar.maxX=i.globals.maxX),this.formatters.heatmapLabelFormatters(),this.dimensions.plotCoords();var o=this.core.xySettings();this.grid.createGridMask();var s=this.core.plotChartType(e,o),l=new I(this);l.bringForward(),i.config.dataLabels.background.enabled&&l.dataLabelsBackground(),this.core.shiftGraphPosition();var c={plot:{left:i.globals.translateX,top:i.globals.translateY,width:i.globals.gridWidth,height:i.globals.gridHeight}};return{elGraph:s,xyRatios:o,elInner:i.globals.dom.elGraphical,dimensions:c}}},{key:"mount",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=this,n=i.w;return new Promise((function(r,a){if(null===i.el)return a(new Error("Not enough data to display or target element not found"));(null===t||n.globals.allSeriesCollapsed)&&i.series.handleNoData(),"treemap"!==n.config.chart.type&&i.axes.drawAxis(n.config.chart.type,t.xyRatios),i.grid=new q(i);var o=i.grid.drawGrid();i.annotations=new L(i),i.annotations.drawImageAnnos(),i.annotations.drawTextAnnos(),"back"===n.config.grid.position&&o&&n.globals.dom.elGraphical.add(o.el);var s=new U(e.ctx),l=new Q(e.ctx);if(null!==o&&(s.xAxisLabelCorrections(o.xAxisTickWidth),l.setYAxisTextAlignments(),n.config.yaxis.map((function(e,t){-1===n.globals.ignoreYAxisIndexes.indexOf(t)&&l.yAxisTitleRotate(t,e.opposite)}))),"back"===n.config.annotations.position&&(n.globals.dom.Paper.add(n.globals.dom.elAnnotations),i.annotations.drawAxesAnnotations()),Array.isArray(t.elGraph))for(var c=0;c<t.elGraph.length;c++)n.globals.dom.elGraphical.add(t.elGraph[c]);else n.globals.dom.elGraphical.add(t.elGraph);if("front"===n.config.grid.position&&o&&n.globals.dom.elGraphical.add(o.el),"front"===n.config.xaxis.crosshairs.position&&i.crosshairs.drawXCrosshairs(),"front"===n.config.yaxis[0].crosshairs.position&&i.crosshairs.drawYCrosshairs(),"front"===n.config.annotations.position&&(n.globals.dom.Paper.add(n.globals.dom.elAnnotations),i.annotations.drawAxesAnnotations()),!n.globals.noData){if(n.config.tooltip.enabled&&!n.globals.noData&&i.w.globals.tooltip.drawTooltip(t.xyRatios),n.globals.axisCharts&&(n.globals.isXNumeric||n.config.xaxis.convertedCatToNumeric||n.globals.isTimelineBar))(n.config.chart.zoom.enabled||n.config.chart.selection&&n.config.chart.selection.enabled||n.config.chart.pan&&n.config.chart.pan.enabled)&&i.zoomPanSelection.init({xyRatios:t.xyRatios});else{var h=n.config.chart.toolbar.tools;["zoom","zoomin","zoomout","selection","pan","reset"].forEach((function(e){h[e]=!1}))}n.config.chart.toolbar.show&&!n.globals.allSeriesCollapsed&&i.toolbar.createToolbar()}n.globals.memory.methodsToExec.length>0&&n.globals.memory.methodsToExec.forEach((function(e){e.method(e.params,!1,e.context)})),n.globals.axisCharts||n.globals.noData||i.core.resizeNonAxisCharts(),r(i)}))}},{key:"destroy",value:function(){window.removeEventListener("resize",this.windowResizeHandler),window.removeResizeListener(this.el.parentNode,this.parentResizeHandler);var e=this.w.config.chart.id;e&&Apex._chartInstances.forEach((function(t,i){t.id===y.escapeString(e)&&Apex._chartInstances.splice(i,1)})),new He(this.ctx).clear({isUpdating:!1})}},{key:"updateOptions",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=this.w;return o.globals.selection=void 0,e.series&&(this.series.resetSeries(!1,!0,!1),e.series.length&&e.series[0].data&&(e.series=e.series.map((function(e,i){return t.updateHelpers._extendSeries(e,i)}))),this.updateHelpers.revertDefaultAxisMinMax()),e.xaxis&&(e=this.updateHelpers.forceXAxisUpdate(e)),e.yaxis&&(e=this.updateHelpers.forceYAxisUpdate(e)),o.globals.collapsedSeriesIndices.length>0&&this.series.clearPreviousPaths(),e.theme&&(e=this.theme.updateThemeOptions(e)),this.updateHelpers._updateOptions(e,i,n,r,a)}},{key:"updateSeries",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(e,t,i)}},{key:"appendSeries",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=this.w.config.series.slice();return n.push(e),this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(n,t,i)}},{key:"appendData",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this;i.w.globals.dataChanged=!0,i.series.getPreviousPaths();for(var n=i.w.config.series.slice(),r=0;r<n.length;r++)if(null!==e[r]&&void 0!==e[r])for(var a=0;a<e[r].data.length;a++)n[r].data.push(e[r].data[a]);return i.w.config.series=n,t&&(i.w.globals.initialSeries=y.clone(i.w.config.series)),this.update()}},{key:"update",value:function(e){var t=this;return new Promise((function(i,n){new He(t.ctx).clear({isUpdating:!0});var r=t.create(t.w.config.series,e);if(!r)return i(t);t.mount(r).then((function(){"function"==typeof t.w.config.chart.events.updated&&t.w.config.chart.events.updated(t,t.w),t.events.fireEvent("updated",[t,t.w]),t.w.globals.isDirty=!0,i(t)})).catch((function(e){n(e)}))}))}},{key:"getSyncedCharts",value:function(){var e=this.getGroupedCharts(),t=[this];return e.length&&(t=[],e.forEach((function(e){t.push(e)}))),t}},{key:"getGroupedCharts",value:function(){var e=this;return Apex._chartInstances.filter((function(e){if(e.group)return!0})).map((function(t){return e.w.config.chart.group===t.group?t.chart:e}))}},{key:"toggleSeries",value:function(e){return this.series.toggleSeries(e)}},{key:"showSeries",value:function(e){this.series.showSeries(e)}},{key:"hideSeries",value:function(e){this.series.hideSeries(e)}},{key:"resetSeries",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.series.resetSeries(e,t)}},{key:"addEventListener",value:function(e,t){this.events.addEventListener(e,t)}},{key:"removeEventListener",value:function(e,t){this.events.removeEventListener(e,t)}},{key:"addXaxisAnnotation",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,n=this;i&&(n=i),n.annotations.addXaxisAnnotationExternal(e,t,n)}},{key:"addYaxisAnnotation",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,n=this;i&&(n=i),n.annotations.addYaxisAnnotationExternal(e,t,n)}},{key:"addPointAnnotation",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,n=this;i&&(n=i),n.annotations.addPointAnnotationExternal(e,t,n)}},{key:"clearAnnotations",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,t=this;e&&(t=e),t.annotations.clearAnnotations(t)}},{key:"removeAnnotation",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,i=this;t&&(i=t),i.annotations.removeAnnotation(i,e)}},{key:"getChartArea",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-inner")}},{key:"getSeriesTotalXRange",value:function(e,t){return this.coreUtils.getSeriesTotalsXRange(e,t)}},{key:"getHighestValueInSeries",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=new J(this.ctx);return t.getMinYMaxY(e).highestY}},{key:"getLowestValueInSeries",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=new J(this.ctx);return t.getMinYMaxY(e).lowestY}},{key:"getSeriesTotal",value:function(){return this.w.globals.seriesTotals}},{key:"toggleDataPointSelection",value:function(e,t){return this.updateHelpers.toggleDataPointSelection(e,t)}},{key:"zoomX",value:function(e,t){this.ctx.toolbar.zoomUpdateOptions(e,t)}},{key:"setLocale",value:function(e){this.localization.setCurrentLocaleValues(e)}},{key:"dataURI",value:function(e){return new G(this.ctx).dataURI(e)}},{key:"paper",value:function(){return this.w.globals.dom.Paper}},{key:"_parentResizeCallback",value:function(){this.w.globals.animationEnded&&this.w.config.chart.redrawOnParentResize&&this._windowResize()}},{key:"_windowResize",value:function(){var e=this;clearTimeout(this.w.globals.resizeTimer),this.w.globals.resizeTimer=window.setTimeout((function(){e.w.globals.resized=!0,e.w.globals.dataChanged=!1,e.ctx.update()}),150)}},{key:"_windowResizeHandler",value:function(){var e=this.w.config.chart.redrawOnWindowResize;"function"==typeof e&&(e=e()),e&&this._windowResize()}}],[{key:"getChartByID",value:function(e){var t=y.escapeString(e),i=Apex._chartInstances.filter((function(e){return e.id===t}))[0];return i&&i.chart}},{key:"initOnLoad",value:function(){for(var t=document.querySelectorAll("[data-apexcharts]"),i=0;i<t.length;i++)new e(t[i],JSON.parse(t[i].getAttribute("data-options"))).render()}},{key:"exec",value:function(e,t){var i=this.getChartByID(e);if(i){i.w.globals.isExecCalled=!0;var n=null;if(-1!==i.publicMethods.indexOf(t)){for(var r=arguments.length,a=new Array(r>2?r-2:0),o=2;o<r;o++)a[o-2]=arguments[o];n=i[t].apply(i,a)}return n}}},{key:"merge",value:function(e,t){return y.extend(e,t)}}]),e}();e.exports=Ye},function(e,t,i){"use strict";
37
+ /** @license React v16.12.0
38
+ * react.production.min.js
39
+ *
40
+ * Copyright (c) Facebook, Inc. and its affiliates.
41
+ *
42
+ * This source code is licensed under the MIT license found in the
43
+ * LICENSE file in the root directory of this source tree.
44
+ */var n=i(12),r=i(37),a="function"==typeof Symbol&&Symbol.for,o=a?Symbol.for("react.element"):60103,s=a?Symbol.for("react.portal"):60106,l=a?Symbol.for("react.fragment"):60107,c=a?Symbol.for("react.strict_mode"):60108,h=a?Symbol.for("react.profiler"):60114,d=a?Symbol.for("react.provider"):60109,u=a?Symbol.for("react.context"):60110,p=a?Symbol.for("react.forward_ref"):60112,f=a?Symbol.for("react.suspense"):60113;a&&Symbol.for("react.suspense_list");var g=a?Symbol.for("react.memo"):60115,m=a?Symbol.for("react.lazy"):60116;a&&Symbol.for("react.fundamental"),a&&Symbol.for("react.responder"),a&&Symbol.for("react.scope");var v="function"==typeof Symbol&&Symbol.iterator;function y(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,i=1;i<arguments.length;i++)t+="&args[]="+encodeURIComponent(arguments[i]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x={};function w(e,t,i){this.props=e,this.context=t,this.refs=x,this.updater=i||b}function k(){}function _(e,t,i){this.props=e,this.context=t,this.refs=x,this.updater=i||b}w.prototype.isReactComponent={},w.prototype.setState=function(e,t){if("object"!==n(e)&&"function"!=typeof e&&null!=e)throw Error(y(85));this.updater.enqueueSetState(this,e,t,"setState")},w.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},k.prototype=w.prototype;var S=_.prototype=new k;S.constructor=_,r(S,w.prototype),S.isPureReactComponent=!0;var A={current:null},C={current:null},T=Object.prototype.hasOwnProperty,P={key:!0,ref:!0,__self:!0,__source:!0};function L(e,t,i){var n,r={},a=null,s=null;if(null!=t)for(n in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)T.call(t,n)&&!P.hasOwnProperty(n)&&(r[n]=t[n]);var l=arguments.length-2;if(1===l)r.children=i;else if(1<l){for(var c=Array(l),h=0;h<l;h++)c[h]=arguments[h+2];r.children=c}if(e&&e.defaultProps)for(n in l=e.defaultProps)void 0===r[n]&&(r[n]=l[n]);return{$$typeof:o,type:e,key:a,ref:s,props:r,_owner:C.current}}function E(e){return"object"===n(e)&&null!==e&&e.$$typeof===o}var M=/\/+/g,O=[];function I(e,t,i,n){if(O.length){var r=O.pop();return r.result=e,r.keyPrefix=t,r.func=i,r.context=n,r.count=0,r}return{result:e,keyPrefix:t,func:i,context:n,count:0}}function D(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>O.length&&O.push(e)}function z(e,t,i){return null==e?0:function e(t,i,r,a){var l=n(t);"undefined"!==l&&"boolean"!==l||(t=null);var c=!1;if(null===t)c=!0;else switch(l){case"string":case"number":c=!0;break;case"object":switch(t.$$typeof){case o:case s:c=!0}}if(c)return r(a,t,""===i?"."+N(t,0):i),1;if(c=0,i=""===i?".":i+":",Array.isArray(t))for(var h=0;h<t.length;h++){var d=i+N(l=t[h],h);c+=e(l,d,r,a)}else if(null===t||"object"!==n(t)?d=null:d="function"==typeof(d=v&&t[v]||t["@@iterator"])?d:null,"function"==typeof d)for(t=d.call(t),h=0;!(l=t.next()).done;)c+=e(l=l.value,d=i+N(l,h++),r,a);else if("object"===l)throw r=""+t,Error(y(31,"[object Object]"===r?"object with keys {"+Object.keys(t).join(", ")+"}":r,""));return c}(e,"",t,i)}function N(e,t){return"object"===n(e)&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,(function(e){return t[e]}))}(e.key):t.toString(36)}function R(e,t){e.func.call(e.context,t,e.count++)}function F(e,t,i){var n=e.result,r=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?H(e,n,i,(function(e){return e})):null!=e&&(E(e)&&(e=function(e,t){return{$$typeof:o,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(e,r+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(M,"$&/")+"/")+i)),n.push(e))}function H(e,t,i,n,r){var a="";null!=i&&(a=(""+i).replace(M,"$&/")+"/"),z(e,F,t=I(t,a,n,r)),D(t)}function Y(){var e=A.current;if(null===e)throw Error(y(321));return e}var j={Children:{map:function(e,t,i){if(null==e)return e;var n=[];return H(e,n,null,t,i),n},forEach:function(e,t,i){if(null==e)return e;z(e,R,t=I(null,null,t,i)),D(t)},count:function(e){return z(e,(function(){return null}),null)},toArray:function(e){var t=[];return H(e,t,null,(function(e){return e})),t},only:function(e){if(!E(e))throw Error(y(143));return e}},createRef:function(){return{current:null}},Component:w,PureComponent:_,createContext:function(e,t){return void 0===t&&(t=null),(e={$$typeof:u,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:d,_context:e},e.Consumer=e},forwardRef:function(e){return{$$typeof:p,render:e}},lazy:function(e){return{$$typeof:m,_ctor:e,_status:-1,_result:null}},memo:function(e,t){return{$$typeof:g,type:e,compare:void 0===t?null:t}},useCallback:function(e,t){return Y().useCallback(e,t)},useContext:function(e,t){return Y().useContext(e,t)},useEffect:function(e,t){return Y().useEffect(e,t)},useImperativeHandle:function(e,t,i){return Y().useImperativeHandle(e,t,i)},useDebugValue:function(){},useLayoutEffect:function(e,t){return Y().useLayoutEffect(e,t)},useMemo:function(e,t){return Y().useMemo(e,t)},useReducer:function(e,t,i){return Y().useReducer(e,t,i)},useRef:function(e){return Y().useRef(e)},useState:function(e){return Y().useState(e)},Fragment:l,Profiler:h,StrictMode:c,Suspense:f,createElement:L,cloneElement:function(e,t,i){if(null==e)throw Error(y(267,e));var n=r({},e.props),a=e.key,s=e.ref,l=e._owner;if(null!=t){if(void 0!==t.ref&&(s=t.ref,l=C.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(h in t)T.call(t,h)&&!P.hasOwnProperty(h)&&(n[h]=void 0===t[h]&&void 0!==c?c[h]:t[h])}var h=arguments.length-2;if(1===h)n.children=i;else if(1<h){c=Array(h);for(var d=0;d<h;d++)c[d]=arguments[d+2];n.children=c}return{$$typeof:o,type:e.type,key:a,ref:s,props:n,_owner:l}},createFactory:function(e){var t=L.bind(null,e);return t.type=e,t},isValidElement:E,version:"16.12.0",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentDispatcher:A,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:C,IsSomeRendererActing:{current:!1},assign:r}},$={default:j},X=$&&j||$;e.exports=X.default||X},function(e,t,i){"use strict";
45
+ /*
46
+ object-assign
47
+ (c) Sindre Sorhus
48
+ @license MIT
49
+ */var n=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},i=0;i<10;i++)t["_"+String.fromCharCode(i)]=i;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var i,s,l=o(e),c=1;c<arguments.length;c++){for(var h in i=Object(arguments[c]))r.call(i,h)&&(l[h]=i[h]);if(n){s=n(i);for(var d=0;d<s.length;d++)a.call(i,s[d])&&(l[s[d]]=i[s[d]])}}return l}},function(e,t,i){e.exports=i(39)()},function(e,t,i){"use strict";var n=i(40);function r(){}function a(){}a.resetWarningCache=r,e.exports=function(){function e(e,t,i,r,a,o){if(o!==n){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var i={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:r};return i.PropTypes=i,i}},function(e,t,i){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,i){var n=i(12);
50
+ /*!
51
+ *
52
+ * plugins/ranges.js
53
+ * Litepicker v2.0.11 (https://github.com/wakirin/Litepicker)
54
+ * Package: litepicker (https://www.npmjs.com/package/litepicker)
55
+ * License: MIT (https://github.com/wakirin/Litepicker/blob/master/LICENCE.md)
56
+ * Copyright 2019-2021 Rinat G.
57
+ *
58
+ * Hash: 277f45be8f40444f8bed
59
+ *
60
+ */!function(e){var t={};function i(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==n(e)&&e&&e.__esModule)return e;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)i.d(r,a,function(t){return e[t]}.bind(null,a));return r},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=8)}([function(e,t,i){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var i=function(e,t){var i,n,r,a=e[1]||"",o=e[3];if(!o)return a;if(t&&"function"==typeof btoa){var s=(i=o,n=btoa(unescape(encodeURIComponent(JSON.stringify(i)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(n),"/*# ".concat(r," */")),l=o.sources.map((function(e){return"/*# sourceURL=".concat(o.sourceRoot||"").concat(e," */")}));return[a].concat(l).concat([s]).join("\n")}return[a].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(i,"}"):i})).join("")},t.i=function(e,i,n){"string"==typeof e&&(e=[[null,e,""]]);var r={};if(n)for(var a=0;a<this.length;a++){var o=this[a][0];null!=o&&(r[o]=!0)}for(var s=0;s<e.length;s++){var l=[].concat(e[s]);n&&r[l[0]]||(i&&(l[2]?l[2]="".concat(i," and ").concat(l[2]):l[2]=i),t.push(l))}},t}},function(e,t,i){"use strict";var r,a={},o=function(){var e={};return function(t){if(void 0===e[t]){var i=document.querySelector(t);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(e){i=null}e[t]=i}return e[t]}}();function s(e,t){for(var i=[],n={},r=0;r<e.length;r++){var a=e[r],o=t.base?a[0]+t.base:a[0],s={css:a[1],media:a[2],sourceMap:a[3]};n[o]?n[o].parts.push(s):i.push(n[o]={id:o,parts:[s]})}return i}function l(e,t){for(var i=0;i<e.length;i++){var n=e[i],r=a[n.id],o=0;if(r){for(r.refs++;o<r.parts.length;o++)r.parts[o](n.parts[o]);for(;o<n.parts.length;o++)r.parts.push(m(n.parts[o],t))}else{for(var s=[];o<n.parts.length;o++)s.push(m(n.parts[o],t));a[n.id]={id:n.id,refs:1,parts:s}}}}function c(e){var t=document.createElement("style");if(void 0===e.attributes.nonce){var n=i.nc;n&&(e.attributes.nonce=n)}if(Object.keys(e.attributes).forEach((function(i){t.setAttribute(i,e.attributes[i])})),"function"==typeof e.insert)e.insert(t);else{var r=o(e.insert||"head");if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(t)}return t}var h,d=(h=[],function(e,t){return h[e]=t,h.filter(Boolean).join("\n")});function u(e,t,i,n){var r=i?"":n.css;if(e.styleSheet)e.styleSheet.cssText=d(t,r);else{var a=document.createTextNode(r),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(a,o[t]):e.appendChild(a)}}function p(e,t,i){var n=i.css,r=i.media,a=i.sourceMap;if(r&&e.setAttribute("media",r),a&&btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}var f=null,g=0;function m(e,t){var i,n,r;if(t.singleton){var a=g++;i=f||(f=c(t)),n=u.bind(null,i,a,!1),r=u.bind(null,i,a,!0)}else i=c(t),n=p.bind(null,i,t),r=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(i)};return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else r()}}e.exports=function(e,t){(t=t||{}).attributes="object"==n(t.attributes)?t.attributes:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=(void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r));var i=s(e,t);return l(i,t),function(e){for(var n=[],r=0;r<i.length;r++){var o=i[r],c=a[o.id];c&&(c.refs--,n.push(c))}e&&l(s(e,t),t);for(var h=0;h<n.length;h++){var d=n[h];if(0===d.refs){for(var u=0;u<d.parts.length;u++)d.parts[u]();delete a[d.id]}}}}},,,,,,,function(e,t,i){"use strict";function n(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function r(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?n(Object(i),!0).forEach((function(t){a(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):n(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function a(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}i.r(t),i(9),Litepicker.add("ranges",{init:function(e){var t={position:"left",customRanges:{},force:!1,autoApply:e.options.autoApply};if(e.options.ranges=r(r({},t),e.options.ranges),e.options.singleMode=!1,!Object.keys(e.options.ranges.customRanges).length){var i=e.DateTime();e.options.ranges.customRanges={Today:[i.clone(),i.clone()],Yesterday:[i.clone().subtract(1,"day"),i.clone().subtract(1,"day")],"Last 7 Days":[i.clone().subtract(6,"day"),i],"Last 30 Days":[i.clone().subtract(29,"day"),i],"This Month":function(e){var t=e.clone();return t.setDate(1),[t,new Date(e.getFullYear(),e.getMonth()+1,0)]}(i),"Last Month":function(e){var t=e.clone();return t.setDate(1),t.setMonth(e.getMonth()-1),[t,new Date(e.getFullYear(),e.getMonth(),0)]}(i)}}var n=e.options.ranges;e.on("render",(function(t){var i=document.createElement("div");i.className="container__predefined-ranges",e.ui.dataset.rangesPosition=n.position,Object.keys(n.customRanges).forEach((function(r){var a=n.customRanges[r],o=document.createElement("button");o.innerText=r,o.tabIndex=t.dataset.plugins.indexOf("keyboardnav")>=0?1:-1,o.dataset.start=a[0].getTime(),o.dataset.end=a[1].getTime(),o.addEventListener("click",(function(t){var i=t.target;if(i){var r=e.DateTime(Number(i.dataset.start)),a=e.DateTime(Number(i.dataset.end));n.autoApply?(e.setDateRange(r,a,n.force),e.emit("ranges.selected",r,a),e.hide()):(e.datePicked=[r,a],e.emit("ranges.preselect",r,a)),!e.options.inlineMode&&n.autoApply||e.gotoDate(r)}})),i.appendChild(o)})),t.querySelector(".container__main").prepend(i)}))}})},function(e,t,i){var n=i(10);"string"==typeof n&&(n=[[e.i,n,""]]);var r={insert:function(e){var t=document.querySelector("head"),i=window._lastElementInsertedByStyleLoader;window.disableLitepickerStyles||(i?i.nextSibling?t.insertBefore(e,i.nextSibling):t.appendChild(e):t.insertBefore(e,t.firstChild),window._lastElementInsertedByStyleLoader=e)},singleton:!1};i(1)(n,r),n.locals&&(e.exports=n.locals)},function(e,t,i){(t=i(0)(!1)).push([e.i,'.litepicker[data-plugins*="ranges"] > .container__main > .container__predefined-ranges {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n background: var(--litepicker-container-months-color-bg);\n box-shadow: -2px 0px 5px var(--litepicker-footer-box-shadow-color);\n border-radius: 3px;\n}\n.litepicker[data-plugins*="ranges"][data-ranges-position="left"] > .container__main {\n /* */\n}\n.litepicker[data-plugins*="ranges"][data-ranges-position="right"] > .container__main{\n flex-direction: row-reverse;\n}\n.litepicker[data-plugins*="ranges"][data-ranges-position="right"] > .container__main > .container__predefined-ranges {\n box-shadow: 2px 0px 2px var(--litepicker-footer-box-shadow-color);\n}\n.litepicker[data-plugins*="ranges"][data-ranges-position="top"] > .container__main {\n flex-direction: column;\n}\n.litepicker[data-plugins*="ranges"][data-ranges-position="top"] > .container__main > .container__predefined-ranges {\n flex-direction: row;\n box-shadow: 2px 0px 2px var(--litepicker-footer-box-shadow-color);\n}\n.litepicker[data-plugins*="ranges"][data-ranges-position="bottom"] > .container__main {\n flex-direction: column-reverse;\n}\n.litepicker[data-plugins*="ranges"][data-ranges-position="bottom"] > .container__main > .container__predefined-ranges {\n flex-direction: row;\n box-shadow: 2px 0px 2px var(--litepicker-footer-box-shadow-color);\n}\n.litepicker[data-plugins*="ranges"] > .container__main > .container__predefined-ranges button {\n padding: 5px;\n margin: 2px 0;\n}\n.litepicker[data-plugins*="ranges"][data-ranges-position="left"] > .container__main > .container__predefined-ranges button,\n.litepicker[data-plugins*="ranges"][data-ranges-position="right"] > .container__main > .container__predefined-ranges button{\n width: 100%;\n text-align: left;\n}\n.litepicker[data-plugins*="ranges"] > .container__main > .container__predefined-ranges button:hover {\n cursor: default;\n opacity: .6;\n}',""]),e.exports=t}])},function(e,t,i){var n=i(43);e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,n(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function i(t,n){return e.exports=i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,i(t,n)}e.exports=i,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,i){"use strict";
61
+ /** @license React v17.0.2
62
+ * react.production.min.js
63
+ *
64
+ * Copyright (c) Facebook, Inc. and its affiliates.
65
+ *
66
+ * This source code is licensed under the MIT license found in the
67
+ * LICENSE file in the root directory of this source tree.
68
+ */var n=i(23),r=i(45),a=60103,o=60106;t.Fragment=60107,t.StrictMode=60108,t.Profiler=60114;var s=60109,l=60110,c=60112;t.Suspense=60113;var h=60115,d=60116;if("function"==typeof Symbol&&Symbol.for){var u=Symbol.for;a=u("react.element"),o=u("react.portal"),t.Fragment=u("react.fragment"),t.StrictMode=u("react.strict_mode"),t.Profiler=u("react.profiler"),s=u("react.provider"),l=u("react.context"),c=u("react.forward_ref"),t.Suspense=u("react.suspense"),h=u("react.memo"),d=u("react.lazy")}var p="function"==typeof Symbol&&Symbol.iterator;function f(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,i=1;i<arguments.length;i++)t+="&args[]="+encodeURIComponent(arguments[i]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m={};function v(e,t,i){this.props=e,this.context=t,this.refs=m,this.updater=i||g}function y(){}function b(e,t,i){this.props=e,this.context=t,this.refs=m,this.updater=i||g}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if("object"!==n(e)&&"function"!=typeof e&&null!=e)throw Error(f(85));this.updater.enqueueSetState(this,e,t,"setState")},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=v.prototype;var x=b.prototype=new y;x.constructor=b,r(x,v.prototype),x.isPureReactComponent=!0;var w={current:null},k=Object.prototype.hasOwnProperty,_={key:!0,ref:!0,__self:!0,__source:!0};function S(e,t,i){var n,r={},o=null,s=null;if(null!=t)for(n in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(o=""+t.key),t)k.call(t,n)&&!_.hasOwnProperty(n)&&(r[n]=t[n]);var l=arguments.length-2;if(1===l)r.children=i;else if(1<l){for(var c=Array(l),h=0;h<l;h++)c[h]=arguments[h+2];r.children=c}if(e&&e.defaultProps)for(n in l=e.defaultProps)void 0===r[n]&&(r[n]=l[n]);return{$$typeof:a,type:e,key:o,ref:s,props:r,_owner:w.current}}function A(e){return"object"===n(e)&&null!==e&&e.$$typeof===a}var C=/\/+/g;function T(e,t){return"object"===n(e)&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function P(e,t,i,r,s){var l=n(e);"undefined"!==l&&"boolean"!==l||(e=null);var c=!1;if(null===e)c=!0;else switch(l){case"string":case"number":c=!0;break;case"object":switch(e.$$typeof){case a:case o:c=!0}}if(c)return s=s(c=e),e=""===r?"."+T(c,0):r,Array.isArray(s)?(i="",null!=e&&(i=e.replace(C,"$&/")+"/"),P(s,t,i,"",(function(e){return e}))):null!=s&&(A(s)&&(s=function(e,t){return{$$typeof:a,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(s,i+(!s.key||c&&c.key===s.key?"":(""+s.key).replace(C,"$&/")+"/")+e)),t.push(s)),1;if(c=0,r=""===r?".":r+":",Array.isArray(e))for(var h=0;h<e.length;h++){var d=r+T(l=e[h],h);c+=P(l,t,i,d,s)}else if("function"==typeof(d=function(e){return null===e||"object"!==n(e)?null:"function"==typeof(e=p&&e[p]||e["@@iterator"])?e:null}(e)))for(e=d.call(e),h=0;!(l=e.next()).done;)c+=P(l=l.value,t,i,d=r+T(l,h++),s);else if("object"===l)throw t=""+e,Error(f(31,"[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t));return c}function L(e,t,i){if(null==e)return e;var n=[],r=0;return P(e,n,"","",(function(e){return t.call(i,e,r++)})),n}function E(e){if(-1===e._status){var t=e._result;t=t(),e._status=0,e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}if(1===e._status)return e._result;throw e._result}var M={current:null};function O(){var e=M.current;if(null===e)throw Error(f(321));return e}var I={ReactCurrentDispatcher:M,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:w,IsSomeRendererActing:{current:!1},assign:r};t.Children={map:L,forEach:function(e,t,i){L(e,(function(){t.apply(this,arguments)}),i)},count:function(e){var t=0;return L(e,(function(){t++})),t},toArray:function(e){return L(e,(function(e){return e}))||[]},only:function(e){if(!A(e))throw Error(f(143));return e}},t.Component=v,t.PureComponent=b,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=I,t.cloneElement=function(e,t,i){if(null==e)throw Error(f(267,e));var n=r({},e.props),o=e.key,s=e.ref,l=e._owner;if(null!=t){if(void 0!==t.ref&&(s=t.ref,l=w.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(h in t)k.call(t,h)&&!_.hasOwnProperty(h)&&(n[h]=void 0===t[h]&&void 0!==c?c[h]:t[h])}var h=arguments.length-2;if(1===h)n.children=i;else if(1<h){c=Array(h);for(var d=0;d<h;d++)c[d]=arguments[d+2];n.children=c}return{$$typeof:a,type:e.type,key:o,ref:s,props:n,_owner:l}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:l,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:s,_context:e},e.Consumer=e},t.createElement=S,t.createFactory=function(e){var t=S.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:c,render:e}},t.isValidElement=A,t.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:E}},t.memo=function(e,t){return{$$typeof:h,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return O().useCallback(e,t)},t.useContext=function(e,t){return O().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return O().useEffect(e,t)},t.useImperativeHandle=function(e,t,i){return O().useImperativeHandle(e,t,i)},t.useLayoutEffect=function(e,t){return O().useLayoutEffect(e,t)},t.useMemo=function(e,t){return O().useMemo(e,t)},t.useReducer=function(e,t,i){return O().useReducer(e,t,i)},t.useRef=function(e){return O().useRef(e)},t.useState=function(e){return O().useState(e)},t.version="17.0.2"},function(e,t,i){"use strict";
69
+ /*
70
+ object-assign
71
+ (c) Sindre Sorhus
72
+ @license MIT
73
+ */var n=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},i=0;i<10;i++)t["_"+String.fromCharCode(i)]=i;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:f