1(self["webpackChunktherapeute"]=self["webpackChunktherapeute"]||[]).push([[9161],{82479:function(t,e,i){"use strict";i.r(e),i.d(e,{default:function(){return Eo}});var s=function(){var t=this,e=t._self._c;return e("div",[e("div",{staticClass:"is-fullheight accueil"},[e("div",[t.DisplayFolders?e("div",{staticClass:"overflow2"},[e("folders-component",{attrs:{idPatientTherapeute:t.idPatientTherapeute,ParamJeu:t.ParamJeu,foldersBrique:t.foldersBrique,themes:t.themes,group:t.group,LinksOfUser:t.LinksOfUser},on:{"resource-click":t.handleResourceSelection,unlockProtocol:t.unlockProtocol,goAbonnement:t.goAbonnement,"upgrade-requested":t.upgradeAccount,linkUser:t.linkUser,isLoadingActivitySpace:t.isLoadingActivitySpace,CloseMenuUser:t.CloseMenuUser}})],1):e("div",{staticClass:"ressources-brique-root"},[e("div",{staticClass:"skeleton-carousel-block"},[e("div",{staticClass:"skeleton-carousel-title"}),e("div",{staticClass:"skeleton-carousel-items"},t._l(6,function(t){return e("div",{key:t,staticClass:"skeleton-carousel-item"})}),0)])])])])])},a=[],n=i(36727),o=i(44388),r=i.n(o),l=i(38078),h=i(95353),c=i(88055),d=i.n(c),u=function(){var t=this,e=t._self._c;return e("div",{ref:"element",staticClass:"ressources-brique-root"},[e("div",[e("div",[e("transition",{attrs:{name:"slide-fade"}},[t.showNotification?e("div",{staticClass:"notification-container2"},[e("div",{staticClass:"notification-box"},[e("button",{staticClass:"notification-close",on:{click:t.closeNotification}},[t._v(" à ")]),e("div",{staticClass:"notification-text"},[t._v("Exercice terminé")])])]):t._e()])],1),t._l(t.themes,function(i){return[3===i.attributes.ordre?e("div",[e("CarouselFolders",{key:t.keyCarousel,attrs:{folderBrique:t.getFoldersByTheme(i.id),name:"Ressources libres",idPatientTherapeute:t.idPatientTherapeute,LinksOfUser:t.LinksOfUser},on:{recupId:t.handleRecupId,"resource-click":t.handleResourceClick,linkUser:t.linkUser,isLoadingActivitySpace:t.isLoadingActivitySpace}})],1):t._e(),t.showModalSubscription?e("div",{key:t.indexPopUpAbonnement},[e("subscriptionPopUp",{on:{close:t.closeModalSubscription}})],1):t._e()]}),"4ydeuBgcuu"===t.idBrique?e("div",{staticStyle:{display:"flex","justify-content":"center","margin-top":"1.5rem","margin-bottom":"1.5rem"}},[e("button",{staticClass:"premium-review-btn",on:{click:function(e){return t.openSuivi()}}},[e("i",{staticClass:"fas fa-chart-line"}),t._v(" Revoir mes résultats ")])]):t._e(),"v53Vfs19Me"===t.idBrique?e("div",{staticStyle:{display:"flex","justify-content":"center","margin-top":"1.5rem","margin-bottom":"1.5rem"}},[e("button",{staticClass:"premium-review-btn",on:{click:function(e){return t.openSuiviAni()}}},[e("i",{staticClass:"fas fa-chart-line"}),t._v(" Revoir mes résultats ")])]):t._e(),t.DisplayResult?e("div",{staticClass:"div-relecture-libre"},[t.displaySuiviData?e("relectureUser",{attrs:{RelectureRessourcesLibres:t.RelectureRessourcesLibres,filesDones:t.suiviData,selectedUser:t.selectedUser,isForRessourcesLibres:!0}}):e("div",{staticClass:"loader-detail-relecture"})],1):t._e(),t.showRelectureAni?e("div",{staticClass:"DivRelectureLibre"},[e("relectureAni")],1):t._e(),"v53Vfs19Me"===t.idBrique?e("div",{attrs:{id:"SeanceLocalisation"}},[e("new-ani-chart",{staticClass:"exercise-list",attrs:{idPatientTherapeute:t.idPatientTherapeute},on:{save:t.handleAniSave}})],1):t._e(),t.loadingSeance?e("div",{staticClass:"skeleton-seance-list"},t._l(3,function(i){return e("div",{key:i,staticClass:"skeleton-session-item"},[t._m(0,!0)])}),0):t.idBrique&&t.links.length>0&&!t.loadingSeance?e("SeanceList",{key:t.KeyButton,attrs:{links:t.links,idProtocol:t.idBrique,idPatientTherapeute:t.idPatientTherapeute},on:{execiseCompleted:t.refreshProtocol,"upgrade-requested":t.upgradeAccount}}):t._e()],2)])},p=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"skeleton-session-main"},[e("div",{staticClass:"skeleton-icon"}),e("div",{staticClass:"skeleton-text-block"},[e("div",{staticClass:"skeleton-title"}),e("div",{staticClass:"skeleton-subtitle"})])])}],g=i(29547),m=function(){var t=this,e=t._self._c;return e("div",{ref:"mainArea",staticClass:"ani-modern-shell",class:{"ani-modern-shell--fullscreen":t.isFullscreenActive}},[e("section",{staticClass:"ani-layout"},[e("main",{staticClass:"ani-main"},[e("div",{staticClass:"ani-main__control-row"},[e("AniControlLine",{attrs:{seconds:t.elapsedSeconds,fullscreen:t.isFullscreenActive,status:t.status}
1,on:{"toggle-comment":function(e){t.showCommentModal=!0},"toggle-fullscreen":t.toggleFullscreen,start:t.startSession,pause:t.pauseSession,resume:t.resumeSession,stop:t.finishSession}})],1),e("AniChart",{attrs:{points:t.chartPoints,windowSize:t.windowSize},on:{"update-window-size":function(e){t.windowSize=e}}}),e("div",{staticClass:"ani-average-wrap"},[e("AniAverageBar",{attrs:{value:t.aniAverage,title:"Indice de lâcher prise"}})],1)],1)]),t.showCommentModal?e("div",{staticClass:"note-modal-overlay",on:{click:function(e){if(e.target!==e.currentTarget)return null;t.showCommentModal=!1}}},[e("div",{staticClass:"note-modal",attrs:{role:"dialog","aria-modal":"true"}},[e("div",{staticClass:"note-modal-header"},[e("h3",{staticClass:"note-modal-title"},[t._v("Note d'exercice")]),e("button",{staticClass:"note-modal-close",attrs:{type:"button"},on:{click:function(e){t.showCommentModal=!1}}},[e("i",{staticClass:"fas fa-times"})])]),e("textarea",{directives:[{name:"model",rawName:"v-model",value:t.comment,expression:"comment"}],staticClass:"note-modal-textarea",attrs:{placeholder:"Ajoutez une note clinique ou un ressenti..."},domProps:{value:t.comment},on:{input:function(e){e.target.composing||(t.comment=e.target.value)}}}),e("div",{staticClass:"note-modal-actions"},[e("button",{staticClass:"footer-close-button",attrs:{type:"button"},on:{click:function(e){t.showCommentModal=!1}}},[t._v(" Enregistrer ")])])])]):t._e(),e("AniReplayModal",{attrs:{visible:t.showReplay,summary:t.replaySummary,comment:t.comment,points:t.allChartPoints},on:{close:t.closeReplay,save:t.saveReplay,"update-comment":function(e){t.comment=e}}})],1)},_=[],v=i(46247),f=function(){var t=this,e=t._self._c;return e("div",{staticClass:"ani-control-line"},[e("div",{staticClass:"ani-control-line__left"},[e("div",{staticClass:"ani-control-line__timer"},[e("i",{staticClass:"far fa-clock timer-icon"}),e("span",[t._v(t._s(t.formattedTime))])])]),e("div",{staticClass:"ani-control-line__actions"},[e("button",{staticClass:"ani-btn-action ani-btn-action--secondary",attrs:{type:"button",title:"Ajouter une note clinique"},on:{click:function(e){return t.$emit("toggle-comment")}}},[e("i",{staticClass:"fas fa-comment-dots"})]),e("button",{staticClass:"ani-btn-action ani-btn-action--secondary",attrs:{type:"button",title:t.fullscreen?"Quitter le plein écran":"Plein écran"},on:{click:function(e){return t.$emit("toggle-fullscreen")}}},[e("i",{class:t.fullscreen?"fas fa-compress":"fas fa-expand"})]),e("button",{staticClass:"ani-btn-action ani-btn-action--secondary",attrs:{type:"button",disabled:!t.canPause&&!t.canResume,title:t.playPauseLabel},on:{click:t.handlePlayPause}},[e("i",{class:t.playPauseIcon})]),e("button",{staticClass:"ani-btn-action",class:{"ani-btn-action--danger":t.canStop,"ani-btn-action--primary":!t.canStop},attrs:{type:"button",disabled:!t.canStart&&!t.canStop,title:t.startStopLabel},on:{click:t.handleStartStop}},[e("i",{class:t.startStopIcon})])])])},y=[],x={name:"AniControlLine",props:{windowSize:{type:Number,default:120},seconds:{type:Number,default:0},fullscreen:{type:Boolean,default:!1},status:{type:String,default:"idle"}},computed:{canStart(){return"idle"===this.status||"finished"===this.status},canStop(){return"running"===this.status||"paused"===this.status},canPause(){return"running"===this.status},canResume(){return"paused"===this.status},startStopIcon(){return this.canStop?"fas fa-stop":"fas fa-play"},startStopLabel(){return this.canStop?"Arrêter l'exercice":"Démarrer l'exercice"},playPauseIcon(){return"running"===this.status?"fas fa-pause":"paused"===this.status?"fas fa-play":"fas fa-pause"},playPauseLabel(){return"running"===this.status?"Mettre en pause":"paused"===this.status?"Reprendre l'exercice":"Mettre en pause"},formattedTime(){const t=Math.max(0,Number(this.seconds)||0),e=Math.floor(t/60),i=String(t%60).padStart(2,"0");return`${String(e).padStart(2,"0")}:${i}`}},methods:{onWindowChange(t){this.$emit("update-window-size",Number(t.target.value))},handleStartStop(){this.canStop?this.$emit("stop"):this.canStart&&this.$emit("start")},handlePlayPause(){this.canPause?this.$emit("pause"):this.canResume&&this.$emit("resume")}}},b=x,w=i(81656),C=(0,w.A)(b,f,y,!1,null,"42e1d5ba",null),k=C.exports,D=function(){var t=this,e=t._self._c;return e("transition",{attrs:{name:"fade-zoom"}},[t.visible?e("div",{staticClass:"premium-modal-overlay",on:{click:function(e){return e.target!==e.currentTarget?null:t.$emit("close")}}},[e("div",{staticClass:"premium-modal-card"},[e("div",{staticClass:"premium-modal-header"},[e("div",{staticClass:"premium-modal-title-group"}
1,[e("span",{staticClass:"premium-eyebrow"},[t._v("Relecture")]),e("h2",{staticClass:"premium-title"},[t._v("Résumé de session ILP")])]),e("button",{staticClass:"premium-close-btn",attrs:{type:"button"},on:{click:function(e){return t.$emit("close")}}},[t._v(" à ")])]),e("div",{staticClass:"premium-modal-body"},[e("div",{staticClass:"premium-toolbar"},[e("div",{staticClass:"premium-toggles"},[e("button",{staticClass:"premium-toggle",class:{"is-active":t.seriesVisibility.average},attrs:{type:"button"},on:{click:function(e){return t.toggleSeries("average")}}},[e("span",{staticClass:"legend-dot avg"}),t._v(" ILP moyenné ")]),e("button",{staticClass:"premium-toggle",class:{"is-active":t.seriesVisibility.instant},attrs:{type:"button"},on:{click:function(e){return t.toggleSeries("instant")}}},[e("span",{staticClass:"legend-dot inst"}),t._v(" ILP instantané ")]),e("button",{staticClass:"premium-toggle",class:{"is-active":t.seriesVisibility.bpm},attrs:{type:"button"},on:{click:function(e){return t.toggleSeries("bpm")}}},[e("span",{staticClass:"legend-dot bpm"}),t._v(" BPM ")])])]),e("div",{staticClass:"premium-chart-container"},[e("div",{ref:"chartContainer",staticClass:"echarts-wrapper"})]),e("div",{staticClass:"premium-stats-grid"},[e("div",{staticClass:"stat-card"},[e("span",{staticClass:"stat-label"},[t._v("ILP moyen")]),e("strong",{staticClass:"stat-value"},[t._v(t._s(t.summary.aniAverage))])]),e("div",{staticClass:"stat-card"},[e("span",{staticClass:"stat-label"},[t._v("BPM moyen")]),e("strong",{staticClass:"stat-value"},[t._v(t._s(t.summary.bpmAverage))])]),e("div",{staticClass:"stat-card"},[e("span",{staticClass:"stat-label"},[t._v("Durée")]),e("strong",{staticClass:"stat-value"},[t._v(t._s(t.formatDuration(t.summary.duration)))])])]),e("div",{staticClass:"premium-comment-section"},[e("label",{staticClass:"premium-label",attrs:{for:"ani-comment"}},[t._v("Commentaire clinique")]),e("textarea",{staticClass:"premium-textarea",attrs:{id:"ani-comment",placeholder:"Ajouter une note clinique ou un ressenti sur cette session..."},domProps:{value:t.comment},on:{input:function(e){return t.$emit("update-comment",e.target.value)}}})])]),e("div",{staticClass:"premium-modal-footer"},[e("button",{staticClass:"premium-btn-secondary",attrs:{type:"button"},on:{click:function(e){return t.$emit("close")}}},[t._v(" Annuler ")]),e("button",{staticClass:"premium-btn-primary",attrs:{type:"button"},on:{click:function(e){return t.$emit("save")}}},[t._v(" Sauvegarder l'exercice ")])])])]):t._e()])},T=[],P=i(749),A=i(41303),S={name:"AniReplayModal",props:{visible:{type:Boolean,default:!1},summary:{type:Object,default:()=>({aniAverage:0,bpmAverage:0,duration:0,calibration:60})},comment:{type:String,default:""},points:{type:Array,default:()=>[]}},data(){return{chart:null,seriesVisibility:{average:!0,instant:!0,bpm:!0}}},watch:{visible(t){t&&this.$nextTick(()=>{this.initChart(),this.renderChart()})},points(){this.visible&&this.chart&&this.renderChart()},seriesVisibility:{handler(){this.renderChart()},deep:!0}},methods:{toggleSeries(t){this.seriesVisibility[t]=!this.seriesVisibility[t]},initChart(){this.chart&&this.chart.dispose();const t=this.$refs.chartContainer;t&&(this.chart=P.Ts(t))},formatTime(t){const e=Math.max(0,Math.round(Number(t)||0)),i=Math.floor(e/60),s=e%60;return`${i.toString().padStart(2,"0")}:${s.toString().padStart(2,"0")}`},formatDuration(t){const e=Math.max(0,Math.round(Number(t)||0)),i=Math.floor(e/3600),s=Math.floor(e%3600/60),a=e%60;return i>0?`${i}h${s.toString().padStart(2,"0")}`:s>0?`${s}m${a.toString().padStart(2,"0")}`:`${a}s`},renderChart(){if(!this.chart||0===this.points.length)return;const t=this.points.map(t=>({elapsed:Number(t.elapsed)||0,ani:Number(t.ani)||0,average:Number(t.average)||0,bpm:Number(t.bpm)||0})).sort((t,e)=>t.elapsed-e.elapsed),e=t.map(t=>[t.elapsed,t.ani]),i=t.map(t=>[t.elapsed,t.average]),s=t.map(t=>[t.elapsed,t.bpm]),a=this.seriesVisibility.average?i:[],n=this.seriesVisibility.instant?e:[],o=this.seriesVisibility.bpm?s:[];this.chart.setOption({backgroundColor:"transparent",grid:{top:20,left:36,right:18,bottom:24,containLabel:!1},tooltip:{trigger:"axis",confine:!0,backgroundColor:"rgba(255, 255, 255, 0.96)",borderColor:"#e5e7eb",borderWidth:1,padding:[8,12],textStyle:{color:"#1f2937",fontFamily:A.iw.fontFamily,fontSize:12},axisPointer:{type:"line",snap:!0,lineStyle:{color:A.iw.muted,width:1,type:"dashed"}},formatter:t=>{if(!t||0===t.length)return"";const e=this.formatTime(t[0].data[0]),i=t.filter(t=>t&&t.data).map(t=>{const e=Math.round(t.data[1]);return`\n <div style="display:flex; align-items:center; justify-content:space-between; gap:10px;">\n <div style="display:flex; align-items:center; gap:6px; min-width: 0;">
1\n <span style="display:inline-block; width:8px; height:8px; border-radius:50%; background-color:${t.color}; flex:0 0 auto;"></span>\n <span style="font-size:12px; color:#374151; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;">${t.seriesName}</span>\n </div>\n <span style="font-size:14px; font-weight:700; color:#111827;">${e}</span>\n </div>\n `}).join("");return`\n <div style="display:flex; flex-direction:column; gap:8px; min-width:180px;">\n <span style="font-size:11px; color:#6b7280; font-weight:500;">Temps : ${e}</span>\n ${i}\n </div>\n `}},xAxis:{type:"value",boundaryGap:!1,minInterval:1,axisLine:{show:!0,lineStyle:{color:"rgba(100,116,139,0.55)"}},axisTick:{show:!0},splitLine:{show:!1},axisLabel:{show:!0,formatter:t=>this.formatTime(t),color:A.iw.muted,fontSize:11,fontFamily:A.iw.fontFamily}},yAxis:{type:"value",min:0,max:150,axisLine:{show:!0,lineStyle:{color:"rgba(100,116,139,0.55)"}},axisTick:{show:!0},splitLine:{show:!0,lineStyle:{type:"dashed",color:A.iw.grid}},axisLabel:{color:A.iw.muted,fontSize:11,fontFamily:A.iw.fontFamily}},series:[{name:"ANI moyenné",type:"line",data:a,smooth:!0,showSymbol:!1,itemStyle:{color:A.iw.warning},lineStyle:{width:3,color:A.iw.warning},areaStyle:{color:"rgba(226, 198, 107, 0.14)"},animation:!1,z:3},{name:"ANI instantané",type:"line",data:n,smooth:!0,showSymbol:!1,itemStyle:{color:"rgba(226, 198, 107, 0.72)"},lineStyle:{width:2,type:"dashed",color:"rgba(226, 198, 107, 0.72)"},areaStyle:{color:"rgba(226, 198, 107, 0.04)"},animation:!1,z:2},{name:"BPM",type:"line",data:o,smooth:!0,showSymbol:!1,itemStyle:{color:"rgba(72, 145, 129, 0.78)"},lineStyle:{width:2,color:"rgba(72, 145, 129, 0.78)"},areaStyle:{color:"rgba(72, 145, 129, 0.05)"},animation:!1,z:1}]})}},beforeDestroy(){this.chart&&this.chart.dispose()}},M=S,E=(0,w.A)(M,D,T,!1,null,"2d0df469",null),I=E.exports,R=i(31683);function L(){return{status:"idle",isFullscreen:!1,isConnected:!1,sensorAvailable:!1,sensorLost:!1,isRunning:!1,isPaused:!1,isFinished:!1,elapsedSeconds:0,calibrationSeconds:60,aniInstant:0,aniAverage:0,bpmAverage:0,chartPoints:[],comment:""}}function F(t){return t.isFinished?"finished":t.isConnected&&t.sensorAvailable&&!t.sensorLost?t.isPaused?"paused":t.isRunning?"running":"idle":"sensorLost"}var B=i(65608),O={name:"AniOrchestrator",components:{AniChart:v.A,AniControlLine:k,AniReplayModal:I,AniAverageBar:R.A},data(){return{...L(),status:"idle",tickHandle:null,showReplay:!1,showCommentModal:!1,windowSize:120,symbioService:null,previewBuffer:[],allChartPoints:[],isFullscreenActive:!1,originalStyles:{},fullscreenElement:null,replaySummary:{aniAverage:0,bpmAverage:0,duration:0,calibration:60}}},computed:{statusLabel(){const t={idle:"En attente du signal",calibrating:"Calibration en cours",running:"Exercice en cours",paused:"Exercice en pause",sensorLost:"Capteur indisponible",finished:"Exercice terminé"};return t[this.status]||t.idle},sensorLabel(){return this.sensorLost?"Perdu":this.isConnected&&this.sensorAvailable?"Connecté":"En attente"}},created(){this.handleEscapeKeyBound=this.handleEscapeKey.bind(this),this.symbioService=(0,B.b)({onAniUpdate:this.handleAniUpdate,onConnectionChange:this.handleConnectionChange}),this.symbioService.connect()},methods:{syncStatus(){this.status=F(this)},handleConnectionChange(t){this.isConnected=!!t.isSocketConnected,this.sensorAvailable=!!t.hasSensorData,this.sensorLost=this.isConnected&&!this.sensorAvailable,this.syncStatus()},handleAniUpdate(t){this.sensorAvailable||(this.sensorAvailable=!0,this.sensorLost=!1,this.syncStatus());const e=Number(t.aniValue||t.ani||0),i=Number(t.bpm||0);if(this.aniInstant=e,!this.isRunning)return this.previewBuffer.push(e),this.previewBuffer.length>10&&this.previewBuffer.shift(),void(this.aniAverage=Math.round(this.previewBuffer.reduce((t,e)=>t+e,0)/Math.max(1,this.previewBuffer.length)));this.appendFrame({elapsed:this.elapsedSeconds,ani:e,bpm:i})},startSession(){this.elapsedSeconds=0,this.chartPoints=[],this.allChartPoints=[],this.aniAverage=0,this.bpmAverage=0,this.comment="",this.previewBuffer=[],this.aniInstant=0,this.isRunning=!0,this.isPaused=!1,this.isFinished=!1,this.syncStatus(),this.startTicker()},pauseSession(){this.isRunning&&(this.isPaused=!0,this.isRunning=!1,this.syncStatus(),this.stopTicker())},resumeSession(){this.isPaused&&(this.isPaused=!1,this.isRunning=!0,this.syncStatus(),this.startTicker())},finishSession(){this.isRunning=!1,this.isPaused=!1,this.isFinished=!0,this.syncStatus(),this.stopTicker();let t=0,e=0;if(this.allChartPoints.length>0){const i=this.allChartPoints.reduce((t,e)=>t+e.ani,0),s=this.allChartPoints.reduce((t,e)=>t+e.bpm,0);
1t=Math.round(i/this.allChartPoints.length),e=Math.round(s/this.allChartPoints.length)}else t=this.aniAverage,e=this.bpmAverage;const i={aniAverage:t,bpmAverage:e,duration:this.elapsedSeconds,calibration:this.calibrationSeconds},s=[...this.allChartPoints],a=this.comment;this.resetSession(),this.replaySummary=i,this.allChartPoints=s,this.comment=a,this.showReplay=!0},resetSession(){this.stopTicker();const t={isConnected:this.isConnected,sensorAvailable:this.sensorAvailable,sensorLost:this.sensorLost};Object.assign(this.$data,L(),{status:"idle",tickHandle:null,showReplay:!1,showCommentModal:!1,windowSize:120,previewBuffer:[],allChartPoints:[],isFullscreenActive:!1,originalStyles:{},fullscreenElement:null,...t}),this.syncStatus()},toggleFullscreen(){this.isFullscreenActive?this.exitCustomFullscreen():this.enterCustomFullscreen()},enterCustomFullscreen(){const t=this.$refs.mainArea;t&&(this.fullscreenElement=t,this.originalStyles={position:t.style.position,top:t.style.top,left:t.style.left,width:t.style.width,height:t.style.height,zIndex:t.style.zIndex},t.style.position="fixed",t.style.top="0",t.style.left="0",t.style.width="100vw",t.style.height="100vh",t.style.zIndex="9999",this.isFullscreenActive=!0,document.addEventListener("keydown",this.handleEscapeKeyBound))},exitCustomFullscreen(){const t=this.fullscreenElement;t&&(Object.assign(t.style,this.originalStyles),this.isFullscreenActive=!1,document.removeEventListener("keydown",this.handleEscapeKeyBound))},handleEscapeKey(t){"Escape"===t.key&&this.isFullscreenActive&&this.exitCustomFullscreen()},startTicker(){this.stopTicker(),this.tickHandle=window.setInterval(()=>{this.elapsedSeconds+=1},1e3)},stopTicker(){this.tickHandle&&(window.clearInterval(this.tickHandle),this.tickHandle=null)},appendFrame(t){const e=Number(t.ani)||0,i=Number(t.bpm)||0,s=Number.isFinite(Number(t.elapsed))?Number(t.elapsed):this.elapsedSeconds,a=this.chartPoints.map(t=>Number(t.ani)||0),n=this.chartPoints.map(t=>Number(t.bpm)||0),o=a.concat(e),r=n.concat(i),l=Math.round(o.reduce((t,e)=>t+e,0)/Math.max(1,o.length)),h=Math.round(r.reduce((t,e)=>t+e,0)/Math.max(1,r.length)),c={elapsed:s,ani:e,average:l,bpm:i};if(this.chartPoints.length>0&&this.chartPoints[this.chartPoints.length-1].elapsed===s){const t=this.chartPoints.slice();t[t.length-1]=c,this.chartPoints=t;const e=this.allChartPoints.slice();e[e.length-1]=c,this.allChartPoints=e}else this.chartPoints=this.chartPoints.concat(c).slice(-300),this.allChartPoints=this.allChartPoints.concat(c);this.aniAverage=l,this.bpmAverage=h,this.syncStatus()},closeReplay(){this.showReplay=!1,this.comment="",this.allChartPoints=[],this.replaySummary={aniAverage:0,bpmAverage:0,duration:0,calibration:60}},saveReplay(){this.showReplay=!1,this.$emit("save",{status:"finished",comment:this.comment,summary:this.replaySummary,points:this.allChartPoints}),this.comment="",this.allChartPoints=[],this.replaySummary={aniAverage:0,bpmAverage:0,duration:0,calibration:60}}},beforeDestroy(){this.stopTicker(),this.isFullscreenActive&&this.exitCustomFullscreen(),this.symbioService&&this.symbioService.disconnect()}},N=O,z=(0,w.A)(N,m,_,!1,null,"34921499",null),Y=z.exports,U=function(){var t=this,e=t._self._c;return e("div",[e("div",{staticClass:"audio-player",staticStyle:{"margin-top":"-10px"},attrs:{id:"audioplayer"}}
1,[t.audioMoniteurPlay?e("audio",{ref:"audio",staticClass:"audio_exo",attrs:{id:"audio_exo",src:t.sourceAudio,autoplay:"",type:"audio/mpeg"},on:{timeupdate:t.updateCurrentTime,ended:t.AudioEnd}}):e("audio",{ref:"audio",staticClass:"audio_exo",attrs:{id:"audio_exo",src:t.sourceAudio},on:{timeupdate:t.updateCurrentTime,ended:t.AudioEnd}}),e("div",{staticClass:"controls"},[e("div",{staticClass:"containerAudio"},[e("div",{staticClass:"playAudio"},[e("button",{staticClass:"player-button"},[t.audioMoniteur?e("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"#239380"}},[e("path",{attrs:{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zM7 8a1 1 0 012 0v4a1 1 0 11-2 0V8zm5-1a1 1 0 00-1 1v4a1 1 0 102 0V8a1 1 0 00-1-1z","clip-rule":"evenodd"}})]):t._e()])]),e("div",{staticClass:"volumeAudio"},[t.isFinish?t._e():e("button",{staticClass:"sound-button"},[e("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"#239380"}},[e("path",{attrs:{"fill-rule":"evenodd",d:"M9.383 3.076A1 1 0 0110 4v12a1 1 0 01-1.707.707L4.586 13H2a1 1 0 01-1-1V8a1 1 0 011-1h2.586l3.707-3.707a1 1 0 011.09-.217zM14.657 2.929a1 1 0 011.414 0A9.972 9.972 0 0119 10a9.972 9.972 0 01-2.929 7.071 1 1 0 01-1.414-1.414A7.971 7.971 0 0017 10c0-2.21-.894-4.208-2.343-5.657a1 1 0 010-1.414zm-2.829 2.828a1 1 0 011.415 0A5.983 5.983 0 0115 10a5.984 5.984 0 01-1.757 4.243 1 1 0 01-1.415-1.415A3.984 3.984 0 0013 10a3.983 3.983 0 00-1.172-2.828 1 1 0 010-1.415z","clip-rule":"evenodd"}})])]),t.isFinish?t._e():e("input",{attrs:{type:"range",id:"volume-slider",max:"100",value:"100",name:"VolumeSlider"}}),e("output",{staticStyle:{display:"none"},attrs:{id:"volume-output"}},[t._v("100")])]),t.audioMoniteur?e("div",{staticClass:"titleAudio"},[t._m(0)]):e("div",{staticClass:"titleAudio"},[e("p",[t._v(t._s(t.titleAudio))])]),t.audioMoniteur?e("div",{staticClass:"Personnalisation"},[t.isFinish?e("button",{staticClass:"buttonPersonnalisatClose",attrs:{id:"buttonPersonnalisatClose"},on:{click:function(e){t.showPersonnalisationExercice=!t.showPersonnalisationExercice,t.callData(),t.resetDiapo()}}},[t._v(" Fermer le diaporama ")]):e("button",{class:t.screenWidth<950?"buttonPerso":"buttonPersonnalisation",attrs:{id:"buttonPersonnalisation"},on:{click:function(e){t.showPersonnalisationExercice=!t.showPersonnalisationExercice,t.callData(),t.resetDiapo()}}},[e("span",{staticClass:"textPerso"},[t._v("Personnalisation")]),e("span",{staticClass:"iconePerso"},[e("svg",{attrs:{height:"30px",width:"25px",version:"1.1",id:"_x32_",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512.00 512.00","xml:space":"preserve",fill:"#489182",stroke:"","stroke-width":"0.00512",transform:"rotate(0)matrix(1, 0, 0, 1, 0, 0)"}},[e("g",{attrs:{id:"SVGRepo_bgCarrier","stroke-width":"0"}}),e("g",{attrs:{id:"SVGRepo_tracerCarrier","stroke-linecap":"round","stroke-linejoin":"round",stroke:"#CCCCCC","stroke-width":"72.704"}}),e("g",{attrs:{id:"SVGRepo_iconCarrier"}},[e("g",[e("path",{staticClass:"st0",attrs:{d:"M500.781,224.245L447,211.561c-4.93-21.263-13.289-41.202-24.509-59.193l29.053-46.992 c3.552-5.763,2.685-13.184-2.097-17.965l-24.86-24.86c-4.772-4.772-12.202-5.64-17.956-2.088L359.64,89.517 C341.648,78.298,321.719,69.929,300.456,65l-12.693-53.78C286.211,4.649,280.334,0,273.588,0h-35.166 c-6.755,0-12.623,4.649-14.176,11.219L211.553,65c-21.263,4.93-41.194,13.29-59.175,24.509l-47.001-29.053 c-5.745-3.544-13.193-2.675-17.956,2.088L62.553,87.412c-4.781,4.78-5.641,12.211-2.088,17.956l29.044,47 C78.289,170.36,69.929,190.289,65,211.552l-53.772,12.684C4.657,225.798,0,231.676,0,238.412v35.166 c0,6.763,4.649,12.623,11.228,14.175L65,300.447c4.93,21.264,13.299,41.194,24.518,59.185l-29.053,46.991 c-3.544,5.746-2.684,13.202,2.08,17.965l24.868,24.86c4.781,4.789,12.21,5.64,17.965,2.087l47.001-29.044 c17.982,11.22,37.912,19.579,59.175,24.508l12.692,53.781c1.553,6.58,7.421,11.22,14.176,11.22h35.166 c6.746,0,12.623-4.64,14.175-11.22l12.693-53.781c21.254-4.93,41.192-13.288,59.176-24.508l47,29.053 c5.754,3.552,13.184,2.684,17.956-2.096l24.869-24.86c4.772-4.772,5.64-12.21,2.088-17.956l-29.053-47 c11.22-17.983,19.579-37.921,24.509-59.176l53.781-12.693c6.588-1.561,11.219-7.429,11.219-14.184V238.42 C512,231.666,507.36,225.798,500.781,224.245z M256,390.614c-74.334,0-134.606-60.272-134.606-134.614 c0-74.342,60.272-134.615,134.606-134.615c74.359,0,134.623,60.272,134.623,134.615C390.623,330.342,330.359,390.614,256,390.614z"}}),e("path",{staticClass:"st0",attrs:{d:"M256,170.684c-47.114,0-85.316,38.194-85.316,85.316s38.202,85.315,85.316,85.315 c47.123,0,85.316-38.192,85.316-85.315S303.123,170.684,256,170.684z M256,297.859c-23.114,0-41.86-18.746-41.86-41.859 c0-23.114,18.746-41.86,41.86-41.86c23.114,0,41.859,18.746,41.859,41.86C297.859,279.114,279.114,297.859,256,297.859z"}})])])])])])]):t._e(),t._m(1),e("div")])])]),e("div",{staticClass:"titleMobile"}),t.showPersonnalisationExercice?e("div",{class:{bubble:!t.isFinish,bubbleTable:!t.isFinish}},[0==t.isFinish?e("button",{staticClass:"btn-close",staticStyle:{"margin-left":"auto","margin-right":"1%","margin-top":"1%"},attrs:{type:"button"},on:{click:function(e){t.showPersonnalisationExercice=!t.showPersonnalisationExercice}}},[e("span",{staticClass:"icon-cross"}),e("span",{staticClass:"visually-hidden"})]):t._e(),e("div",{staticClass:"PlacementDiapo"},t._l(t.element_slideshow,function(i){return t.isDiapo?e("div",{key:i.id,style:{float:"left",margin:"1.5%"},on:{click:function(e){return t.recupIdDiapo(i.id)}}},[i.attributes.imgSlideshow?e("div",[e("img",{staticClass:"imgDiapo",attrs:{src:"/assets/vignette_diaporama/"+i.attributes.name+".jpg",width:"100px"}}),e("br"),t._v(" "+t._s(i.attributes.name)+" ")]):t._e()]):t._e()}),0),e("div",{staticClass:"music-container"},t._l(t.element_music,function(i){return t.isMusique?e("div",{key:i.id,staticClass:"music-item",on:{click:function(e){return t.recupMusique(i)}}},[e("img",{staticClass:"imgDiapo",attrs:{src:"/assets/musique_img/"+i.attributes.name+".jpg",width:"100px"}}),e("br"),t._v(" "+t._s(i.attributes.name)+" ")]):t._e()}),0),t.isFinish?e("div",[[e("div",{staticStyle:{display:"flex","justify-content":"center"},attrs:{id:"carouseldiv"}},[e("button",{staticClass:"buttonPersonnalisationss",on:{click:function(e){t.showPersonnalisationExercice=!t.showPersonnalisationExercice,t.callData(),t.resetDiapo()}}},[t._v(" Fermer le diaporama ")]),e("div",{staticClass:"carousel-container"},[e("div",{staticClass:"action-bar"},[e("button",{staticClass:"action-btn",on:{click:t.togglePlayPause}},[t.isPlaying?e("i",{staticClass:"fas fa-pause"}):e("i",{staticClass:"fas fa-play"})]),e("div",{staticClass:"volume-control"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.volume,expression:"volume"}],staticClass:"volume-slider",attrs:{type:"range",min:"0",max:"1",step:"0.1"},domProps:{value:t.volume},on:{input:t.updateVolume,__r:function(e){t.volume=e.target.value}}}),e("button",{staticClass:"action-btn",on:{click:function(e){t.isMuted=!t.isMuted}
1}},[t.isMuted?e("i",{staticClass:"fas fa-volume-mute"}):e("i",{staticClass:"fas fa-volume-up"})])]),e("div",{staticClass:"volume-control"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.volumeMusic,expression:"volumeMusic"}],staticClass:"volume-slider",attrs:{type:"range",min:"0",max:"1",step:"0.1"},domProps:{value:t.volumeMusic},on:{input:t.updateVolumeMusic,__r:function(e){t.volumeMusic=e.target.value}}}),e("button",{staticClass:"action-btn",on:{click:function(e){t.isMutedMusic=!t.isMutedMusic}}},[t.isMutedMusic?e("i",{staticClass:"fas fa-volume-mute"}):e("i",{staticClass:"fas fa-music"})])]),e("button",{staticClass:"action-btn",on:{click:t.fullscreenAudio}},[t.isFullscreen?e("i",{staticClass:"fas fa-times"}):e("i",{staticClass:"fas fa-expand"})])]),e("owl-carousel",{staticClass:"disable-mouse owl-theme",attrs:{id:"bCarouselAudio",autoplay:t.autoPlay,"autoplay-timeout":t.interval,loop:t.repeat,nav:t.arrow,"nav-hover":t.arrowHover,dots:t.indicator,items:1,margin:10,"stage-padding":0,"lazy-load":!0,merge:!0,"animate-in":"animate__animated animate__fadeIn","animate-out":"animate__animated animate__fadeOut"},model:{value:t.carouselDiapo,callback:function(e){t.carouselDiapo=e},expression:"carouselDiapo"}},t._l(t.element_background,function(i,s){return e("div",{key:s,staticClass:"carousel-item"},[e("div",{staticStyle:{display:"flex","justify-content":"center"}},[e("img",{class:{"fullscreen-image":t.isFullscreen},staticStyle:{"object-fit":"cover",width:"100%",height:"100%"},attrs:{id:"bcarousel",src:"/assets/images_diaporama/"+t.NameOfDiapo+"/"+(s+1)+".jpg"}})])])}),0)],1)]),e("audio",{ref:"audioMusic",staticStyle:{display:"none"},attrs:{controls:"",id:"audio_musique",autoplay:"",src:t.AudioMusique},on:{ended:t.restartAudio}})]],2):t._e(),t.isOpen?e("div",{staticClass:"dh-modal"},[e("div",{staticClass:"dh-modal-overlay dh-modal-toggle",on:{click:t.toggleModal}}),e("div",{staticClass:"dh-modal-wrapper dh-modal-transition"},[e("div",{staticClass:"dh-modal-header"},[e("h2",{staticClass:"dh-modal-heading"},[t._v("Prévisualisation")]),e("button",{staticClass:"dh-modal-close dh-modal-toggle",on:{click:t.toggleModal}},[e("i",{staticClass:"fas fa-times"})])]),e("div",{staticClass:"dh-modal-body"},[[e("section",[e("b-carousel",{attrs:{arrow:t.arrow,animated:t.animated,autoplay:t.autoPlay,interval:t.interval2,repeat:t.repeat,"pause-hover":!1,arrowHover:t.arrowHover,indicator:t.indicator},model:{value:t.carousel,callback:function(e){t.carousel=e},expression:"carousel"}},t._l(t.element_background,function(i,s){return e("b-carousel-item",{key:s},[e("img",{attrs:{src:"/assets/images_diaporama/"+t.NameOfDiapo+"/"+(s+1)+".jpg"}})])}),1)],1)]],2),e("div",{staticClass:"buttonValidate"},[e("button",{staticClass:"buttonDiapo",staticStyle:{"padding-right":"10px"},on:{click:function(e){return t.validateDiapo()}}},[e("img",{attrs:{src:i(23871),width:"20px"}})]),e("button",{staticClass:"buttonDiapo",staticStyle:{"padding-left":"10px"},on:{click:function(e){return t.AnnulerDiapo()}}},[e("img",{attrs:{src:i(65565),width:"20px"}})])])])]):t._e(),t.isOpen2?e("div",{staticClass:"dh-modal"},[e("div",{staticClass:"dh-modal-overlay dh-modal-toggle",on:{click:t.toggleModal2}}),e("div",{staticClass:"dh-modal-wrapper dh-modal-transition"},[e("div",{staticClass:"dh-modal-header"},[e("h2",{staticClass:"dh-modal-heading"},[t._v("Prévisualisation")]),e("button",{staticClass:"dh-modal-close dh-modal-toggle",on:{click:t.toggleModal2}},[e("i",{staticClass:"fas fa-times"})])]),e("div",{staticClass:"dh-modal-body"},[e("img",{attrs:{src:t.Musique}}),e("audio",{staticStyle:{display:"none"},attrs:{controls:"",autoplay:""}},[e("source",{attrs:{src:t.AudioMusique,type:"audio/mpeg"}})])]),e("div",{staticClass:"buttonValidate"},[e("button",{staticClass:"buttonDiapo",staticStyle:{"padding-right":"10px"},attrs:{id:"buttonDiapo"},on:{click:function(e){return t.validateMusique()}}},[e("img",{attrs:{src:i(23871),width:"20px"}})]),e("button",{staticClass:"buttonDiapo",staticStyle:{"padding-right":"10px"},on:{click:function(e){return t.AnnulerMusique()}}},[e("img",{attrs:{src:i(65565),width:"20px"}})])])])]):t._e()]):t._e()])},H=[function(){var t=this,e=t._self._c;return e("p",[e("span",{attrs:{id:"currentTime"}}),t._v(" / "),e("span",{attrs:{id:"duration"}})])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"AudioTimer"},[e("input",{staticClass:"timeline",attrs:{type:"range",max:"100",value:"
10"}})])}],V=i(27016),X=i.n(V),G=(i(89643),{name:"AudioPlayer",data:()=>({tableau_slideshow2:[],element_slideshow2:[],AudioMusique:"",screenWidth:0,minute:0,second:0,hour:0,showPersonnalisationExercice:!1,tableau_slideshow:[],element_slideshow:[],tableau_music:[],element_music:[],tableau_background:[],element_background:[],ToggleFullScreen:!1,Diapo:"",Musique:"",fullscreen:!1,isOpen:!1,isOpen2:!1,isMusique:!1,isDiapo:!0,isFinish:!1,IdDiapo:"",numberDiapo:0,carousel:0,audioStart:!1,animated:"fade",drag:!1,autoPlay:!0,pauseHover:!1,pauseInfo:!0,repeat:!0,pauseType:!1,widthPlayer:0,prgress:!1,arrowBoth:!1,arrowHover:!1,arrow:!1,indicator:!1,interval:1e4,interval2:3e3,isFullscreen:!1,isPaused:!1,showVolumeSlider:!1,isPlaying:!0,isMutedMusic:!1,carouselDiapo:!0,volumeMusic:.5,volume:.5,isMuted:!1,carousels:[{title:"Slide 1",color:"dark"},{title:"Slide 2",color:"primary"},{title:"Slide 3",color:"info"},{title:"Slide 4",color:"success"},{title:"Slide 5",color:"warning"},{title:"Slide 6",color:"danger"}],NameOfDiapo:""}),components:{OwlCarousel:X()},created(){console.log("TEST LIENAUDIO "+this.sourceAudio)},props:{titleAudio:{required:!0},sourceAudio:{required:!0},timerAudio:{required:!0},audioMoniteur:{type:Boolean,default:!0},audioMoniteurPlay:{type:Boolean,default:!0},timerForRessources:{type:Boolean,default:!0},indexAudio:{type:Number}},computed:{playerButton(){return document.querySelector(".player-button")},audio(){return document.querySelector(".audio_exo")},timeline(){return document.querySelector(".timeline")},soundButton(){return document.querySelector(".sound-button")},VolumeSlider(){return document.getElementById("volume-slider")}},mounted(){this.screenWidth=window.innerWidth,window.addEventListener("resize",()=>{this.screenWidth=window.innerWidth});const t=this.playerButton,e=this.audio,i=this.timeline,s=this.soundButton,a=this.VolumeSlider,n='\n <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="#239380">\n <path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM9.555 7.168A1 1 0 008 8v4a1 1 0 001.555.832l3-2a1 1 0 000-1.664l-3-2z" clip-rule="evenodd" />\n </svg>\n ',o='\n <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="#239380">\n <path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zM7 8a1 1 0 012 0v4a1 1 0 11-2 0V8zm5-1a1 1 0 00-1 1v4a1 1 0 102 0V8a1 1 0 00-1-1z" clip-rule="evenodd" />\n </svg>\n ',r='\n <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="#239380">\n <path fill-rule="evenodd" d="M9.383 3.076A1 1 0 0110 4v12a1 1 0 01-1.707.707L4.586 13H2a1 1 0 01-1-1V8a1 1 0 011-1h2.586l3.707-3.707a1 1 0 011.09-.217zM14.657 2.929a1 1 0 011.414 0A9.972 9.972 0 0119 10a9.972 9.972 0 01-2.929 7.071 1 1 0 01-1.414-1.414A7.971 7.971 0 0017 10c0-2.21-.894-4.208-2.343-5.657a1 1 0 010-1.414zm-2.829 2.828a1 1 0 011.415 0A5.983 5.983 0 0115 10a5.984 5.984 0 01-1.757 4.243 1 1 0 01-1.415-1.415A3.984 3.984 0 0013 10a3.983 3.983 0 00-1.172-2.828 1 1 0 010-1.415z" clip-rule="evenodd" />\n </svg>',l='\n <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="#239380">\n <path fill-rule="evenodd" d="M9.383 3.076A1 1 0 0110 4v12a1 1 0 01-1.707.707L4.586 13H2a1 1 0 01-1-1V8a1 1 0 011-1h2.586l3.707-3.707a1 1 0 011.09-.217zM12.293 7.293a1 1 0 011.414 0L15 8.586l1.293-1.293a1 1 0 111.414 1.414L16.414 10l1.293 1.293a1 1 0 01-1.414 1.414L15 11.414l-1.293 1.293a1 1 0 01-1.414-1.414L13.586 10l-1.293-1.293a1 1 0 010-1.414z" clip-rule="evenodd" />\n </svg>';function h(){e.paused?(e.play(),t.innerHTML=o):(e.pause(),t.innerHTML=n)}if(this.audioMoniteur){const t=document.getElementById("buttonPersonnalisation");t.addEventListener("click",function(){this.showPersonnalisationExercice&&e.pause()})}if(document.getElementById("buttonDiapo")){const t=document.getElementById("buttonDiapo");t.addEventListener("click",function(){e.play()})}if(this.audioMoniteur){let t=document.getElementById("currentTime"),i=document.getElementById("duration");e.addEventListener("loadedmetadata",function(){i.innerHTML=c(e.duration)}),e.addEventListener("timeupdate",function(){t.innerHTML=c(e.currentTime)})}function c(t){let e=Math.floor(t/60),i=Math.floor(t%60);return e<10&&(e="0"+e),i<10&&(i="0"+i),e+":"+i}e.ended&&(this.resetDiapo(),t.innerHTML=n),t.addEventListener("click",h);const d=document.getElementById("volume-output");function u(){const t=100*e.currentTime/e.duration;i.style.backgroundSize=`${t}% 100%`,i.value=t}function p(){t.innerHTML=n}function g(){const t=i.value*e.duration/100;e.currentTime=t}function m(){e.muted=!e.muted,s.innerHTML=e.muted?l:r}a.addEventListener("input",t=>{const i=t.target.value;d.textContent=i,e.volume=i/100}),e.ontimeupdate=u,e.onended=p,i.addEventListener("change",g),s.addEventListener("click",m),this.$forceUpdate();try{const t=parseInt(this.timerAudio,10);let e=Math.floor(t/3600),i=Math.floor((t-3600*e)/60),s=t-3600*e-60*i;return e<10&&(e="0"+e),i<10&&(i="0"+i),s<10&&(s="0"+s),this.hour=e,this.minute=i,this.second=s}catch{}},methods:{AudioEnd(){this.$emit("audio-finish",!0)},updateCurrentTime(){const t=this.$refs.audio.currentTime;this.$emit("current-time-update",t)},restartAudio(){const t=document.getElementById("audio_musique");t.currentTime=0,t.play()},emitClose(){this.$emit("close")},togglePlayPause(){this.carouselDiapo=!this.carouselDiapo,this.isPlaying?(this.$refs.audio.pause(),this.$refs.audioMusic.pause()):(this.$refs.audio.play(),this.$refs.audioMusic.play()),this.isPlaying=!this.isPlaying},playPause(){var t=document.getElementById("audio_musique");t.paused?t.play():t.pause();var e=this.audio,i=this.playerButton,s='\n <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="#239380">\n <path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM9.555 7.168A1 1 0 008 8v4a1 1 0 001.555.832l3-2a1 1 0 000-1.664l-3-2z" clip-rule="evenodd" />\n </svg>\n ',a='\n <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="#239380">\n <path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zM7 8a1 1 0 012 0v4a1 1 0 11-2 0V8zm5-1a1 1 0 00-1 1v4a1 1 0 102 0V8a1 1 0 00-1-1z" clip-rule="evenodd" />\n </svg>\n ';e.paused?(e.play(),i.innerHTML=a):(e.pause(),i.innerHTML=s)},updateVolume(){this.$refs.audio.volume=this.volume},updateVolumeMusic(){this.$refs.audioMusic.volume=this.volumeMusic},SoundMusique(){var t=document.getElementById("audio_musique");const e=document.getElementById("volume-output");var i=document.getElementById("volume-slider2");i.addEventListener("input",i=>{const s=i.target.value;e.textContent=s,t.volume=s/100})},SoundAudio2(){const t=document.getElementById("volume-output3");var e=document.querySelector(".audio_exo"),i=document.getElementById("volume-slider3");i.addEventListener("input",i=>{const s=i.target.value;t.textContent=s,e.volume=s/100})},lancerAudio(){const t=document.getElementById("audio_exo");t.play()},fullscreenAudio(){const t=document.querySelector(".carousel-container"),e=t=>{const e=t.requestFullscreen||t.webkitRequestFullScreen||t.mozRequestFullScreen||t.msRequestFullscreen;e&&(t.webkitRequestFullScreen?e.call(t,Element.ALLOW_KEYBOARD_INPUT):e.call(t))},i=()=>{const t=document.exitFullscreen||document.webkitExitFullscreen||document.mozCancelFullScreen||document.msExitFullscreen;t&&t.call(document)},s=()=>document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement;s()?(i(),this.isFullscreen=!1):(e(t),this.isFullscreen=!0)},exitFullscreenAudio(){const t=()=>{const t=document.exitFullscreen||document.webkitExitFullscreen||document.mozCancelFullScreen||document.msExitFullscreen;t&&t.call(document)};t(),this.isFullscreen=!1},fullscreenChange(){document.getElementById(".DiapoFinish").requestFullscreen()},recupMusique(t){console.log("MusiqueSelected",t),this.Musique="/assets/musique_img/"+t.attributes.name+".jpg",this.AudioMusique="/assets/musique/"+t.attributes.cheminresource,console.log("AudioMusique",this.AudioMusique),console.log("Musique",this.Musique),this.toggleModal2()}
1,recupIdDiapo(t){return this.IdDiapo=t,this.callDataBackground(),this.toggleModal()},toggleModal(){this.isOpen=!this.isOpen},toggleModal2(){this.isOpen2=!this.isOpen2},validateDiapo(){this.isDiapo=!1,this.isMusique=!0,this.isOpen=!1},AnnulerDiapo(){this.isOpen=!1},validateMusique(){this.isMusique=!1,this.isOpen2=!1;const t=document.getElementById("audio_exo");return t.play(),this.isFinish=!0,this.callDataBackground()},AnnulerMusique(){this.isOpen2=!1},resetDiapo(){this.isDiapo=!0,this.isOpen=!1,this.isMusique=!1,this.isFinish=!1},callData(){(0,n.A)();const t=r().Object.extend("audio_slideshow"),e=r().Object.extend("audio_music"),i=new(r().Query)(t),s=new(r().Query)(e);try{i.find().then(t=>(console.log("Element Slideshow",t),this.element_slideshow=t)),s.find().then(t=>this.element_music=t),this.tableau_slideshow.push(this.element_slideshow),this.tableau_music.push(this.element_music),this.$forceUpdate()}catch{}},async callDataBackground(){const t=r().Object.extend("audio_slideshow"),e=r().Object.extend("audio_background"),i=new(r().Query)(e),s=new(r().Query)(t);try{s.equalTo("objectId",this.IdDiapo),i.matchesQuery("slideshow",s);const t=await s.find();this.element_slideshow2=t,this.NameOfDiapo=this.element_slideshow2[0].attributes.name,console.log("NameOfDiapo",this.NameOfDiapo);const e=await i.limit(1e3).find();
1this.element_background=e,console.log("Element Background",this.element_background),this.numberDiapo=this.element_background.length,console.log("Element Background",this.numberDiapo)}catch{}}},watch:{screenWidth:function(t){t<400?(this.$el.classList.remove("class1"),this.$el.classList.add("class2")):(this.$el.classList.remove("class2"),this.$el.classList.add("class1"))},isMuted(t){this.$refs.audio.volume=t?0:this.volume}}}),q=G,W=(0,w.A)(q,U,H,!1,null,null,null),j=W.exports,Q=function(){var t=this,e=t._self._c;return e("html",{staticStyle:{width:"100%",background:"white","border-radius":"0px 0px 10px 10px"},attrs:{id:"chart-component"}},[e("div",{staticClass:"ResponsiveMoniteur",staticStyle:{width:"100%"}},[t.disableButton?e("div",{staticClass:"top-div",staticStyle:{height:"350px"}},[e("div",{staticClass:"center-button"},[e("div",{attrs:{id:"timerAffichage"}},[t._v(t._s(t.timer))]),e("button",{staticClass:"buttonChart2",staticStyle:{"background-color":"rgb(35, 147, 128)",color:"white"},attrs:{id:"buttonsocket"},on:{click:function(e){t.ReinitSocket(),t.disableButton=!1,t.launchRythmeRespiratoire(),t.startTimer(),t.timerExercice()}}},[t._v(" Démarrer ")]),e("div",{staticClass:"buttonListFullScreen"},[t.isFullscreen||t.FinishAniBool?t.FinishAniBool?t._e():e("button",{staticClass:"buttonChart2",staticStyle:{"background-color":"rgb(35, 147, 128)",color:"white"},on:{click:function(e){return t.exitFullscreen()}}},[t._v(" Quitter le mode plein écran ")]):e("button",{staticClass:"buttonChart",staticStyle:{"background-color":"rgb(35, 147, 128)",color:"white"},on:{click:function(e){return t.chartFullScreen()}}},[t._v(" Plein écran ")])]),e("div",{attrs:{id:"PlacementMoniteurPasLance"}},[e("div",{attrs:{id:"sensor-instructions-container"}},[e("div",{staticClass:"button-container"},[e("button",{staticClass:"buttonChart",staticStyle:{"background-color":"rgb(35, 147, 128)",color:"white"},on:{click:t.openAppInAppStore}},[t._v(" Ouvrir le SymbioSensor ")])]),e("p",{staticClass:"sensor-instructions-heading"},[t._v(" Si vous avez déjà installé le SymbioSensor, assurez-vous des points suivants : ")]),t._m(0)])])])]):e("div",{staticClass:"top-div"},[t.MoniteurForRessources&&!1===t.isCardRedirectFront?e("div",{staticClass:"PlacementBoutonTerminer"},[e("button",{staticClass:"buttonChart2",staticStyle:{"background-color":"rgb(35, 147, 128)",color:"white",display:"block !important"},attrs:{id:"buttonForFinishMoniteur"},on:{click:function(e){return t.TerminerMoniteur()}}},[t._v(" Terminer ")])]):t._e(),e("div",{staticClass:"timerInChart",attrs:{id:"timer"}},[t._v(t._s(t.timer))]),e("div",{staticClass:"buttonListFullScreen"},[t.isFullscreen||t.FinishAniBool?t.FinishAniBool?t._e():e("button",{staticClass:"buttonChart2",staticStyle:{"background-color":"rgb(35, 147, 128)",color:"white"},on:{click:function(e){return t.exitFullscreen()}}},[t._v(" Quitter le mode plein écran ")]):e("button",{staticClass:"buttonChart",staticStyle:{"background-color":"rgb(35, 147, 128)",color:"white"},on:{click:function(e){return t.chartFullScreen()}}},[t._v(" Plein écran ")])]),e("real-time-chart",{attrs:{value1:t.y_value,value2:t.y_value,lastBPM:t.y_value}}),e("div",{staticClass:"ReloadInChart",attrs:{id:"divCalibrageEnCours"}},[e("div",{staticClass:"containerMoniteurLoader"},[e("div",{staticClass:"loader-containerMoniteurLoader"},[e("div",{staticClass:"spinnerMoniteurLoader",style:{"border-top-color":t.spinnerColor}}),e("p",{staticClass:"textMoniteurLoader"},[t._v("Calibration en cours")])])])]),t.LoadingRelecture?e("div",{staticClass:"ReloadInChart"},[e("div",{staticClass:"containerMoniteurLoader"},[e("div",{staticClass:"loader-containerMoniteurLoader"},[e("div",{staticClass:"spinnerMoniteurLoader",style:{"border-top-color":t.spinnerColor}}),e("p",{staticClass:"textMoniteurLoader"},[t._v("Relecture en cours")])])])]):t._e()],1),0==t.game_type?e("div",{staticClass:"PlacementAudio"},[e("audioPlayer",{ref:"audioPlayerRef",attrs:{titleAudio:t.titleAudioMoniteur,sourceAudio:t.sourceAudioMoniteur,timerAudio:t.timerAudioMoniteur,audioMoniteur:!1,audioMoniteurPlay:t.audioMoniteurPlay}})],1):t._e(),e("div",{staticClass:"bottom-divs"},[e("div",{staticClass:"bottom-div"},[e("div",{attrs:{id:"cercleBPM"}},[e("img",{staticStyle:{display:"none"},attrs:{src:i(64475),id:"imageBPM"}}),e("span",{attrs:{id:"bpm"}},[t._v("BPM")]),e("span",{attrs:{id:"BpmInstant"}}),e("span",{attrs:{id:"RrInstant"}}),e("img",{key:"",staticStyle:{display:"none"},attrs:{src:i(6424),id:"petite-image"}})]),e("p",{staticClass:"textMoniteur"},[t._v("BATTEMENT CARDIAQUE INSTANTANÃ")])]),t.game_type?e("div",{staticClass:"bottom-div"},[t.displayGuide?e("div",[e("GuideRespiratoire",{key:t.keyGuide,attrs:{MoniteurInProgrammes:t.MoniteurInProgrammes,idUserForSave:t.idUserForSave,idPatientTherapeute:t.idPatientTherapeute,inspirationParent:t.inspiration,expirationParent:t.expiration,pauseExpirationParent:t.pauseExpiration,pauseInspirationParent:t.pauseInspiration,gaugeEnabled:t.gaugeEnabled},on:{"inspiration-updated":t.updateInspirationParent,"expiration-updated":t.updateExpirationParent,"pauseInspiration-updated":t.updatePauseInspirationParent,"pauseExpiration-updated":t.updatePauseExpirationParent}}),e("label",{class:{disabled:!t.avecGuide&&t.MoniteurInProgrammes},staticStyle:{display:"flex","margin-top":"20px"}},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.gaugeEnabled,expression:"gaugeEnabled"}],staticClass:"checkbox",staticStyle:{"margin-right":"3px"},attrs:{type:"checkbox",disabled:!t.avecGuide&&t.MoniteurInProgrammes},domProps:{checked:Array.isArray(t.gaugeEnabled)?t._i(t.gaugeEnabled,null)>-1:t.gaugeEnabled},on:{change:function(e){var i=t.gaugeEnabled,s=e.target,a=!!s.checked;if(Array.isArray(i)){var n=null,o=t._i(i,n);s.checked?o<0&&(t.gaugeEnabled=i.concat([n])):o>
1-1&&(t.gaugeEnabled=i.slice(0,o).concat(i.slice(o+1)))}else t.gaugeEnabled=a}}}),t.gaugeEnabled?e("p",[t._v("Activé")]):e("p",[t._v("Désactivé")])])],1):t._e(),e("p",{staticClass:"textMoniteur"},[t._v("GUIDE RESPIRATOIRE")])]):t._e(),e("div",{staticClass:"bottom-div"},[e("div",[e("div",{staticClass:"gauge"},[e("div",{staticClass:"background-bar"}),e("div",{staticClass:"gauge-bar",style:{height:t.percent+"%",bottom:0}},[e("div",{staticClass:"bubble-dialog",attrs:{id:"bubble-dialog"}},[e("p",[t._v(t._s(t.percent+"%"))])])]),e("div",{staticClass:"gauge-indicators"},t._l([100,80,60,40,20,0],function(i){return e("div",{key:i,staticClass:"gauge-indicator",style:{top:100-i-5+"%"}},[t._v(" "+t._s(i)+"% ")])}),0)])]),e("p",{staticClass:"textMoniteur"},[t._v("COHÃRENCE CARDIAQUE INSTANTANÃE")])]),!1===t.disableButton?e("div",{staticClass:"bottom-div"},[e("div",{attrs:{id:"piechartdiv"}}),t._m(1),e("p",{staticClass:"textMoniteur"},[t._v("MOYENNE COHÃRENCE CARDIAQUE")])]):e("div",{staticClass:"bottom-div"},[t._m(2),e("p",{staticClass:"textMoniteur"},[t._v("MOYENNE COHÃRENCE CARDIAQUE")])])]),e("div",{staticStyle:{margin:"10px 23px 0 23px"}},[e("button",{staticClass:"toggle-button",on:{click:t.toggleCommentaire}},[t.showCommentaire?e("span",[t._v("â¼ Masquer le commentaire")]):e("span",[t._v("⺠Ajouter un commentaire")])]),t.showCommentaire?e("b-field",{attrs:{label:"Commentaire :"}},[e("b-input",{attrs:{maxlength:"200",type:"textarea"},on:{input:t.emitCommentaire},model:{value:t.commentaireMoniteur,callback:function(e){t.commentaireMoniteur=e},expression:"commentaireMoniteur"}})],1):t._e()],1),t.isFullscreen?e("div",{staticStyle:{display:"flex"}},[e("img",{staticStyle:{"margin-left":"auto","margin-right":"auto",width:"30rem"},attrs:{src:i(83832)}})]):t._e(),t.openModalCPM?e("div",[e("div",{staticClass:"modal-background-cpm",on:{click:function(e){t.openModalCPM=!1}}}),e("div",{staticClass:"modal-content-cpm"},[e("button",{staticClass:"close-button-cpm",on:{click:function(e){t.openModalCPM=!1}}},[t._v(" à ")]),e("div",[t._v(t._s(t.currentObject.MessagePalier))])])]):t._e(),e("div",{staticStyle:{display:"none"},attrs:{id:"ShowDataInPage"}}),e("div",{staticStyle:{display:"none"},attrs:{id:"ShowCCInPage"}})]),e("transition",{attrs:{name:"slide-fade"}},[t.showNotification?e("div",{staticClass:"notification-container2"},[e("div",{staticClass:"notification-box"},[e("button",{staticClass:"notification-close",on:{click:t.closeNotification}},[t._v(" à ")]),e("div",{staticClass:"notification-text"},[t._v(t._s(t.notificationMessage))])])]):t._e()]),e("popUpRelecture",{attrs:{FinishAniBool:t.FinishAniBool,valeurX:t.valeurX,fcMoyenne:t.fcMoyenne,ccMoyenne:t.ccMoyenne,couleurCCMoyenne:t.couleurCCMoyenne,valeurY:t.TabRowFC,DefaultOpenedDetails:t.DefaultOpenedDetails,valeurCCX:t.ValeurCCX,valeurCCY:t.TabRowCC,TimeCalibrage:60,elapsedExerciseTime:t.labelChrono,valeurRouge:t.valeurRouge,valeurVerte:t.valeurVerte,valeurOrange:t.valeurOrange},on:{"save-data":t.handleSaveData,"commentaire-change":t.handleCommentaireChange}})],1)},J=[function(){var t=this,e=t._self._c;return e("ul",{staticClass:"sensor-instructions-list"},[e("li",[t._v(" Le logiciel SymbioSensor est en cours d'exécution sur votre ordinateur et utilise le même identifiant que votre session en cours. ")]),e("li",[t._v("Le capteur est correctement connecté à votre machine.")])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"containerCircleChart",staticStyle:{"z-index":"0"},attrs:{id:"circleChartDiv"}},[e("div",{staticClass:"circleChart"},[t._v("Calibration en cours")])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"containerCircleChart",staticStyle:{"z-index":"0"},attrs:{id:"circleChartDiv"}},[e("div",{staticClass:"circleChart"},[t._v("Calibration en cours")])])}],K=i(94948),$=i.n(K),Z=i(92420),tt=i(97529),et=i(98379),it=i(83460);class st{constructor(){this._listeners=[],this._killed=[],this._disabled={},this._iterating=0,this._enabled=!0,this._disposed=!1}isDisposed(){return this._disposed}dispose(){if(!this._disposed){this._disposed=!0;const t=this._listeners;this._iterating=1,this._listeners=null,this._disabled=null;try{et.__(t,t=>{t.disposer.dispose()})}finally{this._killed=null,this._iterating=null}}}hasListeners(){return 0!==this._listeners.length}hasListenersByType(t){return et.bz(this._listeners,e=>(null===e.type||e.type===t)&&!e.killed)}enable(){this._enabled=!0}disable(){this._enabled=!1}enableType(t){delete this._disabled[t]}disableType(t,e=1/0){this._disabled[t]=e}_removeListener(t){if(0===this._iterating){const e=this._listeners.indexOf(t);if(-1===e)throw new Error("Invalid state: could not remove listener");this._listeners.splice(e,1)}else this._killed.push(t)}_removeExistingListener(t,e,i,s){if(this._disposed)throw new Error("EventDispatcher is disposed");this._eachListener(a=>{a.once!==t||a.type!==e||void 0!==i&&a.callback!==i||a.context!==s||a.disposer.dispose()})}isEnabled(t){if(this._disposed)throw new Error("EventDispatcher is disposed");return this._enabled&&this._listeners.length>0&&this.hasListenersByType(t)&&void 0===this._disabled[t]}removeType(t){if(this._disposed)throw new Error("EventDispatcher is disposed");this._eachListener(e=>{e.type===t&&e.disposer.dispose()})}
1has(t,e,i){const s=et.SL(this._listeners,s=>!0!==s.once&&s.type===t&&(void 0===e||s.callback===e)&&s.context===i);return-1!==s}_shouldDispatch(t){if(this._disposed)throw new Error("EventDispatcher is disposed");const e=this._disabled[t];return it.Et(e)?(e<=1?delete this._disabled[t]:--this._disabled[t],!1):this._enabled}_eachListener(t){++this._iterating;try{et.__(this._listeners,t)}finally{--this._iterating,0===this._iterating&&0!==this._killed.length&&(et.__(this._killed,t=>{this._removeListener(t)}),this._killed.length=0)}}dispatch(t,e){this._shouldDispatch(t)&&this._eachListener(i=>{i.killed||null!==i.type&&i.type!==t||(i._debounceDelay?(i._debounceTimeout&&window.clearTimeout(i._debounceTimeout),i._debounceTimeout=window.setTimeout(()=>{i._debounceTimeout=void 0,i.killed||i.dispatch(t,e)},i._debounceDelay)):i.dispatch(t,e))})}_on(t,e,i,s,a,n,o){if(this._disposed)throw new Error("EventDispatcher is disposed");this._removeExistingListener(t,e,i,s);const r={type:e,callback:i,context:s,shouldClone:a,dispatch:n,killed:!1,once:t,disposer:new tt.W_(()=>{r.killed=!0,r._debounceTimeout&&window.clearTimeout(r._debounceTimeout),this._removeListener(r)}),_debounceDelay:o};return this._listeners.push(r),r}onAll(t,e,i=!0){return this._on(!1,null,t,e,i,(i,s)=>t.call(e,s)).disposer}on(t,e,i,s=!0){return this._on(!1,t,e,i,s,(t,s)=>e.call(i,s)).disposer}onDebounced(t,e,i,s,a=!0){return this._on(!1,t,e,s,a,(t,i)=>e.call(s,i),i).disposer}once(t,e,i,s=!0){const a=this._on(!0,t,e,i,s,(t,s)=>{a.disposer.dispose(),e.call(i,s)});return a.disposer}off(t,e,i){this._removeExistingListener(!1,t,e,i)}copyFrom(t){if(this._disposed)throw new Error("EventDispatcher is disposed");if(t===this)throw new Error("Cannot copyFrom the same TargetedEventDispatcher");const e=[];return et.__(t._listeners,t=>{!t.killed&&t.shouldClone&&(null===t.type?e.push(this.onAll(t.callback,t.context)):t.once?e.push(this.once(t.type,t.callback,t.context)):e.push(this.on(t.type,t.callback,t.context)))}),new tt.ZT(e)}}function at(t,e){if(!(t>=0&&t<e))throw new Error("Index out of bounds: "+t)}class nt{constructor(t=[]){this.events=new st,this._values=t}get values(){return this._values}contains(t){return-1!==this._values.indexOf(t)}removeValue(t){let e=0,i=this._values.length;while(e<i)this._values[e]===t?(this.removeIndex(e),--i):++e}indexOf(t){return et.qh(this._values,t)}get length(){return this._values.length}hasIndex(t){return t>=0&&t<this._values.length}getIndex(t){return this._values[t]}_onPush(t){this.events.isEnabled("push")&&this.events.dispatch("push",{type:"push",target:this,newValue:t})}_onInsertIndex(t,e){this.events.isEnabled("insertIndex")&&this.events.dispatch("insertIndex",{type:"insertIndex",target:this,index:t,newValue:e})}_onSetIndex(t,e,i){this.events.isEnabled("setIndex")&&this.events.dispatch("setIndex",{type:"setIndex",target:this,index:t,oldValue:e,newValue:i})}_onSwap(t,e){this.events.isEnabled("swap")&&this.events.dispatch("swap",{type:"swap",target:this,a:t,b:e})}_onRemoveIndex(t,e){this.events.isEnabled("removeIndex")&&this.events.dispatch("removeIndex",{type:"removeIndex",target:this,index:t,oldValue:e})}_onMoveIndex(t,e,i){this.events.isEnabled("moveIndex")&&this.events.dispatch("moveIndex",{type:"moveIndex",target:this,oldIndex:t,newIndex:e,value:i})}_onClear(t){this.events.isEnabled("clear")&&this.events.dispatch("clear",{type:"clear",target:this,oldValues:t})}setIndex(t,e){at(t,this._values.length);const i=this._values[t];return i!==e&&(this._values[t]=e,this._onSetIndex(t,i,e)),i}insertIndex(t,e){return at(t,this._values.length+1),et.At(this._values,t,e),this._onInsertIndex(t,e),e}swap(t,e){const i=this._values.length;if(at(t,i),at(e,i),t!==e){const i=this._values[t],s=this._values[e];this._values[t]=s,this._values[e]=i,this._onSwap(i,s)}}removeIndex(t){at(t,this._values.length);const e=this._values[t];return et.xR(this._values,t),this._onRemoveIndex(t,e),e}moveValue(t,e){let i=this.indexOf(t);if(-1!==i)if(et.xR(this._values,i),null==e){const e=this._values.length;this._values.push(t),this._onMoveIndex(i,e,t)}else et.At(this._values,e,t),this._onMoveIndex(i,e,t);else null==e?(this._values.push(t),this._onPush(t)):(et.At(this._values,e,t),this._onInsertIndex(e,t));return t}push(t){return this._values.push(t),this._onPush(t),t}unshift(t){return this.insertIndex(0,t),t}pushAll(t){et.__(t,t=>{this.push(t)})}copyFrom(t){this.pushAll(t._values)}pop(){let t=this._values.length-1;return t<0?void 0:this.removeIndex(this._values.length-1)}shift(){return this._values.length?this.removeIndex(0):void 0}setAll(t){const e=this._values;this._values=[],this._onClear(e),et.__(t,t=>{this._values.push(t),this._onPush(t)})}clear(){this.setAll([])}*[Symbol.iterator](){const t=this._values.length;for(let e=0;e<t;++e)yield this._values[e]}each(t){et.__(this._values,t)}eachReverse(t){et.W$(this._values,t)}}class ot extends nt{constructor(){super(...arguments),this.autoDispose=!0,this._disposed=!1}swap(t,e){const i=this.autoDispose;this.autoDispose=!1,super.swap(t,e),this.autoDispose=i}_onSetIndex(t,e,i){this.autoDispose&&e.dispose(),super._onSetIndex(t,e,i)}_onRemoveIndex(t,e){this.autoDispose&&e.dispose(),super._onRemoveIndex(t,e)}_onClear(t){this.autoDispose&&et.__(t,t=>{t.dispose()}),super._onClear(t)}
1_dispose(){this.autoDispose&&et.__(this._values,t=>{t.dispose()})}isDisposed(){return this._disposed}dispose(){this._disposed||(this._disposed=!0,this._dispose())}}class rt extends ot{constructor(t,e){super(),this.template=t,this.make=e}_dispose(){super._dispose(),this.autoDispose&&this.template.dispose()}}class lt extends nt{constructor(t){super(),this._disposed=!1,this._container=t,this._events=this.events.onAll(t=>{if("clear"===t.type)et.__(t.oldValues,t=>{this._onRemoved(t)});else if("push"===t.type)this._onInserted(t.newValue);else if("setIndex"===t.type)this._onRemoved(t.oldValue),this._onInserted(t.newValue,t.index);else if("insertIndex"===t.type)this._onInserted(t.newValue,t.index);else if("removeIndex"===t.type)this._onRemoved(t.oldValue);else{if("moveIndex"!==t.type)throw new Error("Unknown IListEvent type");this._onRemoved(t.value),this._onInserted(t.value,t.newIndex)}})}_onInserted(t,e){t._setParent(this._container,!0);const i=this._container._childrenDisplay;void 0===e?i.addChild(t._display):i.addChildAt(t._display,e)}_onRemoved(t){this._container._childrenDisplay.removeChild(t._display),this._container.markDirtyBounds(),this._container.markDirty()}isDisposed(){return this._disposed}dispose(){this._disposed||(this._disposed=!0,this._events.dispose(),et.__(this.values,t=>{t.dispose()}))}}var ht=i(16611),ct=i(31635),dt=i(72971);function ut(t){return t}function pt(t){return t*t*t}function gt(t){return function(e){return 1-t(1-e)}}let mt=2*Math.PI,_t=1,vt=.3/mt;Math.asin(1/_t);class ft{constructor(t,e){this._userSettings={},this._entity=t,this._settings=e,dt.__(e,t=>{this._userSettings[t]=!0})}get(t,e){const i=this._settings[t];return void 0!==i?i:e}setRaw(t,e){this._settings[t]=e}set(t,e){this._userSettings[t]=!0,this.setRaw(t,e)}remove(t){delete this._userSettings[t],delete this._settings[t]}setAll(t){dt.jO(t).forEach(([t,e])=>{this.set(t,e)})}_eachSetting(t){dt.__(this._settings,t)}apply(){const t={stateAnimationEasing:!0,stateAnimationDuration:!0},e=this._entity.states.lookup("default");this._eachSetting((i,s)=>{t[i]||(t[i]=!0,this!==e&&(i in e._settings||(e._settings[i]=this._entity.get(i))),this._entity.set(i,s))})}applyAnimate(t){null==t&&(t=this._settings.stateAnimationDuration),null==t&&(t=this.get("stateAnimationDuration",this._entity.get("stateAnimationDuration",0)));let e=this._settings.stateAnimationEasing;null==e&&(e=this.get("stateAnimationEasing",this._entity.get("stateAnimationEasing",pt)));const i=this._entity.states.lookup("default"),s={stateAnimationEasing:!0,stateAnimationDuration:!0},a={};return this._eachSetting((n,o)=>
1{if(!s[n]){s[n]=!0,this!=i&&(n in i._settings||(i._settings[n]=this._entity.get(n)));const r=this._entity.animate({key:n,to:o,duration:t,easing:e});r&&(a[n]=r)}}),a}}class yt{constructor(t){this._states={},this._entity=t}lookup(t){return this._states[t]}create(t,e){const i=this._states[t];if(i)return i.setAll(e),i;{const i=new ft(this._entity,e);return this._states[t]=i,i}}remove(t){delete this._states[t]}apply(t){const e=this._states[t];e&&e.apply(),this._entity._applyState(t)}applyAnimate(t,e){let i;const s=this._states[t];return s&&(i=s.applyAnimate(e)),this._entity._applyStateAnimated(t,e),i}}class xt{constructor(){this.version="5.17.1",this.licenses=[],this.entitiesById={},this.rootElements=[],this.autoDispose=!1}}const bt=new xt;function wt(t,e){return t===e?0:t<e?-1:1}function Ct(t,e,i){const s=t.length,a=e.length,n=Math.min(s,a);for(let o=0;o<n;++o){const s=i(t[o],e[o]);if(0!==s)return s}return wt(s,a)}function kt(t,e){return t===e?0:t<e?-1:1}class Dt{constructor(t){this._callbacks={},this._disabled={},this._entity=t}add(t,e){let i=this._callbacks[t];return void 0===i&&(i=this._callbacks[t]=[]),i.push(e),this._entity._markDirtyKey(t),new tt.W_(()=>{et.dm(i,e)&&this._entity._markDirtyKey(t)})}remove(t){const e=this._callbacks[t];void 0!==e&&(delete this._callbacks[t],0!==e.length&&this._entity._markDirtyKey(t))}enable(t){this._disabled[t]&&(delete this._disabled[t],this._entity._markDirtyKey(t))}disable(t){this._disabled[t]||(this._disabled[t]=!0,this._entity._markDirtyKey(t))}fold(t,e){if(!this._disabled[t]){const i=this._callbacks[t];if(void 0!==i)for(let s=0,a=i.length;s<a;++s)e=i[s](e,this._entity,t)}return e}}class Tt{constructor(t,e,i,s,a,n,o){this._time=0,this._stopped=!1,this._playing=!0,this.events=new st,this._animation=t,this._from=e,this._to=i,this._duration=s,this._easing=a,this._loops=n,this._interpolate=(0,Z.Kh)(e,i),this._oldTime=o}get to(){return this._to}get from(){return this._from}get playing(){return this._playing}get stopped(){return this._stopped}stop(){this._stopped||(this._stopped=!0,this._playing=!1,this.events.isEnabled("stopped")&&this.events.dispatch("stopped",{type:"stopped",target:this}))}pause(){this._playing=!1,this._oldTime=null}play(){this._stopped||this._playing||(this._playing=!0,this._animation._startAnimation())}get percentage(){return this._time/this._duration}waitForStop(){return new Promise((t,e)=>{if(this._stopped)t();else{const e=()=>{i.dispose(),t()},i=this.events.on("stopped",e)}})}_checkEnded(){return!(this._loops>1)||(--this._loops,!1)}_run(t){null!==this._oldTime&&(this._time+=t-this._oldTime,this._time>this._duration&&(this._time=this._duration)),this._oldTime=t}_reset(t){this._oldTime=t,this._time=0}_value(t){return t>=1?this._to:t<=0?this._from:this._interpolate(this._easing(t),this._from,this._to)}}let Pt=0;class At{constructor(t){this.uid=++Pt,this._privateSettings={},this._settingEvents={},this._privateSettingEvents={},this._prevSettings={},this._prevPrivateSettings={},this._animatingSettings={},this._animatingPrivateSettings={},this._disposed=!1,this._userProperties={},this.enableDispose=!0,this._settings=t}_checkDirty(){dt.HP(this._settings).forEach(t=>{this._userProperties[t]=!0,this._markDirtyKey(t)})}resetUserSettings(){this._userProperties={}}
1_runAnimation(t){let e=Z.oA.Stopped;if(!this.isDisposed()){let i=!1,s=!1;dt.__(this._animatingSettings,(e,a)=>{if(a.stopped)this._stopAnimation(e);else if(a.playing){a._run(t);const s=a.percentage;s>=1?a._checkEnded()?this.set(e,a._value(1)):(i=!0,a._reset(t),this._set(e,a._value(1))):(i=!0,this._set(e,a._value(s)))}else s=!0}),dt.__(this._animatingPrivateSettings,(e,a)=>{if(a.stopped)this._stopAnimationPrivate(e);else if(a.playing){a._run(t);const s=a.percentage;s>=1?a._checkEnded()?this.setPrivate(e,a._value(1)):(i=!0,a._reset(t),this._setPrivate(e,a._value(1))):(i=!0,this._setPrivate(e,a._value(s)))}else s=!0}),i?e=Z.oA.Playing:s&&(e=Z.oA.Paused)}return e}_markDirtyKey(t){this.markDirty()}_markDirtyPrivateKey(t){this.markDirty()}on(t,e){let i=this._settingEvents[t];return void 0===i&&(i=this._settingEvents[t]=[]),i.push(e),new tt.W_(()=>{et.dm(i,e),0===i.length&&delete this._settingEvents[t]})}off(t,e){let i=this._settingEvents[t];void 0!==i&&void 0!==e?et.dm(i,e):delete this._settingEvents[t]}onPrivate(t,e){let i=this._privateSettingEvents[t];return void 0===i&&(i=this._privateSettingEvents[t]=[]),i.push(e),new tt.W_(()=>{et.dm(i,e),0===i.length&&delete this._privateSettingEvents[t]})}offPrivate(t,e){let i=this._privateSettingEvents[t];void 0!==i&&void 0!==e?et.dm(i,e):delete this._privateSettingEvents[t]}getRaw(t,e){const i=this._settings[t];return void 0!==i?i:e}has(t){return t in this._settings}get(t,e){return this.getRaw(t,e)}_sendKeyEvent(t,e){const i=this._settingEvents[t];void 0!==i&&et.__(i,i=>{i(e,this,t)})}_sendPrivateKeyEvent(t,e){const i=this._privateSettingEvents[t];void 0!==i&&et.__(i,i=>{i(e,this,t)})}_setRaw(t,e,i){this._prevSettings[t]=e,this._sendKeyEvent(t,i)}setRaw(t,e){const i=this._settings[t];this._settings[t]=e,i!==e&&this._setRaw(t,i,e)}_set(t,e){const i=this._settings[t];this._settings[t]=e,i!==e&&(this._setRaw(t,i,e),this._markDirtyKey(t))}_stopAnimation(t){const e=this._animatingSettings[t];e&&(delete this._animatingSettings[t],e.stop())}set(t,e){return this._set(t,e),this._stopAnimation(t),e}remove(t){t in this._settings&&(this._prevSettings[t]=this._settings[t],delete this._settings[t],this._sendKeyEvent(t,void 0),this._markDirtyKey(t)),this._stopAnimation(t)}removeAll(){et.__(dt.HP(this._settings),t=>{this.remove(t)})}getPrivate(t,e){const i=this._privateSettings[t];return void 0!==i?i:e}_setPrivateRaw(t,e,i){this._prevPrivateSettings[t]=e,this._sendPrivateKeyEvent(t,i)}setPrivateRaw(t,e){const i=this._privateSettings[t];this._privateSettings[t]=e,i!==e&&this._setPrivateRaw(t,i,e)}_setPrivate(t,e){const i=this._privateSettings[t];this._privateSettings[t]=e,i!==e&&(this._setPrivateRaw(t,i,e),this._markDirtyPrivateKey(t))}_stopAnimationPrivate(t){const e=this._animatingPrivateSettings[t];e&&(e.stop(),delete this._animatingPrivateSettings[t])}setPrivate(t,e){return this._setPrivate(t,e),this._stopAnimationPrivate(t),e}removePrivate(t){t in this._privateSettings&&(this._prevPrivateSettings[t]=this._privateSettings[t],delete this._privateSettings[t],this._markDirtyPrivateKey(t)),this._stopAnimationPrivate(t)}setAll(t){dt.__(t,(t,e)=>{this.set(t,e)})}animate(t){const e=t.key,i=t.to,s=t.duration||0,a=t.loops||1,n=void 0===t.from?this.get(e):t.from,o=void 0===t.easing?ut:t.easing;if(0===s)this.set(e,i);else{if(void 0!==n&&n!==i){this.set(e,n);const t=this._animatingSettings[e]=new Tt(this,n,i,s,o,a,this._animationTime());return this._startAnimation(),t}this.set(e,i)}const r=new Tt(this,n,i,s,o,a,null);return r.stop(),r}animatePrivate(t){const e=t.key,i=t.to,s=t.duration||0,a=t.loops||1,n=void 0===t.from?this.getPrivate(e):t.from,o=void 0===t.easing?ut:t.easing;if(0===s)this.setPrivate(e,i);else{if(void 0!==n&&n!==i){this.setPrivate(e,n);const t=this._animatingPrivateSettings[e]=new Tt(this,n,i,s,o,a,this._animationTime());return this._startAnimation(),t}this.setPrivate(e,i)}const r=new Tt(this,n,i,s,o,a,null);return r.stop(),r}_dispose(){}isDisposed(){return this._disposed}dispose(){this.enableDispose&&!this._disposed&&(this._disposed=!0,this._dispose())}}class St extends At{constructor(t,e,i,s=[]){if(super(e),this.states=new yt(this),this.adapters=new Dt(this),this.events=this._createEvents(),this._userPrivateProperties={},this._dirty={},this._dirtyPrivate={},this._templates=[],this._defaultThemes=[],this._templateDisposers=[],this._disposers=[],this._runSetup=!0,this._disposerProperties={},!i)throw new Error("You cannot use `new Class()`, instead use `Class.new()`");this._root=t,this._internalTemplates=s,e.id&&this._registerId(e.id)}static new(t,e,i){const s=new this(t,e,!0);return s._template=i,s._afterNew(),s}static _new(t,e,i=[]){const s=new this(t,e,!0,i);return s._afterNew(),s}_afterNew(){this._checkDirty();let t=!1;const e=this._template;e&&(t=!0,e._setObjectTemplate(this)),et.__(this._internalTemplates,e=>{t=!0,e._setObjectTemplate(this)}),t&&this._applyTemplates(!1),this.states.create("default",{}),this._setDefaults()}_afterNewApplyThemes(){this._checkDirty();const t=this._template;t&&t._setObjectTemplate(this),et.__(this._internalTemplates,t=>{t._setObjectTemplate(this)}),this.states.create("default",{}),this._setDefaults(),this._applyThemes()}_createEvents(){return new st}get classNames(){return this.constructor.classNames}get className(){return this.constructor.className}_setDefaults(){}_setDefaultFn(t,e){const i=this.get(t);if(i)return i;{const i=e();return this.set(t,i),i}}_setDefault(t,e){this.has(t)||super.set(t,e)}_setRawDefault(t,e){this.has(t)||super.setRaw(t,e)}
1_clearDirty(){dt.HP(this._dirty).forEach(t=>{this._dirty[t]=!1}),dt.HP(this._dirtyPrivate).forEach(t=>{this._dirtyPrivate[t]=!1})}isDirty(t){return!!this._dirty[t]}isPrivateDirty(t){return!!this._dirtyPrivate[t]}_markDirtyKey(t){this._dirty[t]=!0,super._markDirtyKey(t)}_markDirtyPrivateKey(t){this._dirtyPrivate[t]=!0,super._markDirtyKey(t)}isType(t){return-1!==this.classNames.indexOf(t)}_pushPropertyDisposer(t,e){let i=this._disposerProperties[t];return void 0===i&&(i=this._disposerProperties[t]=[]),i.push(e),e}_disposeProperty(t){const e=this._disposerProperties[t];void 0!==e&&(et.__(e,t=>{t.dispose()}),delete this._disposerProperties[t])}set template(t){const e=this._template;e!==t&&(this._template=t,e&&e._removeObjectTemplate(this),t&&t._setObjectTemplate(this),this._applyTemplates())}get template(){return this._template}markDirty(){this._root._addDirtyEntity(this)}_startAnimation(){this._root._addAnimation(this)}_animationTime(){return this._root.animationTime}_applyState(t){}_applyStateAnimated(t,e){}get(t,e){const i=this.adapters.fold(t,this._settings[t]);return void 0!==i?i:e}isUserSetting(t){return this._userProperties[t]||!1}set(t,e){return this._userProperties[t]=!0,super.set(t,e)}setRaw(t,e){this._userProperties[t]=!0,super.setRaw(t,e)}_setSoft(t,e){return this._userProperties[t]?e:super.set(t,e)}remove(t){delete this._userProperties[t],this._removeTemplateProperty(t)}setPrivate(t,e){return this._userPrivateProperties[t]=!0,super.setPrivate(t,e)}setPrivateRaw(t,e){this._userPrivateProperties[t]=!0,super.setPrivateRaw(t,e)}removePrivate(t){delete this._userPrivateProperties[t],this._removeTemplatePrivateProperty(t)}_setTemplateProperty(t,e,i){if(!this._userProperties[e]){const s=this._findTemplateByKey(e);t===s&&super.set(e,i)}}_setTemplatePrivateProperty(t,e,i){if(!this._userPrivateProperties[e]){const s=this._findTemplateByPrivateKey(e);t===s&&super.setPrivate(e,i)}}_removeTemplateProperty(t){if(!this._userProperties[t]){const e=this._findTemplateByKey(t);e?super.set(t,e._settings[t]):super.remove(t)}}_removeTemplatePrivateProperty(t){if(!this._userPrivateProperties[t]){const e=this._findTemplateByPrivateKey(t);e?super.setPrivate(t,e._privateSettings[t]):super.removePrivate(t)}}_walkParents(t){t(this._root._rootContainer),t(this)}_applyStateByKey(t){const e=this.states.create(t,{}),i={};this._eachTemplate(s=>{const a=s.states.lookup(t);a&&a._apply(e,i)}),dt.__(e._settings,t=>{i[t]||e._userSettings[t]||e.remove(t)})}_applyTemplate(t,e){this._templateDisposers.push(t._apply(this,e)),dt.__(t._settings,(t,i)=>{e.settings[t]||this._userProperties[t]||(e.settings[t]=!0,super.set(t,i))}),dt.__(t._privateSettings,(t,i)=>{e.privateSettings[t]||this._userPrivateProperties[t]||(e.privateSettings[t]=!0,super.setPrivate(t,i))}),this._runSetup&&t.setup&&(this._runSetup=!1,t.setup(this))}_findStaticTemplate(t){if(this._template&&t(this._template))return this._template}_eachTemplate(t){this._findStaticTemplate(e=>(t(e),!1)),et.W$(this._internalTemplates,t),et.__(this._templates,t)}_applyTemplates(t=!0){t&&this._disposeTemplates();const e={settings:{},privateSettings:{},states:{}};this._eachTemplate(t=>{this._applyTemplate(t,e)}),t&&(dt.__(this._settings,t=>{this._userProperties[t]||e.settings[t]||super.remove(t)}),dt.__(this._privateSettings,t=>{this._userPrivateProperties[t]||e.privateSettings[t]||super.removePrivate(t)}))}_findTemplate(t){const e=this._findStaticTemplate(t);if(void 0===e){const e=et.um(this._internalTemplates,t);return void 0===e?et.I6(this._templates,t):e}return e}_findTemplateByKey(t){return this._findTemplate(e=>t in e._settings)}_findTemplateByPrivateKey(t){return this._findTemplate(e=>t in e._privateSettings)}_disposeTemplates(){et.__(this._templateDisposers,t=>{t.dispose()}),this._templateDisposers.length=0}_removeTemplates(){et.__(this._templates,t=>{t._removeObjectTemplate(this)}),this._templates.length=0}_applyThemes(t=!1){if(this.get("ignoreThemes"))return!1;let e=!1;const i=[];let s=[];const a=new Set,n=this.get("themeTagsSelf");return n&&et.__(n,t=>{a.add(t)}),this._walkParents(t=>{t===this._root._rootContainer&&(e=!0),t._defaultThemes.length>0&&i.push(t._defaultThemes);const n=t.get("themes");n&&s.push(n);const o=t.get("themeTags");o&&et.__(o,t=>{a.add(t)})}),s=i.concat(s),this._removeTemplates(),(e||t)&&et.W$(this.classNames,t=>{const e=[];et.__(s,i=>{et.__(i,i=>{const s=i._lookupRules(t);s&&et.W$(s,t=>{const i=t.tags.every(t=>a.has(t));if(i){const i=et.wo(e,e=>{const i=wt(t.tags.length,e.tags.length);return 0===i?Ct(t.tags,e.tags,wt):i});e.splice(i.index,0,t)}})})}),et.__(e,t=>{this._templates.push(t.template),t.template._setObjectTemplate(this)})}),this._applyTemplates(),(e||t)&&(this._runSetup=!1),e||t}_changed(){}_beforeChanged(){if(this.isDirty("id")){const t=this.get("id");t&&this._registerId(t);const e=this._prevSettings.id;e&&(delete this._root.entitiesById[e],delete bt.entitiesById[e])}}_registerId(t){if(this._root.entitiesById[t]&&this._root.entitiesById[t]!==this)throw new Error('An entity with id "'+t+'" already exists.');this._root.entitiesById[t]=this,bt.entitiesById[t]=this}_afterChanged(){}addDisposer(t){return this._disposers.push(t),t}_dispose(){super._dispose();const t=this._template;t&&t._removeObjectTemplate(this),et.__(this._internalTemplates,t=>{t._removeObjectTemplate(this)}),this._removeTemplates(),this._disposeTemplates(),this.events.dispose(),this._disposers.forEac
1h(t=>{t.dispose()}),dt.__(this._disposerProperties,(t,e)=>{et.__(e,t=>{t.dispose()})});const e=this.get("id");e&&(delete this._root.entitiesById[e],delete bt.entitiesById[e])}setTimeout(t,e){const i=setTimeout(()=>{this.removeDispose(s),t()},e),s=new tt.W_(()=>{clearTimeout(i)});return this._disposers.push(s),s}removeDispose(t){if(!this.isDisposed()){let e=et.qh(this._disposers,t);e>-1&&this._disposers.splice(e,1)}t.dispose()}hasTag(t){return-1!==et.qh(this.get("themeTags",[]),t)}addTag(t){if(!this.hasTag(t)){const e=this.get("themeTags",[]);e.push(t),this.set("themeTags",e)}}removeTag(t){if(this.hasTag(t)){const e=this.get("themeTags",[]);et.TF(e,t),this.set("themeTags",e)}}_t(t,e,...i){return this._root.language.translate(t,e,...i)}get root(){return this._root}}function Mt(t){dt.__(t,(t,e)=>{it.Gv(e)&&"function"===typeof e.dispose&&(e.enableDispose=!0,e.dispose())})}St.className="Entity",St.classNames=["Entity"];class Et{constructor(t,e,i){this._name=t,this._template=e,this._settings=i}_dispose(){Mt(this._settings)}get(t,e){const i=this._settings[t];return void 0!==i?i:e}set(t,e){this._settings[t]=e,this._template._stateChanged(this._name)}remove(t){delete this._settings[t],this._template._stateChanged(this._name)}setAll(t){dt.HP(t).forEach(e=>{this._settings[e]=t[e]}),this._template._stateChanged(this._name)}_apply(t,e){dt.__(this._settings,(i,s)=>{e[i]||t._userSettings[i]||(e[i]=!0,t.setRaw(i,s))})}}class It{constructor(t){this._states={},this._template=t}_dispose(){dt.__(this._states,(t,e)=>{e._dispose()})}lookup(t){return this._states[t]}create(t,e){const i=this._states[t];if(i)return i.setAll(e),i;{const i=new Et(t,this._template,e);return this._states[t]=i,this._template._stateChanged(t),i}}remove(t){delete this._states[t],this._template._stateChanged(t)}_apply(t,e){dt.__(this._states,(i,s)=>{let a=e.states[i];null==a&&(a=e.states[i]={});const n=t.states.create(i,{});s._apply(n,a)})}}class Rt{constructor(){this._callbacks={}}add(t,e){let i=this._callbacks[t];return void 0===i&&(i=this._callbacks[t]=[]),i.push(e),new tt.W_(()=>{et.dm(i,e),0===i.length&&delete this._callbacks[t]})}remove(t){const e=this._callbacks[t];void 0!==e&&delete this._callbacks[t]}_apply(t){const e=[];return dt.__(this._callbacks,(i,s)=>{et.__(s,s=>{e.push(t.adapters.add(i,s))})}),new tt.ZT(e)}}class Lt{constructor(t,e){if(this._disposed=!1,this._privateSettings={},this._settingEvents={},this._privateSettingEvents={},this._entities=[],this.states=new It(this),this.adapters=new Rt,this.events=new st,!e)throw new Error("You cannot use `new Class()`, instead use `Class.new()`");this._settings=t}static new(t){return new Lt(t,!0)}_dispose(){Mt(this._settings),Mt(this._privateSettings)}isDisposed(){return this._disposed}dispose(){this._disposed||(this._disposed=!0,this._dispose())}_checkDisposed(){if(this._disposed)throw new Error("Template is disposed")}get entities(){return this._entities}get(t,e){this._checkDisposed();const i=this._settings[t];return void 0!==i?i:e}setRaw(t,e){this._checkDisposed(),this._settings[t]=e}set(t,e){this._checkDisposed(),this._settings[t]!==e&&(this.setRaw(t,e),this._entities.forEach(i=>{i._setTemplateProperty(this,t,e)}))}remove(t){this._checkDisposed(),t in this._settings&&(delete this._settings[t],this._entities.forEach(e=>{e._removeTemplateProperty(t)}))}removeAll(){this._checkDisposed(),dt.__(this._settings,(t,e)=>{this.remove(t)})}getPrivate(t,e){this._checkDisposed();const i=this._privateSettings[t];return void 0!==i?i:e}setPrivateRaw(t,e){return this._checkDisposed(),this._privateSettings[t]=e,e}setPrivate(t,e){return this._checkDisposed(),this._privateSettings[t]!==e&&(this.setPrivateRaw(t,e),this._entities.forEach(i=>{i._setTemplatePrivateProperty(this,t,e)})),e}removePrivate(t){this._checkDisposed(),t in this._privateSettings&&(delete this._privateSettings[t],this._entities.forEach(e=>{e._removeTemplatePrivateProperty(t)}))}setAll(t){this._checkDisposed(),dt.__(t,(t,e)=>{this.set(t,e)})}on(t,e){this._checkDisposed();let i=this._settingEvents[t];return void 0===i&&(i=this._settingEvents[t]=[]),i.push(e),new tt.W_(()=>{et.dm(i,e),0===i.length&&delete this._settingEvents[t]})}onPrivate(t,e){this._checkDisposed();let i=this._privateSettingEvents[t];return void 0===i&&(i=this._privateSettingEvents[t]=[]),i.push(e),new tt.W_(()=>{et.dm(i,e),0===i.length&&delete this._privateSettingEvents[t]})}_apply(t,e){this._checkDisposed();const i=[];return dt.__(this._settingEvents,(e,s)=>{et.__(s,s=>{i.push(t.on(e,s))})}),dt.__(this._privateSettingEvents,(e,s)=>{et.__(s,s=>{i.push(t.onPrivate(e,s))})}),this.states._apply(t,e),i.push(this.adapters._apply(t)),i.push(t.events.copyFrom(this.events)),new tt.ZT(i)}_setObjectTemplate(t){this._checkDisposed(),this._entities.push(t)}_removeObjectTemplate(t){et.TF(this._entities,t)}
1_stateChanged(t){this._checkDisposed(),this._entities.forEach(e=>{e._applyStateByKey(t)})}}var Ft=i(78135);const Bt=Math.PI,Ot=Bt/180,Nt=180/Bt;function zt(t,e,i){if(!(0,it.Et)(e)||e<=0){let e=Math.round(t);return i&&e-t==.5&&e--,e}{let i=Math.pow(10,e);return Math.round(t*i)/i}}function Yt(t,e){if(!(0,it.Et)(e)||e<=0)return Math.ceil(t);{let i=Math.pow(10,e);return Math.ceil(t*i)/i}}function Ut(t,e,i){return Math.min(Math.max(t,e),i)}function Ht(t){return Math.sin(Ot*t)}function Vt(t){return Math.cos(Ot*t)}function Xt(t){return t%=360,t<0&&(t+=360),t}function Gt(t,e,i,s,a){let n=Number.MAX_VALUE,o=Number.MAX_VALUE,r=-Number.MAX_VALUE,l=-Number.MAX_VALUE,h=[];h.push(qt(a,i)),h.push(qt(a,s));let c=Math.min(90*Math.floor(i/90),90*Math.floor(s/90)),d=Math.max(90*Math.ceil(i/90),90*Math.ceil(s/90));for(let u=c;u<=d;u+=90)u>=i&&u<=s&&h.push(qt(a,u));for(let u=0;u<h.length;u++){let t=h[u];t.x<n&&(n=t.x),t.y<o&&(o=t.y),t.x>r&&(r=t.x),t.y>l&&(l=t.y)}return{left:t+n,top:e+o,right:t+r,bottom:e+l}}function qt(t,e){return{x:t*Vt(e),y:t*Ht(e)}}function Wt(t){const e=t.length;if(e>0){let i=t[0],s=i.left,a=i.top,n=i.right,o=i.bottom;if(e>1)for(let r=1;r<e;r++)i=t[r],s=Math.min(i.left,s),n=Math.max(i.right,n),a=Math.min(i.top,a),o=Math.max(i.bottom,o);return{left:s,right:n,top:a,bottom:o}}return{left:0,right:0,top:0,bottom:0}}function jt(t,e){return t.x>=e.left&&t.y>=e.top&&t.x<=e.right&&t.y<=e.bottom}class Qt extends st{constructor(t){super(),this._rendererDisposers={},this._dispatchParents=!0,this._sprite=t}_makePointerEvent(t,e){return{type:t,originalEvent:e.event,point:e.point,simulated:e.simulated,native:e.native,target:this._sprite}}_onRenderer(t,e){this._sprite.set("interactive",!0),this._sprite._display.interactive=!0;let i=this._rendererDisposers[t];if(void 0===i){const s=this._sprite._display.on(t,t=>{e.call(this,t)});i=this._rendererDisposers[t]=new tt.Wr(()=>{delete this._rendererDisposers[t],s.dispose()})}return i.increment()}_on(t,e,i,s,a,n,o){const r=super._on(t,e,i,s,a,n,o),l=Qt.RENDERER_EVENTS[e];return void 0!==l&&(r.disposer=new tt.ZT([r.disposer,this._onRenderer(e,l)])),r}stopParentDispatch(){this._dispatchParents=!1}dispatchParents(t,e){const i=this._dispatchParents;this._dispatchParents=!0;try{this.dispatch(t,e),this._dispatchParents&&this._sprite.parent&&this._sprite.parent.events.dispatchParents(t,e)}finally{this._dispatchParents=i}}}Qt.RENDERER_EVENTS={click:function(t){this.isEnabled("click")&&!this._sprite.isDragging()&&this._sprite._hasDown()&&!this._sprite._hasMoved(this._makePointerEvent("click",t))&&this.dispatch("click",this._makePointerEvent("click",t))},rightclick:function(t){this.isEnabled("rightclick")&&this.dispatch("rightclick",this._makePointerEvent("rightclick",t))},middleclick:function(t){this.isEnabled("middleclick")&&this.dispatch("middleclick",this._makePointerEvent("middleclick",t))},dblclick:function(t){this.dispatchParents("dblclick",this._makePointerEvent("dblclick",t))},pointerover:function(t){const e=this._sprite;let i=!0;if(e.getPrivate("trustBounds")){e._getBounds();const s=e.globalBounds();if(e.isType("Graphics")){const t=e.get("strokeWidth",1)/2;t>=1&&(s.left-=t,s.right+=t,s.top-=t,s.bottom+=t)}jt(t.point,s)||(i=!1,e._root._renderer.removeHovering(e._display))}i&&this.isEnabled("pointerover")&&this.dispatch("pointerover",this._makePointerEvent("pointerover",t))},pointerout:function(t){this.isEnabled("pointerout")&&this.dispatch("pointerout",this._makePointerEvent("pointerout",t))},pointerdown:function(t){this.dispatchParents("pointerdown",this._makePointerEvent("pointerdown",t))},pointerup:function(t){this.isEnabled("pointerup")&&this.dispatch("pointerup",this._makePointerEvent("pointerup",t))},globalpointerup:function(t){this.isEnabled("globalpointerup")&&this.dispatch("globalpointerup",this._makePointerEvent("globalpointerup",t))},globalpointermove:function(t){this.isEnabled("globalpointermove")&&this.dispatch("globalpointermove",this._makePointerEvent("globalpointermove",t))},wheel:function(t){this.dispatchParents("wheel",{type:"wheel",target:this._sprite,originalEvent:t.event,point:t.point})}};class Jt extends St{constructor(){super(...arguments),this._adjustedLocalBounds={left:0,right:0,top:0,bottom:0},this._localBounds={left:0,right:0,top:0,bottom:0},this._sizeDirty=!1,this._isDragging=!1,this._isHidden=!1,this._isShowing=!1,this._isHiding=!1,this._isDown=!1,this._downPoints={}}_afterNew(){this.setPrivateRaw("visible",!0),super._afterNew()}markDirtyKey(t){this._markDirtyKey(t)}_markDirtyKey(t){super._markDirtyKey(t),"x"!=t&&"y"!=t&&"dx"!=t&&"dy"!=t||(this.markDirtyBounds(),this._addPercentagePositionChildren(),this.markDirtyPosition())}_markDirtyPrivateKey(t){super._markDirtyPrivateKey(t),"x"!=t&&"y"!=t||this.markDirtyPosition()}_removeTemplateField(){this._templateField&&this._templateField._removeObjectTemplate(this)}_createEvents(){return new Qt(this)}_processTemplateField(){let t;const e=this.get("templateField");if(e){const i=this.dataItem;if(i){const s=i.dataContext;s&&(t=s[e],t instanceof Lt||!t||(t=Lt.new(t)))}}this._templateField!==t&&(this._removeTemplateField(),this._templateField=t,t&&t._setObjectTemplate(this),this._applyTemplates())}_setDataItem(t){const e=this._dataItem;this._dataItem=t,this._processTemplateField();const i="dataitemchanged";t!=e&&this.events.isEnabled(i)&&this.events.dispatch(i,{type:i,target:this,oldDataItem:e,newDataItem:t})}set dataItem(t){this._setDataItem(t)}get dataItem(){if(this._dataItem)return this._dataItem;{let t=this._parent;while(t){if(t._dataItem)return t._dataItem;t=t._parent}}}_addPercentageSizeChildren(){let t=this.parent;t&&(this.get("width")instanceof ht.QE||this.get("height")instanceof ht.QE?et.JJ(t._percentageSizeChildren,this):et.dm(t._percentageSizeChildren,this))}_addPercentagePositionChildren(){let t=this.parent;t&&(this.get("x")instanceof ht.QE||this.get("y")instanceof ht.QE?et.JJ(t._percentagePositionChildren,this):et.dm(t._percentagePositionChildren,this))}markDirtyPosition(){this._root._addDirtyPosition(this)}updatePivotPoint(){const t=this._localBounds;if(t){const e=this.get("centerX");null!=e&&(this._display.pivot.x=t.left+Ft.JY(e,t.right-t.left));const i=this.get("centerY");null!=i&&(this._display.pivot.y=t.top+Ft.JY(i,t.bottom-t.top))}}_beforeChanged(){if(super._beforeChanged(),this._handleStates(),this.isDirty("tooltip")){const t=this._prevSettings.tooltip;t&&t.dispose()}if((this.isDirty("layer")||this.isDirty("layerMargin"))&&(this._display.setLayer(this.get("layer"),this.get("layerMargin")),this.markDirtyLayer()),this.isDirty("tooltipPosition")){const t=this._tooltipMoveDp;t&&(t.dispose(),this._tooltipMoveDp=void 0);const e=this._tooltipPointerDp;
1e&&(e.dispose(),this._tooltipPointerDp=void 0),"pointer"==this.get("tooltipPosition")&&(this.isHover()&&(this._tooltipMoveDp=this.events.on("globalpointermove",t=>{this.showTooltip(t.point)})),this._tooltipPointerDp=new tt.ZT([this.events.on("pointerover",()=>{this._tooltipMoveDp=this.events.on("globalpointermove",t=>{this.showTooltip(t.point)})}),this.events.on("pointerout",()=>{const t=this._tooltipMoveDp;t&&(t.dispose(),this._tooltipMoveDp=void 0)})]))}}_handleStates(){this.isDirty("active")&&(this.get("active")?(this.states.applyAnimate("active"),this.set("ariaChecked",!0)):(this.isHidden()||this.states.applyAnimate("default"),this.set("ariaChecked",!1)),this.markDirtyAccessibility()),this.isDirty("disabled")&&(this.get("disabled")?(this.states.applyAnimate("disabled"),this.set("ariaChecked",!1)):(this.isHidden()||this.states.applyAnimate("default"),this.set("ariaChecked",!0)),this.markDirtyAccessibility())}_changed(){super._changed();const t=this._display,e=this.events;if(this.isDirty("draggable")){const i=this.get("draggable");i?(this.set("interactive",!0),this._dragDp=new tt.ZT([e.on("pointerdown",t=>{this.dragStart(t)}),e.on("globalpointermove",t=>{this.dragMove(t)}),e.on("globalpointerup",t=>{this.dragStop(t)})])):this._dragDp&&(this._dragDp.dispose(),this._dragDp=void 0),t.cancelTouch=!!i}if(this.isDirty("tooltipText")||this.isDirty("tooltipHTML")||this.isDirty("showTooltipOn")){const t=this.get("tooltipText"),i=this.get("tooltipHTML"),s=this.get("showTooltipOn","hover");this._tooltipDp&&(this._tooltipDp.dispose(),this._tooltipDp=void 0),(t||i)&&("click"==s?(this._tooltipDp=new tt.ZT([e.on("click",()=>{this.setTimeout(()=>{const t=this.getTooltip();t&&!t.isHidden()&&t.get("tooltipTarget")===this?this.hideTooltip():this.showTooltip()},10)}),Ft.q2(document,"click",t=>{this.hideTooltip()})]),this._disposers.push(this._tooltipDp)):"always"==s||(this._tooltipDp=new tt.ZT([e.on("pointerover",()=>{this.showTooltip()}),e.on("pointerout",()=>{this.hideTooltip()})]),this._disposers.push(this._tooltipDp)))}if(this.isDirty("toggleKey")){let t=this.get("toggleKey");t&&"none"!=t?this._toggleDp=e.on("click",()=>{this._isDragging||this.set(t,!this.get(t))}):this._toggleDp&&(this._toggleDp.dispose(),this._toggleDp=void 0)}if(this.isDirty("opacity")&&(t.alpha=Math.max(0,this.get("opacity",1)),this.get("focusable")&&this.markDirtyAccessibility()),this.isDirty("rotation")&&(this.markDirtyBounds(),t.angle=this.get("rotation",0)),this.isDirty("scale")&&(this.markDirtyBounds(),t.scale=this.get("scale",0)),(this.isDirty("centerX")||this.isDirty("centerY"))&&(this.markDirtyBounds(),this.updatePivotPoint()),(this.isDirty("visible")||this.isPrivateDirty("visible")||this.isDirty("forceHidden"))&&(this.get("visible")&&this.getPrivate("visible")&&!this.get("forceHidden")?t.visible=!0:(t.visible=!1,this.hideTooltip()),this.markDirtyBounds(),this.get("focusable")&&this.markDirtyAccessibility()),this.isDirty("width")||this.isDirty("height")){this.markDirtyBounds(),this._addPercentageSizeChildren();const t=this.parent;t&&(this.isDirty("width")&&this.get("width")instanceof ht.QE||this.isDirty("height")&&this.get("height")instanceof ht.QE)&&(t.markDirty(),t._prevWidth=0),this._sizeDirty=!0}if((this.isDirty("maxWidth")||this.isDirty("maxHeight")||this.isPrivateDirty("width")||this.isPrivateDirty("height")||this.isDirty("minWidth")||this.isDirty("minHeight")||this.isPrivateDirty("maxWidth")||this.isPrivateDirty("maxHeight")||this.isPrivateDirty("minWidth")||this.isPrivateDirty("minHeight")||this.isDirty("marginLeft")||this.isDirty("marginTop")||this.isDirty("marginRight")||this.isDirty("marginBottom"))&&(this.markDirtyBounds(),this._sizeDirty=!0),this._sizeDirty&&this._updateSize(),this.isDirty("wheelable")){const e=this.get("wheelable");e&&this.set("interactive",!0),t.wheelable=!!e}(this.isDirty("tabindexOrder")||this.isDirty("focusableGroup"))&&(this.get("focusable")?this._root._registerTabindexOrder(this):this._root._unregisterTabindexOrder(this)),this.isDirty("filter")&&(t.filter=this.get("filter"));let i=this.get("filter","");if(this.isDirty("blur")){const t=this.get("blur",0);0!=t&&(i+=" blur("+t+"px)")}if(this.isDirty("saturate")){const t=this.get("saturate",1);1!=t&&(i+=" saturate("+t+")")}if(this.isDirty("brightness")){const t=this.get("brightness",1);1!=t&&(i+=" brightness("+t+")")}if(this.isDirty("contrast")){const t=this.get("contrast",1);1!=t&&(i+=" contrast("+t+")")}if(this.isDirty("sepia")){const t=this.get("sepia",0);0!=t&&(i+=" sepia("+t+")")}if(this.isDirty("hue")){const t=this.get("hue",0);0!=t&&(i+=" hue-rotate("+t+"deg)")}if(this.isDirty("invert")){const t=this.get("invert",0);0!=t&&(i+=" invert("+t+")")}if(i&&(t.filter=i),this.isDirty("cursorOverStyle")&&(t.cursorOverStyle=this.get("cursorOverStyle")),this.isDirty("hoverOnFocus")&&(this.get("hoverOnFocus")?this._focusDp=new tt.ZT([e.on("focus",()=>{this.showTooltip()}),e.on("blur",()=>{this.hideTooltip()})]):this._focusDp&&(this._focusDp.dispose(),this._focusDp=void 0)),this.isDirty("focusable")&&(this.get("focusable")?this._root._registerTabindexOrder(this):this._root._unregisterTabindexOrder(this),this.markDirtyAccessibility(),this._disposers.push(e.on("blur",()=>{this.setPrivateRaw("touchHovering",!1)})),this._disposers.push(e.once("boundschanged",()=>{this.markDirtyAccessibility()}))),this.isPrivateDirty("focusable")&&this.markDirtyAccessibility(),(this.isDirty("role")||this.isDirty("ariaLive")||this.isDirty("ariaChecked")||this.isDirty("ariaHidden")||this.isDirty("ariaOrientation")||this.isDirty("ariaValueNow")||this.isDirty("ariaValueMin")||this.isDirty("ariaValueMax")||this.isDirty("ariaValueText")||this.isDirty("ariaLabel")||this.isDirty("ariaControl
1s"))&&this.markDirtyAccessibility(),this.isDirty("exportable")&&(t.exportable=this.get("exportable")),this.isDirty("interactive")){const t=this.events;this.get("interactive")&&!t.isDisposed()?this._hoverDp=new tt.ZT([t.on("click",t=>{Ft.kH(t.originalEvent)&&(this.getPrivate("touchHovering")||this.setTimeout(()=>{this._handleOver(),(this.get("tooltipText")||this.get("tooltipHTML"))&&this.showTooltip(),this.setPrivateRaw("touchHovering",!0),this.events.dispatch("pointerover",{type:"pointerover",target:t.target,originalEvent:t.originalEvent,point:t.point,simulated:t.simulated})},10))}),t.on("globalpointerup",t=>{Ft.kH(t.originalEvent)&&this.getPrivate("touchHovering")&&(this._handleOut(),(this.get("tooltipText")||this.get("tooltipHTML"))&&this.hideTooltip(),this.setPrivateRaw("touchHovering",!1),this.events.dispatch("pointerout",{type:"pointerout",target:t.target,originalEvent:t.originalEvent,point:t.point,simulated:t.simulated})),this._isDown&&this._handleUp(t)}),t.on("pointerover",()=>{this._handleOver()}),t.on("pointerout",()=>{this._handleOut()}),t.on("pointerdown",t=>{this._handleDown(t)})]):(this._display.interactive=!1,this._hoverDp&&(this._hoverDp.dispose(),this._hoverDp=void 0))}this.isDirty("forceInactive")&&(this._display.inactive=this.get("forceInactive",null)),"always"==this.get("showTooltipOn")&&this._display.visible&&this.showTooltip()}dragStart(t){this._dragEvent=t,this.events.stopParentDispatch()}dragStop(t){if(this._dragEvent=void 0,this._dragPoint=void 0,this.events.stopParentDispatch(),this._isDragging){this._isDragging=!1;const e="dragstop";this.events.isEnabled(e)&&this.events.dispatch(e,{type:e,target:this,originalEvent:t.originalEvent,point:t.point,simulated:t.simulated})}}_handleOver(){this.isHidden()||(this.get("active")&&this.states.lookup("hoverActive")?this.states.applyAnimate("hoverActive"):this.get("disabled")&&this.states.lookup("hoverDisabled")?this.states.applyAnimate("hoverDisabled"):this.states.applyAnimate("hover"),this.get("draggable")&&this._isDown&&this.states.lookup("down")&&this.states.applyAnimate("down"))}_handleOut(){this.isHidden()||(this.get("active")&&this.states.lookup("active")?this.states.applyAnimate("active"):this.get("disabled")&&this.states.lookup("disabled")?this.states.applyAnimate("disabled"):(this.states.lookup("hover")||this.states.lookup("hoverActive"))&&this.states.applyAnimate("default"),this.get("draggable")&&this._isDown&&this.states.lookup("down")&&this.states.applyAnimate("down"))}_handleUp(t){if(!this.isHidden()){this.get("active")&&this.states.lookup("active")?this.states.applyAnimate("active"):this.get("disabled")&&this.states.lookup("disabled")?this.states.applyAnimate("disabled"):this.states.lookup("down")&&(this.isHover()?this.states.applyAnimate("hover"):this.states.applyAnimate("default")),this._downPoint=void 0;const e=Ft.Dn(t.originalEvent);delete this._downPoints[e],0==dt.HP(this._downPoints).length&&(this._isDown=!1)}}_hasMoved(t){const e=Ft.Dn(t.originalEvent),i=this._downPoints[e];if(i){const e=Math.abs(i.x-t.point.x),s=Math.abs(i.y-t.point.y);return e>5||s>5}return!1}_hasDown(){return dt.HP(this._downPoints).length>0}_handleDown(t){const e=this.parent;if(e&&!this.get("draggable")&&e._handleDown(t),this.get("interactive")&&!this.isHidden()){this.states.lookup("down")&&this.states.applyAnimate("down"),this._downPoint={x:t.point.x,y:t.point.y},this._isDown=!0;const e=Ft.Dn(t.originalEvent);this._downPoints[e]={x:t.point.x,y:t.point.y}}}dragMove(t){let e=this._dragEvent;if(e){if(e.simulated&&!t.simulated)return!0;let i=0,s=this.parent,a=1;while(null!=s)i+=s.get("rotation",0),s=s.parent,s&&(a*=s.get("scale",1));let n=(t.point.x-e.point.x)/a,o=(t.point.y-e.point.y)/a;const r=this.events;if(e.simulated&&!this._isDragging){this._isDragging=!0,this._dragEvent=t,this._dragPoint={x:this.x(),y:this.y()};const e="dragstart";r.isEnabled(e)&&r.dispatch(e,{type:e,target:this,originalEvent:t.originalEvent,point:t.point,simulated:t.simulated})}if(this._isDragging){let e=this._dragPoint;this.set("x",e.x+n*Vt(i)+o*Ht(i)),this.set("y",e.y+o*Vt(i)-n*Ht(i));const s="dragged";r.isEnabled(s)&&r.dispatch(s,{type:s,target:this,originalEvent:t.originalEvent,point:t.point,simulated:t.simulated})}else if(Math.hypot(n,o)>5){this._isDragging=!0,this._dragEvent=t,this._dragPoint={x:this.x(),y:this.y()};const e="dragstart";r.isEnabled(e)&&r.dispatch(e,{type:e,target:this,originalEvent:t.originalEvent,point:t.point,simulated:t.simulated})}}}_updateSize(){}_getBounds(){this._localBounds=this._display.getLocalBounds()}depth(){let t=this.parent,e=0;while(1){if(!t)return e;++e,t=t.parent}}markDirtySize(){this._sizeDirty=!0,this.markDirty()}markDirtyBounds(){const t=this._display;
1if(this.get("isMeasured")){this._root._addDirtyBounds(this),t.isMeasured=!0,t.invalidateBounds();const e=this.parent;e&&"absolute"!=this.get("position")&&(null==e.get("width")||null==e.get("height")||e.get("layout"))&&e.markDirtyBounds(),this.get("focusable")&&this.markDirtyAccessibility()}}markDirtyAccessibility(){this._root._invalidateAccessibility(this)}markDirtyLayer(){this._display.markDirtyLayer(!0)}markDirty(){super.markDirty(),this.markDirtyLayer()}_updateBounds(){const t=this._adjustedLocalBounds;let e;if(this.get("visible")&&this.getPrivate("visible")&&!this.get("forceHidden")?(this._getBounds(),this._fixMinBounds(this._localBounds),this.updatePivotPoint(),this._adjustedLocalBounds=this._display.getAdjustedBounds(this._localBounds),e=this._adjustedLocalBounds):(e={left:0,right:0,top:0,bottom:0},this._localBounds=e,this._adjustedLocalBounds=e),!t||t.left!==e.left||t.top!==e.top||t.right!==e.right||t.bottom!==e.bottom){const t="boundschanged";this.events.isEnabled(t)&&this.events.dispatch(t,{type:t,target:this}),this.parent&&(this.parent.markDirty(),this.parent.markDirtyBounds()),this.getPrivate("showingTooltip")&&this.showTooltip()}}_fixMinBounds(t){let e=this.get("minWidth",this.getPrivate("minWidth")),i=this.get("minHeight",this.getPrivate("minHeight"));it.Et(e)&&t.right-t.left<e&&(t.right=t.left+e),it.Et(i)&&t.bottom-t.top<i&&(t.bottom=t.top+i);let s=this.getPrivate("width"),a=this.getPrivate("height");it.Et(s)&&(s>0?t.right=t.left+s:t.left=t.right+s),it.Et(a)&&(a>0?t.bottom=t.top+a:t.top=t.bottom+a)}_removeParent(t){t&&(t.children.removeValue(this),et.dm(t._percentageSizeChildren,this),et.dm(t._percentagePositionChildren,this))}_clearDirty(){super._clearDirty(),this._sizeDirty=!1}hover(){this.isDisposed()||(this.showTooltip(),this._handleOver())}unhover(){this.isDisposed()||(this.hideTooltip(),this._handleOut())}showTooltip(t){if(!this.isDisposed()){const e=this.getTooltip(),i=this.get("tooltipText"),s=this.get("tooltipHTML");if((i||s)&&e){const a=this.get("tooltipPosition"),n=this.getPrivate("tooltipTarget",this);if("fixed"!=a&&t||(this._display._setMatrix(),t=this.toGlobal(n._getTooltipPoint())),"pointer"==a){const e=this.getPrivate("lastTooltipCoords");if(e&&e.x==t.x&&e.y==t.y)return;this.setPrivate("lastTooltipCoords",t)}e.set("pointTo",t),e.set("tooltipTarget",n),e.get("x")||e.set("x",t.x),e.get("y")||e.set("y",t.y),i&&e.label.set("text",i),s&&e.label.set("html",s);const o=this.dataItem;if(o&&e.label._setDataItem(o),"always"==this.get("showTooltipOn")&&(t.x<0||t.x>this._root.width()||t.y<0||t.y>this._root.height()))return void this.hideTooltip();e.label.text.markDirtyText();const r=e.show();return this.setPrivateRaw("showingTooltip",!0),r}}}hideTooltip(){const t=this.getTooltip();if(t&&(this.removePrivate("lastTooltipCoords"),t.get("tooltipTarget")==this.getPrivate("tooltipTarget",this)||this.get("tooltip")==t)){let e=t.get("keepTargetHover")&&0==t.get("stateAnimationDuration",0)?400:void 0;const i=t.hide(e);return this.setPrivateRaw("showingTooltip",!1),i}}_getTooltipPoint(){const t=this._localBounds;if(t){let e=0,i=0;return this.get("isMeasured")?(e=t.left+Ft.JY(this.get("tooltipX",0),t.right-t.left),i=t.top+Ft.JY(this.get("tooltipY",0),t.bottom-t.top)):(e=Ft.JY(this.get("tooltipX",0),this.width()),i=Ft.JY(this.get("tooltipY",0),this.height())),{x:e,y:i}}return{x:0,y:0}}getTooltip(){let t=this.get("tooltip");if(t)return t;{let t=this.parent;if(t)return t.getTooltip()}}_updatePosition(){const t=this.parent;let e=this.get("dx",0),i=this.get("dy",0),s=this.get("x"),a=this.getPrivate("x"),n=0,o=0;const r=this.get("position");s instanceof ht.QE&&(s=t?t.innerWidth()*s.value+t.get("paddingLeft",0):0),it.Et(s)?n=s+e:null!=a?n=a:t&&"relative"==r&&(n=t.get("paddingLeft",0)+e);let l=this.get("y"),h=this.getPrivate("y");l instanceof ht.QE&&(l=t?t.innerHeight()*l.value+t.get("paddingTop",0):0),it.Et(l)?o=l+i:null!=h?o=h:t&&"relative"==r&&(o=t.get("paddingTop",0)+i);const c=this._display;if(c.x!=n||c.y!=o){c.invalidateBounds(),c.x=n,c.y=o;const t="positionchanged";this.events.isEnabled(t)&&this.events.dispatch(t,{type:t,target:this})}this.getPrivate("showingTooltip")&&this.showTooltip()}x(){let t=this.get("x"),e=this.getPrivate("x");const i=this.parent;return i?t instanceof ht.QE?Ft.JY(t,i.innerWidth())+i.get("paddingLeft",0):it.Et(t)?t:null!=e?e:i.get("paddingLeft",this._display.x):this._display.x}y(){let t=this.getPrivate("y");if(null!=t)return t;let e=this.get("y");const i=this.parent;return i?e instanceof ht.QE?Ft.JY(e,i.innerHeight())+i.get("paddingTop",0):it.Et(e)?e:null!=t?t:i.get("paddingTop",this._display.y):this._display.y}_dispose(){super._dispose(),this._display.dispose(),this._removeTemplateField(),this._removeParent(this.parent),this._root._removeFocusElement(this);const t=this.get("tooltip");t&&t.dispose(),this.markDirty()}adjustedLocalBounds(){return this._fixMinBounds(this._adjustedLocalBounds),this._adjustedLocalBounds}localBounds(){return this._localBounds}bounds(){const t=this._adjustedLocalBounds,e=this.x(),i=this.y();return{left:t.left+e,right:t.right+e,top:t.top+i,bottom:t.bottom+i}}globalBounds(){const t=this.localBounds(),e=this.toGlobal({x:t.left,y:t.top}),i=this.toGlobal({x:t.right,y:t.top}),s=this.toGlobal({x:t.right,y:t.bottom}),a=this.toGlobal({x:t.left,y:t.bottom});return{left:Math.min(e.x,i.x,s.x,a.x),top:Math.min(e.y,i.y,s.y,a.y),right:Math.max(e.x,i.x,s.x,a.x),bottom:Math.max(e.y,i.y,s.y,a.y)}}_onShow(t){}_onHide(t){}appear(t,e){return(0,ct.sH)(this,void 0,void 0,function*(){return yield this.hide(0),e?new Promise((i,s)=>{this.setTimeout(()=>{i(this.show(t))},e)}):this.show(t)})}show(t){return(0,ct.sH)(this,void 0,void 0,function*(){if(!this._isShowing){this._isHidden=!1,this._isShowing=!0,this._isHiding=!1,this.states.lookup("default").get("visible")&&this.set("visible",!0),this._onShow(t);const e=this.states.applyAnimate("default",t);yield(0,Z.M9)(e),this._isShowing=!1}})}hide(t){return(0,ct.sH)(this,void 0,void 0,function*(){if(!this._isHiding&&!this._isHidden){this._isHiding=!0,this._isShowing=!1;let e=this.states.lookup("hidden");e||(e=this.states.create("hidden",{opacity:0,visible:!1})),this._isHidden=!0,this._onHide(t);const i=this.states.applyAnimate("hidden",t);yield(0,Z.M9)(i),this._isHiding=!1}})}isHidden(){return this._isHidden}isShowing(){return this._isShowing}isHiding(){return this._isHiding}isHover(){return this._display.hovering()}isFocus(){return this._root.focused(this)}isDragging(){return this._isDragging}isVisible(){return!(!this.get("visible")||!this.getPrivate("visible")||this.get("forceHidden"))}isVisibleDeep(){return this._parent?this._parent.isVisibleDeep()&&this.isVisible():this.isVisible()}compositeOpacity(){const t=this.get("opacity",1);return this._parent?this._parent.compositeOpacity()*t:t}compositeScale(){const t=this.get("scale",1);return this._parent?this._parent.compositeScale()*t:t}compositeRotation(){const t=this.get("rotation",0);return this._parent?this._parent.compositeRotation()+t:t}width(){let t=this.get("width"),e=this.get("maxWidth",this.getPrivate("maxWidth")),i=this.get("minWidth",this.getPrivate("minWidth")),s=this.getPrivate("width"),a=0;if(it.Et(s))a=s;else if(null==t)this._adjustedLocalBounds&&(a=this._adjustedLocalBounds.right-this._adjustedLocalBounds.left);else if(t instanceof ht.QE){const e=this.parent;a=e?e.innerWidth()*t.value:this._root.width()*t.value}else it.Et(t)&&(a=t);return it.Et(i)&&(a=Math.max(i,a)),it.Et(e)&&(a=Math.min(e,a)),a}maxWidth(){let t=this.get("maxWidth",this.getPrivate("maxWidth"));if(it.Et(t))return t;{let t=this.get("width");
1if(it.Et(t))return t}const e=this.parent;return e?e.innerWidth():this._root.width()}maxHeight(){let t=this.get("maxHeight",this.getPrivate("maxHeight"));if(it.Et(t))return t;{let t=this.get("height");if(it.Et(t))return t}const e=this.parent;return e?e.innerHeight():this._root.height()}height(){let t=this.get("height"),e=this.get("maxHeight",this.getPrivate("maxHeight")),i=this.get("minHeight",this.getPrivate("minHeight")),s=this.getPrivate("height"),a=0;if(it.Et(s))a=s;else if(null==t)this._adjustedLocalBounds&&(a=this._adjustedLocalBounds.bottom-this._adjustedLocalBounds.top);else if(t instanceof ht.QE){const e=this.parent;a=e?e.innerHeight()*t.value:this._root.height()*t.value}else it.Et(t)&&(a=t);return it.Et(i)&&(a=Math.max(i,a)),it.Et(e)&&(a=Math.min(e,a)),a}_findStaticTemplate(t){return this._templateField&&t(this._templateField)?this._templateField:super._findStaticTemplate(t)}_walkParents(t){(this._parent||this._virtualParent)&&this._walkParent(t)}_walkParent(t){this._parent?this._parent._walkParent(t):this._virtualParent&&this._virtualParent._walkParent(t),t(this)}set virtualParent(t){this._virtualParent!==t&&(this._virtualParent=t,this._applyThemes())}get parent(){return this._parent}_setParent(t,e=!1){const i=this._parent;t!==i&&(this.markDirtyBounds(),t.markDirty(),this._parent=t,e&&(this._removeParent(i),t&&(this._addPercentageSizeChildren(),this._addPercentagePositionChildren())),this.markDirtyPosition(),this._applyThemes())}getNumberFormatter(){return this.get("numberFormatter",this._root.numberFormatter)}getDateFormatter(){return this.get("dateFormatter",this._root.dateFormatter)}getDurationFormatter(){return this.get("durationFormatter",this._root.durationFormatter)}toGlobal(t){return this._display.toGlobal(t)}toLocal(t){return this._display.toLocal(t)}_getDownPoint(){const t=this._getDownPointId();if(t)return this._downPoints[t]}_getDownPointId(){if(this._downPoints)return dt.M2(this._downPoints,(t,e)=>t>e?1:t<e?-1:0)[0]}toFront(){const t=this.parent;t&&t.children.moveValue(this,t.children.length-1)}toBack(){const t=this.parent;t&&t.children.moveValue(this,0)}}Jt.className="Sprite",Jt.classNames=St.classNames.concat([Jt.className]);class Kt extends St{constructor(){super(...arguments),this._display=this._root._renderer.makeGraphics(),this._backgroundDisplay=this._root._renderer.makeGraphics(),this._clear=!1}_afterNew(){super._afterNewApplyThemes()}get pattern(){return this._pattern}_draw(){}_beforeChanged(){super._beforeChanged(),(this.isDirty("repetition")||this.isDirty("width")||this.isDirty("height")||this.isDirty("rotation")||this.isDirty("strokeWidth")||this.isDirty("strokeDasharray")||this.isDirty("strokeDashoffset")||this.isDirty("colorOpacity")||this.isDirty("fillOpacity"))&&(this._clear=!0),this._checkDirtyFill()}_checkDirtyFill(){(this.isDirty("color")||this.isDirty("fill"))&&(this._clear=!0)}_changed(){if(super._changed(),this._clear){const t=this.get("repetition",""),e=this.get("width",100),i=this.get("height",100),s=this.get("fill"),a=this.get("fillOpacity",1),n=this._backgroundDisplay,o=this._display;o.clear(),n.clear(),s&&a>0&&(n.beginFill(s,a),n.drawRect(0,0,e,i),n.endFill()),o.angle=this.get("rotation",0),this._draw(),this._pattern=this._root._renderer.createPattern(o,n,t,e,i)}this._clear=!1}}Kt.className="Pattern",Kt.classNames=St.classNames.concat([Kt.className]);class $t extends Kt{_beforeChanged(){super._beforeChanged(),this._clear=!0,this.isDirty("src")&&this._load();const t=this.get("canvas");t&&(this.set("width",t.width),this.set("height",t.height))}_draw(){super._draw();const t=this.get("colorOpacity");void 0!==t&&(this._display.alpha=Math.max(0,t));const e=this._image;if(e){const t=this.get("width",100),i=this.get("height",100),s=this.get("fit","image");let a=0,n=0;"pattern"==s?(a=t,n=i,this.markDirty()):(a=e.width,n=e.height,"image"==s&&(this.set("width",a),this.set("height",n)));const o=this.get("centered",!0);let r=0,l=0;o&&(r=t/2-a/2,l=i/2-n/2),this._display.image(e,a,n,r,l)}const i=this.get("canvas");i&&this._display.image(i,i.width,i.height,0,0)}_load(){const t=this.get("src");if(t){const e=new Image;e.src=t,e.decode().then(()=>{this._image=e,this._draw(),this.events.isEnabled("loaded")&&this.events.dispatch("loaded",{type:"loaded",target:this})}).catch(t=>{})}}}var Zt;
1$t.className="PicturePattern",$t.classNames=Kt.classNames.concat([$t.className]),function(t){t["ADD"]="lighter",t["COLOR"]="color",t["COLOR_BURN"]="color-burn",t["COLOR_DODGE"]="color-dodge",t["DARKEN"]="darken",t["DIFFERENCE"]="difference",t["DST_OVER"]="destination-over",t["EXCLUSION"]="exclusion",t["HARD_LIGHT"]="hard-light",t["HUE"]="hue",t["LIGHTEN"]="lighten",t["LUMINOSITY"]="luminosity",t["MULTIPLY"]="multiply",t["NORMAL"]="source-over",t["OVERLAY"]="overlay",t["SATURATION"]="saturation",t["SCREEN"]="screen",t["SOFT_LIGHT"]="soft-light",t["SRC_ATOP"]="source-atop",t["XOR"]="xor"}(Zt||(Zt={}));const te=["fill","fillOpacity","stroke","strokeWidth","strokeOpacity","fillPattern","strokePattern","fillGradient","strokeGradient","strokeDasharray","strokeDashoffset","shadowBlur","shadowColor","shadowOpacity","shadowOffsetX","shadowOffsetY","blur","sepia","invert","brightness","hue","contrast","saturate"];class ee extends Jt{constructor(){super(...arguments),this._display=this._root._renderer.makeGraphics(),this._clear=!1}_beforeChanged(){if(super._beforeChanged(),(this.isDirty("draw")||this.isDirty("svgPath"))&&this.markDirtyBounds(),(this.isDirty("fill")||this.isDirty("stroke")||this.isDirty("visible")||this.isDirty("forceHidden")||this.isDirty("scale")||this.isDirty("fillGradient")||this.isDirty("strokeGradient")||this.isDirty("fillPattern")||this.isDirty("strokePattern")||this.isDirty("fillOpacity")||this.isDirty("strokeOpacity")||this.isDirty("strokeWidth")||this.isDirty("draw")||this.isDirty("blendMode")||this.isDirty("strokeDasharray")||this.isDirty("strokeDashoffset")||this.isDirty("svgPath")||this.isDirty("lineJoin")||this.isDirty("lineCap")||this.isDirty("shadowColor")||this.isDirty("shadowBlur")||this.isDirty("shadowOffsetX")||this.isDirty("shadowOffsetY"))&&(this._clear=!0),this._display.crisp=this.get("crisp",!1),this.isDirty("fillGradient")){const t=this.get("fillGradient");if(t){this._display.isMeasured=!0;const e=t.get("target");e&&(this._disposers.push(e.events.on("boundschanged",()=>{this._markDirtyKey("fill")})),this._disposers.push(e.events.on("positionchanged",()=>{this._markDirtyKey("fill")})))}}if(this.isDirty("strokeGradient")){const t=this.get("strokeGradient");if(t){this._display.isMeasured=!0;const e=t.get("target");e&&(this._disposers.push(e.events.on("boundschanged",()=>{this._markDirtyKey("stroke")})),this._disposers.push(e.events.on("positionchanged",()=>{this._markDirtyKey("stroke")})))}}}_changed(){if(super._changed(),this._clear){this.markDirtyBounds(),this.markDirtyLayer(),this._display.clear();let t=this.get("strokeDasharray");it.Et(t)&&(t=t<.5?[0]:[t]),this._display.setLineDash(t);const e=this.get("strokeDashoffset");e&&this._display.setLineDashOffset(e);const i=this.get("blendMode",Zt.NORMAL);this._display.blendMode=i;const s=this.get("draw");s&&"function"===typeof s&&s(this._display,this);const a=this.get("svgPath");null!=a&&this._display.svgPath(a)}}_afterChanged(){if(super._afterChanged(),this._clear){const t=this.get("fill"),e=this.get("fillGradient"),i=this.get("fillPattern"),s=this.get("fillOpacity"),a=this.get("stroke"),n=this.get("strokeGradient"),o=this.get("strokePattern"),r=this.get("shadowColor"),l=this.get("shadowBlur"),h=this.get("shadowOffsetX"),c=this.get("shadowOffsetY"),d=this.get("shadowOpacity");if(r&&(l||h||c)&&this._display.shadow(r,l,h,c,d),t&&!e&&(this._display.beginFill(t,s),this._display.endFill()),e){if(t){const i=e.get("stops",[]);i.length&&et.__(i,e=>{e.color&&!e.colorInherited||!t||(e.color=t,e.colorInherited=!0),(null==e.opacity||e.opacityInherited)&&(e.opacity=s,e.opacityInherited=!0)})}const i=e.getFill(this);i&&(this._display.beginFill(i,s),this._display.endFill())}if(i){const t=i.pattern;t&&(this._display.beginFill(t,s),this._display.endFill(),i instanceof $t&&i.events.once("loaded",()=>{this._clear=!0,this.markDirty()}))}if(a||n||o){const t=this.get("strokeOpacity");let e=this.get("strokeWidth",1);this.get("nonScalingStroke")&&(e/=this.get("scale",1)),this.get("crisp")&&(e/=this._root._renderer.resolution);const i=this.get("lineJoin"),s=this.get("lineCap");if(a&&!n&&(this._display.lineStyle(e,a,t,i,s),this._display.endStroke()),n){const o=n.get("stops",[]);o.length&&et.__(o,e=>{e.color&&!e.colorInherited||!a||(e.color=a,e.colorInherited=!0),(null==e.opacity||e.opacityInherited)&&(e.opacity=t,e.opacityInherited=!0)});const r=n.getFill(this);r&&(this._display.lineStyle(e,r,t,i,s),this._display.endStroke())}if(o){let a=o.pattern;a&&(this._display.lineStyle(e,a,t,i,s),this._display.endStroke(),o instanceof $t&&o.events.once("loaded",()=>{this._clear=!0,this.markDirty()}))}}this.getPrivate("showingTooltip")&&this.showTooltip()}this._clear=!1}}
1ee.className="Graphics",ee.classNames=Jt.classNames.concat([ee.className]);class ie extends ee{_afterNew(){super._afterNew(),this._display.isMeasured=!0,this.setPrivateRaw("trustBounds",!0)}_beforeChanged(){super._beforeChanged(),(this.isDirty("width")||this.isDirty("height")||this.isPrivateDirty("width")||this.isPrivateDirty("height"))&&(this._clear=!0)}_changed(){super._changed(),this._clear&&!this.get("draw")&&this._draw()}_draw(){let t=this.width(),e=this.height(),i=0,s=0,a=t/Math.abs(t),n=e/Math.abs(e);if(this.get("containStroke",!1)){const o=this.get("strokeWidth",0);t-=o*a,e-=o*n,i+=o/2*a,s+=o/2*n}this._display.drawRect(i,s,t,e)}_updateSize(){this.markDirty(),this._clear=!0}}function se(t,e){t.get("reverseChildren",!1)?t.children.eachReverse(e):t.children.each(e)}ie.className="Rectangle",ie.classNames=ee.classNames.concat([ie.className]);class ae extends St{}ae.className="Layout",ae.classNames=St.classNames.concat([ae.className]);class ne extends ae{updateContainer(t){let e=t.get("paddingLeft",0),i=t.innerWidth(),s=0;se(t,t=>{if(t.isVisible()&&"relative"==t.get("position")){let e=t.get("width");if(e instanceof ht.QE){s+=e.value;let a=i*e.value,n=t.get("minWidth",t.getPrivate("minWidth",-1/0));n>a&&(i-=n,s-=e.value);let o=t.get("maxWidth",t.getPrivate("maxWidth",1/0));a>o&&(i-=o,s-=e.value)}else it.Et(e)||(e=t.width()),i-=e+t.get("marginLeft",0)+t.get("marginRight",0)}}),(i<=0||i==1/0)&&(i=.1),se(t,t=>{if(t.isVisible()&&"relative"==t.get("position")){let e=t.get("width");if(e instanceof ht.QE){let a=i*e.value/s-t.get("marginLeft",0)-t.get("marginRight",0),n=t.get("minWidth",t.getPrivate("minWidth",-1/0)),o=t.get("maxWidth",t.getPrivate("maxWidth",1/0));a=Math.min(Math.max(n,a),o),t.setPrivate("width",a)}else t._prevSettings.width instanceof ht.QE&&t.setPrivate("width",void 0)}});let a=e;se(t,t=>{if("relative"==t.get("position"))if(t.isVisible()){let e=t.adjustedLocalBounds(),i=t.get("marginLeft",0),s=t.get("marginRight",0),n=t.get("maxWidth"),o=e.left,r=e.right;n&&r-o>n&&(r=o+n);let l=a+i-o;t.setPrivate("x",l),a=l+r+s}else t.setPrivate("x",void 0)})}}ne.className="HorizontalLayout",ne.classNames=ae.classNames.concat([ne.className]);class oe extends ae{updateContainer(t){let e=t.get("paddingTop",0),i=t.innerHeight(),s=0;se(t,t=>{if(t.isVisible()&&"relative"==t.get("position")){let e=t.get("height");if(e instanceof ht.QE){s+=e.value;let a=i*e.value,n=t.get("minHeight",t.getPrivate("minHeight",-1/0));n>a&&(i-=n,s-=e.value);let o=t.get("maxHeight",t.getPrivate("maxHeight",1/0));a>o&&(i-=o,s-=e.value)}else it.Et(e)||(e=t.height()),i-=e+t.get("marginTop",0)+t.get("marginBottom",0)}}),(i<=0||i==1/0)&&(i=.1),se(t,t=>{if(t.isVisible()&&"relative"==t.get("position")){let e=t.get("height");if(e instanceof ht.QE){let a=i*e.value/s-t.get("marginTop",0)-t.get("marginBottom",0),n=t.get("minHeight",t.getPrivate("minHeight",-1/0)),o=t.get("maxHeight",t.getPrivate("maxHeight",1/0));a=Math.min(Math.max(n,a),o),t.setPrivate("height",a)}else t._prevSettings.height instanceof ht.QE&&t.setPrivate("height",void 0)}});let a=e;se(t,t=>{if("relative"==t.get("position"))if(t.isVisible()){let e=t.adjustedLocalBounds(),i=t.get("marginTop",0),s=e.top,n=e.bottom,o=t.get("maxHeight");o&&n-s>o&&(n=s+o);let r=t.get("marginBottom",0),l=a+i-s;t.setPrivate("y",l),a=l+n+r}else t.setPrivate("y",void 0)})}}oe.className="VerticalLayout",oe.classNames=ae.classNames.concat([oe.className]);class re extends ae{_afterNew(){this._setRawDefault("maxColumns",Number.MAX_VALUE),super._afterNew()}updateContainer(t){let e=t.get("paddingLeft",0),i=t.get("paddingRight",0),s=t.get("paddingTop",0),a=t.maxWidth()-e-i,n=a,o=1;se(t,t=>{if(t.get("visible")&&t.getPrivate("visible")&&!t.get("forceHidden")&&"absolute"!=t.get("position")){let e=t.width();e<n&&(n=e),e>o&&(o=e)}}),n=Ut(n,1,a),o=Ut(o,1,a);let r=1;r=this.get("fixedWidthGrid")?a/o:a/n,r=Math.max(1,Math.floor(r)),r=Math.min(this.get("maxColumns",Number.MAX_VALUE),r);let l=this.getColumnWidths(t,r,o,a),h=s,c=0,d=0;r=l.length;let u=e;se(t,t=>{if("relative"==t.get("position")&&t.isVisible()){const i=t.get("marginTop",0),s=t.get("marginBottom",0);let a=t.adjustedLocalBounds(),n=t.get("marginLeft",0),o=t.get("marginRight",0),p=u+n-a.left,g=h+i-a.top;t.setPrivate("x",p),t.setPrivate("y",g),u+=l[c]+o,d=Math.max(d,t.height()+i+s),c++,c>=r&&(c=0,u=e,h+=d,d=0)}})}getColumnWidths(t,e,i,s){let a=0,n=[],o=0;return se(t,s=>{let a=s.adjustedLocalBounds();"absolute"!=s.get("position")&&s.isVisible()&&(this.get("fixedWidthGrid")?n[o]=i:n[o]=Math.max(0|n[o],a.right-a.left+s.get("marginLeft",0)+s.get("marginRight",0)),o<t.children.length-1&&(o++,o==e&&(o=0)))}),et.__(n,t=>{a+=t}),a>s?e>2?(e-=1,this.getColumnWidths(t,e,i,s)):[s]:n}}
1re.className="GridLayout",re.classNames=ae.classNames.concat([re.className]);var le=i(80937);class he{static escape(t){return t.replace(/\[\[/g,this.prefix+"1").replace(/([^\/\]]{1})\]\]/g,"$1"+this.prefix+"2").replace(/\]\]/g,this.prefix+"2").replace(/\{\{/g,this.prefix+"3").replace(/\}\}/g,this.prefix+"4").replace(/\'\'/g,this.prefix+"5")}static unescape(t){return t.replace(new RegExp(this.prefix+"1","g"),"[[").replace(new RegExp(this.prefix+"2","g"),"]]").replace(new RegExp(this.prefix+"3","g"),"{{").replace(new RegExp(this.prefix+"4","g"),"}}").replace(new RegExp(this.prefix+"5","g"),"''")}static cleanUp(t){return t.replace(/\[\[/g,"[").replace(/\]\]/g,"]").replace(/\{\{/g,"{").replace(/\}\}/g,"}").replace(/\'\'/g,"'")}static chunk(t,e=!1,i=!1){let s=[];t=this.escape(t);let a=e?t.split("'"):[t];for(let n=0;n<a.length;n++){let t=a[n];if(""!==t)if(n%2===0){t=t.replace(/\]\[/g,"]"+it.Kx+"["),t=t.replace(/\[\]/g,"[ ]");let e=t.split(/[\[\]]+/);for(let t=0;t<e.length;t++){let a=this.cleanUp(this.unescape(e[t]));a!==it.Kx&&(""!==a&&(t%2===0?s.push({type:"value",text:a}):s.push({type:i?"value":"format",text:"["+a+"]"})))}}else{let e=t.split(/[\[\]]+/);for(let t=0;t<e.length;t++){let i=this.cleanUp(this.unescape(e[t]));""!==i&&(t%2===0?s.push({type:"text",text:i}):this.isImage(i)?s.push({type:"image",text:"["+i+"]"}):s.push({type:"format",text:"["+i+"]"}))}}}return s}static isImage(t){return!!t.match(/img[ ]?:/)}static getTextStyle(t){let e={};if(""==t||"[ ]"==t)return{};const i=t.match(/('[^']*')|("[^"]*")/gi);if(i)for(let a=0;a<i.length;a++)t=t.replace(i[a],i[a].replace(/['"]*/g,"").replace(/[ ]+/g,"+"));let s=t.match(/([\w\-]*:[\s]?[^;\s\]]*)|(\#[\w]{1,6})|([\w\-]+)|(\/)/gi);if(!s)return{};for(let a=0;a<s.length;a++)if(s[a].match(/^(normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900)$/i))e.fontWeight=s[a];else if(s[a].match(/^(underline|line-through)$/i))e.textDecoration=s[a];else if("/"==s[a]);else if(s[a].match(/:/)){const t=s[a].replace("+"," ").split(/:[ ]*/);e[t[0]]=t[1]}else e.fill=le.Q1.fromString(s[a]);return e}}function ce(t,e){if(null!=e){e=""+e,e=he.escape(e);let i,s=e.match(/\{([^}]+)\}/g);if(s)for(i=0;i<s.length;i++){let a=s[i].replace(/\{([^}]+)\}/,"$1"),n=de(t,a,"");null==n&&(n=""),e=e.split(s[i]).join(n)}e=he.unescape(e)}else e="";return e}function de(t,e,i){let s;const a=t.dataItem;let n,o=[],r=/(format[a-zA-Z]*)\((.*)\)|([^.]+)/g;while(1){if(n=r.exec(e),null===n)break;if(n[3]){o.push({prop:n[3]});const e=t.getDateFormatter().get("dateFields",[]),i=t.getNumberFormatter().get("numericFields",[]),s=t.getDurationFormatter().get("durationFields",[]);-1!==e.indexOf(n[3])?o.push({method:"formatDate",params:[]}):-1!==i.indexOf(n[3])?o.push({method:"formatNumber",params:[]}):-1!==s.indexOf(n[3])&&o.push({method:"formatDuration",params:[]})}else{let t=[];if(""!=Ft.Bq(n[2])){let e,i=/'([^']*)'|"([^"]*)"|([0-9\-]+)/g;while(1){if(e=i.exec(n[2]),null===e)break;t.push(e[1]||e[2]||e[3])}}o.push({method:n[1],params:t})}}if(a){s=pe(t,o,a._settings),(null==s||it.Gv(s))&&(s=pe(t,o,a));let n=a.dataContext;null==s&&n&&(s=pe(t,o,n),null==s&&(s=pe(t,[{prop:e}],n)),null==s&&n.dataContext&&(s=pe(t,o,n.dataContext))),null==s&&a.component&&a.component.dataItem!==a&&(s=de(a.component,e,i))}return null==s&&(s=pe(t,o,t)),null==s&&t.parent&&(s=de(t.parent,e,i)),s}function ue(t,e){const i=t.getPrivate("customData");if(it.Gv(i))return i[e]}function pe(t,e,i,s){let a=i,n=!1;for(let o=0,r=e.length;o<r;o++){let r=e[o];if(r.prop){if(a instanceof Jt){let t=a.get(r.prop);null==t&&(t=a.getPrivate(r.prop)),null==t&&(t=ue(a,r.prop)),null==t&&(t=a[r.prop]),a=t}else if(a.get){let t=a.get(r.prop);null==t&&(t=a[r.prop]),a=t}else a=a[r.prop];if(null==a)return}else switch(r.method){case"formatNumber":let e=it.Ro(a);null!=e&&(a=t.getNumberFormatter().format(e,s||r.params[0]||void 0),n=!0);break;case"formatDate":let o=it.ay(a);if(!it.$P(o)||it.yr(o.getTime()))return;null!=o&&(a=t.getDateFormatter().format(o,s||r.params[0]||void 0),n=!0);break;case"formatDuration":let l=it.Ro(a);null!=l&&(a=t.getDurationFormatter().format(l,s||r.params[0]||void 0,r.params[1]||void 0),n=!0);break;case"urlEncode":case"encodeURIComponent":a=encodeURIComponent(a);break;default:a[r.method]&&a[r.method].apply(i,r.params);break}}if(!n){let e=[{method:"",params:s}];if(null==s)it.Et(a)?(e[0].method="formatNumber",e[0].params=""):it.$P(a)&&(e[0].method="formatDate",e[0].params="");else{let t=Ft.gV(s);"number"===t?e[0].method="formatNumber":"date"===t?e[0].method="formatDate":"duration"===t&&(e[0].method="formatDuration")}e[0].method&&(a=pe(t,e,a))}return a}he.prefix="__amcharts__";class ge extends Jt{constructor(){super(...arguments),this._display=this._root._renderer.makeContainer(),this._childrenDisplay=this._root._renderer.makeContainer(),this.children=new lt(this),this._percentageSizeChildren=[],this._percentagePositionChildren=[],this._prevWidth=0,this._prevHeight=0,this._contentWidth=0,this._contentHeight=0,this._childrenPrep=!1,this._childrenUpdt=!1}_afterNew(){super._afterNew(),this._display.addChild(this._childrenDisplay)}_afterChanged(){super._afterChanged(),this._childrenPrep=!1,this._childrenUpdt=!1}_dispose(){et.W$(this.allChildren(),t=>{t.dispose()}),this.getPrivate("htmlElement")&&this._root._removeHTMLContent(this),super._dispose()}_beforeChanged(){this._childrenPrep||this._prepareChildren(),this._childrenUpdt||this._updateChildren(),super._beforeChanged()}_changed(){if(super._changed(),this.isDirty("interactiveChildren")&&(this._display.interactiveChildren=this.get("interactiveChildren",!1)),this.isDirty("layout")&&(this._prevWidth=0,this._prevHeight=0,this.markDirtyBounds(),this._prevSettings.layout&&this.children.each(t=>{t.removePrivate("x"),t.removePrivate("y")})),(this.isDirty("paddingTop")||this.isDirty("paddingBottom")||this.isDirty("paddingLeft")||this.isDirty("paddingRight"))&&this.children.each(t=>{t.markDirtyPosition()}),this.isDirty("maskContent")){const t=this._childrenDisplay;let e=this._contentMask;this.get("maskContent")?e||(e=ie.new(this._root,{x:-.5,y:-.5,width:this.width()+1,height:this.height()+1}),this._contentMask=e,t.addChildAt(e._display,0),t.mask=e._display):e&&(t.removeChild(e._display),t.mask=null,e.dispose(),this._contentMask=void 0)}}_updateSize(){super._updateSize(),et.__(this._percentageSizeChildren,t=>{t._updateSize()}),et.__(this._percentagePositionChildren,t=>{t.markDirtyPosition(),t._updateSize()}
1),this.updateBackground()}updateBackground(){const t=this.get("background");let e=this._localBounds;if(e&&!this.isHidden()){let i=e.left,s=e.top,a=e.right-i,n=e.bottom-s,o=this.get("maxWidth"),r=this.get("maxHeight");r&&n>r&&(n=r),o&&a>o&&(a=o);let l=this.width(),h=this.height();t&&(t.setAll({width:a,height:n,x:i,y:s}),this._display.interactive&&(t._display.interactive=!0));const c=this._contentMask;c&&c.setAll({width:l+1,height:h+1});const d=this.get("verticalScrollbar");if(d){d.set("height",h),d.set("x",l-d.width()-d.get("marginRight",0)),d.set("end",d.get("start",0)+h/this._contentHeight);const t=d.get("background");t&&t.setAll({width:d.width(),height:h});let e=!0;this._contentHeight<=h&&(e=!1),d.setPrivate("visible",e)}}}_applyThemes(t=!1){return!!super._applyThemes(t)&&(this.eachChildren(e=>{e._applyThemes(t)}),!0)}_applyState(t){super._applyState(t),this.get("setStateOnChildren")&&this.eachChildren(e=>{e.states.apply(t)})}_applyStateAnimated(t,e){super._applyStateAnimated(t,e),this.get("setStateOnChildren")&&this.eachChildren(i=>{i.states.applyAnimate(t,e)})}innerWidth(){return this.width()-this.get("paddingRight",0)-this.get("paddingLeft",0)}innerHeight(){return this.height()-this.get("paddingTop",0)-this.get("paddingBottom",0)}_getBounds(){if(this.get("html")){let t=this._localBounds;t&&(this._contentWidth=t.right-t.left,this._contentHeight=t.bottom-t.top)}else{let t=this.get("width"),e=this.get("height"),i=this.getPrivate("width"),s=this.getPrivate("height"),a={left:0,top:0,right:this.width(),bottom:this.height()},n=this.get("layout"),o=!1,r=!1;if((n instanceof ne||n instanceof re)&&(o=!0),n instanceof oe&&(r=!0),null==t&&null==i||null==e&&null==s||this.get("verticalScrollbar")){let t=Number.MAX_VALUE,e=t,i=-t,s=t,n=-t;const l=this.get("paddingLeft",0),h=this.get("paddingTop",0),c=this.get("paddingRight",0),d=this.get("paddingBottom",0);this.children.each(t=>{if("absolute"!=t.get("position")&&t.get("isMeasured")){let a=t.adjustedLocalBounds(),l=t.x(),h=t.y(),c=l+a.left,d=l+a.right,u=h+a.top,p=h+a.bottom;o&&(c-=t.get("marginLeft",0),d+=t.get("marginRight",0)),r&&(u-=t.get("marginTop",0),p+=t.get("marginBottom",0)),c<e&&(e=c),d>i&&(i=d),u<s&&(s=u),p>n&&(n=p)}}),e==t&&(e=0),i==-t&&(i=0),s==t&&(s=0),n==-t&&(n=0),a.left=e-l,a.top=s-h,a.right=i+c,a.bottom=n+d;const u=this.get("minWidth");it.Et(u)&&u>0&&a.right-a.left<u&&(a.right>=u?a.left=a.right-u:a.right=a.left+u);const p=this.get("minHeight");it.Et(p)&&p>0&&a.bottom-a.top<p&&(a.bottom>=p?a.top=a.bottom-p:a.bottom=a.top+p)}else;this._contentWidth=a.right-a.left,this._contentHeight=a.bottom-a.top,it.Et(t)&&(a.left=0,a.right=t),it.Et(i)&&(a.left=0,a.right=i),it.Et(e)&&(a.top=0,a.bottom=e),it.Et(s)&&(a.top=0,a.bottom=s),this._localBounds=a}}_updateBounds(){const t=this.get("layout");t&&t.updateContainer(this),super._updateBounds(),this.updateBackgroun
1d()}markDirty(){super.markDirty(),this._root._addDirtyParent(this)}_prepareChildren(){this._childrenPrep=!0;const t=this.innerWidth(),e=this.innerHeight();if(t!=this._prevWidth||e!=this._prevHeight){let i=this.get("layout"),s=!1,a=!1;i&&((i instanceof ne||i instanceof re)&&(s=!0),i instanceof oe&&(a=!0)),et.__(this._percentageSizeChildren,i=>{if(!s){let e=i.get("width");e instanceof ht.QE&&i.setPrivate("width",e.value*t)}if(!a){let t=i.get("height");t instanceof ht.QE&&i.setPrivate("height",t.value*e)}}),et.__(this._percentagePositionChildren,t=>{t.markDirtyPosition(),t.markDirtyBounds()}),this._prevWidth=t,this._prevHeight=e,this._sizeDirty=!0,this.updateBackground()}}_updateHTMLContent(){const t=this.get("html","");t&&""!==t?this._root._setHTMLContent(this,ce(this,t)):this._root._removeHTMLContent(this),this._root._positionHTMLElement(this)}scrollToChild(t){const e=this.get("verticalScrollbar");if(e){let i=t.y(),s=this.innerHeight(),a=t.height(),n=this._contentHeight,o=1-(s-a/2)/n;if(i+.7*a+this._childrenDisplay.y>s||i-.3*a+this._childrenDisplay.y<0){let t=Math.max(0,Math.min(o,(i-a/2)/n));e.animate({key:"start",to:t,duration:e.get("animationDuration",0),easing:e.get("animationEasing")})}}}_updateChildren(){if(this._childrenUpdt=!0,this.isDirty("html")&&this._updateHTMLContent(),this.isDirty("verticalScrollbar")){const t=this.get("verticalScrollbar");
1if(t){t._setParent(this),t.startGrip.setPrivate("visible",!1),t.endGrip.setPrivate("visible",!1),this.set("maskContent",!0),this.set("paddingRight",t.width()+t.get("marginRight",0)+t.get("marginLeft",0));let e=this.get("background");e||(e=this.set("background",ie.new(this._root,{themeTags:["background"],fillOpacity:0,fill:this._root.interfaceColors.get("alternativeBackground")}))),this._vsbd0=this.events.on("wheel",e=>{const i=e.originalEvent;if(!Ft.ay(i,this))return;i.preventDefault();let s=i.deltaY/5e3;const a=t.get("start",0),n=t.get("end",1);a+s<=0&&(s=-a),n+s>=1&&(s=1-n),a+s>=0&&n+s<=1&&(t.set("start",a+s),t.set("end",n+s))}),this._disposers.push(this._vsbd0),this._vsbd1=t.events.on("rangechanged",()=>{let e=this._contentHeight;const i=this._childrenDisplay,s=this._contentMask;i.y=-t.get("start",0)*e,i.markDirtyLayer(),s&&(s._display.y=-i.y,i.mask=s._display)}),this._disposers.push(this._vsbd1),this._display.addChild(t._display)}else{const t=this._prevSettings.verticalScrollbar;if(t){this._display.removeChild(t._display),this._vsbd0&&this._vsbd0.dispose(),this._vsbd1&&this._vsbd1.dispose();const e=this._childrenDisplay;e.y=0,this.setPrivate("height",void 0),this.set("maskContent",!1),this.set("paddingRight",void 0)}}}if(this.isDirty("background")){const t=this._prevSettings["background"];t&&this._display.removeChild(t._display);const e=this.get("background");e instanceof Jt&&(e.set("isMeasured",!1),e._setParent(this),this._display.addChildAt(e._display,0))}if(this.isDirty("mask")){const t=this.get("mask"),e=this._prevSettings["mask"];if(e&&(this._display.removeChild(e._display),e!=t&&e.dispose()),t){const e=t.parent;e&&e.children.removeValue(t),t._setParent(this),this._display.addChildAt(t._display,0),this._childrenDisplay.mask=t._display}}}_processTemplateField(){super._processTemplateField(),this.children.each(t=>{t._processTemplateField()})}walkChildren(t){this.children.each((e,i)=>{e instanceof ge&&e.walkChildren(t),t(e,i)})}eachChildren(t){const e=this.get("background");e&&t(e);const i=this.get("verticalScrollbar");i&&t(i);const s=this.get("mask");s&&t(s),this.children.values.forEach(e=>{t(e)})}allChildren(){const t=[];return this.eachChildren(e=>{t.push(e)}),t}_setDataItem(t){const e=t!==this._dataItem;super._setDataItem(t);const i=this.get("html","");i&&""!==i&&e&&this._root._setHTMLContent(this,ce(this,i))}contentWidth(){return this._contentWidth}contentHeight(){return this._contentHeight}}ge.className="Container",ge.classNames=Jt.classNames.concat([ge.className]);class me extends Jt{constructor(){super(...arguments),this.textStyle=this._root._renderer.makeTextStyle(),this._display=this._root._renderer.makeText("",this.textStyle),this._textStyles=["textAlign","fontFamily","fontSize","fontStyle","fontWeight","fontStyle","fontVariant","textDecoration","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","shadowOpacity","lineHeight","baselineRatio","direction","textBaseline","oversizedBehavior","breakWords","ellipsis","minScale","maxChars"]}_updateBounds(){if(this.get("text")){super._updateBounds();let t=this.get("fillGradient");t&&(this._display.style.fill=t.getFill(this))}else{let t={left:0,right:0,top:0,bottom:0};this._adjustedLocalBounds=t}}_changed(){super._changed(),this._display.clear();let t=this.textStyle;if(this.isDirty("opacity")){let t=this.get("opacity",1);this._display.alpha=t}if((this.isDirty("text")||this.isDirty("populateText"))&&(this._display.text=this._getText(),this.markDirtyBounds(),"tooltip"==this.get("role")&&this._root.updateTooltip(this)),this.isPrivateDirty("tooltipElement")){const t=this.getPrivate("tooltipElement");t&&this._disposers.push(new tt.W_(()=>{this._root._removeTooltipElement(this)}))}if(this.isDirty("width")&&(t.wordWrapWidth=this.width(),this.markDirtyBounds()),this.isDirty("oversizedBehavior")&&(t.oversizedBehavior=this.get("oversizedBehavior","none"),this._display.invalidateVisibility(),this.markDirtyBounds()),this.isDirty("breakWords")&&(t.breakWords=this.get("breakWords",!1),this.markDirtyBounds()),this.isDirty("ellipsis")&&(t.ellipsis=this.get("ellipsis"),this.markDirtyBounds()),this.isDirty("ignoreFormatting")&&(t.ignoreFormatting=this.get("ignoreFormatting",!1),this.markDirtyBounds()),this.isDirty("minScale")&&(t.minScale=this.get("minScale",0),this.markDirtyBounds()),this.isDirty("fill")||this.isDirty("fillGradient")){const e=this.get("fill"),i=this.get("fillGradient"),s=this.get("fillOpacity");if(i){if(e){const t=i.get("stops",[]);t.length&&et.__(t,t=>{t.color&&!t.colorInherited||!e||(t.color=e,t.colorInherited=!0),(null==t.opacity||t.opacityInherited)&&(t.opacity=s,t.opacityInherited=!0)})}t.fill=i.getFill(this)}else e&&(t.fill=e)}if(this.isDirty("fillOpacity")){let e=this.get("fillOpacity",1);e&&(t.fillOpacity=e)}(this.isDirty("maxWidth")||this.isPrivateDirty("maxWidth"))&&(t.maxWidth=this.get("maxWidth",this.getPrivate("maxWidth")),this.markDirtyBounds()),(this.isDirty("maxHeight")||this.isPrivateDirty("maxHeight"))&&(t.maxHeight=this.get("maxHeight",this.getPrivate("maxHeight")),this.markDirtyBounds()),et.__(this._textStyles,e=>{this._dirty[e]&&(t[e]=this.get(e),this.markDirtyBounds())}),t["fontSize"]=this.get("fontSize"),t["fontFamily"]=this.get("fontFamily"),this._display.style=t,this.isDirty("role")&&"tooltip"==this.get("role")&&this._root.updateTooltip(this)}_getText(){let t=this.get("text","");return this.get("maxChars")&&(t=Ft.FZ(t,this.get("maxChars",1e8),this.get("breakWords"),this.get("ellipsis"))),this.get("populateText")?ce(this,t):t}_getAccessibleText(){const t=this.get("ariaLabel");return void 0!==t?this.get("populateText")?ce(this,t):t:this._getText()}markDirtyText(){this._display.text=this._getText(),"tooltip"==this.get("role")&&this._root.updateTooltip(this),this.markDirtyBounds(),this.markDirty()}_setDataItem(t){super._setDataItem(t),this.get("populateText")&&this.markDirtyText()}getNumberFormatter(){return this.parent?this.parent.getNumberFormatter():super.getNumberFormatter()}getDateFormatter(){return this.parent?this.parent.getDateFormatter():super.getDateFormatter()}getDurationFormatter(){return this.parent?this.parent.getDurationFormatter():super.getDurationFormatter()}}
1me.className="Text",me.classNames=Jt.classNames.concat([me.className]);class _e{constructor(){this._targets=[],this._observer=new ResizeObserver(t=>{et.__(t,t=>{et.__(this._targets,e=>{e.target===t.target&&e.callback()})})})}addTarget(t,e){this._observer.observe(t,{box:"border-box"}),this._targets.push({target:t,callback:e})}removeTarget(t){this._observer.unobserve(t),et.TW(this._targets,e=>e.target!==t)}}class ve{constructor(){this._timer=null,this._targets=[]}addTarget(t,e){if(null===this._timer){let t=null;const e=()=>{const i=Date.now();(null===t||i>t+ve.delay)&&(t=i,et.__(this._targets,t=>{let e=t.target.getBoundingClientRect();e.width===t.size.width&&e.height===t.size.height||(t.size=e,t.callback())})),0===this._targets.length?this._timer=null:this._timer=requestAnimationFrame(e)};this._timer=requestAnimationFrame(e)}let i={width:0,height:0,left:0,right:0,top:0,bottom:0,x:0,y:0};this._targets.push({target:t,callback:e,size:i})}removeTarget(t){et.TW(this._targets,e=>e.target!==t),0===this._targets.length&&null!==this._timer&&(cancelAnimationFrame(this._timer),this._timer=null)}}ve.delay=200;let fe=null;function ye(){return null===fe&&(fe="undefined"!==typeof ResizeObserver?new _e:new ve),fe}class xe{constructor(t,e){this._disposed=!1,this._sensor=ye(),this._element=t,this._listener=Ft.n_(e),this._sensor.addTarget(t,e)}isDisposed(){return this._disposed}dispose(){this._disposed||(this._disposed=!0,this._sensor.removeTarget(this._element),this._listener.dispose())}get sensor(){return this._sensor}}class be extends St{}be.className="InterfaceColors",be.classNames=St.classNames.concat([be.className]);class we extends ge{constructor(){super(...arguments),this._textKeys=["text","fill","fillGradient","fillOpacity","textAlign","fontFamily","fontSize","fontStyle","fontWeight","fontStyle","fontVariant","textDecoration","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","shadowOpacity","lineHeight","baselineRatio","direction","textBaseline","oversizedBehavior","breakWords","ellipsis","minScale","populateText","role","ignoreFormatting","maxChars","ariaLabel"]}get text(){return this._text}_afterNew(){super._afterNew(),this._makeText(),et.__(this._textKeys,t=>{const e=this.get(t);void 0!=e&&this._text.set(t,e)}),""!==this.get("html","")&&this._text.set("text",""),this.onPrivate("maxWidth",()=>{this._setMaxDimentions()}),this.onPrivate("maxHeight",()=>{this._setMaxDimentions()})}_makeText(){this._text=this.children.push(me.new(this._root,{}))}_updateChildren(){super._updateChildren();const t=this._text;if(et.__(this._textKeys,t=>{this._text.set(t,this.get(t))}),(this.isDirty("maxWidth")||this.isDirty("maxHeight")||this.isDirty("rotation"))&&this._setMaxDimentions(),""!==this.get("html","")?t.set("text",""):(t.set("text",this.get("text")),this._maybeUpdateHTMLColor()),(this.isDirty("fill")||this.isDirty("fillGradient"))&&this._maybeUpdateHTMLColor(),this.isDirty("textAlign")||this.isDirty("width")){const e=this.get("textAlign");let i;null!=this.get("width")?i="right"==e?ht.Q2:"center"==e?ht.yP:0:"left"==e||"start"==e?i=this.get("paddingLeft",0):"right"!=e&&"end"!=e||(i=-this.get("paddingRight",0)),t.set("x",i)}const e=this.get("background");e&&e.setPrivate("visible",t._display.textVisible)}_maybeUpdateHTMLColor(){const t=this.getPrivate("htmlElement");t&&this.get("fill")&&(t.style.color=this.get("fill").toCSSHex())}_setMaxDimentions(){const t=this.get("rotation"),e=90==t||270==t||-90==t,i=this._text,s=this.get("maxWidth",this.getPrivate("maxWidth",1/0));it.Et(s)?i.set(e?"maxHeight":"maxWidth",s-this.get("paddingTop",0)-this.get("paddingBottom",0)):i.set(e?"maxHeight":"maxWidth",void 0);const a=this.get("maxHeight",this.getPrivate("maxHeight",1/0));it.Et(a)?i.set(e?"maxWidth":"maxHeight",a-this.get("paddingLeft",0)-this.get("paddingRight",0)):i.set(e?"maxWidth":"maxHeight",void 0),this.root.events.once("frameended",()=>{i.markDirtyBounds()})}_setDataItem(t){super._setDataItem(t),this._markDirtyKey("text"),this._markDirtyKey("html");const e=this._text;e.get("populateText")&&e.markDirtyText();const i=this.get("html");i&&""!==i&&this._updateHTMLContent()}getText(){return this._text._getText()}getAccessibleText(){return this._text._getAccessibleText()}}
1we.className="Label",we.classNames=ge.classNames.concat([we.className]);class Ce extends ee{_beforeChanged(){super._beforeChanged(),(this.isDirty("pointerBaseWidth")||this.isDirty("cornerRadius")||this.isDirty("pointerLength")||this.isDirty("pointerX")||this.isDirty("pointerY")||this.isDirty("width")||this.isDirty("height"))&&(this._clear=!0)}_changed(){if(super._changed(),this._clear){this.markDirtyBounds();let t=this.width(),e=this.height();if(t>0&&e>0){let i=this.get("cornerRadius",8);i=Ut(i,0,Math.min(t/2,e/2));let s=this.get("pointerX",0),a=this.get("pointerY",0),n=this.get("pointerBaseWidth",15)/2,o=0,r=0,l=t,h=0,c=t,d=e,u=0,p=e,g=(s-o)*(d-r)-(a-r)*(c-o),m=(s-u)*(h-p)-(a-p)*(l-u);const _=this._display;if(_.moveTo(i,0),g>0&&m>0){let e=Math.round(Ut(s,i+n,t-n-i));a=Ut(a,-1/0,0),_.lineTo(e-n,0),_.lineTo(s,a),_.lineTo(e+n,0)}if(_.lineTo(t-i,0),_.arcTo(t,0,t,i,i),g>0&&m<0){let o=Math.round(Ut(a,i+n,e-n-i));s=Ut(s,t,1/0),_.lineTo(t,i),_.lineTo(t,Math.max(o-n,i)),_.lineTo(s,a),_.lineTo(t,o+n)}if(_.lineTo(t,e-i),_.arcTo(t,e,t-i,e,i),g<0&&m<0){let o=Math.round(Ut(s,i+n,t-n-i));a=Ut(a,e,1/0),_.lineTo(t-i,e),_.lineTo(o+n,e),_.lineTo(s,a),_.lineTo(o-n,e)}if(_.lineTo(i,e),_.arcTo(0,e,0,e-i,i),g<0&&m>0){let t=Math.round(Ut(a,i+n,e-i-n));s=Ut(s,-1/0,0),_.lineTo(0,e-i),_.lineTo(0,t+n),_.lineTo(s,a),_.lineTo(0,Math.max(t-n,i))}_.lineTo(0,i),_.arcTo(0,0,i,0,i),_.closePath()}}}}Ce.className="PointedRectangle",Ce.classNames=ee.classNames.concat([Ce.className]);class ke extends ge{constructor(t,e,i,s=[]){super(t,e,i,s),this._fx=0,this._fy=0,this._w=0,this._h=0,this._htmlContentHovered=!1}_afterNew(){this._settings.themeTags=Ft.kE(this._settings.themeTags,["tooltip"]),super._afterNew();const t=this._setDefaultFn("background",()=>Ce.new(this._root,{}));t.set("themeTags",["tooltip","background"]),this._label=this.children.push(we.new(this._root,{})),this._disposers.push(this._label.events.on("boundschanged",()=>
1{this._updateBackground()})),this._disposers.push(this.on("bounds",()=>{this._updateBackground()})),this._updateTextColor(),this._root.tooltipContainer.children.push(this),this.hide(0),this._disposers.push(this.label.onPrivate("htmlElement",t=>{t&&(this._disposers.push(Ft.q2(t,"pointerover",t=>{this._htmlContentHovered=!0})),this._disposers.push(Ft.q2(t,"pointerout",t=>{this._htmlContentHovered=!1})))})),this.on("visible",t=>{this._handleReaderAnnouncement()}),this.label.events.on("dataitemchanged",t=>{this._handleReaderAnnouncement()}),this._root._tooltips.push(this)}_handleReaderAnnouncement(){this.get("readerAnnounce")&&this.isVisibleDeep()&&this._root.readerAlert(this.label.getAccessibleText())}get label(){return this._label}_dispose(){super._dispose(),et.TF(this._root._tooltips,this)}_updateChildren(){super._updateChildren(),(this.isDirty("pointerOrientation")||this.isPrivateDirty("minWidth")||this.isPrivateDirty("minHeight"))&&this.get("background")._markDirtyKey("width");const t=this.get("labelText");null!=t&&this.label.set("text",this.get("labelText"));const e=this.get("labelHTML");null!=e&&this.label.set("html",this.get("labelHTML"));const i=this.get("labelAriaLabel");null!=i&&this.label.set("ariaLabel",this.get("labelAriaLabel"))}_changed(){if(super._changed(),(this.isDirty("pointTo")||this.isDirty("pointerOrientation"))&&this._updateBackgroun
1d(),this.isDirty("tooltipTarget")&&this.updateBackgroundColor(),this.isDirty("keepTargetHover")){const t=this.get("keepTargetHover");if(t){const t=this.get("background");this._keepHoverDp=new tt.ZT([t.events.on("pointerover",t=>{let e=this.get("tooltipTarget");e&&(e.parent&&e.parent.getPrivate("tooltipTarget")==e&&(e=e.parent),e.hover())}),t.events.on("pointerout",t=>{let e=this.get("tooltipTarget");e&&(e.parent&&e.parent.getPrivate("tooltipTarget")==e&&(e=e.parent),this._htmlContentHovered||e.unhover())})]),this.label.onPrivate("htmlElement",e=>{this._keepHoverDp&&e&&this._keepHoverDp.disposers.push(Ft.q2(e,"pointerleave",e=>{const i=this.root._renderer.getEvent(e);t.events.dispatch("pointerout",{type:"pointerout",originalEvent:i.event,point:i.point,simulated:!1,target:t})}))})}else this._keepHoverDp&&(this._keepHoverDp.dispose(),this._keepHoverDp=void 0)}}_onShow(){super._onShow(),this.updateBackgroundColor()}updateBackgroundColor(){let t=this.get("tooltipTarget");const e=this.get("background");let i,s;if(t&&e){if(i=t.get("fill"),s=t.get("stroke"),null==i&&(i=s),this.get("getFillFromSprite")&&(this._fillDp&&this._fillDp.dispose(),null!=i&&e.set("fill",i),this._fillDp=t.on("fill",t=>{null!=t&&(e.set("fill",t),this._updateTextColor(t))}),this._disposers.push(this._fillDp)),this.get("getFillGradientFromSprite")){this._fillGrDp&&this._fillGrDp.dispose();let i=t.get("fillGradient");null!=i&&e.set("fillGradient",i),this._fillGrDp=t.on("fillGradient",t=>{null!=t&&e.set("fillGradient",t)}),this._disposers.push(this._fillGrDp)}this.get("getStrokeFromSprite")&&(this._strokeDp&&this._strokeDp.dispose(),null!=i&&e.set("stroke",i),this._strokeDp=t.on("fill",t=>{null!=t&&e.set("stroke",t)}),this._disposers.push(this._strokeDp)),this.get("getLabelFillFromSprite")&&(this._labelDp&&this._labelDp.dispose(),null!=i&&this.label.set("fill",i),this._labelDp=t.on("fill",t=>{null!=t&&this.label.set("fill",t)}),this._disposers.push(this._labelDp))}this._updateTextColor(i)}_updateTextColor(t){this.get("autoTextColor")&&(null==t&&(t=this.get("background").get("fill")),null==t&&(t=this._root.interfaceColors.get("background")),t instanceof le.Q1&&this.label.set("fill",le.Q1.alternative(t,this._root.interfaceColors.get("alternativeText"),this._root.interfaceColors.get("text"))))}_setDataItem(t){super._setDataItem(t),this.label._setDataItem(t)}
1_updateBackground(){super.updateBackground();const t=this._root.container;if(t){let e=.5,i=.5,s=this.get("centerX");s instanceof ht.QE&&(e=s.value);let a=this.get("centerY");a instanceof ht.QE&&(i=a.value);let n=t.width(),o=t.height(),r=this.parent,l=0,h=0;if(r){l=r.x(),h=r.y();const t=r.get("layerMargin");t&&(l+=t.left||0,h+=t.top||0,n+=(t.left||0)+(t.right||0),o+=(t.top||0)+(t.bottom||0))}const c=this.get("bounds",{left:-l,top:-h,right:n-l,bottom:o-h});this._updateBounds();let d=this.width(),u=this.height();0===d&&(d=this._w),0===u&&(u=this._h);let p=this.get("pointTo",{x:n/2,y:o/2}),g=p.x,m=p.y,_=this.get("pointerOrientation"),v=this.get("background"),f=0,y=0,x=0;v instanceof Ce&&(f=v.get("pointerLength",0),y=v.get("strokeWidth",0)/2,x=y,v.set("width",d),v.set("height",u));let b=0,w=0,C=c.right-c.left,k=c.bottom-c.top;"horizontal"==_||"left"==_||"right"==_?(y=0,"horizontal"==_?g>c.left+C/2?(g-=d*(1-e)+f,x*=-1):g+=d*e+f:"left"==_?g+=d*(1-e)+f:(g-=d*e+f,x*=-1)):(x=0,"vertical"==_?m>c.top+u/2+f?m-=u*(1-i)+f:(m+=u*i+f,y*=-1):"down"==_?m-=u*(1-i)+f:(m+=u*i+f,y*=-1)),g=Ut(g,c.left+d*e,c.left+C-d*(1-e))+x,m=Ut(m,c.top+u*i,c.top+k-u*(1-i))-y,b=p.x-g+d*e+x,w=p.y-m+u*i-y,this._fx=g,this._fy=m;const D=this.get("animationDuration",0);if(D>0&&this.get("visible")&&this.get("opacity")>.1){const t=this.get("animationEasing");this.animate({key:"x",to:g,duration:D,easing:t}),this.animate({key:"y",to:m,duration:D,easing:t})}else this.set("x",g),this.set("y",m);v instanceof Ce&&(v.set("pointerX",b),v.set("pointerY",w)),d>0&&(this._w=d),u>0&&(this._h=u)}}}ke.className="Tooltip",ke.classNames=ge.classNames.concat([ke.className]);class De extends St{_setDefaults(){this._setDefault("negativeBase",0),this._setDefault("numberFormat","#,###.#####"),this._setDefault("smallNumberThreshold",1);const t="_big_number_suffix_",e="_small_number_suffix_",i="_byte_suffix_";this._setDefault("bigNumberPrefixes",[{number:1e3,suffix:this._t(t+"3")},{number:1e6,suffix:this._t(t+"6")},{number:1e9,suffix:this._t(t+"9")},{number:1e12,suffix:this._t(t+"12")},{number:1e15,suffix:this._t(t+"15")},{number:1e18,suffix:this._t(t+"18")},{number:1e21,suffix:this._t(t+"21")},{number:1e24,suffix:this._t(t+"24")}]),this._setDefault("smallNumberPrefixes",[{number:1e-24,suffix:this._t(e+"24")},{number:1e-21,suffix:this._t(e+"21")},{number:1e-18,suffix:this._t(e+"18")},{number:1e-15,suffix:this._t(e+"15")},{number:1e-12,suffix:this._t(e+"12")},{number:1e-9,suffix:this._t(e+"9")},{number:1e-6,suffix:this._t(e+"6")},{number:.001,suffix:this._t(e+"3")}]),this._setDefault("bytePrefixes",[{number:1,suffix:this._t(i+"B")},{number:1024,suffix:this._t(i+"KB")},{number:1048576,suffix:this._t(i+"MB")},{number:1073741824,suffix:this._t(i+"GB")},{number:1099511627776,suffix:this._t(i+"TB")},{number:0x4000000000000,suffix:this._t(i+"PB")}]),super._setDefaults()}_beforeChanged(){super._beforeChanged()}format(t,e,i){let s;(null==e||it.Kg(e)&&"number"===e.toLowerCase())&&(e=this.get("numberFormat",""));let a=Number(t);if(it.Gv(e))try{return this.get("intlLocales")?new Intl.NumberFormat(this.get("intlLocales"),e).format(a):new Intl.NumberFormat(void 0,e).format(a)}catch(n){return"Invalid"}else{e=Ft.fZ(e);let t,n=this.parseFormat(e,this._root.language);t=a>this.get("negativeBase")?n.positive:a<this.get("negativeBase")?n.negative:n.zero,null==i||t.mod||(t=dt.C(t),t.decimals.active=0==a?0:i),s=t.template.split(it.Kx).join(this.applyFormat(a,t))}return!0===this.get("forceLTR")&&(s="â"+s),s}parseFormat(t,e){const i=e.translateEmpty("_thousandSeparator"),s=e.translateEmpty("_decimalSeparator");let a={positive:{thousands:{active:-1,passive:-1,interval:-1,separator:i},decimals:{active:-1,passive:-1,separator:s},template:"",source:"",parsed:!1},negative:{thousands:{active:-1,passive:-1,interval:-1,separator:i},decimals:{active:-1,passive:-1,separator:s},template:"",source:"",parsed:!1},zero:{thousands:{active:-1,passive:-1,interval:-1,separator:i},decimals:{active:-1,passive:-1,separator:s},template:"",source:"",parsed:!1}};t=t.replace("||",it.cb);let n=t.split("|");return a.positive.source=n[0],"undefined"===typeof n[2]?a.zero=a.positive:a.zero.source=n[2],"undefined"===typeof n[1]?a.negative=a.positive:a.negative.source=n[1],dt.__(a,(t,e)=>{if(e.parsed)return;let i=e.source;"number"===i.toLowerCase()&&(i=this.get("numberFormat","#,###.#####"));let s=he.chunk(i,!0);for(let a=0;a<s.length;a++){let t=s[a];if(t.text=t.text.replace(it.cb,"|"),"value"===t.type){let i=t.text.match(/[#0.,]+[ ]?[abespABESP%!]?[abespABESPâ°!]?/);if(i)if(null===i||""===i[0])e.template+=t.text;else{let s=i[0].match(/[abespABESP%â°!]{2}|[abespABESP%â°]{1}$/);s&&(e.mod=s[0].toLowerCase(),e.modSpacing=!!i[0].match(/[ ]{1}[abespABESP%â°!]{1}$/));let a=i[0].split(".");if(""===a[0]);
vendor: 4,403 bytes, line 1
1else{e.thousands.active=(a[0].match(/0/g)||[]).length,e.thousands.passive=(a[0].match(/\#/g)||[]).length+e.thousands.active;let t=a[0].split(",");1===t.length||(e.thousands.interval=(t.pop()||"").length,0===e.thousands.interval&&(e.thousands.interval=-1))}"undefined"===typeof a[1]||(e.decimals.active=(a[1].match(/0/g)||[]).length,e.decimals.passive=(a[1].match(/\#/g)||[]).length+e.decimals.active),e.template+=t.text.split(i[0]).join(it.Kx)}}else e.template+=t.text}e.parsed=!0}),a}applyFormat(t,e){let i=t<0;t=Math.abs(t);let s="",a="",n=e.mod?e.mod.split(""):[];if(-1!==n.indexOf("b")){let i=this.applyPrefix(t,this.get("bytePrefixes"),-1!==n.indexOf("!"));t=i[0],s=i[1],a=i[2],e.modSpacing&&(a=" "+a)}else if(-1!==n.indexOf("a")){let i=this.applyPrefix(t,t<this.get("smallNumberThreshold")?this.get("smallNumberPrefixes"):this.get("bigNumberPrefixes"),-1!==n.indexOf("!"));t=i[0],s=i[1],a=i[2],e.modSpacing&&(a=" "+a)}else if(-1!==n.indexOf("p")){let e=Math.min(t.toString().length+2,21);t=parseFloat(t.toPrecision(e)),s=this._root.language.translate("_percentPrefix"),a=this._root.language.translate("_percentSuffix"),""==s&&""==a&&(a="%")}else if(-1!==n.indexOf("%")){let e=Math.min(t.toString().length+2,21);t*=100,t=parseFloat(t.toPrecision(e)),a="%"}else if(-1!==n.indexOf("â°")){let e=Math.min(t.toString().length+3,21);t*=1e3,t=parseFloat(t.toPrecision(e)),a="â°"}if(-1!==n.indexOf("e")){let i;i=e.decimals.passive>=0?t.toExponential(e.decimals.passive).split("e"):t.toExponential().split("e"),t=Number(i[0]),a="e"+i[1],e.modSpacing&&(a=" "+a)}else if(0===e.decimals.passive)t=Math.round(t);else if(e.decimals.passive>0){const i=Ft.w1(t);if(i>0){const s=Math.pow(10,e.decimals.passive);t=Math.round(parseFloat((t*s).toFixed(i)))/s}}let o="",r=it.um(t).split("."),l=r[0];if(l.length<e.thousands.active&&(l=Array(e.thousands.active-l.length+1).join("0")+l),e.thousands.interval>0){let t=[],i=l.split("").reverse().join("");for(let s=0,a=l.length;s<=a;s+=e.thousands.interval){let a=i.substr(s,e.thousands.interval).split("").reverse().join("");""!==a&&t.unshift(a)}l=t.join(e.thousands.separator)}o+=l,1===r.length&&r.push("");let h=r[1];return h.length<e.decimals.active&&(h+=Array(e.decimals.active-h.length+1).join("0")),""!==h&&(o+=e.decimals.separator+h),""===o&&(o="0"),0!==t&&i&&-1===n.indexOf("s")&&(o="-"+o),s&&(o=s+o),a&&(o+=a),o}applyPrefix(t,e,i=!1){let s=t,a="",n="",o=!1,r=1;for(let l=0,h=e.length;l<h;l++)e[l].number<=t&&(0===e[l].number?s=0:(s=t/e[l].number,r=e[l].number),a=e[l].prefix,n=e[l].suffix,o=!0);return!o&&i&&e.length&&0!=t&&(s=t/e[0].number,a=e[0].prefix,n=e[0].suffix,o=!0),o&&(s=parseFloat(s.toPrecision(Math.min(r.toString().length+Math.floor(s).toString().replace(/[^0-9]*/g,"").length,21)))),[s,a,n]}escape(t){return t.replace("||",it.cb)}unescape(t){return t.replace(it.cb,"|")}}function Te(t,e){let i=0,s=0,a=1,n=0,o=0,r=0,l=0,h=0;return t.formatToParts(e).forEach(t=>{switch(t.type){case"year":i=+t.value;break;case"month":s=+t.value-1;break;case"day":a=+t.value;break;case"hour":n=+t.value;break;case"minute":o=+t.value;break;case"second":r=+t.value;break;case"fractionalSecond":l=+t.value;break;case"weekday":switch(t.value){case"Sun":h=0;break;case"Mon":h=1;break;case"Tue":h=2;break;case"Wed":h=3;break;case"Thu":h=4;break;case"Fri":h=5;break;case"Sat":h=6;break}}}),24===n&&(n=0),{year:i,month:s,day:a,hour:n,minute:o,second:r,millisecond:l,weekday:h}}function Pe(t,e){const{year:i,month:s,day:a,hour:n,minute:o,second:r,millisecond:l}=Te(t,e);return Date.UTC(i,s,a,n,o,r,l)}class Ae{constructor(t,e){if(!e)throw new Error("You cannot use `new Class()`, instead use `Class.new()`");this.name=t,this._utc=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:"UTC",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",weekday:"short",fractionalSecondDigits:3}),this._dtf=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",weekday:"short",fractionalSecondDigits:3})}static new(t){return new this(t,!0)}convertLocal(t){const e=this.offsetUTC(t),i=t.getTimezoneOffset(),s=new Date(t);s.setUTCMinutes(s.getUTCMinutes()-(e-i));const a=s.getTimezoneOffset();return i!=a&&s.setUTCMinutes(s.getUTCMinutes()+a-i),s}offsetUTC(t){const e=Pe(this._utc,t),i=Pe(this._dtf,t);return(e-i)/6e4}parseDate(t){return Te(this._dtf,t)}}
1class Se extends St{_setDefaults(){this._setDefault("capitalize",!0),this._setDefault("dateFormat","yyyy-MM-dd"),super._setDefaults()}_beforeChanged(){super._beforeChanged()}format(t,e,i=!1){let s;"undefined"!==typeof e&&""!==e||(e=this.get("dateFormat","yyyy-MM-dd"));let a=t;if(it.Gv(e))try{const t=this.get("intlLocales");return t?new Intl.DateTimeFormat(t,e).format(a):new Intl.DateTimeFormat(void 0,e).format(a)}catch(l){return"Invalid"}let n=this.parseFormat(e);const o=this._root.timezone;let r=a;return!o||this._root.utc||i||(a=o.convertLocal(a)),it.Et(a.getTime())?(s=this.applyFormat(a,n,i,r),this.get("capitalize")&&(s=s.replace(/^.{1}/,s.substr(0,1).toUpperCase())),s):"Invalid date"}applyFormat(t,e,i=!1,s){let a,n,o,r,l,h,c,d,u=e.template,p=t.getTime();this._root.utc&&!i?(a=t.getUTCFullYear(),n=t.getUTCMonth(),o=t.getUTCDay(),r=t.getUTCDate(),l=t.getUTCHours(),h=t.getUTCMinutes(),c=t.getUTCSeconds(),d=t.getUTCMilliseconds()):(a=t.getFullYear(),n=t.getMonth(),o=t.getDay(),r=t.getDate(),l=t.getHours(),h=t.getMinutes(),c=t.getSeconds(),d=t.getMilliseconds());for(let g=0,m=e.parts.length;g<m;g++){let i="";switch(e.parts[g]){case"G":i=this._t(a<0?"_era_bc":"_era_ad");break;case"yyyy":i=Math.abs(a).toString(),a<0&&(i+=this._t("_era_bc"));break;case"yyy":case"yy":case"y":i=Math.abs(a).toString().substr(-e.parts[g].length),a<0&&(i+=this._t("_era_bc"));break;case"YYYY":case"YYY":case"YY":case"Y":let u=Ft.Ao(t,this._root.utc);i="YYYY"==e.parts[g]?Math.abs(u).toString():Math.abs(u).toString().substr(-e.parts[g].length),u<0&&(i+=this._t("_era_bc"));break;case"u":break;case"q":i=""+Math.ceil((t.getMonth()+1)/3);break;case"MMMMM":i=this._t(this._getMonth(n)).substr(0,1);break;case"MMMM":i=this._t(this._getMonth(n));break;case"MMM":i=this._t(this._getShortMonth(n));break;case"MM":i=Ft.tr(n+1,2,"0");break;case"M":i=(n+1).toString();break;case"ww":i=Ft.tr(Ft.Nr(t,this._root.utc),2,"0");break;case"w":i=Ft.Nr(t,this._root.utc).toString();break;case"W":i=Ft.L_(t,this._root.utc).toString();break;case"dd":i=Ft.tr(r,2,"0");break;case"d":i=r.toString();break;case"DD":case"DDD":i=Ft.tr(Ft._Q(t,this._root.utc).toString(),e.parts[g].length,"0");break;case"D":i=Ft._Q(t,this._root.utc).toString();break;case"F":break;case"g":break;case"t":i=this._root.language.translateFunc("_dateOrd").call(this,r);break;case"E":i=(o||7).toString();break;case"EE":i=Ft.tr((o||7).toString(),2,"0");break;case"EEE":case"eee":i=this._t(this._getShortWeekday(o));break;case"EEEE":case"eeee":i=this._t(this._getWeekday(o));break;case"EEEEE":case"eeeee":i=this._t(this._getShortWeekday(o)).substr(0,1);break;case"e":case"ee":i=(o-(this._root.locale.firstDayOfWeek||1)+1).toString(),"ee"==e.parts[g]&&(i=Ft.tr(i,2,"0"));break;case"a":i=l>=12?this._t("PM"):this._t("AM");break;case"aa":i=l>=12?this._t("P.M."):this._t("A.M.");break;case"aaa":i=l>=12?this._t("P"):this._t("A");break;case"h":i=Ft.Jx(l).toString();break;case"hh":i=Ft.tr(Ft.Jx(l),2,"0");break;case"H":i=l.toString();break;case"HH":i=Ft.tr(l,2,"0");break;case"K":i=Ft.Jx(l,0).toString();break;case"KK":i=Ft.tr(Ft.Jx(l,0),2,"0");break;case"k":i=(l+1).toString();break;case"kk":i=Ft.tr(l+1,2,"0");break;case"m":i=h.toString();break;case"mm":i=Ft.tr(h,2,"0");break;case"s":i=c.toString();break;case"ss":i=Ft.tr(c,2,"0");break;case"S":case"SS":case"SSS":i=Math.round(d/1e3*Math.pow(10,e.parts[g].length)).toString();break;case"x":i=p.toString();break;case"n":case"nn":case"nnn":i=Ft.tr(d,e.parts[g].length,"0");break;case"z":i=Ft.O(s||t,!1,!1,this._root.utc,this._root.timezone?this._root.timezone.name:void 0).replace(/[+-]+[0-9]+$/,"");break;case"zz":i=Ft.O(s||t,!0,!1,this._root.utc,this._root.timezone?this._root.timezone.name:void 0);break;case"zzz":i=Ft.O(s||t,!1,!0,this._root.utc,this._root.timezone?this._root.timezone.name:void 0).replace(/[+-]+[0-9]+$/,"");break;case"zzzz":i=Ft.O(s||t,!0,!0,this._root.utc,this._root.timezone?this._root.timezone.name:void 0);break;case"Z":case"ZZ":let m=this._root.utc?"UTC":this._root.timezone;m instanceof Ae&&(m=m.name);const _=m?Ft.Zn(m,s||t):t.getTimezoneOffset();let v=Math.abs(_)/60,f=Math.floor(v),y=60*v-60*f;this._root.utc&&(f=0,y=0),"Z"==e.parts[g]?(i="GMT",i+=_>0?"-":"+",i+=Ft.tr(f,2)+":"+Ft.tr(y,2)):(i=_>0?"-":"+",i+=Ft.tr(f,2)+Ft.tr(y,2));break;case"i":i=t.toISOString();break;case"I":i=t.toUTCString();break}u=u.replace(it.Kx,i)}return u}parseFormat(t){let e={template:"",parts:[]},i=he.chunk(t,!0);for(let s=0;s<i.length;s++){let t=i[s];if("value"===t.type){if(t.text.match(/^date$/i)){let e=this.get("dateFormat","yyyy-MM-dd");it.Kg(e)||(e="yyyy-MM-dd"),t.text=e}let i=t.text.match(/G|yyyy|yyy|yy|y|YYYY|YYY|YY|Y|u|q|MMMMM|MMMM|MMM|MM|M|ww|w|W|dd|d|DDD|DD|D|F|g|EEEEE|EEEE|EEE|EE|E|eeeee|eeee|eee|ee|e|aaa|aa|a|hh|h|HH|H|KK|K|kk|k|mm|m|ss|s|SSS|SS|S|A|zzzz|zzz|zz|z|ZZ|Z|t|x|nnn|nn|n|i|I/g);if(i)for(let s=0;s<i.length;s++)e.parts.push(i[s]),t.text=t.text.replace(i[s],it.Kx)}e.template+=t.text}return e}_months(){return["January","February","March","April","May","June","July","August","September","October","November","December"]}_getMonth(t){return this._months()[t]}_shortMonths(){return["Jan","Feb","Mar","Apr","May(short)","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}_getShortMonth(t){return this._shortMonths()[t]}_weekdays(){return["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
1ay","Saturday"]}_getWeekday(t){return this._weekdays()[t]}_shortWeekdays(){return["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]}_getShortWeekday(t){return this._shortWeekdays()[t]}parse(t,e,i){if("undefined"===typeof i&&(i=this._root.utc),t instanceof Date)return t;if(it.Et(t))return new Date(t);if("x"==e)return new Date(parseInt(t));let s;it.Kg(t)||(t=t.toString());let a="";e=Ft.fZ(e),e=e.substr(0,t.length);let n=this.parseFormat(e),o={year:-1,year3:-1,year2:-1,year1:-1,month:-1,monthShort:-1,monthLong:-1,weekdayShort:-1,weekdayLong:-1,day:-1,yearDay:-1,week:-1,hourBase0:-1,hour12Base0:-1,hourBase1:-1,hour12Base1:-1,minute:-1,second:-1,millisecond:-1,millisecondDigits:-1,am:-1,zone:-1,timestamp:-1,iso:-1},r={year:1970,month:0,day:1,hour:0,minute:0,second:0,millisecond:0,timestamp:null,offset:0,utc:i},l=0,h=0;for(let u=0;u<n.parts.length;u++){switch(h=u+l+1,n.parts[u]){case"yyyy":case"YYYY":a+="([0-9]{4})",o.year=h;break;case"yyy":case"YYY":a+="([0-9]{3})",o.year3=h;break;case"yy":case"YY":a+="([0-9]{2})",o.year2=h;break;case"y":case"Y":a+="([0-9]{1})",o.year1=h;break;case"MMMM":a+="("+this.getStringList(this._months()).join("|")+")",o.monthLong=h;break;case"MMM":a+="("+this.getStringList(this._shortMonths()).join("|")+")",o.monthShort=h;break;case"MM":case"M":a+="([0-9]{2}|[0-9]{1})",o.month=h;break;case"ww":case"w":a+="([0-9]{2}|[0-9]{1})",o.week=h;break;case"dd":case"d":a+="([0-9]{2}|[0-9]{1})",o.day=h;break;case"DDD":case"DD":case"D":a+="([0-9]{3}|[0-9]{2}|[0-9]{1})",o.yearDay=h;break;case"dddd":a+="("+this.getStringList(this._weekdays()).join("|")+")",o.weekdayLong=h;break;case"ddd":a+="("+this.getStringList(this._shortWeekdays()).join("|")+")",o.weekdayShort=h;break;case"aaa":case"aa":case"a":a+="("+this.getStringList(["AM","PM","A.M.","P.M.","A","P"]).join("|")+")",o.am=h;break;case"hh":case"h":a+="([0-9]{2}|[0-9]{1})",o.hour12Base1=h;break;case"HH":case"H":a+="([0-9]{2}|[0-9]{1})",o.hourBase0=h;break;case"KK":case"K":a+="([0-9]{2}|[0-9]{1})",o.hour12Base0=h;break;case"kk":case"k":a+="([0-9]{2}|[0-9]{1})",o.hourBase1=h;break;case"mm":case"m":a+="([0-9]{2}|[0-9]{1})",o.minute=h;break;case"ss":case"s":a+="([0-9]{2}|[0-9]{1})",o.second=h;break;case"SSS":case"SS":case"S":a+="([0-9]{3}|[0-9]{2}|[0-9]{1})",o.millisecond=h,o.millisecondDigits=n.parts[u].length;break;case"nnn":case"nn":case"n":a+="([0-9]{3}|[0-9]{2}|[0-9]{1})",o.millisecond=h;break;case"x":a+="([0-9]{1,})",o.timestamp=h;break;case"Z":a+="GMT([-+]+[0-9]{2}:[0-9]{2})",o.zone=h;break;case"ZZ":a+="([\\-+]+[0-9]{2}[0-9]{2})",o.zone=h;break;case"i":a+="([0-9]{4})-?([0-9]{2})-?([0-9]{2})T?([0-9]{2}):?([0-9]{2}):?([0-9]{2})\\.?([0-9]{0,3})([zZ]|[+\\-][0-9]{2}:?[0-9]{2}|$)",o.iso=h,l+=7;break;case"G":case"YYYY":case"YYY":case"YY":case"Y":case"MMMMM":case"W":case"EEEEE":case"EEEE":case"EEE":case"EE":case"E":case"eeeee":case"eeee":case"eee":case"ee":case"e":case"zzzz"
1:case"zzz":case"zz":case"z":case"t":l--;break}a+="[^0-9]*"}let c=new RegExp(a),d=t.match(c);if(d){if(o.year>-1&&(r.year=parseInt(d[o.year])),o.year3>-1){let t=parseInt(d[o.year3]);t+=1e3,r.year=t}if(o.year2>-1){let t=parseInt(d[o.year2]);t+=t>50?1e3:2e3,r.year=t}if(o.year1>-1){let t=parseInt(d[o.year1]);t=10*Math.floor((new Date).getFullYear()/10)+t,r.year=t}if(o.monthLong>-1&&(r.month=this.resolveMonth(d[o.monthLong])),o.monthShort>-1&&(r.month=this.resolveShortMonth(d[o.monthShort])),o.month>-1&&(r.month=parseInt(d[o.month])-1),o.week>-1&&-1===o.day&&(r.month=0,r.day=Ft.X2(parseInt(d[o.week]),r.year,1,i)),o.day>-1&&(r.day=parseInt(d[o.day])),o.yearDay>-1&&(r.month=0,r.day=parseInt(d[o.yearDay])),o.hourBase0>-1&&(r.hour=parseInt(d[o.hourBase0])),o.hourBase1>-1&&(r.hour=parseInt(d[o.hourBase1])-1),o.hour12Base0>-1){let t=parseInt(d[o.hour12Base0]);11==t&&(t=0),o.am>-1&&!this.isAm(d[o.am])&&(t+=12),r.hour=t}if(o.hour12Base1>-1){let t=parseInt(d[o.hour12Base1]);12==t&&(t=0),o.am>-1&&!this.isAm(d[o.am])&&(t+=12),r.hour=t}if(o.minute>-1&&(r.minute=parseInt(d[o.minute])),o.second>-1&&(r.second=parseInt(d[o.second])),o.millisecond>-1){let t=parseInt(d[o.millisecond]);2==o.millisecondDigits?t*=10:1==o.millisecondDigits&&(t*=100),r.millisecond=t}if(o.timestamp>-1){r.timestamp=parseInt(d[o.timestamp]);const t=new Date(r.timestamp);r.year=t.getUTCFullYear(),r.month=t.getUTCMonth(),r.day=t.getUTCDate(),r.hour=t.getUTCHours(),r.minute=t.getUTCMinutes(),r.second=t.getUTCSeconds(),r.millisecond=t.getUTCMilliseconds()}o.zone>-1&&(r.offset=this.resolveTimezoneOffset(new Date(r.year,r.month,r.day),d[o.zone])),o.iso>-1&&(r.year=it.Ro(d[o.iso+0]),r.month=it.Ro(d[o.iso+1])-1,r.day=it.Ro(d[o.iso+2]),r.hour=it.Ro(d[o.iso+3]),r.minute=it.Ro(d[o.iso+4]),r.second=it.Ro(d[o.iso+5]),r.millisecond=it.Ro(d[o.iso+6]),"Z"==d[o.iso+7]||"z"==d[o.iso+7]?r.utc=!0:""!=d[o.iso+7]&&(r.offset=this.resolveTimezoneOffset(new Date(r.year,r.month,r.day),d[o.iso+7]))),s=r.utc?new Date(Date.UTC(r.year,r.month,r.day,r.hour,r.minute,r.second,r.millisecond)):new Date(r.year,r.month,r.day,r.hour,r.minute+r.offset,r.second,r.millisecond)}else s=new Date(t);return s}resolveTimezoneOffset(t,e){let i=e.match(/([+\-]?)([0-9]{2}):?([0-9]{2})/);if(i){let i=e.match(/([+\-]?)([0-9]{2}):?([0-9]{2})/),s=i[1],a=i[2],n=i[3],o=60*parseInt(a)+parseInt(n);"+"==s&&(o*=-1);let r=(t||new Date).getTimezoneOffset(),l=o-r;return l}return 0}resolveMonth(t){let e=this._months().indexOf(t);return e>-1||!this._root.language.isDefault()&&(e=this._root.language.translateAll(this._months()).indexOf(t),e>-1)?e:0}resolveShortMonth(t){let e=this._shortMonths().indexOf(t);return e>-1?e:(e=this._months().indexOf(t),e>-1||this._root.language&&!this._root.language.isDefault()&&(e=this._root.language.translateAll(this._shortMonths()).indexOf(t),e>-1)?e:0)}isAm(t){let e=this.getStringList(["AM","A.M.","A"]);return e.indexOf(t.toUpperCase())>-1}getStringList(t){let e=[];for(let i=0;i<t.length;i++)this._root.language?e.push(Ft.xp(this._t(t[i]))):e.push(Ft.xp(t[i]));return e}}class Me extends St{constructor(){super(...arguments),this._unitAliases={Y:"y",D:"d",H:"h",K:"h",k:"h",n:"S"}}_setDefaults(){const t="_duration_millisecond",e="_duration_second",i="_duration_minute",s="_duration_hour",a="_duration_day",n="_duration_week",o="_duration_month",r="_duration_year",l="_second",h="_minute",c="_hour",d="_day",u="_week",p="_week",g="_year";this._setDefault("negativeBase",0),this._setDefault("baseUnit","second"),this._setDefault("durationFormats",{millisecond:{millisecond:this._t(t),second:this._t(t+l),minute:this._t(t+h),hour:this._t(t+c),day:this._t(t+d),week:this._t(t+u),month:this._t(t+p),year:this._t(t+g)},second:{second:this._t(e),minute:this._t(e+h),hour:this._t(e+c),day:this._t(e+d),week:this._t(e+u),month:this._t(e+p),year:this._t(e+g)},minute:{minute:this._t(i),hour:this._t(i+c),day:this._t(i+d),week:this._t(i+u),month:this._t(i+p),year:this._t(i+g)},hour:{hour:this._t(s),day:this._t(s+d),week:this._t(s+u),month:this._t(s+p),year:this._t(s+g)},day:{day:this._t(a),week:this._t(a+u),month:this._t(a+p),year:this._t(a+g)},week:{week:this._t(n),month:this._t(n+p),year:this._t(n+g)},month:{month:this._t(o),year:this._t(o+g)},year:{year:this._t(r)}}),super._setDefaults()}_beforeChanged(){super._beforeChanged()}format(t,e,i){let s=i||this.get("baseUnit");"undefined"!==typeof e&&""!==e||(e=null!=this.get("durationFormat")?this.get("durationFormat"):this.getFormat(it.Ro(t),void 0,s)),e=Ft.fZ(e);let a,n=this.parseFormat(e,s),o=Number(t);a=o>this.get("negativeBase")?n.positive:o<this.get("negativeBase")?n.negative:n.zero;let r=this.applyFormat(o,a);return""!==a.color&&(r="["+a.color+"]"+r+"[/]"),r}parseFormat(t,e){let i=e||this.get("baseUnit"),s={positive:{color:"",template:"",parts:[],source:"",baseUnit:i,parsed:!1,absolute:!1},negative:{color:"",template:"",parts:[],source:"",baseUnit:i,parsed:!1,absolute:!1},zero:{color:"",template:"",parts:[],source:"",baseUnit:i,parsed:!1,absolute:!1}};t=t.replace("||",it.cb);let a=t.split("|");return s.positive.source=a[0],"undefined"===typeof a[2]?s.zero=s.positive:s.zero.source=a[2],"undefined"===typeof a[1]?s.negative=s.positive:s.negative.source=a[1],dt.__(s,(t,e)=>{if(e.parsed)return;let i=e.source,s=[];s=e.source.match(/^\[([^\]]*)\]/),s&&s.length&&""!==s[0]&&(i=e.source.substr(s[0].length),e.color=s[1]);let a=he.chunk(i,!0);for(let n=0;n<a.length;n++){let t=a[n];if(t.text=t.text.replace(it.cb,"|"),"value"===t.type){t.text.match(/[yYMdDwhHKkmsSn]+a/)&&(e.absolute=!0,t.text=t.text.replace(/([yYMdDwhHKkmsSn]+)a/,"$1"));let i=t.text.match(/y+|Y+|M+|d+|D+|w+|h+|H+|K+|k+|m+|s+|S+|n+/g);if(i)for(let s=0;s<i.length;s++)null==i[s]&&(i[s]=this._unitAliases[i[s]]),e.parts.push(i[s]),t.text=t.text.replace(i[s],it.Kx)}e.template+=t.text}e.parsed=!0}),s}applyFormat(t,e){let i=!e.absolute&&t<this.get("negativeBase");t=Math.abs(t);
1let s=this.toTimeStamp(t,e.baseUnit),a=e.template;const n={millisecond:0,second:0,minute:0,hour:0,day:0,week:0,month:0,year:0};for(let o=0,r=e.parts.length;o<r;o++){let t,i=e.parts[o],a=this._toTimeUnit(i.substr(0,1));const l=this._getUnitValue(a);t=o<r-1?Math.floor(s/l):Math.round(s/l),n[a]+=t,s-=t*l}dt.__(n,(t,i)=>{"millisecond"==t&&1e3==i?(n["second"]++,n["millisecond"]=0):"second"==t&&60==i?(n["minute"]++,n["second"]=0):"minute"==t&&60==i?(n["hour"]++,n["minute"]=0):"hour"==t&&24==i?(n["day"]++,n["hour"]=0):"day"==t&&7==i&&-1!==e.parts.indexOf("w")?(n["week"]++,n["day"]=0):"day"==t&&30==i?(n["month"]++,n["day"]=0):"month"==t&&12==i&&(n["year"]++,n["month"]=0)});for(let o=0,r=e.parts.length;o<r;o++){let t=e.parts[o],i=this._toTimeUnit(t.substr(0,1)),s=t.length;a=a.replace(it.Kx,Ft.tr(n[i],s,"0"))}return i&&(a="-"+a),a}toTimeStamp(t,e){return t*this._getUnitValue(e)}_toTimeUnit(t){switch(t){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year"}}getFormat(t,e,i){if(null!=this.get("durationFormat"))return this.get("durationFormat");if(i||(i=this.get("baseUnit")),null!=e&&t!=e){t=Math.abs(t),e=Math.abs(e);let s=this.getValueUnit(Math.max(t,e),i);return this.get("durationFormats")[i][s]}{let e=this.getValueUnit(t,i);return this.get("durationFormats")[i][e]}}getValueUnit(t,e){let i;e||(e=this.get("baseUnit"));let s=this.getMilliseconds(t,e);return dt.FY(this._getUnitValues(),(t,a)=>{if(t==e||i){let e=s/a;if(e<=1)return i||(i=t),!1;i=t}return!0}),i}getMilliseconds(t,e){return e||(e=this.get("baseUnit")),t*this._getUnitValue(e)}_getUnitValue(t){return this._getUnitValues()[t]}_getUnitValues(){return{millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5,month:2592e6,year:31536e6}}}var Ee={firstDayOfWeek:1,_decimalSeparator:".",_thousandSeparator:",",_percentPrefix:null,_percentSuffix:"%",_big_number_suffix_3:"k",_big_number_suffix_6:"M",_big_number_suffix_9:"G",_big_number_suffix_12:"T",_big_number_suffix_15:"P",_big_number_suffix_18:"E",_big_number_suffix_21:"Z",_big_number_suffix_24:"Y",_small_number_suffix_3:"m",_small_number_suffix_6:"μ",_small_number_suffix_9:"n",_small_number_suffix_12:"p",_small_number_suffix_15:"f",_small_number_suffix_18:"a",_small_number_suffix_21:"z",_small_number_suffix_24:"y",_byte_suffix_B:"B",_byte_suffix_KB:"KB",_byte_suffix_MB:"MB",_byte_suffix_GB:"GB",_byte_suffix_TB:"TB",_byte_suffix_PB:"PB",_date:"yyyy-MM-dd",_date_millisecond:"mm:ss SSS",_date_millisecond_full:"HH:mm:ss SSS",_date_second:"HH:mm:ss",_date_second_full:"HH:mm:ss",_date_minute:"HH:mm",_date_minute_full:"HH:mm - MMM dd, yyyy",_date_hour:"HH:mm",_date_hour_short:"HH",_date_hour_full:"HH:mm - MMM dd, yyyy",_date_day:"MMM dd",_date_day_full:"MMM dd, yyyy",_date_week:"ww",_date_week_full:"MMM dd, yyyy",_date_month:"MMM",_date_month_full:"MMM, yyyy",_date_year:"yyyy",_duration_millisecond:"SSS",_duration_millisecond_second:"ss.SSS",_duration_millisecond_minute:"mm:ss SSS",_duration_millisecond_hour:"hh:mm:ss SSS",_duration_millisecond_day:"d'd' mm:ss SSS",_duration_millisecond_week:"d'd' mm:ss SSS",_duration_millisecond_month:"M'm' dd'd' mm:ss SSS",_duration_millisecond_year:"y'y' MM'm' dd'd' mm:ss SSS",_duration_second:"ss",_duration_second_minute:"mm:ss",_duration_second_hour:"hh:mm:ss",_duration_second_day:"d'd' hh:mm:ss",_duration_second_week:"d'd' hh:mm:ss",_duration_second_month:"M'm' dd'd' hh:mm:ss",_duration_second_year:"y'y' MM'm' dd'd' hh:mm:ss",_duration_minute:"mm",_duration_minute_hour:"hh:mm",_duration_minute_day:"d'd' hh:mm",_duration_minute_week:"d'd' hh:mm",_duration_minute_month:"M'm' dd'd' hh:mm",_duration_minute_year:"y'y' MM'm' dd'd' hh:mm",_duration_hour:"hh'h'",_duration_hour_day:"d'd' hh'h'",_duration_hour_week:"d'd' hh'h'",_duration_hour_month:"M'm' dd'd' hh'h'",_duration_hour_year:"y'y' MM'm' dd'd' hh'h'",_duration_day:"d'd'",_duration_day_week:"d'd'",_duration_day_month:"M'm' dd'd'",_duration_day_year:"y'y' MM'm' dd'd'",_duration_week:"w'w'",_duration_week_month:"w'w'",_duration_week_year:"w'w'",_duration_month:"M'm'",_duration_month_year:"y'y' MM'm'",_duration_year:"y'y'",_era_ad:"AD",_era_bc:"BC",A:"",P:"",AM:"",PM:"","A.M.":"","P.M.":"",January:"",February:"",March:"",April:"",May:"",June:"",July:"",August:"",September:"",October:"",November:"",December:"",Jan:"",Feb:"",Mar:"",Apr:"","May(short)":"May",Jun:"",Jul:"",Aug:"",Sep:"",Oct:"",Nov:"",Dec:"",Sunday:"",Monday:"",Tuesday:"",Wednesday:"",Thursday:"",Friday:"",Saturday:"",Sun:"",Mon:"",Tue:"",Wed:"",Thu:"",Fri:"",Sat:"",_dateOrd:function(t){let e="th";if(t<11||t>13)switch(t%10){case 1:e="st";break;case 2:e="nd";break;case 3:e="rd";break}return e},"Zoom Out":"",Play:"",Stop:"",Legend:"","Press ENTER to toggle":"",Loading:"",Home:"",Chart:"","Serial chart":"","X/Y chart":"","Pie chart":"","Gauge chart":"","Radar chart":"","Sankey diagram":"","Flow diagram":"","Chord diagram":"","TreeMap chart":"","Force directed tree":"","Sliced chart":"",Series:"","Candlestick Series":"","OHLC Series":"","Column Series":"","Line Series":"","Pie Slice Series":"","Funnel Series":"","Pyramid Series":"","X/Y Series":"",Map:"","Press ENTER to zoom in":"","Press ENTER to zoom out":"","Use arrow keys to zoom in and out":"","Use plus and minus keys on your keyboard to zoom in and out":"",Export:"",Image:"",Data:"",Print:"","Press ENTER or use arrow keys to navigate":"","Press ENTER to open":"","Press ENTER to print.":"","Press ENTER to export as %1.":"","(Press ESC to close this message)":"","Image Export Complete":"","Export operation took longer than expected. Something might have gone wrong.":"","Saved from":"",PNG:"",JPG:"",GIF:"",SVG:"",PDF:"",JSON:"",CSV:"",XLSX:"",HTML:"","Use TAB to select grip buttons or left and right arrows to change selection":"","Use left and right arrows to move selection":"","Use left and right arrows to move left selection":"","Use left and right arrows to move right selection":"","Use TAB select grip buttons or up and down arrows to change selection":"","Use up and down arrows to move selection":"","Use up and down arrows to move lower selection":"","Use up and down arrows to move upper selection":"","From %1 to %2":"","From %1":"","To %1":"","No parser available for file: %1":"","Error parsing file: %1":"","Unable to load file: %1":"","Invalid date":"",Close:"",Minimize:"",Confirm:""};class Ie extends St{_setDefaults(){this.setPrivate("defaultLocale",Ee),super._setDefaults()}translate(t,e,...i){e||(e=this._root.locale||this.getPrivate("defaultLocale"));let s=t,a=e[t];if(null===a)s="";else if(null!=a)a&&(s=a);else if(e!==this.getPrivate("defaultLocale"))return this.translate(t,this.getPrivate("defaultLocale"),...i);if(i.length)for(let n=i.length,o=0;o<n;++o)s=s.split("%"+(o+1)).join(i[o]);return s}translateAny(t,e,...i){return this.translate(t,e,...i)}setTranslationAny(t,e,i){const s=i||this._root.locale;s[t]=e}setTranslationsAny(t,e){dt.__(t,(t,i)=>{this.setTranslationAny(t,i,e)})}translateEmpty(t,e,...i){let s=this.translate(t,e,...i);return s==t?"":s}translateFunc(t,e){return this._root.locale[t]?this._root.locale[t]:e!==this.getPrivate("defaultLocale")?this.translateFunc(t,this.getPrivate("defaultLocale")):()=>""}translateAll(t,e){return this.isDefault()?t:et.Tj(t,t=>this.translate(t,e))}isDefault(){return this.getPrivate("defaultLocale")===this._root.locale}}class Re{constructor(t,e){if(this._rules={},this._root=t,!e)throw new Error("You cannot use `new Class()`, instead use `Class.new()`")}static new(t){const e=new this(t,!0);return e.setupDefaultRules(),e}setupDefaultRules(){}_lookupRules(t){return this._rules[t]}ruleRaw(t,e=[]){let i=this._rules[t];i||(i=this._rules[t]=[]),e.sort(wt);const{index:s,found:a}=et.IU(i,t=>{const i=wt(t.tags.length,e.length);return 0===i?Ct(t.tags,e,wt):i});if(a)return i[s].template;{const t=Lt.new({});return i.splice(s,0,{tags:e,template:t}),t}}rule(t,e=[]){return this.ruleRaw(t,e)}}function Le(t,e,i,s){t.set(e,i.get(s)),i.on(s,i=>{t.set(e,i)})}class Fe extends Re{setupDefaultRules(){super.setupDefaultRules();const t=this._root.language,e=this._root.interfaceColors,i=this._root.horizontalLayout,s=this._root.verticalLayout,a=this.rule.bind(this);a("InterfaceColors").setAll({stroke:le.Q1.fromHex(15066597),fill:le.Q1.fromHex(15987699),primaryButton:le.Q1.fromHex(6788316),primaryButtonHover:le.Q1.fromHex(6779356),primaryButtonDown:le.Q1.fromHex(6872182),primaryButtonActive:le.Q1.fromHex(6872182),primaryButtonDisabled:le.Q1.fromHex(14342874),primaryButtonTextDisabled:le.Q1.fromHex(16777215),primaryButtonText:le.Q1.fromHex(16777215),primaryButtonStroke:le.Q1.fromHex(16777215),secondaryButton:le.Q1.fromHex(14277081),secondaryButtonHover:le.Q1.fromHex(10724259),secondaryButtonDown:le.Q1.fromHex(9276813),secondaryButtonActive:le.Q1.fromHex(15132390),secondaryButtonText:le.Q1.fromHex(0),secondaryButtonStroke:le.Q1.fromHex(16777215),grid:le.Q1.fromHex(0),background:le.Q1.fromHex(16777215),alternativeBackgroun
1d:le.Q1.fromHex(0),text:le.Q1.fromHex(0),alternativeText:le.Q1.fromHex(16777215),disabled:le.Q1.fromHex(11382189),positive:le.Q1.fromHex(5288704),negative:le.Q1.fromHex(11730944)});{const t=a("ColorSet");t.setAll({passOptions:{hue:.05,saturation:0,lightness:0},colors:[le.Q1.fromHex(6797276)],step:1,reuse:!1,startIndex:0}),t.setPrivate("currentStep",0),t.setPrivate("currentPass",0)}a("Entity").setAll({stateAnimationDuration:0,stateAnimationEasing:gt(pt)}),a("Component").setAll({interpolationDuration:0,interpolationEasing:gt(pt)}),a("Sprite").setAll({visible:!0,scale:1,opacity:1,rotation:0,position:"relative",tooltipX:ht.yP,tooltipY:ht.yP,tooltipPosition:"fixed",isMeasured:!0}),a("Sprite").states.create("default",{visible:!0,opacity:1}),a("Container").setAll({interactiveChildren:!0,setStateOnChildren:!1}),a("Graphics").setAll({strokeWidth:1}),a("Chart").setAll({width:ht.Q2,height:ht.Q2,interactiveChildren:!1}),a("ZoomableContainer").setAll({width:ht.Q2,height:ht.Q2,wheelable:!0,pinchZoom:!0,maxZoomLevel:32,minZoomLevel:1,zoomStep:2,animationEasing:gt(pt),animationDuration:600,maxPanOut:.4}),a("Sprite",["horizontal","center"]).setAll({centerX:ht.yP,x:ht.yP}),a("Sprite",["vertical","center"]).setAll({centerY:ht.yP,y:ht.yP}),a("Container",["horizontal","layout"]).setAll({layout:i}),a("Container",["vertical","layout"]).setAll({layout:s}),a("Pattern").setAll({repetition:"repeat",width:50,height:50,rotation:0,fillOpacity:1}),a("LinePattern").setAll({gap:6,colorOpacity:1,width:49,height:49}),a("RectanglePattern").setAll({gap:6,checkered:!1,centered:!0,maxWidth:5,maxHeight:5,width:48,height:48,strokeWidth:0}),a("CirclePattern").setAll({gap:5,checkered:!1,centered:!1,radius:3,strokeWidth:0,width:45,height:45}),a("GrainPattern").setAll({width:200,height:200,colors:[le.Q1.fromHex(0)],size:1,horizontalGap:0,verticalGap:0,density:1,minOpacity:0,maxOpacity:.2});{const t=a("PatternSet");t.setAll({step:1}),Le(t,"color",e,"stroke")}a("LinearGradient").setAll({rotation:90}),a("Legend").setAll({fillField:"fill",strokeField:"stroke",nameField:"name",layout:re.new(this._root,{}),layer:30,clickTarget:"itemContainer"}),a("Container",["legend","item","itemcontainer"]).setAll({paddingLeft:5,paddingRight:5,paddingBottom:5,paddingTop:5,layout:i,setStateOnChildren:!0,interactiveChildren:!1,ariaChecked:!0,focusable:!0,ariaLabel:t.translate("Press ENTER to toggle"),role:"checkbox"});{const t=a("Rectangle",["legend","item","background"]);t.setAll({fillOpacity:0}),Le(t,"fill",e,"background")}a("Container",["legend","marker"]).setAll({setStateOnChildren:!0,centerY:ht.yP,paddingLeft:0,paddingRight:0,paddingBottom:0,paddingTop:0,width:18,height:18}),a("RoundedRectangle",["legend","marker","rectangle"]).setAll({width:ht.Q2,height:ht.Q2,cornerRadiusBL:3,cornerRadiusTL:3,cornerRadiusBR:3,cornerRadiusTR:3});{const t=a("RoundedRectangle",["legend","marker","rectangle"]).states.create("disabled",{});Le(t,"fill",e,"disabled"),Le(t,"stroke",e,"disabled")}a("Label",["legend","label"]).setAll({centerY:ht.yP,marginLeft:5,paddingRight:0,paddingLeft:0,paddingTop:0,paddingBottom:0,populateText:!0});{const t=a("Label",["legend","label"]).states.create("disabled",{});Le(t,"fill",e,"disabled")}a("Label",["legend","value","label"]).setAll({centerY:ht.yP,marginLeft:5,paddingRight:0,paddingLeft:0,paddingTop:0,paddingBottom:0,width:50,centerX:ht.Q2,populateText:!0});{const t=a("Label",["legend","value","label"]).states.create("disabled",{});Le(t,"fill",e,"disabled")}a("HeatLegend").setAll({stepCount:1}),a("RoundedRectangle",["heatlegend","marker"]).setAll({cornerRadiusTR:0,cornerRadiusBR:0,cornerRadiusTL:0,cornerRadiusBL:0}),a("RoundedRectangle",["vertical","heatlegend","marker"]).setAll({height:ht.Q2,width:15}),a("RoundedRectangle",["horizontal","heatlegend","marker"]).setAll({width:ht.Q2,height:15}),a("HeatLegend",["vertical"]).setAll({height:ht.Q2}),a("HeatLegend",["horizontal"]).setAll({width:ht.Q2}),a("Label",["heatlegend","start"]).setAll({paddingLeft:5,paddingRight:5,paddingTop:5,paddingBottom:5}),a("Label",["heatlegend","end"]).setAll({paddingLeft:5,paddingRight:5,paddingTop:5,paddingBottom:5});{const t=a("Label");t.setAll({paddingTop:8,paddingBottom:8,paddingLeft:10,paddingRight:10,fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',fontSize:"1em",populateText:!1}),Le(t,"fill",e,"text")}a("RadialLabel").setAll({textType:"regular",centerY:ht.yP,centerX:ht.yP,inside:!1,radius:0,baseRadius:ht.Q2,orientation:"auto",textAlign:"center"}),a("EditableLabel").setAll({editOn:"click",themeTags:["editablelabel"],multiLine:!0}),a("RoundedRectangle",["editablelabel","background"]).setAll({fillOpacity:0,fill:le.Q1.fromHex(0),cornerRadiusBL:3,cornerRadiusBR:3,cornerRadiusTL:3,cornerRadiusTR:3,strokeOpacity:0,stroke:le.Q1.fromHex(0)}),a("RoundedRectangle",["editablelabel","background"]).states.create("active",{strokeOpacity:.2}),a("RoundedRectangle").setAll({cornerRadiusTL:8,cornerRadiusBL:8,cornerRadiusTR:8,cornerRadiusBR:8}),a("PointedRectangle").setAll({pointerBaseWidth:15,pointerLength:10,cornerRadius:8}),a("Slice").setAll({shiftRadius:0,dRadius:0,dInnerRadius:0});{const t=a("Tick");t.setAll({strokeOpacity:.15,isMeasured:!1,length:4.5,position:"absolute",crisp:!0}),Le(t,"stroke",e,"grid")}a("Bullet").setAll({locationX:.5,locationY:.5}),a("Tooltip").setAll({position:"absolute",getFillFromSprite:!0,getStrokeFromSprite:!1,autoTextColor:!0,paddingTop:9,paddingBottom:8,paddingLeft:10,paddingRight:10,marginBottom:5,pointerOrientation:"vertical",centerX:ht.yP,centerY:ht.yP,animationEasing:gt(pt),exportable:!1}),a("Tooltip",["system"]).setAll({pointerOrientation:"horizontal",paddingTop:4,paddingRight:7,paddingBottom:4,paddingLeft:7});{const t=a("PointedRectangle",["tooltip","system","background"]);t.setAll({strokeOpacity:.3}),Le(t,"fill",e,"background"),Le(t,"stroke",e,"grid")}a("Label",["tooltip","system"]).setAll({fontSize:12,fill:e.get("background")}),a("Polygon").setAll({animationEasing:gt(pt)}),a("Link").setAll({cornerRadius:8,setStateOnChildren:!0});{const t=a("OrthogonalLine",["link","line"]);t.setAll({isMeasured:!1,crisp:!0});const i=t.states.create("active",{strokeWidth:2});Le(i,"stroke",e,"negative")}a("OrthogonalLine",["link","hit"]).setAll({strokeWidth:10,opacity:0,strokeOpacity:0});{const t=a("OrthogonalLine");t.setAll({strokeWidth:1,strokeOpacity:1,cornerRadius:10}),Le(t,"stroke",e,"grid")}{const t=a("Triangle",["link"]);t.setAll({width:14,height:10,centerY:0}),Le(t,"fill",e,"grid"),Le(t,"stroke",e,"grid"),t.states.create("default",{stateAnimationDuration:0});const i=t.states.create("active",{stateAnimationDuration:0,stroke:(0,le.yW)(16777215),strokeWidth:2});i.set("draw",t=>{t.arc(0,0,11,0,2*Math.PI),t.moveTo(-4,-4),t.lineTo(4,4),t.moveTo(4,-4),t.lineTo(-4,4)}),Le(i,"fill",e,"negative")}{const t=a("PointedRectangle",["tooltip","background"]);t.setAll({strokeOpacity:.9,cornerRadius:4,pointerLength:4,pointerBaseWidth:8,fillOpacity:.9,stroke:le.Q1.fromHex(16777215)})}{const t=a("Label",["tooltip"]);t.setAll({role:"tooltip",populateText:!0,paddingRight:0,paddingTop:0,paddingLeft:0,paddingBottom:0}),Le(t,"fill",e,"alternativeText")}a("Button").setAll({paddingTop:8,paddingBottom:8,paddingLeft:10,paddingRight:10,interactive:!0,layout:i,interactiveChildren:!1,setStateOnChildren:!0,focusable:!0}),a("Button").states.create("hover",{}),a("Button").states.create("down",{stateAnimationDuration:0}),a("Button").states.create("active",{}),a("Button").states.create("disabled",{forceInactive:!0});{const t=a("RoundedRectangle",["button","background"]);Le(t,"fill",e,"primaryButton"),Le(t,"stroke",e,"primaryButtonStroke")}{const t=a("RoundedRectangle",["button","background"]).states.create("hover",{});Le(t,"fill",e,"primaryButtonHover")}{const t=a("RoundedRectangle",["button","background"]).states.create("down",{stateAnimationDuration:0});Le(t,"fill",e,"primaryButtonDown")}{const t=a("RoundedRectangle",["button","background"]).states.create("active",{});Le(t,"fill",e,"primaryButtonActive")}{const t=a("RoundedRectangle",["button","background"]).states.create("disabled",{});Le(t,"fill",e,"primaryButtonDisabled")}{const t=a("Graphics",["button","icon"]).states.create("disabled",{});Le(t,"fill",e,"primaryButtonTextDisabled")}{const t=a("Label",["button"]).states.create("disabled",{});Le(t,"fill",e,"primaryButtonTextDisabled")}{const t=a("Graphics",["button","icon"]);t.setAll({forceInactive:!0}),Le(t,"stroke",e,"primaryButtonText")}{const t=a("Label",["button"]);Le(t,"fill",e,"primaryButtonText")}a("ConfirmButton").setAll({toggleKey:"active",setStateOnChildren:!0,label:we.new(this._root,{text:t.translate("C
1onfirm"),forceHidden:!0})});{const t=a("RoundedRectangle",["button","background","confirm"]).states.create("active",{});Le(t,"fill",e,"negative")}a("Label",["button","confirm"]).setAll({paddingTop:0,paddingBottom:0,paddingRight:3,paddingLeft:5}),a("Label",["button","confirm"]).states.create("default",{stateAnimationDuration:0}),a("Label",["button","confirm"]).states.create("active",{forceHidden:!1,stateAnimationDuration:0});{const t=a("Graphics",["icon","confirm","button"]);t.setAll({stateAnimationDuration:0}),t.states.create("default",{stateAnimationDuration:0}),Le(t,"stroke",e,"primaryButtonText")}{const t=a("Graphics",["icon","confirm","button"]).states.create("active",{svgPath:"M -5 1 L 0 6 L 8 -5",strokeWidth:2});Le(t,"stroke",e,"primaryButtonText")}{const t=a("Graphics",["icon","confirm","button","secondary"]).states.create("active",{});Le(t,"stroke",e,"primaryButtonText")}{const t=a("RoundedRectangle",["button","background","confirm","secondary"]).states.create("active",{fillOpacity:1});Le(t,"fill",e,"negative")}{const t=a("RoundedRectangle",["button","background","confirm","secondary"]).states.create("hoverActive",{fillOpacity:1});Le(t,"fill",e,"negative")}a("Button",["button","confirm"]).states.create("hoverActive",{}),a("Button",["zoom"]).setAll({paddingTop:18,paddingBottom:18,paddingLeft:12,paddingRight:12,centerX:46,centerY:-10,y:0,x:ht.Q2,role:"button",ariaLabel:t.translate("Zoom Out"),layer:30});{const t=a("RoundedRectangle",["background","button","zoom"]);t.setAll({cornerRadiusBL:40,cornerRadiusBR:40,cornerRadiusTL:40,cornerRadiusTR:40}),Le(t,"fill",e,"primaryButton")}{const t=a("RoundedRectangle",["background","button","zoom"]).states.create("hover",{});Le(t,"fill",e,"primaryButtonHover")}{const t=a("RoundedRectangle",["background","button","zoom"]).states.create("down",{stateAnimationDuration:0});Le(t,"fill",e,"primaryButtonDown")}{const t=a("Graphics",["icon","button","zoom"]);t.setAll({crisp:!0,strokeOpacity:.7,draw:t=>{t.moveTo(0,0),t.lineTo(12,0)}}),Le(t,"stroke",e,"primaryButtonText")}a("Button",["resize"]).setAll({paddingTop:9,paddingBottom:9,paddingLeft:13,paddingRight:13,draggable:!0,centerX:ht.yP,centerY:ht.yP,position:"absolute",role:"slider",ariaValueMin:"0",ariaValueMax:"100",ariaLabel:t.translate("Use up and down arrows to move selection")});{const t=a("RoundedRectangle",["background","resize","button"]);t.setAll({cornerRadiusBL:40,cornerRadiusBR:40,cornerRadiusTL:40,cornerRadiusTR:40}),Le(t,"fill",e,"secondaryButton"),Le(t,"stroke",e,"secondaryButtonStroke")}{const t=a("RoundedRectangle",["background","resize","button"]).states.create("hover",{});Le(t,"fill",e,"secondaryButtonHover")}{const t=a("RoundedRectangle",["background","resize","button"]).states.create("down",{stateAnimationDuration:0});Le(t,"fill",e,"secondaryButtonDown")}{const t=a("Graphics",["resize","button","icon"]);t.setAll({interactive:!1,crisp:!0,strokeOpacity:.5,draw:t=>{t.moveTo(0,.5),t.lineTo(0,12.5),t.moveTo(4,.5),t.lineTo(4,12.5)}}),Le(t,"stroke",e,"secondaryButtonText")}a("Button",["resize","vertical"]).setAll({rotation:90,cursorOverStyle:"ns-resize"}),a("Button",["resize","horizontal"]).setAll({cursorOverStyle:"ew-resize"}),a("Button",["play"]).setAll({paddingTop:13,paddingBottom:13,paddingLeft:14,paddingRight:14,ariaLabel:t.translate("Play"),toggleKey:"active"});{const t=a("RoundedRectangle",["play","background"]);t.setAll({strokeOpacity:.5,cornerRadiusBL:100,cornerRadiusBR:100,cornerRadiusTL:100,cornerRadiusTR:100}),Le(t,"fill",e,"primaryButton")}{const t=a("Graphics",["play","icon"]);t.setAll({stateAnimationDuration:0,dx:1,draw:t=>{t.moveTo(0,-5),t.lineTo(8,0),t.lineTo(0,5),t.lineTo(0,-5)}}),Le(t,"fill",e,"primaryButtonText")}a("Graphics",["play","icon"]).states.create("default",{stateAnimationDuration:0}),a("Graphics",["play","icon"]).states.create("active",{stateAnimationDuration:0,draw:t=>{t.moveTo(-4,-5),t.lineTo(-1,-5),t.lineTo(-1,5),t.lineTo(-4,5),t.lineTo(-4,-5),t.moveTo(4,-5),t.lineTo(1,-5),t.lineTo(1,5),t.lineTo(4,5),t.lineTo(4,-5)}}),a("Button",["switch"]).setAll({paddingTop:4,paddingBottom:4,paddingLeft:4,paddingRight:4,ariaLabel:t.translate("Press ENTER to toggle"),toggleKey:"active",width:40,height:24,layout:null});{const t=a("RoundedRectangle",["switch","background"]);t.setAll({strokeOpacity:.5,cornerRadiusBL:100,cornerRadiusBR:100,cornerRadiusTL:100,cornerRadiusTR:100}),Le(t,"fill",e,"primaryButton")}{const t=a("Circle",["switch","icon"]);t.setAll({radius:8,centerY:0,centerX:0,dx:0}),Le(t,"fill",e,"primaryButtonText")}a("Graphics",["switch","icon"]).states.create("active",{dx:16}),a("Scrollbar").setAll({start:0,end:1,layer:30,animationEasing:gt(pt)}),a("Scrollbar",["vertical"]).setAll({marginRight:13,marginLeft:13,minWidth:12,height:ht.Q2}),a("Scrollbar",["horizontal"]).setAll({marginTop:13,marginBottom:13,minHeight:12,width:ht.Q2}),this.rule("Button",["scrollbar"]).setAll({exportable:!1});{const t=a("RoundedRectangle",["scrollbar","main","background"]);t.setAll({cornerRadiusTL:8,cornerRadiusBL:8,cornerRadiusTR:8,cornerRadiusBR:8,fillOpacity:.8}),Le(t,"fill",e,"fill")}{const t=a("RoundedRectangle",["scrollbar","thumb"]);t.setAll({role:"slider",ariaLive:"polite",position:"absolute",draggable:!0}),Le(t,"fill",e,"secondaryButton")}{const t=a("RoundedRectangle",["scrollbar","thumb"]).states.create("hover",{});Le(t,"fill",e,"secondaryButtonHover")}{const t=a("RoundedRectangle",["scrollbar","thumb"]).states.create("down",{stateAnimationDuration:0});Le(t,"fill",e,"secondaryButtonDown")}a("RoundedRectangle",["scrollbar","thumb","vertical"]).setAll({x:ht.yP,width:ht.Q2,centerX:ht.yP,ariaLabel:t.translate("Use up and down arrows to move selection")}),a("RoundedRectangle",["scrollbar","thumb","horizontal"]).setAll({y:ht.yP,centerY:ht.yP,height:ht.Q2,ariaLabel:t.translate("Use left and right arrows to move selection")});{const t=a("PointedRectangle",["axis","tooltip","background"]);t.setAll({cornerRadius:0}
1),Le(t,"fill",e,"alternativeBackground")}a("Label",["axis","tooltip"]).setAll({role:void 0}),a("Label",["axis","tooltip","y"]).setAll({textAlign:"right"}),a("Label",["axis","tooltip","y","opposite"]).setAll({textAlign:"left"}),a("Label",["axis","tooltip","x"]).setAll({textAlign:"center"}),a("Tooltip",["categoryaxis"]).setAll({labelText:"{category}"}),a("Star").setAll({spikes:5,innerRadius:5,radius:10}),a("Tooltip",["stock"]).setAll({paddingTop:6,paddingBottom:5,paddingLeft:7,paddingRight:7}),a("Tooltip",["indicator"]).setAll({forceHidden:!0}),a("PointedRectangle",["tooltip","stock","axis"]).setAll({pointerLength:0,pointerBaseWidth:0,cornerRadius:3}),a("Label",["tooltip","stock"]).setAll({fontSize:"0.8em"}),a("SpriteResizer").setAll({rotationStep:10,isMeasured:!1});{const t=a("Container",["resizer","grip"]);t.states.create("hover",{})}{const t=a("RoundedRectangle",["resizer","grip"]);t.setAll({strokeOpacity:.7,strokeWidth:1,fillOpacity:1,width:12,height:12}),Le(t,"fill",e,"background"),Le(t,"stroke",e,"alternativeBackground")}{const t=a("RoundedRectangle",["resizer","grip","outline"]);t.setAll({strokeOpacity:0,fillOpacity:0,width:20,height:20}),t.states.create("hover",{fillOpacity:.3}),Le(t,"fill",e,"alternativeBackground")}a("RoundedRectangle",["resizer","grip","left"]).setAll({cornerRadiusBL:0,
1cornerRadiusBR:0,cornerRadiusTL:0,cornerRadiusTR:0}),a("RoundedRectangle",["resizer","grip","right"]).setAll({cornerRadiusBL:0,cornerRadiusBR:0,cornerRadiusTL:0,cornerRadiusTR:0});{const t=a("Rectangle",["resizer","rectangle"]);t.setAll({strokeDasharray:[2,2],strokeOpacity:.5,strokeWidth:1}),Le(t,"stroke",e,"alternativeBackground")}a("Graphics",["button","plus","icon"]).setAll({x:ht.yP,y:ht.yP,draw:t=>{t.moveTo(-4,0),t.lineTo(4,0),t.moveTo(0,-4),t.lineTo(0,4)}}),a("Graphics",["button","minus","icon"]).setAll({x:ht.yP,y:ht.yP,draw:t=>{t.moveTo(-4,0),t.lineTo(4,0)}}),a("Graphics",["button","home","icon"]).setAll({x:ht.yP,y:ht.yP,svgPath:"M 8 -1 L 6 -1 L 6 7 L 2 7 L 2 1 L -2 1 L -2 7 L -6 7 L -6 -1 L -8 -1 L 0 -9 L 8 -1 Z M 8 -1"}),a("Button",["zoomtools"]).setAll({marginTop:1,marginBottom:2}),a("ZoomTools").setAll({x:ht.Q2,centerX:ht.Q2,y:ht.Q2,centerY:ht.Q2,paddingRight:10,paddingBottom:10}),a("ProgressPie").setAll({radius:ht.Q2,width:50,height:50,centerX:(0,ht.KN)(-50),centerY:(0,ht.KN)(-50),innerRadius:(0,ht.KN)(85),numberFormat:"#."});{const t=a("Label",["progresspie"]);t.setAll({centerX:ht.yP,centerY:ht.yP,fontSize:"0.75em"}),Le(t,"fill",e,"primaryButton")}{const t=a("Circle",["progresspie"]);t.setAll({fillOpacity:.5}),Le(t,"fill",e,"background")}{const t=a("Slice",["progresspie"]);t.setAll({startAngle:-90}),Le(t,"fill",e,"primaryButton")}{const t=a("Slice",["progresspie","background"]);t.setAll({fillOpacity:.2,arc:360}),Le(t,"fill",e,"primaryButton")}a("EditableLabel",["numericstepper"]).setAll({y:ht.yP,centerY:ht.yP,multiLine:!1,marginRight:2});{const t=a("Container",["numericstepper","buttons"]);t.setAll({layout:this._root.verticalLayout,centerY:ht.yP,y:ht.yP,marginRight:10,opacity:0}),t.states.create("active",{opacity:1}),t.states.create("default",{opacity:0})}{const t=a("Triangle",["numericstepper"]);t.setAll({width:17,height:11,marginTop:3,marginBottom:3,strokeWidth:5,strokeOpacity:0,cursorOverStyle:"pointer"}),Le(t,"fill",e,"secondaryButton")}{const t=a("Triangle",["downbutton"]);t.setAll({rotation:180})}}}class Be{constructor(t=1,e=0,i=0,s=1,a=0,n=0){this.a=t,this.b=e,this.c=i,this.d=s,this.tx=a,this.ty=n}setTransform(t,e,i,s,a,n=1){this.a=Math.cos(a)*n,this.b=Math.sin(a)*n,this.c=-Math.sin(a)*n,this.d=Math.cos(a)*n,this.tx=t-(i*this.a+s*this.c),this.ty=e-(i*this.b+s*this.d)}apply(t){return{x:this.a*t.x+this.c*t.y+this.tx,y:this.b*t.x+this.d*t.y+this.ty}}applyInverse(t){const e=1/(this.a*this.d+this.c*-this.b);return{x:this.d*e*t.x+-this.c*e*t.y+(this.ty*this.c-this.tx*this.d)*e,y:this.a*e*t.y+-this.b*e*t.x+(-this.ty*this.a+this.tx*this.b)*e}}append(t){const e=this.a,i=this.b,s=this.c,a=this.d;this.a=t.a*e+t.b*s,this.b=t.a*i+t.b*a,this.c=t.c*e+t.d*s,this.d=t.c*i+t.d*a,this.tx=t.tx*e+t.ty*s+this.tx,this.ty=t.tx*i+t.ty*a+this.ty}prepend(t){const e=this.tx;if(1!==t.a||0!==t.b||0!==t.c||1!==t.d){const e=this.a,i=this.c;this.a=e*t.a+this.b*t.c,this.b=e*t.b+this.b*t.d,this.c=i*t.a+this.d*t.c,this.d=i*t.b+this.d*t.d}this.tx=e*t.a+this.ty*t.c+t.tx,this.ty=e*t.b+this.ty*t.d+t.ty}copyFrom(t){this.a=t.a,this.b=t.b,this.c=t.c,this.d=t.d,this.tx=t.tx,this.ty=t.ty}}var Oe=function(){function t(t,e){var i=[],s=!0,a=!1,n=void 0;try{for(var o,r=t[Symbol.iterator]();!(s=(o=r.next()).done);s=!0)if(i.push(o.value),e&&i.length===e)break}catch(l){a=!0,n=l}finally{try{!s&&r["return"]&&r["return"]()}finally{if(a)throw n}}return i}return function(e,i){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),Ne=2*Math.PI,ze=function(t,e,i,s,a,n,o){var r=t.x,l=t.y;r*=e,l*=i;var h=s*r-a*l,c=a*r+s*l;return{x:h+n,y:c+o}},Ye=function(t,e){var i=1.5707963267948966===e?.551915024494:-1.5707963267948966===e?-.551915024494:4/3*Math.tan(e/4),s=Math.cos(t),a=Math.sin(t),n=Math.cos(t+e),o=Math.sin(t+e);return[{x:s-a*i,y:a+s*i},{x:n+o*i,y:o-n*i},{x:n,y:o}]},Ue=function(t,e,i,s){var a=t*s-e*i<0?-1:1,n=t*i+e*s;return n>1&&(n=1),n<-1&&(n=-1),a*Math.acos(n)},He=function(t,e,i,s,a,n,o,r,l,h,c,d){var u=Math.pow(a,2),p=Math.pow(n,2),g=Math.pow(c,2),m=Math.pow(d,2),_=u*p-u*m-p*g;_<0&&(_=0),_/=u*m+p*g,_=Math.sqrt(_)*(o===r?-1:1);var v=_*a/n*d,f=_*-n/a*c,y=h*v-l*f+(t+i)/2,x=l*v+h*f+(e+s)/2,b=(c-v)/a,w=(d-f)/n,C=(-c-v)/a,k=(-d-f)/n,D=Ue(1,0,b,w
1),T=Ue(b,w,C,k);return 0===r&&T>0&&(T-=Ne),1===r&&T<0&&(T+=Ne),[y,x,D,T]},Ve=function(t){var e=t.px,i=t.py,s=t.cx,a=t.cy,n=t.rx,o=t.ry,r=t.xAxisRotation,l=void 0===r?0:r,h=t.largeArcFlag,c=void 0===h?0:h,d=t.sweepFlag,u=void 0===d?0:d,p=[];if(0===n||0===o)return[];var g=Math.sin(l*Ne/360),m=Math.cos(l*Ne/360),_=m*(e-s)/2+g*(i-a)/2,v=-g*(e-s)/2+m*(i-a)/2;if(0===_&&0===v)return[];n=Math.abs(n),o=Math.abs(o);var f=Math.pow(_,2)/Math.pow(n,2)+Math.pow(v,2)/Math.pow(o,2);f>1&&(n*=Math.sqrt(f),o*=Math.sqrt(f));var y=He(e,i,s,a,n,o,c,u,g,m,_,v),x=Oe(y,4),b=x[0],w=x[1],C=x[2],k=x[3],D=Math.abs(k)/(Ne/4);Math.abs(1-D)<1e-7&&(D=1);var T=Math.max(Math.ceil(D),1);k/=T;for(var P=0;P<T;P++)p.push(Ye(C,k)),C+=k;return p.map(function(t){var e=ze(t[0],n,o,m,g,b,w),i=e.x,s=e.y,a=ze(t[1],n,o,m,g,b,w),r=a.x,l=a.y,h=ze(t[2],n,o,m,g,b,w),c=h.x,d=h.y;return{x1:i,y1:s,x2:r,y2:l,x:c,y:d}})},Xe=Ve;function Ge(t,e,i){if(e!==i)throw new Error("Required "+i+" arguments for "+t+" but got "+e)}function qe(t,e,i){if(e<i)throw new Error("Required at least "+i+" arguments for "+t+" but got "+e)}function We(t,e,i){if(qe(t,e,i),e%i!==0)throw new Error("Arguments for "+t+" must be in pairs of "+i)}function je(t){for(let e=0;e<t.length;e+=7){let i=e+3,s=t[i];if(s.length>1){const e=/^([01])([01])(.*)$/.exec(s);null!==e&&(t.splice(i,0,e[1]),++i,t.splice(i,0,e[2]),++i,e[3].length>0?t[i]=e[3]:t.splice(i,1))}if(++i,s=t[i],s.length>1){const e=/^([01])(.+)$/.exec(s);null!==e&&(t.splice(i,0,e[1]),++i,t[i]=e[2])}}}function Qe(t){if(0===t||1===t)return t;throw new Error("Flag must be 0 or 1")}function Je(t){const e=[0,0,0];for(let i=0;i<24;i++)e[i%3]<<=1,e[i%3]|=1&t,t>>=1;return(0|e[0])+(e[1]<<8)+(e[2]<<16)}function Ke(t,e){for(;;){if(t.interactive&&!e(t))break;if(!t._parent)break;t=t._parent}}function $e(t,e,i){return Ft.q2(t,Ft.wN(e),t=>{const e=Ft.wt(t);let s=t.touches;s?(0==s.length&&(s=t.changedTouches),i(et.C(s),e)):i([t],e)})}function Ze(t){const e=document.createElement("canvas");e.width=1,e.height=1;const i=e.getContext("2d",{willReadFrequently:!0});i.drawImage(t,0,0,1,1);try{return i.getImageData(0,0,1,1),!1}catch(s){return console.warn('Image "'+t.src+'" is loaded from different host and is not covered by CORS policy. For more information about the implications read here: https://www.amcharts.com/docs/v5/concepts/cors'),!0}}function ti(t){t.width=0,t.height=0,t.style.width="0px",t.style.height="0px"}function ei(t){return Math.floor(t)+.5}class ii{constructor(){this._x=0,this._y=0}get x(){return this._x}get y(){return this._y}set x(t){this._x=t}set y(t){this._y=t}}class si extends tt.O_{constructor(t){super(),this.mask=null,this.visible=!0,this.exportable=!0,this.interactive=!1,this.inactive=null,this.wheelable=!1,this.cancelTouch=!1,this.isMeasured=!1,this.buttonMode=!1,this.alpha=1,this.compoundAlpha=1,this.angle=0,this.scale=1,this.x=0,this.y=0,this.crisp=!1,this.pivot=new ii,this._localMatrix=new Be,this._matrix=new Be,this._uMatrix=new Be,this._renderer=t}subStatus(t){return{inactive:null==this.inactive?t.inactive:this.inactive,layer:this._layer||t.layer}}_dispose(){this._renderer._removeObject(this),this.getLayer().dirty=!0}getCanvas(){return this.getLayer().view}getLayer(){let t=this;for(;;){if(t._layer)return t._layer;if(!t._parent)return this._renderer.defaultLayer;t=t._parent}}setLayer(t,e){if(null==t)this._layer=void 0;else{const i=!0;this._layer=this._renderer.getLayer(t,i),this._layer.visible=i,this._layer.margin=e,e&&Ft.Dt(this._layer.view,!1),this._renderer._ghostLayer.setMargin(this._renderer.layers),this._parent&&this._parent.registerChildLayer(this._layer),this._layer.dirty=!0,this._renderer.resizeLayer(this._layer),this._renderer.resizeGhost()}}markDirtyLayer(){this.getLayer().dirty=!0}clear(){this.invalidateBounds()}invalidateBounds(){this._localBounds=void 0}_addBounds(t){}_getColorId(){return void 0===this._colorId&&(this._colorId=this._renderer.paintId(this)),this._colorId}_isInteractive(t){return!t.inactive&&(this.interactive||this._renderer._forceInteractive>0)}_isInteractiveMask(t){return this._isInteractive(t)}contains(t){for(;;){if(t===this)return!0;
1if(!t._parent)return!1;t=t._parent}}toGlobal(t){return this._matrix.apply(t)}toLocal(t){return this._matrix.applyInverse(t)}getLocalMatrix(){return this._uMatrix.setTransform(0,0,this.pivot.x,this.pivot.y,this.angle*Math.PI/180,this.scale),this._uMatrix}getLocalBounds(){if(!this._localBounds){const t=1e7;this._localBounds={left:t,top:t,right:-t,bottom:-t},this._addBounds(this._localBounds)}return this._localBounds}getAdjustedBounds(t){this._setMatrix();const e=this.getLocalMatrix(),i=e.apply({x:t.left,y:t.top}),s=e.apply({x:t.right,y:t.top}),a=e.apply({x:t.right,y:t.bottom}),n=e.apply({x:t.left,y:t.bottom});return{left:Math.min(i.x,s.x,a.x,n.x),top:Math.min(i.y,s.y,a.y,n.y),right:Math.max(i.x,s.x,a.x,n.x),bottom:Math.max(i.y,s.y,a.y,n.y)}}on(t,e,i){return this.interactive?this._renderer._addEvent(this,t,e,i):new tt.W_(()=>{})}_setMatrix(){this._localMatrix.setTransform(this.x,this.y,this.pivot.x,this.pivot.y,this.angle*Math.PI/180,this.scale),this._matrix.copyFrom(this._localMatrix),this._parent&&this._matrix.prepend(this._parent._matrix)}_transform(t,e){const i=this._matrix;let s=i.tx*e,a=i.ty*e;this.crisp&&(s=ei(s),a=ei(a)),t.setTransform(i.a*e,i.b*e,i.c*e,i.d*e,s,a)}_transformMargin(t,e,i){const s=this._matrix;t.setTransform(s.a*e,s.b*e,s.c*e,s.d*e,(s.tx+i.left)*e,(s.ty+i.top)*e)}_transformLayer(t,e,i){i.margin?this._transformMargin(t,i.scale||e,i.margin):this._transform(t,i.scale||e)}render(t,e=0){if(this.visible&&(!1!==this.exportable||!this._renderer._omitTainted)){this._setMatrix();const i=this.subStatus(t),s=this._renderer.resolution,a=this._renderer.layers,n=this._renderer._ghostLayer,o=n.context,r=this.mask;r&&r._setMatrix(),et.__(a,t=>{if(t){const e=t.context;e.save(),r&&(r._transformLayer(e,s,t),r._runPath(e),e.clip()),e.globalAlpha=this.compoundAlpha*this.alpha,this._transformLayer(e,s,t),this.filter&&(e.filter=this.filter)}}),o.save(),r&&this._isInteractiveMask(i)&&(r._transformMargin(o,s,n.margin),r._runPath(o),o.clip()),this._transformMargin(o,s,n.margin),i.layer.order>0&&!e&&et.Cy(this._renderer._deferredGhostLayers,i.layer.order),this._render(i,e),o.restore(),et.__(a,t=>{t&&t.context.restore()})}}_render(t,e=0){!1===this.exportable&&(t.layer.tainted=!0)}_ghostOnly(t=0){return t>0}_drawGhost(t,e=0){const i=this._isInteractive(t),s=t.layer.order||0;return!(!i||(0!=s||this._ghostOnly(e))&&s!=e)}hovering(){return this._renderer._hovering.has(this)}dragging(){return this._renderer._dragging.some(t=>t.value===this)}shouldCancelTouch(){const t=this._renderer;return!(t.tapToActivate&&!t._touchActive)&&(!!this.cancelTouch||!!this._parent&&this._parent.shouldCancelTouch())}}class ai extends si{constructor(){super(...arguments),this.interactiveChildren=!0,this._children=[]}_isInteractiveMask(t){return this.interactiveChildren||super._isInteractiveMask(t)}addChild(t){t._parent=this,this._children.push(t),t._layer&&this.registerChildLayer(t._layer)}addChildAt(t,e){t._parent=this,this._children.splice(e,0,t),t._layer&&this.registerChildLayer(t._layer)}removeChild(t){t._parent=void 0,et.dm(this._children,t)}_render(t,e){super._render(t);const i=this._renderer;this.interactive&&this.interactiveChildren&&++i._forceInteractive,et.__(this._children,i=>{i.compoundAlpha=this.compoundAlpha*this.alpha,i.render(t,e)}),this.interactive&&this.interactiveChildren&&--i._forceInteractive}registerChildLayer(t){this._childLayers||(this._childLayers=[]),et.JJ(this._childLayers,t),this._parent&&this._parent.registerChildLayer(t)}markDirtyLayer(t=!1){super.markDirtyLayer(),t&&this._childLayers&&et.__(this._childLayers,t=>t.dirty=!0)}_dispose(){super._dispose(),this._childLayers&&et.__(this._childLayers,t=>{t.dirty=!0})}}function ni(t,e){t.left=Math.min(t.left,e.x),t.top=Math.min(t.top,e.y),t.right=Math.max(t.right,e.x),t.bottom=Math.max(t.bottom,e.y)}class oi{colorize(t,e){}colorizeGhost(t,e){this.colorize(t,e)}path(t){}pathGhost(t){this.path(t)}addBounds(t){}}class ri extends oi{colorize(t,e){t.beginPath()}}class li extends oi{constructor(t){super(),this.color=t}colorize(t,e){t.fillStyle=void 0!==e?e:this.color}}class hi extends oi{constructor(t){super(),this.clearShadow=t}colorize(t,e){t.fill(),this.clearShadow&&(t.shadowColor="",t.shadowBlur=0,t.shadowOffsetX=0,t.shadowOffsetY=0)}}class ci extends oi{colorize(t,e){t.stroke()}}class di extends oi{constructor(t,e,i,s){super(),this.width=t,this.color=e,this.lineJoin=i,this.lineCap=s}colorize(t,e){t.strokeStyle=void 0!==e?e:this.color,t.lineWidth=this.width,this.lineJoin&&(t.lineJoin=this.lineJoin),this.lineCap&&(t.lineCap=this.lineCap)}}class ui extends oi{constructor(t){super(),this.dash=t}colorize(t,e){t.setLineDash(this.dash)}}class pi extends oi{constructor(t){super(),this.dashOffset=t}colorize(t,e){t.lineDashOffset=this.dashOffset}}class gi extends oi{constructor(t,e,i,s){super(),this.x=t,this.y=e,this.width=i,this.height=s}path(t){t.rect(this.x,this.y,this.width,this.height)}addBounds(t){const e=this.x,i=this.y,s=e+this.width,a=i+this.height;ni(t,{x:e,y:i}),ni(t,{x:s,y:i}),ni(t,{x:e,y:a}),ni(t,{x:s,y:a})}}class mi extends oi{constructor(t,e,i){super(),this.x=t,this.y=e,this.radius=i}path(t){t.moveTo(this.x+this.radius,this.y),t.arc(this.x,this.y,this.radius,0,2*Math.PI)}addBounds(t){ni(t,{x:this.x-this.radius,y:this.y-this.radius}),ni(t,{x:this.x+this.radius,y:this.y+this.radius})}}class _i extends oi{constructor(t,e,i,s){super(),this.x=t,this.y=e,this.radiusX=i,this.radiusY=s}path(t){t.ellipse(0,0,this.radiusX,this.radiusY,0,0,2*Math.PI)}addBounds(t){ni(t,{x:this.x-this.radiusX,y:this.y-this.radiusY}),ni(t,{x:this.x+this.radiusX,y:this.y+this.radiusY})}}class vi extends oi{constructor(t,e,i,s,a,n){super(),this.cx=t,this.cy=e,this.radius=i,this.startAngle=s,this.endAngle=a,this.anticlockwise=n}path(t){this.radius>0&&t.arc(this.cx,this.cy,this.radius,this.startAngle,this.endAngle,this.anticlockwise)}addBounds(t){let e=Gt(this.cx,this.cy,this.startAngle*Nt,this.endAngle*Nt,this.radius);ni(t,{x:e.left,y:e.top}),ni(t,{x:e.right,y:e.bottom})}}class fi extends oi{constructor(t,e,i,s,a){super(),this.x1=t,this.y1=e,this.x2=i,this.y2=s,this.radius=a}path(t){this.radius>0&&t.arcTo(this.x1,this.y1,this.x2,this.y2,this.radius)}addBounds(t){}}
1class yi extends oi{constructor(t,e){super(),this.x=t,this.y=e}path(t){t.lineTo(this.x,this.y)}addBounds(t){ni(t,{x:this.x,y:this.y})}}class xi extends oi{constructor(t,e){super(),this.x=t,this.y=e}path(t){t.moveTo(this.x,this.y)}addBounds(t){ni(t,{x:this.x,y:this.y})}}class bi extends oi{path(t){t.closePath()}}class wi extends oi{constructor(t,e,i,s,a,n){super(),this.cpX=t,this.cpY=e,this.cpX2=i,this.cpY2=s,this.toX=a,this.toY=n}path(t){t.bezierCurveTo(this.cpX,this.cpY,this.cpX2,this.cpY2,this.toX,this.toY)}addBounds(t){ni(t,{x:this.cpX,y:this.cpY}),ni(t,{x:this.cpX2,y:this.cpY2}),ni(t,{x:this.toX,y:this.toY})}}class Ci extends oi{constructor(t,e,i,s){super(),this.cpX=t,this.cpY=e,this.toX=i,this.toY=s}path(t){t.quadraticCurveTo(this.cpX,this.cpY,this.toX,this.toY)}addBounds(t){ni(t,{x:this.cpX,y:this.cpY}),ni(t,{x:this.toX,y:this.toY})}}class ki extends oi{constructor(t,e,i,s,a){super(),this.color=t,this.blur=e,this.offsetX=i,this.offsetY=s,this.opacity=a}colorize(t,e){this.opacity&&(t.fillStyle=this.color),t.shadowColor=this.color,t.shadowBlur=this.blur,t.shadowOffsetX=this.offsetX,t.shadowOffsetY=this.offsetY}colorizeGhost(t,e){}}class Di extends oi{constructor(t,e,i,s,a){super(),this.image=t,this.width=e,this.height=i,this.x=s,this.y=a}path(t){t.drawImage(this.image,this.x,this.y,this.width,this.height)}addBounds(t){ni(t,{x:this.x,y:this.y}),ni(t,{x:this.width,y:this.height})}}class Ti extends si{constructor(){super(...arguments),this._operations=[],this.blendMode=Zt.NORMAL,this._hasShadows=!1}clear(){super.clear(),this._operations.length=0}_pushOp(t){this._operations.push(t)}beginFill(t,e=1){this._fillAlpha=e,t?t instanceof le.Q1?this._pushOp(new li(t.toCSS(e))):(this.isMeasured=!0,this._pushOp(new li(t))):this._pushOp(new li("rgba(0, 0, 0, "+e+")"))}endFill(){this._pushOp(new hi(this._hasShadows))}endStroke(){this._pushOp(new ci)}beginPath(){this._pushOp(new ri)}lineStyle(t=0,e,i=1,s,a){this._strokeAlpha=i,e?e instanceof le.Q1?this._pushOp(new di(t,e.toCSS(i),s,a)):this._pushOp(new di(t,e,s,a)):this._pushOp(new di(t,"rgba(0, 0, 0, "+i+")",s,a))}setLineDash(t){this._pushOp(new ui(t||[]))}setLineDashOffset(t=0){this._pushOp(new pi(t))}drawRect(t,e,i,s){this._pushOp(new gi(t,e,i,s))}drawCircle(t,e,i){this._pushOp(new mi(t,e,i))}drawEllipse(t,e,i,s){this._pushOp(new _i(t,e,i,s))}arc(t,e,i,s,a,n=!1){this._pushOp(new vi(t,e,i,s,a,n))}arcTo(t,e,i,s,a){this._pushOp(new fi(t,e,i,s,a))}lineTo(t,e){this._pushOp(new yi(t,e))}moveTo(t,e){this._pushOp(new xi(t,e))}bezierCurveTo(t,e,i,s,a,n){this._pushOp(new wi(t,e,i,s,a,n))}quadraticCurveTo(t,e,i,s){this._pushOp(new Ci(t,e,i,s))}closePath(){this._pushOp(new bi)}shadow(t,e=0,i=0,s=0,a){this._hasShadows=!0,this._pushOp(new ki(a?t.toCSS(a):t.toCSS(this._fillAlpha||this._strokeAlpha),e,i,s))}image(t,e,i,s,a){this._pushOp(new Di(t,e,i,s,a))}svgPath(t){let e=0,i=0,s=null,a=null,n=null,o=null;const r=/([MmZzLlHhVvCcSsQqTtAa])([^MmZzLlHhVvCcSsQqTtAa]*)/g,l=/[\u0009\u0020\u000A\u000C\u000D]*([\+\-]?[0-9]*\.?[0-9]+(?:[eE][\+\-]?[0-9]+)?)[\u0009\u0020\u000A\u000C\u000D]*,?/g,h=this._operations.length;try{let h;while(null!==(h=r.exec(t))){const t=h[1],r=h[2],c=[];while(null!==(h=l.exec(r)))c.push(h[1]);switch("S"!==t&&"s"!==t&&"C"!==t&&"c"!==t&&(s=null,a=null),"Q"!==t&&"q"!==t&&"T"!==t&&"t"!==t&&(n=null,o=null),t){case"M":We(t,c.length,2),e=+c[0],i=+c[1],this.moveTo(e,i);for(let t=2;t<c.length;t+=2)e=+c[t],i=+c[t+1],this.lineTo(e,i);break;case"m":We(t,c.length,2),e+=+c[0],i+=+c[1],this.moveTo(e,i);for(let t=2;t<c.length;t+=2)e+=+c[t],i+=+c[t+1],this.lineTo(e,i);break;case"L":We(t,c.length,2);for(let t=0;t<c.length;t+=2)e=+c[t],i=+c[t+1],this.lineTo(e,i);break;case"l":We(t,c.length,2);for(let t=0;t<c.length;t+=2)e+=+c[t],i+=+c[t+1],this.lineTo(e,i);break;case"H":qe(t,c.length,1);for(let t=0;t<c.length;++t)e=+c[t],this.lineTo(e,i);break;case"h":qe(t,c.length,1);for(let t=0;t<c.length;++t)e+=+c[t],this.lineTo(e,i);break;case"V":qe(t,c.length,1);for(let t=0;t<c.length;++t)i=+c[t],this.lineTo(e,i);break;case"v":qe(t,c.length,1);for(let t=0;t<c.length;++t)i+=+c[t],this.lineTo(e,i);break;case"C":We(t,c.length,6);for(let t=0;t<c.length;t+=6){const n=+c[t],o=+c[t+1];s=+c[t+2],a=+c[t+3],e=+c[t+4],i=+c[t+5],this.bezierCurveTo(n,o,s,a,e,i)}break;case"c":We(t,c.length,6);for(let t=0;t<c.length;t+=6){const n=+c[t]+e,o=+c[t+1]+i;s=+c[t+2]+e,a=+c[t+3]+i,e+=+c[t+4],i+=+c[t+5],this.bezierCurveTo(n,o,s,a,e,i)}break;case"S":We(t,c.length,4),null!==s&&null!==a||(s=e,a=i);for(let t=0;t<c.length;t+=4){const n=2*e-s,o=2*i-a;s=+c[t],a=+c[t+1],e=+c[t+2],i=+c[t+3],this.bezierCurveTo(n,o,s,a,e,i)}break;case"s":We(t,c.length,4),null!==s&&null!==a||(s=e,a=i);for(let t=0;t<c.length;t+=4){const n=2*e-s,o=2*i-a;s=+c[t]+e,a=+c[t+1]+i,e+=+c[t+2],i+=+c[t+3],this.bezierCurveTo(n,o,s,a,e,i)}break;case"Q":We(t,c.length,4);for(let t=0;t<c.length;t+=4)n=+c[t],o=+c[t+1],e=+c[t+2],i=+c[t+3],this.quadraticCurveTo(n,o,e,i);break;case"q":We(t,c.length,4);for(let t=0;t<c.length;t+=4)n=+c[t]+e,o=+c[t+1]+i,e+=+c[t+2],i+=+c[t+3],this.quadraticCurveTo(n,o,e,i);break;case"T":We(t,c.length,2),null!==n&&null!==o||(n=e,o=i);for(let t=0;t<c.length;t+=2)n=2*e-n,o=2*i-o,e=+c[t],i=+c[t+1],this.quadraticCurveTo(n,o,e,i);break;case"t":We(t,c.length,2),null!==n&&null!==o||(n=e,o=i);for(let t=0;t<c.length;t+=2)n=2*e-n,o=2*i-o,e+=+c[t],i+=+c[t+1],this.quadraticCurveTo(n,o,e,i);break;case"A":case"a":const r="a"===t;je(c),We(t,c.length,7);for(let t=0;t<c.length;t+=7){let s=+c[t+5],a=+c[t+6];r&&(s+=e,a+=i);const n=Xe({px:e,py:i,rx:+c[t],ry:+c[t+1],xAxisRotation:+c[t+2],largeArcFlag:Qe(+c[t+3]),sweepFlag:Qe(+c[t+4]),cx:s,cy:a});et.__(n,t=>{this.bezierCurveTo(t.x1,t.y1,t.x2,t.y2,t.x,t.y),e=t.x,i=t.y})}break;case"Z":case"z":Ge(t,c.length,0),this.closePath();break}}}catch(c){this._operations.length=h,console.warn("Error when parsing svgPath:\n "+c.message+"\n"+t)}}_runPath(t){t.beginPath(),et.__(this._operations,e=>{e.path(t)})}_render(t,e=0){super._render(t);const i=t.layer.dirty,s=this._isInteractive(t),a=this._ghostOnly(e),n=this._drawGhost(t,e);if(i||s||a){const e=t.layer.context,s=this._renderer._ghostLayer.context;let o;i&&!a&&(e.globalCompositeOperation=this.blendMode,e.beginPath()),n&&(s.beginPath(),o=this._getColorId()),et.__(this._operations,t=>{i&&!a&&(t.path(e),t.colorize(e,void 0)),n&&(t.pathGhost(s),t.colorizeGhost(s,o))})}}renderDetached(t){if(this.visible){this._setMatrix(),t.save();const e=this.mask;e&&(e._setMatrix(),e._transform(t,1),e._runPath(t),t.clip()),t.globalAlpha=this.compoundAlpha*this.alpha,this._transform(t,1),this.filter&&(t.filter=this.filter),t.globalCompositeOperation=this.blendMode,t.beginPath(),et.__(this._operations,e=>{e.path(t),e.colorize(t,void 0)}
1),t.restore()}}_addBounds(t){this.visible&&this.isMeasured&&et.__(this._operations,e=>{e.addBounds(t)})}}class Pi extends si{constructor(t,e,i){super(t),this.resolution=1,this.textVisible=!0,this._originalScale=1,this.text=e,this.style=i}invalidateBounds(){super.invalidateBounds(),this._textInfo=void 0}invalidateVisibility(){this.textVisible=!0,this.scale=this._originalScale||1}_shared(t){this.style.textAlign&&(t.textAlign=this.style.textAlign),this.style.direction&&(t.direction=this.style.direction),this.style.textBaseline&&(t.textBaseline=this.style.textBaseline)}_prerender(t,e=!1,i=!1){super._render(t);const s=t.layer.context,a=this._renderer._ghostLayer.context,n=this.style;let o=this._getFontStyle(void 0,i);s.font=o,this._isInteractive(t)&&!e&&(a.font=o),n.fill&&(n.fill instanceof le.Q1?s.fillStyle=n.fill.toCSS(void 0!=n.fillOpacity?n.fillOpacity:1):s.fillStyle=n.fill),n.shadowColor&&(t.layer.context.shadowColor=n.shadowColor.toCSS(n.shadowOpacity||1)),n.shadowBlur&&(t.layer.context.shadowBlur=n.shadowBlur),n.shadowOffsetX&&(t.layer.context.shadowOffsetX=n.shadowOffsetX),n.shadowOffsetY&&(t.layer.context.shadowOffsetY=n.shadowOffsetY),this._shared(s),this._isInteractive(t)&&!e&&(a.fillStyle=this._getColorId(),this._shared(a))}_getFontStyle(t,e=!1){const i=this.style;let s=[];return t&&t.fontVariant?s.push(t.fontVariant):i.fontVariant&&s.push(i.fontVariant),e||(t&&t.fontWeight?s.push(t.fontWeight):i.fontWeight&&s.push(i.fontWeight)),t&&t.fontStyle?s.push(t.fontStyle):i.fontStyle&&s.push(i.fontStyle),t&&t.fontSize?(it.Et(t.fontSize)&&(t.fontSize=t.fontSize+"px"),s.push(t.fontSize)):i.fontSize&&(it.Et(i.fontSize)&&(i.fontSize=i.fontSize+"px"),s.push(i.fontSize)),t&&t.fontFamily?s.push(t.fontFamily):i.fontFamily?s.push(i.fontFamily):s.length&&s.push("Arial"),s.join(" ")}_render(t,e=0){if(this._textInfo||this._measure(t),this.textVisible){const i=this._isInteractive(t),s=t.layer.context,a=t.layer.dirty,n=this._renderer._ghostLayer.context,o=this._ghostOnly(e),r=this._drawGhost(t,e);s.save(),n.save(),this._prerender(t),et.__(this._textInfo,(e,l)=>{et.__(e.textChunks,(l,h)=>{if(l.style&&(s.save(),n.save(),o||(s.font=l.style),this._isInteractive(t)&&(n.font=l.style)),l.fill&&(s.save(),o||(s.fillStyle=l.fill.toCSS())),a&&!o&&s.fillText(l.text,l.offsetX,e.offsetY+l.offsetY),"underline"==l.textDecoration||"line-through"==l.textDecoration){let t=1,i=1,a=l.height;const n=this.style.oversizedBehavior||"";if(["truncate","wrap","wrap-no-break"].indexOf(n)>-1){const t=this._measureText(l.text,s);l.width=t.actualBoundingBoxLeft+t.actualBoundingBoxRight}let r,h=l.offsetX;switch(this.style.textAlign){case"right":case"end":h-=l.width;break;case"center":h-=l.width/2;break}if(l.style){const e=he.getTextStyle(l.style);switch(e.fontWeight){case"bolder":case"bold":case"700":case"800":case"900":t=2;break}}a&&(i=a/20),r="line-through"==l.textDecoration?t+e.offsetY+l.offsetY-l.height/2:t+1.5*i+e.offsetY+l.offsetY,o||(s.save(),s.beginPath(),l.fill?s.strokeStyle=l.fill.toCSS():this.style.fill&&this.style.fill instanceof le.Q1&&(s.strokeStyle=this.style.fill.toCSS()),s.lineWidth=t*i,s.moveTo(h,r),s.lineTo(h+l.width,r),s.stroke(),s.restore())}i&&this.interactive&&r&&n.fillText(l.text,l.offsetX,e.offsetY+l.offsetY),l.fill&&s.restore(),l.style&&(s.restore(),n.restore())})}),s.restore(),n.restore()}}_addBounds(t){if(this.visible&&this.isMeasured){const e=this._measure({inactive:this.inactive,layer:this.getLayer()});ni(t,{x:e.left,y:e.top}),ni(t,{x:e.right,y:e.bottom})}}_ignoreFontWeight(){return/apple/i.test(navigator.vendor)}_measure(t){const e=t.layer.context,i=this._renderer._ghostLayer.context,s="rtl"==this.style.direction;this._textInfo=[];const a=this.style.oversizedBehavior,n=this.style.maxWidth,o=it.Et(n)&&"truncate"==a,r=it.Et(n)&&("wrap"==a||"wrap-no-break"==a);e.save(),i.save(),this._prerender(t,!0,this._ignoreFontWeight());const l="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",h=this.text.toString().replace(/\r/g,"").split(/\n/);let c,d=!0,u=0,p=0,g=0;et.__(h,(t,s)=>{let a;a=""==t?[{type:"value",text:""}]:he.chunk(t,!1,this.style.ignoreFormatting);while(a.length>0){let t={offsetY:g,ascent:0,width:0,height:0,left:0,right:0,textChunks:[]};const s=this._measureText(l,e),h=s.actualBoundingBoxAscent+s.actualBoundingBoxDescent;let m;t.height=h,t.ascent=s.actualBoundingBoxAscent;let _,v,f,y=this.style.textDecoration,x=!1,b=!0,w=[];et.FY(a,(s,h)=>
1{if("format"==s.type)if("[/]"==s.text)d||(e.restore(),i.restore(),d=!0),_=void 0,c=void 0,v=void 0,y=this.style.textDecoration,f=void 0,m=s.text;else{d||(e.restore(),i.restore());let a=he.getTextStyle(s.text);const n=this._getFontStyle(a);e.save(),i.save(),e.font=n,c=n,m=s.text,a.textDecoration&&(y=a.textDecoration),a.fill&&(_=a.fill),a.width&&(v=it.Ro(a.width)),a.verticalAlign&&(f=a.verticalAlign),d=!1;const o=this._measureText(l,e),r=o.actualBoundingBoxAscent+o.actualBoundingBoxDescent;r>t.height&&(t.height=r),o.actualBoundingBoxAscent>t.ascent&&(t.ascent=o.actualBoundingBoxAscent)}else if("value"==s.type&&!x){const i=this._measureText(s.text,e);let l=i.actualBoundingBoxLeft+i.actualBoundingBoxRight;if(o){this.truncated=void 0;let i=b||this.style.breakWords||!1;const a=this.style.ellipsis||"",o=this._measureText(a,e),r=o.actualBoundingBoxLeft+o.actualBoundingBoxRight;if(t.width+l>n){const o=n-t.width-r;s.text=this._truncateText(e,s.text,o,i),s.text+=a,x=!0,this.truncated=!0}}else if(r&&t.width+l>n){const i=n-t.width,o=this._truncateText(e,s.text,i,!1,b&&"wrap-no-break"!=this.style.oversizedBehavior);if(""==o)return this.textVisible=!0,!1;w=a.slice(h+1),Ft.Bq(o)!=Ft.Bq(s.text)&&(w.unshift({type:"value",text:s.text.substr(o.length)}),m&&w.unshift({type:"format",text:m})),s.text=Ft.Bq(o),a=[],x=!0}let d=1,u=1;if(c&&v&&v>l){const t=l/v;switch(this.style.textAlign){case"right":case"end":d=t;break;case"center":d=t,u=t;break;default:u=t}l=v}const p=i.actualBoundingBoxAscent+i.actualBoundingBoxDescent;p>t.height&&(t.height=p),i.actualBoundingBoxAscent>t.ascent&&(t.ascent=i.actualBoundingBoxAscent),t.width+=l,t.left+=i.actualBoundingBoxLeft/d,t.right+=i.actualBoundingBoxRight/u,t.textChunks.push({style:c,fill:_,text:s.text,width:l,height:p,left:i.actualBoundingBoxLeft,right:i.actualBoundingBoxRight,ascent:i.actualBoundingBoxAscent,offsetX:0,offsetY:0,textDecoration:y,verticalAlign:f}),b=!1}return!0}),this.style.lineHeight instanceof ht.QE?(t.height*=this.style.lineHeight.value,t.ascent*=this.style.lineHeight.value):(t.height*=this.style.lineHeight||1.2,t.ascent*=this.style.lineHeight||1.2),u<t.left&&(u=t.left),p<t.right&&(p=t.right),this._textInfo.push(t),g+=t.height,a=w||[]}}),d||(e.restore(),i.restore()),et.__(this._textInfo,(t,e)=>{let i=0;et.__(t.textChunks,e=>{if(e.offsetX=i+e.left-t.left,e.offsetY+=t.height-t.height*(this.style.baselineRatio||.19),i+=e.width*(s?-1:1),e.verticalAlign)switch(e.verticalAlign){case"super":e.offsetY-=t.height/2-e.height/2;break;case"sub":e.offsetY+=e.height/2;break}})});const m={left:s?-p:-u,top:0,right:s?u:p,bottom:g};if("none"!==a){const t=this._fitRatio(m);if(t<1)if("fit"==a)it.Et(this.style.minScale)&&t<this.style.minScale?(this.textVisible=!1,m.left=0,m.top=0,m.right=0,m.bottom=0):(this._originalScale||(this._originalScale=this.scale),this.scale=t,this.textVisible=!0);else if("hide"==a)this.textVisible=!1,m.left=0,m.top=0,m.right=0,m.bottom=0;else{switch(this.style.textAlign){case"right":case"end":m.left=s?n:-n,m.right=0;break;case"center":m.left=-n/2,m.right=n/2;break;default:m.left=0,m.right=s?-n:n}this.scale=this._originalScale||1,this._originalScale=void 0,this.textVisible=!0}else this.scale=this._originalScale||1,this._originalScale=void 0,this.textVisible=!0}return e.restore(),i.restore(),m}_fitRatio(t){const e=this.style.maxWidth,i=this.style.maxHeight;if(!it.Et(e)&&!it.Et(i))return 1;const s=t.right-t.left,a=t.bottom-t.top;return Math.min(e/s||1,i/a||1)}_truncateText(t,e,i,s=!1,a=!0){let n;do{if(s)e=e.slice(0,-1);else{let t=e.replace(/[^,;:!?\\\/\sâ]+[,;:!?\\\/\sâ]*$/g,"");if(""!=t&&t!==e||!a){if(""==t)return e;e=t}else s=!0}const i=this._measureText(e,t);n=i.actualBoundingBoxLeft+i.actualBoundingBoxRight}while(n>i&&""!=e);return e}_measureText(t,e){let i=e.measureText(t),s={};if(null==i.actualBoundingBoxAscent){const e=document.createElement("div");e.innerText=t,e.style.visibility="hidden",e.style.position="absolute",e.style.top="-1000000px;",e.style.fontFamily=this.style.fontFamily||"",e.style.fontSize=this.style.fontSize+"",document.body.appendChild(e);const a=e.getBoundingClientRect();document.body.removeChild(e);const n=a.height,o=i.width;let r=0,l=o;s={actualBoundingBoxAscent:n,actualBoundingBoxDescent:0,actualBoundingBoxLeft:r,actualBoundingBoxRight:l,fontBoundingBoxAscent:n,fontBoundingBoxDescent:0,width:o}}else s={actualBoundingBoxAscent:i.actualBoundingBoxAscent,actualBoundingBoxDescent:i.actualBoundingBoxDescent,actualBoundingBoxLeft:i.actualBoundingBoxLeft,actualBoundingBoxRight:i.actualBoundingBoxRight,fontBoundingBoxAscent:i.actualBoundingBoxAscent,fontBoundingBoxDescent:i.actualBoundingBoxDescent,width:i.width};const a=i.width;switch(this.style.textAlign){case"right":case"end":s.actualBoundingBoxLeft=a,s.actualBoundingBoxRight=0;break;case"center":s.actualBoundingBoxLeft=a/2,s.actualBoundingBoxRight=a/2;break;default:s.actualBoundingBoxLeft=0,s.actualBoundingBoxRight=a}return s}}
1class Ai{constructor(){this.lineHeight=(0,ht.KN)(120),this.baselineRatio=.19,this.oversizedBehavior="none",this.breakWords=!1,this.ellipsis="â¦",this.ignoreFormatting=!1}}class Si extends Pi{constructor(){super(...arguments),this.textType="circular",this.inside=!1,this.orientation="auto",this.kerning=0,this._textReversed=!1}_render(t,e=0){switch(this.textType){case"circular":this._renderCircular(t,e);break;default:super._render(t,e);break}}_renderCircular(t,e=0){if(this.textVisible){this._prerender(t);const i=this._isInteractive(t),s=t.layer.context,a=t.layer.dirty,n=this._renderer._ghostLayer.context;s.save(),i&&n.save(),this._textInfo||this._measure(t);let o=this.radius||0,r=this.startAngle||0,l=0,h=this.orientation,c="auto"==h?"auto":"inward"==h;const d=this.inside,u=this.style.textAlign||"left",p=this.kerning||0;let g="left"==u?1:-1;const m=!this._textReversed,_=this._ghostOnly(e),v=this._drawGhost(t,e);if("auto"==c){let t=0,e=0;et.__(this._textInfo,(e,i)=>{const s=r+e.width/(o-e.height)/2*-g;s>t&&(t=s)}),e="left"==u?(t+l/2)*Nt:"right"==u?(t-l/2)*Nt:r*Nt,e=Xt(e),c=e>=270||e<=90}1==c&&m&&(this._textInfo.reverse(),this._textReversed=!0),et.__(this._textInfo,(t,e)=>{const h=t.height;d||(o+=h),(-1==g&&c||1==g&&!c)&&m&&t.textChunks.reverse();let f=r;l=0,"center"==u&&(f+=t.width/(o-h)/2*-g,l=f-r),f+=Math.PI*(c?0:1),s.save(),i&&n.save(),_||s.rotate(f),i&&n.rotate(f);let y=0;et.__(t.textChunks,(t,e)=>{const r=t.text,l=t.width;y=l/2/(o-h)*g,_||s.rotate(y),i&&n.rotate(y),t.style&&(s.save(),n.save(),_||(s.font=t.style),i&&(n.font=t.style)),t.fill&&(s.save(),_||(s.fillStyle=t.fill.toCSS())),_||(s.textBaseline="middle",s.textAlign="center"),i&&(n.textBaseline="middle",n.textAlign="center"),a&&!_&&s.fillText(r,0,(c?1:-1)*(0-o+h/2)),i&&v&&n.fillText(r,0,(c?1:-1)*(0-o+h/2)),t.fill&&s.restore(),t.style&&(s.restore(),n.restore()),y=(l/2+p)/(o-h)*g,_||s.rotate(y),i&&n.rotate(y)}),s.restore(),i&&n.restore(),d&&(o-=h)}),s.restore(),i&&n.restore()}}_measure(t){switch(this.textType){case"circular":return this._measureCircular(t);default:return super._measure(t)}}_measureCircular(t){const e=t.layer.context,i=this._renderer._ghostLayer.context,s="rtl"==this.style.direction,a=this.style.oversizedBehavior,n=this.style.maxWidth,o=it.Et(n)&&"truncate"==a,r=this.style.ellipsis||"";let l;this.textVisible=!0,this._textInfo=[],this._textReversed=!1,e.save(),i.save(),this._prerender(t,!0);const h=this.text.toString().replace(/\r/g,"").split(/\n/);let c=!0,d=0,u=0;return et.__(h,(t,a)=>{let h,p,g,m=he.chunk(t,!1,this.style.ignoreFormatting),_={offsetY:u,ascent:0,width:0,height:0,left:0,right:0,textChunks:[]};et.__(m,(t,a)=>{if("format"==t.type){if("[/]"==t.text)c||(e.restore(),i.restore(),c=!0),p=void 0,h=void 0,g=void 0;else{let s=he.getTextStyle(t.text);const a=this._getFontStyle(s);e.save(),i.save(),e.font=a,h=a,s.fill&&(p=s.fill),s.width&&(g=it.Ro(s.width)),c=!1}o&&(l=this._measureText(r,e))}else if("value"==t.type){let i=t.text.match(/./gu)||[];s&&(i=Ft.SX(t.text),i.reverse());for(let t=0;t<i.length;t++){const s=i[t],a=this._measureText(s,e);let c=a.width;h&&g&&g>c&&(c=g);const u=a.actualBoundingBoxAscent+a.actualBoundingBoxDescent;if(u>_.height&&(_.height=u),a.actualBoundingBoxAscent>_.ascent&&(_.ascent=a.actualBoundingBoxAscent),d+=c,o){l||(l=this._measureText(r,e));const t=l.actualBoundingBoxLeft+l.actualBoundingBoxRight;if(d+t>n){1==_.textChunks.length?this.textVisible=!1:(_.width+=t,_.left+=l.actualBoundingBoxLeft,_.right+=l.actualBoundingBoxRight,_.textChunks.push({style:h,fill:p,text:r,width:t,height:u+l.actualBoundingBoxDescent,left:l.actualBoundingBoxLeft,right:l.actualBoundingBoxRight,ascent:l.actualBoundingBoxAscent,offsetX:0,offsetY:u,textDecoration:void 0}));break}}_.width+=c,_.left+=a.actualBoundingBoxLeft,_.right+=a.actualBoundingBoxRight,_.textChunks.push({style:h,fill:p,text:s,width:c,height:u+a.actualBoundingBoxDescent,left:a.actualBoundingBoxLeft,right:a.actualBoundingBoxRight,ascent:a.actualBoundingBoxAscent,offsetX:0,offsetY:u,textDecoration:void 0})}}}),this.style.lineHeight instanceof ht.QE?_.height*=this.style.lineHeight.value:_.height*=this.style.lineHeight||1.2,this._textInfo.push(_),u+=_.height}
1),c||(e.restore(),i.restore()),"hide"==a&&d>n&&(this.textVisible=!1),et.__(this._textInfo,t=>{et.__(t.textChunks,e=>{e.offsetY+=Math.round((t.height-e.height+(t.ascent-e.ascent))/2)})}),e.restore(),i.restore(),{left:0,top:0,right:0,bottom:0}}}class Mi extends si{constructor(t,e){super(t),this.image=e}_dispose(){super._dispose(),this._imageMask&&ti(this._imageMask)}getLocalBounds(){if(!this._localBounds){let t=0,e=0;this.width&&(t=this.width),this.height&&(e=this.height),this._localBounds={left:0,top:0,right:t,bottom:e},this._addBounds(this._localBounds)}return this._localBounds}_render(t,e=0){if(super._render(t),this.image){if(void 0===this.tainted&&(this.tainted=Ze(this.image),t.layer.tainted=!0),this.tainted&&this._renderer._omitTainted)return;const i=this._ghostOnly(e),s=this._drawGhost(t,e);if(t.layer.dirty&&!i){this.shadowColor&&(t.layer.context.shadowColor=this.shadowColor.toCSS(this.shadowOpacity||1)),this.shadowBlur&&(t.layer.context.shadowBlur=this.shadowBlur),this.shadowOffsetX&&(t.layer.context.shadowOffsetX=this.shadowOffsetX),this.shadowOffsetY&&(t.layer.context.shadowOffsetY=this.shadowOffsetY);const e=this.width||this.image.naturalWidth,i=this.height||this.image.naturalHeight;t.layer.context.drawImage(this.image,0,0,e,i)}if(this.interactive&&this._isInteractive(t)&&s){const t=this._getMask(this.image);this._renderer._ghostLayer.context.drawImage(t,0,0)}}}clear(){super.clear(),this.image=void 0,this._imageMask=void 0}_getMask(t){if(void 0===this._imageMask){const e=this.width||t.naturalWidth,i=this.height||t.naturalHeight,s=document.createElement("canvas");s.width=e,s.height=i;const a=s.getContext("2d");a.imageSmoothingEnabled=!1,a.fillStyle=this._getColorId(),a.fillRect(0,0,e,i),Ze(t)||(a.globalCompositeOperation="destination-in",a.drawImage(t,0,0,e,i)),this._imageMask=s}return this._imageMask}}class Ei{constructor(t,e,i,s){this.event=t,this.originalPoint=e,this.point=i,this.bbox=s,this.simulated=!1,this.native=!0,Ft.xY("touchevents")&&t instanceof Touch?this.id=t.identifier:this.id=null}}class Ii extends tt.JZ{constructor(t){if(super(),this.view=document.createElement("div"),this._layerDom=document.createElement("div"),this.layers=[],this._dirtyLayers=[],this.defaultLayer=this.getLayer(0),this._ghostLayer=new Ri,this._deferredGhostLayers=[],this._patternCanvas=document.createElement("canvas"),this._patternContext=this._patternCanvas.getContext("2d"),this._realWidth=0,this._realHeight=0,this._calculatedWidth=0,this._calculatedHeight=0,this.interactionsEnabled=!0,this._listeners={},this._events={},this._colorId=0,this._colorMap={},this._forceInteractive=0,this._omitTainted=!1,this._hovering=new Set,this._dragging=[],this._mousedown=[],this.tapToActivate=!1,this.tapToActivateTimeout=3e3,this._touchActive=!1,this.resolution=null==t?window.devicePixelRatio:t,this.view.style.position="absolute",this.view.setAttribute("aria-hidden","true"),this.view.appendChild(this._layerDom),this._disposers.push(new tt.W_(()=>{dt.__(this._events,(t,e)=>{e.disposer.dispose()}),et.__(this.layers,t=>{ti(t.view),t.exportableView&&ti(t.exportableView)}),ti(this._ghostLayer.view),ti(this._patternCanvas)})),this._disposers.push(Ft.n_(()=>{null==t&&(this.resolution=window.devicePixelRatio)})),Ft.xY("touchevents")){const t=t=>{0!==this._dragging.length&&et.FY(this._dragging,e=>!e.value.shouldCancelTouch()||(t.preventDefault(),!1)),this._touchActiveTimeout&&this._delayTouchDeactivate()};this._disposers.push(Ft.q2(window,"touchstart",t,{passive:!1})),this._disposers.push(Ft.q2(this.view,"touchstart",t,{passive:!1})),this._disposers.push(Ft.q2(this.view,"touchmove",()=>{this._touchActiveTimeout&&this._delayTouchDeactivate()},{passive:!0})),this._disposers.push(Ft.q2(window,"click",t=>{this._touchActive=!1},{passive:!0})),this._disposers.push(Ft.q2(this.view,"click",t=>{window.setTimeout(()=>{this._touchActive=!0,this._delayTouchDeactivate()},100)},{passive:!0}))}Ft.xY("wheelevents")&&this._disposers.push(Ft.q2(this.view,"wheel",t=>{let e=!1;this._hovering.forEach(t=>{if(t.wheelable)return e=!0,!1}),e&&t.preventDefault()},{passive:!1}))}resetImageArray(){this._ghostLayer.imageArray=void 0}_delayTouchDeactivate(){this._touchActiveTimeout&&clearTimeout(this._touchActiveTimeout),this.tapToActivateTimeout>0&&(this._touchActiveTimeout=window.setTimeout(()=>{this._touchActive=!1},this.tapToActivateTimeout))}get debugGhostView(){return!!this._ghostLayer.view.parentNode}set debugGhostView(t){t?this._ghostLayer.view.parentNode||this.view.appendChild(this._ghostLayer.view):this._ghostLayer.view.parentNode&&this._ghostLayer.view.parentNode.removeChild(this._ghostLayer.view)}createLinearGradient(t,e,i,s){return this.defaultLayer.context.createLinearGradient(t,e,i,s)}createRadialGradient(t,e,i,s,a,n){return this.defaultLayer.context.createRadialGradient(t,e,i,s,a,n)}createPattern(t,e,i,s,a){return this._patternCanvas.width=s,this._patternCanvas.height=a,this._patternContext.clearRect(0,0,s,a),e.renderDetached(this._patternContext),t.renderDetached(this._patternContext),this._patternContext.createPattern(this._patternCanvas,i)}makeContainer(){return new ai(this)}makeGraphics(){return new Ti(this)}makeText(t,e){return new Pi(this,t,e)}makeTextStyle(){return new Ai}makeRadialText(t,e){return new Si(this,t,e)}
1makePicture(t){return new Mi(this,t)}resizeLayer(t){t.resize(this._calculatedWidth,this._calculatedHeight,this._calculatedWidth,this._calculatedHeight,this.resolution)}resizeGhost(){this._ghostLayer.resize(this._calculatedWidth,this._calculatedHeight,this._calculatedWidth,this._calculatedHeight,this.resolution)}resize(t,e,i,s){this._realWidth=t,this._realHeight=e,this._calculatedWidth=i,this._calculatedHeight=s,et.__(this.layers,t=>{t&&(t.dirty=!0,this.resizeLayer(t))}),this.resizeGhost(),this.view.style.width=i+"px",this.view.style.height=s+"px"}createDetachedLayer(t=!1){const e=document.createElement("canvas"),i=e.getContext("2d",{willReadFrequently:t}),s=new Li(e,i);return e.style.position="absolute",e.style.top="0px",e.style.left="0px",s}getLayerByOrder(t){const e=this.layers,i=e.length;for(let s=0;s<i;s++){const i=e[s];if(i.order==t)return i}}getLayer(t,e=!0){let i=this.getLayerByOrder(t);if(i)return i;const s=this.createDetachedLayer(99==t);s.order=t,s.visible=e,s.view.className="am5-layer-"+t,s.visible&&this.resizeLayer(s);const a=this.layers;a.push(s),a.sort((t,e)=>t.order>e.order?1:t.order<e.order?-1:0);const n=a.length,o=et.qh(a,s);let r;for(let l=o+1;l<n;l++)if(a[l].visible){r=a[l];break}return s.visible&&(void 0===r?this._layerDom.appendChild(s.view):this._layerDom.insertBefore(s.view,r.view)),s}render(t){this._dirtyLayers.length=0,this._deferredGhostLayers=[],et.__(this.layers,t=>{t&&t.dirty&&t.visible&&(this._dirtyLayers.push(t),t.clear())}),this._ghostLayer.clear(),t.render({inactive:null,layer:this.defaultLayer});const e=this._deferredGhostLayers;if(e.length&&(e.sort((t,e)=>t-e),et.__(e,e=>{t.render({inactive:null,layer:this.defaultLayer},e)})),this._ghostLayer.context.restore(),et.__(this.layers,t=>{if(t){const e=t.context;e.beginPath(),e.moveTo(0,0),e.stroke()}}),et.__(this._dirtyLayers,t=>{t.context.restore(),t.dirty=!1}),this._hovering.size&&this._lastPointerMoveEvent){const{events:t,target:e,native:i}=this._lastPointerMoveEvent;et.__(t,t=>{this._dispatchGlobalMousemove(t,e,i)})}}paintId(t){const e=Je(++this._colorId),i=le.Q1.fromHex(e).toCSS();return this._colorMap[i]=t,i}_removeObject(t){void 0!==t._colorId&&delete this._colorMap[t._colorId]}_adjustBoundingBox(t){const e=this._ghostLayer.margin;return new DOMRect(-e.left,-e.top,t.width+e.left+e.right,t.height+e.top+e.bottom)}getEvent(t,e=!0){const i=this.view.getBoundingClientRect(),s=t.clientX||0,a=t.clientY||0,n=this._calculatedWidth/this._realWidth,o=this._calculatedHeight/this._realHeight,r={x:s-i.left,y:a-i.top},l={x:(s-(e?i.left:0))*n,y:(a-(e?i.top:0))*o};return new Ei(t,r,l,this._adjustBoundingBox(i))}_getHitTarget(t,e,i){if(0===e.width||0===e.height||t.x<e.left||t.x>e.right||t.y<e.top||t.y>e.bottom)return;if(!i||!this._layerDom.contains(i))return;const s=this._ghostLayer.getImageData(t,e);if(0===s.data[0]&&0===s.data[1]&&0===s.data[2])return!1;const a=le.Q1.fromRGB(s.data[0],s.data[1],s.data[2]).toCSS(),n=this._colorMap[a];return n}getObjectAtPoint(t){const e=this._ghostLayer.getImageArray(t);if(0===e[0]&&0===e[1]&&0===e[2])return;const i=le.Q1.fromRGB(e[0],e[1],e[2]).toCSS(),s=this._colorMap[i];return s}_withEvents(t,e){const i=this._events[t];if(void 0!==i){i.dispatching=!0;try{e(i)}finally{i.dispatching=!1,i.cleanup&&(i.cleanup=!1,et.TW(i.callbacks,t=>!t.disposed),0===i.callbacks.length&&(i.disposer.dispose(),delete this._events[t]))}}}_dispatchEventAll(t,e){this.interactionsEnabled&&this._withEvents(t,t=>{et.__(t.callbacks,t=>{t.disposed||t.callback.call(t.context,e)})})}_dispatchEvent(t,e,i){if(!this.interactionsEnabled)return!1;let s=!1;return this._withEvents(t,t=>{et.__(t.callbacks,t=>{t.disposed||t.object!==e||(t.callback.call(t.context,i),s=!0)})}),s}_dispatchMousedown(t,e){const i=t.button;if(0!=i&&2!=i&&1!=i&&void 0!==i)return;
1const s=this.getEvent(t),a=this._getHitTarget(s.originalPoint,s.bbox,e);if(a){const t=s.id;let e=!1;Ke(a,i=>{const a={id:t,value:i};if(this._mousedown.push(a),!e&&this._dispatchEvent("pointerdown",i,s)){e=!0;const s=this._dragging.some(e=>e.value===i&&e.id===t);s||this._dragging.push(a)}return!0})}}_dispatchGlobalMousemove(t,e,i){const s=this.getEvent(t),a=this._getHitTarget(s.originalPoint,s.bbox,e);s.native=i,a?(this._hovering.forEach(t=>{t.contains(a)||(this._hovering.delete(t),t.cursorOverStyle&&Ft.eC(document.body,"cursor",t._replacedCursorStyle),this._dispatchEvent("pointerout",t,s))}),s.native&&Ke(a,t=>(this._hovering.has(t)||(this._hovering.add(t),t.cursorOverStyle&&(t._replacedCursorStyle=Ft.gd(document.body,"cursor"),Ft.eC(document.body,"cursor",t.cursorOverStyle)),this._dispatchEvent("pointerover",t,s)),!0))):(this._hovering.forEach(t=>{t.cursorOverStyle&&Ft.eC(document.body,"cursor",t._replacedCursorStyle),this._dispatchEvent("pointerout",t,s)}),this._hovering.clear()),this._dispatchEventAll("globalpointermove",s)}removeHovering(t){this._hovering.delete(t),t.cursorOverStyle&&Ft.eC(document.body,"cursor",t._replacedCursorStyle)}_dispatchGlobalMouseup(t,e){const i=this.getEvent(t);i.native=e,this._dispatchEventAll("globalpointerup",i)}_dispatchDragMove(t){if(0!==this._dragging.length){const e=this.getEvent(t),i=e.id;this._dragging.forEach(t=>{t.id===i&&this._dispatchEvent("pointermove",t.value,e)})}}_dispatchDragEnd(t,e){const i=t.button;let s;if(0==i||void 0===i)s="click";else if(2==i)s="rightclick";else{if(1!=i)return;s="middleclick"}const a=this.getEvent(t),n=a.id;if(0!==this._mousedown.length){const t=this._getHitTarget(a.originalPoint,a.bbox,e);t&&this._mousedown.forEach(e=>{e.id===n&&e.value.contains(t)&&this._dispatchEvent(s,e.value,a)}),this._mousedown.length=0}0!==this._dragging.length&&(this._dragging.forEach(t=>{t.id===n&&this._dispatchEvent("pointerup",t.value,a)}),this._dragging.length=0)}_dispatchDoubleClick(t,e){const i=this.getEvent(t),s=this._getHitTarget(i.originalPoint,i.bbox,e);s&&Ke(s,t=>!this._dispatchEvent("dblclick",t,i))}_dispatchWheel(t,e){const i=this.getEvent(t),s=this._getHitTarget(i.originalPoint,i.bbox,e);s&&Ke(s,t=>!this._dispatchEvent("wheel",t,i))}_makeSharedEvent(t,e){if(void 0===this._listeners[t]){const i=e();this._listeners[t]=new tt.Wr(()=>{delete this._listeners[t],i.dispose()})}return this._listeners[t].increment()}_onPointerEvent(t,e){let i=!1,s=null;function a(){s=null,i=!1}return new tt.ZT([new tt.W_(()=>{null!==s&&clearTimeout(s),a()}),Ft.q2(this.view,Ft.wN(t),t=>{i=!0,null!==s&&clearTimeout(s),s=window.setTimeout(a,0)}),$e(window,t,(t,a)=>{null!==s&&(clearTimeout(s),s=null),e(t,a,i),i=!1})])}_initEvent(t){switch(t){case"globalpointermove":case"pointerover":case"pointerout":return this._makeSharedEvent("pointermove",()=>{const t=(t,e,i)=>{this._lastPointerMoveEvent={events:t,target:e,native:i},et.__(t,t=>{this._dispatchGlobalMousemove(t,e,i)})};return new tt.ZT([this._onPointerEvent("pointerdown",t),this._onPointerEvent("pointermove",t)])});case"globalpointerup":return this._makeSharedEvent("pointerup",()=>{const t=this._onPointerEvent("pointerup",(t,e,i)=>{et.__(t,t=>{this._dispatchGlobalMouseup(t,i)}),this._lastPointerMoveEvent={events:t,target:e,native:i}}),e=this._onPointerEvent("pointercancel",(t,e,i)=>{et.__(t,t=>{this._dispatchGlobalMouseup(t,i)}),this._lastPointerMoveEvent={events:t,target:e,native:i}});return new tt.W_(()=>{t.dispose(),e.dispose()})});case"click":case"rightclick":case"middleclick":case"pointerdown":case"pointermove":case"pointerup":return this._makeSharedEvent("pointerdown",()=>{const t=this._onPointerEvent("pointerdown",(t,e)=>{et.__(t,t=>{this._dispatchMousedown(t,e)})}),e=this._onPointerEvent("pointermove",t=>{et.__(t,t=>{this._dispatchDragMove(t)})}),i=this._onPointerEvent("pointerup",(t,e)=>{et.__(t,t=>{this._dispatchDragEnd(t,e)})}),s=this._onPointerEvent("pointercancel",(t,e)=>{et.__(t,t=>{this._dispatchDragEnd(t,e)})});return new tt.W_(()=>{t.dispose(),e.dispose(),i.dispose(),s.dispose()})});case"dblclick":return this._makeSharedEvent("dblclick",()=>this._onPointerEvent("dblclick",(t,e)=>{et.__(t,t=>{this._dispatchDoubleClick(t,e)})}));case"wheel":return this._makeSharedEvent("wheel",()=>Ft.q2(this.view,Ft.wN("wheel"),t=>{this._dispatchWheel(t,Ft.wt(t))},{passive:!1}))}}_addEvent(t,e,i,s){let a=this._events[e];void 0===a&&(a=this._events[e]={disposer:this._initEvent(e),callbacks:[],dispatching:!1,cleanup:!1});const n={object:t,context:s,callback:i,disposed:!1};return a.callbacks.push(n),new tt.W_(()=>{n.disposed=!0,a.dispatching?a.cleanup=!0:(et.dm(a.callbacks,n),0===a.callbacks.length&&(a.disposer.dispose(),delete this._events[e]))})}getCanvas(t,e){this.render(t),e||(e={});let i=this.resolution,s=Math.floor(this._calculatedWidth*this.resolution),a=Math.floor(this._calculatedHeight*this.resolution);if(e.minWidth&&e.minWidth>s){let t=e.minWidth/s;t>i&&(i=t*this.resolution)}if(e.minHeight&&e.minHeight>a){let t=e.minHeight/a;t>i&&(i=t*this.resolution)}if(e.maxWidth&&e.maxWidth<s){let t=e.maxWidth/s;t<i&&(i=t*this.resolution)}if(e.maxHeight&&e.maxHeight>a){let t=e.maxHeight/a;t<i&&(i=t*this.resolution)}e.maintainPixelRatio&&(i/=this.resolution);const n=[];let o=!1;const r=document.createElement("canvas");i!=this.resolution&&(o=!0,s=s*i/this.resolution,a=a*i/this.resolution),r.width=s,r.he
1ight=a,r.style.position="fixed",r.style.top="-10000px",this.view.appendChild(r),n.push(r);const l=r.getContext("2d");let h=0,c=0,d=!1;return et.__(this.layers,t=>{if(t&&t.visible&&(t.tainted||o)){d=!0,t.exportableView=t.view,t.exportableContext=t.context,t.view=document.createElement("canvas"),t.view.style.position="fixed",t.view.style.top="-10000px",this.view.appendChild(t.view),n.push(t.view);let e=0,o=0;t.margin&&(e+=t.margin.left||0+t.margin.right||0,o+=t.margin.top||0+t.margin.bottom||0),t.view.width=s+e,t.view.height=a+o,t.context=t.view.getContext("2d"),t.dirty=!0,t.scale=i}}),d&&(this._omitTainted=!0,this.render(t),this._omitTainted=!1),et.__(this.layers,t=>{if(t&&t.visible){let e=0,i=0;t.margin&&(e=-(t.margin.left||0)*this.resolution,i=-(t.margin.top||0)*this.resolution),l.drawImage(t.view,e,i),t.exportableView&&(t.view=t.exportableView,t.exportableView=void 0),t.exportableContext&&(t.context=t.exportableContext,t.exportableContext=void 0),h<t.view.clientWidth&&(h=t.view.clientWidth),c<t.view.clientHeight&&(c=t.view.clientHeight),t.scale=void 0}}),r.style.width=h+"px",r.style.height=c+"px",et.__(n,t=>{t.style.position="",t.style.top="",this.view.removeChild(t)}),r}}class Ri{constructor(){this.margin={left:0,right:0,top:0,bottom:0},this._resolution=1,this._width=0,this._height=0,this.view=document.createElement("canvas"),this.context=this.view.getContext("2d",{alpha:!1,willReadFrequently:!0}),this.context.imageSmoothingEnabled=!1,this.view.style.position="absolute",this.view.style.top="0px",this.view.style.left="0px"}resize(t,e,i,s,a){this._resolution=a,t+=this.margin.left+this.margin.right,e+=this.margin.top+this.margin.bottom,i+=this.margin.left+this.margin.right,s+=this.margin.top+this.margin.bottom,this.view.style.left=-this.margin.left+"px",this.view.style.top=-this.margin.top+"px",this._width=Math.floor(t*a),this._height=Math.floor(e*a),this.view.width=this._width,this.view.style.width=i+"px",this.view.height=this._height,this.view.style.height=s+"px"}getImageData(t,e){return this.context.getImageData(Math.round((t.x-e.left)/e.width*this._width),Math.round((t.y-e.top)/e.height*this._height),1,1)}getImageArray(t){this.imageArray||(this.imageArray=this.context.getImageData(0,0,this._width,this._height).data);const e=this.imageArray,i=Math.round(t.x*this._resolution),s=Math.round(t.y*this._resolution),a=4*(s*this._width+i);return[e[a],e[a+1],e[a+2],e[a+3]]}setMargin(t){this.margin.left=0,this.margin.right=0,this.margin.top=0,this.margin.bottom=0,et.__(t,t=>{t.margin&&(this.margin.left=Math.max(this.margin.left,t.margin.left),this.margin.right=Math.max(this.margin.right,t.margin.right),this.margin.top=Math.max(this.margin.top,t.margin.top),this.margin.bottom=Math.max(this.margin.bottom,t.margin.bottom))})}clear(){this.context.save(),this.context.fillStyle="#000",this.context.fillRect(0,0,this._width,this._height)}}class Li{constructor(t,e){this.tainted=!0,this.order=0,this.visible=!0,this.dirty=!0,this._width=0,this._height=0,this.view=t,this.context=e}resize(t,e,i,s,a){null!=this.width&&(t=this.width,i=this.width),null!=this.height&&(e=this.height,s=this.height),this.margin?(t+=this.margin.left+this.margin.right,e+=this.margin.top+this.margin.bottom,i+=this.margin.left+this.margin.right,s+=this.margin.top+this.margin.bottom,this.view.style.left=-this.margin.left+"px",this.view.style.top=-this.margin.top+"px"):(this.view.style.left="0px",this.view.style.top="0px"),this._width=Math.floor(t*a),this._height=Math.floor(e*a),this.view.width=this._width,this.view.style.width=i+"px",this.view.height=this._height,this.view.style.height=s+"px"}clear(){this.context.save(),this.context.clearRect(0,0,this._width,this._height)}}function Fi(t,e){null==t?requestAnimationFrame(e):setTimeout(()=>{requestAnimationFrame(e)},1e3/t)}class Bi{constructor(t,e={},i){if(this._isDirty=!1,this._isDirtyParents=!1,this._isDirtyAnimation=!1,this._dirty={},this._dirtyParents={},this._dirtyBounds={},this._dirtyPositions={},this._ticker=null,this._tickers=[],this._updateTick=!0,this.skipRenderFrame=!1,this.events=new st,this.animationTime=null,this._animations=[],this.language=Ie.new(this,{}),this.locale=Ee,this.utc=!1,this.numberFormatter=De.new(this,{}),this.dateFormatter=Se.new(this,{}),this.durationFormatter=Me.new(this,{}),this.tabindex=0,this._tabindexes=[],this._a11yD=!1,this._focusElementDirty=!1,this._skipNextGroupJump=!0,this.verticalLayout=oe.new(this,{}),this.horizontalLayout=ne.new(this,{}),this.gridLayout=re.new(this,{}),this._paused=!1,this.autoResize=!0,this._fontHash=[],this._isDisposed=!1,this._disposers=[],this._tooltips=[],this._htmlEnabledContainers=[],this.entitiesById={},!i)throw new Error("You cannot use `new Class()`, instead use `Class.new()`");let s,a;if(this._settings=e,0==e.accessible&&(this._a11yD=!0),null==e.useSafeResolution&&(e.useSafeResolution=!0),e.useSafeResolution&&(s=Ft.U3()),this._renderer=new Ii(s),a=t instanceof HTMLElement?t:document.getElementById(t),et.__(bt.rootElements,t=>{if(t.dom===a){if(!bt.autoDispose)throw new Error("You cannot have multiple Roots on the same DOM node");t.dispose()}}),this.interfaceColors=be.new(this,{}),null===a)throw new Error("Could not find HTML element with id `"+t+"`");this.dom=a;let n=document.createElement("div");n.style.position="relative",n.style.width="100%",n.style.height="100%",a.appendChild(n);const o=e.tooltipContainerBounds;o&&(this._tooltipContainerSettings=o),this._inner=n,this._updateComputedStyles(),bt.rootElements.push(this)}static new(t,e){const i=new Bi(t,e,!0);return i._init(),i}moveDOM(t){let e;if(e=t instanceof HTMLElement?t:document.getElementById(t),e){while(this.dom.childNodes.length>0)e.appendChild(this.dom.childNodes[0]);this.dom=e,this._initResizeSensor(),this.resize()}}_handleLogo(){if(this._logo){const t=this.dom.offsetWidth,e=this.dom.offsetHeight;t<=150||e<=60?this._logo.hide():this._logo.show()}}_showBranding(){if(!this._logo){const t=this.tooltipContainer.children.push(ge.new(this,{interactive:!0,interactiveChildren:!1,position:"absolute",setStateOnChildren:!0,paddingTop:9,paddingRight:9,paddingBottom:9,paddingLeft:9,scale:.6,y:(0,ht.KN)(100),centerY:ht.Q2,tooltipY:10,tooltipText:"Created using amCharts 5",tooltipX:ht.Q2,cursorOverStyle:"pointer",background:ie.new(this,{fill:(0,le.yW)(4671320),fillOpacity:0,tooltipY:5})}));t.set("tooltip",this.systemTooltip),t.events.on("click",()=>{window.open("https://www.amcharts.com/","_blank")}),t.states.create("hover",{});
1const e=t.children.push(ee.new(this,{stroke:(0,le.yW)(13421772),strokeWidth:3,svgPath:"M5 25 L13 25h13.6c3.4 0 6 0 10.3-4.3s5.2-12 8.6-12c3.4 0 4.3 8.6 7.7 8.6M83.4 25H79.8c-3.4 0-6 0-10.3-4.3s-5.2-12-8.6-12-4.3 8.6-7.7 8.6",dx:-50,strokeOpacity:0}));e.states.create("hover",{stroke:(0,le.yW)(3976191)});const i=t.children.push(ee.new(this,{stroke:(0,le.yW)(8947848),strokeWidth:3,svgPath:"M83.4 25h-31C37 25 39.5 4.4 28.4 4.4S18.9 24.2 4.3 25H0",dx:50,strokeOpacity:0})),s=gt(pt),a=1500;t.setTimeout(()=>{i.animate({key:"strokeOpacity",to:1,duration:a,easing:s}),i.animate({key:"dx",to:0,duration:a,easing:s}),e.animate({key:"dx",to:0,duration:a,easing:s}),e.animate({key:"strokeOpacity",to:1,duration:a,easing:s})},3e3),i.states.create("hover",{stroke:(0,le.yW)(4671320)}),this._logo=t,this._handleLogo()}}_getRealSize(){return this.dom.getBoundingClientRect()}_getCalculatedSize(t){return this._settings.calculateSize?this._settings.calculateSize(t):{width:t.width,height:t.height}}_init(){const t=this._settings;!1!==t.accessible&&(t.focusable&&(this._inner.setAttribute("focusable","true"),this._inner.setAttribute("tabindex",this.tabindex+"")),t.ariaLabel&&this._inner.setAttribute("aria-label",t.ariaLabel),t.role&&this._inner.setAttribute("role",t.role));const e=this._renderer,i=this._getRealSize(),s=this._getCalculatedSize(i),a=Math.floor(s.width),n=Math.floor(s.height),o=Math.floor(i.width),r=Math.floor(i.height),l=ge.new(this,{visible:!0,width:a,height:n});this._rootContainer=l,this._rootContainer._defaultThemes.push(Fe.new(this));const h=l.children.push(ge.new(this,{visible:!0,width:ht.Q2,height:ht.Q2}));this.container=h,e.resize(o,r,a,n),this._inner.appendChild(e.view),this._initResizeSensor();const c=document.createElement("div");if(this._htmlElementContainer=c,c.className="am5-html-container",c.style.position="absolute",c.style.pointerEvents="none",this._tooltipContainerSettings||(c.style.overflow="hidden"),this._inner.appendChild(c),!0!==this._a11yD){const t=document.createElement("div");t.className="am5-reader-container",t.setAttribute("role","alert"),t.style.position="absolute",t.style.width="1px",t.style.height="1px",t.style.overflow="hidden",t.style.clip="rect(1px, 1px, 1px, 1px)",this._readerAlertElement=t,this._inner.appendChild(this._readerAlertElement);const i=document.createElement("div");i.className="am5-focus-container",i.style.position="absolute",i.style.pointerEvents="none",i.style.top="0px",i.style.left="0px",i.style.overflow="hidden",i.style.width=a+"px",i.style.height=n+"px",i.setAttribute("role","graphics-document"),Ft.Dt(i,!1),this._focusElementContainer=i,this._inner.appendChild(this._focusElementContainer);const s=document.createElement("div");this._tooltipElementContainer=s,s.className="am5-tooltip-container",this._inner.appendChild(s),Ft.xY("keyboardevents")&&(this._disposers.push(Ft.q2(window,"keydown",t=>{const e=Ft.K(t);"Shift"==e?this._isShift=!0:"Tab"==e&&(this._isShift=t.shiftKey)})),this._disposers.push(Ft.q2(window,"keyup",t=>{const e=Ft.K(t);"Shift"==e&&(this._isShift=!1)})),this._disposers.push(Ft.q2(i,"click",()=>{const t=this._focusedSprite;if(t){const i=t.get("clickAnnounceText","");""!==i&&this.readerAlert(i);const s=e.getEvent(new MouseEvent("click"));t.events.dispatch("click",{type:"click",originalEvent:s.event,point:s.point,simulated:!0,target:t})}})),this._disposers.push(Ft.q2(i,"keydown",t=>{const i=this._focusedSprite;if(i){"Escape"==t.key&&(Ft.Ge(),this._focusedSprite=void 0);let s=0,a=0;const n=Ft.K(t);switch(n){case"Enter":case" ":const o=i.get("clickAnnounceText","");if(""!==o&&this.readerAlert(o)," "==n&&"checkbox"!=i.get("role"))return;t.preventDefault();const r=e.getEvent(new MouseEvent("mouse"));return void i.events.dispatch("click",{type:"click",originalEvent:r.event,point:r.point,simulated:!0,target:i});case"ArrowLeft":s=-6;break;case"ArrowRight":s=6;break;case"ArrowUp":a=-6;break;case"ArrowDown":a=6;break;default:return}if(0!=s||0!=a){if(t.preventDefault(),!i.isDragging()){this._keyboardDragPoint={x:0,y:0};const t=e.getEvent(new MouseEvent("mousedown",{clientX:0,clientY:0}));t.point={x:0,y:0},i.events.isEnabled("pointerdown")&&i.events.dispatch("pointerdown",{type:"pointerdown",originalEvent:t.event,point:t.point,simulated:!0,target:i})}const n=this._keyboardDragPoint;n.x+=s,n.y+=a;const o=e.getEvent(new MouseEvent("mousemove",{clientX:n.x,clientY:n.y}),!1);i.events.isEnabled("globalpointermove")&&i.events.dispatch("globalpointermove",{type:"globalpointermove",originalEvent:o.event,point:o.point,simulated:!0,target:i})}}})),this._disposers.push(Ft.q2(i,"keyup",t=>{if(this._focusedSprite){const i=this._focusedSprite,s=Ft.K(t);switch(s){case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"ArrowDown":if(i.isDragging()){const t=this._keyboardDragPoint,s=e.getEvent(new MouseEvent("mouseup",{clientX:t.x,clientY:t.y}));return i.events.isEnabled("globalpointerup")&&i.events.dispatch("globalpointerup",{type:"globalpointerup",originalEvent:s.event,point:s.point,simulated:!0,target:i}),void(this._keyboardDragPoint=void 0)}if(i.get("focusableGroup")){const t=i.get("focusableGroup"),e=this._tabindexes.filter(e=>!(e.get("focusableGroup")!=t||!1===e.getPrivate("focusable")||!e.isVisibleDeep()));let a=e.indexOf(i);const n=e.length-1;a+="ArrowRight"==s||"ArrowDown"==s?1:-1,a<0?a=n:a>n&&(a=0),Ft.XC(e[a].getPrivate("focusElement").dom)}break;case"Tab":const t=i.get("focusableGroup");if(t&&this._isShift)return void(this._skipNextGroupJump||(this._focusNext(i.getPrivate("focusElement").dom,-1,t),this._skipNextGroupJump=!0));break}}})))}this._startTicker(),this.setThemes([]),this._addTooltip(),this._hasLicense()||this._showBranding()}get systemTooltip(){if(!this._systemTooltip){const t=ke.new(this,{themeTags:["system"]});this._systemTooltip=t}return this._systemTooltip}_initResizeSensor(){this._resizeSensorDisposer&&this._resizeSensorDisposer.dispose(),this._resizeSensorDisposer=new xe(this.dom,()=>{this.autoResize&&this.resize()}),this._disposers.push(this._resizeSensorDisposer)}resize(){const t=this._getRealSize(),e=this._getCalculatedSize(t),i=Math.floor(e.width),s=Math.floor(e.height);if(i>0&&s>0){const e=Math.floor(t.width),a=Math.floor(t.height),n=this._htmlElementContainer;if(n.style.width=i+"px",n.style.height=s+"px",!0!==this._a11yD){const t=this._focusElementContainer;t.style.width=i+"px",t.style.height=s+"px"}this._renderer.resize(e,a,i,s);const o=this._rootContainer;o.setPrivate("width",i),o.setPrivate("height",s),this._render(),this._handleLogo()}}_render(){this.skipRenderFrame?this.skipRenderFrame=!1:(this._renderer.render(this._rootContainer._display),this._focusElementDirty&&(this._updateCurrentFocus(),this._focusElementDirty=!1))}_runTickers(t){et.__(this._tickers,e=>{e(t)})}_runAnimations(t){let e=0;return et.TW(this._animations,i=>{const s=i._runAnimation(t);return s!==Z.oA.Stopped&&(s!==Z.oA.Playing||(++e,!0))}),this._isDirtyAnimation=!1,0===e}_runDirties(){let t={};while(this._isDirtyParents)this._isDirtyParents=!1,dt.jO(this._dirtyParents).forEac
1h(([e,i])=>{delete this._dirtyParents[e],i.isDisposed()||(t[i.uid]=i,i._prepareChildren())});dt.jO(t).forEach(([t,e])=>{e._updateChildren()});const e=[];dt.jO(this._dirty).forEach(([t,i])=>{i.isDisposed()?delete this._dirty[t]:(e.push(i),i._beforeChanged())}),e.forEach(t=>{t._changed(),delete this._dirty[t.uid],t._clearDirty()}),this._isDirty=!1;const i={},s=[];dt.jO(this._dirtyBounds).forEach(([t,e])=>{delete this._dirtyBounds[t],e.isDisposed()||(i[e.uid]=e.depth(),s.push(e))}),this._positionHTMLElements(),s.sort((t,e)=>wt(i[e.uid],i[t.uid])),s.forEach(t=>{t._updateBounds()});const a=this._dirtyPositions;dt.jO(a).forEach(([t,e])=>{delete a[t],e.isDisposed()||e._updatePosition()}),e.forEach(t=>{t._afterChanged()}),dt.jO(t).forEach(([t,e])=>{e._childrenPrep=!1,e._childrenUpdt=!1})}_renderFrame(t){if(this._updateTick){this.events.isEnabled("framestarted")&&this.events.dispatch("framestarted",{type:"framestarted",target:this,timestamp:t}),this._checkComputedStyles(),this._runTickers(t);const e=this._runAnimations(t);return this._runDirties(),this._render(),this._renderer.resetImageArray(),this._positionHTMLElements(),this.events.isEnabled("frameended")&&this.events.dispatch("frameended",{type:"frameended",target:this,timestamp:t}),0===this._tickers.length&&e&&!this._isDirtyAnimation&&!this._isDirty}return!0}_runTicker(t,e){if(!this.isDisposed()){this.animationTime=t;const i=this._renderFrame(t);i?(this._ticker=null,this.animationTime=null):this._paused||(e?this._ticker:Fi(this.fps,this._ticker))}}_runTickerNow(t=1e4){if(!this.isDisposed()){const e=performance.now()+t;for(;;){const t=performance.now();if(t>=e){this.animationTime=null;break}this.animationTime=t;const i=this._renderFrame(t);if(i){this.animationTime=null;break}}}}_startTicker(){null===this._ticker&&(this.animationTime=null,this._ticker=t=>{this._runTicker(t)},Fi(this.fps,this._ticker))}get updateTick(){return this._updateTick}set updateTick(t){this._updateTick=t,t&&this._startTicker()}_addDirtyEntity(t){this._isDirty=!0,void 0===this._dirty[t.uid]&&(this._dirty[t.uid]=t),this._startTicker()}_addDirtyParent(t){this._isDirty=!0,this._isDirtyParents=!0,void 0===this._dirtyParents[t.uid]&&(this._dirtyParents[t.uid]=t),this._startTicker()}_addDirtyBounds(t){this._isDirty=!0,void 0===this._dirtyBounds[t.uid]&&(this._dirtyBounds[t.uid]=t),this._startTicker()}_addDirtyPosition(t){this._isDirty=!0,void 0===this._dirtyPositions[t.uid]&&(this._dirtyPositions[t.uid]=t),this._startTicker()}_addAnimation(t){this._isDirtyAnimation=!0,-1===this._animations.indexOf(t)&&this._animations.push(t),this._startTicker()}_markDirty(){this._isDirty=!0}_markDirtyRedraw(){this.events.once("frameended",()=>{this._isDirty=!0,this._startTicker()})}eachFrame(t){return this._tickers.push(t),this._startTicker(),new tt.W_(()=>{et.dm(this._tickers,t)})}markDirtyGlobal(t){t||(t=this.container),t.walkChildren(t=>{t instanceof ge&&this.markDirtyGlobal(t),t.markDirty(),t.markDirtyBounds()})}width(){return Math.floor(this._getCalculatedSize(this._getRealSize()).width)}height(){return Math.floor(this._getCalculatedSize(this._getRealSize()).height)}dispose(){this._isDisposed||(this._isDisposed=!0,this._rootContainer.dispose(),this._renderer.dispose(),this.horizontalLayout.dispose(),this.verticalLayout.dispose(),this.interfaceColors.dispose(),et.__(this._disposers,t=>{t.dispose()}),this._inner&&Ft.Nz(this._inner),et.TF(bt.rootElements,this))}isDisposed(){return this._isDisposed}readerAlert(t){if(!0!==this._a11yD){const e=this._readerAlertElement;t=Ft.Kq(t),e.innerHTML==t&&(e.innerHTML=""),e.innerHTML=t}}setThemes(t){this._rootContainer.set("themes",t);const e=this.tooltipContainer;e&&e._applyThemes();const i=this.interfaceColors;i&&i._applyThemes()}_addTooltip(){if(!this.tooltipContainer){const t=this._tooltipContainerSettings,e=this._rootContainer.children.push(ge.new(this,{position:"absolute",isMeasured:!1,width:ht.Q2,height:ht.Q2,layer:t?35:30,layerMargin:t||void 0}));this.tooltipContainer=e;const i=ke.new(this,{});this.container.set("tooltip",i),i.hide(0),this._tooltip=i}}_registerTabindexOrder(t){1!=this._a11yD&&(t.get("focusable")?et.JJ(this._tabindexes,t):et.TF(this._tabindexes,t),this._invalidateTabindexes())}_unregisterTabindexOrder(t){1!=this._a11yD&&(et.TF(this._tabindexes,t),this._invalidateTabindexes())}
1_invalidateTabindexes(){if(1==this._a11yD)return;this._tabindexes.sort((t,e)=>{const i=t.get("tabindexOrder",0),s=e.get("tabindexOrder",0);return i==s?0:i>s?1:-1});const t=[];et.__(this._tabindexes,(e,i)=>{e.getPrivate("focusElement")?this._moveFocusElement(i,e):this._makeFocusElement(i,e);const s=e.get("focusableGroup");s&&!1!==e.getPrivate("focusable")&&(-1!==t.indexOf(s)?e.getPrivate("focusElement").dom.setAttribute("tabindex","-1"):t.push(s))})}_updateCurrentFocus(){1!=this._a11yD&&this._focusedSprite&&(this._decorateFocusElement(this._focusedSprite),this._positionFocusElement(this._focusedSprite))}_decorateFocusElement(t,e){if(1==this._a11yD)return;if(e||(e=t.getPrivate("focusElement").dom),!e)return;const i=t.get("role");i?e.setAttribute("role",i):e.removeAttribute("role");const s=t.get("ariaLabel");if(s){const i=ce(t,s);e.setAttribute("aria-label",i)}else e.removeAttribute("aria-label");const a=t.get("ariaLive");a?e.setAttribute("aria-live",a):e.removeAttribute("aria-live");const n=t.get("ariaChecked");null!=n&&i&&-1!==["checkbox","option","radio","menuitemcheckbox","menuitemradio","treeitem"].indexOf(i)?e.setAttribute("aria-checked",n?"true":"false"):e.removeAttribute("aria-checked");const o=t.get("ariaCurrent");null!=o?e.setAttribute("aria-current",o):e.removeAttribute("aria-current");const r=t.get("ariaSelected");null!=r&&i&&-1!==["gridcell","option","row","tab","columnheader","rowheader","treeitem"].indexOf(i)?e.setAttribute("aria-selected",r?"true":"false"):e.removeAttribute("aria-selected"),t.get("ariaHidden")?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden");const l=t.get("ariaOrientation");l?e.setAttribute("aria-orientation",l):e.removeAttribute("aria-orientation");const h=t.get("ariaValueNow");h?e.setAttribute("aria-valuenow",h):e.removeAttribute("aria-valuenow");const c=t.get("ariaValueMin");c?e.setAttribute("aria-valuemin",c):e.removeAttribute("aria-valuemin");const d=t.get("ariaValueMax");d?e.setAttribute("aria-valuemax",d):e.removeAttribute("aria-valuemax");const u=t.get("ariaValueText");u?e.setAttribute("aria-valuetext",u):e.removeAttribute("aria-valuetext");const p=t.get("ariaControls");p?e.setAttribute("aria-controls",p):e.removeAttribute("aria-controls"),t.get("visible")&&0!==t.get("opacity")&&"tooltip"!=t.get("role")&&!t.isHidden()&&!1!==t.getPrivate("focusable")&&(t.height()||t.width())?("-1"!=e.getAttribute("tabindex")&&e.setAttribute("tabindex",""+this.tabindex),e.removeAttribute("aria-hidden")):(e.removeAttribute("tabindex"),e.setAttribute("aria-hidden","true"))}_makeFocusElement(t,e){if(e.getPrivate("focusElement")||1==this._a11yD)return;const i=document.createElement("div");"tooltip"!=e.get("role")&&(i.tabIndex=this.tabindex),i.style.position="absolute",Ft.Dt(i,!1);const s=[];e.setPrivate("focusElement",{dom:i,disposers:s}),this._decorateFocusElement(e),s.push(Ft.q2(i,"focus",t=>{this._handleFocus(t)})),s.push(Ft.q2(i,"blur",t=>{this._handleBlur(t)})),this._moveFocusElement(t,e)}_removeFocusElement(t){if(1==this._a11yD)return;et.TF(this._tabindexes,t);const e=t.getPrivate("focusElement");if(e){const t=this._focusElementContainer;t.removeChild(e.dom),et.__(e.disposers,t=>{t.dispose()})}}_hideFocusElement(t){if(1==this._a11yD)return;const e=t.getPrivate("focusElement");e.dom.style.display="none"}_moveFocusElement(t,e){if(1==this._a11yD)return;const i=this._focusElementContainer,s=e.getPrivate("focusElement").dom;if(s===this._focusElementContainer.children[t])return;const a=this._focusElementContainer.children[t+1];a?i.insertBefore(s,a):i.append(s)}_positionFocusElement(t){if(1==this._a11yD||void 0==t)return;this._focusElementContainer.scrollTop=0;const e=t.globalBounds();let i=e.right==e.left?t.width():e.right-e.left,s=e.top==e.bottom?t.height():e.bottom-e.top;const a=void 0!==this._settings.focusPadding?this._settings.focusPadding:2;let n=e.left-a,o=e.top-a;i<0&&(n+=i,i=Math.abs(i)),s<0&&(o+=s,s=Math.abs(s));const r=t.getPrivate("focusElement").dom;r.style.top=o+"px",r.style.left=n+"px",r.style.width=i+2*a+"px",r.style.height=s+2*a+"px"}_getSpriteByFocusElement(t){let e;return et.FY(this._tabindexes,(i,s)=>i.getPrivate("focusElement").dom!==t||(e=i,!1)),e}_handleFocus(t){if(1==this._a11yD)return;const e=this._getSpriteByFocusElement(t.target);e&&(e.isVisibleDeep()?(this._positionFocusElement(e),this._focusedSprite=e,e.events.isEnabled("focus")&&e.events.dispatch("focus",{type:"focus",originalEvent:t,target:e}),-1==e.getPrivate("focusElement").dom.tabIndex&&(this._skipNextGroupJump=!1)):this._focusNext(t.target,this._isShift?-1:1))}_focusNext(t,e,i){if(1==this._a11yD)return;const s=Array.from(document.querySelectorAll(["a[href]","area[href]","button:not([disabled])","details","input:not([disabled])","iframe:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[contentEditable=""]','[contentEditable="true"]','[contentEditable="TRUE"]','[tabindex]:not
1([tabindex^="-"])'].join(",")));let a=s.indexOf(t)+e;a<0?a=s.length-1:a>=s.length&&(a=0);const n=s[a];if(i&&-1==e){const t=this._getSpriteByFocusElement(n);if(t&&t.get("focusableGroup")==i)return void this._focusNext(n,e)}n.focus()}_handleBlur(t){if(1==this._a11yD)return;const e=this._focusedSprite;e&&!e.isDisposed()&&e.events.isEnabled("blur")&&e.events.dispatch("blur",{type:"blur",originalEvent:t,target:e}),this._focusedSprite=void 0}updateTooltip(t){if(1==this._a11yD)return;const e=Ft.Kq(t._getText());let i=t.getPrivate("tooltipElement");"tooltip"==t.get("role")&&""!=e?(i||(i=this._makeTooltipElement(t)),i.innerHTML!=e&&(i.innerHTML=e),i.setAttribute("aria-hidden",t.isVisibleDeep()?"false":"true")):i&&(i.remove(),t.removePrivate("tooltipElement"))}_makeTooltipElement(t){const e=this._tooltipElementContainer,i=document.createElement("div");return i.style.position="absolute",i.style.width="1px",i.style.height="1px",i.style.overflow="hidden",i.style.clip="rect(1px, 1px, 1px, 1px)",Ft.Dt(i,!1),this._decorateFocusElement(t,i),e.append(i),t.setPrivate("tooltipElement",i),i}_removeTooltipElement(t){if(1==this._a11yD)return;const e=t.getPrivate("tooltipElement");if(e){const t=e.parentElement;t&&t.removeChild(e)}}_invalidateAccessibility(t){if(1==this._a11yD)return;this._focusElementDirty=!0;const e=t.getPrivate("focusElement");t.get("focusable")?e&&(this._decorateFocusElement(t),this._positionFocusElement(t)):e&&this._removeFocusElement(t)}focused(t){return this._focusedSprite===t}documentPointToRoot(t){const e=this._getRealSize(),i=this._getCalculatedSize(e),s=i.width/e.width,a=i.height/e.height;return{x:(t.x-e.left)*s,y:(t.y-e.top)*a}}rootPointToDocument(t){const e=this._getRealSize(),i=this._getCalculatedSize(e),s=i.width/e.width,a=i.height/e.height;return{x:t.x/s+e.left,y:t.y/a+e.top}}addDisposer(t){return this._disposers.push(t),t}_updateComputedStyles(){const t=window.getComputedStyle(this.dom),e=this._fontHash,i=dt.HP(t).flatMap(e=>{var i;return"string"===typeof e&&e.startsWith("font")?[null===(i=t[e])||void 0===i?void 0:i.toString()]:[]});if(e.length!==i.length)return this._fontHash=i,!0;for(let s=0;s<e.length;s++)if(e[s]!==i[s])return this._fontHash=i,!0;return!1}_checkComputedStyles(){this._updateComputedStyles()&&this._invalidateLabelBounds(this.container)}_invalidateLabelBounds(t){t instanceof ge?t.children.each(t=>{this._invalidateLabelBounds(t)}):t instanceof me&&t.markDirtyBounds()}_hasLicense(){for(let t=0;t<bt.licenses.length;t++)if(bt.licenses[t].match(/^AM5C.{5,}/i))return!0;return!1}_licenseApplied(){this._logo&&this._logo.set("forceHidden",!0)}get debugGhostView(){return this._renderer.debugGhostView}set debugGhostView(t){this._renderer.debugGhostView=t}set tapToActivate(t){this._renderer.tapToActivate=t}get tapToActivate(){return this._renderer.tapToActivate}set tapToActivateTimeout(t){this._renderer.tapToActivateTimeout=t}get tapToActivateTimeout(){return this._renderer.tapToActivateTimeout}_makeHTMLElement(t){const e=this._htmlElementContainer,i=document.createElement("div");t.setPrivate("htmlElement",i);let s,a,n=!1;return t._walkParents(t=>{if(t.get("verticalScrollbar"))return n=!0,s=t,!1}),n&&(a=document.createElement("div"),t.setPrivate("htmlElementWrapper",a),t.setPrivate("wrapperContainer",s),a.style.position="absolute",a.style.overflow="hidden",a.style.boxSizing="border-box",a.style.top="0px",a.style.left="0px",a.style.width="100%",a.style.height="100%",s.events.on("boundschanged",()=>{this._positionHTMLElement(t)})),i.style.position="absolute",i.style.overflow="auto",i.style.boxSizing="border-box",Ft.Dt(i,t.get("interactive",!1)),t.events.isEnabled("click")&&(Ft.Dt(i,!0),this._disposers.push(Ft.q2(i,"click",e=>{const i=this._renderer.getEvent(e);t.events.dispatch("click",{type:"click",originalEvent:i.event,point:i.point,simulated:!1,target:t})}))),this._positionHTMLElement(t),n?(a.append(i),e.append(a)):e.append(i),et.JJ(this._htmlEnabledContainers,t),i}_positionHTMLElements(){et.__(this._htmlEnabledContainers,t=>{this._positionHTMLElement(t)})}_positionHTMLElement(t){const e=t.getPrivate("htmlElementWrapper");if(e){const i=t.getPrivate("wrapperContainer");if(i){const t=i.globalBounds();e.style.clipPath="rect("+t.top+"px "+t.right+"px "+t.bottom+"px "+t.left+"px)"}}const i=t.getPrivate("htmlElement");
1if(i){const e=["paddingTop","paddingRight","paddingBottom","paddingLeft","minWidth","minHeight","maxWidth","maxHeight"];et.__(e,e=>{const s=t.get(e);i.style[e]=s?s+"px":""});const s=["fontFamily","fontSize","fontStyle","fontWeight","fontStyle","fontVariant","textDecoration"];et.__(s,e=>{const s=t.get(e);s?"fontSize"!=e||it.Kg(s)?i.style[e]=s+"":i.style[e]=s+"px":i.style[e]=""});const a=t.compositeScale()||1,n=t.compositeRotation()||0;i.style.transform="",i.style.transformOrigin="";const o=t.compositeOpacity();setTimeout(()=>{i.style.opacity=o+""},10);const r=t.isVisibleDeep();r&&(i.style.display="block");let l={x:t.x()+t.get("dx",0),y:t.y()+t.get("dy",0)};t.parent&&(l=t.parent.toGlobal(l)),i.style.top=l.y+"px",i.style.left=l.x+"px";const h=t.get("width"),c=t.get("height");let d=0,u=0;if(h&&(d=t.width()),c&&(u=t.height()),!h||!c){i.style.position="fixed",i.style.width="",i.style.height="";const e=i.getBoundingClientRect();i.style.position="absolute",h||(d=e.width),c||(u=e.height);let s=d/a,n=u/a,o=t.get("centerX",0),r=t.get("centerY",0),l=0,p=0,g=0,m=0;o instanceof ht.QE?(l=-o.value*s,p=(1-o.value)*s):(l=-o,p=s-o),r instanceof ht.QE?(g=-r.value*n,m=(1-r.value)*n):(g=-r,m=n-r),t._localBounds={left:l,right:p,top:g,bottom:m};let _=t._adjustedLocalBounds,v=t._display.getAdjustedBounds(t._localBounds);t._adjustedLocalBounds=v,_.left===v.left&&_.right===v.right&&_.top===v.top&&_.bottom===v.bottom||t.markDirtyBounds()}d>0&&(i.style.minWidth=d+"px"),u>0&&(i.style.minHeight=u+"px"),r&&0!=o||(i.style.display="none");const p=t.get("centerX",0),g=(0,ht._3)(p)?p.percent+"%":p+"px",m=t.get("centerY",0),_=(0,ht._3)(m)?m.percent+"%":m+"px";(p||m)&&(i.style.transform="translate(-"+g+", -"+_+")"+i.style.transform),1!=a&&(i.style.transform+="scale("+a+")"),0!=n&&(i.style.transform+=" rotate("+n+"deg)"),""!=i.style.transform&&(i.style.transformOrigin=g+" "+_)}}_setHTMLContent(t,e){let i=t.getPrivate("htmlElement");i||(i=this._makeHTMLElement(t),this.autoResize||this.resize()),i.innerHTML!=e&&(i.innerHTML=e)}_removeHTMLContent(t){const e=t.getPrivate("htmlElementWrapper"),i=t.getPrivate("htmlElement");e?(this._htmlElementContainer.removeChild(e),t.removePrivate("htmlElement"),t.removePrivate("htmlElementWrapper"),t.removePrivate("wrapperContainer")):i&&(this._htmlElementContainer.removeChild(i),t.removePrivate("htmlElement"),t.removePrivate("wrapperContainer")),et.TF(this._htmlEnabledContainers,t)}}class Oi extends ie{_beforeChanged(){super._beforeChanged(),(this.isDirty("cornerRadiusTL")||this.isDirty("cornerRadiusTR")||this.isDirty("cornerRadiusBR")||this.isDirty("cornerRadiusBL"))&&(this._clear=!0)}_draw(){let t=this.width(),e=this.height(),i=t/Math.abs(t),s=e/Math.abs(e),a=0,n=0;const o=this.get("strokeWidth",0);this.get("containStroke",!1)&&(t-=i*o,e-=s*o,a+=i*o/2,n+=s*o/2);let r=t,l=e;if(it.Et(r)&&it.Et(l)){let t=Math.min(r,l)/2,e=Ft.JY(this.get("cornerRadiusTL",8),t),o=Ft.JY(this.get("cornerRadiusTR",8),t),h=Ft.JY(this.get("cornerRadiusBR",8),t),c=Ft.JY(this.get("cornerRadiusBL",8),t),d=Math.min(Math.abs(r/2),Math.abs(l/2));e=Ut(e,0,d),o=Ut(o,0,d),h=Ut(h,0,d),c=Ut(c,0,d);const u=this._display;u.moveTo(a+e*i,n),u.lineTo(a+r-o*i,n),o>0&&u.arcTo(a+r,n,a+r,n+o*s,o),u.lineTo(a+r,n+l-h*s),h>0&&u.arcTo(a+r,n+l,a+r-h*i,n+l,h),u.lineTo(a+c*i,n+l),c>0&&u.arcTo(a,n+l,a,n+l-c*s,c),u.lineTo(a,n+e*s),e>0&&u.arcTo(a,n,a+e*i,n,e),u.closePath()}}}Oi.className="RoundedRectangle",Oi.classNames=ie.classNames.concat([Oi.className]);class Ni extends ge{_afterNew(){this._settings.themeTags=Ft.kE(this._settings.themeTags,["button"]),super._afterNew(),this._settings.background||this.set("background",Oi.new(this._root,{themeTags:Ft.kE(this._settings.themeTags,["background"])})),this.setPrivate("trustBounds",!0)}_prepareChildren(){if(super._prepareChildren(),this.isDirty("icon")){const t=this._prevSettings.icon,e=this.get("icon");e!==t&&(this._disposeProperty("icon"),t&&t.dispose(),e&&this.children.push(e),this._prevSettings.icon=e)}if(this.isDirty("label")){const t=this._prevSettings.label,e=this.get("label");e!==t&&(this._disposeProperty("label"),t&&t.dispose(),e&&this.children.push(e),this._prevSettings.label=e)}}}
1Ni.className="Button",Ni.classNames=ge.classNames.concat([Ni.className]);class zi extends ge{constructor(){super(...arguments),this.thumb=this._makeThumb(),this.startGrip=this._makeButton(),this.endGrip=this._makeButton(),this._thumbBusy=!1,this._startDown=!1,this._endDown=!1,this._thumbDown=!1}_addOrientationClass(){this._settings.themeTags=Ft.kE(this._settings.themeTags,["scrollbar",this._settings.orientation]),this._settings.background||(this._settings.background=Oi.new(this._root,{themeTags:Ft.kE(this._settings.themeTags,["main","background"])}))}_makeButton(){return this.children.push(Ni.new(this._root,{themeTags:["resize","button",this.get("orientation")],icon:ee.new(this._root,{themeTags:["icon"]})}))}_makeThumb(){return this.children.push(Oi.new(this._root,{themeTags:["thumb",this.get("orientation")]}))}_handleAnimation(t){t&&this._disposers.push(t.events.on("stopped",()=>{this.setPrivateRaw("isBusy",!1),this._thumbBusy=!1}))}_afterNew(){this._addOrientationClass(),super._afterNew();const t=this.startGrip,e=this.endGrip,i=this.thumb,s=this.get("background");s&&this._disposers.push(s.events.on("click",t=>{this.setPrivateRaw("isBusy",!0);const e=this._display.toLocal(t.point),s=this.width(),a=this.height(),n=this.get("orientation");let o,r,l;o="vertical"==n?(e.y-i.height()/2)/a:(e.x-i.width()/2)/s,"vertical"==n?(r=o*a,l="y"):(r=o*s,l="x");const h=this.get("animationDuration",0);h>0?(this._thumbBusy=!0,this._handleAnimation(this.thumb.animate({key:l,to:r,duration:h,easing:this.get("animationEasing")}))):(this.thumb.set(l,r),this._root.events.once("frameended",()=>{this.setPrivateRaw("isBusy",!1)}))})),this._disposers.push(i.events.on("dblclick",t=>{if(!Ft.ay(t.originalEvent,this))return;const e=this.get("animationDuration",0),i=this.get("animationEasing");this.animate({key:"start",to:0,duration:e,easing:i}),this.animate({key:"end",to:1,duration:e,easing:i})})),this._disposers.push(t.events.on("pointerdown",()=>{this.setPrivateRaw("isBusy",!0),this._startDown=!0,this._gripDown="start"})),this._disposers.push(e.events.on("pointerdown",()=>{this.setPrivateRaw("isBusy",!0),this._endDown=!0,this._gripDown="end"})),this._disposers.push(i.events.on("pointerdown",()=>{this.setPrivateRaw("isBusy",!0),this._thumbDown=!0,this._gripDown=void 0})),this._disposers.push(t.events.on("globalpointerup",()=>{this._startDown&&(this.setPrivateRaw("isBusy",!1),this._released()),this._startDown=!1})),this._disposers.push(e.events.on("globalpointerup",()=>{this._endDown&&(this.setPrivateRaw("isBusy",!1),this._released()),this._endDown=!1})),this._disposers.push(i.events.on("globalpointerup",()=>{this._thumbDown&&(this.setPrivateRaw("isBusy",!1),this._released()),this._thumbDown=!1})),this._disposers.push(t.on("x",()=>{this._updateThumb()})),this._disposers.push(e.on("x",()=>{this._updateThumb()})),this._disposers.push(t.on("y",()=>{this._updateThumb()})),this._disposers.push(e.on("y",()=>{this._updateThumb()})),this._disposers.push(i.events.on("positionchanged",()=>{this._updateGripsByThumb()})),"vertical"==this.get("orientation")?(t.set("x",0),e.set("x",0),this._disposers.push(i.adapters.add("y",t=>Math.max(Math.min(Number(t),this.height()-i.height()),0))),this._disposers.push(i.adapters.add("x",t=>this.width()/2)),this._disposers.push(t.adapters.add("x",t=>this.width()/2)),this._disposers.push(e.adapters.add("x",t=>this.width()/2)),this._disposers.push(t.adapters.add("y",t=>Math.max(Math.min(Number(t),this.height()),0))),this._disposers.push(e.adapters.add("y",t=>Math.max(Math.min(Number(t),this.height()),0)))):(t.set("y",0),e.set("y",0),this._disposers.push(i.adapters.add("x",t=>Math.max(Math.min(Number(t),this.width()-i.width()),0))),this._disposers.push(i.adapters.add("y",t=>this.height()/2)),this._disposers.push(t.adapters.add("y",t=>this.height()/2)),this._disposers.push(e.adapters.add("y",t=>this.height()/2)),this._disposers.push(t.adapters.add("x",t=>Math.max(Math.min(Number(t),this.width()),0))),this._disposers.push(e.adapters.add("x",t=>Math.max(Math.min(Number(t),this.width()),0))))}_updateChildren(){super._updateChildren(),(this.isDirty("end")||this.isDirty("start")||this._sizeDirty)&&this.updateGrips()}_changed(){if(super._changed(),this.isDirty("start")||this.isDirty("end")){const t="rangechanged";this.events.isEnabled(t)&&this.events.dispatch(t,{type:t,target:this,start:this.get("start",0),end:this.get("end",1),grip:this._grip
1Down})}}_released(){const t="released";this.events.isEnabled(t)&&this.events.dispatch(t,{type:t,target:this})}updateGrips(){const t=this.startGrip,e=this.endGrip,i=this.get("orientation"),s=this.height(),a=this.width();"vertical"==i?(t.set("y",s*this.get("start",0)),e.set("y",s*this.get("end",1))):(t.set("x",a*this.get("start",0)),e.set("x",a*this.get("end",1)));const n=this.getPrivate("positionTextFunction"),o=Math.round(100*this.get("start",0)),r=Math.round(100*this.get("end",0));let l,h;n?(l=n.call(this,this.get("start",0)),h=n.call(this,this.get("end",0))):(l=o+"%",h=r+"%"),t.set("ariaLabel",this._t("From %1",void 0,l)),t.set("ariaValueNow",""+o),t.set("ariaValueText",o+"%"),t.set("ariaValueMin","0"),t.set("ariaValueMax","100"),e.set("ariaLabel",this._t("To %1",void 0,h)),e.set("ariaValueNow",""+r),e.set("ariaValueText",r+"%"),e.set("ariaValueMin","0"),e.set("ariaValueMax","100")}_updateThumb(){const t=this.thumb,e=this.startGrip,i=this.endGrip,s=this.height(),a=this.width();let n=e.x(),o=i.x(),r=e.y(),l=i.y(),h=0,c=1;"vertical"==this.get("orientation")?it.Et(r)&&it.Et(l)&&(this._thumbBusy||t.isDragging()||(t.set("height",l-r),t.set("y",r)),h=r/s,c=l/s):it.Et(n)&&it.Et(o)&&(this._thumbBusy||t.isDragging()||(t.set("width",o-n),t.set("x",n)),h=n/a,c=o/a),!this.getPrivate("isBusy")||this.get("start")==h&&this.get("end")==c||(this.set("start",h),this.set("end",c));const d=this.getPrivate("positionTextFunction"),u=Math.round(100*this.get("start",0)),p=Math.round(100*this.get("end",0));let g,m;d?(g=d.call(this,this.get("start",0)),m=d.call(this,this.get("end",0))):(g=u+"%",m=p+"%"),t.set("ariaLabel",this._t("From %1 to %2",void 0,g,m)),t.set("ariaValueNow",""+u),t.set("ariaValueText",u+"%")}_updateGripsByThumb(){const t=this.thumb,e=this.startGrip,i=this.endGrip;if("vertical"==this.get("orientation")){const s=t.height();e.set("y",t.y()),i.set("y",t.y()+s)}else{const s=t.width();e.set("x",t.x()),i.set("x",t.x()+s)}}}zi.className="Scrollbar",zi.classNames=ge.classNames.concat([zi.className]);class Yi extends ee{_afterNew(){super._afterNew(),this._display.isMeasured=!0,this.setPrivateRaw("trustBounds",!0)}_beforeChanged(){super._beforeChanged(),this.isDirty("radius")&&(this._clear=!0)}_changed(){super._changed(),this._clear&&this._display.drawCircle(0,0,Math.abs(this.get("radius",10)))}}Yi.className="Circle",Yi.classNames=ee.classNames.concat([Yi.className]);class Ui extends St{_afterNew(){super._afterNewApplyThemes()}_beforeChanged(){if(super._beforeChanged(),this.isDirty("sprite")){const t=this.get("sprite");t&&(t.setAll({position:"absolute",role:"figure"}),this._disposers.push(t))}(this.isDirty("locationX")||this.isDirty("locationY"))&&this.series&&this.series._positionBullet(this)}}Ui.className="Bullet",Ui.classNames=St.classNames.concat([Ui.className]);class Hi extends St{_afterNew(){super._afterNewApplyThemes(),this._dirty["colors"]=!1}_beforeChanged(){this.isDirty("colors")&&this.reset()}generateColors(){this.setPrivate("currentPass",this.getPrivate("currentPass",0)+1);const t=this.getPrivate("currentPass"),e=this.get("colors",[this.get("baseColor",le.Q1.fromHex(16711680))]);this.getPrivate("numColors")||this.setPrivate("numColors",e.length);const i=this.getPrivate("numColors"),s=0,a=this.get("passOptions"),n=this.get("reuse");for(let o=s;o<i;o++)if(n)e.push(e[o]);else{const i=e[o].toHSL();let s=i.h+(a.hue||0)*t;while(s>1)s-=1;let n=i.s+(a.saturation||0)*t;n>1&&(n=1),n<0&&(n=0);let r=i.l+(a.lightness||0)*t;while(r>1)r-=1;e.push(le.Q1.fromHSL(s,n,r))}}getIndex(t){const e=this.get("colors",[]),i=this.get("saturation");return t>=e.length?(this.generateColors(),this.getIndex(t)):null!=i?le.Q1.saturate(e[t],i):e[t]}next(){let t=this.getPrivate("currentStep",this.get("startIndex",0));return this.setPrivate("currentStep",t+this.get("step",1)),this.getIndex(t)}reset(){this.setPrivate("currentStep",this.get("startIndex",0)),this.setPrivate("currentPass",0)}}function Vi(t){return new Promise((e,i)=>{setTimeout(e,t)})}Hi.className="ColorSet",Hi.classNames=St.classNames.concat([Hi.className]);let Xi={millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5,month:2629742400,year:31536e6};function Gi(t){switch(t){case"year":return;case"month":return"year";case"week":return"month";case"day":return"month";case"hour":return"day";case"minute":return"hour";case"second":return"minute";case"millisecond":return"second"}}function qi(t,e){return null==e&&(e=1),Xi[t]*e}function Wi(t){return t?Xi[t.timeUnit]*t.count:0}
1function ji(t,e,i,s,a){const n=t.timeUnit,o=t.count;if("hour"==n||"minute"==n||"second"==n||"millisecond"==n)return Xi[t.timeUnit]*t.count;{const t=Ki(new Date(e.getTime()),n,o,i,s,void 0,a).getTime();let r=t+o*qi(n)*1.05;return r=Ki(new Date(r),n,1,i,s,void 0,a).getTime(),r-t}}function Qi(t,e,i,s,a){if(e-t>qi(i,1.2))return!0;let n=new Date(t),o=new Date(e);a&&(n=a.convertLocal(n),o=a.convertLocal(o));let r=0,l=0;s||"millisecond"==i||(r=n.getTimezoneOffset(),n.setUTCMinutes(n.getUTCMinutes()-r),l=o.getTimezoneOffset(),o.setUTCMinutes(o.getUTCMinutes()-l));let h=!1;switch(i){case"year":n.getUTCFullYear()!=o.getUTCFullYear()&&(h=!0);break;case"month":(n.getUTCFullYear()!=o.getUTCFullYear()||n.getUTCMonth()!=o.getUTCMonth())&&(h=!0);break;case"day":(n.getUTCMonth()!=o.getUTCMonth()||n.getUTCDate()!=o.getUTCDate())&&(h=!0);break;case"hour":n.getUTCHours()!=o.getUTCHours()&&(h=!0);break;case"minute":n.getUTCMinutes()!=o.getUTCMinutes()&&(h=!0);break;case"second":n.getUTCSeconds()!=o.getUTCSeconds()&&(h=!0);break;case"millisecond":n.getTime()!=o.getTime()&&(h=!0);break}if(h)return h;let c=Gi(i);return!!c&&Qi(t,e,c,s,a)}function Ji(t,e,i,s,a){let n;return null!=a&&(n=new Date(a)),Ki(new Date(t),e,i,s.locale.firstDayOfWeek,s.utc,n,s.timezone).getTime()}function Ki(t,e,i,s,a,n,o){if(!o||a){let o=0;switch(a||"millisecond"==e||(o=t.getTimezoneOffset(),t.setUTCMinutes(t.getUTCMinutes()-o)),e){case"day":let e=t.getUTCDate();if(i>1){if(n){n=Ki(n,"day",1);let e=t.getTime()-n.getTime(),s=Math.floor(e/qi("day")/i),a=qi("day",s*i);t.setTime(n.getTime()+a-o*qi("minute"))}}else t.setUTCDate(e);t.setUTCHours(0,0,0,0);break;case"second":let a=t.getUTCSeconds();i>1&&(a=Math.floor(a/i)*i),t.setUTCSeconds(a,0);break;case"millisecond":if(1==i)return t;let r=t.getUTCMilliseconds();r=Math.floor(r/i)*i,t.setUTCMilliseconds(r);break;case"hour":let l=t.getUTCHours();i>1&&(l=Math.floor(l/i)*i),t.setUTCHours(l,0,0,0);break;case"minute":let h=t.getUTCMinutes();i>1&&(h=Math.floor(h/i)*i),t.setUTCMinutes(h,0,0);break;case"month":let c=t.getUTCMonth();i>1&&(2!=i&&3!=i&&4!=i&&6!=i||(c=Math.floor(c/i)*i)),t.setUTCMonth(c,1),t.setUTCHours(0,0,0,0);break;case"year":let d=t.getUTCFullYear();i>1&&(d=Math.floor(d/i)*i),t.setUTCFullYear(d,0,1),t.setUTCHours(0,0,0,0);break;case"week":if(i>1&&n){n=Ki(n,"week",1);let e=t.getTime()-n.getTime(),s=Math.floor(e/qi("week")/i),a=qi("week",s*i);t.setTime(n.getTime()+a-o*qi("minute"))}let u=t.getUTCDate(),p=t.getUTCDay();it.Et(s)||(s=1),u=p>=s?u-p+s:u-(7+p)+s,t.setUTCDate(u),t.setUTCHours(0,0,0,0);break}if(!a&&"millisecond"!=e&&(t.setUTCMinutes(t.getUTCMinutes()+o),"day"==e||"week"==e||"month"==e||"year"==e)){let e=t.getTimezoneOffset();if(e!=o){let i=e-o;t.setUTCMinutes(t.getUTCMinutes()+i)}}return t}{if(isNaN(t.getTime()))return t;let r=t.getTime(),l=o.offsetUTC(t),h=t.getTimezoneOffset(),c=o.parseDate(t),d=c.year,u=c.month,p=c.day,g=c.hour,m=c.minute,_=c.second,v=c.millisecond,f=c.weekday,y=l-h;switch(e){case"day":if(i>1&&n){n=Ki(n,"day",1,s,a,void 0,o);let e=t.getTime()-n.getTime(),r=Math.floor(e/qi("day")/i),l=qi("day",r*i);t.setTime(n.getTime()+l),c=o.parseDate(t),d=c.year,u=c.month,p=c.day}g=0,m=y,_=0,v=0;break;case"second":m+=y,i>1&&(_=Math.floor(_/i)*i),v=0;break;case"millisecond":m+=y,i>1&&(v=Math.floor(v/i)*i);break;case"hour":i>1&&(g=Math.floor(g/i)*i),m=y,_=0,v=0;break;case"minute":i>1&&(m=Math.floor(m/i)*i),m+=y,_=0,v=0;break;case"month":i>1&&(u=Math.floor(u/i)*i),p=1,g=0,m=y,_=0,v=0;break;case"year":i>1&&(d=Math.floor(d/i)*i),u=0,p=1,g=0,m=y,_=0,v=0;break;case"week":it.Et(s)||(s=1),p=f>=s?p-f+s:p-(7+f)+s,g=0,m=y,_=0,v=0;break}t=new Date(d,u,p,g,m,_,v);const x=t.getTime();let b=36e5;"hour"==e&&(b=36e5*i),x+b<=r&&("hour"!=e&&"minute"!=e&&"second"!=e&&"millisecond"!=e||(t=new Date(x+b)));let w=t.getTimezoneOffset(),C=o.offsetUTC(t),k=C-w;return k!=y&&t.setTime(t.getTime()+6e4*(k-y)),t}}function $i(t,e,i,s){let a=s[t],n=Wi(a),o=s.length-1;if(t>=o)return Object.assign({},s[o]);let r=Math.ceil(e/n);return e<n&&t>0?Object.assign({},s[t-1]):r<=i?Object.assign({},s[t]):t+1<s.length?$i(t+1,e,i,s):Object.assign({},s[t])}class Zi extends Re{setupDefaultRules(){super.setupDefaultRules();const t=this._root.interfaceColors,e=this._root.language,i=this.rule.bind(this);i("XYChart").setAll({colors:Hi.new(this._root,{}),paddingLeft:20,paddingRight:20,paddingTop:16,paddingBottom:16,panX:!1,panY:!1,wheelStep:.25,arrangeTooltips:!0,pinchZoomX:!1,pinchZoomY:!1}),i("XYSeries").setAll({legendLabelText:"{name}"}),i("Rectangle",["plotbackground","xy","background"]).setAll({fill:le.Q1.fromHex(0),fillOpacity:0}),i("XYChart",["scrollbar","chart"]).setAll({paddingBottom:0,paddingLeft:0,paddingTop:0,paddingRight:0,colors:Hi.new(this._root,{saturation:0})});
vendor: 7,322 bytes, line 1
1{const e=i("Graphics",["scrollbar","overlay"]);e.setAll({fillOpacity:.5}),Le(e,"fill",t,"background")}i("RoundedRectangle",["xy","scrollbar","thumb"]).setAll({cornerRadiusTR:0,cornerRadiusTL:0,cornerRadiusBR:0,cornerRadiusBL:0,fillOpacity:0,focusable:!0}),i("RoundedRectangle",["xy","scrollbar","thumb"]).states.create("hover",{fillOpacity:.4}),i("RoundedRectangle",["xy","scrollbar","chart","background"]).setAll({cornerRadiusTL:0,cornerRadiusBL:0,cornerRadiusTR:0,cornerRadiusBR:0}),i("RoundedRectangle",["xy","scrollbar","chart","background","resize","button"]).setAll({cornerRadiusBL:40,cornerRadiusBR:40,cornerRadiusTL:40,cornerRadiusTR:40}),i("AxisRendererX",["xy","chart","scrollbar"]).setAll({strokeOpacity:0,inside:!0}),i("AxisRendererY",["xy","chart","scrollbar"]).setAll({strokeOpacity:0,inside:!0,minGridDistance:5}),i("AxisLabel",["xy","scrollbar","x"]).setAll({opacity:.5,centerY:ht.Q2,minPosition:.01,maxPosition:.99,fontSize:"0.8em"}),i("AxisLabel",["category"]).setAll({text:"{category}",populateText:!0}),i("AxisLabel",["x"]).setAll({centerY:0}),i("AxisLabel",["x","inside"]).setAll({centerY:ht.Q2}),i("AxisLabel",["x","inside","opposite"]).setAll({centerY:0}),i("AxisLabel",["x","opposite"]).setAll({centerY:ht.Q2}),i("AxisLabel",["y"]).setAll({centerX:ht.Q2}),i("AxisLabel",["y","inside"]).setAll({centerX:0}),i("AxisLabel",["y","inside","opposite"]).setAll({centerX:ht.Q2}),i("AxisLabel",["y","opposite"]).setAll({centerX:0}),i("AxisLabel",["minor"]).setAll({fontSize:"0.6em"}),i("AxisLabel",["xy","scrollbar","y"]).setAll({visible:!1}),i("Grid",["xy","scrollbar","y"]).setAll({visible:!1}),i("Grid",["xy","scrollbar","x"]).setAll({opacity:.5}),i("XYCursor").setAll({behavior:"none",layer:30,exportable:!1,snapToSeriesBy:"xy",moveThreshold:1});{const s=i("Grid",["cursor","x"]);s.setAll({forceInactive:!0,strokeOpacity:.8,strokeDasharray:[2,2],role:"slider",ariaLabel:e.translate("Use left and right arrows to move selection")}),Le(s,"stroke",t,"alternativeBackground")}{const s=i("Grid",["cursor","y"]);s.setAll({forceInactive:!0,strokeOpacity:.8,strokeDasharray:[2,2],role:"slider",ariaLabel:e.translate("Use up and down arrows to move selection")}),Le(s,"stroke",t,"alternativeBackground")}{const e=i("Graphics",["cursor","selection"]);e.setAll({fillOpacity:.15}),Le(e,"fill",t,"alternativeBackground")}i("Axis").setAll({zoomOut:!0,start:0,end:1,minZoomCount:1,maxZoomCount:1/0,maxZoomFactor:1e3,maxDeviation:.1,snapTooltip:!0,tooltipLocation:.5,panX:!0,panY:!0,zoomX:!0,zoomY:!0,fixAxisSize:!0}),i("AxisLabel").setAll({location:.5,multiLocation:0,centerX:ht.yP,centerY:ht.yP,paddingTop:3,paddingBottom:3,paddingLeft:5,paddingRight:5}),i("Container",["axis","header"]).setAll({layer:30}),i("Rectangle",["axis","header","background"]).setAll({crisp:!0});{const e=i("AxisRenderer");e.setAll({crisp:!0,strokeOpacity:0}),Le(e,"stroke",t,"grid")}i("AxisRendererX").setAll({minGridDistance:120,opposite:!1,inversed:!1,cellStartLocation:0,cellEndLocation:1,width:ht.Q2}),i("AxisRendererY").setAll({minGridDistance:40,opposite:!1,inversed:!1,cellStartLocation:0,cellEndLocation:1,height:ht.Q2});{const e=i("Rectangle",["axis","thumb","zoomgrip"]);e.setAll({fillOpacity:0}),Le(e,"fill",t,"alternativeBackground"),e.states.create("hover",{fillOpacity:.1})}i("Rectangle",["axis","thumb","x","zoomgrip"]).setAll({cursorOverStyle:"ew-resize"}),i("Rectangle",["axis","thumb","y","zoomgrip"]).setAll({cursorOverStyle:"ns-resize"});{const e=i("Grid");e.setAll({location:0,strokeOpacity:.15,crisp:!0}),Le(e,"stroke",t,"grid")}{const e=i("Grid",["minor"]);e.setAll({location:0,strokeOpacity:.07,crisp:!0}),Le(e,"stroke",t,"grid")}i("Grid",["base"]).setAll({strokeOpacity:.3});{const e=i("Graphics",["axis","fill"]);e.setAll({visible:!1,isMeasured:!1,position:"absolute",fillOpacity:.05}),Le(e,"fill",t,"alternativeBackground")}i("Graphics",["axis","fill","range"]).setAll({isMeasured:!0}),i("Graphics",["series","fill","range"]).setAll({visible:!1,isMeasured:!0}),i("Grid",["series","range"]).setAll({visible:!1}),i("AxisTick",["series","range"]).setAll({visible:!1}),i("AxisLabel",["series","range"]).setAll({visible:!1});{const e=i("AxisTick");e.setAll({location:.5,multiLocation:0,strokeOpacity:1,isMeasured:!1,position:"absolute",visible:!1}),Le(e,"stroke",t,"grid")}i("CategoryAxis").setAll({startLocation:0,endLocation:1,fillRule:(t,e)=>{const i=t.get("axisFill");i&&(it.Et(e)&&e%2!=0?i.setPrivate("visible",!1):i.setPrivate("visible",!0))}});const s=[{timeUnit:"millisecond",count:1},{timeUnit:"millisecond",count:5},{timeUnit:"millisecond",count:10},{timeUnit:"millisecond",count:50},{timeUnit:"millisecond",count:100},{timeUnit:"millisecond",count:500},{timeUnit:"second",count:1},{timeUnit:"second",count:5},{timeUnit:"second",count:10},{timeUnit:"second",count:30},{timeUnit:"minute",count:1},{timeUnit:"minute",count:5},{timeUnit:"minute",count:10},{timeUnit:"minute",count:15},{timeUnit:"minute",count:30},{timeUnit:"hour",count:1},{timeUnit:"hour",count:3},{timeUnit:"hour",count:6},{timeUnit:"hour",count:12},{timeUnit:"day",count:1},{timeUnit:"day",count:2},{timeUnit:"day",count:3},{timeUnit:"day",count:4},{timeUnit:"day",count:5},{timeUnit:"week",count:1},{timeUnit:"month",count:1},{timeUnit:"month",count:2},{timeUnit:"month",count:3},{timeUnit:"month",count:6},{timeUnit:"year",count:1},{timeUnit:"year",count:2},{timeUnit:"year",count:5},{timeUnit:"year",count:10},{timeUnit:"year",count:50},{timeUnit:"year",count:100},{timeUnit:"year",count:200},{timeUnit:"year",count:500},{timeUnit:"year",count:1e3},{timeUnit:"year",count:2e3},{timeUnit:"year",count:5e3},{timeUnit:"year",count:1e4},{timeUnit:"year",count:1e5}],a={millisecond:e.translate("_date_millisecond"),second:e.translate("_date_second"),minute:e.translate("_date_minute"),hour:e.translate("_date_hour"),day:e.translate("_date_day"),week:e.translate("_date_day"),month:e.translate("_date_month"),year:e.translate("_date_year")},n={millisecond:e.translate("_date_millisecond"),second:e.translate("_date_second"),minute:e.translate("_date_minute"),hour:e.translate("_date_day"),day:e.translate("_date_day"),week:e.translate("_date_day"),month:e.translate("_date_month")+" "+e.translate("_date_year"),year:e.translate("_date_year")},o={millisecond:e.translate("_date_millisecond_full"),second:e.translate("_date_second_full"),minute:e.translate("_date_minute_full"),hour:e.translate("_date_hour_full"),day:e.translate("_date_day_full"),week:e.translate("_date_week_full"),month:e.translate("_date_month_full"),year:e.translate("_date_year")};i("CategoryDateAxis").setAll({markUnitChange:!0,gridIntervals:et.C(s),dateFormats:dt.C(a),periodChangeDateFormats:dt.C(n)}),i("DateAxis").setAll({maxZoomFactor:null,strictMinMax:!0,startLocation:0,endLocation:1,markUnitChange:!0,groupData:!1,groupCount:500,skipFirstMinor:!0,weekLabelLocation:0,gridIntervals:et.C(s),dateFormats:dt.C(a),periodChangeDateFormats:dt.C(n),tooltipDateFormats:o,groupIntervals:[{timeUnit:"millisecond",count:1},{timeUnit:"millisecond",count:10},{timeUnit:"millisecond",count:100},{timeUnit:"second",count:1},{timeUnit:"second",count:10},{timeUnit:"minute",count:1},{timeUnit:"minute",count:10},{timeUnit:"hour",count:1},{timeUnit:"day",count:1},{timeUnit:"week",count:1},{timeUnit:"month",count:1},{timeUnit:"year",count:1}],fillRule:t=>{const e=t.get("axisFill");
1if(e){const i=t.component,s=t.get("value"),a=t.get("endValue"),n=i.intervalDuration(),o=i.getPrivate("baseInterval"),r=i.getPrivate("gridInterval",o);let l=i.getPrivate("min",0);if(l=Ki(new Date(l),r.timeUnit,r.count,this._root.locale.firstDayOfWeek,this._root.utc,void 0,this._root.timezone).getTime(),null!=s&&null!=a){const t=Math.round(Math.round((s-l)/n))/2;t==Math.round(t)?e.setPrivate("visible",!0):e.setPrivate("visible",!1)}}}}),i("GaplessDateAxis").setAll({fillRule:t=>{const e=t.get("axisFill");if(e){const i=t.get("index");let s=!1;it.Et(i)&&i%2!=0||(s=!0),e.setPrivate("visible",s)}}}),i("ValueAxis").setAll({baseValue:0,logarithmic:!1,strictMinMax:!1,autoZoom:!0,fillRule:t=>{const e=t.get("axisFill");if(e){const i=t.component,s=t.get("value"),a=i.getPrivate("step");it.Et(s)&&it.Et(a)&&(zt(s/a/2,5)==Math.round(s/a/2)?e.setPrivate("visible",!1):e.setPrivate("visible",!0))}}}),i("DurationAxis").setAll({baseUnit:"second"}),i("XYSeries").setAll({maskBullets:!0,stackToNegative:!0,locationX:.5,locationY:.5,snapTooltip:!1,openValueXGrouped:"open",openValueYGrouped:"open",valueXGrouped:"close",valueYGrouped:"close",seriesTooltipTarget:"series"}),i("BaseColumnSeries").setAll({adjustBulletPosition:!0}),i("ColumnSeries").setAll({clustered:!0}),i("RoundedRectangle",["series","column"]).setAll({position:"absolute",isMeasured:!1,width:(0,ht.KN)(70),height:(0,ht.KN)(70),strokeWidth:1,strokeOpacity:1,cornerRadiusBL:0,
1cornerRadiusTL:0,cornerRadiusBR:0,cornerRadiusTR:0,fillOpacity:1,role:"figure"}),i("LineSeries").setAll({connect:!0,autoGapCount:1.1,stackToNegative:!1}),i("Graphics",["series","stroke"]).setAll({position:"absolute",strokeWidth:1,strokeOpacity:1,isMeasured:!1}),i("Graphics",["series","fill"]).setAll({visible:!1,fillOpacity:0,position:"absolute",strokeWidth:0,strokeOpacity:0,isMeasured:!1}),i("Graphics",["line","series","legend","marker","stroke"]).setAll({draw:(t,e)=>{const i=e.parent;if(i){const e=i.height(),s=i.width();t.moveTo(0,e/2),t.lineTo(s,e/2)}}});{const e=i("Graphics",["line","series","legend","marker","stroke"]).states.create("disabled",{});Le(e,"stroke",t,"disabled")}i("Graphics",["line","series","legend","marker","fill"]).setAll({draw:(t,e)=>{const i=e.parent;if(i){const e=i.height(),s=i.width();t.moveTo(0,0),t.lineTo(s,0),t.lineTo(s,e),t.lineTo(0,e),t.lineTo(0,0)}}});{const e=i("Graphics",["line","series","legend","marker","fill"]).states.create("disabled",{});Le(e,"stroke",t,"disabled")}i("SmoothedXYLineSeries").setAll({tension:.5}),i("SmoothedXLineSeries").setAll({tension:.5}),i("SmoothedYLineSeries").setAll({tension:.5}),i("Candlestick").setAll({position:"absolute",isMeasured:!1,width:(0,ht.KN)(50),height:(0,ht.KN)(50),strokeWidth:1,strokeOpacity:1,cornerRadiusBL:0,
1cornerRadiusTL:0,cornerRadiusBR:0,cornerRadiusTR:0,fillOpacity:1,role:"figure"}),i("OHLC").setAll({width:(0,ht.KN)(80),height:(0,ht.KN)(80)}),i("CandlestickSeries").setAll({lowValueXGrouped:"low",lowValueYGrouped:"low",highValueXGrouped:"high",highValueYGrouped:"high",openValueXGrouped:"open",openValueYGrouped:"open",valueXGrouped:"close",valueYGrouped:"close"});{const e=i("Rectangle",["column","autocolor"]).states.create("riseFromOpen",{});Le(e,"fill",t,"positive"),Le(e,"stroke",t,"positive")}{const e=i("Rectangle",["column","autocolor"]).states.create("dropFromOpen",{});Le(e,"fill",t,"negative"),Le(e,"stroke",t,"negative")}i("Rectangle",["column","autocolor","pro"]).states.create("riseFromOpen",{fillOpacity:0}),i("Rectangle",["column","autocolor","pro"]).states.create("dropFromOpen",{fillOpacity:1});{const e=i("Rectangle",["column","autocolor","pro"]).states.create("riseFromPrevious",{});Le(e,"fill",t,"positive"),Le(e,"stroke",t,"positive")}{const e=i("Rectangle",["column","autocolor","pro"]).states.create("dropFromPrevious",{});Le(e,"fill",t,"negative"),Le(e,"stroke",t,"negative")}{const t=i("RoundedRectangle",["rangegrip"]);t.setAll({strokeOpacity:0,fillOpacity:0,strokeWidth:1,width:12,height:12})}{const e=i("Graphics",["rangegrip","button","icon"]);e.setAll({interactive:!1,crisp:!0,strokeOpacity:.5,draw:t=>{t.moveTo(0,.5),t.lineTo(0,12.5),t.moveTo(2,.5),t.lineTo(2,12.5),t.moveTo(4,.5),t.lineTo(4,12.5)}}),Le(e,"stroke",t,"secondaryButtonText")}i("Button",["rangegrip"]).setAll({draggable:!0,paddingTop:0,paddingBottom:0}),i("Button",["rangegrip","vertical"]).setAll({rotation:90,cursorOverStyle:"ns-resize",centerX:ht.yP}),i("Button",["rangegrip","horizontal"]).setAll({cursorOverStyle:"ew-resize",centerX:ht.yP}),i("Button",["rangegrip","vertical","left"]).setAll({centerY:ht.Q2}),i("Button",["rangegrip","vertical","right"]).setAll({centerY:0}),i("Button",["rangegrip","horizontal","top"]).setAll({centerY:0}),i("Button",["rangegrip","horizontal","bottom"]).setAll({centerY:ht.Q2})}}class ts extends ge{constructor(){super(...arguments),this.chartContainer=this.children.push(ge.new(this._root,{width:ht.Q2,height:ht.Q2,interactiveChildren:!1})),this.bulletsContainer=ge.new(this._root,{interactiveChildren:!1,isMeasured:!1,position:"absolute",width:ht.Q2,height:ht.Q2})}}ts.className="Chart",ts.classNames=ge.classNames.concat([ts.className]);class es extends ts{constructor(){super(...arguments),this.seriesContainer=ge.new(this._root,{width:ht.Q2,height:ht.Q2,isMeasured:!1}),this.series=new ot}_afterNew(){super._afterNew(),this._disposers.push(this.series);const t=this.seriesContainer.children;this._disposers.push(this.series.events.onAll(e=>{if("clear"===e.type){et.__(e.oldValues,t=>{this._removeSeries(t)});const t=this.get("colors");t&&t.reset();const i=this.get("patterns");i&&i.reset()}else if("push"===e.type)t.moveValue(e.newValue),this._processSeries(e.newValue);else if("setIndex"===e.type)t.setIndex(e.index,e.newValue),this._processSeries(e.newValue);else if("insertIndex"===e.type)t.insertIndex(e.index,e.newValue),this._processSeries(e.newValue);else if("removeIndex"===e.type)this._removeSeries(e.oldValue);else if("moveIndex"===e.type)t.moveValue(e.value,e.newIndex),this._processSeries(e.value);else{if("swap"!==e.type)throw new Error("Unknown IListEvent type");{const i=e.a,s=e.b,a=this.series.indexOf(i),n=this.series.indexOf(s);t.moveValue(i,n),t.moveValue(s,a),this.series.each(t=>{this._processSeries(t),t.markDirtyValues()})}}}))}_processSeries(t){t.chart=this,t._placeBulletsContainer(this)}_removeSeries(t){t._handleRemoved(),t.isDisposed()||(this.seriesContainer.children.removeValue(t),t._removeBulletsContainer())}}es.className="SerialChart",es.classNames=ts.classNames.concat([es.className]);class is extends es{constructor(){super(...arguments),this.xAxes=new ot,this.yAxes=new ot,this.topAxesContainer=this.chartContainer.children.push(ge.new(this._root,{width:ht.Q2,layout:this._root.verticalLayout})),this.yAxesAndPlotContainer=this.chartContainer.children.push(ge.new(this._root,{width:ht.Q2,height:ht.Q2,layout:this._root.horizontalLayout})),this.bottomAxesContainer=this.chartContainer.children.push(ge.new(this._root,{width:ht.Q2,layout:this._root.verticalLayout})),this.leftAxesContainer=this.yAxesAndPlotContainer.children.push(ge.new(this._root,{height:ht.Q2,layout:this._root.horizontalLayout})),this.plotsContainer=this.yAxesAndPlotContainer.children.push(ge.new(this._root,{width:ht.Q2,height:ht.Q2,maskContent:!1})),this.plotContainer=this.plotsContainer.children.push(ge.new(this._root,{width:ht.Q2,height:ht.Q2})),this.topPlotContainer=this.plotsContainer.children.push(ge.new(this._root,{width:ht.Q2,height:ht.Q2})),this.gridContainer=this.plotContainer.children.push(ge.new(this._root,{width:ht.Q2,height:ht.Q2,isMeasured:!1})),this.topGridContainer=ge.new(this._root,{width:ht.Q2,height:ht.Q2,isMeasured:!1}),this.rightAxesContainer=this.yAxesAndPlotContainer.children.push(ge.new(this._root,{height:ht.Q2,layout:this._root.horizontalLayout})),this.axisHeadersContainer=this.plotContainer.children.push(ge.new(this._root,{})),this.zoomOutButton=this.topPlotContainer.children.push(Ni.new(this._root,{themeTags:["zoom"],icon:ee.new(this._root,{themeTags:["button","icon"]})})),this._movePoint={x:0,y:0},this._movePoints={}}_afterNew(){this._defaultThemes.push(Zi.new(this._root)),super._afterNew(),this._disposers.push(this.xAxes),this._disposers.push(this.yAxes);const t=this._root;let e=this._root.verticalLayout;const i=this.zoomOutButton;i.events.on("click",()=>{this.zoomOut()}),i.hide(0),i.states.lookup("default").set("opacity",1),this.chartContainer.set("layout",e);const s=this.plotContainer;s.children.push(this.seriesContainer),this._disposers.push(this._processAxis(this.xAxes,this.bottomAxesContainer)),this._disposers.push(this._processAxis(this.yAxes,this.leftAxesContainer)),s.children.push(this.topGridContainer),s.children.push(this.bulletsContainer),s.set("interactive",!0),s.set("interactiveChildren",!1),s.set("background",ie.new(t,{themeTags:["plotbackground","xy","background"]}
1)),this._disposers.push(s.events.on("pointerdown",t=>{this._handlePlotDown(t)})),this._disposers.push(s.events.on("globalpointerup",t=>{this._handlePlotUp(t)})),this._disposers.push(s.events.on("globalpointermove",t=>{this._handlePlotMove(t)})),this._maskGrid(),this._setUpTouch()}_beforeChanged(){super._beforeChanged(),(this.isDirty("pinchZoomX")||this.isDirty("pinchZoomY")||this.get("panX")||this.get("panY"))&&this._setUpTouch()}_setUpTouch(){this.plotContainer._display.cancelTouch||(this.plotContainer._display.cancelTouch=!!(this.get("pinchZoomX")||this.get("pinchZoomY")||this.get("panX")||this.get("panY")))}_maskGrid(){this.gridContainer.set("maskContent",!0),this.topGridContainer.set("maskContent",!0)}_removeSeries(t){t._unstack(),t._posXDp&&t._posXDp.dispose(),t._posYDp&&t._posYDp.dispose(),t.set("baseAxis",void 0);const e=t.get("xAxis");e&&(et.TF(e.series,t),e.markDirtyExtremes());const i=t.get("yAxis");i&&(et.TF(i.series,t),i.markDirtyExtremes());const s=this.get("cursor");if(s){const e=s.get("snapToSeries");e&&et.TF(e,t)}super._removeSeries(t)}_applyThemes(t=!1){const e=this.get("colors");e&&e.reset();const i=super._applyThemes(t);return i}handleWheel(t){const e=this.get("wheelX"),i=this.get("wheelY"),s=this.plotContainer,a=t.originalEvent;let n=!1;if(!Ft.ay(a,this))return;n=!0;const o=s.toLocal(t.point),r=this.get("wheelStep",.2),l=a.deltaY/100,h=a.deltaX/100,c=this.get("wheelZoomPositionX"),d=this.get("wheelZoomPositionY");"zoomX"!==e&&"zoomXY"!==e||0==h||this.xAxes.each(t=>{if(t.get("zoomX")){let e=t.get("start"),i=t.get("end"),a=t.fixPosition(o.x/s.width());null!=c&&(a=c);let l=t.get("maxDeviation",0),d=Math.min(1+l,Math.max(-l,e-r*(i-e)*h*a)),u=Math.max(-l,Math.min(1+l,i+r*(i-e)*h*(1-a)));d==e&&u==i&&(n=!1),1/(u-d)<t.getPrivate("maxZoomFactor",1/0)/t.get("minZoomCount",1)?this._handleWheelAnimation(t.zoom(d,u)):n=!1}}),"zoomX"!==i&&"zoomXY"!==i||0==l||this.xAxes.each(t=>{if(t.get("zoomX")){let e=t.get("start"),i=t.get("end"),a=t.fixPosition(o.x/s.width());null!=c&&(a=c);let h=t.get("maxDeviation",0),d=Math.min(1+h,Math.max(-h,e-r*(i-e)*l*a)),u=Math.max(-h,Math.min(1+h,i+r*(i-e)*l*(1-a)));d==e&&u==i&&(n=!1),1/(u-d)<t.getPrivate("maxZoomFactor",1/0)/t.get("minZoomCount",1)?this._handleWheelAnimation(t.zoom(d,u)):n=!1}}),"zoomY"!==e&&"zoomXY"!==e||0==h||this.yAxes.each(t=>{if(t.get("zoomY")){let e=t.get("start"),i=t.get("end"),a=t.fixPosition(o.y/s.height());null!=d&&(a=d);let l=t.get("maxDeviation",0),c=Math.min(1+l,Math.max(-l,e-r*(i-e)*h*a)),u=Math.max(-l,Math.min(1+l,i+r*(i-e)*h*(1-a)));c==e&&u==i&&(n=!1),1/(u-c)<t.getPrivate("maxZoomFactor",1/0)/t.get("minZoomCount",1)?this._handleWheelAnimation(t.zoom(c,u)):n=!1}}),"zoomY"!==i&&"zoomXY"!==i||0==l||this.yAxes.each(t=>{if(t.get("zoomY")){let e=t.get("start"),i=t.get("end"),a=t.fixPosition(o.y/s.height());null!=d&&(a=d);let h=t.get("maxDeviation",0),c=Math.min(1+h,Math.max(-h,e-r*(i-e)*l*a)),u=Math.max(-h,Math.min(1+h,i+r*(i-e)*l*(1-a)));c==e&&u==i&&(n=!1),1/(u-c)<t.getPrivate("maxZoomFactor",1/0)/t.get("minZoomCount",1)?this._handleWheelAnimation(t.zoom(c,u)):n=!1}}),"panX"!==e&&"panXY"!==e||0==h||this.xAxes.each(t=>{if(t.get("panX")){let e=t.get("start"),i=t.get("end"),s=this._getWheelSign(t)*r*(i-e)*h,a=e+s,o=i+s,l=this._fixWheel(a,o);a=l[0],o=l[1],a==e&&o==i&&(n=!1),this._handleWheelAnimation(t.zoom(a,o))}}),"panX"!==i&&"panXY"!==i||0==l||this.xAxes.each(t=>{if(t.get("panX")){let e=t.get("start"),i=t.get("end"),s=this._getWheelSign(t)*r*(i-e)*l,a=e+s,o=i+s,h=this._fixWheel(a,o);a=h[0],o=h[1],a==e&&o==i&&(n=!1),this._handleWheelAnimation(t.zoom(a,o))}}),"panY"!==e&&"panXY"!==e||0==h||this.yAxes.each(t=>{if(t.get("panY")){let e=t.get("start"),i=t.get("end"),s=this._getWheelSign(t)*r*(i-e)*h,a=e+s,o=i+s,l=this._fixWheel(a,o);a=l[0],o=l[1],a==e&&o==i&&(n=!1),this._handleWheelAnimation(t.zoom(a,o))}}),"panY"!==i&&"panXY"!==i||0==l||this.yAxes.each(t=>{if(t.get("panY")){let e=t.get("start"),i=t.get("end"),s=this._getWheelSign(t)*r*(i-e)*l,a=e-s,o=i-s,h=this._fixWheel(a,o);a=h[0],o=h[1],a==e&&o==i&&(n=!1),this._handleWheelAnimation(t.zoom(a,o))}}),n&&a.preventDefault()}_handleSetWheel(){const t=this.get("wheelX"),e=this.get("wheelY"),i=this.plotContainer;"none"!==t||"none"!==e?(this._wheelDp=i.events.on("wheel",i=>{const s=i.originalEvent;("none"!==t&&0!=Math.abs(s.deltaX)||"none"!==e&&0!=Math.abs(s.deltaY))&&this.handleWheel(i)}),this._disposers.push(this._wheelDp)):this._wheelDp&&this._wheelDp.dispose()}_getWheelSign(t){let e=1;return t.get("renderer").get("inversed")&&(e=-1),e}_fixWheel(t,e){const i=e-t;return t<0&&(t=0,e=t+i),e>1&&(e=1,t=e-i),[t,e]}_handlePlotDown(t){const e=t.originalEvent;if(2==e.button)return;const i=this.plotContainer;let s=i.toLocal(t.point);if(this.get("pinchZoomX")||this.get("pinchZoomY")){const t=e.pointerId;if(t&&dt.HP(i._downPoints).length>0){const t=this.xAxes.getIndex(0),e=this.yAxes.getIndex(0);t&&(this._downStartX=t.get("start",0),this._downEndX=t.get("end",1)),e&&(this._downStartY=e.get("start",0),this._downEndY=e.get("end",1))}}if((this.get("panX")||this.get("panY"))&&s.x>=0&&s.y>=0&&s.x<=i.width()&&s.y<=this.height()){this._downPoint={x:e.clientX,y:e.clientY};const i=this.get("panX"),s=this.get("panY");i&&this.xAxes.each(t=>{t._panStart=t.get("start"),t._panEnd=t.get("end")}),s&&this.yAxes.each(t=>{t._panStart=t.get("start"),t._panEnd=t.get("end")});const a="panstarted";this.events.isEnabled(a)&&this.events.dispatch(a,{type:a,target:this,originalEvent:t.originalEvent})}}_handleWheelAnimation(t){t?t.events.on("stopped",()=>{this._dispatchWheelAnimation()}):this._dispatchWheelAnimation()}_dispatchWheelAnimation(){const t="wheelended";this.events.isEnabled(t)&&this.events.dispatch(t,{type:t,target:this})}_handlePlotUp(t){const e=this._downPoint;if(e&&(this.get("panX")||this.get("panY"))){if(t.originalEvent.clientX==e.x&&t.originalEvent.clientY==e.y){const e="pancancelled";this.events.isEnabled(e)&&this.events.dispatch(e,{type:e,target:this,originalEvent:t.originalEvent})}const i="panended";this.events.isEnabled(i)&&this.events.dispatch(i,{type:i,target:this,originalEvent:t.originalEvent})}this._downPoint=void 0,this.xAxes.each(t=>{t._isPanning=!1}),this.yAxes.each(t=>{t._isPanning=!1})}_handlePlotMove(t){const e=this.plotContainer;if(this.get("pinchZoomX")||this.get("pinchZoomY")){const i=t.originalEvent,s=i.pointerId;if(s&&(this._movePoints[s]=t.point,dt.HP(e._downPoints).length>1))return void this._handlePinch()}let i=this._downPoint;
1if(i){i=e.toLocal(this._root.documentPointToRoot(i));let s=e.toLocal(t.point);const a=this.get("panX"),n=this.get("panY");if(a){let t=this.get("scrollbarX");t&&t.events.disableType("rangechanged"),this.xAxes.each(t=>{if(t.get("panX")){t._isPanning=!0;let a=t._panStart,n=t._panEnd,o=n-a,r=o*(i.x-s.x)/e.width();t.get("renderer").get("inversed")&&(r*=-1);let l=a+r,h=n+r;h-l<1+2*t.get("maxDeviation",1)&&(t.set("start",l),t.set("end",h))}}),t&&t.events.enableType("rangechanged")}if(n){let t=this.get("scrollbarY");t&&t.events.disableType("rangechanged"),this.yAxes.each(t=>{if(t.get("panY")){t._isPanning=!0;let a=t._panStart,n=t._panEnd,o=n-a,r=o*(i.y-s.y)/e.height();t.get("renderer").get("inversed")&&(r*=-1);let l=a-r,h=n-r;h-l<1+2*t.get("maxDeviation",1)&&(t.set("start",l),t.set("end",h))}}),t&&t.events.enableType("rangechanged")}}}_handlePinch(){const t=this.plotContainer;let e=0,i=[],s=[];if(dt.__(t._downPoints,(t,a)=>{i[e]=a;let n=this._movePoints[t];n&&(s[e]=n),e++}),i.length>1&&s.length>1){const e=t.width(),a=t.height();let n=i[0],o=i[1],r=s[0],l=s[1];if(n&&o&&r&&l){if(r=t.toLocal(r),l=t.toLocal(l),n=t.toLocal(n),o=t.toLocal(o),this.get("pinchZoomX")){const t=this._downStartX,i=this._downEndX;if(null!=t&&null!=i){n.x>o.x&&([n,o]=[o,n],[r,l]=[l,r]);let s=t+n.x/e*(i-t),a=t+o.x/e*(i-t),h=t+r.x/e*(i-t),c=t+l.x/e*(i-t),d=Math.max(.001,a-s),u=Math.max(.001,c-h),p=d/u,g=t*p+s-h*p,m=i*p+a-c*p;this.xAxes.each(t=>{let e=t.fixPosition(g),i=t.fixPosition(m);t.zoom(e,i,0)})}}if(this.get("pinchZoomY")){const t=this._downStartY,e=this._downEndY;if(null!=t&&null!=e){n.y<o.y&&([n,o]=[o,n],[r,l]=[l,r]);let i=t+(1-n.y/a)*(e-t),s=t+(1-o.y/a)*(e-t),h=t+(1-r.y/a)*(e-t),c=t+(1-l.y/a)*(e-t),d=Math.max(.001,s-i),u=Math.max(.001,c-h),p=d/u,g=t*p+i-h*p,m=e*p+s-c*p;this.yAxes.each(t=>{let e=t.fixPosition(g),i=t.fixPosition(m);t.zoom(e,i,0)})}}}}}_handleCursorPosition(){const t=this.get("cursor");if(t){const e=t.getPrivate("point");let i=t.get("snapToSeries");if(t._downPoint&&(i=void 0),i&&e){const s=t.get("snapToSeriesBy"),a=[];et.__(i,t=>{if(!t.isHidden()&&!t.isHiding())if("x!"!=s&&"y!"!=s){const e=t.startIndex(),i=t.endIndex();for(let s=e;s<i;s++){const e=t.dataItems[s];e&&!e.isHidden()&&a.push(e)}}else{const e=t.get("tooltipDataItem");e&&a.push(e)}});let n,o=1/0;if(et.__(a,t=>{const i=t.get("point");if(i){let a=0;a="x"==s||"x!"==s?Math.abs(e.x-i.x):"y"==s||"y!"==s?Math.abs(e.y-i.y):Math.hypot(e.x-i.x,e.y-i.y),a<o&&(o=a,n=t)}}),et.__(i,t=>{const e=t.get("tooltip");e&&e._setDataItem(void 0)}),n){let e=n.component;e.showDataItemTooltip(n),e.setRaw("tooltipDataItem",n);const i=n.get("point");i&&t.handleMove(e.toGlobal({x:i.x-e.x(),y:i.y-e.y()}),!0)}}}}_updateCursor(){let t=this.get("cursor");t&&t.updateCursor()}_addCursor(t){this.plotContainer.children.push(t)}_prepareChildren(){if(super._prepareChildren(),this.series.each(t=>{this._colorize(t)}),(this.isDirty("wheelX")||this.isDirty("wheelY"))&&this._handleSetWheel(),this.isDirty("cursor")){const t=this._prevSettings.cursor,e=this.get("cursor");e!==t&&(this._disposeProperty("cursor"),t&&t.dispose(),e&&(e._setChart(this),this._addCursor(e),this._pushPropertyDisposer("cursor",e.events.on("selectended",()=>{this._handleCursorSelectEnd()}))),this._prevSettings.cursor=e)}if(this.isDirty("scrollbarX")){const t=this._prevSettings.scrollbarX,e=this.get("scrollbarX");e!==t&&(this._disposeProperty("scrollbarX"),t&&t.dispose(),e&&(e.parent||this.topAxesContainer.children.push(e),this._pushPropertyDisposer("scrollbarX",e.events.on("rangechanged",t=>{this._handleScrollbar(this.xAxes,t.start,t.end,t.grip)})),this._pushPropertyDisposer("scrollbarX",e.events.on("released",()=>{this.xAxes.each(t=>{t.get("zoomable")&&this._handleAxisSelection(t)})})),e.setPrivate("positionTextFunction",t=>{const e=this.xAxes.getIndex(0);return e&&e.getTooltipText(t,!1)||""})),this._prevSettings.scrollbarX=e)}if(this.isDirty("scrollbarY")){const t=this._prevSettings.scrollbarY,e=this.get("scrollbarY");e!==t&&(this._disposeProperty("scrollbarY"),t&&t.dispose(),e&&(e.parent||this.rightAxesContainer.children.push(e),this._pushPropertyDisposer("scrollbarY",e.events.on("rangechanged",t=>{this._handleScrollbar(this.yAxes,t.start,t.end,t.grip)})),this._pushPropertyDisposer("scrollbarY",e.events.on("released",()=>{this.yAxes.each(t=>{t.get("zoomable")&&this._handleAxisSelection(t)})})),e.setPrivate("positionTextFunction",t=>{const e=this.yAxes.getIndex(0);return e&&e.getTooltipText(t,!1)||""})),this._prevSettings.scrollbarY=e)}this._handleZoomOut()}_processSeries(t){super._processSeries(t);const e=t.get("xAxis"),i=t.get("yAxis");et.Cy(e.series,t),et.Cy(i.series,t),t._posXDp=t.addDisposer(e.events.on("positionchanged",()=>{t._fixPosition()})),t._posXDp=t.addDisposer(i.events.on("positionchanged",()=>{t._fixPosition()}
1)),t.get("baseAxis")||(i.isType("CategoryAxis")||i.isType("DateAxis")?t.set("baseAxis",i):t.set("baseAxis",e)),t.get("stacked")&&(t._markDirtyKey("stacked"),et.__(t.dataItems,t=>{t.set("stackToItemY",void 0),t.set("stackToItemX",void 0)})),t._markDirtyAxes(),i.markDirtyExtremes(),e.markDirtyExtremes(),e._seriesAdded=!0,i._seriesAdded=!0,this._colorize(t)}_colorize(t){const e=this.get("colors");if(e&&null==t.get("fill")){const i=e.next();t._setSoft("stroke",i),t._setSoft("fill",i)}const i=this.get("patterns");if(i&&null==t.get("fillPattern")){const e=i.next();t._setSoft("fillPattern",e)}}_handleCursorSelectEnd(){const t=this.get("cursor"),e=t.get("behavior"),i=t.getPrivate("downPositionX",0),s=t.getPrivate("downPositionY",0),a=Math.min(1,Math.max(0,t.getPrivate("positionX",.5))),n=Math.min(1,Math.max(0,t.getPrivate("positionY",.5)));this.xAxes.each(t=>{if("zoomX"===e||"zoomXY"===e){let e=t.toAxisPosition(i),s=t.toAxisPosition(a);t.zoom(e,s)}t.setPrivate("updateScrollbar",!0)}),this.yAxes.each(t=>{if("zoomY"===e||"zoomXY"===e){let e=t.toAxisPosition(s),i=t.toAxisPosition(n);t.zoom(e,i)}t.setPrivate("updateScrollbar",!0)})}_handleScrollbar(t,e,i,s){t.each(t=>{let a=t.fixPosition(e),n=t.fixPosition(i),o=t.zoom(a,n,void 0,s);const r="updateScrollbar";t.setPrivateRaw(r,!1),o?o.events.on("stopped",()=>{t.setPrivateRaw(r,!0)}):t.setPrivateRaw(r,!0)})}_processAxis(t,e){return t.events.onAll(t=>{if("clear"===t.type)et.__(t.oldValues,t=>{this._removeAxis(t)});else if("push"===t.type)e.children.push(t.newValue),t.newValue.processChart(this);else if("setIndex"===t.type)e.children.setIndex(t.index,t.newValue),t.newValue.processChart(this);else if("insertIndex"===t.type)e.children.insertIndex(t.index,t.newValue),t.newValue.processChart(this);else if("removeIndex"===t.type)this._removeAxis(t.oldValue);else{if("moveIndex"!==t.type)throw new Error("Unknown IListEvent type");e.children.moveValue(t.value,t.newIndex),t.value.processChart(this)}})}_removeAxis(t){if(!t.isDisposed()){const e=t.parent;e&&e.children.removeValue(t);const i=t.gridContainer,s=i.parent;s&&s.children.removeValue(i);const a=t.topGridContainer,n=a.parent;n&&n.children.removeValue(a)}}_updateChartLayout(){const t=this.leftAxesContainer.width(),e=this.rightAxesContainer.width(),i=this.bottomAxesContainer;i.set("paddingLeft",t),i.set("paddingRight",e);const s=this.topAxesContainer;s.set("paddingLeft",t),s.set("paddingRight",e)}processAxis(t){var e=this.get("cursor");e&&(this.addDisposer(t.on("start",()=>{this._updateCursor()})),this.addDisposer(t.on("end",()=>{this._updateCursor()})))}_handleAxisSelection(t,e){let i=t.fixPosition(t.get("start",0)),s=t.fixPosition(t.get("end",1));if(i>s&&([i,s]=[s,i]),-1!=this.xAxes.indexOf(t)){if(e||t.getPrivate("updateScrollbar")){let t=this.get("scrollbarX");!t||t.getPrivate("isBusy")&&!e||(t.setRaw("start",i),t.setRaw("end",s),t.updateGrips())}}else if(-1!=this.yAxes.indexOf(t)&&(e||t.getPrivate("updateScrollbar"))){let t=this.get("scrollbarY");!t||t.getPrivate("isBusy")&&!e||(t.setRaw("start",i),t.setRaw("end",s),t.updateGrips())}this._handleZoomOut()}_handleZoomOut(){let t=this.zoomOutButton;if(t&&t.parent){let e=!1;this.xAxes.each(t=>{t.get("zoomOut",!0)&&(0==zt(t.get("start",0),5)&&1==zt(t.get("end",1),5)||(e=!0))}),this.yAxes.each(t=>{t.get("zoomOut",!0)&&(0==zt(t.get("start",0),5)&&1==zt(t.get("end",1),5)||(e=!0))}),e?t.isHidden()&&t.show():t.hide()}}inPlot(t){const e=this.plotContainer,i=this.getPrivate("otherCharts",this._otherCharts),s=e.toGlobal(t);if(t.x>=-.5&&t.y>=-.5&&t.x<=e.width()+.5&&t.y<=e.height()+.5)return!0;if(i)for(let a=i.length-1;a>=0;a--){const t=i[a];if(t!=this){const e=t.plotContainer,i=this._root.rootPointToDocument(s),a=t._root.documentPointToRoot(i),n=e.toLocal(a);if(n.x>=-.1&&n.y>=-.1&&n.x<=e.width()+.1&&n.y<=e.height()+.1)return!0}}return!1}arrangeTooltips(){const t=this.plotContainer,e=t.width(),i=t.height();let s=this.height();const a=this._root.tooltipContainer.get("layerMargin");a&&a.bottom>s&&(s=a.bottom);let n=t._display.toGlobal({x:0,y:0}),o=t._display.toGlobal({x:e,y:i});const r=[];let l,h,c=0,d=1/0,u=this._movePoint,p=this.get("maxTooltipDistance"),g=this.get("maxTooltipDistanceBy","xy");it.Et(p)&&this.series.each(t=>{if(!t.isHidden()){const e=t.get("tooltip");if(e){let i=e.get("pointTo");if(i){let e=Math.hypot(u.x-i.x,u.y-i.y);
1"x"==g?e=Math.abs(u.x-i.x):"y"==g&&(e=Math.abs(u.y-i.y)),e<d&&(d=e,l=t,h=i)}}}});const m=[];if(this.series.each(t=>{const e=t.get("tooltip");if(e&&!e.get("forceHidden")){let i=!1,s=e.get("pointTo");if(s){if(p>=0){let s=e.get("pointTo");if(s&&h&&t!=l){let t=Math.hypot(h.x-s.x,h.y-s.y);"x"==g?t=Math.abs(h.x-s.x):"y"==g&&(t=Math.abs(h.y-s.y)),t>p&&(i=!0)}}else-1==p&&t!=l&&(i=!0);this.inPlot(this._tooltipToLocal(s))&&e.dataItem?i||(c+=s.y):i=!0,i||t.isHidden()||t.isHiding()?e.hide(0):(e.show(),r.push(e),m.push(t))}}}),this.setPrivate("tooltipSeries",m),this.get("arrangeTooltips")){let t=0,e=0;const a=this._root.tooltipContainer,l=r.length,h=c/l;if(h>i/2+n.y){r.sort((t,e)=>kt(e.get("pointTo").y,t.get("pointTo").y));let i=o.y;if(et.__(r,s=>{let r=s.height();e++,t+=r;let l=s.get("centerY");l instanceof ht.QE&&(r*=l.value),r+=s.get("marginBottom",0),s.set("bounds",{left:n.x,top:n.y,right:o.x,bottom:i}),s.setPrivate("customData",{left:n.x,top:n.y,right:o.x,bottom:i}),i=Math.min(i-r,s._fy-r),s.parent==a&&a.children.moveValue(s,0)}),i<0){r.reverse();let t=i;et.__(r,s=>{e++;let a=s.get("bounds");if(a){let e=a.top-i,n=a.bottom-i;e<t&&(e=t,n=e+s.height()),s.set("bounds",{left:a.left,top:e,right:a.right,bottom:n}),t=a.bottom-i+s.get("marginBottom",0)}})}}else{r.reverse(),r.sort((t,e)=>kt(t.get("pointTo").y,e.get("pointTo").y));let i=0;if(et.__(r,r=>{e++;let l=r.height();t+=l;let h=r.get("centerY");h instanceof ht.QE&&(l*=h.value),l+=r.get("marginBottom",0),r.set("bounds",{left:n.x,top:i,right:o.x,bottom:Math.max(n.y+s,i+l)}),r.parent==a&&a.children.moveValue(r,0),i=Math.max(i+l,r._fy+l)}),i>s){r.reverse();let t=s;et.__(r,a=>{e++;let n=a.get("bounds");if(n){let e=n.top-(s-i),o=n.bottom-(s-i);o>t&&(o=t,e=o-a.height()),a.set("bounds",{left:n.left,top:e,right:n.right,bottom:o}),t=o-a.height()-a.get("marginBottom",0)}})}}0==t&&e>0&&this._disposers.push(this.root.events.once("frameended",()=>{this.arrangeTooltips()}))}}_tooltipToLocal(t){return this.plotContainer.toLocal(t)}zoomOut(){this.xAxes.each(t=>{t.get("zoomOut",!0)&&(t.setPrivate("updateScrollbar",!0),t.zoom(0,1))}),this.yAxes.each(t=>{t.get("zoomOut",!0)&&(t.setPrivate("updateScrollbar",!0),t.zoom(0,1))})}_dispose(){super._dispose();const t=this.get("cursor");t&&t.dispose()}}is.className="XYChart",is.classNames=es.classNames.concat([is.className]);class ss extends nt{incrementRef(){}decrementRef(){}_onPush(t){this.processor&&this.processor.processRow(t),super._onPush(t)}_onInsertIndex(t,e){this.processor&&this.processor.processRow(e),super._onInsertIndex(t,e)}_onSetIndex(t,e,i){this.processor&&this.processor.processRow(i),super._onSetIndex(t,e,i)}}class as extends At{constructor(t,e,i){super(i),this.dataContext=e,this.component=t,this._settings.visible=!0,this._checkDirty()}markDirty(){this.component.markDirtyValues(this)}_startAnimation(){this.component._root._addAnimation(this)}_animationTime(){return this.component._root.animationTime}_dispose(){this.component&&this.component.disposeDataItem(this),super._dispose()}show(t){this.setRaw("visible",!0),this.component&&this.component.showDataItem(this,t)}hide(t){this.setRaw("visible",!1),this.component&&this.component.hideDataItem(this,t)}isHidden(){return!this.get("visible")}}class ns extends ge{constructor(){super(...arguments),this._data=new ss,this._dataItems=[],this._mainDataItems=this._dataItems,this.valueFields=[],this.fields=["id"],this._valuesDirty=!1,this._dataChanged=!1,this._dataGrouped=!1,this.inited=!1}set data(t){t.incrementRef(),this._data.decrementRef(),this._data=t}get data(){return this._data}_dispose(){super._dispose(),this._data.decrementRef()}_onDataClear(){}_afterNew(){super._afterNew(),this._data.incrementRef(),this._updateFields(),this._disposers.push(this.data.events.onAll(t=>{const e=this._mainDataItems;if(this.markDirtyValues(),this._markDirtyGroup(),this._dataChanged=!0,"clear"===t.type)et.__(e,t=>{t.dispose()}),e.length=0,this._onDataClear();else if("push"===t.type){const i=new as(this,t.newValue,this._makeDataItem(t.newValue));e.push(i),this.processDataItem(i)}else if("setIndex"===t.type){const i=e[t.index],s=this._makeDataItem(t.newValue);i.bullets&&0==i.bullets.length&&(i.bullets=void 0),dt.jO(s).forEac
1h(([t,e])=>{i.get(t)!=e&&i.animate({key:t,to:e,duration:this.get("interpolationDuration",0),easing:this.get("interpolationEasing")})}),i.dataContext=t.newValue}else if("insertIndex"===t.type){const i=new as(this,t.newValue,this._makeDataItem(t.newValue));e.splice(t.index,0,i),this.processDataItem(i)}else if("removeIndex"===t.type){const i=e[t.index];i.dispose(),e.splice(t.index,1)}else{if("moveIndex"!==t.type)throw new Error("Unknown IStreamEvent type");{const i=e[t.oldIndex];e.splice(t.oldIndex,1),e.splice(t.newIndex,0,i)}}this._afterDataChange()}))}_postUpdateData(){}updateData(t){let e=0;et.__(t,(t,i)=>{const s=this.dataItems[i];if(s){const e=s.dataContext;e&&dt.jO(t).forEach(([t,i])=>{e[t]=i});const i=this._makeDataItem(e);dt.jO(i).forEach(([t,e])=>{var i;if(s.get(t)!=e){s.set(t,e);const a=null===(i=this._valueFieldsF[t])||void 0===i?void 0:i.workingKey;a&&s.set(a,e)}})}else this.data.push(t);e=i});for(let i=this.dataItems.length-1;i>e;i--){const t=this.dataItems[i];et.TF(this.dataItems,t),t.dispose()}this._postUpdateData()}_updateFields(){this.valueFields&&(this._valueFields=[],this._valueFieldsF={},et.__(this.valueFields,t=>{const e=this.get(t+"Field");e&&(this._valueFields.push(t),this._valueFieldsF[t]={fieldKey:t+"Field",workingKey:t+"Working"})})),this.fields&&(this._fields=[],this._fieldsF={},et.__(this.fields,t=>{const e=this.get(t+"Field");e&&(this._fields.push(t),this._fieldsF[t]=t+"Field")}))}get dataItems(){return this._dataItems}processDataItem(t){}_makeDataItem(t){const e={};return this._valueFields&&et.__(this._valueFields,i=>{const s=this.get(this._valueFieldsF[i].fieldKey);e[i]=t[s],e[this._valueFieldsF[i].workingKey]=e[i]}),this._fields&&et.__(this._fields,i=>{const s=this.get(this._fieldsF[i]);e[i]=t[s]}),e}makeDataItem(t,e){let i=new as(this,e,t);return this.processDataItem(i),i}pushDataItem(t,e){const i=this.makeDataItem(t,e);return this._mainDataItems.push(i),i}disposeDataItem(t){}showDataItem(t,e){return(0,ct.sH)(this,void 0,void 0,function*(){t.set("visible",!0)})}hideDataItem(t,e){return(0,ct.sH)(this,void 0,void 0,function*(){t.set("visible",!1)})}_clearDirty(){super._clearDirty(),this._valuesDirty=!1}_afterDataChange(){}_afterChanged(){if(super._afterChanged(),this._dataChanged){const t="datavalidated";this.events.isEnabled(t)&&this.events.dispatch(t,{type:t,target:this}),this._dataChanged=!1}if(this._valuesDirty){const t="valueschanged";this.events.isEnabled(t)&&this.events.dispatch(t,{type:t,target:this})}this.inited=!0}markDirtyValues(t){this.markDirty(),this._valuesDirty=!0}_markDirtyGroup(){this._dataGrouped=!1}markDirtySize(){this._sizeDirty=!0,this.markDirty()}getDataItemById(t){return et.I6(this.dataItems,e=>e.get("id")==t)}}ns.className="Component",ns.classNames=ge.classNames.concat([ns.className]);class os extends ns{constructor(){super(...arguments),this._series=[],this._isPanning=!1,this.minorDataItems=[],this.labelsContainer=this.children.push(ge.new(this._root,{})),this.gridContainer=ge.new(this._root,{width:ht.Q2,height:ht.Q2}),this.topGridContainer=ge.new(this._root,{width:ht.Q2,height:ht.Q2}),this.bulletsContainer=this.children.push(ge.new(this._root,{isMeasured:!1,width:ht.Q2,height:ht.Q2,position:"absolute"})),this._rangesDirty=!1,this._panStart=0,this._panEnd=1,this._skipSync=!1,this.axisRanges=new nt,this._seriesAxisRanges=[],this._cursorPosition=-1,this._seriesValuesDirty=!1,this._seriesAdded=!1,this.axisHeader=this.children.push(ge.new(this._root,{themeTags:["axis","header"],position:"absolute",background:ie.new(this._root,{themeTags:["header","background"],fill:this._root.interfaceColors.get("background")})})),this._bullets={}}_dispose(){this.gridContainer.dispose(),this.topGridContainer.dispose(),this.bulletsContainer.dispose(),this.labelsContainer.dispose(),this.axisHeader.dispose(),super._dispose()}_afterNew(){super._afterNew(),this.setPrivate("updateScrollbar",!0),this._disposers.push(this.axisRanges.events.onAll(t=>{if("clear"===t.type)et.__(t.oldValues,t=>{t.dispose()});else if("push"===t.type)this._processAxisRange(t.newValue,["range"]);else if("setIndex"===t.type)this._processAxisRange(t.newValue,["range"]);else if("insertIndex"===t.type)this._processAxisRange(t.newValue,["range"]);else if("removeIndex"===t.type)this.disposeDataItem(t.oldValue);else{if("moveIndex"!==t.type)throw new Error("Unknown IStreamEvent type");this._processAxisRange(t.value,["range"])}}));const t=this.get("renderer");t&&(t.axis=this,t.processAxis()),this.children.push(t),this._createGhostLabel()}_createGhostLabel(){const t=this.get("renderer"),e=t.makeLabel(new as(this,void 0,{}),[]);e.adapters.disable("text"),e.setAll({opacity:0,tooltipText:void 0,tooltipHTML:void 0,interactive:!1}),e.events.disable(),this.ghostLabel=e}_updateFinals(t,e){}zoom(t,e,i,s){if(this.get("zoomable",!0))if(this._updateFinals(t,e),this.get("start")!==t||this.get("end")!=e){let a=this._sAnimation,n=this._eAnimation;t>e&&([t,e]=[e,t]);let o=this.get("maxDeviation",.5)*Math.min(1,e-t);t<-o&&(t=-o),e>1+o&&(e=1+o);let r=this.getPrivate("maxZoomFactor",this.get("maxZoomFactor",100)),l=r;it.Et(i)||(i=this.get("interpolationDuration",0)),s||(s="end"),1===e&&0!==t&&(s=t<this.get("start",0)?"start":"end"),0===t&&1!==e&&(s=e>this.get("end",1)?"end":"start");let h=this.get("minZoomCount",0);const c=this.dataItems;c&&c.length<h&&(h=c.length);let d=this.get("maxZoomCount",1/0);it.Et(h)&&(r=l/h);let u=1;
1if(it.Et(d)&&(u=l/d),t>e&&([t,e]=[e,t]),"start"===s?(d>0&&1/(e-t)<u&&(e=t+1/u),1/(e-t)>r&&(e=t+1/r),e>1&&e-t<1/r&&(t=e-1/r)):(d>0&&1/(e-t)<u&&(t=e-1/u),1/(e-t)>r&&(t=e-1/r),t<0&&e-t<1/r&&(e=t+1/r)),1/(e-t)>r&&(e=t+1/r),1/(e-t)>r&&(t=e-1/r),null!=d&&null!=h&&t==this.get("start")&&e==this.get("end")){const t=this.chart;t&&t._handleAxisSelection(this,!0)}if((a&&a.playing&&a.to==t||this.get("start")==t)&&(n&&n.playing&&n.to==e||this.get("end")==e))return;if(i>0){let s,a,n=this.get("interpolationEasing");if(this.get("start")!=t&&(s=this.animate({key:"start",to:t,duration:i,easing:n})),this.get("end")!=e&&(a=this.animate({key:"end",to:e,duration:i,easing:n})),this._sAnimation=s,this._eAnimation=a,s)return s;if(a)return a}else this.set("start",t),this.set("end",e),this.root.events.once("frameended",()=>{this.markDirtyKey("start")})}else this._sAnimation&&this._sAnimation.stop(),this._eAnimation&&this._eAnimation.stop()}get series(){return this._series}_processAxisRange(t,e){t.setRaw("isRange",!0),this._createAssets(t,e),this._rangesDirty=!0,this._prepareDataItem(t);const i=t.get("above"),s=this.topGridContainer,a=t.get("grid");i&&a&&s.children.moveValue(a);const n=t.get("axisFill");i&&n&&s.children.moveValue(n)}_prepareDataItem(t,e){}markDirtyExtremes(){}markDirtySelectionExtremes(){}_calculateTotals(){}_updateAxisRanges(){this._bullets={},this.axisRanges.each(t=>{this._prepareDataItem(t)}),et.__(this._seriesAxisRanges,t=>{this._prepareDataItem(t)})}_prepareChildren(){super._prepareChildren();const t=this.ghostLabel;if(t&&(this.get("fixAxisSize")?t.set("visible",!0):t.set("visible",!1)),this.isDirty("start")||this.isDirty("end")){const t=this.chart;t&&t._updateCursor();let e=this.get("start",0),i=this.get("end",1),s=this.get("maxDeviation",.5)*Math.min(1,i-e);if(e<-s){let t=e+s;e=-s,this.setRaw("start",e),this.isDirty("end")&&this.setRaw("end",i-t)}if(i>1+s){let t=i-1-s;i=1+s,this.setRaw("end",i),this.isDirty("start")&&this.setRaw("start",e-t)}}const e=this.get("renderer");if(e._start=this.get("start"),e._end=this.get("end"),e._inversed=e.get("inversed",!1),e._axisLength=e.axisLength()/(e._end-e._start),e._updateLC(),this.isDirty("tooltip")){const t=this.get("tooltip");if(t){const i=e.get("themeTags");t.addTag("axis"),t.addTag(this.className.toLowerCase()),t._applyThemes(),i&&(t.set("themeTags",Ft.kE(t.get("themeTags"),i)),t.label._applyThemes())}}}_updateTooltipBounds(){const t=this.get("tooltip");t&&this.get("renderer").updateTooltipBounds(t)}_updateBounds(){super._updateBounds(),this._updateTooltipBounds()}processChart(t){this.chart=t;const e=this.get("renderer");e.chart=t,t.gridContainer.children.push(this.gridContainer),t.topGridContainer.children.push(this.topGridContainer),t.axisHeadersContainer.children.push(this.axisHeader),this.on("start",()=>{t._handleAxisSelection(this)}),this.on("end",()=>{t._handleAxisSelection(this)}),t.plotContainer.onPrivate("width",()=>{this.markDirtySize()}),t.plotContainer.onPrivate("height",()=>{this.markDirtySize()}),t.processAxis(this)}hideDataItem(t){return this._toggleFHDataItem(t,!0),super.hideDataItem(t)}showDataItem(t){return this._toggleFHDataItem(t,!1),super.showDataItem(t)}_toggleFHDataItem(t,e){const i="forceHidden",s=t.get("label");s&&s.set(i,e);const a=t.get("grid");a&&a.set(i,e);const n=t.get("tick");n&&n.set(i,e);const o=t.get("axisFill");o&&o.set(i,e);const r=t.get("bullet");if(r){const t=r.get("sprite");t&&t.set(i,e)}}_toggleDataItem(t,e){const i=t.get("label"),s="visible";i&&i.setPrivate(s,e);const a=t.get("grid");a&&a.setPrivate(s,e);const n=t.get("tick");n&&n.setPrivate(s,e);const o=t.get("axisFill");o&&o.setPrivate(s,e);const r=t.get("bullet");if(r){const t=r.get("sprite");t&&t.setPrivate(s,e)}}_createAssets(t,e,i){var s,a,n;const o=this.get("renderer");let r="minor";const l=t.get("label");if(l){let a=l.get("themeTags"),n=!1;i?-1==(null===a||void 0===a?void 0:a.indexOf(r))&&(n=!0):-1!=(null===a||void 0===a?void 0:a.indexOf(r))&&(n=!0),n&&(null===(s=l.parent)||void 0===s||s.children.removeValue(l),o.makeLabel(t,e),l.dispose(),o.labels.removeValue(l))}else o.makeLabel(t,e);const h=t.get("grid");if(h){let s=h.get("themeTags"),n=!1;i?-1==(null===s||void 0===s?void 0:s.indexOf(r))&&(n=!0):-1!=(null===s||void 0===s?void 0:s.indexOf(r))&&(n=!0),n&&(null===(a=h.parent)||void 0===a||a.children.removeValue(h),o.makeGrid(t,e),h.dispose(),o.grid.removeValue(h))}else o.makeGrid(t,e);const c=t.get("tick");if(c){let s=!1,a=c.get("themeTags");i?-1==(null===a||void 0===a?void 0:a.indexOf(r))&&(s=!0):-1!=(null===a||void 0===a?void 0:a.indexOf(r))&&(s=!0),s&&(null===(n=c.parent)||void 0===n||n.children.removeValue(c),o.makeTick(t,e),c.dispose(),o.ticks.removeValue(c))}else o.makeTick(t,e);i||t.get("axisFill")?i&&!t.get("axisFill")&&this.get("minorAxisFillsEnabled")&&o.makeAxisFill(t,e):o.makeAxisFill(t,e),this._processBullet(t)}_processBullet(t){let e=t.get("bullet"),i=this.get("bullet");if(e||!i||t.get("isRange")||(e=i(this._root,this,t)),e){e.axis=this;const i=e.get("sprite");i&&(i._setDataItem(t),t.setRaw("bullet",e),i.parent||this.bulletsContainer.children.push(i))}}_afterChanged(){super._afterChanged();const t=this.chart;t&&(t._updateChartLayout(),t.axisHeadersContainer.markDirtySize()),this.get("renderer")._updatePositions(),this._seriesAdded=!1}disposeDataItem(t){super.disposeDataItem(t);const e=this.get("renderer"),i=t.get("label");i&&(e.labels.removeValue(i),i.dispose());const s=t.get("tick");
1s&&(e.ticks.removeValue(s),s.dispose());const a=t.get("grid");a&&(e.grid.removeValue(a),a.dispose());const n=t.get("axisFill");n&&(e.axisFills.removeValue(n),n.dispose());const o=t.get("bullet");o&&o.dispose()}_updateGhost(){this.setPrivate("cellWidth",this.getCellWidthPosition()*this.get("renderer").axisLength());const t=this.ghostLabel;if(t){if(!t.isHidden()){const e=t.localBounds(),i=Math.ceil(e.right-e.left);let s=t.get("text");et.__(this.dataItems,t=>{const e=t.get("label");if(e&&!e.isHidden()){const t=e.localBounds(),a=Math.ceil(t.right-t.left);a>i&&(s=e.text._getText())}}),t.set("text",s)}let e=this.get("start",0),i=this.get("end",1);this.get("renderer").updateLabel(t,e+.5*(i-e))}}_handleCursorPosition(t,e){const i=this.get("renderer");t=i.toAxisPosition(t),this._cursorPosition=t,this._snapToSeries=e,this.updateTooltip()}updateTooltip(){const t=this._snapToSeries;let e=this._cursorPosition;const i=this.get("tooltip"),s=this.get("renderer");it.Et(e)&&(et.__(this.series,i=>{if(i.get("baseAxis")===this){const s=this.getSeriesItem(i,e,this.get("tooltipLocation"));t&&-1!=t.indexOf(i)?(i.updateLegendMarker(s),i.updateLegendValue(s),i._settings.tooltipDataItem=s):(i.showDataItemTooltip(s),i.setRaw("tooltipDataItem",s))}}),this.get("snapTooltip")&&(e=this.roundAxisPosition(e,this.get("tooltipLocation",.5))),this.setPrivateRaw("tooltipPosition",e),i&&(s.updateTooltipBounds(i),it.yr(e)?i.hide(0):(this._updateTooltipText(i,e),s.positionTooltip(i,e),e<this.get("start",0)||e>this.get("end",1)?i.hide(0):i.show(0))))}_updateTooltipText(t,e){t.label.set("text",this.getTooltipText(e))}roundAxisPosition(t,e){return t}_handleSeriesRemoved(){}handleCursorShow(){let t=this.get("tooltip");t&&t.show()}handleCursorHide(){let t=this.get("tooltip");t&&t.hide()}processSeriesDataItem(t,e){}_clearDirty(){super._clearDirty(),this._sizeDirty=!1,this._rangesDirty=!1}coordinateToPosition(t){const e=this.get("renderer");return e.toAxisPosition(t/e.axisLength())}toAxisPosition(t){return this.get("renderer").toAxisPosition(t)}toGlobalPosition(t){return this.get("renderer").toGlobalPosition(t)}fixPosition(t){return this.get("renderer").fixPosition(t)}shouldGap(t,e,i,s){return!1}createAxisRange(t){return this.axisRanges.push(t)}
1_groupSeriesData(t){}getCellWidthPosition(){return.05}}os.className="Axis",os.classNames=ns.classNames.concat([os.className]);class rs extends os{constructor(){super(...arguments),this._dirtyExtremes=!1,this._dirtySelectionExtremes=!1,this._dseHandled=!1,this._deltaMinMax=1,this._baseValue=0,this._minLogAdjusted=1}markDirtyExtremes(){this._dirtyExtremes=!0,this.markDirty()}markDirtySelectionExtremes(){this._dirtySelectionExtremes=!0,this.markDirty()}_afterNew(){this._settings.themeTags=Ft.kE(this._settings.themeTags,["axis"]),this.setPrivateRaw("name","value"),this.addTag("value"),super._afterNew()}_prepareChildren(){var t;if(super._prepareChildren(),this.isDirty("syncWithAxis")){let t=this._prevSettings.syncWithAxis;t&&this._syncDp&&this._syncDp.dispose();let e=this.get("syncWithAxis");e&&(this._syncDp=new tt.ZT([e.onPrivate("selectionMinFinal",()=>{this._dirtySelectionExtremes=!0}),e.onPrivate("selectionMaxFinal",()=>{this._dirtySelectionExtremes=!0})]))}let e=!1;if((this.isDirty("min")||this.isDirty("max")||this.isDirty("maxPrecision")||this.isDirty("numberFormat"))&&(e=!0,null===(t=this.ghostLabel)||void 0===t||t.set("text","")),(this._sizeDirty||this._dirtyExtremes||this._valuesDirty||e||this.isPrivateDirty("width")||this.isPrivateDirty("height")||this.isDirty("extraMin")||this.isDirty("extraMax")||this.isDirty("logarithmic")||this.isDirty("treatZeroAs")||this.isDirty("baseValue")||this.isDirty("strictMinMax")||this.isDirty("strictMinMaxSelection"))&&(this._getMinMax(),this._dirtyExtremes=!1),this._handleSizeDirty(),this._dirtySelectionExtremes&&!this._isPanning&&this.get("autoZoom",!0)){const t=this.chart;let e=!1;if(t){const i=this.get("renderer").getPrivate("letter");"Y"==i?t.xAxes.each(t=>{"ValueAxis"!=t.className&&(e=!0)}):"X"==i&&t.yAxes.each(t=>{"ValueAxis"!=t.className&&(e=!0)})}e&&this._getSelectionMinMax(),this._dirtySelectionExtremes=!1}this._groupData(),(this._sizeDirty||this._valuesDirty||this.isDirty("start")||this.isDirty("end")||this.isPrivateDirty("min")||this.isPrivateDirty("selectionMax")||this.isPrivateDirty("selectionMin")||this.isPrivateDirty("max")||this.isPrivateDirty("step")||this.isPrivateDirty("width")||this.isPrivateDirty("height")||this.isDirty("logarithmic"))&&(this._handleRangeChange(),this._prepareAxisItems(),this._updateAxisRanges()),this._baseValue=this.baseValue()}_handleSizeDirty(){this._sizeDirty&&!this._dseHandled&&(this._dirtySelectionExtremes=!0,this._dseHandled=!0,this.getPrivate("selectionMinFinal")==this.getPrivate("selectionMin")&&this.getPrivate("selectionMaxFinal")==this.getPrivate("selectionMax")||(this._dirtySelectionExtremes=!1))}_clearDirty(){super._clearDirty(),this._dseHandled=!1}_groupData(){}_formatText(t){const e=this.get("numberFormat"),i=this.getNumberFormatter();let s="";return s=e?i.format(t,e):i.format(t,void 0,this.getPrivate("stepDecimalPlaces")),s}_prepareAxisItems(){const t=this.getPrivate("min"),e=this.getPrivate("max");if(it.Et(t)&&it.Et(e)){const e=this.get("logarithmic"),i=this.getPrivate("step"),s=this.getPrivate("selectionMin"),a=this.getPrivate("selectionMax")+i;let n=s-i,o=1,r=t;if(e){if(n=this._minLogAdjusted,n<s)while(n<s)n+=i;if(r=n,r<=0){let t=this._minRealLog;it.Et(t)||(t=1),r=Math.pow(10,Math.log(t)*Math.LOG10E),i<1&&(r=it.Et(this._minRealLog)?this._minRealLog:Math.pow(10,-50))}o=Math.log(a-i)*Math.LOG10E-Math.log(r)*Math.LOG10E,o>2&&(n=Math.pow(10,Math.log(r)*Math.LOG10E-50))}const l=this.get("renderer"),h=l.get("minorLabelsEnabled"),c=l.get("minorGridEnabled",h);let d=Math.pow(10,Math.floor(Math.log(Math.abs(i))*Math.LOG10E));const u=Math.round(i/d);let p=2;zt(u/5,10)%1==0&&(p=5),zt(u/10,10)%1==0&&(p=10);let g=i/p,m=0,_=0,v=-1/0;const f=this.get("renderer").gridCount();while(n<a){let t;this.dataItems.length<m+1?(t=new as(this,void 0,{}),this._dataItems.push(t),this.processDataItem(t)):t=this.dataItems[m],this._createAssets(t,[]),this._toggleDataItem(t,!0),t.setRaw("value",n);const s=t.get("label");s&&s.set("text",this._formatText(n)),this._prepareDataItem(t);let a=n;if(e)if(o>2){const t=Math.max(1,f),e=Math.max(1,Math.ceil(o/t)),i=Math.log(r)*Math.LOG10E+(m+1)*e-50;a=Math.pow(10,i)}else a+=i;else a+=i;if(c){let t=n+g;if(e){if(o>2){let t=this._adjustMinMax(n,a,10);g=t.step}t=n+g}while(t<a-1e-11*i){let e;this.minorDataItems.length<_+1?(e=new as(this,void 0,{}),this.minorDataItems.push(e),this.processDataItem(e)):e=this.minorDataItems[_],this._createAssets(e,["minor"],!0),this._toggleDataItem(e,!0),e.setRaw("value",t);const i=e.get("label");i&&(h?i.set("text",this._formatText(t)):i.setPrivate("visible",!1)),this._prepareDataItem(e),t+=g,_++}}if(n=a,v==n)break;let l=Math.pow(10,Math.floor(Math.log(Math.abs(i))*Math.LOG10E));if(l<1&&!e){let t=Math.round(Math.abs(Math.log(Math.abs(l))*Math.LOG10E))+2;n=zt(n,t)}m++,e&&o<=2&&n-i<i&&(n=i),v=n}for(let t=m;t<this.dataItems.length;t++)this._toggleDataItem(this.dataItems[t],!1);for(let t=_;t<this.minorDataItems.length;t++)this._toggleDataItem(this.minorDataItems[t],!1);et.__(this.series,t=>{t.inited&&t._markDirtyAxes()}),this._updateGhost()}}_prepareDataItem(t,e){let i=this.get("renderer"),s=t.get("value"),a=t.get("endValue"),n=this.valueToPosition(s),o=n,r=this.valueToPosition(s+this.getPrivate("step"));it.Et(a)&&(o=this.valueToPosition(a),r=o),t.get("isRange")&&null==a&&(r=n);let l=o,h=t.get("labelEndValue");null!=h&&(l=this.valueToPosition(h)),i.updateLabel(t.get("label"),n,l,e);const c=t.get("grid");if(i.updateGrid(c,n,o),c&&(s==this.get("baseValue",0)?(c.addTag("base"),c._applyThemes()):c.hasTag("base")&&(c.removeTag("base"),c._applyThemes())
1),i.updateTick(t.get("tick"),n,l,e),i.updateFill(t.get("axisFill"),n,r),this._processBullet(t),i.updateBullet(t.get("bullet"),n,o),!t.get("isRange")){const e=this.get("fillRule");e&&e(t)}}_handleRangeChange(){let t=this.positionToValue(this.get("start",0)),e=this.positionToValue(this.get("end",1));const i=this.get("renderer").gridCount();let s=this._adjustMinMax(t,e,i,!0),a=Ft.w1(s.step);this.setPrivateRaw("stepDecimalPlaces",a),t=zt(t,a),e=zt(e,a),s=this._adjustMinMax(t,e,i,!0);let n=s.step;t=s.min,e=s.max,this.getPrivate("selectionMin")===t&&this.getPrivate("selectionMax")===e&&this.getPrivate("step")===n||(this.setPrivateRaw("selectionMin",t),this.setPrivateRaw("selectionMax",e),this.setPrivateRaw("step",n))}positionToValue(t){const e=this.getPrivate("min"),i=this.getPrivate("max");return this.get("logarithmic")?Math.pow(Math.E,(t*(Math.log(i)*Math.LOG10E-Math.log(e)*Math.LOG10E)+Math.log(e)*Math.LOG10E)/Math.LOG10E):t*(i-e)+e}valueToPosition(t){const e=this.getPrivate("min"),i=this.getPrivate("max");if(this.get("logarithmic")){if(t<=0){let e=this.get("treatZeroAs");it.Et(e)&&(t=e)}return(Math.log(t)*Math.LOG10E-Math.log(e)*Math.LOG10E)/(Math.log(i)*Math.LOG10E-Math.log(e)*Math.LOG10E)}return(t-e)/(i-e)}valueToFinalPosition(t){const e=this.getPrivate("minFinal"),i=this.getPrivate("maxFinal");if(this.get("logarithmic")){if(t<=0){let e=this.get("treatZeroAs");it.Et(e)&&(t=e)}return(Math.log(t)*Math.LOG10E-Math.log(e)*Math.LOG10E)/(Math.log(i)*Math.LOG10E-Math.log(e)*Math.LOG10E)}return(t-e)/(i-e)}getX(t,e,i){t=i+(t-i)*e;const s=this.valueToPosition(t);return this._settings.renderer.positionToCoordinate(s)}getY(t,e,i){t=i+(t-i)*e;const s=this.valueToPosition(t);return this._settings.renderer.positionToCoordinate(s)}getDataItemCoordinateX(t,e,i,s){return this._settings.renderer.positionToCoordinate(this.getDataItemPositionX(t,e,i,s))}getDataItemPositionX(t,e,i,s){let a=t.get(e);const n=t.get("stackToItemX");if(n){const i=t.component;a=a*s+i.getStackedXValueWorking(t,e)}else a=this._baseValue+(a-this._baseValue)*s;return this.valueToPosition(a)}getDataItemCoordinateY(t,e,i,s){return this._settings.renderer.positionToCoordinate(this.getDataItemPositionY(t,e,i,s))}getDataItemPositionY(t,e,i,s){let a=t.get(e);const n=t.get("stackToItemY");if(n){const i=t.component;a=a*s+i.getStackedYValueWorking(t,e)}else a=this._baseValue+(a-this._baseValue)*s;return this.valueToPosition(a)}basePosition(){return this.valueToPosition(this.baseValue())}baseValue(){const t=Math.min(this.getPrivate("minFinal",-1/0),this.getPrivate("selectionMin",-1/0)),e=Math.max(this.getPrivate("maxFinal",1/0),this.getPrivate("selectionMax",1/0));let i=this.get("baseValue",0);return i<t&&(i=t),i>e&&(i=e),i}cellEndValue(t){return t}fixSmallStep(t){return 1+t===1?(t*=2,this.fixSmallStep(t)):t}_fixMin(t){return t}_fixMax(t){return t}_calculateTotals(){if(this.get("calculateTotals")){let t=this.series[0];if(t){let e=t.startIndex();if(t.dataItems.length>0){e>0&&e--;let i,s,a=t.endIndex();a<t.dataItems.length&&a++,t.get("yAxis")==this?(i="valueY",s="vcy"):t.get("xAxis")==this&&(i="valueX",s="vcx");let n=i+"Working";if(i){let t=this.series.length,o=[],r=[];for(let e=0;e<t;e++){let t=this.series[e];t.get("excludeFromTotal")||(o.push(t),r.push(t.get(s)))}let l=o.length,h=i+"Total",c=i+"Sum",d=i+"TotalPercent";for(let i=e;i<a;i++){let t=0,e=0;for(let s=0;s<l;s++){let a=o[s].dataItems[i];if(a){let i=a.get(n)*r[s];it.yr(i)||(t+=i,e+=Math.abs(i))}}for(let s=0;s<l;s++){let a=o[s].dataItems[i];if(a){let i=a.get(n)*r[s];it.yr(i)||(a.set(h,e),a.set(c,t),a.set(d,0==e?0:i/e*100))}}}}}}}}_getSelectionMinMax(){const t=this.getPrivate("minFinal"),e=this.getPrivate("maxFinal"),i=this.get("min"),s=this.get("max");let a=this.get("extraMin",0),n=this.get("extraMax",0);this.get("logarithmic")&&(null==this.get("extraMin")&&(a=.1),null==this.get("extraMax")&&(n=.2));const o=this.get("renderer").gridCount(),r=this.get("strictMinMaxSelection");let l=this.get("strictMinMax");if(it.Et(t)&&it.Et(e)){let h=e,c=t;if(et.__(this.series,t=>{if(!t.get("ignoreMinMax")){let e,i;const s=t.getPrivate("outOfSelection");if(t.get("xAxis")===this){if(!s){let s=t.getPrivate("minX"),a=t.getPrivate("maxX");0==t.startIndex()&&t.endIndex()==t.dataItems.length||(s=void 0,a=void 0),e=t.getPrivate("selectionMinX",s),i=t.getPrivate("selectionMaxX",a)}}else if(t.get("yAxis")===this&&!s){let s=t.getPrivate("minY"),a=t.getPrivate("maxY");0==t.startIndex()&&t.endIndex()==t.dataItems.length||(s=void 0,a=void 0),e=t.getPrivate("selectionMinY",s),i=t.getPrivate("selectionMaxY",a)}t.isHidden()||t.isShowing()||(it.Et(e)&&(h=Math.min(h,e)),it.Et(i)&&(c=Math.max(c,i)))}}),this.axisRanges.each(t=>{if(t.get("affectsMinMax")){let e=t.get("value");null!=e&&(h=Math.min(h,e),c=Math.max(c,e)),e=t.get("endValue"),null!=e&&(h=Math.min(h,e),c=Math.max(c,e))}}),h>c&&([h,c]=[c,h]),it.Et(i)?h=l?i:t:l&&it.Et(this._minReal)&&(h=this._minReal),it.Et(s)?c=l?s:e:l&&it.Et(this._maxReal)&&(c=this._maxReal),h===c){let e=h;if(h-=this._deltaMinMax,c+=this._deltaMinMax,h<t){let i=e-t;0==i&&(i=this._deltaMinMax),h=e-i,c=e+i,l=!0}let i=this._adjustMinMax(h,c,o,l);
1h=i.min,c=i.max}let d=h,u=c,p=c-h;h-=p*a,c+=p*n;let g=this._adjustMinMax(h,c,o);h=g.min,c=g.max,h=Ut(h,t,e),c=Ut(c,t,e),g=this._adjustMinMax(h,c,o,!0),l||(h=g.min,c=g.max);const m=this.get("syncWithAxis");if(m&&(g=this._syncAxes(h,c,g.step,m.getPrivate("selectionMinFinal",m.getPrivate("minFinal",0)),m.getPrivate("selectionMaxFinal",m.getPrivate("maxFinal",1)),m.getPrivate("selectionStepFinal",m.getPrivate("step",1))),h=g.min,c=g.max),l&&!m&&(it.Et(i)&&(h=Math.max(h,i)),it.Et(s)&&(c=Math.min(c,s))),r&&!m&&(h=d-(u-d)*a,c=u+(u-d)*n),l&&!m){h=it.Et(i)?i:d,c=it.Et(s)?s:u,c-h<=1e-8&&(h-=this._deltaMinMax,c+=this._deltaMinMax);let t=c-h;h-=t*a,c+=t*n}this.get("logarithmic")&&(h<=0&&(h=d*(1-Math.min(a,.99))),h<t&&(h=t),c>e&&(c=e));let _=Math.min(20,Math.ceil(Math.log(this.getPrivate("maxZoomFactor",100)+1)/Math.LN10)+2),v=zt(this.valueToFinalPosition(h),_),f=zt(this.valueToFinalPosition(c),_);this.setPrivateRaw("selectionMinFinal",h),this.setPrivateRaw("selectionMaxFinal",c),this.setPrivateRaw("selectionStepFinal",g.step),this.zoom(v,f)}}_getMinMax(){let t=this.get("min"),e=this.get("max"),i=1/0,s=-1/0,a=this.get("extraMin",0),n=this.get("extraMax",0);this.get("logarithmic")&&(this.get("strictMinMax")||(null==this.get("extraMin")&&(a=.1),null==this.get("extraMax")&&(n=.2)));let o=1/0;if(et.__(this.series,t=>{if(!t.get("ignoreMinMax")){let e,a;if(t.get("xAxis")===this?(e=t.getPrivate("minX"),a=t.getPrivate("maxX")):t.get("yAxis")===this&&(e=t.getPrivate("minY"),a=t.getPrivate("maxY")),it.Et(e)&&it.Et(a)){i=Math.min(i,e),s=Math.max(s,a);let t=a-e;t<=0&&(t=Math.abs(a/100)),t<o&&(o=t)}}}),this.axisRanges.each(t=>{if(t.get("affectsMinMax")){let e=t.get("value");null!=e&&(i=Math.min(i,e),s=Math.max(s,e)),e=t.get("endValue"),null!=e&&(i=Math.min(i,e),s=Math.max(s,e))}}),this.get("logarithmic")){let t=this.get("treatZeroAs");it.Et(t)&&i<=0&&(i=t),i<=0&&new Error("Logarithmic value axis can not have values <= 0.")}if(0===i&&0===s&&(s=.9,i=-.9),it.Et(t)&&(i=t),it.Et(e)&&(s=e),i===1/0||s===-1/0)return this.setPrivate("minFinal",void 0),void this.setPrivate("maxFinal",void 0);i>s&&([i,s]=[s,i]);const r=i,l=s;let h=this.adapters.fold("min",i),c=this.adapters.fold("max",s);this._minRealLog=i,it.Et(h)&&(i=h),it.Et(c)&&(s=c),i=this._fixMin(i),s=this._fixMax(s),s-i<=1/Math.pow(10,15)&&(s-i!==0?this._deltaMinMax=(s-i)/2:this._getDelta(s),i-=this._deltaMinMax,s+=this._deltaMinMax),i-=(s-i)*a,s+=(s-i)*n,this.get("logarithmic")&&(i<0&&r>=0&&(i=0),s>0&&l<=0&&(s=0)),this._minReal=i,this._maxReal=s;let d=this.get("strictMinMax"),u=this.get("strictMinMaxSelection",!1);u&&(d=u);let p=d;it.Et(e)&&(p=!0);let g=this.get("renderer").gridCount(),m=this._adjustMinMax(i,s,g,p);if(i=m.min,s=m.max,m=this._adjustMinMax(i,s,g,!0),i=m.min,s=m.max,d){i=it.Et(t)?t:this._minReal,s=it.Et(e)?e:this._maxReal,s-i<=1e-8&&(i-=this._deltaMinMax,s+=this._deltaMinMax);let o=s-i;i-=o*a,s+=o*n}h=this.adapters.fold("min",i),c=this.adapters.fold("max",s),it.Et(h)&&(i=h),it.Et(c)&&(s=c),o==1/0&&(o=s-i);let _=Math.round(Math.abs(Math.log(Math.abs(s-i))*Math.LOG10E))+5;i=zt(i,_),s=zt(s,_);const v=this.get("syncWithAxis");if(v&&(m=this._syncAxes(i,s,m.step,v.getPrivate("minFinal",v.getPrivate("min",0)),v.getPrivate("maxFinal",v.getPrivate("max",1)),v.getPrivate("step",1)),i=m.min,s=m.max),this.setPrivateRaw("maxZoomFactor",Math.max(1,Math.ceil((s-i)/o*this.get("maxZoomFactor",100)))),this._fixZoomFactor(),this.get("logarithmic")&&(this._minLogAdjusted=i,i=this._minReal,s=this._maxReal,i<=0&&(i=r*(1-Math.min(a,.99)))),it.Et(i)&&it.Et(s)&&(this.getPrivate("minFinal")!==i||this.getPrivate("maxFinal")!==s)){this.setPrivate("minFinal",i),this.setPrivate("maxFinal",s),this._saveMinMax(i,s);const t=this.get("interpolationDuration",0),e=this.get("interpolationEasing");this.animatePrivate({key:"min",to:i,duration:t,easing:e}),this.animatePrivate({key:"max",to:s,duration:t,easing:e})}}_fixZoomFactor(){}_getDelta(t){let e=Math.log(Math.abs(t))*Math.LOG10E,i=Math.pow(10,Math.floor(e));i/=10,this._deltaMinMax=i}_saveMinMax(t,e){}_adjustMinMax(t,e,i,s){i<=1&&(i=1),i=Math.round(i);let a=t,n=e,o=e-t;0===o&&(o=Math.abs(e));let r=Math.log(Math.abs(o))*Math.LOG10E,l=Math.pow(10,Math.floor(r));l/=10;let h=l;s&&(h=0),s?(t=Math.floor(t/l)*l,e=Math.ceil(e/l)*l):(t=Math.ceil(t/l)*l-h,e=Math.floor(e/l)*l+h),t<0&&a>=0&&(t=0),e>0&&n<=0&&(e=0),r=Math.log(Math.abs(o))*Math.LOG10E,l=Math.pow(10,Math.floor(r)),l/=100;let c=Math.ceil(o/i/l)*l,d=Math.pow(10,Math.floor(Math.log(Math.abs(c))*Math.LOG10E)),u=Math.ceil(c/d);u>5?u=10:u<=5&&u>2&&(u=5),c=Math.ceil(c/(d*u))*d*u;let p=this.get("maxPrecision");if(it.Et(p)){let t=Yt(c,p);p<Number.MAX_VALUE&&c!==t&&(c=t,0==c&&(c=1))}let g=0;d<1&&(g=Math.round(Math.abs(Math.log(Math.abs(d))*Math.LOG10E))+1,
1c=zt(c,g));let m,_=Math.floor(t/c);return t=zt(c*_,g),m=s?Math.floor(e/c):Math.ceil(e/c),m===_&&m++,e=zt(c*m,g),e<n&&(e+=c),t>a&&(t-=c),c=this.fixSmallStep(c),{min:t,max:e,step:c}}getTooltipText(t,e){const i=this.get("tooltipNumberFormat",this.get("numberFormat")),s=this.getNumberFormatter(),a=this.get("extraTooltipPrecision",0),n=this.getPrivate("stepDecimalPlaces",0)+a,o=zt(this.positionToValue(t),n);return i?s.format(o,i):s.format(o,void 0,n)}getSeriesItem(t,e){let i,s,a=this.getPrivate("name")+this.get("renderer").getPrivate("letter"),n=this.positionToValue(e);if(et.__(t.dataItems,(t,e)=>{const o=Math.abs(t.get(a)-n);(void 0===i||o<s)&&(i=e,s=o)}),null!=i)return t.dataItems[i]}zoomToValues(t,e,i){const s=this.getPrivate("minFinal",this.getPrivate("min",0)),a=this.getPrivate("maxFinal",this.getPrivate("max",1));null!=this.getPrivate("min")&&null!=this.getPrivate("max")&&this.zoom((t-s)/(a-s),(e-s)/(a-s),i)}_syncAxes(t,e,i,s,a,n){let o=this.get("syncWithAxis");if(o){let o=Math.round((a-s)/n);if(o>0)if(this.get("syncZeros")&&s<=0&&a>=0){let a=Math.round((0-s)/n),r=o-a,l=0;a>0&&t<0&&(l=Math.abs(t)/a),r>0&&e>0&&(l=Math.max(l,e/r)),0==l&&(l=(e-t)/o),i=this._niceStep(l),t=-i*a,e=i*r}else{let s=(e-t)/o;i=this._niceStep(s);let a=Math.floor(t/i)*i,n=a+i*o;n<e&&(a=Math.ceil(e/i)*i-i*o,n=a+i*o),t>=0&&a<0&&(a=0,n=i*o),e<=0&&n>0&&(n=0,a=-i*o),t=a,e=n}}return{min:t,max:e,step:i}}_niceStep(t){let e=Math.pow(10,Math.floor(Math.log(Math.abs(t))*Math.LOG10E)),i=t/e;i=i<=1?1:i<=2?2:i<=5?5:10;let s=i*e,a=this.get("maxPrecision");if(it.Et(a)){let t=Yt(s,a);a<Number.MAX_VALUE&&s!==t&&(s=t,0==s&&(s=1))}return s}getCellWidthPosition(){let t=this.getPrivate("selectionMax",this.getPrivate("max")),e=this.getPrivate("selectionMin",this.getPrivate("min"));return it.Et(t)&&it.Et(e)?this.getPrivate("step",1)/(t-e):.05}nextPosition(t){null==t&&(t=1),"Y"==this.get("renderer").getPrivate("letter")&&(t*=-1);let e=this.positionToValue(this.getPrivate("tooltipPosition",0));return e+=this.getPrivate("step",1)*t,e=Ut(e,this.getPrivate("selectionMin",0),this.getPrivate("selectionMax",1)),this.toGlobalPosition(this.valueToPosition(e))}}rs.className="ValueAxis",rs.classNames=os.classNames.concat([rs.className]);class ls extends rs{constructor(){super(...arguments),this._dataGrouped=!1,this._seriesDataGrouped=!1,this._groupingCalculated=!1,this._intervalDuration=1,this._baseDuration=1,this._intervalMax={},this._intervalMin={}}_afterNew(){this._settings.themeTags=Ft.kE(this._settings.themeTags,["axis"]),super._afterNew(),this.addTag("date"),this._setBaseInterval(this.get("baseInterval")),this.on("baseInterval",()=>{this._setBaseInterval(this.get("baseInterval"))})}_setBaseInterval(t){this.setPrivateRaw("baseInterval",t),this._baseDuration=Wi(t)}_fixZoomFactor(){const t=this.get("maxZoomFactor");null!=t&&t!=1/0?this.setPrivateRaw("maxZoomFactor",t):this.setPrivateRaw("maxZoomFactor",Math.round((this.getPrivate("max",0)-this.getPrivate("min",0))/this.baseMainDuration()))}_groupData(){const t=this.getPrivate("min"),e=this.getPrivate("max");if(it.Et(t)&&it.Et(e)){this._fixZoomFactor();const t=this.getPrivate("groupInterval");if(t?this._setBaseInterval(t):this._setBaseInterval(this.get("baseInterval")),this.isDirty("groupInterval")){let t=this.get("groupInterval");t&&(this.setRaw("groupIntervals",[t]),this._handleRangeChange())}if(this.isDirty("groupData")&&!this._dataGrouped){if(this.get("groupData"))et.__(this.series,t=>
1{this._groupSeriesData(t)}),this._handleRangeChange();else{let t=this.get("baseInterval"),e=t.timeUnit+t.count;et.__(this.series,t=>{t.setDataSet(e),t.resetGrouping()}),this._setBaseInterval(t),this.setPrivateRaw("groupInterval",void 0),this.markDirtyExtremes()}this._dataGrouped=!0}}}_groupSeriesData(t){if(this.get("groupData")&&!t.get("groupDataDisabled")){this._dataGrouped=!0,this._seriesDataGrouped=!0;let e=[],i=this.baseMainDuration(),s=this.get("groupIntervals");et.__(s,t=>{let s=Wi(t);s>i&&e.push(t)}),t._dataSets={};const a=this.getPrivate("name")+this.get("renderer").getPrivate("letter");let n;const o=t.get("baseAxis");t.get("xAxis")===o?n=t._valueYFields:t.get("yAxis")===o&&(n=t._valueXFields);let r=t._mainDataItems,l=this.get("baseInterval"),h=l.timeUnit+l.count;t._dataSets[h]=r;const c=t.get("groupDataCallback");let d=t.get("groupDataWithOriginals",!1);c&&(d=!0),et.__(e,e=>{let i,s=-1/0,o=e.timeUnit+e.count;t._dataSets[o]=[];let l={},h={},u={},p={};et.__(n,e=>{l[e]=0,h[e]=0,u[e]=t.get(e+"Grouped"),p[e]=e+"Working"});let g,m,_=qi(e.timeUnit),v=r[0];v&&(g=r[0].get(a)),et.__(r,r=>{let v,f=r.get(a),y=Ji(f,e.timeUnit,e.count,this._root,g);if(s<y-_/24)v=dt.C(r.dataContext),i=new as(t,v,t._makeDataItem(v)),i.setRaw(a,y),t._dataSets[o].push(i),et.__(n,t=>{let e=r.get(t);it.Et(e)?(i.setRaw(t,e),i.setRaw(p[t],e),h[t]=1,l[t]=e):(l[t]=0,h[t]=0)}),d&&i.set("originals",[r]),c&&m&&c(m,e),m=i;else{let t=!1;if(et.__(n,e=>{let s=u[e],a=r.get(e);if(null!=a){t=!0;let n=i.get(e);switch(s){case"close":i.setRaw(e,a);break;case"sum":i.setRaw(e,n+a);break;case"open":break;case"low":a<n&&i.setRaw(e,a);break;case"high":a>n&&i.setRaw(e,a);break;case"average":h[e]++,l[e]+=a;let t=l[e]/h[e];i.setRaw(e,t);break;case"extreme":Math.abs(a)>Math.abs(n)&&i.setRaw(e,a);break}i.setRaw(p[e],i.get(e))}}),t){let t=dt.C(r.dataContext);t[a]=y,i.dataContext=t}d&&i.get("originals").push(r)}s=y}),c&&m&&c(m,e)}),t._dataSetId&&t.setDataSet(t._dataSetId),this.markDirtySize(),this._seriesAdded&&this._root.events.once("frameended",()=>{this.markDirtySize()})}}_clearDirty(){super._clearDirty(),this._groupingCalculated=!1,this._dataGrouped=!1}getGroupInterval(t){let e=this.get("baseInterval"),i=$i(0,t,this.get("groupCount",1/0),this.get("groupIntervals"));return Wi(i)<Wi(e)&&(i=Object.assign({},e)),i}getIntervalMax(t){return this._intervalMax[t.timeUnit+t.count]}getIntervalMin(t){return this._intervalMin[t.timeUnit+t.count]}_handleRangeChange(){super._handleRangeChange();let t=Math.round(this.getPrivate("selectionMin")),e=Math.round(this.getPrivate("selectionMax"));if(it.Et(t)&&it.Et(e)){if(0==this.get("endLocation")&&(e+=1),this.get("groupData")&&!this._groupingCalculated){this._groupingCalculated=!0;let i=this.get("groupInterval"),s=this.getPrivate("groupInterval"),a=e-t+(this.get("startLocation",0)+(1-this.get("endLocation",1))*this._baseDuration);if(s){let t=Wi(s);a=Math.ceil(a/t)*t}if(i||(i=this.getGroupInterval(a)),i&&(!s||s.timeUnit!==i.timeUnit||s.count!==i.count||this._seriesDataGrouped)){this._seriesDataGrouped=!1,this.setPrivateRaw("groupInterval",i),this._setBaseInterval(i);let t=i.timeUnit+i.count;et.__(this.series,e=>{e.get("baseAxis")===this&&e.setDataSet(t)}),this.markDirtyExtremes(),this._root.events.once("frameended",()=>{this._root.events.once("frameended",()=>{const t="groupintervalchanged";this.events.isEnabled(t)&&this.events.dispatch(t,{type:t,target:this})})})}}et.__(this.series,i=>{if(i.get("baseAxis")===this){let s=this.getPrivate("name")+this.get("renderer").getPrivate("letter");const a=et.wo(i.dataItems,e=>wt(e.get(s),t));let n=a.index;n>0&&(n-=1),e+=this._baseDuration*(1-this.get("endLocation",1));const o=et.IU(i.dataItems,t=>wt(t.get(s),e));let r=o.index,l=r;l>1&&l--;const h=i.dataItems[n],c=i.dataItems[l];let d,u;h&&(u=h.get(s)),c&&(d=c.get(s));let p=!1;null!=d&&null!=u&&(d<t||u>e)&&(p=!0),i.setPrivate("outOfSelection",p),i.setPrivate("startIndex",n);let g=i._adjustStartIndex(n);i.getPrivate("adjustedStartIndex")!==g&&(i.setPrivate("adjustedStartIndex",g),this.root.events.once("frameended",()=>{i._markDirtyPrivateKey("adjustedStartIndex")})),i.setPrivate("endIndex",r)}})}}_adjustMinMax(t,e,i,s){return{min:t,max:e,step:(e-t)/i}}intervalDuration(){return this._intervalDuration}_saveMinMax(t,e){let i=this.getPrivate("groupInterval");i||(i=this.get("baseInterval"));let s=i.timeUnit+i.count;this._intervalMin[s]=t,this._intervalMax[s]=e}_getM(t){return"day"==t||"month"==t||"year"==t?1.05:1.01}_getMinorInterval(t){var e;let i,s=t.count,a=t.timeUnit;return s>1&&(10==s||15==s?s=5:12==s?s=2:6==s?s=1:30==s?s=10:s<10&&(s=1),i={timeUnit:a,count:s}),"week"==a&&(i="week"!=(null===(e=this.getPrivate("baseInterval"))||void 0===e?void 0:e.timeUnit)?{timeUnit:"day",count:1}:{timeUnit:"week",count:1}),"year"==a&&1==s&&this.getPrivate("selectionMax",0)-this.getPrivate("selectionMin",0)<1264896e5&&(i={timeUnit:"month",count:1}),i}_prepareAxisItems(){const t=this.getPrivate("min"),e=this.getPrivate("max");if(it.Et(t)&&it.Et(e)){const e=this._root,i=Math.round(this.getPrivate("selectionMin")),s=Math.round(this.getPrivate("selectionMax")),a=this.get("renderer"),n=this.getPrivate("baseInterval");let o=i,r=0;const l=this.get("gridIntervals");let h=$i(0,s-i,a.gridCount(),l);Wi(h)<this._baseDuration&&(h=Object.assign({},n));const c=Wi(h);this._intervalDuration=c;const d=Gi(h.timeUnit),u=e.utc,p=e.timezone;o=Ji(i-c,h.timeUnit,h.count,e,t);let g,m=o-c;const _=this.get("dateFormats");this.setPrivateRaw("gridInterval",h);const v=a.get("minorLabelsEnabled"),f=a.get("minorGridEnabled",v);let y,x=0;f&&(y=this._getMinorInterval(h),x=Wi(y));let b=0;while(o<s+c){let t;this.dataItems.length<r+1?(t=new as(this,void 0,{}),this._dataItems.push(t),this.processDataItem(t)):t=this.dataItems[r],this._createAssets(t,[]),this._toggleDataItem(t,!0),t.setRaw("value",o),t.setRaw("labelEndValue",void 0);let i=o+qi(h.timeUnit,h.count*this._getM(h.timeUnit));i=Ji(i,h.timeUnit,1,e),t.setRaw("endValue",i);let s=new Date(o);g=_[h.timeUnit],d&&this.get("markUnitChange")&&it.Et(m)&&"year"!=h.timeUnit&&Qi(o,m,d,u,p)&&(g=this.get("periodChangeDateFormats")[h.timeUnit]);const n=t.get("label");n&&n.set("text",e.dateFormatter.format(s,g));let l=h.count;if("week"==h.timeUnit?null===n||void 0===n||n.set("location",this.get("weekLabelLocation",0)):null===n||void 0===n||n.set("location",a.labels.template.get("location")),f){l=1;let i=h.timeUnit;"week"==i&&this.get("skipFirstMinor")&&(i="day");let s=o+qi(i,this._getM(i));s=Ji(s,i,1,e),t.setRaw("labelEndValue",s)}if(this._prepareDataItem(t,l),m=o,o=i,y){const t=y.timeUnit,i=y.count,s=this._getM(t);this.get("skipFirstMinor")||(m-=x*s);let a,n=Ji(m+x*s,t,i,e,m),r=this.get("minorDateFormats",this.get("dateFormats"));while(n<o-.01*x){let o;this.minorDataItems.length<b+1?(o=new as(this,void 0,{}),this.minorDataItems.push(o),this.processDataItem(o)):o=this.minorDataItems[b],this._createAssets(o,["minor"],!0),this._toggleDataItem(o,!0),o.setRaw("value",n);let l=n+qi(t,i*s);l=Ji(l,t,1,e),o.setRaw("endValue",l);let h=new Date(n);g=r[t];const c=o.get("label");if(c&&(v?c.set("text",e.dateFormatter.format(h,g)):c.setPrivate("visible",!1)),this._prepareDataItem(o,1),n==a)break;if(!o.get("isRange")){const t=this.get("fillRule");t&&t(o)}a=n,n=l,b++}}if(o==m)break;r++}for(let t=r;t<this.dataItems.length;t++)this._toggleDataItem(this.dataItems[t],!1);for(let t=b;t<this.minorDataItems.length;t++)this._toggleDataItem(this.minorDataItems[t],!1);et.__(this.series,t=>{t.inited&&t._markDirtyAxes()})}this._updateGhost()}_updateFinals(t,e){this.setPrivateRaw("selectionMinFinal",this.positionToValue(t)),this.setPrivateRaw("selectionMaxFinal",this.positionToValue(e))}_getDelta(){this._deltaMinMax=this._baseDuration/2}_fixMin(t){const e=this.getPrivate("baseInterval"),i=e.timeUnit;let s=Ji(t,i,e.count,this._root),a=s+qi(i,e.count*this._getM(i));return a=Ji(a,i,1,this._root),s+(a-s)*this.get("startLocation",0)}_fixMax(t){const e=this.getPrivate("baseInterval"),i=e.timeUnit;let s=Ji(t,i,e.count,this._root),a=s+qi(i,e.count*this._getM(i));return a=Ji(a,i,1,this._root),s+(a-s)*this.get("endLocation",1)}_updateDates(t,e){}_handleSeriesRemoved(){this.setPrivate("baseInterval",this.get("baseInterval")),this.setPrivate("min",void 0),this.setPrivate("minFinal",void 0)}baseDuration(){return this._baseDuration}baseMainDuration(){return Wi(this.get("baseInterval"))}
1processSeriesDataItem(t,e){const i=this.getPrivate("baseInterval");t.open||(t.open={}),t.close||(t.close={}),et.__(e,e=>{let s=t.get(e);if(it.Et(s)){let a=t.open[e],n=t.close[e];if(s>=a&&s<=n);else{const o=i.timeUnit,r=i.count;a=Ji(s,o,r,this._root),n=a+qi(o,r*this._getM(o)),n=Ji(n,o,1,this._root),t.open[e]=a,t.close[e]=n}this._updateDates(a,t.component)}})}_handleSizeDirty(){}getDataItemPositionX(t,e,i,s,a){let n,o,r;return a?r=t.get(e):(t.open&&t.close?(n=t.open[e],o=t.close[e]):(n=t.get(e),o=n),r=n+(o-n)*i,r=this._baseValue+(r-this._baseValue)*s),this.valueToPosition(r)}getDataItemCoordinateX(t,e,i,s){return this._settings.renderer.positionToCoordinate(this.getDataItemPositionX(t,e,i,s))}getDataItemPositionY(t,e,i,s,a){let n,o,r;return a?r=t.get(e):(t.open&&t.close?(n=t.open[e],o=t.close[e]):(n=t.get(e),o=n),r=n+(o-n)*i,r=this._baseValue+(r-this._baseValue)*s),this.valueToPosition(r)}getDataItemCoordinateY(t,e,i,s){return this._settings.renderer.positionToCoordinate(this.getDataItemPositionY(t,e,i,s))}roundAxisPosition(t,e){let i=this.positionToValue(t);i-=(e-.5)*this._baseDuration;let s=this.getPrivate("baseInterval");if(!it.yr(i)){const t=this._root.locale.firstDayOfWeek,a=s.timeUnit,n=this._root.utc,o=this._root.timezone,r=s.count;i=Ji(i,a,r,this._root,this.getPrivate("min",0));let l=ji(s,new Date(i),t,n,o);return o&&(i=Ji(i+.05*this._baseDuration,a,r,this._root,this.getPrivate("min",0)),l=ji(s,new Date(i+l*e),t,n,o)),this.valueToPosition(i+l*e)}return NaN}getTooltipText(t,e){if(null!=this.getPrivate("min")){let i=this.get("tooltipDateFormats")[this.getPrivate("baseInterval").timeUnit],s=this.positionToValue(t);if(it.Et(s)){let t=new Date(s),a=this.getPrivate("baseInterval"),n=ji(a,t,this._root.locale.firstDayOfWeek,this._root.utc,this._root.timezone);return!1!==e&&(t=new Date(s+this.get("tooltipIntervalOffset",-this.get("tooltipLocation",.5))*n)),this._root.dateFormatter.format(t,this.get("tooltipDateFormat",i))}}return""}getSeriesItem(t,e,i,s){let a=this.getPrivate("name")+this.get("renderer").getPrivate("letter"),n=this.positionToValue(e);null==i&&(i=.5),n-=(i-.5)*this._baseDuration;const o=et.IU(t.dataItems,t=>{let e=0;return t.open&&(e=t.open[a]),wt(e,n)});if(s||t.get("snapTooltip")){let e=t.dataItems[o.index-1],i=t.dataItems[o.index];if(e&&i&&e.open&&i.close){let t=e.open[a],s=i.close[a];if(Math.abs(n-t)>Math.abs(n-s))return i}if(e)return e;if(i)return i}else{const e=t.dataItems[o.index-1];if(e&&e.open&&e.close){let t=e.open[a],i=e.close[a];if(n>=t&&n<=i)return e}}}shouldGap(t,e,i,s){const a=t.get(s),n=e.get(s);return n-a>this._baseDuration*i}zoomToDates(t,e,i){this.zoomToValues(t.getTime(),e.getTime(),i)}zoomToValues(t,e,i){const s=this.getPrivate("minFinal",this.getPrivate("min",0)),a=this.getPrivate("maxFinal",this.getPrivate("max",0));if(null!=this.getPrivate("min")&&null!=this.getPrivate("max"))if(this.get("groupData")){const s=this.getGroupInterval(e-t),a=this.get("baseInterval");let n=this.getIntervalMin(a),o=this.getIntervalMax(a)-1;o=Ji(o,s.timeUnit,s.count,this.root),o+=this._getM(s.timeUnit)*Wi(s),o=Ji(o,s.timeUnit,s.count,this.root);let r=Ji(n,s.timeUnit,s.count,this.root),l=Ji(o,s.timeUnit,s.count,this.root),h=(t-r)/(l-r),c=(e-r)/(l-r);this.zoom(h,c,i)}else this.zoom((t-s)/(a-s),(e-s)/(a-s),i)}positionToDate(t){return new Date(this.positionToValue(t))}dateToPosition(t){return this.valueToPosition(t.getTime())}getCellWidthPosition(){let t=this.getPrivate("selectionMax",this.getPrivate("max")),e=this.getPrivate("selectionMin",this.getPrivate("min"));return it.Et(t)&&it.Et(e)?this._intervalDuration/(t-e):.05}nextPosition(t){null==t&&(t=1);let e=this.get("tooltipLocation",.5)*this._baseDuration;"Y"==this.get("renderer").getPrivate("letter")&&(t*=-1);let i=this.positionToValue(this.getPrivate("tooltipPosition",0));const s=this.getPrivate("baseInterval");let a=this._nextTime(i,t,s),n=this.getPrivate("selectionMin",0),o=this.getPrivate("selectionMax",0),r=Ji(n,s.timeUnit,s.count,this._root),l=Ji(o,s.timeUnit,s.count,this._root);return a+=e,a=Ut(a,r+e,l-e),this.toGlobalPosition(this.valueToPosition(a))}_nextTime(t,e,i){return Ji(t+e*this._baseDuration,i.timeUnit,i.count,this._root)}}function hs(t,e){for(let i=0,s=e.length;i<s;i++){const s=e[i];if(s.length>0){let e=s[0];if(e.length>0){let i=e[0];t.moveTo(i.x,i.y);for(let e=0,a=s.length;e<a;e++)cs(t,s[e])}}}}function cs(t,e){for(let i=0,s=e.length;i<s;i++){const s=e[i];t.lineTo(s.x,s.y)}}
1ls.className="DateAxis",ls.classNames=rs.classNames.concat([ls.className]);class ds extends ee{_beforeChanged(){super._beforeChanged(),(this.isDirty("points")||this.isDirty("segments")||this._sizeDirty||this.isPrivateDirty("width")||this.isPrivateDirty("height"))&&(this._clear=!0)}_changed(){if(super._changed(),this._clear){const t=this.get("points"),e=this.get("segments");if(t&&t.length>0){let e=t[0];this._display.moveTo(e.x,e.y),hs(this._display,[[t]])}else if(e)hs(this._display,e);else if(!this.get("draw")){let t=this.width(),e=this.height();this._display.moveTo(0,0),this._display.lineTo(t,e)}}}}ds.className="Line",ds.classNames=ee.classNames.concat([ds.className]);class us extends ds{}us.className="Tick",us.classNames=ds.classNames.concat([us.className]);class ps extends us{constructor(){super(...arguments),this._tickPoints=[]}}ps.className="AxisTick",ps.classNames=us.classNames.concat([ps.className]);class gs extends ee{_beforeChanged(){super._beforeChanged(),(this.isPrivateDirty("width")||this.isPrivateDirty("height"))&&(this._clear=!0)}}gs.className="Grid",gs.classNames=ee.classNames.concat([gs.className]);class ms extends we{constructor(){super(...arguments),this._tickPoints=[]}}ms.className="AxisLabel",ms.classNames=we.classNames.concat([ms.className]);class _s extends ee{constructor(){super(...arguments),this._axisLength=100,this._start=0,this._end=1,this._inversed=!1,this._minSize=0,this._lc=1,this._ls=0,this.ticks=this.addDisposer(new rt(Lt.new({}),()=>ps._new(this._root,{themeTags:Ft.kE(this.ticks.template.get("themeTags",[]),this.get("themeTags",[]))},[this.ticks.template]))),this.grid=this.addDisposer(new rt(Lt.new({}),()=>gs._new(this._root,{themeTags:Ft.kE(this.grid.template.get("themeTags",[]),this.get("themeTags",[]))},[this.grid.template]))),this.axisFills=this.addDisposer(new rt(Lt.new({}),()=>ee._new(this._root,{themeTags:Ft.kE(this.axisFills.template.get("themeTags",["axis","fill"]),this.get("themeTags",[]))},[this.axisFills.template]))),this.labels=this.addDisposer(new rt(Lt.new({}),()=>ms._new(this._root,{themeTags:Ft.kE(this.labels.template.get("themeTags",[]),this.get("themeTags",[]))},[this.labels.template])))}makeTick(t,e){const i=this.ticks.make();return i._setDataItem(t),t.setRaw("tick",i),i.set("themeTags",Ft.kE(i.get("themeTags"),e)),this.axis.labelsContainer.children.push(i),this.ticks.push(i),i}makeGrid(t,e){const i=this.grid.make();return i._setDataItem(t),t.setRaw("grid",i),i.set("themeTags",Ft.kE(i.get("themeTags"),e)),this.axis.gridContainer.children.push(i),this.grid.push(i),i}makeAxisFill(t,e){const i=this.axisFills.make();return i._setDataItem(t),i.set("themeTags",Ft.kE(i.get("themeTags"),e)),this.axis.gridContainer.children.push(i),t.setRaw("axisFill",i),this.axisFills.push(i),i}makeLabel(t,e){const i=this.labels.make();return i.set("themeTags",Ft.kE(i.get("themeTags"),e)),t.get("isRange")?this.axis.labelsContainer.children.push(i):this.axis.labelsContainer.children.moveValue(i,0),i._setDataItem(t),t.setRaw("label",i),this.labels.push(i),i}axisLength(){return 0}gridCount(){return this.axisLength()/this.get("minGridDistance",50)}_updatePositions(){}_afterNew(){super._afterNew(),this.set("isMeasured",!1);const t=this.thumb;t&&(this._disposers.push(t.events.on("pointerdown",t=>{this._handleThumbDown(t)})),this._disposers.push(t.events.on("globalpointerup",t=>{this._handleThumbUp(t)})),this._disposers.push(t.events.on("globalpointermove",t=>{this._handleThumbMove(t)})))}_beforeChanged(){super._beforeChanged(),this.isDirty("minGridDistance")&&this.root.events.once("frameended",()=>{this.axis.markDirtySize()})}_changed(){if(super._changed(),this.isDirty("pan")){const t=this.thumb;if(t){const e=this.axis.labelsContainer,i=this.get("pan");"zoom"==i?e.children.push(t):"none"==i&&e.children.removeValue(t)}}}_handleThumbDown(t){this._thumbDownPoint=this.toLocal(t.point);const e=this.axis;this._downStart=e.get("start"),this._downEnd=e.get("end")}_handleThumbUp(t){this._thumbDownPoint=void 0}_handleThumbMove(t){const e=this._thumbDownPoint;if(e){const i=this.toLocal(t.point),s=this._downStart,a=this._downEnd,n=this._getPan(i,e)*Math.min(1,a-s)/2*this.get("panSensitivity",1);this.axis.zoom(s-n,a+n,0)}}_getPan(t,e){return 0}positionToCoordinate(t){return this._inversed?(this._end-t)*this._axisLength:(t-this._start)*this._axisLength}updateTooltipBounds(t){}_updateSize(){this.markDirty(),this._clear=!0}toAxisPosition(t){const e=this._start||0,i=this._end||1;return t*=i-e,t=this.get("inversed")?i-t:e+t,t}toGlobalPosition(t){const e=this._start||0,i=this._end||1;return this.get("inversed")?t=i-t:t-=e,t/=i-e,t}fixPosition(t){return this.get("inversed")?1-t:t}_updateLC(){}toggleVisibility(t,e,i,s){let a=this.axis;const n=a.get("start",0),o=a.get("end",1);let r=n+(o-n)*(i-1e-4),l=n+(o-n)*(s+1e-4);e<r||e>l?t.setPrivate("visible",!1):t.setPrivate("visible",!0)}_positionTooltip(t,e){const i=this.chart;i&&(t.set("pointTo",this._display.toGlobal(e)),i.inPlot(e)||t.hide())}processAxis(){}}
1_s.className="AxisRenderer",_s.classNames=ee.classNames.concat([_s.className]);class vs extends _s{constructor(){super(...arguments),this.thumb=ie.new(this._root,{width:ht.Q2,isMeasured:!1,themeTags:["axis","x","thumb","zoomgrip"]})}_afterNew(){this._settings.themeTags=Ft.kE(this._settings.themeTags,["renderer","x"]),super._afterNew(),this.setPrivateRaw("letter","X");const t=this.grid.template;t.set("height",ht.Q2),t.set("width",0),t.set("draw",(t,e)=>{t.moveTo(0,0),t.lineTo(0,e.height())}),this.set("draw",(t,e)=>{t.moveTo(0,0),t.lineTo(e.width(),0)})}_changed(){var t;super._changed();const e=this.axis,i=e.ghostLabel;i&&(i.setPrivate("visible",!this.get("inside")),i.set("x",-1e3));const s="opposite",a="inside";if(this.isDirty(s)||this.isDirty(a)){const i=this.chart,n=e.children;if(this.get(a)?e.addTag(a):e.removeTag(a),i){if(this.get(s)){const t=i.topAxesContainer.children;-1==t.indexOf(e)&&t.insertIndex(0,e),e.addTag(s),n.moveValue(this)}else{const t=i.bottomAxesContainer.children;-1==t.indexOf(e)&&t.moveValue(e),e.removeTag(s),n.moveValue(this,0)}null===(t=e.ghostLabel)||void 0===t||t._applyThemes(),this.labels.each(t=>{t._applyThemes()}),this.root._markDirtyRedraw()}e.markDirtySize()}this.thumb.setPrivate("height",e.labelsContainer.height())}_getPan(t,e){return(e.x-t.x)/this.width()}toAxisPosition(t){const e=this._start||0,i=this._end||1;return t-=this._ls,t=t*(i-e)/this._lc,t=this.get("inversed")?i-t:e+t,t}toGlobalPosition(t){const e=this._start||0,i=this._end||1;return this.get("inversed")?t=i-t:t-=e,t=t/(i-e)*this._lc,t+=this._ls,t}_updateLC(){const t=this.axis,e=t.parent;if(e){const i=e.innerWidth();this._lc=this.axisLength()/i,this._ls=(t.x()-e.get("paddingLeft",0))/i}}_updatePositions(){const t=this.axis,e=t.x()-Ft.JY(t.get("centerX",0),t.width())-t.parent.get("paddingLeft",0);t.gridContainer.set("x",e),t.topGridContainer.set("x",e),t.bulletsContainer.set("y",this.y());const i=t.chart;if(i){const e=i.plotContainer,s=t.axisHeader;let a=t.get("marginLeft",0),n=t.x()-a;const o=t.parent;o&&(n-=o.get("paddingLeft",0)),s.children.length>0?(a=t.axisHeader.width(),t.set("marginLeft",a+1)):s.set("width",a),s.setAll({x:n,y:-1,height:e.height()+2})}}processAxis(){super.processAxis();const t=this.axis;null==t.get("width")&&t.set("width",ht.Q2);const e=this._root.verticalLayout;t.set("layout",e),t.labelsContainer.set("width",ht.Q2),t.axisHeader.setAll({layout:e})}axisLength(){return this.axis.width()}positionToPoint(t){return{x:this.positionToCoordinate(t),y:0}}updateTick(t,e,i,s){if(t){it.Et(e)||(e=0);let a=.5;a=it.Et(s)&&s>1?t.get("multiLocation",a):t.get("location",a),it.Et(i)&&i!=e&&(e+=(i-e)*a),t.set("x",this.positionToCoordinate(e));let n=t.get("length",0);const o=t.get("inside",this.get("inside",!1));this.get("opposite")?(t.set("y",ht.Q2),o||(n*=-1)):(t.set("y",0),o&&(n*=-1)),t.set("draw",t=>{t.moveTo(0,0),t.lineTo(0,n)}),this.toggleVisibility(t,e,t.get("minPosition",0),t.get("maxPosition",1))}}updateLabel(t,e,i,s){if(t){let a=.5;a=it.Et(s)&&s>1?t.get("multiLocation",a):t.get("location",a),it.Et(e)||(e=0);const n=t.get("inside",this.get("inside",!1)),o=this.get("opposite");o?n?(t.set("position","absolute"),t.set("y",0)):(t.set("position","relative"),t.set("y",ht.Q2)):n?(t.set("y",0),t.set("position","absolute")):(t.set("y",void 0),t.set("position","relative")),it.Et(i)&&i!=e&&(e+=(i-e)*a),t.set("x",this.positionToCoordinate(e)),this.toggleVisibility(t,e,t.get("minPosition",0),t.get("maxPosition",1))}}updateGrid(t,e,i){if(t){it.Et(e)||(e=0);let s=t.get("location",.5);it.Et(i)&&i!=e&&(e+=(i-e)*s),t.set("x",this.positionToCoordinate(e)),this.toggleVisibility(t,e,0,1)}}updateBullet(t,e,i){if(t){const s=t.get("sprite");if(s){it.Et(e)||(e=0);let a=t.get("location",.5);it.Et(i)&&i!=e&&(e+=(i-e)*a);let n=this.axis.roundAxisPosition(e,a),o=this.axis._bullets[n],r=-1;if(this.get("opposite")&&(r=1),t.get("stacked"))if(o){let t=o.get("sprite");t&&s.set("y",t.y()+t.height()*r)}else s.set("y",0);this.axis._bullets[n]=t,s.set("x",this.positionToCoordinate(e)),this.toggleVisibility(s,e,0,1)}}}updateFill(t,e,i){if(t){it.Et(e)||(e=0),it.Et(i)||(i=1);let s=this.positionToCoordinate(e),a=this.positionToCoordinate(i);this.fillDrawMethod(t,s,a)}}fillDrawMethod(t,e,i){t.set("draw",t=>{const s=this.axis.gridContainer.height(),a=this.width();i<e&&([i,e]=[e,i]),e>a||i<0||(t.moveTo(e,0),t.lineTo(i,0),t.lineTo(i,s),t.lineTo(e,s),t.lineTo(e,0))})}positionTooltip(t,e){this._positionTooltip(t,{x:this.positionToCoordinate(e),y:0})}updateTooltipBounds(t){const e=this.get("inside"),i=1e5;let s=this._display.toGlobal({x:0,y:0}),a=s.x,n=0,o=this.axisLength(),r=i,l="up";this.get("opposite")?e?(l="up",n=s.y,r=i):(l="down",n=s.y-i,r=i):e?(l="down",n=s.y-i,r=i):(l="up",n=s.y,r=i);const h={left:a,right:a+o,top:n,bottom:n+r},c=t.get("bounds");Ft.MI(h,c)||(t.set("bounds",h),t.set("pointerOrientation",l))}}
1vs.className="AxisRendererX",vs.classNames=_s.classNames.concat([vs.className]);class fs extends _s{constructor(){super(...arguments),this.thumb=ie.new(this._root,{height:ht.Q2,isMeasured:!1,themeTags:["axis","y","thumb","zoomgrip"]})}_afterNew(){this._settings.themeTags=Ft.kE(this._settings.themeTags,["renderer","y"]),this._settings.opposite&&this._settings.themeTags.push("opposite"),super._afterNew(),this.setPrivateRaw("letter","Y");const t=this.grid.template;t.set("width",ht.Q2),t.set("height",0),t.set("draw",(t,e)=>{t.moveTo(0,0),t.lineTo(e.width(),0)}),this.set("draw",(t,e)=>{t.moveTo(0,0),t.lineTo(0,e.height())})}_getPan(t,e){return(t.y-e.y)/this.height()}_changed(){var t;super._changed();const e=this.axis,i=e.ghostLabel;i&&(i.setPrivate("visible",!this.get("inside")),i.set("y",-1e3));const s=this.thumb,a="opposite",n="inside",o=this.chart;if(this.isDirty(a)||this.isDirty(n)){const i=e.children;if(this.get(n)?e.addTag(n):e.removeTag(n),o){if(this.get(a)){const t=o.rightAxesContainer.children;-1==t.indexOf(e)&&t.moveValue(e,0),e.addTag(a),i.moveValue(this,0)}else{const t=o.leftAxesContainer.children;-1==t.indexOf(e)&&t.moveValue(e),e.removeTag(a),i.moveValue(this)}null===(t=e.ghostLabel)||void 0===t||t._applyThemes(),this.labels.each(t=>{t._applyThemes()}),this.root._markDirtyRedraw()}e.markDirtySize()}const r=e.labelsContainer.width();o&&(this.get(a)?s.set("centerX",0):s.set("centerX",r)),s.setPrivate("width",r)}processAxis(){super.processAxis();const t=this.axis;null==t.get("height")&&t.set("height",ht.Q2);const e=this._root.horizontalLayout;t.set("layout",e),t.labelsContainer.set("height",ht.Q2),t.axisHeader.set("layout",e)}_updatePositions(){const t=this.axis,e=t.y()-Ft.JY(t.get("centerY",0),t.height());t.gridContainer.set("y",e),t.topGridContainer.set("y",e),t.bulletsContainer.set("x",this.x());const i=t.chart;if(i){const e=i.plotContainer,s=t.axisHeader;let a=t.get("marginTop",0);s.children.length>0?(a=t.axisHeader.height(),t.set("marginTop",a+1)):s.set("height",a),s.setAll({y:t.y()-a,x:-1,width:e.width()+2})}}axisLength(){return this.axis.innerHeight()}positionToPoint(t){return{x:0,y:this.positionToCoordinate(t)}}updateLabel(t,e,i,s){if(t){it.Et(e)||(e=0);let a=.5;a=it.Et(s)&&s>1?t.get("multiLocation",a):t.get("location",a);const n=this.get("opposite"),o=t.get("inside",this.get("inside",!1));n?(t.set("x",0),o?t.set("position","absolute"):t.set("position","relative")):o?(t.set("x",0),t.set("position","absolute")):(t.set("x",void 0),t.set("position","relative")),it.Et(i)&&i!=e&&(e+=(i-e)*a),t.set("y",this.positionToCoordinate(e)),this.toggleVisibility(t,e,t.get("minPosition",0),t.get("maxPosition",1))}}updateGrid(t,e,i){if(t){it.Et(e)||(e=0);let s=t.get("location",.5);it.Et(i)&&i!=e&&(e+=(i-e)*s),t.set("y",this.positionToCoordinate(e)),this.toggleVisibility(t,e,0,1)}}updateTick(t,e,i,s){if(t){it.Et(e)||(e=0);let a=.5;a=it.Et(s)&&s>1?t.get("multiLocation",a):t.get("location",a),it.Et(i)&&i!=e&&(e+=(i-e)*a),t.set("y",this.positionToCoordinate(e));let n=t.get("length",0);const o=t.get("inside",this.get("inside",!1));this.get("opposite")?(t.set("x",0),o&&(n*=-1)):o||(n*=-1),t.set("draw",t=>{t.moveTo(0,0),t.lineTo(n,0)}),this.toggleVisibility(t,e,t.get("minPosition",0),t.get("maxPosition",1))}}updateBullet(t,e,i){if(t){const s=t.get("sprite");if(s){it.Et(e)||(e=0);let a=t.get("location",.5);it.Et(i)&&i!=e&&(e+=(i-e)*a);let n=this.axis.roundAxisPosition(e,a),o=this.axis._bullets[n],r=1;if(this.get("opposite")&&(r=-1),t.get("stacked"))if(o){let t=o.get("sprite");t&&s.set("x",t.x()+t.width()*r)}else s.set("x",0);this.axis._bullets[n]=t,s.set("y",this.positionToCoordinate(e)),this.toggleVisibility(s,e,0,1)}}}updateFill(t,e,i){if(t){it.Et(e)||(e=0),it.Et(i)||(i=1);let s=this.positionToCoordinate(e),a=this.positionToCoordinate(i);this.fillDrawMethod(t,s,a)}}fillDrawMethod(t,e,i){t.set("draw",t=>{const s=this.axis.gridContainer.width(),a=this.height();i<e&&([i,e]=[e,i]),e>a||i<0||(t.moveTo(0,e),t.lineTo(s,e),t.lineTo(s,i),t.lineTo(0,i),t.lineTo(0,e))})}positionToCoordinate(t){return this._inversed?(t-this._start)*this._axisLength:(this._end-t)*this._axisLength}positionTooltip(t,e){this._positionTooltip(t,{x:0,y:this.positionToCoordinate(e)})}updateTooltipBounds(t){const e=this.get("inside"),i=1e5;let s=this._display.toGlobal({x:0,y:0}),a=s.y,n=0,o=this.axisLength(),r=i,l="right";this.get("opposite")?e?(l="right",n=s.x-i,r=i):(l="left",n=s.x,r=i):e?(l="left",n=s.x,r=i):(l="right",n=s.x-i,r=i);
1const h={left:n,right:n+r,top:a,bottom:a+o},c=t.get("bounds");Ft.MI(h,c)||(t.set("bounds",h),t.set("pointerOrientation",l))}_updateLC(){const t=this.axis,e=t.parent;if(e){const i=e.innerHeight();this._lc=this.axisLength()/i,this._ls=t.y()/i}}toAxisPosition(t){const e=this._start||0,i=this._end||1;return t-=this._ls,t=t*(i-e)/this._lc,t=this.get("inversed")?e+t:i-t,t}toGlobalPosition(t){const e=this._start||0,i=this._end||1;return this.get("inversed")?t-=e:t=i-t,t=t/(i-e)*this._lc,t+=this._ls,t}fixPosition(t){return this.get("inversed")?t:1-t}}fs.className="AxisRendererY",fs.classNames=_s.classNames.concat([fs.className]);class ys extends ns{constructor(){super(...arguments),this._aggregatesCalculated=!1,this._selectionAggregatesCalculated=!1,this._dataProcessed=!1,this._baseSeriesDirty=!1,this.bullets=new nt,this.bulletsContainer=ge.new(this._root,{width:ht.Q2,height:ht.Q2,position:"absolute"})}_afterNew(){this.valueFields.push("value","customValue"),super._afterNew(),this.setPrivate("customData",{}),this._disposers.push(this.bullets.events.onAll(()=>{this._handleBullets(this.dataItems)}))}_dispose(){this.bulletsContainer.dispose(),super._dispose()}startIndex(){let t=this.dataItems.length;return Math.min(this.getPrivate("startIndex",0),t)}endIndex(){let t=this.dataItems.length;return Math.max(0,Math.min(this.getPrivate("endIndex",t),t))}_handleBullets(t){et.__(t,t=>{const e=t.bullets;e&&(et.__(e,t=>{t.dispose()}),t.bullets=void 0)}),this.markDirtyValues()}_makeBullets(t){this._shouldMakeBullet(t)&&(t.bullets=[],this.bullets.each(e=>{this._makeBullet(t,e)}))}_shouldMakeBullet(t){return!0}_makeBullet(t,e,i){const s=e(this._root,this,t);return s&&(s._index=i,this._makeBulletReal(t,s)),s}_makeBulletReal(t,e){let i=e.get("sprite");i&&(i._setDataItem(t),i.setRaw("position","absolute"),this.bulletsContainer.children.push(i)),e.series=this,t.bullets.push(e)}addBullet(t,e){t.bullets||(t.bullets=[]),e&&this._makeBulletReal(t,e)}_clearDirty(){super._clearDirty(),this._aggregatesCalculated=!1,this._baseSeriesDirty=!1,this._selectionAggregatesCalculated=!1}_prepareChildren(){super._prepareChildren();const t=this.dataItems,e=t.length;let i=this.startIndex(),s=this.endIndex();if(this.isDirty("name")&&this.updateLegendValue(),this.isDirty("heatRules")&&(this._valuesDirty=!0),this.isPrivateDirty("baseValueSeries")){const t=this.getPrivate("baseValueSeries");t&&this._disposers.push(t.onPrivate("startIndex",()=>{this._baseSeriesDirty=!0,this.markDirtyValues()}))}const a=this.get("calculateAggregates");if(a&&(this._valuesDirty&&!this._dataProcessed&&(this._aggregatesCalculated||(this._calculateAggregates(0,e),this._aggregatesCalculated=!0,0!=i&&(this._psi=void 0))),this._psi==i&&this._pei==s&&!this.isPrivateDirty("adjustedStartIndex")||this._selectionAggregatesCalculated||(0===i&&s===e&&this._aggregatesCalculated||this._calculateAggregates(i,s),this._selectionAggregatesCalculated=!0)),this.isDirty("tooltip")){let t=this.get("tooltip");t&&(t.hide(0),t.set("tooltipTarget",this))}if(this.isDirty("fill")||this.isDirty("stroke")){let t;const e=this.get("legendDataItem");if(e&&(t=e.get("markerRectangle"),t&&this.isVisible())){if(this.isDirty("stroke")){let e=this.get("stroke");t.set("stroke",e)}if(this.isDirty("fill")){let e=this.get("fill");t.set("fill",e)}}this.updateLegendMarker(void 0)}if(this.bullets.length>0){let i=this.startIndex(),s=this.endIndex();s<e&&s++;for(let e=i;e<s;e++){let i=t[e];i.bullets||this._makeBullets(i)}}}_handleRemoved(){}_adjustStartIndex(t){return t}_calculateAggregates(t,e){let i=this._valueFields;if(!i)throw new Error("No value fields are set for the series.");const s=this.get("excludeFromAggregate");s&&(i=i.filter(t=>-1==s.indexOf(t)));const a={},n={},o={},r={},l={},h={},c={},d={},u={};for(let m=0,_=i.length;m<_;m++){let t=i[m];a[t]=0,n[t]=0,o[t]=0}const p=this.dataItems,g=p.length;for(let m=0,_=i.length;m<_;m++){let s=i[m],_=s+"Change",v=s+"ChangePercent",f=s+"ChangePrevious",y=s+"ChangePreviousPercent",x=s+"ChangeSelection",b=s+"ChangeSelectionPercent",w="valueY";("valueX"===s||s.endsWith("ValueX"))&&(w="valueX");const C=this.getPrivate("baseValueSeries"),k=this.getPrivate("adjustedStartIndex",t),D=(e,i,s)=>{if(0===t){const t=h[w],s=i-t;e.setRaw(_,s),e.setRaw(v,s/t*100)}const a=i-u[w],n=i-h[w];e.setRaw(f,a),e.setRaw(y,a/u[w]*100),e.setRaw(x,n),e.setRaw(b,n/h[w]*100),u[s]=i};for(let t=k;t<e;t++){const e=p[t];if(e){let t=e.get(s);if(null!=t){null==r[s]&&(r[s]=t),null==l[s]&&(l[s]=t),null==h[s]&&(h[s]=t,u[s]=t,C&&(h[w]=C._getBase(w)));break}}}for(let t=k;t<e;t++){const e=p[t];if(e){let t=e._settings[s];null!=t&&(o[s]++,a[s]+=t,n[s]+=Math.abs(t),r[s]>t&&(r[s]=t),l[s]<t&&(l[s]=t),c[s]=t,D(e,t,s))}}if(d[s]=a[s]/o[s],e<g){const t=p[e];if(t){let e=t.get(s);null!=e&&D(t,e,s)}}if(e+1<g){const t=p[e+1];if(t){let e=t.get(s);null!=e&&D(t,e,s)}}t>0&&t--,delete u[s];for(let e=t;e<k;e++){const t=p[e];if(t){let e=t.get(s);null==u[s]&&(u[s]=e),null!=e&&D(t,e,s)}}}for(let m=0,_=i.length;m<_;m++){let t=i[m];this.setPrivate(t+"AverageSelection",d[t]),this.setPrivate(t+"CountSelection",o[t]),this.setPrivate(t+"SumSelection",a[t]),this.setPrivate(t+"AbsoluteSumSelection",n[t]),this.setPrivate(t+"LowSelection",r[t]),this.setPrivate(t+"HighSelection",l[t]),this.setPrivate(t+"OpenSelection",h[t]),this.setPrivate(t+"CloseSelection",c[t])}if(0===t&&e===g)for(let m=0,_=i.length;m<_;m++){let t=i[m];this.setPrivate(t+"Average",d[t]),this.setPrivate(t+"Count",o[t]),this.setPrivate(t+"Sum",a[t]),this.setPrivate(t+"AbsoluteSum",n[t]),this.setPrivate(t+"Low",r[t]),this.setPrivate(t+"High",l[t]),this.setPrivate(t+"Open",h[t]),this.setPrivate(t+"Close",c[t])}}_updateChildren(){super._updateChildren(),this._psi=this.startIndex(),this._pei=this.endIndex(),this.isDirty("visible")&&this.bulletsContainer.set("visible",this.get("visible"));const t=this.get("heatRules");
1if(this._valuesDirty&&t&&t.length>0&&et.__(t,t=>{const e=t.minValue||this.getPrivate(t.dataField+"Low")||0,i=t.maxValue||this.getPrivate(t.dataField+"High")||0;et.__(t.target._entities,s=>{const a=s.dataItem.get(t.dataField);if(!it.Et(a)){t.neutral&&s.set(t.key,t.neutral);const e=s.states;if(e){const i=e.lookup("default");i&&t.neutral&&i.set(t.key,t.neutral)}if(!t.customFunction)return}if(t.customFunction)t.customFunction.call(this,s,e,i,a);else{let n,o;n=t.logarithmic?(Math.log(a)*Math.LOG10E-Math.log(e)*Math.LOG10E)/(Math.log(i)*Math.LOG10E-Math.log(e)*Math.LOG10E):(a-e)/(i-e),!it.Et(a)||it.Et(n)&&Math.abs(n)!=1/0||(n=.5),it.Et(t.min)?o=t.min+(t.max-t.min)*n:t.min instanceof le.Q1?o=le.Q1.interpolate(n,t.min,t.max):t.min instanceof ht.QE&&(o=(0,Z.zR)(n,t.min,t.max)),s.set(t.key,o);const r=s.states;if(r){const e=r.lookup("default");e&&e.set(t.key,o)}}})}),this.get("visible")){const t=this.dataItems;let e=t.length,i=this.startIndex(),s=this.endIndex();s<e&&s++,i>0&&i--;for(let a=0;a<i;a++)this._hideBullets(t[a]);for(let a=i;a<s;a++)this._positionBullets(t[a]);for(let a=s;a<e;a++)this._hideBullets(t[a])}}_positionBullets(t){t.bullets&&et.__(t.bullets,t=>{this._positionBullet(t);const e=t.get("sprite");t.get("dynamic")&&(e&&(e._markDirtyKey("fill"),e.markDirtySize()),e instanceof ge&&e.walkChildren(t=>{t._markDirtyKey("fill"),t.markDirtySize(),t instanceof we&&t.text.markDirtyText()})),e instanceof we&&e.get("populateText")&&e.text.markDirtyText()})}_hideBullets(t){t.bullets&&et.__(t.bullets,t=>{let e=t.get("sprite");e&&e.setPrivate("visible",!1)})}_positionBullet(t){}_placeBulletsContainer(t){t.bulletsContainer.children.moveValue(this.bulletsContainer)}_removeBulletsContainer(){const t=this.bulletsContainer;t.parent&&t.parent.children.removeValue(t)}disposeDataItem(t){const e=t.bullets;e&&(et.__(e,t=>{t.dispose()}),t.bullets=void 0)}_getItemReaderLabel(){return""}showDataItem(t,e){const i=Object.create(null,{showDataItem:{get:()=>super.showDataItem}});return(0,ct.sH)(this,void 0,void 0,function*(){const s=[i.showDataItem.call(this,t,e)],a=t.bullets;a&&et.__(a,t=>{const i=t.get("sprite");i&&s.push(i.show(e))}),yield Promise.all(s)})}hideDataItem(t,e){const i=Object.create(null,{hideDataItem:{get:()=>super.hideDataItem}});return(0,ct.sH)(this,void 0,void 0,function*(){const s=[i.hideDataItem.call(this,t,e)],a=t.bullets;a&&et.__(a,t=>{const i=t.get("sprite");i&&s.push(i.hide(e))}),yield Promise.all(s)})}_sequencedShowHide(t,e){return(0,ct.sH)(this,void 0,void 0,function*(){if(this.get("sequencedInterpolation"))if(it.Et(e)||(e=this.get("interpolationDuration",0)),e>0){const i=this.startIndex(),s=this.endIndex();yield Promise.all(et.Tj(this.dataItems,(a,n)=>(0,ct.sH)(this,void 0,void 0,function*(){let o=e||0;(n<i-10||n>s+10)&&(o=0);let r=this.get("sequencedDelay",0)+o/(s-i);yield Vi(r*(n-i)),t?yield this.showDataItem(a,o):yield this.hideDataItem(a,o)})))}else yield Promise.all(et.Tj(this.dataItems,e=>t?this.showDataItem(e,0):this.hideDataItem(e,0)))})}updateLegendValue(t){if(t){const e=t.get("legendDataItem");if(e){const i=e.get("valueLabel");if(i){const e=i.text;let s="";i._setDataItem(t),s=this.get("legendValueText",e.get("text","")),i.set("text",s),e.markDirtyText()}const s=e.get("label");if(s){const e=s.text;let i="";s._setDataItem(t),i=this.get("legendLabelText",e.get("text","")),s.set("text",i),e.markDirtyText()}}}}updateLegendMarker(t){}_onHide(){super._onHide();const t=this.getTooltip();t&&t.hide()}hoverDataItem(t){}unhoverDataItem(t){}_getBase(t){const e=this.dataItems[this.startIndex()];return e?e.get(t):0}}function xs(t,e){return null==t?e:null==e?t:e<t?e:t}function bs(t,e){return null==t?e:null==e||t>e?t:e}ys.className="Series",ys.classNames=ns.classNames.concat([ys.className]);class ws extends ys{constructor(){super(...arguments),this._axesDirty=!1,this._stackDirty=!1,this._selectionProcessed=!1,this._dataSets={},this._x=0,this._y=0,this._bullets={},this.mainContainer=this.children.push(ge.new(this._root,{})),this.axisRanges=new nt,this._skipped=!1,this._couldStackTo=[],this._reallyStackedTo={},this._stackedSeries={},this._aLocationX0=0,this._aLocationX1=1,this._aLocationY0=0,this._aLocationY1=1,this._showBullets=!0,this.valueXFields=["valueX","openValueX","lowValueX","highValueX"],this.valueYFields=["valueY","openValueY","lowValueY","highValueY"],this._emptyDataItem=new as(this,void 0,{})}_afterNew(){this.fields.push("categoryX","categoryY","openCategoryX","openCategoryY"),this.valueFields.push("valueX","valueY","openValueX","openValueY","lowValueX","lowValueY","highValueX","highValueY"),this._setRawDefault("vcx",1),this._setRawDefault("vcy",1),this._setRawDefault("valueXShow","valueXWorking"),this._setRawDefault("valueYShow","valueYWorking"),this._setRawDefault("openValueXShow","openValueXWorking"),this._setRawDefault("openValueYShow","openValueYWorking"),this._setRawDefault("lowValueXShow","lowValueXWorking"),this._setRawDefault("lowValueYShow","lowValueYWorking"),this._setRawDefault("highValueXShow","highValueXWorking"),this._setRawDefault("highValueYShow","highValueYWorking"),this._setRawDefault("lowValueXGrouped","low"),this._setRawDefault("lowValueYGrouped","low"),this._setRawDefault("highValueXGrouped","high"),this._setRawDefault("highValueYGrouped","high");const t=this.get("xAxis");t&&(this._xRenderer=t.get("renderer"));const e=this.get("yAxis");e&&(this._yRenderer=e.get("renderer")),super._afterNew(),this.set("maskContent",!0),this._disposers.push(this.axisRanges.events.onAll(t=>
1{if("clear"===t.type)et.__(t.oldValues,t=>{this._removeAxisRange(t)});else if("push"===t.type)this._processAxisRange(t.newValue);else if("setIndex"===t.type)this._processAxisRange(t.newValue);else if("insertIndex"===t.type)this._processAxisRange(t.newValue);else if("removeIndex"===t.type)this._removeAxisRange(t.oldValue);else{if("moveIndex"!==t.type)throw new Error("Unknown IStreamEvent type");this._processAxisRange(t.value)}})),this.states.create("hidden",{opacity:1,visible:!1}),this.onPrivate("startIndex",()=>{this.root.events.once("frameended",()=>{this.updateLegendValue()})}),this.onPrivate("endIndex",()=>{this.root.events.once("frameended",()=>{this.updateLegendValue()})}),this._makeFieldNames()}_processAxisRange(t){const e=ge.new(this._root,{});t.container=e,this.children.push(e),t.series=this;const i=t.axisDataItem;i.setRaw("isRange",!0);const s=i.component;if(s){s._processAxisRange(i,["range","series"]);const t=i.get("bullet");if(t){const e=t.get("sprite");e&&e.setPrivate("visible",!1)}const a=i.get("axisFill");a&&e.set("mask",a),s._seriesAxisRanges.push(i)}}_onDataClear(){super._onDataClear(),dt.__(this._dataSets,(t,e)=>{et.__(e,t=>{t.dispose()}),e.length=0})}_removeAxisRange(t){const e=t.axisDataItem,i=e.component;e.dispose(),et.TF(i._seriesAxisRanges,e);const s=t.container;s&&s.dispose()}_updateFields(){super._updateFields(),this._valueXFields=[],this._valueYFields=[],this._valueXShowFields=[],this._valueYShowFields=[],this.__valueXShowFields=[],this.__valueYShowFields=[],this.valueXFields&&et.__(this.valueXFields,t=>{const e=this.get(t+"Field");if(e){this._valueXFields.push(t);let e=this.get(t+"Show");this.__valueXShowFields.push(e),-1!=e.indexOf("Working")?this._valueXShowFields.push(e.split("Working")[0]):this._valueXShowFields.push(e)}}),this.valueYFields&&et.__(this.valueYFields,t=>{const e=this.get(t+"Field");if(e){this._valueYFields.push(t);let e=this.get(t+"Show");this.__valueYShowFields.push(e),-1!=e.indexOf("Working")?this._valueYShowFields.push(e.split("Working")[0]):this._valueYShowFields.push(e)}})}_dispose(){super._dispose(),this._bullets={};const t=this.chart;t&&t.series.removeValue(this),et.dm(this.get("xAxis").series,this),et.dm(this.get("yAxis").series,this)}_min(t,e){let i=xs(this.getPrivate(t),e);this.setPrivate(t,i)}_max(t,e){let i=bs(this.getPrivate(t),e);this.setPrivate(t,i)}_shouldMakeBullet(t){const e=this.get("xAxis"),i=this.get("yAxis"),s=this.get("baseAxis");if(!e.inited||!i.inited)return!1;const a=this.get("minBulletDistance",0);if(a>0){let t=this.startIndex(),n=this.endIndex(),o=n-t;if(e==s){if(this._xRenderer.axisLength()/o<a/5)return!1}else if(i==s&&this._yRenderer.axisLength()/o<a/5)return!1}return null!=t.get(this._xField)&&null!=t.get(this._yField)}_makeFieldNames(){const t=this.get("xAxis"),e=this.get("yAxis"),i=t.getPrivate("name"),s=Ft.ND(i),a=e.getPrivate("name"),n=Ft.ND(a),o=t.get("renderer").getPrivate("letter"),r=e.get("renderer").getPrivate("letter"),l="open",h="low",c="high",d="Show";"ValueAxis"===t.className?(this._xField=this.get(i+o+d),this._xOpenField=this.get(l+s+o+d),this._xLowField=this.get(h+s+o+d),this._xHighField=this.get(c+s+o+d)):(this._xField=i+o,this._xOpenField=l+s+o,this._xLowField=h+s+o,this._xHighField=c+s+o),"ValueAxis"===e.className?(this._yField=this.get(a+r+d),this._yOpenField=this.get(l+n+r+d),this._yLowField=this.get(h+n+r+d),this._yHighField=this.get(c+n+r+d)):(this._yField=a+r,this._yOpenField=l+n+r,this._yLowField=h+n+r,this._yHighField=c+n+r)}_fixVC(){const t=this.get("xAxis"),e=this.get("yAxis"),i=this.get("baseAxis"),s=this.states.lookup("hidden"),a=this.get("sequencedInterpolation");if(s){let n=0;a&&(n=.999999999999),t===i?s.set("vcy",n):(e===i||s.set("vcy",n),s.set("vcx",n))}}_handleMaskBullets(){this.isDirty("maskBullets")&&this.bulletsContainer.set("maskContent",this.get("maskBullets"))}_fixPosition(){const t=this.get("xAxis"),e=this.get("yAxis");this.set("x",t.x()-Ft.JY(t.get("centerX",0),t.width())-t.parent.get("paddingLeft",0)),this.set("y",e.y()-Ft.JY(e.get("centerY",0),e.height())-e.parent.get("paddingTop",0)),this.bulletsContainer.set("y",this.y()),this.bulletsContainer.set("x",this.x())}_prepareChildren(){super._prepareChildren(),this._xRenderer=this.get("xAxis").get("renderer"),this._yRenderer=this.get("yAxis").get("renderer"),this._bullets={},(this.isDirty("valueYShow")||this.isDirty("valueXShow")||this.isDirty("openValueYShow")||this.isDirty("openValueXShow")||this.isDirty("lowValueYShow")||this.isDirty("lowValueXShow")||this.isDirty("highValueYShow")||this.isDirty("highValueXShow"))&&(this._updateFields(),this._makeFieldNames(),this._valuesDirt
1y=!0),(this.isDirty("xAxis")||this.isDirty("yAxis"))&&(this._valuesDirty=!0),this.set("width",this.get("xAxis").width()),this.set("height",this.get("yAxis").height()),this._handleMaskBullets();const t=this.get("xAxis"),e=this.get("yAxis"),i=this.get("baseAxis"),s=this.get("tooltipPositionX");let a;switch(s){case"open":a=this._xOpenField;break;case"low":a=this._xLowField;break;case"high":a=this._xHighField;break;default:a=this._xField}this._tooltipFieldX=a;const n=this.get("tooltipPositionY");let o;switch(n){case"open":o=this._yOpenField;break;case"low":o=this._yLowField;break;case"high":o=this._yHighField;break;default:o=this._yField}this._tooltipFieldY=o,this.isDirty("baseAxis")&&this._fixVC(),this._fixPosition();const r=this.get("stacked");if(this.isDirty("stacked")&&(r?this._valuesDirty&&!this._dataProcessed||this._stack():this._unstack()),this._valuesDirty&&!this._dataProcessed){let i,s,a,n;this._dataProcessed=!0,r&&this._stack(),et.__(this.dataItems,o=>{et.__(this._valueXShowFields,t=>{let e=o.get(t);null!=e&&(r&&(e+=this.getStackedXValue(o,t)),i=xs(i,e),s=bs(s,e))}),et.__(this._valueYShowFields,t=>{let e=o.get(t);null!=e&&(r&&(e+=this.getStackedYValue(o,t)),a=xs(a,e),n=bs(n,e))}),t.processSeriesDataItem(o,this._valueXFields),e.processSeriesDataItem(o,this._valueYFields)}),this._min("minX",i),this._max("maxX",s),this._min("minY",a),this._max("maxY",n),t._seriesValuesDirty=!0,e._seriesValuesDirty=!0,this.get("ignoreMinMax")||((this.isPrivateDirty("minX")||this.isPrivateDirty("maxX"))&&t.markDirtyExtremes(),(this.isPrivateDirty("minY")||this.isPrivateDirty("maxY"))&&e.markDirtyExtremes()),this._markStakedDirtyStack(),this.get("tooltipDataItem")||this.updateLegendValue(void 0)}if((this.isDirty("vcx")||this.isDirty("vcy"))&&this._markStakedDirtyStack(),this._dataGrouped||(t._groupSeriesD
1ata(this),e._groupSeriesData(this),this._dataGrouped=!0),this._valuesDirty||this.isPrivateDirty("startIndex")||this.isPrivateDirty("adjustedStartIndex")||this.isPrivateDirty("endIndex")||this.isDirty("vcx")||this.isDirty("vcy")||this._stackDirty||this._sizeDirty||this.isDirty("minBulletDistance")){let s=this.startIndex(),a=this.endIndex(),n=this.get("minBulletDistance",0);if(n>0&&i&&(i.get("renderer").axisLength()/(a-s)>n?this._showBullets=!0:this._showBullets=!1),(this._psi!=s||this._pei!=a||this.isDirty("vcx")||this.isDirty("vcy")||this.isPrivateDirty("adjustedStartIndex")||this._stackDirty||this._valuesDirty)&&!this._selectionProcessed){this._selectionProcessed=!0;const n=this.get("vcx",1),o=this.get("vcy",1),r=this.get("stacked",!1),l=this.getPrivate("outOfSelection");if(i===t||!i)if(e._calculateTotals(),this.setPrivateRaw("selectionMinY",void 0),this.setPrivateRaw("selectionMaxY",void 0),l)e.markDirtySelectionExtremes();else for(let t=s;t<a;t++)this.processYSelectionDataItem(this.dataItems[t],o,r);if(i===e||!i)if(t._calculateTotals(),this.setPrivateRaw("selectionMinX",void 0),this.setPrivateRaw("selectionMaxX",void 0),l)e.markDirtySelectionExtremes();else for(let t=s;t<a;t++)this.processXSelectionDataItem(this.dataItems[t],n,r);if((i===t||!i)&&("valueYWorking"!==this.get("valueYShow")||this.get("useSelectionExtremes"))){const t=this.getPrivate("selectionMinY");null!=t&&(this.setPrivateRaw("minY",t),e.markDirtyExtremes());const i=this.getPrivate("selectionMaxY");null!=i&&(this.setPrivateRaw("maxY",i),e.markDirtyExtremes())}if((i===e||!i)&&("valueXWorking"!==this.get("valueXShow")||this.get("useSelectionExtremes"))){const i=this.getPrivate("selectionMinX");null!=i&&(this.setPrivateRaw("minX",i),e.markDirtyExtremes());const s=this.getPrivate("selectionMaxX");null!=s&&(this.setPrivateRaw("maxX",s),t.markDirtyExtremes())}(this.isPrivateDirty("selectionMinX")||this.isPrivateDirty("selectionMaxX"))&&t.markDirtySelectionExtremes(),(this.isPrivateDirty("selectionMinY")||this.isPrivateDirty("selectionMaxY"))&&e.markDirtySelectionExtremes()}}}_postUpdateData(){const t=this.get("xAxis"),e=this.get("yAxis");t._seriesValuesDirty=!0,e._seriesValuesDirty=!0,et.__(this.dataItems,i=>{i.open=void 0,i.close=void 0,t.processSeriesDataItem(i,this._valueXFields),e.processSeriesDataItem(i,this._valueYFields)})}_makeRangeMask(){if(this.axisRanges.length>0){let t=this._mainContainerMask;null==t&&(t=this.children.push(ee.new(this._root,{})),this._mainContainerMask=t,t.set("draw",(e,i)=>{const s=this.parent;if(s){const t=this._root.container.width(),a=this._root.container.height();e.moveTo(-t,-a),e.lineTo(-t,2*a),e.lineTo(2*t,2*a),e.lineTo(2*t,-a),e.lineTo(-t,-a),this.axisRanges.each(t=>{const a=t.axisDataItem.get("axisFill");if(s&&a){let t=a.get("draw");t&&t(e,i)}})}this.mainContainer._display.mask=t._display})),t.markDirty(),t._markDirtyKey("fill")}else this.mainContainer._display.mask=null}_updateChildren(){super._updateChildren(),this._x=this.x(),this._y=this.y(),this._makeRangeMask()}_stack(){const t=this.chart;if(t){const e=t.series.indexOf(this);if(this._couldStackTo=[],e>0){let i;for(let s=e-1;s>=0;s--)if(i=t.series.getIndex(s),i.get("xAxis")===this.get("xAxis")&&i.get("yAxis")===this.get("yAxis")&&i.className===this.className&&(this._couldStackTo.push(i),!i.get("stacked")))break}this._stackDataItems()}}_unstack(){dt.__(this._reallyStackedTo,(t,e)=>{delete e._stackedSeries[this.uid]}),this._reallyStackedTo={},et.__(this.dataItems,t=>{t.setRaw("stackToItemY",void 0),t.setRaw("stackToItemX",void 0)})}_handleRemoved(){const t=this.get("xAxis");t&&t._handleSeriesRemoved();const e=this.get("yAxis");e&&e._handleSeriesRemoved()}_stackDataItems(){const t=this.get("baseAxis"),e=this.get("xAxis"),i=this.get("yAxis");let s,a;t===e?(s="valueY",a="stackToItemY"):t===i&&(s="valueX",a="stackToItemX");let n=this._couldStackTo.length,o=0;const r=this.get("stackToNegative");this._reallyStackedTo={},et.__(this.dataItems,t=>{for(let e=0;e<n;e++){let i=this._couldStackTo[e],l=i.dataItems[o],h=t.get(s);if(l){let o=l.get(s);if(r){if(!it.Et(h))break;if(it.Et(o)){if(e==n-1&&t.setRaw(a,void 0),h>=0&&o>=0){t.setRaw(a,l),this._reallyStackedTo[i.uid]=i,i._stackedSeries[this.uid]=this;break}if(h<0&&o<0){t.setRaw(a,l),this._reallyStackedTo[i.uid]=i,i._stackedSeries[this.uid]=this;break}}}else if(it.Et(h)&&it.Et(o)){t.setRaw(a,l),this._reallyStackedTo[i.uid]=i,i._stackedSeries[this.uid]=this;break}}}o++})}processXSelectionDataItem(t,e,i){et.__(this.__valueXShowFields,s=>{let a=t.get(s);null!=a&&(i&&(a+=this.getStackedXValueWorking(t,s)),this._min("selectionMinX",a),this._max("selectionMaxX",a*e))})}processYSelectionDataItem(t,e,i){et.__(this.__valueYShowFields,s=>{let a=t.get(s);null!=a&&(i&&(a+=this.getStackedYValueWorking(t,s)),this._min("selectionMinY",a),this._max("selectionMaxY",a*e))})}getStackedYValueWorking(t,e){const i=t.get("stackToItemY");
1if(i){const t=i.component;return i.get(e,0)*t.get("vcy",1)+this.getStackedYValueWorking(i,e)}return 0}getStackedXValueWorking(t,e){const i=t.get("stackToItemX");if(i){const t=i.component;return i.get(e,0)*t.get("vcx",1)+this.getStackedXValueWorking(i,e)}return 0}getStackedYValue(t,e){const i=t.get("stackToItemY");return i?i.get(e,0)+this.getStackedYValue(i,e):0}getStackedXValue(t,e){const i=t.get("stackToItemX");return i?i.get(e,0)+this.getStackedXValue(i,e):0}createLegendMarker(t){this.updateLegendMarker()}_markDirtyAxes(){this._axesDirty=!0,this.markDirty()}_markDataSetDirty(){this._afterDataChange(),this._valuesDirty=!0,this._dataProcessed=!1,this._aggregatesCalculated=!1,this.markDirty()}_clearDirty(){super._clearDirty(),this._axesDirty=!1,this._selectionProcessed=!1,this._stackDirty=!1,this._dataProcessed=!1}_positionBullet(t){let e=t.get("sprite");if(e){let i=e.dataItem,s=t.get("locationX",i.get("locationX",.5)),a=t.get("locationY",i.get("locationY",.5)),n=this.get("xAxis"),o=this.get("yAxis"),r=this.get("exactLocationX",!1),l=this.get("exactLocationY",!1),h=n.getDataItemPositionX(i,this._xField,s,this.get("vcx",1),r),c=o.getDataItemPositionY(i,this._yField,a,this.get("vcy",1),l),d=this.getPoint(h,c),u=i.get("left",d.x),p=i.get("right",d.x),g=i.get("top",d.y),m=i.get("bottom",d.y),_=0,v=0,f=p-u,y=m-g;if(this._shouldShowBullet(h,c)){e.setPrivate("visible",!t.getPrivate("hidden"));let n=t.get("field");const o=this.get("baseAxis"),p=this.get("xAxis"),g=this.get("yAxis");if(void 0!=n){let t;o==p?("value"==n?t=this._yField:"open"==n?t=this._yOpenField:"high"==n?t=this._yHighField:"low"==n&&(t=this._yLowField),t&&(c=g.getDataItemPositionY(i,t,0,this.get("vcy",1),l),d=this._yRenderer.positionToPoint(c),v=d.y,_=u+f*s)):("value"==n?t=this._xField:"open"==n?t=this._xOpenField:"high"==n?t=this._xHighField:"low"==n&&(t=this._xLowField),t&&(h=p.getDataItemPositionX(i,t,0,this.get("vcx",1),r),d=this._xRenderer.positionToPoint(h),_=d.x,v=m-y*a))}else _=u+f*s,v=m-y*a;const x=t.get("stacked");if(x){const t=this.chart;if(o==p){let i=this._bullets[h+"_"+c];if(i){let s=i.bounds(),a=e.localBounds(),n=v;v=s.top,"down"==x?v=s.bottom-a.top:"auto"==x?t&&(n<t.plotContainer.height()/2?v=s.bottom-a.top:v+=a.bottom):v+=a.bottom}this._bullets[h+"_"+c]=e}else{let i=this._bullets[h+"_"+c];if(i){let s=i.bounds(),a=e.localBounds(),n=_;_=s.right,"down"==x?_=s.left-a.right:"auto"==x?t&&(n<t.plotContainer.width()/2?_=s.left-a.right:_-=a.left):_-=a.left}this._bullets[h+"_"+c]=e}}e.isType("Label")&&(e.setPrivate("maxWidth",Math.abs(f)),e.setPrivate("maxHeight",Math.abs(y))),e.setAll({x:_,y:v})}else e.setPrivate("visible",!1)}}_shouldShowBullet(t,e){return this._showBullets}setDataSet(t){if(this._dataSets[t]){this._handleDataSetChange(),this._dataItems=this._dataSets[t],this._markDataSetDirty(),this._dataSetId=t;const e="datasetchanged";this.events.isEnabled(e)&&this.events.dispatch(e,{type:e,target:this,id:t})}}resetGrouping(){dt.__(this._dataSets,(t,e)=>{e!=this._mainDataItems&&et.__(e,t=>{t.dispose()})}),this._dataSets={},this._dataItems=this.mainDataItems}_handleDataSetChange(){et.__(this._dataItems,t=>{let e=t.bullets;e&&et.__(e,t=>{if(t){let e=t.get("sprite");e&&e.setPrivate("visible",!1)}})}),this._selectionProcessed=!1}show(t){const e=Object.create(null,{show:{get:()=>super.show}});return(0,ct.sH)(this,void 0,void 0,function*(){this._fixVC();let i=[];i.push(e.show.call(this,t).then(()=>{this._isShowing=!1;let t=this.get("xAxis"),e=this.get("yAxis"),i=this.get("baseAxis");e!==i&&e.markDirtySelectionExtremes(),t!==i&&t.markDirtySelectionExtremes()})),i.push(this.bulletsContainer.show(t)),i.push(this._sequencedShowHide(!0,t)),yield Promise.all(i)})}hide(t){const e=Object.create(null,{hide:{get:()=>super.hide}});return(0,ct.sH)(this,void 0,void 0,function*(){this._fixVC();let i=[];i.push(e.hide.call(this,t).then(()=>{this._isHiding=!1})),i.push(this.bulletsContainer.hide(t)),i.push(this._sequencedShowHide(!1,t)),yield Promise.all(i)})}showDataItem(t,e){const i=Object.create(null,{showDataItem:{get:()=>super.showDataItem}});return(0,ct.sH)(this,void 0,void 0,function*(){const s=[i.showDataItem.call(this,t,e)];it.Et(e)||(e=this.get("stateAnimationDuration",0));const a=this.get("stateAnimationEasing");et.__(this._valueFields,i=>{s.push(t.animate({key:i+"Working",to:t.get(i),duration:e,easing:a}).waitForStop())}),yield Promise.all(s)})}hideDataItem(t,e){const i=Object.create(null,{hideDataItem:{get:()=>super.hideDataItem}});return(0,ct.sH)(this,void 0,void 0,function*(){const s=[i.hideDataItem.call(this,t,e)];let a=this.states.lookup("hidden");a||(a=this.states.create("hidden",{})),it.Et(e)||(e=a.get("stateAnimationDuration",this.get("stateAnimationDuration",0)));const n=a.get("stateAnimationEasing",this.get("stateAnimationEasing")),o=this.get("xAxis"),r=this.get("yAxis"),l=this.get("baseAxis"),h=this.get("stacked");if(l!==o&&l||et.__(this._valueYFields,i=>{let a=r.getPrivate("min"),o=r.baseValue();it.Et(a)&&a>o&&(o=a),h&&(o=0);let l=t.get(i);null!=l&&s.push(t.animate({key:i+"Working",to:o,duration:e,easing:n}).waitForStop())}),l===r||!l){let i=o.getPrivate("min"),a=o.baseValue();it.Et(i)&&i>a&&(a=i),h&&(a=0),et.__(this._valueXFields,i=>{let o=t.get(i);null!=o&&s.push(t.animate({key:i+"Working",to:a,duration:e,easing:n}).waitForStop())})}yield Promise.all(s)})}_markDirtyStack(){this._stackDirty=!0,this.markDirty(),this._markStakedDirtyStack()}_markStakedDirtyStack(){const t=this._stackedSeries;t&&dt.__(t,(t,e)=>{e._stackDirty||e._markDirtyStack()})}_afterChanged(){super._afterChanged(),this._skipped&&(this._markDirtyAxes(),this._skipped=!1)}showDataItemTooltip(t){this.getPrivate("doNotUpdateLegend")||(this.updateLegendMarker(t),this.updateLegendValue(t));const e=this.get("tooltip"),i=this.get("exactLocationX",!1),s=this.get("exactLocationY",!1);if(e)if(!this.isHidden()&&this.get("visible")){if(e._setDataItem(t),t){let a=this.get("locationX",0),n=this.get("locationY",1),o=t.get("locationX",a),r=t.get("locationY",n);const l=this.get("xAxis"),h=this.get("yAxis"),c=this.get("vcx",1),d=this.get("vcy",1),u=l.getDataItemPositionX(t,this._tooltipFieldX,this._aLocationX0+(this._aLocationX1-this._aLocationX0)*o,c,i),p=h.getDataItemPositionY(t,this._tooltipFieldY,this._aLocationY0+(this._aLocationY1-this._aLocationY0)*r,d,s),g=this.getPoint(u,p);let m=!0;if(et.__(this._valueFields,e=>{null==t.get(e)&&(m=!1)}),m){const i=this.chart;i&&i.inPlot(g)?(e.label.text.markDirtyText(),e.set("tooltipTarget",this._getTooltipTarget(t)),e.set("pointTo",this._display.toGlobal({x:g.x,y:g.y}))):e._setDataItem(void 0)}else e._setDataItem(void 0)}}else this.hideTooltip()}hideTooltip(){const t=this.get("tooltip");return t&&t.set("tooltipTarget",this),super.hideTooltip()}_getTooltipTarget(t){if("bullet"==this.get("seriesTooltipTarget")){const e=t.bullets;if(e&&e.length>0){const t=e[0],i=t.get("sprite");if(i)return i}}return this}updateLegendValue(t){const e=this.get("legendDataItem");if(e){const i=e.get("label");if(i){let e="";t?(i._setDataItem(t),e=this.get("legendLabelText",i.get("text",this.get("name","")))):(i._setDataItem(this._emptyDataItem),e=this.get("legendRangeLabelText",this.get("legendLabelText",i.get("text",this.get("name",""))))),i.set("text",e)}const s=e.get("valueLabel");if(s){let e="";t?(s._setDataItem(t),e=this.get("legendValueText",s.get("text",""))):(s._setDataItem(this._emptyDataItem),e=this.get("legendRangeValueText",s.get("text",""))),s.set("text",e)}}}_getItemReaderLabel(){let t="X: {"+this._xField;return this.get("xAxis").isType("DateAxis")&&(t+=".formatDate()"),t+="}; Y: {"+this._yField,this.get("yAxis").isType("DateAxis")&&(t+=".formatDate()"),t+="}",t}getPoint(t,e){let i=this._xRenderer.positionToCoordinate(t),s=this._yRenderer.positionToCoordinate(e),a=999999999;return s<-a?s=-a:s>a&&(s=a),i<-a?i=-a:i>a&&(i=a),{x:i,y:s}}_shouldInclude(t){return!0}handleCursorHide(){this.hideTooltip(),this.updateLegendValue(void 0),this.updateLegendMarker(void 0)}_afterDataChange(){super._afterDataChange(),this.get("xAxis")._markDirtyKey("start"),this.get("yAxis")._markDirtyKey("start"),this.resetExtremes()}resetExtremes(){this.setPrivate("selectionMinX",void 0),this.setPrivate("selectionMaxX",void 0),this.setPrivate("selectionMinY",void 0),this.setPrivate("selectionMaxY",void 0),this.setPrivate("minX",void 0),this.setPrivate("minY",void 0),this.setPrivate("maxX",void 0),this.setPrivate("maxY",void 0)}createAxisRange(t){return this.axisRanges.push({axisDataItem:t})}get mainDataItems(){return this._mainDataItems}_adjustStartIndex(t){const e=this.get("xAxis"),i=this.get("baseAxis");if(i==e&&e.isType("DateAxis")){const i=e.baseDuration(),s=e.getPrivate("selectionMin",e.getPrivate("min",0)),a=i*this.get("locationX",.5);let n=-1/0;while(n<s){const e=this.dataItems[t];if(!e)break;{const i=e.open;if(n=i?i["valueX"]:e.get("valueX",0),n+=a,!(n<s))break;t++}}}return t}}
1ws.className="XYSeries",ws.classNames=ys.classNames.concat([ws.className]),Object.defineProperty(Cs,"name",{value:"default",configurable:!0});Array.prototype.slice;function Cs(t){return"object"===typeof t&&"length"in t?t:Array.from(t)}function ks(t){return function(){return t}}function Ds(t){this._context=t}function Ts(t){return new Ds(t)}Object.defineProperty(ks,"name",{value:"default",configurable:!0}),Object.defineProperty(Ts,"name",{value:"default",configurable:!0}),Ds.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}}};const Ps=Math.PI,As=2*Ps,Ss=1e-6,Ms=As-Ss;function Es(t){this._+=t[0];for(let e=1,i=t.length;e<i;++e)this._+=arguments[e]+t[e]}function Is(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return Es;const i=10**e;return function(t){this._+=t[0];for(let e=1,s=t.length;e<s;++e)this._+=Math.round(arguments[e]*i)/i+t[e]}}class Rs{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?Es:Is(t)}moveTo(t,e){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,e){this._append`L${this._x1=+t},${this._y1=+e}`}quadraticCurveTo(t,e,i,s){this._append`Q${+t},${+e},${this._x1=+i},${this._y1=+s}`}bezierCurveTo(t,e,i,s,a,n){this._append`C${+t},${+e},${+i},${+s},${this._x1=+a},${this._y1=+n}`}arcTo(t,e,i,s,a){if(t=+t,e=+e,i=+i,s=+s,a=+a,a<0)throw new Error(`negative radius: ${a}`);let n=this._x1,o=this._y1,r=i-t,l=s-e,h=n-t,c=o-e,d=h*h+c*c;if(null===this._x1)this._append`M${this._x1=t},${this._y1=e}`;else if(d>Ss)if(Math.abs(c*r-l*h)>Ss&&a){let u=i-n,p=s-o,g=r*r+l*l,m=u*u+p*p,_=Math.sqrt(g),v=Math.sqrt(d),f=a*Math.tan((Ps-Math.acos((g+d-m)/(2*_*v)))/2),y=f/v,x=f/_;Math.abs(y-1)>Ss&&this._append`L${t+y*h},${e+y*c}`,this._append`A${a},${a},0,0,${+(c*u>h*p)},${this._x1=t+x*r},${this._y1=e+x*l}`}else this._append`L${this._x1=t},${this._y1=e}`;else;}arc(t,e,i,s,a,n){if(t=+t,e=+e,i=+i,n=!!n,i<0)throw new Error(`negative radius: ${i}`);let o=i*Math.cos(s),r=i*Math.sin(s),l=t+o,h=e+r,c=1^n,d=n?s-a:a-s;null===this._x1?this._append`M${l},${h}`:(Math.abs(this._x1-l)>Ss||Math.abs(this._y1-h)>Ss)&&this._append`L${l},${h}`,i&&(d<0&&(d=d%As+As),d>Ms?this._append`A${i},${i},0,1,${c},${t-o},${e-r}A${i},${i},0,1,${c},${this._x1=l},${this._y1=h}`:d>Ss&&this._append`A${i},${i},0,${+(d>=Ps)},${c},${this._x1=t+i*Math.cos(a)}
1,${this._y1=e+i*Math.sin(a)}`)}rect(t,e,i,s){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${i=+i}v${+s}h${-i}Z`}toString(){return this._}}function Ls(){return new Rs}function Fs(t){let e=3;return t.digits=function(i){if(!arguments.length)return e;if(null==i)e=null;else{const t=Math.floor(i);if(!(t>=0))throw new RangeError(`invalid digits: ${i}`);e=t}return t},()=>new Rs(e)}function Bs(t){return t[0]}function Os(t){return t[1]}function Ns(t,e){var i=ks(!0),s=null,a=Ts,n=null,o=Fs(r);function r(r){var l,h,c,d=(r=Cs(r)).length,u=!1;for(null==s&&(n=a(c=o())),l=0;l<=d;++l)!(l<d&&i(h=r[l],l,r))===u&&((u=!u)?n.lineStart():n.lineEnd()),u&&n.point(+t(h,l,r),+e(h,l,r));if(c)return n=null,c+""||null}return t="function"===typeof t?t:void 0===t?Bs:ks(t),e="function"===typeof e?e:void 0===e?Os:ks(e),r.x=function(e){return arguments.length?(t="function"===typeof e?e:ks(+e),r):t},r.y=function(t){return arguments.length?(e="function"===typeof t?t:ks(+t),r):e},r.defined=function(t){return arguments.length?(i="function"===typeof t?t:ks(!!t),r):i},r.curve=function(t){return arguments.length?(a=t,null!=s&&(n=a(s)),r):a},r.context=function(t){return arguments.length?(null==t?s=n=null:n=a(s=t),r):s},r}function zs(t,e,i){var s=null,a=ks(!0),n=null,o=Ts,r=null,l=Fs(h);function h(h){var c,d,u,p,g,m=(h=Cs(h)).length,_=!1,v=new Array(m),f=new Array(m);for(null==n&&(r=o(g=l())),c=0;c<=m;++c){if(!(c<m&&a(p=h[c],c,h))===_)if(_=!_)d=c,r.areaStart(),r.lineStart();else{for(r.lineEnd(),r.lineStart(),u=c-1;u>=d;--u)r.point(v[u],f[u]);r.lineEnd(),r.areaEnd()}_&&(v[c]=+t(p,c,h),f[c]=+e(p,c,h),r.point(s?+s(p,c,h):v[c],i?+i(p,c,h):f[c]))}if(g)return r=null,g+""||null}function c(){return Ns().defined(a).curve(o).context(n)}return t="function"===typeof t?t:void 0===t?Bs:ks(+t),e="function"===typeof e?e:ks(void 0===e?0:+e),i="function"===typeof i?i:void 0===i?Os:ks(+i),h.x=function(e){return arguments.length?(t="function"===typeof e?e:ks(+e),s=null,h):t},h.x0=function(e){return arguments.length?(t="function"===typeof e?e:ks(+e),h):t},h.x1=function(t){return arguments.length?(s=null==t?null:"function"===typeof t?t:ks(+t),h):s},h.y=function(t){return arguments.length?(e="function"===typeof t?t:ks(+t),i=null,h):e},h.y0=function(t){return arguments.length?(e="function"===typeof t?t:ks(+t),h):e},h.y1=function(t){return arguments.length?(i=null==t?null:"function"===typeof t?t:ks(+t),h):i},h.lineX0=h.lineY0=function(){return c().x(t).y(e)},h.lineY1=function(){return c().x(t).y(i)},h.lineX1=function(){return c().x(s).y(e)},h.defined=function(t){return arguments.length?(a="function"===typeof t?t:ks(!!t),h):a},h.curve=function(t){return arguments.length?(o=t,null!=n&&(r=o(n)),h):o},h.context=function(t){return arguments.length?(null==t?n=r=null:r=o(n=t),h):n},h}Ls.prototype=Rs.prototype,Object.defineProperty(Ns,"name",{value:"default",configurable:!0}),Object.defineProperty(zs,"name",{value:"default",configurable:!0});class Ys extends ws{constructor(){super(...arguments),this._strokeGenerator=Ns(),this._fillGenerator=zs(),this.strokes=this.addDisposer(new rt(Lt.new({}),()=>ee._new(this._root,{themeTags:Ft.kE(this.strokes.template.get("themeTags",[]),["line","series","stroke"])},[this.strokes.template]))),this.fills=this.addDisposer(new rt(Lt.new({}),()=>ee._new(this._root,{themeTags:Ft.kE(this.strokes.template.get("themeTags",[]),["line","series","fill"])},[this.fills.template]))),this._previousPoint=[0,0,0,0],this._dindex=0,this._sindex=0}_afterNew(){this._fillGenerator.y0(function(t){return t[3]}),this._fillGenerator.x0(function(t){return t[2]}),this._fillGenerator.y1(function(t){return t[1]}),this._fillGenerator.x1(function(t){return t[0]}),super._afterNew()}makeStroke(t){const e=this.mainContainer.children.push(t.make());return t.push(e),e}makeFill(t){const e=this.mainContainer.children.push(t.make());return t.push(e),e}_updateChildren(){this._strokeTemplate=void 0,this._fillTemplate=void 0;let t=this.get("xAxis"),e=this.get("yAxis");if(this.isDirty("stroke")){const t=this.get("stroke");this.strokes.template.set("stroke",t);const e=this._legendStroke;e&&e.states.lookup("default").set("stroke",t)}if(this.isDirty("fill")){const t=this.get("fill");this.fills.template.set("fill",t);const e=this._legendFill;e&&e.states.lookup("default").set("fill",t)}if(this.isDirty("fillPattern")){const t=this.get("fillPattern");this.fills.template.set("fillPattern",t);const e=this._legendFill;e&&e.states.lookup("default").set("fillPattern",t)}if(this.isDirty("curveFactory")){const t=this.get("curveFactory");t&&(this._strokeGenerator.curve(t),this._fillGenerator.curve(t))}
1if(t.inited&&e.inited){if(this._axesDirty||this._valuesDirty||this._stackDirty||this.isDirty("vcx")||this.isDirty("vcy")||this._sizeDirty||this.isDirty("connect")||this.isDirty("curveFactory")){const t=this.dataItems;this.fills.each(t=>{t.setPrivate("visible",!1)}),this.strokes.each(t=>{t.setPrivate("visible",!1)}),this.axisRanges.each(t=>{let e=t.fills;e&&e.each(t=>{t.setPrivate("visible",!1)});let i=t.strokes;i&&i.each(t=>{t.setPrivate("visible",!1)})});let e=this.startIndex(),i=this.strokes.template.get("templateField"),s=this.fills.template.get("templateField"),a=!0,n=!0;i&&(a=!1),s&&(n=!1);for(let l=e-1;l>=0;l--){let o=t[l],r=!0,h=o.dataContext;i&&h[i]&&(a=!0),s&&h[s]&&(n=!0);for(let t=0,e=this._valueFields.length;t<e;t++)if(!it.Et(o.get(this._valueFields[t]))){r=!1;break}if(r&&a&&n){e=l;break}}let o=t.length,r=this.endIndex();if(r<o){r++;for(let e=r;e<o;e++){let i=t[e],s=!0;for(let t=0,e=this._valueFields.length;t<e;t++)if(!it.Et(i.get(this._valueFields[t]))){s=!1;break}if(s){r=e+1;break}}}if(e>0&&e--,this._endIndex=r,this._clearGraphics(),this._sindex=0,this._dindex=e,1==o)this._startSegment(0);else while(this._dindex<r-1)this._startSegment(this._dindex),this._sindex++}}else this._skipped=!0;super._updateChildren()}_clearGraphics(){this.strokes.clear(),this.fills.clear(),this.axisRanges.each(t=>{t.fills.clear(),t.strokes.clear()})}_startSegment(t){const e=this.dataItems;let i=this._endIndex,s=i;const a=this.get("autoGapCount"),n=this.get("connect"),o=this.makeFill(this.fills),r=this._fillTemplate,l=this.fills.template;r&&r!=l&&(o.template=r),o.setPrivate("visible",!0);const h=this.makeStroke(this.strokes),c=this._strokeTemplate;c&&c!=this.strokes.template&&(h.template=c),h.setPrivate("visible",!0);let d=this.get("xAxis"),u=this.get("yAxis"),p=this.get("baseAxis"),g=this.get("vcx",1),m=this.get("vcy",1),_=this._xField,v=this._yField,f=this._xOpenField,y=this._yOpenField;const x=this.get("openValueXField"),b=this.get("openValueYField");x||(f=this._xField),b||(y=this._yField);const w=this.get("stacked"),C=d.basePosition(),k=u.basePosition();let D;D=p===u?this._yField:this._xField;const T=[];let P=[];T.push(P);const A=this.strokes.template.get("templateField"),S=this.fills.template.get("templateField");let M=this.get("locationX",.5),E=this.get("locationY",.5),I=this.get("openLocationX",M),R=this.get("openLocationY",E);const L=this.get("minDistance",0);let F,B=this.fills.template.get("visible");this.axisRanges.length>0&&(B=!0);let O=!1;(w||x||b)&&(O=!0);const N={points:P,segments:T,stacked:w,getOpen:O,basePosX:C,basePosY:k,fillVisible:B,xField:_,yField:v,xOpenField:f,yOpenField:y,vcx:g,vcy:m,baseAxis:p,xAxis:d,yAxis:u,locationX:M,locationY:E,openLocationX:I,openLocationY:R,minDistance:L};let z=this._strokeTemplate,Y=this._fillTemplate;for(F=t;F<s;F++){this._dindex=F;const i=e[F];let r=i.get(_),l=i.get(v);if(null==r||null==l?n||(P=[],T.push(P),N.points=P):this._getPoints(i,N),A){let e=i.dataContext[A];if(e){if(e instanceof Lt||(e=Lt.new(e)),this._strokeTemplate=e,F>t){s=F;break}z=e,h.template=e}}if(S){let e=i.dataContext[S];if(e){if(e instanceof Lt||(e=Lt.new(e)),this._fillTemplate=e,F>t){s=F;break}Y=e,o.template=e}}if(!n){let t=e[F+1];t&&p.shouldGap(i,t,a,D)&&(P=[],T.push(P),N.points=P)}}o.setRaw("userData",[t,F]),h.setRaw("userData",[t,F]),F===i&&this._endLine(P,T[0][0]),h&&this._drawStroke(h,T),o&&this._drawFill(o,T),this.axisRanges.each(e=>{const i=e.container,s=e.fills,a=this.makeFill(s);i&&i.children.push(a),a.setPrivate("visible",!0),this._drawFill(a,T);const n=e.strokes,o=this.makeStroke(n);i&&i.children.push(o),z&&z!=this.strokes.template&&(o.template=z),Y&&Y!=this.fills.template&&(a.template=Y),o.setPrivate("visible",!0),this._drawStroke(o,T),a.setRaw("userData",[t,F]),o.setRaw("userData",[t,F])})}_getPoints(t,e){let i=e.points,s=t.get("locationX",e.locationX),a=t.get("locationY",e.locationY);const n=this.get("exactLocationX",!1),o=this.get("exactLocationY",!1);let r=e.xAxis.getDataItemPositionX(t,e.xField,s,e.vcx,n),l=e.yAxis.getDataItemPositionY(t,e.yField,a,e.vcy,o);if(this._shouldInclude(r)){const s=this.getPoint(r,l),a=[s.x,s.y];if(s.x+=this._x,s.y+=this._y,t.set("point",s),e.fillVisible){let i=r,s=l;if(e.baseAxis===e.xAxis?s=e.basePosY:e.baseAxis===e.yAxis&&(i=e.basePosX),e.getOpen){let a=t.get(e.xOpenField),r=t.get(e.yOpenField);if(null!=a&&null!=r){let a=t.get("openLocationX",e.openLocationX),r=t.get("openLocationY",e.openLocationY);if(e.stacked){let l=t.get("stackToItemX"),h=t.get("stackToItemY");l?(i=e.xAxis.getDataItemPositionX(l,e.xField,a,l.component.get("vcx"),n),it.yr(i)&&(i=e.basePosX)):i=e.yAxis===e.baseAxis?e.basePosX:e.xAxis.getDataItemPositionX(t,e.xOpenField,a,e.vcx,n),h?(s=e.yAxis.getDataItemPositionY(h,e.yField,r,h.component.get("vcy"),o),it.yr(s)&&(s=e.basePosY)):s=e.xAxis===e.baseAxis?e.basePosY:e.yAxis.getDataItemPositionY(t,e.yOpenField,r,e.vcy,o)}else i=e.xAxis.getDataItemPositionX(t,e.xOpenField,a,e.vcx,n),s=e.yAxis.getDataItemPositionY(t,e.yOpenField,r,e.vcy,o)}}let h=this.getPoint(i,s);a[2]=h.x,a[3]=h.y}if(e.minDistance>0){const t=a[0],s=a[1],n=a[2],o=a[3],r=this._previousPoint,l=r[0],h=r[1],c=r[2],d=r[3];(Math.hypot(t-l,s-h)>e.minDistance||n&&o&&Math.hypot(n-c,o-d)>e.minDistance)&&(i.push(a),this._previousPoint=a)}else i.push(a)}}_endLine(t,e){}_drawStroke(t,e){t.get("visible")&&!t.get("forceHidden")&&t.set("draw",t=>{et.__(e,e=>{this._strokeGenerator.context(t),this._strokeGenerator(e)})})}_drawFill(t,e){t.get("visible")&&!t.get("forceHidden")&&t.set("draw",t=>{et.__(e,e=>{this._fillGenerator.context(t),this._fillGenerator(e)})})}_processAxisRange(t){super._processAxisRange(t),t.fills=new rt(Lt.new({}),()=>ee._new(this._root,{themeTags:Ft.kE(t.fills.template.get("themeTags",[]),["line","series","fill"])}
1,[this.fills.template,t.fills.template])),t.strokes=new rt(Lt.new({}),()=>ee._new(this._root,{themeTags:Ft.kE(t.strokes.template.get("themeTags",[]),["line","series","stroke"])},[this.strokes.template,t.strokes.template]))}createLegendMarker(t){const e=this.get("legendDataItem");if(e){const t=e.get("marker"),i=e.get("markerRectangle");i&&i.setPrivate("visible",!1),t.set("background",ie.new(t._root,{fillOpacity:0,fill:(0,le.yW)(0)}));const s=t.children.push(ee._new(t._root,{themeTags:["line","series","legend","marker","stroke"],interactive:!1},[this.strokes.template]));this._legendStroke=s;const a=t.children.push(ee._new(t._root,{themeTags:["line","series","legend","marker","fill"]},[this.fills.template]));this._legendFill=a;const n=this._root.interfaceColors.get("disabled");if(s.states.create("disabled",{fill:n,stroke:n}),a.states.create("disabled",{fill:n,stroke:n}),this.bullets.length>0){const e=this.bullets.getIndex(0);if(e){const i=e(t._root,this,new as(this,{legend:!0},{}));if(i){const e=i.get("sprite");e instanceof ee&&e.states.create("disabled",{fill:n,stroke:n}),e&&(e.setAll({tooltipText:void 0,tooltipHTML:void 0,focusable:void 0,focusableGroup:void 0,ariaLabel:void 0}),t.children.push(e),e.setAll({x:t.width()/2,y:t.height()/2}),t.events.on("boundschanged",()=>{e.setAll({x:t.width()/2,y:t.height()/2})}))}}}}}}Ys.className="LineSeries",Ys.classNames=ws.classNames.concat([Ys.className]);class Us extends ge{constructor(){super(...arguments),this._alwaysShow=!1,this.lineX=this.children.push(gs.new(this._root,{themeTags:["x"]})),this.lineY=this.children.push(gs.new(this._root,{themeTags:["y"]})),this.selection=this.children.push(ee.new(this._root,{themeTags:["selection","cursor"],layer:30})),this._lastPoint={x:0,y:0},this._lastPoint2={x:0,y:0},this._tooltipX=!1,this._tooltipY=!1}_afterNew(){this._settings.themeTags=Ft.kE(this._settings.themeTags,["xy","cursor"]),super._afterNew(),this.setAll({width:ht.Q2,height:ht.Q2,isMeasured:!0,position:"absolute"}),this.states.create("hidden",{visible:!0,opacity:0}),this._drawLines(),this.setPrivateRaw("visible",!1),this._disposers.push(this.setTimeout(()=>{this.setPrivate("visible",!0)},500)),this._disposers.push(this.lineX.events.on("positionchanged",()=>{this._handleXLine()})),this._disposers.push(this.lineY.events.on("positionchanged",()=>{this._handleYLine()})),this._disposers.push(this.lineX.events.on("focus",()=>this._handleLineFocus())),this._disposers.push(this.lineX.events.on("blur",()=>this._handleLineBlur())),this._disposers.push(this.lineY.events.on("focus",()=>this._handleLineFocus())),this._disposers.push(this.lineY.events.on("blur",()=>this._handleLineBlur())),Ft.xY("keyboardevents")&&this._disposers.push(Ft.q2(document,"keydown",t=>{this._handleLineMove(Ft.K(t),t.ctrlKey)}))}_setUpTouch(){const t=this.chart;t&&(t.plotContainer._display.cancelTouch="none"!=this.get("behavior"))}_handleXLine(){let t=this.lineX.x(),e=!0;(t<0||t>this.width())&&(e=!1),this.lineX.setPrivate("visible",e)}_handleYLine(){let t=this.lineY.y(),e=!0;(t<0||t>this.height())&&(e=!1),this.lineY.setPrivate("visible",e)}_handleLineMove(t,e){let i="";const s=this.chart;let a;if(s&&s.xAxes.length){this._root.focused(this.lineX)?(i="positionX",a=s.xAxes.getIndex(0)):this._root.focused(this.lineY)&&(a=s.yAxes.getIndex(0),i="positionY");let n=1;if(e&&(n=5),a){let e,s=a.get("renderer").get("inversed",!1);"ArrowRight"==t||"ArrowDown"==t?e=1:"ArrowLeft"==t||"ArrowUp"==t?e=-1:"Tab"==t&&(e=0),null!=e&&(s&&(e*=-1),this.set(i,a.nextPosition(e*n)))}}}_handleLineFocus(){this._alwaysShow=this.get("alwaysShow",!1),this.setAll({positionX:this.getPrivate("positionX",0),positionY:this.getPrivate("positionY",0),alwaysShow:!0}),this._handleLineMove("Tab")}_handleLineBlur(){(this.lineX.isFocus()||this.lineY.isFocus())&&this.setAll({positionX:void 0,positionY:void 0,alwaysShow:this._alwaysShow})}_prepareChildren(){if(super._prepareChildren(),this.isDirty("xAxis")){this._tooltipX=!1;const t=this.get("xAxis");if(t){const e=t.get("tooltip");e&&(this._tooltipX=!0,this._disposers.push(e.on("pointTo",()=>{this._updateXLine(e)})))}}if(this.isDirty("yAxis")){this._tooltipY=!1;const t=this.get("yAxis");if(t){const e=t.get("tooltip");e&&(this._tooltipY=!0,this._disposers.push(e.on("pointTo",()=>{this._updateYLine(e)})))}}}_handleSyncWith(){const t=this.chart;if(t){const e=this.get("syncWith"),i=[];e&&et.__(e,t=>{const e=t.chart;e&&i.push(e)}),t._otherCharts=i}}_updateChildren(){if(super._updateChildren(),this._handleSyncWith(),this.isDirty("positionX")||this.isDirty("positionY")){const t=this.get("positionX"),e=this.get("positionY");null==t&&null==e?this.hide(0):(this._movePoint=this.toGlobal(this._getPoint(this.get("positionX",0),this.get("positionY",0))),this.handleMove())}}_updateXLine(t){let e=zt(this._display.toLocal(t.get("pointTo",{x:0,y:0})).x,3);this._toX!=e&&(this.lineX.animate({key:"x",to:e,duration:t.get("animationDuration",0),easing:t.get("animationEasing")}),this._toX=e)}_updateYLine(t){let e=zt(this._display.toLocal(t.get("pointTo",{x:0,y:0})).y,3);this._toY!=e&&(this.lineY.animate({key:"y",to:e,duration:t.get("animationDuration",0),easing:t.get("animationEasing")}),this._toY=e)}_drawLines(){this.lineX.set("draw",t=>{t.moveTo(0,0),t.lineTo(0,this.height())}),this.lineY.set("draw",t=>{t.moveTo(0,0),t.lineTo(this.width(),0)})}
1updateCursor(){this.get("alwaysShow")&&(this._movePoint=this.toGlobal(this._getPoint(this.get("positionX",0),this.get("positionY",0)))),this.handleMove()}_setChart(t){this.chart=t,this._handleSyncWith();const e=t.plotContainer;this.events.on("boundschanged",()=>{this._disposers.push(this.setTimeout(()=>{this.updateCursor()},50))}),Ft.xY("touchevents")&&(this._disposers.push(e.events.on("click",t=>{Ft.kH(t.originalEvent)&&this._handleMove(t)})),this._setUpTouch()),this._disposers.push(e.events.on("pointerdown",t=>{this._handleCursorDown(t)})),this._disposers.push(e.events.on("globalpointerup",t=>{this._handleCursorUp(t),t.native||this.isHidden()||this._handleMove(t)})),this._disposers.push(e.events.on("globalpointermove",t=>{(this.get("syncWith")||0!=dt.HP(e._downPoints).length||t.native||!this.isHidden())&&(this._handleMove(t),Math.hypot(this._lastPoint2.x-t.point.x,this._lastPoint2.y-t.point.y)>1&&(this._handleLineBlur(),this._lastPoint2=t.point))}));const i=this.parent;i&&i.children.moveValue(this.selection)}_inPlot(t){const e=this.chart;return!!e&&e.inPlot(t)}_handleCursorDown(t){if(2==t.originalEvent.button)return;const e=t.point;let i=this._display.toLocal(e);const s=this.chart;if(this.selection.set("draw",()=>{}),s&&this._inPlot(i)){if(this._downPoint=i,"none"!=this.get("behavior")){this.selection.show();const e="selectstarted";this.events.isEnabled(e)&&this.events.dispatch(e,{type:e,target:this,originalEvent:t.originalEvent})}let e=this._getPosition(i).x,s=this._getPosition(i).y;this.setPrivate("downPositionX",e),this.setPrivate("downPositionY",s)}}_handleCursorUp(t){if(this._downPoint){const e=this.get("behavior","none");if("none"!=e){"z"===e.charAt(0)&&this.selection.hide();const i=t.point;let s=this._display.toLocal(i);const a=this._downPoint,n=this.get("moveThreshold",1);if(s&&a){let i=!1;if("zoomX"!==e&&"zoomXY"!==e&&"selectX"!==e&&"selectXY"!==e||Math.abs(s.x-a.x)>n&&(i=!0),"zoomY"!==e&&"zoomXY"!==e&&"selectY"!==e&&"selectXY"!==e||Math.abs(s.y-a.y)>n&&(i=!0),i){const e="selectended";this.events.isEnabled(e)&&this.events.dispatch(e,{type:e,target:this,originalEvent:t.originalEvent})}else{const e="selectcancelled";this.events.isEnabled(e)&&this.events.dispatch(e,{type:e,target:this,originalEvent:t.originalEvent})}}}}this._downPoint=void 0}_handleMove(t){if(this.getPrivate("visible")){const e=this.chart;if(e&&dt.HP(e.plotContainer._downPoints).length>1)return void this.set("forceHidden",!0);this.set("forceHidden",!1);const i=t.point,s=this._lastPoint;if(Math.round(s.x)===Math.round(i.x)&&Math.round(s.y)===Math.round(i.y))return;this._lastPoint=i,this.setPrivate("lastPoint",i),this.handleMove({x:i.x,y:i.y},!1,t.originalEvent)}}_getPosition(t){return{x:t.x/this.width(),y:t.y/this.height()}}handleMove(t,e,i){t||(t=this._movePoint);const s=this.get("alwaysShow");if(!t)return void this.hide(0);this._movePoint=t;let a=this._display.toLocal(t),n=this.chart;if(n&&(this._inPlot(a)||this._downPoint)){if(n._movePoint=t,this.isHidden()){this.show();const t=this.get("behavior","");"z"==t.charAt(0)&&this.selection.set("draw",()=>{})}let o=a.x,r=a.y,l=this._getPosition(a);this.setPrivate("point",a);let h=this.get("snapToSeries");this._downPoint&&(h=void 0);let c=this.get("positionX"),d=l.x;it.Et(c)&&(d=c);let u=this.get("positionY"),p=l.y;it.Et(u)&&(p=u),this.setPrivate("positionX",d),this.setPrivate("positionY",p);const g=this._getPoint(d,p);if(o=g.x,r=g.y,n.xAxes.each(t=>{t._handleCursorPosition(d,h),s&&t.handleCursorShow()}),n.yAxes.each(t=>{t._handleCursorPosition(p,h),s&&t.handleCursorShow()}),!e){n._handleCursorPosition();const e="cursormoved";this.events.isEnabled(e)&&this.events.dispatch(e,{type:e,target:this,point:t,originalEvent:i})}this._updateLines(o,r),n.arrangeTooltips()}else if(!this._downPoint&&!s){this.hide(0);const t="cursorhidden";this.events.isEnabled(t)&&this.events.dispatch(t,{type:t,target:this})}this._downPoint&&"none"!=this.get("behavior")&&this._updateSelection(a)}_getPoint(t,e){return{x:this.width()*t,y:this.height()*e}}_updateLines(t,e){this._tooltipX||this.lineX.set("x",t),this._tooltipY||this.lineY.set("y",e),this._drawLines()}_updateSelection(t){const e=this.selection,i=this.get("behavior"),s=this.width(),a=this.height();t.x<0&&(t.x=0),t.x>s&&(t.x=s),t.y<0&&(t.y=0),t.y>a&&(t.y=a),e.set("draw",e=>{const n=this._downPoint;n&&("zoomXY"===i||"selectXY"===i?(e.moveTo(n.x,n.y),e.lineTo(n.x,t.y),e.lineTo(t.x,t.y),e.lineTo(t.x,n.y),e.lineTo(n.x,n.y)):"zoomX"===i||"selectX"===i?(e.moveTo(n.x,0),e.lineTo(n.x,a),e.lineTo(t.x,a),e.lineTo(t.x,0),e.lineTo(n.x,0)):"zoomY"!==i&&"selectY"!==i||(e.moveTo(0,n.y),e.lineTo(s,n.y),e.lineTo(s,t.y),e.lineTo(0,t.y),e.lineTo(0,n.y)))})}
1_onHide(){if(this.isHidden()){let t=this.chart;t&&(t.xAxes.each(t=>{t.handleCursorHide()}),t.yAxes.each(t=>{t.handleCursorHide()}),t.series.each(t=>{t.handleCursorHide()}))}super._onHide()}_onShow(){if(!this.isHidden()){let t=this.chart;t&&(t.xAxes.each(t=>{t.handleCursorShow()}),t.yAxes.each(t=>{t.handleCursorShow()}))}super._onShow()}_dispose(){super._dispose(),this.selection.dispose()}}Us.className="XYCursor",Us.classNames=ge.classNames.concat([Us.className]);class Hs extends Re{setupDefaultRules(){super.setupDefaultRules(),this.rule("Component").setAll({interpolationDuration:600}),this.rule("Hierarchy").set("animationDuration",600),this.rule("Scrollbar").set("animationDuration",600),this.rule("Tooltip").set("animationDuration",300),this.rule("MapChart").set("animationDuration",1e3),this.rule("MapChart").set("wheelDuration",300),this.rule("Entity").setAll({stateAnimationDuration:600}),this.rule("Sprite").states.create("default",{stateAnimationDuration:600}),this.rule("Tooltip",["axis"]).setAll({animationDuration:200}),this.rule("WordCloud").set("animationDuration",500),this.rule("Polygon").set("animationDuration",600),this.rule("ArcDiagram").set("animationDuration",600)}}var Vs=Hs;class Xs extends Re{setupDefaultRules(){super.setupDefaultRules();const t=this._root.interfaceColors,e=this.rule.bind(this);e("PercentSeries").setAll({legendLabelText:"{category}",legendValueText:"{valuePercentTotal.formatNumber('0.00p')}",colors:Hi.new(this._root,{}),width:ht.Q2,height:ht.Q2}),e("PieChart").setAll({radius:(0,ht.KN)(80),startAngle:-90,endAngle:270}),e("PieSeries").setAll({alignLabels:!0,startAngle:-90,endAngle:270}),e("PieSeries").states.create("hidden",{endAngle:-90,opacity:0}),e("Slice",["pie"]).setAll({position:"absolute",isMeasured:!1,x:0,y:0,toggleKey:"active",tooltipText:"{category}: {valuePercentTotal.formatNumber('0.00p')}",strokeWidth:1,strokeOpacity:1,role:"figure",lineJoin:"round"}),e("Slice",["pie"]).states.create("active",{shiftRadius:20,scale:1}),e("Slice",["pie"]).states.create("hoverActive",{scale:1.04}),e("Slice",["pie"]).states.create("hover",{scale:1.04}),e("RadialLabel",["pie"]).setAll({textType:"aligned",radius:10,text:"{category}: {valuePercentTotal.formatNumber('0.00p')}",paddingTop:5,paddingBottom:5,populateText:!0}),e("Tick",["pie"]).setAll({location:1}),e("SlicedChart").setAll({paddingLeft:10,paddingRight:10,paddingTop:10,paddingBottom:10}),e("FunnelSeries").setAll({startLocation:0,endLocation:1,orientation:"vertical",alignLabels:!0,sequencedInterpolation:!0}),e("FunnelSlice").setAll({interactive:!0,expandDistance:0}),e("FunnelSlice").states.create("hover",{expandDistance:.15}),e("Label",["funnel"]).setAll({populateText:!0,text:"{category}: {valuePercentTotal.formatNumber('0.00p')}",centerY:ht.yP}),e("Label",["funnel","horizontal"]).setAll({centerX:0,centerY:ht.yP,rotation:-90}),e("Label",["funnel","vertical"]).setAll({centerY:ht.yP,centerX:0}),e("Tick",["funnel"]).setAll({location:1}),e("FunnelSlice",["funnel","link"]).setAll({fillOpacity:.5,strokeOpacity:0,expandDistance:-.1}),e("FunnelSlice",["funnel","link","vertical"]).setAll({height:10}),e("FunnelSlice",["funnel","link","horizontal"]).setAll({width:10}),e("PyramidSeries").setAll({valueIs:"area"}),e("FunnelSlice",["pyramid","link"]).setAll({fillOpacity:.5}),e("FunnelSlice",["pyramid","link","vertical"]).setAll({height:0}),e("FunnelSlice",["pyramid","link","horizontal"]).setAll({width:0}),e("FunnelSlice",["pyramid"]).setAll({interactive:!0,expandDistance:0}),e("FunnelSlice",["pyramid"]).states.create("hover",{expandDistance:.15}),e("Label",["pyramid"]).setAll({populateText:!0,text:"{category}: {valuePercentTotal.formatNumber('0.00p')}",centerY:ht.yP}),e("Label",["pyramid","horizontal"]).setAll({centerX:0,centerY:ht.yP,rotation:-90}),e("Label",["pyramid","vertical"]).setAll({centerY:ht.yP,centerX:0}),e("Tick",["pyramid"]).setAll({location:1}),e("FunnelSlice",["pictorial"]).setAll({interactive:!0,tooltipText:"{category}: {valuePercentTotal.formatNumber('0.00p')}"}),e("Label",["pictorial"]).setAll({populateText:!0,text:"{category}: {valuePercentTotal.formatNumber('0.00p')}",centerY:ht.yP}),e("Label",["pictorial","horizontal"]).setAll({centerX:0,centerY:ht.yP,rotation:-90}),e("Label",["pictorial","vertical"]).setAll({centerY:ht.yP,centerX:0}),e("FunnelSlice",["pictorial","link"]).setAll({fillOpacity:.5,width:0,height:0}),e("Tick",["pictorial"]).setAll({location:.5});{const i=e("Graphics",["pictorial","background"]);i.setAll({fillOpacity:.2}
1),Le(i,"fill",t,"alternativeBackground")}}}class Gs extends es{_afterNew(){this._defaultThemes.push(Xs.new(this._root)),super._afterNew(),this.chartContainer.children.push(this.seriesContainer),this.seriesContainer.children.push(this.bulletsContainer)}_processSeries(t){super._processSeries(t),this.seriesContainer.children.moveValue(this.bulletsContainer,this.seriesContainer.children.length-1)}}Gs.className="PercentChart",Gs.classNames=es.classNames.concat([Gs.className]);class qs extends Gs{constructor(){super(...arguments),this._maxRadius=1}_afterNew(){super._afterNew(),this.seriesContainer.setAll({x:ht.yP,y:ht.yP})}_prepareChildren(){super._prepareChildren();const t=this.chartContainer,e=t.innerWidth(),i=t.innerHeight(),s=this.get("startAngle",0),a=this.get("endAngle",0),n=this.get("innerRadius");let o=Gt(0,0,s,a,1);const r=e/(o.right-o.left),l=i/(o.bottom-o.top);let h={left:0,right:0,top:0,bottom:0};if(n instanceof ht.QE){let t=n.value,o=Math.min(r,l);t=Math.max(o*t,o-Math.min(i,e))/o,h=Gt(0,0,s,a,t),this.setPrivateRaw("irModifyer",t/n.value)}o=Wt([o,h]);const c=this._maxRadius;this._maxRadius=Math.min(r,l);const d=Ft.JY(this.get("radius",0),this._maxRadius);this.seriesContainer.setAll({dy:-d*(o.bottom+o.top)/2,dx:-d*(o.right+o.left)/2}),(this.isDirty("startAngle")||this.isDirty("endAngle")||c!=this._maxRadius)&&this.series.each(t=>{t._markDirtyKey("startAngle")}),(this.isDirty("innerRadius")||this.isDirty("radius"))&&this.series.each(t=>{t._markDirtyKey("innerRadius")})}radius(t){let e=Ft.JY(this.get("radius",0),this._maxRadius),i=Ft.JY(this.get("innerRadius",0),e);if(t){let s=this.series.indexOf(t),a=this.series.length,n=t.get("radius");return null!=n?i+Ft.JY(n,e-i):i+(e-i)/a*(s+1)}return e}innerRadius(t){const e=this.radius();let i=Ft.JY(this.get("innerRadius",0),e);if(i<0&&(i=e+i),t){let s=this.series.indexOf(t),a=this.series.length,n=t.get("innerRadius");return null!=n?i+Ft.JY(n,e-i):i+(e-i)/a*s}return i}_updateSize(){super._updateSize(),this.markDirtyKey("radius")}}qs.className="PieChart",qs.classNames=Gs.classNames.concat([qs.className]);class Ws extends ys{constructor(){super(...arguments),this.slicesContainer=this.children.push(ge.new(this._root,{position:"absolute",isMeasured:!1})),this.labelsContainer=this.children.push(ge.new(this._root,{position:"absolute",isMeasured:!1})),this.ticksContainer=this.children.push(ge.new(this._root,{position:"absolute",isMeasured:!1})),this._lLabels=[],this._rLabels=[],this._hLabels=[],this.slices=this.addDisposer(this._makeSlices()),this.labels=this.addDisposer(this._makeLabels()),this.ticks=this.addDisposer(this._makeTicks())}_applyThemes(t=!1){const e=this.get("colors");return e&&e.reset(),super._applyThemes(t)}makeSlice(t){const e=this.slicesContainer.children.push(this.slices.make());return e.on("fill",()=>{this.updateLegendMarker(t)}),e.on("fillPattern",()=>{this.updateLegendMarker(t)}),e.on("stroke",()=>{this.updateLegendMarker(t)}),e._setDataItem(t),t.set("slice",e),this.slices.push(e),e}makeLabel(t){const e=this.labelsContainer.children.push(this.labels.make());return e._setDataItem(t),t.set("label",e),this.labels.push(e),e}_shouldMakeBullet(t){return null!=t.get("value")}makeTick(t){const e=this.ticksContainer.children.push(this.ticks.make());return e._setDataItem(t),t.set("tick",e),this.ticks.push(e),e}_afterNew(){this.fields.push("category","fill"),super._afterNew()}_onDataClear(){const t=this.get("colors");t&&t.reset();const e=this.get("patterns");e&&e.reset()}_prepareChildren(){if(super._prepareChildren(),this._lLabels=[],this._rLabels=[],this._hLabels=[],this._valuesDirty){let t=0,e=0,i=0,s=1/0,a=0;et.__(this._dataItems,i=>{let s=i.get("valueWorking",0);t+=s,e+=Math.abs(s)}),et.__(this._dataItems,t=>{let n=t.get("valueWorking",0);n>i&&(i=n),n<s&&(s=n),a++;let o=n/e;0==e&&(o=0),t.setRaw("valuePercentTotal",100*o)}),this.setPrivateRaw("valueLow",s),this.setPrivateRaw("valueHigh",i),this.setPrivateRaw("valueSum",t),this.setPrivateRaw("valueAverage",t/a),this.setPrivateRaw("valueAbsoluteSum",e)}}show(t){const e=Object.create(null,{show:{get:()=>super.show}});return(0,ct.sH)(this,void 0,void 0,function*(){let i=[];i.push(e.show.call(this,t)),i.push(this._sequencedShowHide(!0,t)),yield Promise.all(i)})}hide(t){const e=Object.create(null,{hide:{get:()=>super.hide}});return(0,ct.sH)(this,void 0,void 0,function*(){let i=[];i.push(e.hide.call(this,t)),i.push(this._sequencedShowHide(!1,t)),yield Promise.all(i)})}
1_updateChildren(){super._updateChildren(),this._valuesDirty&&et.__(this._dataItems,t=>{t.get("label").text.markDirtyText()}),(this.isDirty("legendLabelText")||this.isDirty("legendValueText"))&&et.__(this._dataItems,t=>{this.updateLegendValue(t)}),this._arrange()}_arrange(){this._arrangeDown(this._lLabels),this._arrangeUp(this._lLabels),this._arrangeDown(this._rLabels),this._arrangeUp(this._rLabels),this._arrangeLeft(this._hLabels),this._arrangeRight(this._hLabels),et.__(this.dataItems,t=>{this._updateTick(t)})}_afterChanged(){super._afterChanged(),this._arrange()}processDataItem(t){if(super.processDataItem(t),null==t.get("fill")){let e=this.get("colors");e&&t.setRaw("fill",e.next())}if(null==t.get("fillPattern")){let e=this.get("patterns");e&&t.setRaw("fillPattern",e.next())}}showDataItem(t,e){const i=Object.create(null,{showDataItem:{get:()=>super.showDataItem}});return(0,ct.sH)(this,void 0,void 0,function*(){const s=[i.showDataItem.call(this,t,e)];it.Et(e)||(e=this.get("stateAnimationDuration",0));const a=this.get("stateAnimationEasing");let n=t.get("value");const o=t.animate({key:"valueWorking",to:n,duration:e,easing:a});o&&s.push(o.waitForStop());const r=t.get("tick");r&&s.push(r.show(e));const l=t.get("label");l&&s.push(l.show(e));const h=t.get("slice");h&&s.push(h.show(e)),h.get("active")&&h.states.applyAnimate("active"),yield Promise.all(s)})}hideDataItem(t,e){const i=Object.create(null,{hideDataItem:{get:()=>super.hideDataItem}});return(0,ct.sH)(this,void 0,void 0,function*(){const s=[i.hideDataItem.call(this,t,e)],a=this.states.create("hidden",{});it.Et(e)||(e=a.get("stateAnimationDuration",this.get("stateAnimationDuration",0)));const n=a.get("stateAnimationEasing",this.get("stateAnimationEasing")),o=t.animate({key:"valueWorking",to:0,duration:e,easing:n});o&&s.push(o.waitForStop());const r=t.get("tick");r&&s.push(r.hide(e));const l=t.get("label");l&&s.push(l.hide(e));const h=t.get("slice");h.hideTooltip(),h&&s.push(h.hide(e)),yield Promise.all(s)})}disposeDataItem(t){super.disposeDataItem(t);let e=t.get("label");e&&(this.labels.removeValue(e),e.dispose());let i=t.get("tick");i&&(this.ticks.removeValue(i),i.dispose());let s=t.get("slice");
1s&&(this.slices.removeValue(s),s.dispose())}hoverDataItem(t){const e=t.get("slice");e&&!e.isHidden()&&e.hover()}unhoverDataItem(t){const e=t.get("slice");e&&e.unhover()}updateLegendMarker(t){if(t){const e=t.get("slice");if(e){const i=t.get("legendDataItem");if(i){const t=i.get("markerRectangle");et.__(te,i=>{null!=e.get(i)&&t.set(i,e.get(i))})}}}}_arrangeDown(t){if(t){let e=this._getNextDown();t.sort((t,e)=>t.y>e.y?1:t.y<e.y?-1:0),et.__(t,t=>{const i=t.label.adjustedLocalBounds();let s=i.top;t.y+s<e&&(t.y=e-s),t.label.set("y",t.y),e=t.y+i.bottom})}}_getNextUp(){return this.labelsContainer.maxHeight()}_getNextDown(){return 0}_arrangeUp(t){if(t){let e=this._getNextUp();t.sort((t,e)=>t.y<e.y?1:t.y>e.y?-1:0),et.__(t,t=>{const i=t.label.adjustedLocalBounds();let s=i.bottom;t.y+s>e&&(t.y=e-s),t.label.set("y",t.y),e=t.y+i.top})}}_arrangeRight(t){if(t){let e=0;t.sort((t,e)=>t.y>e.y?1:t.y<e.y?-1:0),et.__(t,t=>{const i=t.label.adjustedLocalBounds();let s=i.left;t.y+s<e&&(t.y=e-s),t.label.set("x",t.y),e=t.y+i.right})}}_arrangeLeft(t){if(t){let e=this.labelsContainer.maxWidth();t.sort((t,e)=>t.y<e.y?1:t.y>e.y?-1:0),et.__(t,t=>{const i=t.label.adjustedLocalBounds();let s=i.right;t.y+s>e&&(t.y=e-s),t.label.set("x",t.y),e=t.y+i.left})}}_updateSize(){super._updateSize(),this.markDirty()}_updateTick(t){}_dispose(){super._dispose();const t=this.chart;t&&t.series.removeValue(this)}}Ws.className="PercentSeries",Ws.classNames=ys.classNames.concat([Ws.className]);const js=Math.abs,Qs=Math.atan2,Js=Math.cos,Ks=Math.max,$s=Math.min,Zs=Math.sin,ta=Math.sqrt,ea=1e-12,ia=Math.PI,sa=ia/2,aa=2*ia;function na(t){return t>1?0:t<-1?ia:Math.acos(t)}function oa(t){return t>=1?sa:t<=-1?-sa:Math.asin(t)}function ra(t){return t.innerRadius}function la(t){return t.outerRadius}function ha(t){return t.startAngle}function ca(t){return t.endAngle}function da(t){return t&&t.padAngle}
1function ua(t,e,i,s,a,n,o,r){var l=i-t,h=s-e,c=o-a,d=r-n,u=d*l-c*h;if(!(u*u<ea))return u=(c*(e-n)-d*(t-a))/u,[t+u*l,e+u*h]}function pa(t,e,i,s,a,n,o){var r=t-i,l=e-s,h=(o?n:-n)/ta(r*r+l*l),c=h*l,d=-h*r,u=t+c,p=e+d,g=i+c,m=s+d,_=(u+g)/2,v=(p+m)/2,f=g-u,y=m-p,x=f*f+y*y,b=a-n,w=u*m-g*p,C=(y<0?-1:1)*ta(Ks(0,b*b*x-w*w)),k=(w*y-f*C)/x,D=(-w*f-y*C)/x,T=(w*y+f*C)/x,P=(-w*f+y*C)/x,A=k-_,S=D-v,M=T-_,E=P-v;return A*A+S*S>M*M+E*E&&(k=T,D=P),{cx:k,cy:D,x01:-c,y01:-d,x11:k*(a/b-1),y11:D*(a/b-1)}}function ga(){var t=ra,e=la,i=ks(0),s=null,a=ha,n=ca,o=da,r=null,l=Fs(h);function h(){var h,c,d=+t.apply(this,arguments),u=+e.apply(this,arguments),p=a.apply(this,arguments)-sa,g=n.apply(this,arguments)-sa,m=js(g-p),_=g>p;if(r||(r=h=l()),u<d&&(c=u,u=d,d=c),u>ea)if(m>aa-ea)r.moveTo(u*Js(p),u*Zs(p)),r.arc(0,0,u,p,g,!_),d>ea&&(r.moveTo(d*Js(g),d*Zs(g)),r.arc(0,0,d,g,p,_));else{var v,f,y=p,x=g,b=p,w=g,C=m,k=m,D=o.apply(this,arguments)/2,T=D>ea&&(s?+s.apply(this,arguments):ta(d*d+u*u)),P=$s(js(u-d)/2,+i.apply(this,arguments)),A=P,S=P;if(T>ea){var M=oa(T/d*Zs(D)),E=oa(T/u*Zs(D));(C-=2*M)>ea?(M*=_?1:-1,b+=M,w-=M):(C=0,b=w=(p+g)/2),(k-=2*E)>ea?(E*=_?1:-1,y+=E,x-=E):(k=0,y=x=(p+g)/2)}var I=u*Js(y),R=u*Zs(y),L=d*Js(w),F=d*Zs(w);if(P>ea){var B,O=u*Js(x),N=u*Zs(x),z=d*Js(b),Y=d*Zs(b);if(m<ia)if(B=ua(I,R,z,Y,O,N,L,F)){var U=I-B[0],H=R-B[1],V=O-B[0],X=N-B[1],G=1/Zs(na((U*V+H*X)/(ta(U*U+H*H)*ta(V*V+X*X)))/2),q=ta(B[0]*B[0]+B[1]*B[1]);A=$s(P,(d-q)/(G-1)),S=$s(P,(u-q)/(G+1))}else A=S=0}k>ea?S>ea?(v=pa(z,Y,I,R,u,S,_),f=pa(O,N,L,F,u,S,_),r.moveTo(v.cx+v.x01,v.cy+v.y01),S<P?r.arc(v.cx,v.cy,S,Qs(v.y01,v.x01),Qs(f.y01,f.x01),!_):(r.arc(v.cx,v.cy,S,Qs(v.y01,v.x01),Qs(v.y11,v.x11),!_),r.arc(0,0,u,Qs(v.cy+v.y11,v.cx+v.x11),Qs(f.cy+f.y11,f.cx+f.x11),!_),r.arc(f.cx,f.cy,S,Qs(f.y11,f.x11),Qs(f.y01,f.x01),!_))):(r.moveTo(I,R),r.arc(0,0,u,y,x,!_)):r.moveTo(I,R),d>ea&&C>ea?A>ea?(v=pa(L,F,O,N,d,-A,_),f=pa(I,R,z,Y,d,-A,_),r.lineTo(v.cx+v.x01,v.cy+v.y01),A<P?r.arc(v.cx,v.cy,A,Qs(v.y01,v.x01),Qs(f.y01,f.x01),!_):(r.arc(v.cx,v.cy,A,Qs(v.y01,v.x01),Qs(v.y11,v.x11),!_),r.arc(0,0,d,Qs(v.cy+v.y11,v.cx+v.x11),Qs(f.cy+f.y11,f.cx+f.x11),_),r.arc(f.cx,f.cy,A,Qs(f.y11,f.x11),Qs(f.y01,f.x01),!_))):r.arc(0,0,d,w,b,_):r.lineTo(L,F)}else r.moveTo(0,0);if(r.closePath(),h)return r=null,h+""||null}return h.centroid=function(){var i=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,s=(+a.apply(this,arguments)+ +n.apply(this,arguments))/2-ia/2;return[Js(s)*i,Zs(s)*i]},h.innerRadius=function(e){return arguments.length?(t="function"===typeof e?e:ks(+e),h):t},h.outerRadius=function(t){return arguments.length?(e="function"===typeof t?t:ks(+t),h):e},h.cornerRadius=function(t){return arguments.length?(i="function"===typeof t?t:ks(+t),h):i},h.padRadius=function(t){return arguments.length?(s=null==t?null:"function"===typeof t?t:ks(+t),h):s},h.startAngle=function(t){return arguments.length?(a="function"===typeof t?t:ks(+t),h):a},h.endAngle=function(t){return arguments.length?(n="function"===typeof t?t:ks(+t),h):n},h.padAngle=function(t){return arguments.length?(o="function"===typeof t?t:ks(+t),h):o},h.context=function(t){return arguments.length?(r=null==t?null:t,h):r},h}Object.defineProperty(ga,"name",{value:"default",configurable:!0});class ma extends ee{constructor(){super(...arguments),this.ix=0,this.iy=0,this._generator=ga()}_getTooltipPoint(){let t=this.get("tooltipX"),e=this.get("tooltipY"),i=0,s=0;it.Et(t)&&(i=t),it.Et(e)&&(s=e);let a=this.get("radius",0),n=this.get("innerRadius",0),o=this.get("dRadius",0),r=this.get("dInnerRadius",0);return a+=o,n+=r,n<0&&(n=a+n),t instanceof ht.QE&&(i=this.ix*(n+(a-n)*t.value)),e instanceof ht.QE&&(s=this.iy*(n+(a-n)*e.value)),this.get("arc")>=360&&0==n&&(i=0,s=0),{x:i,y:s}}_beforeChanged(){super._beforeChanged(),(this.isDirty("radius")||this.isDirty("arc")||this.isDirty("innerRadius")||this.isDirty("startAngle")||this.isDirty("dRadius")||this.isDirty("dInnerRadius")||this.isDirty("cornerRadius")||this.isDirty("shiftRadius"))&&(this._clear=!0)}_changed(){if(super._changed(),this._clear){let t=this.get("startAngle",0),e=this.get("arc",0);const i=this._generator;e<0&&(t+=e,e*=-1),e>.1&&i.cornerRadius(this.get("cornerRadius",0)),i.context(this._display);let s=this.get("radius",0),a=this.get("innerRadius",0),n=this.get("dRadius",0),o=this.get("dInnerRadius",0);s+=n,a+=o,a<0&&(a=s+a),i({innerRadius:a,outerRadius:s,startAngle:(t+90)*Ot,endAngle:(t+e+90)*Ot});let r=t+e/2;this.ix=Vt(r),this.iy=Ht(r);const l=this.get("shiftRadius",0);this.setRaw("dx",this.ix*l),this.setRaw("dy",this.iy*l),this.markDirtyPosition()}}}
1ma.className="Slice",ma.classNames=ee.classNames.concat([ma.className]);class _a extends me{constructor(){super(...arguments),this._display=this._root._renderer.makeRadialText("",this.textStyle)}_afterNew(){super._afterNew()}_beforeChanged(){super._beforeChanged(),this._display.clear(),this.isDirty("textType")&&(this._display.textType=this.get("textType"),this.markDirtyBounds()),this.isDirty("radius")&&(this._display.radius=this.get("radius"),this.markDirtyBounds()),this.isDirty("startAngle")&&(this._display.startAngle=(this.get("startAngle",0)+90)*Ot,this.markDirtyBounds()),this.isDirty("inside")&&(this._display.inside=this.get("inside"),this.markDirtyBounds()),this.isDirty("orientation")&&(this._display.orientation=this.get("orientation"),this.markDirtyBounds()),this.isDirty("kerning")&&(this._display.kerning=this.get("kerning"),this.markDirtyBounds())}}_a.className="RadialText",_a.classNames=me.classNames.concat([_a.className]);class va extends we{constructor(){super(...arguments),this._flipped=!1}_afterNew(){this._textKeys.push("textType","kerning"),super._afterNew()}_makeText(){this._text=this.children.push(_a.new(this._root,{}))}baseRadius(){const t=this.getPrivate("radius",0),e=this.getPrivate("innerRadius",0),i=this.get("baseRadius",0);return e+Ft.JY(i,t-e)}radius(){const t=this.get("inside",!1);return this.baseRadius()+this.get("radius",0)*(t?-1:1)}_updateChildren(){if(super._updateChildren(),this.isDirty("baseRadius")||this.isPrivateDirty("radius")||this.isPrivateDirty("innerRadius")||this.isDirty("labelAngle")||this.isDirty("radius")||this.isDirty("inside")||this.isDirty("orientation")||this.isDirty("textType")){const t=this.get("textType","adjusted"),e=this.get("inside",!1),i=this.get("orientation");let s=Xt(this.get("labelAngle",0));this._text.set("startAngle",this.get("labelAngle",0)),this._text.set("inside",e);const a=Ht(s),n=Vt(s);let o=this.baseRadius(),r=this.radius();if(this._display.angle=0,"circular"==t)this.setAll({paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}),this.setRaw("x",void 0),this.setRaw("y",void 0),this._text.set("orientation",i),this._text.set("radius",r);else{0==o&&(s=0,r=0);let e=r*n,l=r*a;"radial"==t?(this.setRaw("x",e),this.setRaw("y",l),s<90||s>270||"auto"!=i?(this._display.angle=s,this._flipped=!1):(this._display.angle=s+180,this._flipped=!0),this._dirty.rotation=!1):"adjusted"==t?(this.setRaw("centerX",ht.yP),this.setRaw("centerY",ht.yP),this.setRaw("x",e),this.setRaw("y",l)):"regular"==t&&(this.setRaw("x",e),this.setRaw("y",l))}this.markDirtyPosition(),this.markDirtyBounds()}}_updatePosition(){const t=this.get("textType","regular"),e=this.get("inside",!1);let i=0,s=0,a=this.get("labelAngle",0),n=this.localBounds(),o=n.right-n.left,r=n.bottom-n.top;if("radial"==t){if(this._flipped){let t=this.get("centerX");t instanceof ht.QE&&(o*=1-2*t.value),i=o*Vt(a),s=o*Ht(a)}}else e||"adjusted"!=t||(i=o/2*Vt(a),s=r/2*Ht(a));this.setRaw("dx",i),this.setRaw("dy",s),super._updatePosition()}get text(){return this._text}}va.className="RadialLabel",va.classNames=we.classNames.concat([va.className]);class fa extends Ws{_makeSlices(){return new rt(Lt.new({}),()=>ma._new(this._root,{themeTags:Ft.kE(this.slices.template.get("themeTags",[]),["pie","series"])},[this.slices.template]))}_makeLabels(){return new rt(Lt.new({}),()=>va._new(this._root,{themeTags:Ft.kE(this.labels.template.get("themeTags",[]),["pie","series"])},[this.labels.template]))}_makeTicks(){return new rt(Lt.new({}),()=>us._new(this._root,{themeTags:Ft.kE(this.ticks.template.get("themeTags",[]),["pie","series"])},[this.ticks.template]))}processDataItem(t){super.processDataItem(t);const e=this.makeSlice(t);e.on("scale",()=>{this._updateTick(t)}),e.on("shiftRadius",()=>{this._updateTick(t)}),e.events.on("positionchanged",()=>{this._updateTick(t)});const i=this.makeLabel(t);i.events.on("positionchanged",()=>{this._updateTick(t)}),this.makeTick(t),e.events.on("positionchanged",()=>{i.markDirty()})}_getNextUp(){const t=this.chart;return t?t._maxRadius:this.labelsContainer.maxHeight()/2}_getNextDown(){const t=this.chart;return t?-t._maxRadius:-this.labelsContainer.maxHeight()/2}_prepareChildren(){super._prepareChildren();const t=this.chart;if(t){if(this.isDirty("alignLabels")){let t=this.labels.template;if(this.get("alignLabels"))t.set("textType","aligned");else{let e=t.get("textType");null!=e&&"aligned"!=e||t.set("textType","adjusted")}}
1if(this._valuesDirty||this.isDirty("radius")||this.isDirty("innerRadius")||this.isDirty("startAngle")||this.isDirty("endAngle")||this.isDirty("alignLabels")){this.markDirtyBounds();const e=this.get("startAngle",t.get("startAngle",-90)),i=this.get("endAngle",t.get("endAngle",270)),s=i-e;let a=e;const n=t.radius(this);this.setPrivateRaw("radius",n);let o=t.innerRadius(this)*t.getPrivate("irModifyer",1);o<0&&(o=n+o),et.__(this._dataItems,t=>{this.updateLegendValue(t);let e=s*t.get("valuePercentTotal")/100;const i=t.get("slice");if(i){i.set("radius",n),i.set("innerRadius",o),i.set("startAngle",a),i.set("arc",e);const s=t.get("fill");i._setDefault("fill",s),i._setDefault("stroke",s);const r=t.get("fillPattern");i._setDefault("fillPattern",r)}let r=Xt(a+e/2);const l=t.get("label");if(l&&(l.setPrivate("radius",n),l.setPrivate("innerRadius",o),l.set("labelAngle",r),"aligned"==l.get("textType"))){let t=n+l.get("radius",0),e=n*Ht(r);r>90&&r<=270?(l.isHidden()||l.isHiding()||this._lLabels.push({label:l,y:e}),t*=-1,t-=this.labelsContainer.get("paddingLeft",0),l.set("centerX",ht.Q2),l.setPrivateRaw("left",!0)):(l.isHidden()||l.isHiding()||this._rLabels.push({label:l,y:e}),t+=this.labelsContainer.get("paddingRight",0),l.set("centerX",0),l.setPrivateRaw("left",!1)),l.set("x",t),l.set("y",n*Ht(r))}a+=e,this._updateTick(t)})}}}_updateTick(t){const e=t.get("tick"),i=t.get("label"),s=t.get("slice"),a=e.get("location",1);if(e&&i&&s){const t=(s.get("shiftRadius",0)+s.get("radius",0))*s.get("scale",1)*a,n=i.get("labelAngle",0),o=Vt(n),r=Ht(n),l=this.labelsContainer,h=l.get("paddingLeft",0),c=l.get("paddingRight",0);let d=0,u=0;d=i.x(),u=i.y();let p=[];if(0!=d||0!=u){if("circular"==i.get("textType")){const t=i.radius()-i.get("paddingBottom",0),e=i.get("labelAngle",0);d=t*Vt(e),u=t*Ht(e)}let e=-c;i.getPrivate("left")&&(e=h),p=[{x:s.x()+t*o,y:s.y()+t*r},{x:d+e,y:u},{x:d,y:u}]}e.set("points",p)}}_positionBullet(t){const e=t.get("sprite");if(e){const i=e.dataItem,s=i.get("slice");if(s){const i=s.get("innerRadius",0),a=s.get("radius",0),n=s.get("startAngle",0),o=s.get("arc",0),r=t.get("locationX",.5),l=t.get("locationY",.5),h=n+o*r,c=i+(a-i)*l;e.setAll({x:Vt(h)*c,y:Ht(h)*c})}}}}fa.className="PieSeries",fa.classNames=Ws.classNames.concat([fa.className]);var ya=function(){var t=this,e=t._self._c;return e("div",[e("div",{staticClass:"chart-result"},[e("chartFcVue",{attrs:{valeurX:t.valeurX,tabRowFc:t.TabRowFC,defaultOpenedDetails:t.DefaultOpenedDetails}}),e("chartCcVue",{attrs:{valeurX:t.ValeurCCX,tabRowCc:t.TabRowCC,defaultOpenedDetails:t.DefaultOpenedDetails}})],1),e("div",[e("div",{staticClass:"columns is-multiline"},[e("div",{staticClass:"column is-2"},[e("div",{staticClass:"circleFCMoyenne1"},[e("div",{staticClass:"circleFCMoyenne2"},[e("p",{staticClass:"circleFCMoyenne3 has-text-weight-bold"},[e("span",{staticClass:"is-size-4"},[t._v(" "+t._s(t.fcMoyenne?t.fcMoyenne:"0")+" ")]),t._v(" bpm ")])])]),e("p",{staticClass:"has-text-weight-semibold has-text-black has-text-centered is-margin-t-20"},[t._v(" "+t._s(t.$t("moyenneFrequenceCardiaque"))+" ")])]),e("div",{staticClass:"column is-2"},[e("div",{staticClass:"circleFCMoyenne1"},[e("div",{staticClass:"circleFCMoyenne4",style:{"background-color":t.couleurCCMoyenne}},[e("p",{staticClass:"circleFCMoyenne3 has-text-weight-bold"},[e("span",{staticClass:"is-size-4"},[t._v(" "+t._s(t.ccMoyenne?t.ccMoyenne:"0")+" ")]),t._v(" % ")])])]),e("p",{staticClass:"has-text-weight-semibold has-text-black has-text-centered is-margin-t-20"},[t._v(" "+t._s(t.$t("moyenneCc"))+" ")])]),e("div",{staticClass:"column is-5",staticStyle:{display:"flex","text-align":"center","flex-direction":"column","justify-content":"space-around","padding-bottom":"0%"}},[e("div",{staticClass:"columns"},[e("div",{staticClass:"column is-size-4 has-text-centered"},[t._v(" "+t._s(t.valeurRouge?t.valeurRouge:"0")+"% "),e("div",{staticClass:"respi_progress_bar_result"},[e("div",{staticClass:"cc_red_result",style:{width:t.valeurRouge?t.valeurRouge+"%":"0%"}})])]),e("div",{staticClass:"column is-size-4 has-text-centered"},[t._v(" "+t._s(t.valeurOrange?t.valeurOrange:"0")+" % "),e("div",{staticClass:"respi_progress_bar_result"},[e("div",{staticClass:"cc_orange_result",style:{width:t.valeurOrange?t.valeurOrange+"%":"0%"}})])]),e("div",{staticClass:"column is-size-4 has-text-centered"},[t._v(" "+t._s(t.valeurVerte?t.valeurVerte:"0")+"% "),e("div",{staticClass:"respi_progress_bar_result"},[e("div",{staticClass:"cc_green_result",style:{width:t.valeurVerte?t.valeurVerte+"%":"0%"}})])])]),e("p",{staticClass:"has-text-black has-text-centered has-text-weight-semibold"},[t._v(" % "+t._s(t.$t("pourcentTempsPasseZoneCoherence"))+" ")])]),e("div",{staticClass:"column is-3",staticStyle:{display:"flex","text-align":"center","flex-direction":"column","justify-content":"space-around","padding-bottom":"4%"}},[e("div",[e("span",{staticClass:"has-text-weight-bold has-text-black has-text-centered is-size-2"},[t._v(" "+t._s(t.$t("duree"))+" ")]),e("span",{staticClass:"has-text-weight-bold has-text-centered is-size-2 labelChrono",staticStyle:{border:"2px s
1olid rgba(255, 255, 255, 0.5)"}},[t._v(" "+t._s(t.timeOfExercice)+" ")])])])])])])},xa=[],ba=function(){var t=this,e=t._self._c;return e("div",[e("div",{staticClass:"is-card-folder-resultat"},[e("div",{staticClass:"padding-10"},[t.resultatCoherenceCardiaque&&t.resultatCoherenceCardiaque.length>0?e("div",[e("b-table",{attrs:{data:t.resultatCoherenceCardiaque,bordered:!0,narrowed:!0,striped:!0,"opened-detailed":t.defaultOpenedDetails,detailed:"","detail-key":"id","show-detail-icon":!1},scopedSlots:t._u([{key:"header",fn:function(i){return[e("div",[t._v(t._s(i.column.label))])]}},{key:"default",fn:function(s){return[e("b-table-column",{staticClass:"has-text-centered",attrs:{label:"Date"}},[t._v(" "+t._s(new Date(s.row.updatedAt).toLocaleDateString())+" ")]),e("b-table-column",{staticClass:"has-text-centered",attrs:{label:"Séance"}},[s.row.attributes.link?e("p",[t._v(" "+t._s(s.row.attributes.link.attributes.parent_folder.attributes.name)+" ")]):s.row.attributes.file?e("p",[t._v(" "+t._s(t.$t("entraintementLibre"))+" ")]):t._e()]),e("b-table-column",{staticClass:"has-text-centered",attrs:{label:"Exercice"}},[s.row.attributes.link?e("p",[t._v(" "+t._s(s.row.attributes.link.attributes.file.attributes.name)+" ")]):s.row.attributes.file?e("p",[t._v(" "+t._s(s.row.attributes.file.attributes.name)+" ")]):t._e()]),t.protocolesLibreSelected?e("b-table-column",{staticClass:"has-text-centered",attrs:{label:"Difficulté"}},[e("p",[t._v(t._s(t.valeurDifficulte(s.row)))])]):t._e(),e("b-table-column",{staticClass:"has-text-centered",attrs:{label:"Fréquence cardiaque moyenne"}},[t._v(" "+t._s(t.valeurFCMoyenne(s.row))+" ")]),e("b-table-column",{staticClass:"has-text-centered",attrs:{label:"Moyenne de cohérence cardiaque"}},[t._v(" "+t._s(t.valeurCCMoyenne(s.row))+"% ")]),e("b-table-column",{staticClass:"has-text-centered",attrs:{label:"Relecturee"}},[e("button",{staticClass:"expert_bouton_relecture",class:{expert_bouton_relecture_deploye:t.defaultOpenedDetails.find(t=>t===s.row.id)},attrs:{"aria-label":"resultat"},on:{click:function(e){return t.showRelecture(s.row)}}},[e("img",{staticStyle:{"margin-left":"2px"},attrs:{src:i(42005),width:"24px"}})])]),e("b-table-column",{attrs:{label:"Supprimer"}},[e("img",{staticStyle:{"margin-left":"27px","margin-top":"2px"},attrs:{src:i(40716),width:"27px"},on:{click:function(e){return t.deleteRelecture(s.row.id)}}})])]}},{key:"detail",fn:function(i){return[i.row.attributes.comment&&""!==i.row.attributes.comment?e("div",[e("p",{staticStyle:{color:"white","font-size":"medium"}},[t._v("Commentaire :")]),e("p",[t._v(" "+t._s(i.row.attributes.comment)+" ")])]):t._e(),e("div",{staticStyle:{"text-align":"center",padding:"10px"}},[e("button",{staticStyle:{background:"#46bfcb","border-radius":"5px",color:"white","font-size":"medium"},on:{click:function(e){return t.showRelecture(i.row,!0)}}},[t._v(" Imprimer ")]),e("button",{staticStyle:{background:"#46bfcb","border-radius":"5px",color:"white","font-size":"medium"},on:{click:function(e){return t.downloadRelecture(i.row,!0)}}},[t._v(" Télécharger ")])]),e("div",{staticClass:"columns is-multiline"},[e("div",{staticClass:"column is-2"},[e("div",{staticClass:"circleFCMoyenne1"},[e("div",{staticClass:"circleFCMoyenne2"},[e("p",{staticClass:"circleFCMoyenne3 has-text-weight-bold"},[e("span",{staticClass:"is-size-4"},[t._v(" "+t._s(i.row.fcMoyenne?i.row.fcMoyenne:"0")+" ")]),t._v(" bpm ")])])]),e("p",{staticClass:"has-text-weight-semibold has-text-white has-text-centered is-margin-t-20"},[t._v(" "+t._s(t.$t("moyenneFrequenceCardiaque"))+" ")]),e("p",{staticClass:"has-text-weight-bold has-text-white has-text-centered is-margin-t-50 is-size-4"},[t._v(" "+t._s(t.$t("duree"))+" ")]),e("p",{staticClass:"has-text-weight-bold has-text-cyan has-text-centered is-margin-t-20 is-size-4 labelChrono"},[t._v(" "+t._s(i.row.labelChrono)+" ")])]),e("div",{staticClass:"column is-8"},[e("div",{staticClass:"chart-result"},[t.chart&&t.resultatObjet?e("chart-fc-vue",{attrs:{valeurX:t.valeurX,tabRowFc:t.tabRowFc,defaultOpenedDetails:t.defaultOpenedDetails[0]}}):t._e(),t.chart&&t.resultatObjet?e("chart-cc-vue",{attrs:{valeurX:t.valeurCcX,tabRowCc:t.tabRowCc,defaultOpenedDetails:t.defaultOpenedDetails[0]}}):t._e()],1),e("div",{staticClass:"columns"},[e("div",{staticClass:"column is-size-4 has-text-centered"},[t._v(" "+t._s(i.row.valeurRouge?i.row.valeurRouge:"0")+"% "),e("div",{staticClass:"respi_progress_bar_result"},[e("div",{staticClass:"cc_red_result",style:{width:i.row.valeurRouge?i.row.valeurRouge+"%":"0%"}})])]),e("div",{staticClass:"column is-size-4 has-text-centered"},[t._v(" "+t._s(i.row.valeurOrange?i.row.valeurOrange:"0")+" % "),e("div",{staticClass:"respi_progress_bar_result"},[e("div",{staticClass:"cc_orange_result",style:{width:i.row.valeurOrange?i.row.valeurOrange+"%":"0%"}})])]),e("div",{staticClass:"column is-size-4 has-text-centered"},[t._v(" "+t._s(i.row.valeurVerte?i.row.valeurVerte:"0")+"% "),e("div",{staticClass:"respi_progress_bar_result"},[e("div",{staticClass:"cc_green_result",style:{width:i.row.valeurVerte?i.row.valeurVerte+"%":"0%"}})])])]),e("p",{staticClass:"has-text-white has-text-centered has-text-weight-semibold"},[t._v(" % "+t._s(t.$t("pourcentTempsPasseZoneCoherence"))+" ")])]),e("div",{staticClass:"column is-2"},[e("div",{staticClass:"circleFCMoyenne1"},[e("div",{staticClass:"circleFCMoyenne4",style:{"background-color":i.row.couleurCCMoyenne}},[e("p",{staticClass:"circleFCMoyenne3 has-text-weight-bold"},[e("span",{staticClass:"is-size-4"},[t._v(" "+t._s(i.row.ccMoyenne?i.row.ccMoyenne:"0")+" ")]),t._v(" % ")])])]),e("p",{staticClass:"has-text-weight-semibold has-text-white has-text-centered is-margin-t-20"},[t._v(" "+t._s(t.$t("moyenneCc"))+" ")])])])]}}],null,!1,2499539139)})],1):e("div",[t.isLoading?e("div",[t._v("Chargement en cours")]):e("div",[t._v("Aucun résultat.")])])])])])},wa=[],Ca=i(13596),ka=i(33833),Da=i.n(ka),Ta=i(95093),Pa=i.n(Ta),Aa=i(9894),Sa=i(54569),Ma=i(14943),Ea=i(48971),Ia=i(84668),Ra=i(37846),La={name:"suivieCc",props:["utilisateurs","userSelected","folders","userParticulier","IUserSelected","fileCCId","idprotocole"],components:{chartFcVue:Ea.A,chartCcVue:Ia.A},data(){return{imageChartFc:null,imageChartCc:null,props:null,isLoading:!1,isCardResultat:!1,FoldersBrique:null,nbUtilisateur:{},showFront:!0,foldersUtilisateursSelected:null,resultatCoherenceCardiaque:[],defaultOpenedDetails:[],tempsZone1:0,tempsZone2:0,tempsZone3:0,valeurCCCourante:0,valeurTempsPrecedent:0,labelProfil:null,profil:null,cpm:null,valeurX:[],tabRowCc:[],tabRowFc:[],chart:!1,valeurCcX:[],resultatObjet:null,protocolesLibreSelected:!1,chartProtocoleLibre:!1,tabRowProtocoleLibre:{},tabExo1:[],tabExo2:[],tabExo3:[],chartProtocoleGuide:!1,userSelected2:"tous",cloneFoldersBrique:null,exercices:[],disabledStats:!1,foldersTherapie:null,foldersCardiaque:null,foldersVie:null,foldersQcm:null,openEvaluationsPsychotechniques:!0,openQcm:!0,openTherapiesNonMedicamenteuses:!0,openAccompagnementPsychophysiologique:!0,dataUrl:"",nomTherapeute:"",utilisateurSelectionne:null,indefinteToast:null,titreFolderQcm:"",idExercice:"",protocole:"",fileID:""}},methods:{deleteRelecture(t){this.idExercice=t;const e=r().Object.extend("file_done"),i=new(r().Query)(e);let s=i.first();r().masterKey="myMasterKey",i.equalTo("objectId",this.idExercice),s.then(function(t){return r().Ob
1ject.destroyAll(t)}),this.$buefy.toast.open({duration:3e3,message:"Avancement exercice supprimé avec succès.",type:"is-success"}),this.$emit("closeModal",s.id)},async traitement(t){var e=d()(this.cloneFoldersBrique);this.FoldersBrique=null,this.foldersTherapie=null,this.foldersCardiaque=null,this.foldersVie=null,this.foldersQcm=null,await(0,Sa.A)(e,async t=>{this.folders.find(e=>{if(t.objectId===e.id&&e.deverrouille)return e})&&(t.deverrouille=!0),await(0,Sa.A)(t.foldersProtocole,async t=>{t.somme=0,t.sommeCabinet=0,t.sommeLicence=0,t.sommeAffiliation=0})});var i=JSON.stringify(t.filter(t=>void 0!==t.attributes.acces_donnees_therapeute&&t.attributes.acces_donnees_therapeute)),s=await r().Cloud.run("analyseStat",{utilisateurs:i,foldersBrique:e}),a=JSON.parse(s);this.FoldersBrique=d()(a),this.foldersTherapie=d()(this.FoldersBrique.filter(t=>{if(t.deverrouille&&t.theme&&1===t.theme.ordre)return t})),this.foldersCardiaque=this.FoldersBrique.filter(t=>{if(t.deverrouille&&t.name&&4===t.theme.ordre)return t}),this.foldersVie=this.FoldersBrique.filter(t=>{if(t.deverrouille&&t.theme&&5===t.theme.ordre)return t}),this.foldersQcm=this.FoldersBrique.filter(t=>{if(t.deverrouille&&t.theme&&7===t.theme.ordre)return t});var n=new(r().Query)("domaine");n.equalTo("nom","Santé");var o=await n.first(),l=new(r().Query)("theme");l.equalTo("domaine",o),l.equalTo("ordre",7);var h=await l.first();this.titreFolderQcm=h.attributes.name},async getFileLinkCompleted(t){t=this.userSelected2,this.isLoading=!0,this.resultatCoherenceCardiaque=[],this.tabRowProtocoleLibre={label:[],data:[],color:[]},this.chartProtocoleLibre=!1,this.chartProtocoleGuide=!1;const e=r().Object.extend("file_type"),i=r().Object.extend("file"),s=r().Object.extend("link"),a=r().Object.extend("link_completed"),n=r().Object.extend("folder"),o=r().Object.extend("folder_type"),l=r().Object.extend("file_done"),h=new(r().Query)(e),c=new(r().Query)(i),d=new(r().Query)(s),u=new(r().Query)(a),p=new(r().Query)(n),g=new(r().Query)(o),m=new(r().Query)(l);if(this.protocolesLibreSelected){if(h.containedIn("name",["Module Expert","Jeux"]),c.matchesQuery("type",h),c.containedIn("objectId",[this.fileID]),g.equalTo("name","Exercices libres"),p.matchesQuery("type",g),m.matchesQuery("file",c),m.matchesQuery("protocole",p),"tous"!==t){m.equalTo("user",t),m.include("file"),m.include("protocole");let e=await m.find();e=(0,Ra.c)(e,"updatedAt"),await e.filter(function(t){if(void 0===t.attributes.resultatJeux)return!1;try{const e=JSON.parse(t.attributes.resultatJeux);return 0!==e.ArrayTacho.length}catch(e){return!1}}).forEach(t=>{this.resultatCoherenceCardiaque.push(t);const e=this.valeurCCMoyenne(t),i=Pa()(t.updatedAt);let s="";s=e<60?"#FE0000":e<90?"#FFC801":"#51C901",0!==e&&(this.tabRowProtocoleLibre.label.push(i.format("DD/MM/YYYY")+"- cc:"+e+" - "+t.attributes.file.attributes.name),this.tabRowProtocoleLibre.data.push(e),this.tabRowProtocoleLibre.color.push(s))}),this.chartProtocoleLibre=!0}}else{h.containedIn("name",["Module Expert","Jeux"]),c.matchesQuery("type",h),c.containedIn("objectId",[this.fileID]),d.matchesQuery("file",c),u.equalTo("user",t),u.matchesQuery("link",d),u.include("link"),u.include("link.file"),u.include("link.parent_folder");let e=await u.find();e=(0,Ra.c)(e,"updatedAt"),this.tabExo1={label:[],data:[],color:[]},this.tabExo2={label:[],data:[],color:[]},this.tabExo3={label:[],data:[],color:[]},await(0,Sa.A)(e.filter(function(t){if(void 0===t.attributes.resultatJeux)return!1;try{const e=JSON.parse(t.attributes.resultatJeux);return 0!==e.ArrayTacho.length}catch(e){return!1}}),async t=>{this.resultatCoherenceCardiaque.push(t);const e=this.valeurCCMoyenne(t),i=Pa()(t.updatedAt);let s="";s=e<60?"#FE0000":e<90?"#FFC801":"#51C901";const a=await(0,Ma.fc)("link","folder",t.attributes.link.attributes.parent_folder);a.attributes.folder.attributes.name.includes("Installer")&&e&&(this.tabExo1.label.push(i.format("DD/MM/YYYY")+"- cc:"+e+" - "+t.attributes.link.attributes.file.attributes.name),this.tabExo1.data.push(e),this.tabExo1.color.push(s)),a.attributes.folder.attributes.name.includes("Maîtriser")&&e&&(this.tabExo2.label.push(i.format("DD/MM/YYYY")+"- cc:"
1+e+" - "+t.attributes.link.attributes.file.attributes.name),this.tabExo2.data.push(e),this.tabExo3.color.push(s)),a.attributes.folder.attributes.name.includes("Ancrer")&&e&&(this.tabExo1.label.push(i.format("DD/MM/YYYY")+"- cc:"+e+" - "+t.attributes.link.attributes.file.attributes.name),this.tabExo3.data.push(e),this.tabExo3.color.push(s))}),this.chartProtocoleGuide=!0}this.resultatCoherenceCardiaque=(0,Ra.Z)(this.resultatCoherenceCardiaque,"updatedAt"),this.isLoading=!1},valeurDifficulte(t){if(!t)return"";const e=t.attributes.resultatJeux;if(!e)return 0;try{const t=JSON.parse(e),i=t.Difficulty;switch(i){case 0:return"facile";case 1:return"moyen";case 2:return"difficile"}}catch(i){return"facile"}},valeurFCMoyenne(t){if(!t)return"";const e=t.attributes.resultatJeux;if(!e)return"0bpm";try{const t=JSON.parse(e);return t.BpmCC?Math.round(t.BpmCC)+"bpm":"0bpm"}catch(i){return"0bpm"}},valeurCCMoyenne(t){if(!t)return"";const e=t.attributes.resultatJeux;if(!e)return 0;try{const t=JSON.parse(e);return t.AverageCC}catch(i){return 0}},toDataUrl(t,e,i){var s=new XMLHttpRequest;s.onload=function(){var t=new FileReader;t.onloadend=function(){e.dataUrl=t.result,i(t.result)},t.readAsDataURL(s.response)},s.open("GET",t),s.responseType="blob",s.send()},downloadRelecture(t){const e=t.attributes.resultatJeux;var i=document.createElement("a");i.setAttribute("href","data:text/plain;charset=utf-8,"+encodeURIComponent(e)),i.setAttribute("download","Donnes.json"),i.click()},showRelecture(t,e){if(this.props=t,!e&&this.defaultOpenedDetails.find(e=>e===t.id))return void(this.defaultOpenedDetails=[]);this.defaultOpenedDetails.find(e=>e===t.id)||(this.imageChartFc=null,this.imageChartCc=null),this.valeurX=[],this.tabRowCc=[],this.tabRowFc=[],this.valeurCcX=[],this.resultatObjet=null,this.defaultOpenedDetails=[t.id];const i=t.attributes.resultatJeux;if(i&&-1===i.indexOf("undefined")&&-1===i.indexOf("NaN")){switch(this.resultatObjet=JSON.parse(i),this.resultatObjet.ArrayTacho.forEach(t=>{t.x/1e3>=30&&Number.isInteger(t.x/1e3)&&(this.valeurX.push(t.x/1e3),this.tabRowFc.push(t.y))}),this.resultatObjet.TabCC.forEach(t=>{t.x/1e3>=30&&Number.isInteger(t.x/1e3)&&(this.tabRowCc.push(t.y),this.valeurCcX.push(t.x/1e3))}),this.resultatObjet.AverageCC<60?t.couleurCCMoyenne="#FE0000":this.resultatObjet.AverageCC<90?t.couleurCCMoyenne="#FFC801":t.couleurCCMoyenne="#51C901",this.analyseCC(this.resultatObjet,t),this.cpm=this.resultatObjet.Cpm,this.profil=this.resultatObjet.Profil,this.profil){case"0":this.labelProfil="Profonde";break;case"1":this.labelProfil="Basique";break;case"2":this.labelProfil="Tonique";break}void 0!==t.attributes.file&&void 0!==t.attributes.file.attributes.game_type&&(this.resultatObjet.TimeCompletion=60*this.resultatObjet.TimeCompletion),t.valeurChrono=this.resultatObjet.TimeCompletion;var s=Math.floor(t.valeurChrono/60),a=t.valeurChrono%60;t.ImageUri=this.imageChartFc,t.ImageUriCc=this.imageChartCc,t.labelChrono=(s<10?"0"+s:s)+":"+(a<10?"0"+a:a),t.realiseLe=Pa()(t.updatedAt).format("DD/MM/YYYY, HH:mm"),this.valeurInspi=this.resultatObjet.Inspi,this.valeurPauseInspi=this.resultatObjet.PauseInspi,this.valeurExpi=this.resultatObjet.Expi,this.valeurPauseExpi=this.resultatObjet.PauseExpi,t.ccMoyenne=Math.round(this.resultatObjet.AverageCC),t.fcMoyenne=Math.round(this.resultatObjet.BpmCC),t.ccMoyenneInitiale=this.resultatObjet.AverageCC,this.chart=!0,e&&setTimeout(()=>{this.exportPdfV2(t)},2e3)}},analyseCC(t,e){e.valeurRouge=t.Pct1,e.valeurOrange=t.Pct2,e.valeurVerte=t.Pct3},convertImgCc(t){this.imageChartCc=t},convertImgFc(t){this.imageChartFc=t},exportPdfV2(t){const e=JSON.parse(t.attributes.resultatJeux);var i="<!DOCTYPE html><html><head>"+document.head.innerHTML+"</head>";i+="<body>",i+='<div class="columns">',i+='<div class="column is-half">',i=i+'<div><label>Utilisateur : </label><label style="color:grey;padding-left : 2px;"> '+t.attributes.user.attributes.username+"</label></div>",i=i+'<div><label>Suivi par : </label><label style="color:grey;padding-left : 2px;"> '+this.nomTherapeute+"</label></div>",i=i+'<div><label>Séance : </label><label style="color:grey;padding-left : 2px;"> '+(void 0===t.attributes.link?t.attributes.brique.attributes.name:t.attributes.link.attributes.parent_folder.attributes.name)+"</label></div>",i=i+'<div><label>Exercice : </label><label style="color:grey;padding-left : 2px;"> '+(void 0===t.attributes.link?t.attributes.file.attributes.name:t.attributes.link.attributes.file.attributes.name)+"</label></div>",i=i+'<div><label>Durée : </label><label style="color:grey;padding-left : 2px;"> '+t.labelChrono+"</label></div>",i=i+'<div><label>Réalisé le : </label><label style="color:grey;padding-left : 2px;"> '+Pa()(t.updatedAt).format("DD/MM/YYYY, HH:mm")+"</label></div>",i+="</div>",i+='<div class="column is-half">',i+='<div style="text-align: center;color: grey;font-size: medium;"><label>Paramètres respiratoires de l\'exercice</label></div>';var s="2"==e.Profil?"TONIQUE":"0"==e.Profil?"PROFONDE":"BASIQUE";i=i+'<div layout = "row" style=" width: 33%;float: left;text-align: center;border-right: black;border-right-style: solid;border-right-width: 1px;"><div style="font-size: smaller;"><label>CPM</label></div><div style="font-size: large;
1background: darkgrey;color: turquoise;"><label>'+e.Cpm+'</label></div><div><label style="font-size: smaller;">Profil</label></div><div><label style="font-size: large;background: darkgrey;color: turquoise;">'+s+"</label></div></div>",i=i+'<div layout = "row" style=" width: 33%;float: left;text-align: center;border-right: black;border-right-style: solid;border-right-width: 1px;"><div style="font-size: smaller;"><label>INSPIRATION</label></div><div style="font-size: large;background: darkgrey;color: turquoise;"><label>'+e.Inspi+'</label></div><div style="font-size: smaller;"><label>PAUSE D\'INSPIRATION</label></div><div style="font-size: large;background: darkgrey;color: turquoise;"><label>'+e.PauseInspi+"</label></div></div>",i=i+'<div layout = "row" style = "text-align: center;" ><div style="font-size: smaller;"><label>EXPIRATION</label></div><div style="font-size: large;background: darkgrey;color: turquoise;"><label>'+e.Expi+'</label></div><div style="font-size: smaller;"><label>PAUSE D\'EXPIRATION </label></div><div style="font-size: large;background: darkgrey;color: turquoise;"><label>'+e.PauseExpi+"</label></div></div>",i+="</div>",i+="</div>",i+='<div class="columns">',i+='<div class="column" style="text-align: center;min-height:350px;">',i=i+'<img style="height: 200px" src="'+this.imageChartFc+'" />',i=i+'<img style="height: 150px" src="'+this.imageChartCc+'" />',i+="</div>",i+="</div>",i+='<div class="columns">',i+='<div class="column is-one-fifth">',i+='<div class="RondBpmCcEdition" >',i+='<div class="RondBpm2Result">',i=i+'<div style="position: relative;top: 50%; transform: translateY(-50%);"><label class="labelBpmResult">'+t.fcMoyenne+'</label><label class="labelBpmDetail">bpm</label></div>',i+="</div>",i+="</div>",i+='<div class="expert_label_battement_result_edition"><label>Moyenne fréquence cardiaque</label></div>',i+="</div>",i+='<div class="column" >',i+='<div class="columns">',i+='<div class="column">',i=i+'<div class="respi_text_bar_resultEdition"><label> '+t.valeurRouge+"%</label> </div>",i=i+'<div class="respi_progress_bar_resultEdition"><div class="cc_red_result" style="width: '+t.valeurRouge+'%;"></div>',i+="</div></div>",i+='<div class="column">',i=i+' <div class="respi_text_bar_resultEdition"><label> '+t.valeurOrange+"%</label></div>",i=i+'<div class="respi_progress_bar_resultEdition"> <div class="cc_orange_result" style="width: '+t.valeurOrange+'%;"></div>',i+="</div></div>",i+='<div class="column">',i=i+'<div class="respi_text_bar_resultEdition"><label> '+t.valeurVerte+"%</label></div>",i=i+'<div class="respi_progress_bar_resultEdition"><div class="cc_green_result" style="width: '+t.valeurVerte+'%;"></div>',i+="</div> </div>",i+="</div>",i+='<div class="columns">',i+='<div class="expert_result_zone_coherence_1Edition column is-one-fifth"></div><div class="expert_result_zone_coherence_2 column"></div><div class="expert_result_zone_coherence_3Edition column is-one-fifth"></div>',i+="</div>",i+='<div class="expert_texte_zone_coherenceEdition"><label>% DE TEMPS PASSE DANS CHAQUE ZONE DE COHERENCE</label></div>',i=i+'<div style="margin: auto; background-color: transparent;" class="columns"><div class ="column" style="border: black;border-style: solid;border-width: 1px;padding: 5px;margin: 5px;"><p><label>Commentaire : </label></p><p>'+(void 0===t.comment?"":t.comment)+"</p></div></div>",i+="</div>",i+='<div style="height: 200px;" class="column is-one-fifth">',i=i+'<div class="RondBpmCcEdition" style="background-color: '+t.couleurCCMoyenne+';">',i+='<div class="RondBpm2Result">',i=i+'<div style="position: relative;top: 50%; transform: translateY(-50%);"><label class="labelBpmResult ng-binding">'+t.ccMoyenne+'</label><label class="labelBpmDetail"> %</label></div>',i+="</div>",i+="</div>",i+='<div class="expert_label_battement_result_edition"><label>Moyenne cohérence cardiaque</label></div>',i+="</div>",i+="</div>",i+="</div>";var a="<img style='height:25px;' src='"+this.dataUrl+"'/>";i=i+"</body><footer style='background-color:#1E2C39;'><div style='width:50%;display:inline-block;'>"+a+"</div><div style='text-align:right;color:white;height:100%;width:50%;display:inline-block;'>"+Pa()().format("[Le] DD/MM/YYYY [à ] hh:mm")+"</div></footer></html>";var n={margin:[.5,.5,0,.5],filename:"resultat.pdf",image:{type:"png",quality:1},html2canvas:{dpi:300},jsPDF:{unit:"mm",format:"a4",orientation:"l"}};Da()(i,n)},exportPdf(){var t=new Ca.Ay("l"),e=window.document.getElementById("export-pdf"),i=window.document.getElementById("export-pdf-hautdroit");t.fromHTML(e,10,10),t.fromHTML(i,200,10),t.addImage(this.imageChartFc,"PNG",50,65,200,60),t.addImage(this.imageChartCc,"PNG",50,125,200,60),t.save("resultat.pdf")}},async mounted(){this.userSelected2=this.utilisateurs,this.selection=this.idprotocole,this.fileID=this.fileCCId,"Entraînement libre"==this.selection?this.protocolesLibreSelected=!0:this.protocolesLibreSelected=!1,""!==this.userParticulier&&(this.indef
1inteToast=this.$buefy.toast.open({duration:1e7,message:"Veuillez patienter pendant l'ouverture des résultats.",type:"is-warning"})),(0,n.A)();const t=this.$buefy.loading.open();this.toDataUrl("/assets/symbiocenter.png",this,function(){});var e=await r().User.current();this.nomTherapeute=(void 0!==e.attributes.firstname?e.attributes.firstname:"")+" "+(void 0!==e.attributes.lastname?e.attributes.lastname:"");try{this.FoldersBrique=await(0,Aa.H)(),this.cloneFoldersBrique=d()(this.FoldersBrique),this.nbUtilisateur.cabinet=this.utilisateurs.filter(t=>"cabinet"===t.attributes.type_pratique&&!t.attributes.affiliation).length,this.nbUtilisateur.licence=this.utilisateurs.filter(t=>"licence"===t.attributes.type_pratique&&!t.attributes.affiliation).length,this.nbUtilisateur.affiliation=this.utilisateurs.filter(t=>t.attributes.affiliation).length,this.nbUtilisateur.total=this.nbUtilisateur.cabinet+this.nbUtilisateur.licence+this.nbUtilisateur.affiliation,await this.traitement(this.utilisateurs),t.close()}catch(i){t.close()}await this.getFileLinkCompleted(this.userSelected),""!==this.userParticulier&&(this.utilisateurSelectionne=this.utilisateurs.filter(t=>t.attributes.username===this.userParticulier),this.isCardResultat=!0,this.indefinteToast&&(this.indefinteToast.close(),this.indefinteToast=null))},watch:{async userSelected(){const t=this.$buefy.loading.open();if(this.foldersUtilisateursSelected=null,"tous"!==this.userSelected){this.foldersUtilisateursSelected=this.utilisateurs.find(t=>t.id===this.userSelected.id);var e=this.utilisateurs.filter(t=>t.id===this.userSelected.id);await this.traitement(e),await this.getFileLinkCompleted(this.foldersUtilisateursSelected),t.close()}else await this.traitement(this.utilisateurs),await this.getFileLinkCompleted("tous"),t.close();t.close()},async userSelected2(){await this.getFileLinkCompleted(this.userSelected2)},async protocolesLibreSelected(){await this.getFileLinkCompleted(this.userSelected2)},isCardResultat(){this.userSelected2=d()(this.userSelected),null!==this.utilisateurSelectionne&&(this.userSelected2=this.utilisateurSelectionne[0])},exerciceSelected(){if(this.exerciceSelected&&"tous"!==this.exerciceSelected&&this.resultatCoherenceCardiaque){const t=this.resultatCoherenceCardiaque.filter(t=>t.attributes.link.id===this.exerciceSelected.id);t&&t.length}}}},Fa=La,Ba=(0,w.A)(Fa,ba,wa,!1,null,null,null),Oa=Ba.exports;const Na=(0,h.$t)("user");var za={data(){return{firstObject:{},ouvertureSuiviCcUtilisateur:"",fileId:"7rOgxcWOD4",protocole:"Entraînement libre",userSelected:"tous",DisplayRelecture:!1,timeOfExercice:""}},props:["valeurX","fcMoyenne","ccMoyenne","couleurCCMoyenne","TabRowFC","DefaultOpenedDetails","ValeurCCX","TabRowCC","labelChrono","valeurRouge","valeurVerte","valeurOrange"],created(){this.timeOfExercice=this.labelChrono},components:{suivieCc:Oa,chartFcVue:Ea.A,chartCcVue:Ia.A},computed:{...Na.mapState(["user"])},methods:{},mounted(){(0,n.A)();const t=r().Object.extend("folder"),e=new(r().Query)(t);e.equalTo("objectId","ALoaWJgV7l"),e.find().then(t=>(this.folders=t,this.firstObject=this.folders.shift(),this.folders,this.firstObject))}},Ya=za,Ua=(0,w.A)(Ya,ya,xa,!1,null,null,null),Ha=Ua.exports,Va=function(){var t=this,e=t._self._c;return e("div",[e("div",{staticClass:"gauge-container"},[e("div",{staticClass:"gauge"},[e("div",{class:["gauge-bar",{"gauge-bar-true":t.gaugeEnabled,"gauge-bar-false":!t.gaugeEnabled}],style:t.gaugeStyle}),t.MoniteurInProgrammes?t._e():e("img",{staticClass:"image-logo",attrs:{src:i(57955),alt:"Logo"},on:{click:function(e){t.openModal=!0}}})])]),t.openModal?e("div",[e("div",{staticClass:"modal-background",on:{click:function(e){t.openModal=!1}}}),e("div",{staticClass:"modal-content"},[e("button",{staticClass:"close-button",on:{click:function(e){t.openModal=!1}}},[t._v("Ã")]),e("label",[t._v("CPM")]),e("br"),e("select",{directives:[{name:"model",rawName:"v-model",value:t.cpm,expression:"cpm"}],on:{change:[function(e){var i=Array.prototype.filter.call(e.target.options,function(t){return t.selected}).map(function(t){var e="_value"in t?t._value:t.value;return e});t.cpm=e.target.multiple?i:i[0]},t.setInspirationExpiration]}},[e("option",{attrs:{value:"5"}},[t._v("5")]),e("option",{attrs:{value:"6"}},[t._v("6")]),e("option",{attrs:{value:"7"}},[t._v("7")]),e("option",{attrs:{value:"8"}},[t._v("8")]),e("option",{attrs:{value:"10"}},[t._v("10")]),e("option",{attrs:{value:"12"}},[t._v("12")])]),e("br"),e("label",[t._v("Profile")]),e("br"),e("select",{directives:[{name:"model",rawName:"v-model",value:t.profile,expression:"profile"}],on:{change:[function(e){var i=Array.prototype.filter.call(e.target.options,function(t){return t.selected}).map(function(t){var e="_value"in t?t._value:t.value;return e});t.profile=e.target.multiple?i:i[0]},t.setInspirationExpiration]}},[e("option",{attrs:{value:"profonde"}},[t._v("Profonde")]),e("option",{attrs:{value:"tonique"}},[t._v("Tonique")]),e("option",{attrs:{value:"basique"}},[t._v("Basique")])]),e("br"),e("div",{staticClass:"row-cpm"},[e("div",{staticClass:"column-cpm"},[e("label",[t._v("Inspiration")]),e("div",{staticClass:"input-container"},[e("button",{staticClass:"minus-button",class:{disabled:0===t.inspiration,"opacity-50":0===t.inspiration},on:{click:function(e){t.inspiration=parseFloat((t.inspiration-.1).toFixed(1))}}},[t._v(" - ")]),e("input",{directives:[{name:"model",rawName:"v-model",value:t.inspiration,expression:"inspiration"}],staticClass:"input",attrs:{readonly:"",type:"number",step:"0.1"},domProps:{value:t.inspiration},on:{input:function(e){e.target.composing||(t.inspiration=e.target.value)}}}),e("button",{staticClass:"plus-button",on:{click:function(e){t.inspiration=parseFloat((t.inspiration+.1).toFixed(1))}}},[t._v(" + ")])])]),e("div",{staticClass:"column-cpm"},[e("label",[t._v("Expiration")]),e("div",{staticClass:"input-container"},[e("button",{staticClass:"minus-button",class:{disabled:0===t.expiration,"opacity-50":0===t.expiration},on:{click:function(e){t.expiration=parseFloat((t.expiration-.1).toFixed(1))}}},[t._v(" - ")]),e("input",{directives:[{name:"model",rawName:"v-model",value:t.expiration,expression:"expiration"}],staticClass:"input",attrs:{readonly:"",type:"number",step:"0.1"},domProps:{value:t.expiration},on:{input:function(e){e.target.composing||(t.expiration=e.target.value)}}}),e("button",{staticClass:"plus-button",on:{click:function(e){t.expiration=parseFloat((t.expiration+.1).toFixed(1))}}},[t._v(" + ")])])])]),e("div",{staticClass:"row-cpm"},[e("div",{staticClass:"column-cpm"},[e("label",[t._v("Pause inspiration")]),e("div",{staticClass:"input-container"},[e("button",{staticClass:"minus-button",class:{disabled:0===t.pauseInspiration,"opacity-50":0===t.pauseInspiration},on:{click:function(e){t.pauseInspiration=parseFloat((t.pauseInspiration-.1).toFixed(1))}}},[t._v(" - ")]),e("input",{directives:[{name:"model",rawName:"v-model",value:t.pauseInspiration,expression:"pauseInspiration"}],staticClass:"input",attrs:{readonly:"",type:"number",step:"0.1"},domProps:{value:t.pauseInspiration},on:{input:function(e){e.target.composing||(t.pauseInspiration=e.target.value)}}}),e("button",{staticClass:"plus-button",on:{click:function(e){t.pauseInspiration=parseFloat((t.pauseInspiration+.1).toFixed(1))}}},[t._v(" + ")])])]),e("div",{staticClass:"column-cpm"},[e("label",[t._v("Pause expiration")]),e("div",{staticClass:"input-container"},[e("button",{staticClass:"minus-button",class:{disabled:0===t.pauseExpiration,"opacity-50":0===t.pauseExpiration},on:{click:function(e){t.pauseExpiration=parseFloat((t.pauseExpiration-.1).toFixed(1))}}},[t._v(" - ")]),e("input",{directives:[{name:"model",rawName:"v-model",value:t.pauseExpiration,expression:"pauseExpiration"}],staticClass:"input",attrs:{readonly:"",type:"number",step:"0.1"},domProps:{value:t.pauseExpiration},on:{input:function(e){e.target.composing||(t.pauseExpiration=e.target.value)}}}),e("button",{staticClass:"plus-button",on:{click:function(e){t.pauseExpiration=parseFloat((t.pauseExpiration+.1).toFixed(1))}}},[t._v(" + ")])])])]),e("div",{staticClass:"buttons-container"},[e("button",{staticClass:"buttonChart",staticStyle:{"background-color":"rgb(35, 147, 128)",color:"white"},on:{click:function(e){return t.recupDataCPM()}}},[t._v(" Récupérer mes paramètres personnels ")]),e("button",{staticClass:"buttonChart",staticStyle:{"background-color":"rgb(35, 147, 128)",color:"white"},on:{click:function(e){t.SaveDataCPM(),t.updateAnimationValues()}}},[t._v(" Enregistrer mes paramètres personnels ")])])])]):t._e()])},Xa=[],Ga={data(){return{openModal:!1,cpm:6,profile:"basique",inspiration:4.5,expiration:5.5,pauseInspiration:0,pauseExpiration:0}},props:{inspirationParent:{type:Number,default:4},expirationParent:{type:Number,default:6},pauseExpirationParent:{type:Number,default:0},pauseInspirationParent:{type:Number,default:0},gaugeEnabled:{type:Boolean,default:!0},idUserForSave:String,idPatientTherapeute:String,MoniteurInProgrammes:Boolean},computed:{animationDuration(){return this.inspiration+this.pauseExpiration+this.expiration+this.pauseInspiration},gaugeStyle(){const t=`\n @keyframes breathing {\n 0% {\n height: 0%;\n }\n ${this.inspiration/this.animationDuration*100}% {\n height: 100%;\n }\n ${(this.inspiration+this.pauseInspiration)/this.animationDuration*100}% {\n height: 100%;\n }\n ${(this.inspiration+this.pauseInspiration+this.expiration)/this.animationDuration*100}% {\n height: 0%;\n }\n ${(this.inspiration+this.pauseInspiration+this.expiration+this.pauseExpiration)/this.animationDuration*100}% {\n height: 0%;\n }\n }\n `;return{animation:`breathing ${this.animationDuration}
1s infinite cubic-bezier(0.4, 0, 0.2, 1)`,keyframes:t}}},watch:{inspirationParent(t){this.inspiration=t},expirationParent(t){this.expiration=t},pauseInspirationParent(t){this.pauseInspiration=t},pauseExpirationParent(t){this.pauseExpiration=t},inspiration(t){this.inspiration=parseFloat(t)},expiration(t){this.expiration=parseFloat(t)},pauseInspiration(t){this.pauseInspiration=parseFloat(t)},pauseExpiration(t){this.pauseExpiration=parseFloat(t)}},methods:{DisplayData(){},updateAnimationValues(){this.$emit("inspiration-updated",this.inspiration),this.$emit("expiration-updated",this.expiration),this.$emit("pauseInspiration-updated",this.pauseInspiration),this.$emit("pauseExpiration-updated",this.pauseExpiration)},setInspirationExpiration(){"5"===this.cpm||5===this.cpm?"basique"===this.profile?(this.inspiration=5.4,this.expiration=6.6):"tonique"===this.profile?(this.inspiration=6,this.expiration=6):"profonde"===this.profile&&(this.inspiration=4.8,this.expiration=7.2):"6"===this.cpm||6===this.cpm?"basique"===this.profile?(this.inspiration=4.5,this.expiration=5.5):"tonique"===this.profile?(this.inspiration=5,this.expiration=5):"profonde"===this.profile&&(this.inspiration=4,this.expiration=6):"7"===this.cpm||7===this.cpm?"basique"===this.profile?(this.inspiration=4.29,this.expiration=4.29):"tonique"===this.profile?(this.inspiration=3.86,this.expiration=4.71):"profonde"===this.profile&&(this.inspiration=3.43,this.expiration=5.14):"8"===this.cpm||8===this.cpm?"basique"===this.profile?(this.inspiration=3.38,this.expiration=4.13):"tonique"===this.profile?(this.inspiration=3.75,this.expiration=3.75):"profonde"===this.profile&&(this.inspiration=3,this.expiration=4.5):"9"===this.cpm||9===this.cpm?"basique"===this.profile?(this.inspiration=3,this.expiration=3.67):"tonique"===this.profile?(this.inspiration=3.33,this.expiration=3.33):"profonde"===this.profile&&(this.inspiration=2.67,this.expiration=4):"10"===this.cpm||10===this.cpm?"basique"===this.profile?(this.inspiration=2.7,this.expiration=3.3):"tonique"===this.profile?(this.inspiration=3,this.expiration=3):"profonde"===this.profile&&(this.inspiration=2.4,this.expiration=3.6):"11"===this.cpm||11===this.cpm?"basique"===this.profile?(this.inspiration=2.7,this.expiration=3.3):"tonique"===this.profile?(this.inspiration=2.73,this.expiration=2.73):"profonde"===this.profile&&(this.inspiration=2.18,this.expiration=3.27):"12"!==this.cpm&&12!==this.cpm||("basique"===this.profile?(this.inspiration=2.7,this.expiration=3.3):"tonique"===this.profile?(this.inspiration=2.5,this.expiration=2.5):"profonde"===this.profile&&(this.inspiration=2,this.expiration=3))},recupDataCPM(){var t=r().Object.extend("user_param_game"),e=new(r().Query)(t),i=r().Object.extend("User"),s=new(r().Query)(i);s.equalTo("objectId",r().User.current().id),s.find().then(t=>{console.log(t)}),e.matchesQuery("user",s),e.find().then(t=>{if(t.length>0){var e=t[0].attributes.paramJeux;e=JSON.parse(e),this.inspiration=e.Inspi,this.expiration=e.Expi,this.pauseInspiration=e.InspiPause,this.pauseExpiration=e.ExpiPause}})},async SaveDataCPM(){this.openModal=!1;var t={Inspi:this.inspiration,Expi:this.expiration,InspiPause:this.pauseInspiration,ExpiPause:this.pauseExpiration};t=JSON.stringify(t);var e=r().User.current();const i=r().Object.extend("user_param_game"),s=r().Object.extend("User"),a=new(r().Query)(s),n=new(r().Query)(i);if(this.idUserForSave){a.equalTo("objectId",this.idUserForSave);const[t]=await Promise.all([a.find()]);this.UtilisateurCPM=t[0],n.equalTo("user",this.UtilisateurCPM)}else if(this.idPatientTherapeute){a.equalTo("objectId",this.idPatientTherapeute);const[t]=await Promise.all([a.find()]);this.UtilisateurCPM=t[0],n.equalTo("user",this.UtilisateurCPM)}else n.equalTo("user",e),this.UtilisateurCPM=e;n.first().then(e=>{if(e)return e.set("paramJeux",t),e.save();{const e={user:this.UtilisateurCPM,paramJeux:t},s=new i;return s.save(e)}}).then(t=>{this.isCardRedirectFront=!1,console.log("Data saved: ",t)},t=>{console.error("Error while saving Data: ",t)})}},created(){(0,n.A)(),this.inspiration=this.inspirationParent,this.expiration=this.expirationParent,this.pauseInspiration=this.pauseInspirationParent,this.pauseExpiration=this.pauseExpirationParent},mounted(){const t=document.createElement("style");t.textContent=this.gaugeStyle.keyframes,document.head.appendChild(t)},beforeDestroy(){const t=document.head.querySelectorAll("style");for(const e of t)e.textContent===this.gaugeStyle.keyframes&&document.head.removeChild(e)}},qa=Ga,Wa=(0,w.A)(qa,Va,Xa,!1,null,"5cf35746",null),ja=Wa.exports,Qa=function(){var t=this,e=t._self._c;return e("div",[e("div",{staticClass:"Container"},[t._m(0),e("div",{staticClass:"button-container containerLabelWindow"},[e("button",{on:{click:t.decreaseWindow}},[t._v("-")]),e("span",[t._v(t._s(t.maxLabels+" secondes"))]),e("button",{on:{click:t.increaseWindow}},[t._v("+")])])])])},Ja=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"GlobalDivChart chart-container"},[e("canvas",{attrs:{id:"dynamicChart"}})])}],Ka=i(62477),$a=i.n(Ka),Za={name:"DynamicLineChart",data(){return{chart:null,counter:0,maxLabels:60,chartData:{labels:[],datasets:[{label:"Ãvolution de la variabilité cardiaque dans le temps",borderColor:"rgba(33, 150, 243, 0.8)",borderWidth:4,pointRadius:0,fill:!1,lineTension:.2,data:[]}]},options:{animation:{duration:500,easing:"easeInOutExpo"},maintainAspectRatio:window.innerWidth>1200,responsive:!0,scales:{yAxes:[{gridLines:{color:"rgba(200, 200, 200, 0.2)"},scaleLabel:{display:!0,labelString:"Variabilité cardiaque"}}],xAxes:[{gridLines:{color:"rgba(200, 200, 200, 0.2)"},scaleLabel:{display:!0,labelString:"Temps (s)"}}]}
1,legend:{display:!0,position:"top",labels:{fontColor:"#333",fontSize:12}},title:{display:!0,text:"Tachogramme en temps réel",fontSize:16,fontColor:"#333"},maintainAspectRatio:!1,responsive:!0}}},props:{value1:{type:Number,required:!0},value2:{type:Number,required:!0},updateInterval:{type:Number,default:1e3}},watch:{},mounted(){this.initChart(),this.startAutoUpdate()},methods:{computeYRange(){const t=this.chartData.datasets.reduce((t,e)=>t.concat(e.data),[]),e=Math.min(...t),i=Math.max(...t),s=i-e,a=.1*s,n=e-a-20,o=i+a+20;return{min:n>=0?n:0,max:o}},initChart(){const t=document.getElementById("dynamicChart").getContext("2d");this.chart=new($a())(t,{type:"line",data:this.chartData,options:this.options})},startAutoUpdate(){this.intervalId=setInterval(()=>{this.value1&&this.addDataToChart({0:this.value1}),console.log("value1:",this.value1)},this.updateInterval)},addDataToChart(t){let e=this.counter<60?`${this.counter}s`:`${Math.floor(this.counter/60)}:${(this.counter%60).toString().padStart(2,"0")}`;this.counter++,this.chartData.labels.length>this.maxLabels&&(this.chartData.labels.shift(),this.chartData.datasets.forEach(t=>t.data.shift())),this.chartData.labels.push(e),Object.keys(t).forEach(e=>{const i=t[e];this.chartData.datasets[e]&&this.chartData.datasets[e].data.push(i)});const i=this.computeYRange();this.chart.options.scales.yAxes[0].ticks.min=i.min,this.chart.options.scales.yAxes[0].ticks.max=i.max,this.chart.update()},increaseWindow(){this.maxLabels+=10,this.updateWindow()},decreaseWindow(){this.maxLabels>10&&(this.maxLabels-=10),this.updateWindow()},updateWindow(){while(this.chartData.labels.length>this.maxLabels)this.chartData.labels.shift(),this.chartData.datasets.forEach(t=>t.data.shift());this.chart.update()}}},tn=Za,en=(0,w.A)(tn,Qa,Ja,!1,null,"90693872",null),sn=en.exports,an=function(){var t=this,e=t._self._c;return t.FinishAniBool?e("div",{staticClass:"custom-modal-overlay"},[e("div",{staticClass:"custom-modal"},[e("div",{staticClass:"modal-content"},[e("appelRelectureBiofeedback",{attrs:{valeurX:t.valeurX,fcMoyenne:t.fcMoyenne,ccMoyenne:t.ccMoyenne,couleurCCMoyenne:t.couleurCCMoyenne,TabRowFC:t.valeurY,DefaultOpenedDetails:t.DefaultOpenedDetails,ValeurCCX:t.valeurCCX,TabRowCC:t.valeurCCY,labelChrono:t.TimeCalibrage,timeElapsed:t.elapsedExerciseTime,valeurRouge:t.valeurRouge,valeurVerte:t.valeurVerte,valeurOrange:t.valeurOrange},on:{"commentaire-change":t.handleCommentaireChange}}),e("div",{staticClass:"action-buttons"},[e("button",{staticClass:"buttonChart save-button",attrs:{id:"buttonSave"},on:{click:t.handleSaveData}},[t._v(" Sauvegarder ")]),e("button",{staticClass:"buttonChart cancel-button",attrs:{id:"buttonAnnuler"},on:{click:t.handleCancel}},[t._v(" Annuler ")])])],1)])]):t._e()},nn=[],on=function(){var t=this,e=t._self._c;return e("div",[e("div",[e("div",{staticClass:"columns is-multiline"},[e("div",{staticClass:"column is-16"},[e("div",{staticClass:"chart-result"},[e("chartBiofeedback",{attrs:{valeurX:t.valeurX,tabRowFc:t.TabRowFC,tabRowCC:t.TabRowCC,defaultOpenedDetails:t.DefaultOpenedDetails}})],1)])]),e("div",{staticClass:"columns is-multiline"},[e("div",{staticClass:"column is-4"},[e("div",{staticClass:"circleFCMoyenne1"},[e("div",{staticClass:"circleFCMoyenne2"},[e("p",{staticClass:"circleFCMoyenne3 has-text-weight-bold"},[e("span",{staticClass:"is-size-4"},[t._v(" "+t._s(t.fcMoyenne?t.fcMoyenne:"0")+" ")]),t._v(" bpm ")])])]),e("p",{staticClass:"has-text-weight-semibold has-text-black has-text-centered is-margin-t-20"},[t._v(" "+t._s(t.$t("moyenneFrequenceCardiaque"))+" ")])]),e("div",{staticClass:"column is-4"},[e("div",{staticClass:"columns centerDivColumn"},[e("div",{staticClass:"card-relecture",staticStyle:{"margin-top":"10px"}},[e("p",[t._v("% de temps passé dans chaque zone de cohérence")]),e("div",{staticClass:"progress-relecture"},[e("div",{staticClass:"progress-bar-relecture progress-bar-danger-relecture",class:{"black-percentage":0===t.valeurRouge},style:{width:t.valeurRouge+"%"},attrs:{role:"progressbar","aria-valuenow":"redPercentage","aria-valuemin":"0","aria-valuemax":"100"}},[t._v(" "+t._s(t.valeurRouge)+"% ")])]),e("div",{staticClass:"progress-relecture"},[e("div",{staticClass:"progress-bar-relecture progress-bar-warning-relecture",class:{"black-percentage":0===t.valeurOrange},style:{width:t.valeurOrange+"%"},attrs:{role:"progressbar","aria-valuenow":"yellowPercentage","aria-valuemin":"
10","aria-valuemax":"100"}},[t._v(" "+t._s(t.valeurOrange)+"% ")])]),e("div",{staticClass:"progress-relecture"},[e("div",{staticClass:"progress-bar-relecture progress-bar-success-relecture",class:{"black-percentage":0===t.valeurVerte},style:{width:t.valeurVerte+"%"},attrs:{role:"progressbar","aria-valuenow":"greenPercentage","aria-valuemin":"0","aria-valuemax":"100"}},[t._v(" "+t._s(t.valeurVerte)+"% ")])])])]),e("div",{staticClass:"card-relecture is-size-4 has-text-centered"},[e("p",[t._v("Durée de l'exercice")]),e("div",[e("p",[e("span",{staticClass:"duration"},[t._v(t._s(t.formatDuration(t.timeElapsed)))]),e("i",{staticClass:"fas fa-clock logoRelecture"})])])])]),e("div",{staticClass:"column is-4"},[e("div",{staticClass:"circleFCMoyenne1"},[e("div",{staticClass:"circleFCMoyenne4",style:{"background-color":t.couleurCCMoyenne}},[e("p",{staticClass:"circleFCMoyenne3 has-text-weight-bold"},[e("span",{staticClass:"is-size-4"},[t._v(" "+t._s(t.ccMoyenne?t.ccMoyenne:"0")+" ")]),t._v(" % ")])])]),e("p",{staticClass:"has-text-weight-semibold has-text-black has-text-centered is-margin-t-20"},[t._v(" "+t._s(t.$t("moyenneCc"))+" ")])]),e("div",{staticClass:"column is-16"},[e("button",{staticClass:"toggle-button",on:{click:t.toggleCommentaire}},[t.showCommentaire?e("span",[t._v("⼠Masquer le commentaire")]):e("span",[t._v("⺠Ajouter un commentaire")])]),t.showCommentaire?e("b-field",{attrs:{label:"Commentaire :"}},[e("b-input",{attrs:{maxlength:"200",type:"textarea"},on:{input:t.emitCommentaire},model:{value:t.commentaireMoniteur,callback:function(e){t.commentaireMoniteur=e},expression:"commentaireMoniteur"}})],1):t._e()],1)])])])},rn=[],ln=i(32431);const hn=(0,h.$t)("user");var cn={data(){return{firstObject:{},ouvertureSuiviCcUtilisateur:"",fileId:"7rOgxcWOD4",protocole:"Entraînement libre",userSelected:"tous",DisplayRelecture:!1,commentaireMoniteur:"",showCommentaire:!1}},props:["valeurX","fcMoyenne","ccMoyenne","couleurCCMoyenne","TabRowFC","DefaultOpenedDetails","ValeurCCX","TabRowCC","labelChrono","timeElapsed","valeurRouge","valeurVerte","valeurOrange"],components:{chartBiofeedback:ln.A},computed:{...hn.mapState(["user"])},methods:{test(){},emitCommentaire(){this.$emit("commentaire-change",this.commentaireMoniteur)},toggleCommentaire(){this.showCommentaire=!this.showCommentaire},formatDuration(t){const e=Math.floor(t/60),i=t%60;return`${e}min${i}s`}},mounted(){(0,n.A)();const t=r().Object.extend("folder"),e=new(r().Query)(t);e.equalTo("objectId","ALoaWJgV7l"),e.find().then(t=>(this.folders=t,this.firstObject=this.folders.shift(),this.folders,this.firstObject))},created(){console.log("valeurCCX",this.ValeurCCX),console.log("TabRowCC",this.TabRowCC),console.log("TabRowFC",this.TabRowFC),console.log("DefaultOpenedDetails",this.DefaultOpenedDetails),this.ccMoyenne>0&&this.ccMoyenne<30?this.couleurMoyenne="#ff0000":this.ccMoyenne>30&&this.ccMoyenne<60?this.couleurMoyenne="#ff7f00":this.ccMoyenne>60&&this.ccMoyenne<90?this.couleurMoyenne="#e9e935":this.ccMoyenne>90&&this.ccMoyenne<120?this.couleurMoyenne="#78e20d":this.ccMoyenne>120&&this.ccMoyenne<150&&(this.couleurMoyenne="#29c029")}},dn=cn,un=(0,w.A)(dn,on,rn,!1,null,null,null),pn=un.exports,gn={data(){return{isCardRedirectFront:!1}},components:{appelRelectureBiofeedback:pn},mounted(){this.$watch("FinishAniBool",t=>{document.body.style.overflow=t?"hidden":""},{immediate:!0}),document.addEventListener("keydown",this.handleKeyDown)},beforeDestroy(){document.body.style.overflow="",document.removeEventListener("keydown",this.handleKeyDown)},methods:{handleKeyDown(t){},handleCommentaireChange(t){this.$emit("commentaire-change",t)},handleSaveData(){this.$emit("save-data")},handleCancel(){this.$emit("update:FinishAniBool",!1),this.refreshPage()},refreshPage(){window.location.reload()},test(t,e,i,s,a,n,o,r,l,h){console.log(t,e,i,s,a,n,o,r,l,h)}},props:{valeurX:{type:Array,default:()=>[]},valeurY:{type:Array,default:()=>[]},fcMoyenne:{type:Number,default:0},ccMoyenne:{type:Number,default:0},couleurCCMoyenne:{type:String,default:""},valeurCCX:{type:Array,default:()=>[]},valeurCCY:{type:Array,default:()=>[]},DefaultOpenedDetails:{type:String},TimeCalibrage:{type:Number,default:0},elapsedExerciseTime:{default:0},FinishAniBool:{type:Boolean,default:!1},valeurRouge:{type:Number,default:0},valeurVerte:{type:Number,default:0},valeurOrange:{type:Number,default:0}}},mn=gn,_n=(0,w.A)(mn,an,nn,!1,null,"7462d62c",null),vn=_n.exports,fn=i(32056);(0,h.$t)("user");const yn=i(57698);var xn={data(){return{spinnerColor:"rgb(72, 145, 129)",isCardRedirectFront:!1,timer:"2:30",minutesForTimer:1,secondsForTimer:30,intervalForTimer:null,commentaireMoniteur:"",intervalTime:0,disableButton:!0,DisplayChartDiv:!1,timePassed:0,timerInterval:null,index:0,startTime:null,currentObject:null,displayObject:!1,progress:0,percent:100,audioMoniteurPlay:!1,interval:null,direction:1,downTime:5500,upTime:4500,pauseTopTime:0,pauseBottomTime:0,intervalTime:0,pauseTimer:null,openModalCPM:!1,OpenModalFinish:!1,openModal:!1,inspiration:4,pauseInspiration:0,expiration:6,pauseExpiration:0,
1cpm:6,profile:"basique",tableau_cpm_reglages:[5,6,7,8,9,10,11,12],valeurX:[],fcMoyenne:73,ccMoyenne:48,couleurCCMoyenne:"#FE0000",isLoading:!0,TabRowFC:[],DefaultOpenedDetails:"5VBBk5J53k",ValeurCCX:[43,67,68,82,98],TabRowCC:[],labelChrono:"01:38",valeurRouge:0,valeurVerte:0,valeurOrange:0,ObjectDataForRelecture:[],isFullscreen:!1,alertDisplayed:!1,showNotification:!1,notificationMessage:"",durationInSeconds:900,gaugeEnabled:!0,tempsTotal:0,elapsedTime:0,connexionWebSocket:!1,exerciseStartTime:0,timerEnCours:!0,idUserForSave:null,timerMoniteurExpert:"",UtilisateurCPM:"",UpdateKey:0,keyGuide:0,socket:null,displayGuide:!0,x_value:0,y_value:0,FinishAniBool:!1,showCommentaire:!1,LoadingRelecture:!1,commentaire:"",appLauncherService:new fn.A}},watch:{inspiration:function(){var t=1e3*this.inspiration;this.upTime=t},pauseInspiration:function(){var t=1e3*this.pauseInspiration;this.pauseTopTime=t},expiration:function(){var t=1e3*this.expiration;this.downTime=t},pauseExpiration:function(){var t=1e3*this.pauseExpiration;this.pauseBottomTime=t}},created(){this.defaultData={...this.$data},console.log("Props",this.$props),!this.avecGuide&&this.MoniteurInProgrammes&&(this.gaugeEnabled=!1)},props:{Inspi:{required:!0},flux:{required:!0},avecGuide:{required:!0},Expi:{required:!0},avecCapteur:{required:!0},avecParametres:{required:!0},pcm:{required:!0},tableau:{required:!0},temps:{required:!0},game_type:{type:Boolean,default:!0},timerAudioMoniteur:{type:Number},sourceAudioMoniteur:{type:String},titleAudioMoniteur:{type:String},"fileReçu":{type:Object},"folderIdReçu":{},MoniteurForRessources:{type:Boolean,default:!1},idPatientTherapeute:{type:String},MoniteurInProgrammes:{type:Boolean,default:!1}},components:{audioPlayer:j,AppelRelectureVue:Ha,GuideRespiratoire:ja,RealTimeChart:sn,popUpRelecture:vn},mounted(){document.addEventListener("fullscreenchange",this.onFullscreenChange),localStorage.getItem("idUserForSave")&&(this.idUserForSave=localStorage.getItem("idUserForSave")),console.log("FILE RECU:",this.fileReçu),this.fileReçu&&this.fileReçu.attributes&&this.fileReçu.attributes.temps&&!this.MoniteurForRessources||this.fileReçu&&this.fileReçu.temps&&!this.MoniteurForRessources?(this.minutesForTimer=this.fileReçu.temps||this.fileReçu.attributes.temps,this.secondsForTimer=0,this.timer=this.minutesForTimer+":"+this.secondsForTimer):(this.minutesForTimer=0,this.secondsForTimer=0,this.timer=this.minutesForTimer+":"+this.secondsForTimer),document.getElementById("bubble-dialog").style.display="none",this.updateInterval(),this.callSocket(),setInterval(()=>{this.CCInstant()},1e3);const t=document.querySelector("#slice1"),e=document.querySelector("#slice2"),i=document.querySelector("#slice3"),s=30,a=50,n=20,o=()=>{let o=0;const r=[s,a,n];for(let s=0;s<r.length;s++){const a=[t,e,i][s],n=r[s],l=n/100*360+o;a&&(a.style.transform=`rotate(${o}deg)`,a.style.clip="rect(0, 150px, 300px, 150px)",a.style.transform=`rotate(${l}deg)`,a.style.clip="rect(0, 150px, 300px, 0)"),o=l}};setInterval(o,1e3)},beforeDestroy(){console.log("beforeDestroy",this.socket),this.socket.disconnect(),this.socket.close(),this.connexionWebSocket=!1,document.removeEventListener("fullscreenchange",this.onFullscreenChange),clearInterval(this.interval),delete window.vueComponent},methods:{async openAppInAppStore(){try{const t=await r().Cloud.run("getUserSessionOrCreate"),e=t?.sessionToken;await this.appLauncherService.openApp(e)}catch(t){console.error("Erreur session ou ouverture app :",t),await this.appLauncherService.openApp()}},updateInspirationParent(t){this.inspiration=t,this.keyGuide++},handleCommentaireChange(t){this.commentaire=t},emitCommentaire(){this.commentaire=this.commentaireMoniteur},SaveDataCPM(){r().User.current();var t=r().Object.extend("user_param_game"),e=(new(r().Query)(t),{Inspi:this.inspiration,Expi:this.expiration,InspiPause:this.pauseInspiration,ExpiPause:this.pauseExpiration}),i=JSON.stringify(e);console.log("paramJeuxString",i)},updateExpirationParent(t){this.expiration=t,this.keyGuide++},updatePauseInspirationParent(t){this.pauseInspiration=t,this.keyGuide++},updatePauseExpirationParent(t){this.pauseExpiration=t,this.keyGuide++},toggleCommentaire(){this.showCommentaire=!this.showCommentaire},UpdateAnimation(){this.UpdateKey++},onFullscreenChange(){this.isFullscreen=null!==document.fullscreenElement},timerExercice(){this.exerciseStartTime=Date.now(),setInterval(()=>{this.timerEnCours&&(this.elapsedTime=Math.floor((Date.now()-this.exerciseStartTime)/1e3))},1e3)},chartFullScreen(){const t=document.getElementById("chart-component");this.toggleFullscreen(t),this.isFullscreen=!0},toggleFullscreen(t){document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement?document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen():t.requestFullscreen?t.requestFullscreen():t.msRequestFullscreen?t.msRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullscreen&&t.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)},CCInstant(){var t=document.getElementById("ShowCCInPage");if(t)try{""!==t.innerHTML.trim()?this.percent=JSON.parse(t.innerHTML):(console.error("Le contenu de ShowCCInPage est vide."),this.percent=null)}catch(e){console.error("Erreur de parsing JSON:",e),this.percent=null}else console.error("Ãlément ShowCCInPage non trouvé."),this.percent=null},DisplayId(){},reloadComponent(){this.$emit("moniteur-finish",!0),console.log("reloadComponent..1"),this.ReinitSocket(),this.disableButton=!0,this.minutesForTimer=0,this.secondsForTimer=0,console.log("reloadComponent..2"),this.deconnecterSocket(),this.FinishAniBool=!1,this.timer=this.minutesForTimer+":"+this.secondsForTimer},TerminerMoniteur(){this.LoadingRelecture=!0,this.timerEnCours=!1,setTimeout(()=>{this.recupDataForRelecture()},1e3),setTimeout(()=>{this.isCardRedirectFront=!0,this.LoadingRelecture=!1},1e3)},onKeydown(t){"Escape"===t.key&&(this.isFullscreen=!1)},exitFullscreen(){document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen(),this.isFullscreen=!1},async SaveDataInParse(){const t=$().mixin({toast:!0,position:"bottom-end",showConfirmButton:!1,timer:6e3,timerProgressBar:!0,didOpen:t=>{t.addEventListener("mouseenter",$().stopTimer),t.addEventListener("mouseleave",$().resumeTimer)}});var e=JSON.stringify(this.ObjectDataForRelecture);console.log("this.commentaireMoniteur",this.commentaireMoniteur),console.log("this.commentaire",this.commentaire),console.log("this.fileReçuId",this.fileReçu);try{var i=this.fileReçu?this.fileReçu.fileId||this.fileReçu.id:null,
1s=this.folderIdReçu&&this.folderIdReçu.id?this.folderIdReçu.id:this.folderIdReçu,a=this.MoniteurInProgrammes;console.log("folderIdReçu",s),console.log("MoniteurInProgrammes",a);const n={resultat:e,idPatientTherapeute:this.idPatientTherapeute,idUserForSave:this.idUserForSave?this.idUserForSave:this.idPatientTherapeute,elapsedTime:this.elapsedTime,note:0,typeExercice:"MoniteurExpert","folderIdReçu":s,"fileReçuId":i,MoniteurInProgrammes:a,comment:this.commentaire};console.log("Données de l'exercice :"),console.log(JSON.stringify(n,null,2)),r().Cloud.run("saveExo",{resultat:e,idPatientTherapeute:this.idPatientTherapeute,idUserForSave:this.idUserForSave?this.idUserForSave:this.idPatientTherapeute,elapsedTime:this.elapsedTime,note:0,typeExercice:"MoniteurExpert","folderIdReçu":s,"fileReçuId":a?i:"3JswDn3wdS",MoniteurInProgrammes:a,comment:this.commentaire},{success:function(t){console.log("Sauvegarde effectué !")},error:function(t){console.error("Une erreur s'est produite lors de la sauvegarde :",t)}}),t.fire({icon:"success",title:"Votre exercice a bien été sauvegardé !"}),setTimeout(()=>{this.$emit("moniteur-finish",!0)},"1000")}catch(n){t.fire({icon:"error",title:"Une erreur s'est produite lors de la sauvegarde",text:n}),console.error("Une erreur s'est produite lors de la sauvegarde :",n)}},handleSaveData(){this.SaveDataInParse(),this.reloadComponent()},recupDataForRelecture(){var t=document.getElementById("ShowDataInPage").innerHTML;return this.ObjectDataForRelecture=JSON.parse(t),this.valeurRouge=this.ObjectDataForRelecture.Pct1,this.valeurVerte=this.ObjectDataForRelecture.Pct3,this.valeurOrange=this.ObjectDataForRelecture.Pct2,this.fileReçu&&this.fileReçu.attributes&&this.fileReçu.attributes.temps||this.fileReçu.temps?this.labelChrono=this.fileReçu.temps||this.fileReçu.attributes.temps:this.labelChrono=this.elapsedTime,this.valeurX=this.ObjectDataForRelecture.ArrayTacho.map(t=>t.x),this.valeurX=this.valeurX.map(t=>t/1e3),this.valeurX=this.valeurX.map(t=>Math.round(t)),this.fcMoyenne=this.ObjectDataForRelecture.BpmCC,this.ccMoyenne=Math.round(this.ObjectDataForRelecture.AverageCC),this.TabRowFC=this.ObjectDataForRelecture.ArrayTacho.map(t=>t.y),this.ValeurCCX=this.ObjectDataForRelecture.TabCC.map(t=>t.x),this.ValeurCCX=this.ValeurCCX.map(t=>t/1e3),this.ValeurCCX=this.ValeurCCX.map(t=>Math.round(t)),this.TabRowCC=this.ObjectDataForRelecture.TabCC.map(t=>t.y),this.ccMoyenne&&(this.ccMoyenne<60?this.couleurCCMoyenne="#FE0000":this.ccMoyenne<90?this.couleurCCMoyenne="#FFC801":this.ccMoyenne>80&&(this.couleurCCMoyenne="#51C901")),this.FinishAniBool=!0,this.ObjectDataForRelecture},startTimerForNotif(){this.showNotification=!0,this.progressWidth=0,this.intervalId&&clearInterval(this.intervalId),this.intervalId=setInterval(()=>{this.progressWidth+=3.33,this.progressWidth>=100&&clearInterval(this.intervalId)},100),setTimeout(()=>{this.closeNotification()},3e3)},closeNotification(){this.showNotification=!1,this.progressWidth=0},startTimer(){if(this.exerciseStartTime=Date.now(),setInterval(()=>{this.timerEnCours&&(this.elapsedTime=Math.floor((Date.now()-this.exerciseStartTime)/1e3));const t=Math.floor(this.elapsedTime/60),e=this.elapsedTime%60;this.timerMoniteurExpert=`${t}:${e<10?"0"+e:e}`},1e3),this.MoniteurForRessources){let t=0,e=!1;setInterval(()=>{if(this.timerEnCours){if(t>=900)return!0===e?void 0:(this.isCardRedirectFront=!0,e=!0,void this.recupDataForRelecture());const i=Math.floor(t/60),s=t%60;this.timer=`${i}:${s<10?"0"+s:s}`,t++}},1e3)}else{let t=!1;setInterval(()=>{if(this.timerEnCours){if(0===this.secondsForTimer){if(0===this.minutesForTimer)return!0===t?void 0:(this.isCardRedirectFront=!0,t=!0,void this.recupDataForRelecture());this.minutesForTimer--,this.secondsForTimer=59}else this.secondsForTimer--;this.timer=`${this.minutesForTimer}:${this.secondsForTimer<10?"0"+this.secondsForTimer:this.secondsForTimer}`}},1e3)}},lancerAudio(){this.$refs.audioPlayerRef.lancerAudio()},launchRythmeRespiratoire(){this.startTime=Date.now(),setInterval(()=>{let t=Date.now(),e=(t-this.startTime)/1e3;this.tableau&&this.tableau.length>0&&this.tableau[this.index]&&e>=this.tableau[this.index].Time&&this.index<this.tableau.length?(this.currentObject=this.tableau[this.index],this.displayObject=!0,this.index++,this.inspiration=this.currentObject.Inspi,this.expiration=this.currentObject.Expi,this.pauseExpiration=this.currentObject.InspiPause,this.pauseInspiration=this.currentObject.ExpiPause,this.openModalCPM=!0,setTimeout(()=>{this.openModalCPM=!1},1e4)):this.tableau&&this.tableau.length>0&&e>=this.tableau[this.tableau.length-1].Time&&this.index===this.tableau.length&&(this.displayObject=!1)},1e3)},updateInterval(){clearInterval(this.interval),clearTimeout(this.pauseTimer),this.intervalTime=1===this.direction?this.downTime/100:this.upTime/100,this.interval=setInterval(()=>{this.progress+=this.direction,0!==this.progress&&100!==this.progress||(clearInterval(this.interval),this.direction*=-1,this.pauseTimer=setTimeout(()=>{this.updateInterval()},1===this.direction?this.pauseBottomTime:this.pauseTopTime))},this.intervalTime)},changeVariables(){this.downTime=1e3,this.upTime=1e3,this.pauseTopTime=1e3,this.pauseBottomTime=1e3,this.openModalCPM=!0,setTimeout(()=>{this.openModalCPM=!1},1e4)},closeModal(){this.showModal=!1},test(){console.log("objectIdPatient",this.idPatientTherapeute)},async ReinitSocket(){!1===this.game_type&&this.lancerAudio(),document.getElementById("bubble-dialog").style.display="block",this.disableButton=!1,this.callSocket(),this.piechartLaunc
1h()},deconnecterSocket(){this.socket&&this.socket.connected?(this.socket.disconnect(),this.connexionWebSocket=!1,console.log("Déconnexion de la socket réussie")):console.log("Aucune connexion active à déconnecter")},piechartLaunch(){setTimeout(()=>{document.getElementById("piechartdiv").style.display="block",document.getElementById("circleChartDiv").style.display="none"},8e4)},callSocket(){document.getElementById("buttonsocket")&&(document.getElementById("buttonsocket").style.display="none"),(0,n.A)(),this.socket=yn.connect("https://www.symbiocenter.com",{}),this.socket.on("connect",()=>{this.connexionWebSocket=!0,this.socket.emit("authentication",{username:r().User.current().attributes.username}),this.socket.on("authenticated",function(){}),this.socket.on("unauthorized",function(){}),this.socket.on("disconnect",function(){});var t=[],e=[],i=[],s=0,a=0;if(document.getElementById("chartdiv"))var n=Bi.new("chartdiv");else n=null;if(document.getElementById("piechartdiv"))var o=Bi.new("piechartdiv");else o=null;document.getElementById("piechartdiv")&&(document.getElementById("piechartdiv").style.display="none");var l=0,h=0,c=0,d=0,u=0,p=[],g=0,m=0;function _(t,e){var i=t,s=e;null!=n&&f(i,s)}this.socket.on("rr",r=>{document.getElementById("buttonsocket")&&(document.getElementById("buttonsocket").style.display="block");var v=JSON.parse(r);console.log("rrJson",v),m=v.CC,Number.isFinite(m)?m=m.toFixed(0):console.error("La valeur de CC n'est pas un nombre valide:",m),D(m),l=v.PctT1,h=v.PctT2,c=v.PctT3,d=v.MoyCC,u=Math.round(6e4/v.rr),console.log("DERNIER BPM:",u),l+h+c!=0&&o&&y(l,h,c,d);var f=v.rr,x=Date.now();if(0!==g);g=x;var b=v.traceTacho;if(null!=v)for(var w=0;w<b.length;w++){var C=b[w].x,k=b[w].y;k>40&&k<150&&(this.y_value=k);const s=document.getElementById("divCalibrageEnCours");s&&(s.style.display="none"),null!=C&&null!=k&&k>40&&k<150&&(p.push({x:C,y:v.CC}),e.push(C),i.push(k),t.push({x:C,y:k}),n&&_(k,C))}if(f>0){var T=Math.round(6e4/f);s=T,a=f,s<=30||s>=200?(document.getElementById("buttonsocket")&&(document.getElementById("buttonsocket").disabled=!0,document.getElementById("buttonsocket").style.display="none",document.getElementById("PlacementMoniteurPasLance").style.display="block"),document.getElementById("imageBPM")&&document.getElementById("petite-image")&&document.getElementById("BpmInstant")&&document.getElementById("RrInstant")&&document.getElementById("cercleBPM")&&document.getElementById("bpm")&&(document.getElementById("imageBPM").style.display="block",document.getElementById("petite-image").style.display="block",document.getElementById("BpmInstant").style.display="none",document.getElementById("RrInstant").style.display="none",document.getElementById("cercleBPM").style.borderColor="red",document.getElementById("cercleBPM").style.background="rgba(0, 0, 0, 0)",document.getElementById("bpm").style.display="none")):(document.getElementById("buttonsocket")&&(document.getElementById("buttonsocket").disabled=!1,document.getElementById("buttonsocket").style.display="block",document.getElementById("PlacementMoniteurPasLance").style.display="none"),document.getElementById("imageBPM")&&document.getElementById("petite-image")&&document.getElementById("BpmInstant")&&document.getElementById("RrInstant")&&document.getElementById("cercleBPM")&&document.getElementById("bpm")&&(document.getElementById("imageBPM").style.display="none",document.getElementById("petite-image").style.display="none",document.getElementById("BpmInstant").style.display="block",document.getElementById("RrInstant").style.display="block",document.getElementById("bpm").style.display="block",document.getElementById("cercleBPM").style.borderColor="white",document.getElementById("cercleBPM").style.background="rgb(72, 145, 129)",document.getElementById("BpmInstant").innerHTML=s,document.getElementById("RrInstant").innerHTML="RR: "+a))}});new Date;var v=!1;function f(t,e){const i=document.getElementById("divCalibrageEnCours");i.style.display="none";var s=I.dataItems[I.dataItems.length-1];console.log("y_reçu",t,s.get("valueY"));var a=s.get("valueY"),n=t;I.data.removeIndex(0);new Date;var o=e;if(!v){if(0!==e)return;v=!0}console.log("Y:",n,"||"," X:",o),I.data.push({date:o,value:n});var r=I.dataItems[I.dataItems.length-1];r.animate({key:"valueYWorking",to:n,from:a,duration:600,easing:S}),r.bullets=[],r.bullets[0]=s.bullets[0],r.bullets[0].get("sprite").dataItem=r,s.dataContext.bullet=!1,s.bullets=[];var l=r.animate({key:"locationX",to:.5,from:-.5,duration:600});if(l){var h=M.get("tooltip");h&&!h.isHidden()&&l.events.on("stopped",function(){M.updateTooltip()})}}function y(t,e,i,s){s=s.toFixed(0),w.set("text",s+"%"),b.data.setAll([{sector:"Rouge",size:t,color:le.yW("#fe0000")},{sector:"Jaune",size:e,color:le.yW("#ffc801")},{sector:"Vert",size:i,color:le.yW("#51c901")}])}if(o){le.yW("#ED1C24"),le.yW("#FFF100"),le.yW("#0CFF00");o.setThemes([Vs.new(o)]);var x=o.container.children.push(qs.new(o,{radius:80,innerRadius:60,layout:o.verticalLayout,shadowColor:le.yW(0,0,0,.9),shadowBlur:15,shadowOffsetX:15,shadowOffsetY:15})),b=x.series.push(fa.new(o,{valueField:"size",categoryField:"sector"}));b.labels.template.set("visible",!1),b.ticks.template.set("visible",!1),b.get("colors").set("colors",[le.yW("#fe0000"),le.yW("#ffc801"),le.yW("#51c901")]),b.data.setAll([{sector:"Rouge",size:51,color:le.yW("#ED1C24")},{sector:"Jaune",size:30,color:le.yW("#FFF100")},{sector:"Vert",size:20,color:le.yW("#0CFF00")}]);var w=o.tooltipContainer.children.push(we.new(o,{x:ht.yP,y:ht.yP,centerX:ht.yP,centerY:ht.yP,fill:le.yW(0),fontSize:30})),C=0;
1b.appear(1e3,100);var k=Date.now();if(setInterval(()=>{C=Math.floor((Date.now()-k)/1e3)},1e3),setInterval(()=>{if(document.getElementById("timer")){let t=document.getElementById("timer").innerHTML;"0:00"!==t||this.alertDisplayed||(this.alertDisplayed=!0,L())}},1e3),document.getElementById("buttonForFinishMoniteur")){const F=document.getElementById("buttonForFinishMoniteur");F.addEventListener("click",L)}function L(){var e={ArrayTacho:t,TabCC:p,AverageCC:d,TimeCompletion:C,Timer:C,BpmCC:u,Pct1:l,Pct2:h,Pct3:c,Cpm:6,Profil:"1",Inspi:5,PauseInspi:0,Expi:5,PauseExpi:0};e=JSON.stringify(e);const i=document.getElementById("ShowDataInPage");i.innerHTML=e}}function D(t){var e=document.getElementById("ShowCCInPage");e&&(e.innerHTML=t)}if(n){n.setThemes([Vs.new(n)]);var T=0;function B(){var t=[],e=new Date;e.setDate(e.getDate()-1e3),e.setHours(0,0,0,0);for(var i=0;i<100;i++){var s=new Date(e);s.setSeconds(s.getSeconds()),t.push({date:s,value:T})}return t}var P=B(),A=n.container.children.push(is.new(n,{focusable:!0})),S=ut,M=A.xAxes.push(ls.new(n,{maxDeviation:0,groupData:!1,extraMax:.1,extraMin:-.05,renderer:vs.new(n,{minGridDistance:50,startLocation:0}),tooltip:ke.new(n,{})})),E=A.yAxes.push(rs.new(n,{extraMax:.1,renderer:fs.new(n,{})}));A.set("scrollbarX",zi.new(n,{orientation:"horizontal"})),M.set("baseInterval",{timeUnit:"millisecond",count:100}),M.set("dateFormats",{millisecond:"ss.SSS",second:"mm:ss",minute:"HH:mm:ss",hour:"HH:mm",day:"MMM dd",week:"MMM dd",month:"yyyy MMM",year:"yyyy"});var I=A.series.push(Ys.new(n,{name:"Series 1",xAxis:M,yAxis:E,valueYField:"value",valueXField:"date",tooltip:ke.new(n,{pointerOrientation:"horizontal",labelText:"{valueY}"})}));P[P.length-1].bullet=!0,I.data.setAll(P),I.bullets.push(function(t,e,i){if(i.dataContext.bullet){var s=ge.new(t,{}),a=(s.children.push(Yi.new(t,{radius:5,fill:le.yW(16711680)})),s.children.push(Yi.new(t,{radius:5,fill:le.yW(16711680)})));return a.animate({key:"radius",to:20,duration:1e3,easing:gt(pt),loops:1/0}),a.animate({key:"opacity",to:0,from:1,duration:1e3,easing:gt(pt),loops:1/0}),Ui.new(t,{locationX:void 0,sprite:s})}});var R=A.set("cursor",Us.new(n,{xAxis:M}));R.lineY.set("visible",!1),A.appear(1e3,100)}})}}},bn=xn,wn=(0,w.A)(bn,Q,J,!1,null,"bc411668",null),Cn=wn.exports;async function kn(t){try{const e=t.protocoles[3]?.modules?.length>0?t.protocoles[3].modules:t.protocoles[2].modules,i=e.map(t=>t.id),s=await r().Cloud.run("getExercicesRessources",{moduleIds:i});return console.log(s),s}catch(e){throw console.error("Erreur dans getExercicesRessources:",e),e}}var Dn=i(45590),Tn=i(24984),Pn=i(86494),An=i(77038);async function Sn(t){(0,n.A)();try{const e=await r().Cloud.run("getUserSuivi",{userId:t});return e}catch(e){throw console.error("Erreur dans getSuiviForUser:",e),e}}var Mn=i(89164),En=i(56692),In=i(68416),Rn=function(){var t=this,e=t._self._c;return e("div",{staticClass:"program-container"},[e("div",{staticClass:"program-section"},[t.links.length>1?e("programSelector",{attrs:{folders:[{folderId:"short",name:"Programme court"},{folderId:"long",name:"Programme long"}]},on:{"program-changed":t.handleProgramChange}}):t._e(),e("div",{staticClass:"sessions-list"},[t.isTestAccount?e("div",{staticClass:"session-item"},[e("div",{staticClass:"session-header",class:{"is-active":"coherence-cardiaque"===t.openedSeance},on:{click:function(e){return t.toggleSeance("coherence-cardiaque",{files:[]})}}},[t._m(0),t._m(1)]),e("div",{staticClass:"session-content",class:{"is-open":"coherence-cardiaque"===t.openedSeance}},[t.exercises&&"coherence-cardiaque"===t.openedSeance?e("ExerciceList",{attrs:{exercises:t.exercises,idProtocol:t.idProtocol,idSeance:"coherence-cardiaque"},on:{"exercise-completed":t.execiseCompleted}}):t._e()],1)]):t._e(),t.isTestAccount?e("div",{staticClass:"session-item"},[e("div",{staticClass:"session-header",class:{"is-active":"nouveau-jeux"===t.openedSeance},on:{click:function(e){return t.toggleSeance("nouveau-jeux",{files:[]})}}},[t._m(2),t._m(3)]),e("div",{staticClass:"session-content",class:{"is-open":"nouveau-jeux"===t.openedSeance}},[t.exercises&&"nouveau-jeux"===t.openedSeance?e("ExerciceList",{attrs:{exercises:t.exercises,idProtocol:t.idProtocol,idSeance:"nouveau-jeux"},on:{"exercise-completed":t.execiseCompleted}}):t._e()],1)]):t._e(),t._l(t.currentProgramLinks,function(i,s){return e("div",{key:i.id,staticClass:"session-item",class:{completed:i.sessionStatus&&i.sessionStatus.isCompleted}}
1,[e("div",{staticClass:"session-header",class:{"is-active":t.openedSeance===i.id,"is-completed":i.sessionStatus&&i.sessionStatus.isCompleted,"is-locked":i.isLocked},on:{click:function(e){!i.isLocked&&t.toggleSeance(i.id,i)}}},[e("div",{staticClass:"session-main"},[e("h3",{staticClass:"session-title"},[t._v(t._s(i.folderName))])]),e("div",{staticClass:"session-meta"},[i.isLocked?t._e():e("div",{staticClass:"seance-status-container"},[i.sessionStatus&&100===i.sessionStatus.completionPercentage?e("div",{staticClass:"seance-status-completed"},[e("i",{staticClass:"fas fa-check-circle status-icon"}),e("span",{staticClass:"status-text"},[t._v("Complété")])]):e("div",{staticClass:"seance-status-progress"},[e("div",{staticClass:"status-steps"},t._l(i.sessionStatus&&i.sessionStatus.totalFilesCount,function(t){return e("div",{key:t,staticClass:"status-step",class:{"step-done":t<=(i.sessionStatus&&i.sessionStatus.completedFilesCount||0),"step-current":t===(i.sessionStatus&&i.sessionStatus.completedFilesCount||0)+1}},[e("i",{staticClass:"fas fa-circle"})])}),0)])]),e("span",{staticClass:"exercise-count"},[t._v(" "+t._s(i.sessionStatus&&i.sessionStatus.totalFilesCount)+" exercices ")]),i.isLocked?e("div",{staticClass:"lock-container"},[e("div",{staticClass:"lock-icon"})]):e("span",{staticClass:"chevron"})])]),e("div",{staticClass:"session-content",class:{"is-open":t.openedSeance===i.id}},[t.exercises&&t.openedSeance===i.id?e("ExerciceList",{attrs:{exercises:t.exercises,idProtocol:t.idProtocol,idSeance:i.id},on:{"exercise-completed":t.execiseCompleted}}):t._e()],1)])})],2)],1),t.IsLimited?e("pop-up-account-limited",{on:{"upgrade-requested":t.upgradeAccount}}):t._e()],1)},Ln=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"session-main"},[e("div",{staticClass:"session-title-with-badge"},[e("h3",{staticClass:"session-title"},[t._v(" Indice de cohérence cardiaque : Moniteur expert ")]),e("span",{staticClass:"new-badge"},[e("i",{staticClass:"fas fa-star"}),t._v(" NOUVEAU ")])])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"session-meta"},[e("div",{staticClass:"seance-status-container"},[e("div",{staticClass:"seance-status-progress"},[e("div",{staticClass:"status-steps"},[e("div",{staticClass:"status-step"},[e("i",{staticClass:"fas fa-circle"})])])])]),e("span",{staticClass:"exercise-count"},[t._v("1 exercice")]),e("span",{staticClass:"chevron"})])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"session-main"},[e("div",{staticClass:"session-title-with-badge"},[e("h3",{staticClass:"session-title"},[t._v("Nouveau jeux")]),e("span",{staticClass:"new-badge"},[e("i",{staticClass:"fas fa-star"}),t._v(" NOUVEAU ")])])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"session-meta"},[e("div",{staticClass:"seance-status-container"},[e("div",{staticClass:"seance-status-progress"},[e("div",{staticClass:"status-steps"},[e("div",{staticClass:"status-step"},[e("i",{staticClass:"fas fa-circle"})])])])]),e("span",{staticClass:"exercise-count"},[t._v("2 exercices")]),e("span",{staticClass:"chevron"})])}],Fn=i(99359),Bn=function(){var t=this,e=t._self._c;return e("div",{staticClass:"program-container"},t._l(t.normalizedExercises,function(i,s){return e("div",{key:i.id,staticClass:"program-section",class:{"
1is-completed":i.exerciseStatus.isCompleted}},[e("div",{staticClass:"exercise-header",class:t.computeHeaderClasses(i),attrs:{role:"button",tabindex:"0"},on:{click:function(e){return t.toggleExercise(i.id,i,s)}}},[e("div",{staticClass:"exercise-main"},[e("div",{staticClass:"exercise-leading"},[e("i",{class:["exercise-type-icon",{"fas fa-clipboard-list":i.questionnaire,"fas fa-headphones":i.nomfichieraudio||i.composite_file&&(i.composite_file.get("short_file")&&i.composite_file.get("short_file").get("nomfichieraudio")||i.composite_file.get("long_file")&&i.composite_file.get("long_file").get("nomfichieraudio")),"fas fa-video":i.nomfichiervideo,"fas fa-heartbeat":i.type&&"PnIg5kGR0p"===i.type.objectId||i.composite_file&&i.composite_file.get("moduleExpert"),"fas fa-gamepad":t.isGameExercise(i),"fas fa-file-alt":!i.questionnaire&&!i.nomfichieraudio&&!i.nomfichiervideo&&!i.composite_file}]})]),e("div",{staticClass:"exercise-info"},[e("h3",{staticClass:"exercise-title"},[t._v(" "+t._s(t.getDisplayTitle(i))+" ")]),e("div",{staticClass:"exercise-supporting"},[e("span",{staticClass:"exercise-prefix"},[t._v("Exercice "+t._s(s+1))])])]),e("div",{staticClass:"exercise-trailing"},[i.duration?e("span",{staticClass:"exercise-duration"},[e("i",{staticClass:"far fa-clock duration-icon"}),t._v(" "+t._s(t.formatDuration(i.duration))+" ")]):t._e(),i.exerciseStatus.isCompleted?e("i",{staticClass:"fas fa-check completed-icon exercise-state-icon"}):t._e(),e("div",{staticClass:"chevron-container"},[e("i",{staticClass:"fas fa-chevron-down",style:{transform:t.openedExercise===i.id?"rotate(180deg)":"rotate(0)"}})])])])]),t.openedExercise===i.id?e("div",{staticClass:"exercise-content",attrs:{"data-exercise-id":i.id}},[e("div",{staticClass:"content-wrapper"},[e("div",[t.hasMultipleAudioOptions(i)?e("div",{staticClass:"audio-selection-btns"},[e("div",{staticClass:"audio-options-title"},[t._v("Choisissez votre exercice :")]),e("div",{staticClass:"audio-option-buttons"},[e("button",{staticClass:"audio-option-btn",class:{active:"short"===t.getSelectedType(i.id)},attrs:{type:"button"},on:{click:function(e){return e.preventDefault(),t.selectAudioType(i.id,"short")}}},[e("i",{staticClass:"fas fa-compact-disc"}),t.getAudioDuration(i,"short")<t.getAudioDuration(i,"long")?e("span",[t._v(" Version courte ")]):e("span",[t._v(" Version simplifiée ")]),t.getAudioDuration(i,"short")?e("span",[t._v(" ("+t._s(t.formatDuration(t.getAudioDuration(i,"short")))+") ")]):t._e()]),e("button",{staticClass:"audio-option-btn",class:{active:"long"===t.getSelectedType(i.id)},attrs:{type:"button"},on:{click:function(e){return e.preventDefault(),t.selectAudioType(i.id,"long")}}},[e("i",{staticClass:"fas fa-compact-disc"}),t.getAudioDuration(i,"long")>t.getAudioDuration(i,"short")?e("span",[t._v(" Version longue ")]):e("span",[t._v(" Version complète ")]),t.getAudioDuration(i,"long")?e("span",[t._v(" ("+t._s(t.formatDuration(t.getAudioDuration(i,"long")))+") ")]):t._e()])])]):t._e(),i.questionnaire?e("div",{staticClass:"meta-item"},[e("questionnairePlayer",{attrs:{questionnaireId:i.questionnaire.id},on:{"questionnaire-completed":t.handleSaveQCM}})],1):t._e(),t.shouldShowAudioPlayer(i)?e("div",{staticClass:"meta-item-audio"},[e("audioPlayer",{key:`audio-${i.id}-${t.getSelectedType(i.id)}`,attrs:{file:t.getSelectedAudioFile(i)},on:{"audio-ended":t.handleAudioEnded}})],1):t._e(),i.nomfichiervideo?e("div",{staticClass:"meta-item"},[e("VideoPlayer",{attrs:{videoFile:i},on:{"video-ended":t.handleVideoEnded}})],1):t._e(),i.nomfichiervideo?e("VideoModalInfo",{attrs:{videoFile:i}}):t._e(),i.type&&"PnIg5kGR0p"===i.type.objectId||t.getModuleExpert(i)?e("div",{staticClass:"item-moniteur"},[e("MoniteurExpert",{attrs:{showBreathingGuide:!0,moniteurForRessources:!0,"fileReçu":i,"folderIdReçu":t.idSeance,idProtocol:t.idProtocol,seanceId:t.idSeance,tableau:i.tableauModification||[],audioSource:t.getModuleExpertValue(i,"nomfichieraudio"),timerAudioMoniteur:t.getModuleExpertValue(i,"duration")||0,titleAudioMoniteur:t.getModuleExpertValue(i,"sub_name")||t.getModuleExpertValue(i,"name")||t.getDisplayTitle(i)},on:{"moniteur-finish":t.MoniteurFinished}}
1)],1):t._e(),i.type&&"new-moniteur-expert"===i.type.objectId?e("div",[e("MoniteurExpert",{attrs:{showBreathingGuide:!0,moniteurForRessources:!0,"fileReçu":i,"folderIdReçu":t.idSeance,idProtocol:t.idProtocol,seanceId:t.idSeance,tableau:i.tableauModification||[]},on:{"moniteur-finish":t.MoniteurFinished}})],1):t._e(),e("div",[i.game_type||i.composite_file&&i.composite_file.get&&i.composite_file.get("jeux")?[t.resolveGameKeyFromExercise(i)?e("MonitorageJeux",{attrs:{"fileReçu":i,idPatientTherapeute:t.$IdPatient},on:{"game-finish":t.GameFinished}}):e("JeuUnityComponent",{attrs:{jeux:i,idPatientTherapeute:t.$IdPatient},on:{"game-finish":t.GameFinished}}),e("GameModalInfo",{attrs:{gameFile:i}})]:t._e()],2)],1)])]):t._e()])}),0)},On=[],Nn=i(85471),zn=i(89524),Yn=i(42203),Un=i(71140),Hn=i(72739),Vn=i(8484),Xn=i(43414),Gn=i(94905),qn=i(24911),Wn=i(20946),jn={name:"ExerciseList",components:{audioPlayer:zn.A,questionnairePlayer:Yn.A,VideoPlayer:Un.A,VideoModalInfo:Hn.A,GameModalInfo:Vn.A,MoniteurExpert:Xn.A,JeuUnityComponent:Gn["default"],MonitorageJeux:qn.A},props:{exercises:{type:Array,required:!0,default:()=>[]},idProtocol:{type:String,required:!0},idSeance:{type:String,required:!0},timer:{type:Number,default:0}},setup(t){const e=(0,Nn.KR)(null),i=(0,Nn.KR)(new Date),s=(0,Nn.KR)(0),a=(0,Nn.KR)(null),n=(0,Nn.Kh)({}),o=(0,Nn.KR)(0);(0,Nn.wB)(()=>t.exercises,t=>{t&&1===t.length&&(e.value=t[0].id),t&&t.forEach(t=>{n[t.id]||(t.composite_file&&t.composite_file.get("short_file")&&t.composite_file.get("short_file").get("nomfichieraudio")?n[t.id]="short":t.composite_file&&t.composite_file.get("long_file")&&t.composite_file.get("long_file").get("nomfichieraudio")&&(n[t.id]="long"))})},{immediate:!0});const r=(0,Nn.EW)(()=>(e,i)=>{if(Nn.Ay.prototype.$IsTherapeuteWithoutIdPatient)return!1;if(0===i)return!1;const s=t.exercises[i-1];return!s.exerciseStatus.isCompleted}),l=(0,Nn.EW)(()=>t=>({"is-active":e.value===t.id,"is-completed":t.exerciseStatus.isCompleted})),h=(0,Nn.EW)(()=>t.exercises?t.exercises.map(t=>{if("string"===typeof t.game_type)return t;let e=null;if(t.game_type){const i=t.game_type;i.get&&"function"===typeof i.get?e=i.get("name")||i.get("label"):i.name||i.label?e=i.name||i.label:i.attributes&&(e=i.attributes.name||i.attributes.label)}if(!e&&t.composite_file&&t.composite_file.get){const i=t.composite_file.get("jeux");if(i&&i.get&&"function"===typeof i.get){const t=i.get("game_type");t&&(t.get&&"function"===typeof t.get?e=t.get("name")||t.get("label"):(t.name||t.label)&&(e=t.name||t.label))}}return e?(console.log(`[RessourcesExo] ð Normalizing exercise ${t.id}: game_type = "${e}"`),{...t,_gameTypeName:e}):t}):[]);return{openedExercise:e,computeHeaderClasses:l,startTime:i,isExerciseLocked:r,selectedAudioType:n,forceRerender:o,timeInGame:s,ResultatJeux:a,normalizedExercises:h}},mounted(){console.log("[RessourcesExo] ===== EXERCICES REÃUS ====="),console.log("[RessourcesExo] Nombre d'exercices:",this.exercises?.length||0),this.exercises&&this.exercises.forEach((t,e)=>{let i=null,s="none";if(t.game_type)i=t.game_type,s="exercise.game_type";else if(t.attributes&&t.attributes.game_type)i=t.attributes.game_type,s="exercise.attributes.game_type";else if(t.composite_file&&t.composite_file.get&&t.composite_file.get("jeux")){const e=t.composite_file.get("jeux");e&&e.get&&"function"===typeof e.get&&(i=e.get("game_type"),s="composite_file.jeux.game_type")}else t.compositeFileJeux&&t.compositeFileJeux.game_type&&(i=t.compositeFileJeux.game_type,s="compositeFileJeux.game_type");const a=i&&((i.get&&"function"===typeof i.get?i.get("name"):null)||i.name||i.attributes&&i.attributes.name);console.log(`[RessourcesExo] ð Exercise ${e+1}:`,{id:t.id,name:t.fileName||t.name,hasGameType:!!i,gameType:a||"N/A",gameTypeSource:s,isGame:this.isGameExercise(t),gameKey:this.resolveGameKeyFromExercise(t)})}),console.log("[RessourcesExo] ============================="),this.exercises&&1===this.exercises.length&&(this.openedExercice=this.exercises[0].id)},methods:{getModuleExpert(t){return t&&t.composite_file&&"function"===typeof t.composite_file.get&&t.composite_file.get("moduleExpert")||null},getModuleExpertValue(t,e){const i=this.getModuleExpert(t);return i?"function"===typeof i.get?i.get(e):i.attributes&&void 0!==i.attributes[e]?i.attributes[e]:void 0!==i[e]?i[e]:null:null},isGameExercise(t){return!!t&&(!!t.game_type||t.composite_file&&t.composite_file.get&&!!t.composite_file.get("jeux"))},resolveGameKeyFromExercise(t){if(!t)return null;try{let e=null;if(t.game_type)e=t.game_type;else if(t.attributes&&t.attributes.game_type)e=t.attributes.game_type;else if(t.composite_file&&t.composite_file.get&&t.composite_file.get("jeux")){const i=t.composite_file.get("jeux");i&&i.get&&"function"===typeof i.get&&(e=i.get("game_type"))}else t.compositeFileJeux&&t.compositeFileJeux.game_type&&(e=t.compositeFileJeux.game_type);if(!e)return console.log("[RessourcesExo] No game_type found for exercise:",t.id),null;let i=null;if(i=e.get&&"function"===typeof e.get?e.get("name")||e.name||e.attributes&&e.attributes.name:e.name||e.attributes&&e.attributes.name||("string"===typeof e?e:null),!i)return console.log("[RessourcesExo] No name found in game_type for exercise:",t.id),null;const s=(0,Wn.vu)(i);return console.log("[RessourcesExo] Game resolution:",{exerciseId:t.id,exerciseName:t.fileName||t.name,gameTypeName:i,resolvedKey:s,isNativeGame:!!s,willLoadWith:s?"MonitorageJeux (Native Three.js)":"JeuUnityComponent (Unity WebGL)"}),s}catch(e){return console.error("[RessourcesExo] Error resolving game key:",e),null}},hasMultipleAudioOptions(t){if(!t||!t.composite_file)return!1;const e=t.composite_file.get("short_file"),i=t.composite_file.get("long_file"),s=e&&e.get("nomfichieraudio"),a=i&&i.get("nomfichieraudio");if(!s||!a)return!1;const n=e.get("duration"),o=i.get("duration");if(!n||!o||n===o)return!1;const r=Math.abs(n-o);return r>=5},getSelectedType(t){return this.selectedAudioType[t]||"short"},shouldShowAudioPlayer(t){if(t.nomfichieraudio)return!0;
1if(!t.composite_file)return!1;const e=t.composite_file.get("short_file"),i=t.composite_file.get("long_file");if(!e&&!i)return!1;if(this.hasMultipleAudioOptions(t)){const s=this.selectedAudioType[t.id];return"short"===s?e&&e.get("nomfichieraudio"):i&&i.get("nomfichieraudio")}return e&&e.get("nomfichieraudio")||i&&i.get("nomfichieraudio")},selectAudioType(t,e){console.log("Sélection du type:",e,"pour l'exercice:",t),this.selectedAudioType[t]=e,this.$forceUpdate()},shouldShowAudioType(t,e){return!this.hasMultipleAudioOptions(t)||this.selectedAudioType[t.id]===e},getSelectedAudioFile(t){if(t.nomfichieraudio)return t;if(!t.composite_file)return null;const e=this.selectedAudioType[t.id],i=t.composite_file.get("short_file"),s=t.composite_file.get("long_file");return"short"===e&&i&&i.get("nomfichieraudio")?i.attributes:"long"===e&&s&&s.get("nomfichieraudio")?s.attributes:i&&i.get("nomfichieraudio")?i.attributes:s&&s.get("nomfichieraudio")?s.attributes:null},getAudioDuration(t,e){if(!t||!t.composite_file)return null;if("short"===e){const e=t.composite_file.get("short_file");return e?e.get("duration"):null}if("long"===e){const e=t.composite_file.get("long_file");return e?e.get("duration"):null}return null},toggleExercise(t){this.openedExercise=this.openedExercise===t?null:t,this.openedExercise===t&&this.$nextTick(()=>{setTimeout(()=>{this.scrollToOpenedExercise()},300)})},scrollToOpenedExercise(){const t=document.querySelector(".content-container.overflow-y-auto.max-h-screen.width100");if(!t)return void console.error("Conteneur de défilement non trouvé");const e=document.querySelector(`.exercise-content[data-exercise-id="${this.openedExercise}"]`);if(e){const i=e.getBoundingClientRect(),s=80;window.scrollTo({top:Math.max(0,i.top+window.scrollY-s),behavior:"smooth"});const a=t.getBoundingClientRect(),n=i.top-a.top+t.scrollTop;t.scrollTo({top:Math.max(0,n-s),behavior:"smooth"}),console.log("Défilement vers l'exercice ouvert.")}else console.log("Contenu d'exercice non trouvé")},hasGameInCompositeFile(t){return t.composite_file&&t.composite_file.jeux&&t.composite_file.jeux.objectId},GameFinished(t){console.log("GameFinished",t),this.timeInGame=0===t.TimeCompletion?t.Timer:t.TimeCompletion,this.timeInGame=Math.round(this.timeInGame),this.ResultatJeux=JSON.stringify(t),console.log("Résultat game:",this.ResultatJeux,"Temps en jeu:",this.timeInGame,"Timer:",t.Timer,"TimeCompletion:",t.TimeCompletion);const e=this.exercises.find(t=>t.id===this.openedExercise);console.log("currentExercise",e);const i=this.getFileId(e);this.TerminerExerciceJeu(i,"0")},async TerminerExerciceJeu(t,e){console.log("TerminerExerciceJeu",t,e);try{this.timeInGame=Math.round(this.timeInGame/60);const e={idProtocol:this.idProtocol,SeanceSelected:"8hXg8RQPbd",fileId:t,IdLink:t,idPatientTherapeute:this.$IdPatient||r().User.current()&&r().User.current().id||"",elapsedTime:this.timeInGame,resultat:this.ResultatJeux,note:0,typeExercice:"Jeu"};console.log("saveData",e);const i=await r().Cloud.run("saveExo",e);console.log("Résultat sauvegarde:",i);const s=$().mixin({toast:!0,position:"bottom-end",showConfirmButton:!1,timer:6e3,timerProgressBar:!0,didOpen:t=>{t.addEventListener("mouseenter",$().stopTimer),t.addEventListener("mouseleave",$().resumeTimer)}});s.fire({icon:"success",title:"Votre exercice a bien été sauvegardé !"})}catch(i){console.error("Une erreur s'est produite lors de la sauvegarde :",i);const t=$().mixin({toast:!0,position:"bottom-end",showConfirmButton:!1,timer:6e3,timerProgressBar:!0,didOpen:t=>{t.addEventListener("mouseenter",$().stopTimer),t.addEventListener("mouseleave",$().resumeTimer)}});t.fire({icon:"error",title:"Une erreur est survenue lors de la sauvegarde"})}this.resetComponent()},getFileId(t){if(!t)return null;if(t.fileId)return t.fileId;if(t.compositeFile){const e=t.compositeFile;if(this.hasMultipleAudioOptions(t)&&this.selectedAudioType[t.id])if("short"===this.selectedAudioType[t.id]){const t=e.get("short_file");if(t&&t.id)return t.id}else{const t=e.get("long_file");if(t&&t.id)return t.id}const i=["jeux","moduleExpert","long_file","short_file"];for(const t of i){const i=e.get(t);if(i&&i.id)return i.id}}return null},getDisplayTitle(t){if(!t)return"";if(void 0!==t.fileSubName&&""!==t.fileSubName&&null!==t.fileSubName)return t.fileSubName;if(void 0!==t.fileName&&""!==t.fileName&&null!==t.fileName)return t.fileName;if(t.composite_file){if(t.composite_file.get("moduleExpert")&&t.composite_file.get("moduleExpert").get("name"))return t.composite_file.get("moduleExpert").get("name");if(t.composite_file.get("jeux")&&t.composite_file.get("jeux").get("name"))return t.composite_file.get("jeux").get("name");if(t.composite_file.get("long_file")&&t.composite_file.get("long_file").get("sub_name"))return t.composite_file.get("long_file").get("sub_name");if(t.composite_file.get("short_file")&&t.composite_file.get("short_file").get("sub_name"))return t.composite_file.get("short_file").get("sub_name")}return""},MoniteurFinished(){this.resetComponent()},formatDate(t){return new Date(t).toLocaleDateString()},resetComponent(){this.openedExercise=null,this.startTime=new Date,this.timeInGame=0,this.ResultatJeux=null},async handleVideoEnded(t){try{const e=this.exercises.find(t=>
1t.id===this.openedExercise),i={idProtocol:this.idProtocol,SeanceSelected:this.idSeance,fileId:e.fileId,IdLink:t.id,note:0,idPatientTherapeute:this.$IdPatient||r().User.current()&&r().User.current().id||"",elapsedTime:Math.floor((new Date-this.startTime)/1e3),typeExercice:"AudioVideo"},s=await r().Cloud.run("saveExo",i);this.$emit("exercise-completed",{exerciseId:e.id,result:s});const a=this.exercises.findIndex(t=>t.id===e.id);-1!==a&&(this.exercises[a].exerciseStatus.isCompleted=!0);const n=$().mixin({toast:!0,position:"bottom-end",showConfirmButton:!1,timer:6e3,timerProgressBar:!0,didOpen:t=>{t.addEventListener("mouseenter",$().stopTimer),t.addEventListener("mouseleave",$().resumeTimer)}});n.fire({icon:"success",title:"Votre exercice a bien été sauvegardé !"})}catch(e){console.error("Erreur lors de la sauvegarde de l'audio:",e);const t=$().mixin({toast:!0,position:"bottom-end",showConfirmButton:!1,timer:6e3,timerProgressBar:!0,didOpen:t=>{t.addEventListener("mouseenter",$().stopTimer),t.addEventListener("mouseleave",$().resumeTimer)}});t.fire({icon:"error",title:"Une erreur est survenue lors de la sauvegarde"})}this.resetComponent()},formatDuration(t){if(!t)return"0 min";const e=Math.floor(t/60),i=t%60;return 0===e?`${i} sec`:0===i?1===e?"1 min":`${e} mins`:`${e} min ${i} sec`},async handleAudioEnded(t){try{const e=this.exercises.find(t=>t.id===this.openedExercise);console.log("CurrentExercice:",e);let i=e.fileId;if(!i&&e.composite_file)if(this.hasMultipleAudioOptions(e)&&this.selectedAudioType[e.id])if("short"===this.selectedAudioType[e.id]){const t=e.composite_file.get("short_file");i=t&&t.id}else{const t=e.composite_file.get("long_file");i=t&&t.id}else{const t=e.composite_file.get("long_file"),s=e.composite_file.get("short_file");i=t&&t.id||s&&s.id}const s={idProtocol:this.idProtocol,SeanceSelected:this.idSeance,fileId:i,IdLink:t.id,note:100,idPatientTherapeute:this.$IdPatient||r().User.current()&&r().User.current().id||"",elapsedTime:Math.floor((new Date-this.startTime)/1e3),typeExercice:"AudioVideo",nomfichieraudio:t.nomfichieraudio},a=await r().Cloud.run("saveExo",s);this.$emit("exercise-completed",{exerciseId:e.id,result:a});const n=this.exercises.findIndex(t=>t.id===e.id);-1!==n&&(this.exercises[n].exerciseStatus.isCompleted=!0);const o=$().mixin({toast:!0,position:"bottom-end",showConfirmButton:!1,timer:6e3,timerProgressBar:!0,didOpen:t=>{t.addEventListener("mouseenter",$().stopTimer),t.addEventListener("mouseleave",$().resumeTimer)}});o.fire({icon:"success",title:"Votre exercice a bien été sauvegardé !"})}catch(e){console.error("Erreur lors de la sauvegarde de l'audio:",e);const t=$().mixin({toast:!0,position:"bottom-end",showConfirmButton:!1,timer:6e3,timerProgressBar:!0,didOpen:t=>{t.addEventListener("mouseenter",$().stopTimer),t.addEventListener("mouseleave",$().resumeTimer)}});t.fire({icon:"error",title:"Une erreur est survenue lors de la sauvegarde"})}this.resetComponent()},async handleSaveQCM(t){try{const e=t.reduce((t,e)=>t+e.note,0),i=this.exercises.find(t=>t.id===this.openedExercise),s={idProtocol:this.idProtocol,SeanceSelected:this.idSeance,fileId:i.fileId,IdLink:i.questionnaire.id,note:e,idPatientTherapeute:this.$IdPatient||r().User.current()&&r().User.current().id||"",elapsedTime:Math.floor((new Date-this.startTime)/1e3),answers:t,typeExercice:"Questionnaire"},a=await r().Cloud.run("saveExo",s);this.$emit("exercise-completed",{exerciseId:i.id,result:a});const n=this.exercises.findIndex(t=>t.id===i.id);-1!==n&&(this.exercises[n].exerciseStatus.isCompleted=!0);const o=$().mixin({toast:!0,position:"bottom-end",showConfirmButton:!1,timer:6e3,timerProgressBar:!0,didOpen:t=>{t.addEventListener("mouseenter",$().stopTimer),t.addEventListener("mouseleave",$().resumeTimer)}});o.fire({icon:"success",title:"Le questionnaire a bien été sauvegardé !"})}catch(e){console.error("Erreur lors de la sauvegarde:",e);const t=$().mixin({toast:!0,position:"bottom-end",showConfirmButton:!1,timer:6e3,timerProgressBar:!0,didOpen:t=>{t.addEventListener("mouseenter",$().stopTimer),t.addEventListener("mouseleave",$().resumeTimer)}});t.fire({icon:"error",title:"Une erreur est survenue lors de la sauvegarde du questionnaire"})}this.resetComponent()}}},Qn=jn,Jn=(0,w.A)(Qn,Bn,On,!1,null,"b1d53496",null),Kn=Jn.exports,$n=i(78998),Zn={name:"SeanceList",props:{links:{type:Array,required:!0,default:()=>[]},idProtocol:{type:String,required:!0}},components:{ExerciceList:Kn,programSelector:Fn.A,popUpAccountLimited:$n.A}
1,data(){return{openedSeance:null,exercises:null,selectedProgram:"short",IsLimited:!1}},computed:{currentProgramLinks(){return"short"===this.selectedProgram?this.links[0]&&this.links[0].links||[]:this.links[1]&&this.links[1].links||[]},isTestAccount(){const t=r().User.current();return t&&t.attributes&&t.attributes.test_account||!1}},created(){console.log("RessourcesList - Account limité:",this.$AccountLimited),this.$AccountLimited&&setTimeout(()=>{this.IsLimited=!0},2e4)},methods:{recupIdSeance(t,e){this.SeanceSelected=t,console.log("SeanceSelected:",e),this.callData(),this.SeanceSelectedObject=e,setTimeout(()=>{this.scrollToExercises()},800)},scrollToExercises(){const t=document.querySelector(".content-container.overflow-y-auto.max-h-screen.width100");if(t)if(this.$refs.exerciseList){const e=this.$refs.exerciseList.getBoundingClientRect(),i=80;window.scrollTo({top:Math.max(0,e.top+window.scrollY-i),behavior:"smooth"});const s=t.getBoundingClientRect(),a=e.top-s.top+t.scrollTop;t.scrollTo({top:Math.max(0,a-i),behavior:"smooth"}),console.log("Défilement du conteneur")}else console.log("Référence exerciseList non trouvée");else console.error("Conteneur de défilement non trouvé")},handleProgramChange(t){this.selectedProgram=t,this.openedSeance=null,this.exercises=null},upgradeAccount(){this.IsLimited=!1,this.$emit("upgrade-requested")},toggleSeance(t,e){this.openedSeance=this.openedSeance===t?null:t,"coherence-cardiaque"===t&&this.isTestAccount?this.exercises=[{id:"expert-monitor-001",order:1,fileName:"Moniteur expert",fileSubName:"Moniteur expert",avecCapteur:!0,avecGuide:!0,avecParametres:2,algo:"5",pcm:6,flux:1,exerciseStatus:{isCompleted:!1,score:0,timeSpent:0},isLocked:!1,type:{objectId:"new-moniteur-expert"}}]:"nouveau-jeux"===t&&this.isTestAccount?this.exercises=[{id:"game-001",order:1,fileName:"Test game",fileSubName:"Jeu de cohérence cardiaque",game_type:"new-game-type",avecCapteur:!0,avecGuide:!1,duration:300,exerciseStatus:{isCompleted:!1,score:0,timeSpent:0},isLocked:!1,type:{objectId:"game-type-001"}}]:this.exercises=e.files},execiseCompleted(t,e){this.$emit("execiseCompleted",this.idProtocol)}}},to=Zn,eo=(0,w.A)(to,Rn,Ln,!1,null,"00901def",null),io=eo.exports,so=i(67506),ao=function(){var t=this,e=t._self._c;return e("div",{staticClass:"relecture-dashboard"},[!t.loading&&t.filesDone.length>0?e("header",{staticClass:"dash-header"},[t._m(0),e("div",{staticClass:"dash-header__kpis"},[e("div",{staticClass:"kpi-card"},[e("span",{staticClass:"kpi-label"},[t._v("Sessions")]),e("span",{staticClass:"kpi-value"},[t._v(t._s(t.filesDone.length))])]),e("div",{staticClass:"kpi-card"},[e("span",{staticClass:"kpi-label"},[t._v("Moyenne ILP")]),e("span",{staticClass:"kpi-value"},[t._v(t._s(t.globalAverage))])]),e("div",{staticClass:"kpi-card"},[e("span",{staticClass:"kpi-label"},[t._v("Temps cumulé")]),e("span",{staticClass:"kpi-value kpi-value--sm"},[t._v(t._s(t.totalPracticeTime))])])])]):t._e(),!t.loading&&t.filesDone.length>0?e("div",[e("div",{staticClass:"chart-toggle-section"},[e("button",{staticClass:"btn btn--outline",on:{click:function(e){return t.toggleChart()}}},[e("i",{staticClass:"fas fa-chart-bar"}),t._v(" Graphique d'évolution ILP "),e("i",{class:["fas",t.showChart?"fa-chevron-up":"fa-chevron-down"]})]),t.showChart?e("div",{staticClass:"chart-result-container"},[t.chartDates.length>0?e("chart-result",{attrs:{dates:t.chartDates,scores:t.chartScores}}):e("div",{staticClass:"empty-chart"},[e("i",{staticClass:"fas fa-chart-area"}),e("p",[t._v("Entraînez-vous sur plusieurs jours pour débloquer la courbe d'évolution.")])])],1):t._e()]),e("div",{staticClass:"table-card"},[e("div",{staticClass:"table-responsive"},[e("table",{staticClass:"dash-table"},[t._m(1),e("tbody",[t._l(t.paginatedFiles,function(i,s){return[e("tr",{key:i.id,staticClass:"data-row"},[e("td",[e("span",{staticClass:"cell-text cell-text--muted"},[t._v(t._s(t.formatDateTime(i.createdAt)))])]),e("td",[e("span",{staticClass:"cell-text font-medium"},[t._v(t._s(t.getExerciseName(i)))])]),e("td",{staticClass:"text-center"},[e("span",{staticClass:"score-pill",class:t.getScoreClass(t.getScore(i))},[t._v(" "+t._s(t.getScore(i))+" ")])]),e("td",{staticClass:"text-center"},[e("span",{staticClass:"cell-text cell-text--muted"},[t._v(t._s(t.formatDuration(i.time_elapsed)))])]),e("td",{staticClass:"text-center"},[e("button",{staticClass:"btn btn--sm btn--detail",on:{click:function(e){return t.toggleDetails(s)}}},[e("i",{staticClass:"fas fa-eye"}),e("span",{staticClass:"btn-label-detail"},[t._v("Détail")])])])]),t.expandedIndex===s?e("tr",{key:i.id+"-details",staticClass:"detail-row"},[e("td",{attrs:{colspan:5}},[e("div",{staticClass:"detail-content"},[e("RelectureDetailsModal",{attrs:{session:i,inline:!0},on:{close:function(e){t.expandedIndex=null}}})],1)])]):t._e()]})],2)])]),t.totalPages>1?e("div",{staticClass:"dash-pagination"},[e("button",{staticClass:"page-btn",attrs:{disabled:1===t.currentPage},on:{click:t.prevPage}},[e("i",{staticClass:"fas fa-chevron-left"})]),e("div",{staticClass:"page-numbers"},t._l(t.totalPages,function(i){return e("span",{key:i,staticClass:"page-num",class:{"page-num--active":t.currentPage===i},on:{click:function(e){return t.goToPage(i)}}},[t._v(t._s(i))])}),0),e("button",{staticClass:"page-btn",attrs:{disabled:t.currentPage===t.totalPages},on:{click:t.nextPage}},[e("i",{staticClass:"fas fa-chevron-right"})])]):t._e()])]):t._e(),t.loading?e("div",{staticClass:"dash-spinner-wrap"},[e("div",{staticClass:"dash-spinner"})]):0===t.filesDone.length?e("div",{staticClass:"empty-state"},[t._m(2),e("p",[t._v("Aucune donnée disponible.")]),e("p",{staticClass:"empty-state__hint"},[t._v("Lancez votre première session pour voir vos résultats ici.")])]):t._e()])},no=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"dash-header__left"},[e("h2",{staticClass:"dash-title"},[t._v("Synthèse â Indice de lâcher-prise")]),e("p",{staticClass:"dash-subtitle"},[t._v("Analyse de vos entraînements et de la régulation de votre lâcher-prise.")])])},function(){var t=this,e=t._self._c;return e("thead",[e("tr",[e("th",[t._v("Date")]),e("th",[t._v("Exercice")]),e("th",{staticClass:"text-center"},[t._v("Score ILP")]),e("th",{staticClass:"text-center"},[t._v("Durée")]),e("th",{staticClass:"text-center"},[t._v("Détail")])])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"empty-state__icon"},[e("i",{staticClass:"fas fa-heartbeat"})])}],oo=i(37915),ro=function(){var t=this,e=t._self._c;return e("div",{staticClass:"chart-container"},[e("div",{ref:"chartDom",staticStyle:{width:"100%",height:"250px"}})])},lo=[],ho={name:"ScoreChart",props:{scores:{type:Array,required:!0,validator:t=>Array.isArray(t)&&t.length>0},dates:{type:Array,required:!0,validator:t=>Array.isArray(t)&&t.length>0}},data(){return{chartInstance:null}},mounted(){this.createChart(),window.addEventListener("resize",this.handleResize)},beforeDestroy(){window.removeEventListener("resize",this.handleResize),this.chartInstance&&(this.chartInstance.dispose(),this.chartInstance=null)},watch:{scores:{handler(){this.updateChart()},deep:!0},dates:{handler(){this.updateChart()},deep:!0}},methods:{handleResize(){this.chartInstance&&this.chartInstance.resize()},updateChart(){if(!this.chartInstance)return;const t=this.scores.map((t,e)=>({score:t,date:this.dates[e]})).filter(({score:t})=>void 0!==t&&0!==t),e=t.map(t=>t.score),i=t.map(t=>t.date),s=this.getChartOption(i,e);this.chartInstance.setOption(s)},createChart(){const t=this.scores.map((t,e)=>({score:t,date:this.dates[e]})).filter(({score:t})=>void 0!==t&&0!==t),e=t.map(t=>t.score),i=t.map(t=>t.date);this.chartInstance=P.Ts(this.$refs.chartDom);const s=this.getChartOption(i,e);this.chartInstance.setOption(s),this.chartInstance.on("click",t=>{if(void 0!==t.dataIndex){const s=i[t.dataIndex],a=e[t.dataIndex];this.$emit("click",{date:s,score:a})}})},getChartOption(t,e){return{tooltip:{trigger:"axis",axisPointer:{type:"shadow"},formatter:"{b} : {c}%"},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0}
1,xAxis:{type:"category",data:t,axisLine:{lineStyle:{color:"#9ca3af"}},axisLabel:{color:"#6b7280"}},yAxis:{type:"value",max:100,axisLine:{show:!1},axisLabel:{color:"#6b7280"},splitLine:{lineStyle:{color:"#f3f4f6",type:"dashed"}}},series:[{name:"Scores",type:"bar",barWidth:"40%",data:e.map(t=>{let e="#ef4444";return t>=85?e="#10b981":t>=60&&(e="#f59e0b"),{value:t,itemStyle:{color:e,borderRadius:[4,4,0,0]}}})}]}}}},co=ho,uo=(0,w.A)(co,ro,lo,!1,null,"6fd61d2c",null),po=uo.exports,go=i(53429),mo=i(87119);async function _o(t){var e=[];const i=new(r().Query)("file_done"),s=new(r().Query)("User");return s.equalTo("objectId",t),i.equalTo("ANI",!0),i.matchesQuery("user",s),i.include("file"),i.include("module"),i.limit(1e3),await i.find().then(t=>{t.forEach(t=>{const i=JSON.parse(t.attributes.resultatJeux),s=t.id,a={...t.attributes,resultatJeux:i,id:s};e.push(a)})}),e}var vo={name:"RelectureDashboard",components:{RelectureDetailsModal:oo.A,ChartResult:po},data(){return{filesDone:[],loading:!0,expandedIndex:null,currentPage:1,itemsPerPage:6,showChart:!1,chartDates:[],chartScores:[]}},computed:{sortedFiles(){return[...this.filesDone].sort((t,e)=>new Date(e.createdAt)-new Date(t.createdAt))},paginatedFiles(){const t=(this.currentPage-1)*this.itemsPerPage;return this.sortedFiles.slice(t,t+this.itemsPerPage)},totalPages(){return Math.ceil(this.filesDone.length/this.itemsPerPage)},globalAverage(){const t=this.filesDone.map(t=>this.getScore(t)).filter(t=>t>0);return t.length?Math.round(t.reduce((t,e)=>t+e,0)/t.length):0},totalPracticeTime(){const t=this.filesDone.reduce((t,e)=>t+(e.time_elapsed||0),0),e=Math.floor(t/60);return e>=60?`${Math.floor(e/60)}h ${e%60}m`:`${e} min`}},methods:{formatDateTime(t){return t?(0,go.A)(new Date(t),"dd/MM/yyyy à HH:mm",{locale:mo.A}):""},getExerciseName(t){return t.file?.attributes?.name||"Session libre"},getScore(t){return Math.round(t.resultatJeux?.AverageCC||t.resultatJeux?.aniAverage||0)},getScoreClass(t){return t>=70?"pill-good":t>=40?"pill-warn":"pill-bad"},formatDuration(t){if(!t)return"â";const e=Math.floor(t/60),i=Math.floor(t%60);return e>0&&i>0?`${e} min ${i} sec`:e>0?`${e} min`:`${i} sec`},toggleDetails(t){this.expandedIndex=this.expandedIndex===t?null:t},toggleChart(){this.showChart?this.showChart=!1:(this.buildChartData(),this.showChart=!0)},buildChartData(){const t={};this.sortedFiles.forEach(e=>{const i=(0,go.A)(new Date(e.createdAt),"dd/MM/yyyy"),s=this.getScore(e);s>0&&(t[i]||(t[i]=[]),t[i].push(s))});const e=Object.keys(t).reverse();this.chartDates=e,this.chartScores=e.map(e=>{const i=t[e];return Math.round(i.reduce((t,e)=>t+e,0)/i.length)})},nextPage(){this.currentPage<this.totalPages&&this.currentPage++},prevPage(){this.currentPage>1&&this.currentPage--},goToPage(t){this.currentPage=t},async fetchDonnees(){this.loading=!0;try{(0,n.A)();const t=this.$IdPatient||r().User.current().id;this.filesDone=await _o(t)}catch(t){console.error("Erreur de récupération :",t)}finally{this.loading=!1}}},created(){this.fetchDonnees()}},fo=vo,yo=(0,w.A)(fo,ao,no,!1,null,"06f9ab69",null),xo=yo.exports;const bo=(0,h.$t)("user");var wo={name:"folders",props:["foldersBrique","isPageUser","isPageSessionGroup","themes","idPatientTherapeute","ParamJeu","LinksOfUser"],watch:{LinksOfUser:{handler(t){this.keyCarousel++,this.handleRecupId(null)},immediate:!0,deep:!0}},components:{informationActiviteComponent:g.A,audioPlayer:j,ChartFull:Cn,JeuUnityComponentVue2:()=>Promise.resolve().then(i.bind(i,94905)),JeuxParentComponent:()=>i.e(2249).then(i.bind(i,32249)),loaderComponent:()=>i.e(2088).then(i.bind(i,72088)),suiviUtilisateurComponent:Dn.A,appSuivieCc:Pn.A,relectureUser:Mn.A,subscriptionPopUp:En.A,CarouselFolders:In.A,newAniChart:Y,relectureAni:xo,SeanceList:io},data(){return{keyCarousel:100,displaySuiviDataUser:!1,displayInfo:!1,keyGame:0,isAndroid:!1,tous_variable:"tous",isCourtClicked:!1,isLongClicked:!1,isDisplay:!1,DisplayResult:!1,descriptionSelected:"",isExercicecourt:!0,isExercicelong:!1,descriptionPro:null,idProtocol:null,idSeance:"",idExercice:"",showNotification:!1,idInfo:"",IntroSelected:"",idBriqueSelected:"",Active:!1,isDisableText:!1,audioURL:"",zoom:!1,AudioAffichage:!1,background:!1,element_folder2
1:[],element_link2:[],element_file2:[],element_composite_file2:[],suiviDataAni:[],element_game_type:[],tableau_folder2:[],tableau_game_type:[],currentAudio:null,tableau_link2:[],modalOpened:!1,tableau_file2:[],tableau_composite_file2:[],titleAudio:"",sourceAudio:"",timerAudio:"",ModuleRecupByBrique:[],idGame:"",idAudio:"",objectIdPatient:"",affichagePatientBloc:!1,DisplaySeances:!1,SeanceSelected:"",element_folder_for_exercice:[],compositeFile:[],elapsedTime:0,isLoading:!1,timeInGame:0,ModuleByBriqueSelected:[],shortExercises:[],longExercises:[],moduleExpertExercices:[],jeuxExercices:[],parentFolderId:"",idUserForSave:null,UtilisateurEnCours:"",UserSelected:"",folders_for_relecture:[],ouvertureSuiviCcUtilisateur:"",UserForRelecture:"",currentTime:0,suiviData:[],selectedUser:null,displaySuiviData:!1,RelectureRessourcesLibres:!0,showModalSubscription:!1,indexPopUpAbonnement:0,abonnementFinish:!1,indexRessources:2,timeGame:0,firstGameChoose:null,showRelectureAni:!1,suiviDataUser:[],isLoadingExercises:!1,KeyButton:0,folderBriqueSelected:null,idBrique:null,links:[],loadingSeance:!1}},async created(){this.ParamJeu&&this.getParamJeu(this.ParamJeu),this.isAndroid=await(0,An.m)(),this.openLoading(),this.verifAbonnement(),this.idUserForSave=this.getCookie("idUserForSave")},methods:{scrollToElement(t,e="default"){if(!t)return;const i=document.querySelector(".content-container.overflow-y-auto.max-h-screen.width100");if(i){const s=i.getBoundingClientRect(),a=t.getBoundingClientRect(),n=a.top-s.top+i.scrollTop;let o=0;switch(e){case"program":o=30;break;case"resource":o=20;break;case"exercise":o=10;break;default:o=15}const r=80,l=n-o,h=Math.max(0,l-r);window.scrollTo({top:Math.max(0,a.top+window.scrollY-o-r),behavior:"smooth"}),i.scrollTo({top:h,behavior:"smooth"}),console.log(`Défilement vers ${h}px (contexte: ${e})`)}else console.error("Conteneur de défilement non trouvé")},update(t,e,i){this.titleAudio=t,this.sourceAudio=e,this.timerAudio=i},upgradeAccount(){this.$emit("upgrade-requested")},refreshProtocol(){},goto(t){var e=this.$refs[t];const i=document.querySelector(".content-container.overflow-y-auto");if(e&&i){const t=-20,s=e.getBoundingClientRect();window.scrollTo({top:Math.max(0,s.top+window.scrollY+t),behavior:"smooth"});const a=i.getBoundingClientRect(),n=s.top-a.top+i.scrollTop;i.scrollTo({top:Math.max(0,n+t),behavior:"smooth"})}},linkUser(t){this.$emit("linkUser",t)},isLoadingActivitySpace(t){this.$emit("isLoadingActivitySpace",t)},handleResourceClick(t){console.log("Ressource cliquée:",t),this.$emit("CloseUserMenu"),this.$emit("resource-click",t)},async getParamJeu(t){try{const i=this.folders.find(t=>"Biofeedback de cohérence cardiaque"===t.name);if(i){if(this.recupId(i),"le_jardin"===t)var e="Le jardin";else if("la_plage"===t)e="La plage";else if("le_safari"===t)e="Le safari";else if("l_aviron"===t)e="L'aviron";setTimeout(()=>{const t=this.jeuxExercices.find(t=>t.attributes.sub_name===e);this.recupIdGame(t.id,t),setTimeout(()=>{this.GoToTheGame()},1e3)},3e3)}else console.log("Le folder n'a pas été trouvé.")}catch(i){console.error("Une erreur s'est produite : ",i)}},scrollToTarget(){const t=this.$refs.targetDiv,e=document.querySelector(".content-container.overflow-y-auto");if(t&&e){const i=-20,s=t.getBoundingClientRect();window.scrollTo({top:Math.max(0,s.top+window.scrollY+i),behavior:"smooth"});const a=e.getBoundingClientRect(),n=s.top-a.top+e.scrollTop;e.scrollTo({top:Math.max(0,n+i),behavior:"smooth"})}},updateCurrentTime(t){this.currentTime=t},updateKey(t){this.indexRessources++},getCookie(t){var e="; "+document.cookie,i=e.split("; "+t+"=");if(2==i.length)return i.pop().split(";").shift()},verifAbonnement(){var t=r().User.current(),e=t.get("group").get("type_abonnement"),i=t.get("group").get("subscription_end_date"),s=new Date;this.abonnementFinish="gratuit"===e&&i<s},async findDataForRelecture(){const t=r().Object.extend("User"),e=new(r().Query)(t);this.idPatientTherapeute?e.equalTo("objectId",this.idPatientTherapeute):this.idUserForSave?e.equalTo("objectId",this.idUserForSave):e.equalTo("objectId",this.user.objectId),this.UserForRelecture=await e.find(),this.UserForRelecture=this.UserForRelecture[0],this.UserSelected=this.user,this.folders_for_relecture=this.folders,this.UserSelected.filesDone=await(0,Tn.p)(this.user.objectId),this.UserSelected.therapeute&&(this.UserSelected.typePratique="Thérapeute",this.UserSelected.acces_donnees_therapeute=!0)},async openSuivi(){if((0,n.A)(),this.DisplayResult)this.DisplayResult=!1;else{this.DisplayResult=!0,this.selectedUser=null,this.displaySuiviData=!1,this.suiviData=null;try{let t;t=this.$IdPatient?this.$IdPatient:this.idPatientTherapeute?this.idPatientTherapeute:this.idUserForSave?this.idUserForSave:r().User.current().id,console.log("[Relecture Ressource Libre] userId utilisé :",t),this.suiviData=await Sn(t);const e=r().Object.extend("_User"),i=new(r().Query)(e);this.selectedUser=await i.get(t),console.log("[Relecture Ressource Libre] selectedUser :",this.selectedUser.id),this.displaySuiviData=!0}catch(t){console.error("Erreur lors du chargement des données de suivi :",t),this.displaySuiviData=!0}}},async openSuiviAni(){this.showRelectureAni?this.showRelectureAni=!1:this.showRelectureAni=!0},openModalSubscription(){this.showModalSubscription=!0}
1,closeModalSubscription(){this.showModalSubscription=!1},startCounterFreeAccount(){setTimeout(()=>{if(!this.modalOpened){const t=r().User.current();!1===t.attributes.group.attributes.essai_gratuit&&"gratuit"===t.attributes.group.attributes.type_abonnement&&(this.recupIdAudio(null),this.recupIdGame(null,null),this.openModalSubscription(),this.modalOpened=!0)}},2e4)},openLoading(){this.isLoading=!0,setTimeout(()=>{this.isLoading=!1},1e3)},TerminerExo(){},timerExercice(){this.exerciseStartTime=Date.now(),setInterval(()=>{this.elapsedTime=Math.floor((Date.now()-this.exerciseStartTime)/1e3)},1e3)},startTimer(){this.showNotification=!0,this.progressWidth=0,this.intervalId&&clearInterval(this.intervalId),this.intervalId=setInterval(()=>{this.progressWidth+=3.33,this.progressWidth>=100&&clearInterval(this.intervalId)},100),setTimeout(()=>{this.closeNotification()},3e3)},closeNotification(){this.showNotification=!1,this.progressWidth=0},recupIdPatient(t){},getFoldersByTheme(t){return this.foldersBrique.filter(e=>e.themes.length<2?e.themes[0].objectId===t:e.themes[0].objectId===t||e.themes[1].objectId===t)},async recupId(t){t?(this.isLoadingExercises=!0,this.initializeState(t),await this.loadExercises(t),this.isLoadingExercises=!1):this.resetState()},resetState(){Object.assign(this,{idProtocol:null,shortExercises:[],longExercises:[],moduleExpertExercices:[],jeuxExercices:[],DisplaySeances:!1})},initializeState(t){this.DisplaySeances=!0,this.idProtocol=t.id,console.log("idProtocol:",this.idProtocol)},async loadExercises(t){const{shortExercises:e,longExercises:i,moduleExpertExercises:s,jeuxExercises:a}=await kn(t);Object.assign(this,{shortExercises:e,longExercises:i,moduleExpertExercices:s,jeuxExercices:this.sortExercises(a)})},sortExercises(t){return[...t].sort((t,e)=>t.order-e.order)},callExerciceRessources(t){this.ModuleByBriqueSelected=t.protocoles[3].modules},scrollToSection(){const t=document.querySelector("#SeanceLocalisation"),e=document.querySelector(".content-container.overflow-y-auto");if(t&&e){const i=-20,s=t.getBoundingClientRect();window.scrollTo({top:Math.max(0,s.top+window.scrollY+i),behavior:"smooth"});const a=e.getBoundingClientRect(),n=s.top-a.top+e.scrollTop;e.scrollTo({top:Math.max(0,n+i),behavior:"smooth"})}},recupIdSeance(t){this.SeanceSelected=t,this.idSeance=t.id,"Indice de cohérence: Moniteur Expert"===this.SeanceSelected.name||"Exercices Audio"===this.SeanceSelected.name||"Serious Games"===this.SeanceSelected.name||"Biofeedback de cohérence cardiaque"===this.SeanceSelected.name||"Exercices Musicaux"===this.SeanceSelected.name?this.callExercice(this.SeanceSelected.id):this.callData()},async callExercice(t){this.compositeFile=[];const e=r().Object.extend("folder"),i=r().Object.extend("link"),s=r().Object.extend("game_type"),a=new(r().Query)(e),n=new(r().Query)(i),o=new(r().Query)(s);a.equalTo("objectId",t),n.matchesQuery("parent_folder",a),n.include("composite_file");try{await o.find();const t=await n.find();for(const e of t){const t=e.get("composite_file");this.compositeFile.push(t)}this.element_folder_for_exercice=t}catch(l){console.error(l)}},recupInfo(t){return this.displayInfo=!this.displayInfo,this.idInfo=t},show_exercice_court(){this.isExercicecourt=!0,this.isExercicelong=!1,this.isCourtClicked=!this.isCourtClicked,this.recupIdSeance(""),this.recupIdAudio("")},show_exercice_long(){this.isExercicecourt=!1,this.isExercicelong=!0,this.isLongClicked=!this.isLongClicked,this.recupIdSeance(""),this.recupIdAudio("")},AudioFinished(t){this.TerminerExercice(this.idAudio,0)},MoniteurFinished(t){this.recupIdAudio(null)},handleCloseAudio(){this.recupIdAudio(null)},async handleAniSave(t){const e=$().mixin({toast:!0,position:"bottom-end",showConfirmButton:!1,timer:6e3,timerProgressBar:!0,didOpen:t=>{t.addEventListener("mouseenter",$().stopTimer),t.addEventListener("mouseleave",$().resumeTimer)}});try{const i=this.$IdPatient?this.$IdPatient:this.idPatientTherapeute,s=(t.points||[]).map(t=>({x:Math.round(1e3*t.elapsed),y:Math.round(t.bpm||0)})),a=(t.points||[]).map(t=>({x:Math.round(1e3*t.elapsed),y:Math.round(t.ani||0)})),n={ArrayTacho:s,TabCC:a,AverageCC:t.summary?Math.round(t.summary.aniAverage||0):0,TimeCompletion:t.summary?Math.round(t.summary.duration||0):0,Timer:t.summary?Math.round(t.summary.duration||0):0,BpmCC:t.summary?Math.round(t.summary.bpmAverage||0):0,Pct1:0,Pct2:0,Pct3:0,Cpm:6,Profil:"basique",Inspi:4.5,PauseInspi:0,Expi:5.5,PauseExpi:0},o={resultat:JSON.stringify(n),idPatientTherapeute:i,idUserForSave:this.idUserForSave?this.idUserForSave:i,elapsedTime:t.summary.duration,note:0,typeExercice:"ANI","folderIdReçu":this.idBrique,comment:t.comment||"",ANI:!0};await r().Cloud.run("saveExo",o),e.fire({icon:"success",title:"Votre exercice a bien été sauvegardé !"})}catch(i){console.error("Erreur lors de la sauvegarde de l'exercice ANI:",i),e.fire({icon:"error",title:"Une erreur s'est produite lors de la sauvegarde."})}},GameFinished(t){this.timeInGame=0===t.TimeCompletion?t.Timer:t.TimeCompletion,this.timeInGame=Math.round(this.timeInGame),this.ResultatJeux=JSON.stringify(t),this.TerminerExerciceJeu(this.idGame,0)},async handleRecupId(t){if(this.idBrique=null,this.showRelectureAni=!1,this.DisplayResult=!1,this.KeyButton++,this.folderBriqueSelected=t,console.log("folderbrique: ",t),!t)return console.log("folderbrique est nul, réinitialisation..."),this.idBrique=null,this.links=[],void(this.DisplayResult=!1);this.loadingSeance=!0,this.idBrique=t.id;try{let e;e=this.$IdPatient?this.$IdPatient:this.idPatientTherapeute?this.idPatientTherapeute:this.idUserForSave?this.idUserForSave:r().User.current().id,console.log("[Ressources libres] utilisateur utilisé pour les exercices :",e),this.links=await so.A.getLinksForFolder(t,e,"Ressources"),this.$emit("CloseMenuUser"),console.log("Résultat de RecupId:",this.links)}catch(e){console.error("Erreur lors de la récupération des liens:",e)}finally{this.loadingSeance=!1}},async TerminerExercice(t,e){const i=$().mixin({toast:!0,position:"bottom-end",showConfirmButton:!1,timer:6e3,timerProgressBar:!0,didOpen:t=>{t.addEventListener("mouseenter",$().stopTimer),t.addEventListener("mouseleave",$().resumeTimer)}}),s=r().Object.extend("folder"),a=r().Object.extend("file"),n=r().Object.extend("User"),o=r().Object.extend("link"),l=new(r().Query)(s),h=new(r().Query)(s),c=new(r().Query)(n),d=new(r().Query)(a),u=new(r().Query)(o);let p,g,m,_,v;u.include("file"),l.equalTo("objectId",this.idProtocol),h.equalTo("objectId",this.SeanceSelected),d.equalTo("objectId",t),u.matchesQuery("file",d),this.idPatientTherapeute?c.equalTo("objectId",this.idPatientTherapeute):this.idUserForSave?c.equalTo("objectId",this.idUserForSave):c.equalTo("objectId",r().User.current().id),[p,g,m,_,v]=await Promise.all([l.find(),h.find(),d.find(),c.find(),u.find()]);const f=m[0].attributes.duration;let y;if("string"===typeof f&&f.includes(":")){const[t,e]=f.split(":");y=60*parseInt(t)+parseInt(e)}else"number"===typeof f?y=f:(y=0,console.warn("Format de durée invalide:",f));m[0].set("duration",y);const x={brique:p[0],time_elapsed:this.elapsedTime,user:_[0],module:g[0],protocole:g[0],resultatJeux:void 0,note:e,file:m[0],comment:void 0,group:r().User.current().get("group")},b=r().Object.extend("file_done"),w=new b;try{await w.save(x);i.fire({icon:"success",title:"Votre exercice a bien été sauvegardé !"})}catch(C){console.error("Error while creating Data: ",C),i.fire({icon:"error",title:"Une erreur est survenue lors de la sauvegarde de votre exercice !"})}this.$forceUpdate(),m[0].set("duration",f),setTimeout(()=>{this.currentAudio.attributes.name===m[0].attributes.name&&(this.recupIdAudio(null),this.recupIdSeance(this.SeanceSelected))},2e3)},GoToTheGame(){var t=document.getElementById("GameUnity");t.scrollIntoView({behavior:"smooth",block:"center"})},testData(t){},async TerminerExerciceJeu(t,e){var i=r().Object.extend("file"),s=new(r().Query)(i);s.equalTo("objectId",t),s.include("game_type");var a=await s.first();const n=$().mixin({toast:!0,position:"bottom-end",showConfirmButton:!1,timer:6e3,timerProgressBar:!0,didOpen:t=>{t.addEventListener("mouseenter",$().stopTimer),t.addEventListener("mouseleave",$().resumeTimer)}});this.timeInGame=this.timeInGame/60,this.timeInGame=Math.round(this.timeInGame);try{r().Cloud.run("saveExo",{idProtocol:this.idProtocol,SeanceSelected:"8hXg8RQPbd",fileId:t,IdLink:a.id,idPatientTherapeute:this.idPatientTherapeute,idUserForSave:this.idUserForSave?this.idUserForSave:this.idPatientTherapeute,elapsedTime:this.timeInGame,resultat:this.ResultatJeux,note:0,typeExercice:"Jeu"},{success:function(t){},error:function(t){console.error("Une erreur s'est produite lors de la sauvegarde :",t)}}),n.fire({icon:"success",title:"Votre exercice a bien été sauvegardé !"})}catch(o){n.fire({icon:"error",title:"Une erreur s'est produite lors de la sauvegarde",text:o}),console.error("Une erreur s'est produite lors de la sauvegarde :",o)}setTimeout(()=>{this.recupIdGame(null,null)},2e3)},async TerminerExerciceJeu2(t,e){const i=r().Object.extend("folder"),s=r().Object.extend("file"),a=r().Object.extend("User"),n=r().Object.extend("link"),o=new(r().Query)(i),l=new(r().Query)(i),h=new(r().Query)(a),c=new(r().Query)(s),d=new(r().Query)(n);let u,p,g,m,_;d.include("file"),o.equalTo("objectId",this.idProtocol),l.equalTo("objectId","8hXg8RQPbd"),c.equalTo("objectId",t),d.matchesQuery("file",c),this.timeInGame=this.timeInGame/60,this.idPatientTherapeute?h.equalTo("objectId",this.idPatientTherapeute):this.idUserForSave?h.equalTo("objectId",this.idUserForSave):h.equalTo("objectId",r().User.current().id),[u,p,g,m,_]=await Promise.all([o.find(),l.find(),c.find(),h.find(),d.find()]);const v={brique:u[0],time_elapsed:this.timeInGame,user:m[0],module:p[0],protocole:p[0],resultatJeux:this.ResultatJeux,note:e,file:g[0],comment:void 0,group:r().User.current().get("group")},f=r().Object.extend("file_done"),y=new f;try{await y.save(v);this.showNotification=!0,this.startTimer()}catch(x){console.error("Error while creating Data: ",x)}this.$forceUpdate(),setTimeout(()=>{this.recupIdGame(null,null)},2e3)},isAppleDevice(){const t=window.navigator.userAgent,e=["iPhone","iPad"];return e.some(e=>t.includes(e))},recupIdGame(t,e){if(null!==this.idSelectedGame||null!==this.SelectedGame){var i=this.isAppleDevice();if(i){if(null===this.firstGameChoose)this.firstGameChoose=e.attributes.sub_name;else{var s=e.attributes.sub_name;"La plage"===s?this.$router.push({path:"/activites",query:{jeu:"la_plage"}}):"Le jardin"===s?this.$router.push({path:"/activites",query:{jeu:"le_jardin"}}):"Le safari"===s?this.$router.push({path:"/activites",query:{jeu:"le_safari"}}):(s="L'aviron")&&this.$router.push({path:"/activites",query:{jeu:"l_aviron"}}
1)}null===t&&this.$router.push({path:"/activites",query:{jeu:"la_plage"}})}this.keyGame++,this.idAudio=null,this.idGame=t,this.scrollToJeuUnity(),null!==e&&(this.parentFolderId=e.attributes.parent_folder_id)}},scrollToJeuUnity(){setTimeout(()=>{const t=document.querySelector("#GameUnity");t.scrollIntoView({behavior:"smooth",block:"center"})},100)},recupIdAudio(t){this.keyGame++,null!==this.currentAudio&&this.currentTime>60&&(this.currentTime=0,this.TerminerExercice(this.currentAudio.id)),null!==t?(this.SeanceSelected=t.attributes.parent_folder_id,this.idAudio=t.id,this.currentAudio=t):(this.idAudio=null,this.currentAudio=null),this.idGame=null,this.timerExercice()},changeAudioPlaying(t){this.audioURL=t},toggleFullscreen(t){document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement?document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen():t.requestFullscreen?t.requestFullscreen():t.msRequestFullscreen?t.msRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullscreen&&t.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)},chartFullScreen(){const t=document.getElementById("chart-component");this.toggleFullscreen(t)},callData(){(0,n.A)();const t=r().Object.extend("folder"),e=r().Object.extend("link"),i=r().Object.extend("file"),s=r().Object.extend("composite_file"),a=r().Object.extend("game_type"),o=new(r().Query)(t),l=new(r().Query)(e),h=new(r().Query)(i),c=new(r().Query)(s),d=new(r().Query)(a);try{o.equalTo("objectId",this.idSeance),l.matchesQuery("parent_folder",o),o.find().then(t=>this.element_folder2=t),l.find().then(t=>{}),h.limit(1e3).find().then(t=>this.element_file2=t),c.limit(500).find().then(t=>this.element_composite_file2=t),d.find().then(t=>this.element_game_type=t);var u=[],p=[],g=[],m=[],_=[],v=[],f=[],y=[],x=[],b=[];u.push(v),p.push(f),g.push(y),m.push(x),_.push(b),this.$forceUpdate()}catch(w){}}},computed:{...bo.mapGetters(["group","user","folders"]),filteredModules(){return this.isTherapeute?this.folder_brique_protocole:this.folder_brique_protocole.filter(t=>!this.idModuleLock.includes(t.id))}},mounted(){this.descriptionPro=this.group.description}},Co=wo,ko=(0,w.A)(Co,u,p,!1,null,"7a409142",null),Do=ko.exports,To=i(7224);const Po=(0,h.$t)("user");var Ao={name:"mes-activites",components:{"chrome-picker":l.Chrome,FoldersComponent:Do},props:{idPatientTherapeute:{type:String,default:""},ParamJeu:{type:String,default:""},LinksOfUser:{type:Array}},emits:["resource-click","upgrade-requested","linkUser","isLoadingActivitySpace"],data(){return{color:{hex:"#4579B2"},editorOption:{placeholder:"",theme:"snow"},userGroup:{},error:!1,foldersBrique:[],themes:[],foldersProtocolLoad:!1,hasImage:!1,loaderFolderActive:!1,isStepFolder:!1,DisplayFolders:!1}},computed:{...Po.mapGetters(["group","user","folders"])},methods:{...Po.mapActions({actionsUpdateUserGroup:"updateUserGroup",actionsLogOut:"logOut",actionsLoadFolder:"loadFolder"}),scrollToExercises(){let t=0;const e=20,i=setInterval(()=>{const s=[".exercise-list",".exercises-container",".exercise-item",".seance-content",".seance-exercises","[data-exercise-container]",'[data-content-type="exercise"]',".thisproto",".modules-list"];let a=null;for(const t of s){const e=document.querySelectorAll(t);if(e.length>0){a=e[e.length-1],console.log(`Ãlément trouvé avec le sélecteur: ${t}`);break}}if(t++,a){clearInterval(i),console.log("Ãlément cible trouvé, défilement en cours...");const t=document.querySelector(".content-container.overflow-y-auto");if(t){const e=150,i=a.getBoundingClientRect();window.scrollTo({top:Math.max(0,i.top+window.scrollY-e),behavior:"smooth"});const s=t.getBoundingClientRect(),n=i.top-s.top+t.scrollTop;t.scrollTo({top:Math.max(0,n-e),behavior:"smooth"})}}else if(t>=e){clearInterval(i),console.log("N'a pas pu trouver d'élément d'exercice - tentative de défilement fixe");const t=document.querySelector(".content-container.overflow-y-auto");t&&(window.scrollTo({top:window.scrollY+500,behavior:"smooth"}),t.scrollTo({top:t.scrollTop+500,behavior:"smooth"}))}},150)},handleSeanceSelected(){this.scrollToExercises()},handleResourceSelection(t){console.log("Ressource cliquée dans ListRessources:",t),this.$emit("resource-click",t)},async goAbonnement(){this.$router.push("abonnement")},async goToActivites(){await this.actionsLogOut(),"/"===this.urlFront?this.$router.push({path:"/"}):window.open(this.urlFront,"_self")},async unlockProtocol(t){await(0,To.t)(t,this.group.type_abonnement,!0)},CloseMenuUser(){this.$emit("CloseMenuUser")},upgradeAccount(){this.$emit("upgrade-requested")},linkUser(t){this.$emit("linkUser",t)},isLoadingActivitySpace(t){this.$emit("isLoadingActivitySpace",t)},initializeState(){this.bgColor=this.group.couleur,this.loaderFolderActive=!0,this.error=!1,this.foldersProtocolLoad=!1},async loadFolders(){null===this.folders&&await this.actionsLoadFolder(),this.foldersBrique=d()(this.folders.filter(t=>"Santé"===t.domaine))},async loadThemes(){try{const t=await r().Cloud.run("getSanteThemes");this.themes=t.result||t,this.foldersProtocolLoad=!0}catch(t){throw new Error("Erreur lors du chargement des thèmes: "+t.message)}},handleError(t){console.error("Erreur:",t),this.error=!0}},async mounted(){try{this.DisplayFolders=!1,this.initializeState(),await Promise.all([this.loadFolders(),this.loadThemes()]),this.DisplayFolders=!0}catch(t){console.error("Erreur lors du mounted:",t),this.handleError(t)}finally{this.loaderFolderActive=!1}}},So=Ao,Mo=(0,w.A)(So,s,a,!1,null,null,null),Eo=Mo.exports},89643:function(){ 2/*! 3 * fullscreen-polyfill 4 * 1.0.4 - 12/2/2020 5 * https://github.com/nguyenj/fullscreen-polyfill#readme 6 * (c) John Nguyen; MIT License 7 */ 8(function(){"use strict";var t=["fullscreen","fullscreenEnabled","fullscreenElement","fullscreenchange","fullscreenerror","exitFullscreen","requestFullscreen"],e=["webkitIsFullScreen","webkitFullscreenEnabled","webkitFullscreenElement","webkitfullscreenchange","webkitfullscreenerror","webkitExitFullscreen","webkitRequestFullscreen"],i=["mozFullScreen","mozFullScreenEnabled","mozFullScreenElement","mozfullscreenchange","mozfullscreenerror","mozCancelFullScreen","mozRequestFullScreen"],s=["","msFullscreenEnabled","msFullscreenElement","MSFullscreenChange","MSFullscreenError","msExitFullscreen","msRequestFullscreen"];document||(document={});var a,n=(a=[t[1],e[1],i[1],s[1]].find(function(t){return document[t]}),[t,e,i,s].find(function(t){return t.find(function(t){return t===a})})||[]);function o(e,i){document[t[0]]=document[n[0]]||!!document[n[2]]||!1,document[t[1]]=document[n[1]]||!1,document[t[2]]=document[n[2]]||null,document.dispatchEvent(new Event(e),i.target)}void 0===document[t[1]]&&n.length&&(document[t[0]]=document[n[0]]||!!document[n[2]]||!1,document[t[1]]=document[n[1]]||!1,document[t[2]]=document[n[2]]||null,document.addEventListener(n[3],o.bind(document,t[3]),!1),document.addEventListener(n[4],o.bind(document,t[4]),!1),document[t[5]]=function(){return document[n[5]]()},Element.prototype[t[6]]=function(){return this[n[6]].apply(this,arguments)})})()}
8,6424:function(t,e,i){"use strict";t.exports=i.p+"img/LogoPasDeSignal.93b9169d.png"},65565:function(t,e,i){"use strict";t.exports=i.p+"img/annuler.4d362383.png"},57955:function(t){"use strict";t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAACXBIWXMAAHYcAAB2HAGnwnjqAAAUwklEQVR4nO1da5BcR3X++nHnvU/tarWSbbAcCDGYIglxnMRIMn7Elh2MBBgRQoKtlZyEkKQqEFJJipCkKFKkKCpApQrLMgQqP0xRQCCY4PDQrhQwIRQY64FtCYEka5FkdnZm7ty5j+4++XFnZnelWe3M7FzNeO98VStpNbcfc8/Xp0+fPn2aERH6iC94tzvQR3fRJ0DM0SdAzNEnQMzRJ0DM0SdAzNEnQMzRJ0DM0SdAzNEnQMzRJ0DM0SdAzNEnQMzRJ0DM0SdAzNEnQMzRJ0DM0SdAzNEnQMzRJ0DM0SdAzNEnQMzRJ0DMIaNu4Bc+9vdRN7EiyBgyrg8YDTRxDIJJAZ5MApyx6Hu3Mo7/yd9FVnfkBOg6iMhUXJDSzRfxDYgIIpMmAD1Bgqiw5qcAUrol4dfLBQqkTQQ96i2sfQKY9oVIunXivNCw5gmA1Zx9jMG5yRgQYDVl+wRYA1j7QlwNep0ARNoQGdO2FFd1/H0VZUkbIt1+v68UenYZSMaEy7eqJc6kJJFqcW1ORFiFDNohT9hvr25AMimIp5JgnPfkcrInCUBKk65UsFh4FATQRoOnU8SEaIUEUXSxcVNKkXbcJW1SoGC0Ac+02O8rhJ6bAhoJv/6ZNtBOBaR0c1IlWt0U0IL2oOBS4dc/MwbGcZvv9xVETxGAlCbtNBZ+HYZCEgTqci+TSCnSrrfKeVzDVFxaSXDG98N+X6YtMlXy6t4iQc9MAXXhNyMwCknA0yniCauuVskYokBVvXidceIYPwD8AEwKYpYEtyyALdghxvXIeH5zlRFBlysQ2XTPTAc9QQDSVbXf4mg1FRcgIiYlKAhggqAltd1SH6suZfICsIS10Gazwq9XRDCO2zM2QdcJQMasrPYvA+N6ALzOduoyIGNArgcwv+3ppWYT8Gyaur066K4NQETGcSMbtZFilasLMqZK3u56qrpKADIUiw2X5UBKd538XV4F0GJ7KlZgLLQlibq75dxVAjCljVEBWG86ySIDY+EfxvPBtbG72Zcu2wDwdcEGaRMvEjAG4wegchlgrKsy6C4BEha3EgnShVJIgoing1Dthqr30p+FzyPtA2egQEEXbchMhsiS2WhbvDy6SwDOkmJ8VAtN0EUbRJ23CRgLXzrjDEShO5mUuvRHm4WNp+rznSYD4wykDVTRhiUE+OiQ6mwLraPrfgAkLEtMrFM0e14YuwwxkKsaR6u3jhlnAFXj+wIF4/kgrcFqVdf+rgqaWC0iOAFmWWBSgLFwtbLqvjAWegJLNqQhiMkxBSESq654leg+AQCwbFrKiTGlfva80JxDZDOrq686dClQ0I4L+D64NqG6YxwQHH/7shsVqhQgIvb+p78roQ2gfMANoAUHSybA00kwS4ZEapOUYXcIqliG8BXkxgmFZMJa1ZfsEHqCAADABrJSGqODC3PccA6eTrX8wmvWNWkDU66AXA/cGDBp4UNbth/LZDKPSym/L4Q4BaAIwCCcBuUj1103ZIy5Sil1o23bd7z7249fS04F2vPA0inwdApM8OoOY2t9IgKM7YC7HsSGcY10sieED/QQAQCADQ2IpK9UxXEETyfrL6/5CjiM50PbZYhAgScS+OiWe/4jm82+f+/Rg99tspZHAGD/3btudRznPe888KXbyXag/QBiIAtmWUBLa3cGkAF5AZJjIwHlMl1X+4vRUwQAABofETJfVeFNCr++rq64MKUyJAAxNmoevvmel+45MnOinX48eOzQ1wF8/ZG7d/3y1MEvfQ/5AtPzRfCBHHgq0bRdQERgnEGODYEGB3pK+EC3VwGNQARmJVoc+Qym4oGKZchkAvu279rNRgZFu8JfjL1HD36frxvmD9315r8WQsAUbRjXb8lvQQQwKVcZoBgNek8D+EFL+wOMMxgvgLHLsLIpevjWN/zG3qMHv7NSuZmdezJEtBkAGGPHt3xun3u559/x7BMf2H/nm5+c+tpnv6yKZTDBwSzZtCYwgQKzVDiF9BBY1KRs6XAogXS53PSRLMYYSGuo+SKsZJIeuf2NV+85MvPccs9P75i6Vin1V0qpXw+C4BqtdQ4AhBC2ZVmnpJSHhBAf2PaF/cvWse/lW17xwFc/85TSGmJ4sKUlK5MCIptp2bsQ5eHQniJAGFdXafp5xhh0yYYgQGxc74PzZKPnZnbuSfi+/2nHce71PK/hMzUkk0k3k8k8ett//tvbl31IqUCdOSdN0oLIZZr3EzAGkcu0HCEcJQF6wQYgEBEZQyYImi7EOIMJAjBfQYyPBssJf3rH1Ets2/5xPp+/byXhA4Dneal8Pv8HX/nt3z0xs3PPaMOHpLTk+LqAHA+kdPPeSyKQ5wNmtdGqncOVsQEIREqFW5+E0CoigEDhfjiZcBQ1q0oZAApDwhIjQxrJREPrenrH1CuLxeK3XNfNLi3PwDkH5yH/jTEwxiyRiW3bm40xT0/vmHrV1s8/fOmUkE0lkkNZ7VdcLgayTYd1GD+AUSrcA2KMQmOShd7I6mYE4yw0Gq/A0fTICVA/4NHGEe1lwcINFQEGNpRrqDZmdu4Zs237a4uFL4QAADiOg/n5ebiuC8YYcrkcBgcHkU6noZSqE8FxnDEhxDcA/GLDfgwPKTp7LkFKgwnR/KA2BEL4PpYrwaSESKco6iQVkRPAuF5nhQ+Eo98PYA0OaDCWbvSI7/uPlMvl8drvNeGfPHkSzz33HHzfrwtMCIF0Oo0NGzbg6quvXmLYlUqll37jdff/82u/+Il3X9KIFEkrl9FaKc6k6GhwF6lw74KnEpEmqYjeBuhwkoXQOxhOHTyXbhiSO71j6lWlUmn7QhkGYwyOHTuG48ePg4jMhg0bTl9zzTVHr7rqqmfWrVv3c8dx8Mwzz+D48eP1MjWUy+U/mtm5J9eoLZ7LKlLh1NbpsUq6c+Hty6Hn/ABNwRiwhAXivOGuURAE71FKCWBhvj958iTOnDmDF7/4xU+OjIz86d6jB2dqz++/YZucmJh4Qz6ff+9Pf/rT6zOZDK655hoEVaPUdd1sNpt9F4D3XdJYwkoywYlMBEEthMhDRl+YBCACz6SW/Vgp9SuLf7dtG7Ozs7juuuu++K4zT96L2aXP737qgALwKIBHP3jtDV87e/bsrePj47Asqz4VBEFwDxoRAEDCspQSXEZzDjFaBkQ/BXT8pTAQEJ7QaYCZnXvGgiDYVPtdSol8Po/JyckfvOvMk/euVPtfnn3qtqGhodOe59VXCQCgtd6wXBmdTspoZE+Ra4DICRBF/xnjAF+261dprZes94Mg0KVS6YFm6x8aGvpHfdHcS0Spg2/Y27DRMF4gKkm90DVAx78AhX74ZeZbIlKM1WN+wDnHhg0bjrxv/sT3m20hm80+lslkluwNGGOYMabx+6rGFfaGa6c1XBFPYCetYyIAlzG2bNvmruvWl32e52H9+vUtfc+NGzcWstlssFgLuK4Lx3EaPs+ACKNJo/UFXQEbIPIWliCfz5v5+Xm2eP52HOdl0zumXtFsHalUaqvWeokDqVKpUKFQaLimDY31F+DwR2/sBbQMMsu70iuVylnf9yvGLISZB0Egfd//aLP127b9EaUUB0Lha61RLBYru574cmOnRlTG2hU4KhE9AaJQjUTLOpj2HJmZ833/tG3bkHJhlVssFrd9/Xfe/uGVqn58+9sO2La9ufY75xzFYhGO48wuV4aUjsgIZJGTIHoCqABgvH74olMgddmQ+u+cPXsWwIJHzxiDubm5P398+9u+feD1u2+5uMCB1+9+/X/d+dZnCoXC1tr/McaglMLp06eRSqU+v2xfOuStW3JwhTNQ4HfejX4Rot8LsF2wtAmzb9dJUN3Oq9ObWg67ro66hidJstnsR06ePPn7586dE5OTk/C8hfwBhULhJsuy/vuxO97yMynlSQAJpdS1+Xx+XU3t15BIJPCTn/wESqlyOp1uOIWQMdSKkOrfv/4egCXzRxioDlPxQa4PaSWb3yNvA5ETQCYkqUKZqYQHJkRowVdlxnid8mCcg0nRtCYlY2ACBd4gvP4Pf/Q/P/jQ1a96/Omnn77LsiyMjY0t2fwJgkBUnUWbLimMcAQmEgnMzs7ixIkT2Lx586f2HJlpeIiTAtWS+icCoGuJqMMt8PpWePWHlAYLNORglj5+4x23N115G4h8Cnj4tTu38GyKuOeDORUw2wErlcFKZaBQBhVs0HwJer7YerClHwDLmF/Dw8O7crnczw8fPozZ2VlIKWFZ1mWDN4QQSCaT4Jzj1KlTOHr0KMbHx5/9s5P/98eNO0BU7cOKqB1RMxUXZq4IKpRABRsolMFKTvheyhUwxwX3A/BsmvbfsuNlDx47NN1UA20icg2w9+jBQ5+8/U2bPM970Pf9V3ue9yKtdc4YkzTGJJRSljFG/MORb2WV64Gnmj8PQFrD+D54g3iQ3U8dKD50/WvedOLEia8cOXIkOTc3h02bNiGXy0FKCbMoi3htyej7Pp5//nnMzs5idnYWw8PDhYmJibvx/NMN2zee30I28uqBFc+HZUm89/qbypxzZVmWzzn3OOeuZVnzlmWdtCzre8lk8pNTh6fPNVl527gim0FTh6dnscxGyv4btiUASFE4WaALc8IEAeMJq2m1alwfTEhi4lLVsffowW8+dP1rbjtz5syXTp06NXz+/HmMjo5iaGioPtIBIAgCVCoVlEol5PN5+L6PycnJc5OTk7ftOTLzbKN2SSkyfgsJolg4XSQyaeLrhoPNmzdvAOBWN6K6hp4KCkXZ9f1CwRK5LMI4suaKMSEgsmksp98feeUtuUKh8O/nzp27q1AoWJzz+jYxAGit6xphZGTEm5iY+NzAwMDvPfDDbzZ2/BhDulwBmhz9tV6pUhnJsVEfycSKsYmLEZ8rYzJJTfNkkdbhObwmQVpDV9xlr3h54IfftAHc+9D1r/lV13XfUSwWb3ddd8QYwxljJKX0k8nk+YGBgcfS6fTHpw5P/2j5xmqJrVoIdKmFsHGOVoUfNXqLAIylrXRaK9fj4QnhllK1QjuVMI5uGU2w9+jB7wF4AAAefsXWDBHlAPh7jszMAwDOr9CGMWQct/V1PwHacZEczHU9H8DF6C0CABCDOVedczPhEr81BxsFCtpUwNPJFZMwTh2edgA03t1pVLdSpCteayMf1cMrtWihXLZPgJVAUmR5Ll09t99Gea2hyxXwZIJ4wlrWLmi+QiLj+a1nBF0oDgAQA1mANw5g7SZ6jgDG84kxvuqLHozrgYIALJEgbsnWiWAMmUCFZxVXcfEUgNrxZZAfEFuU27gX0FMEMH5A1eyZHQFpA6q4II8DUhAXApBigQu1v6tkCxNXKpAyIK06msSRjAkNVcaIWbJnSNAzBKBAkalc9oBu+3UbA/gGGkE9emdJSrCaC7bmjo0QIQnSxGT3E0UDPUKA8JKIaIR/aWNdPpZHBF2pQGQzXU8UDfRAQEg9W/gLMaCuXZgwZXwvHBDtNgHCOb/77+GKg7Rue2XRSXQ5W7gJt1NjChMEXdcC3b4vILbZwoGakyjO6eK1QSfO1HWDQ6ttk3EGaANh6ExnetQeupsu3pCv8oUwAqYNEtTi58J/syUruyiwONE0UftORsZ56LaeL8CA1ne4my2hy9nCJSxpQRVKLZOg9vJ12UEwV4AuO9Uwq1qi584xoRakCTCQUtB2GSpfgHYqLQe7hsGeAVShBJlK0SdefUdXs4V31w/AeVKsHw3ozDmpCiXI4UEwwVecFxkP505dKoNXPAgQEGjoigeWTIQ/lqwmi24tteuSdmqpZw2BfBXe8eMH4FpDIAxM1UQQ2cxC3oKV+q10mC2cC/B1w/r+J7/RVSu428tAIJmwxMZxLTVBzRdX1AS1lOu6WAqFPzpE++5+y3s+vPWe73LGwJzKQoxhxVuV8IkA47hQ+QJovghecSEYx7/ccu8TD23f9TdiMEfMdqBLNrDC9Td14RdKYSbTyXEFKbueNLBnIoKo4ik9e14oziAHc2CWtWQTJhyNHKQUVKEEESjI9esMGxoQtWc+/ks33+o4zl+889CX70LFgxYCYnSwtfw9tfaqCShpvghmDFgmjY/dfPdns9nsh/YcmXkCAPbfsI3ff+ALSs/NM5NKhKnuhbhk84jxhX5LAuTG9S1lC49PnkDHVfrseaEEgxwaqCZmpnoMfW3uFNpAToxpNpBtOIXte/mWF03971d/HNhlzhNW+wRwfQhD9K+/tf3dqVTq01OHpxuGjNB8UasLc9wkLIjBXHhc3FzU72LtnoBxxdKplkZ+bAgAAHC9QM1ekAoEkcvWz94bzweVXQjOIDaMNfUSWaDygVMZbjnrOGpGJkEMDjRl4lHJUercBaFFeN8Bqw5w8n3ocgUSDHJyXCHVeqr4tZ4ocilSSUtuXK8kF6CCHVrb+SJgO5CWxP7tu3Y1O4IYY3Z1kdhGR+hySSgubWsgI+XGCS0ZBxWr/Z4rhAmsuQjVfhvCjxq9RwAASCas/Xfe9yaRTpIEIBjDB2+64/S+O95424PHDj3abDVG8KtW5WlrddrIpOTDd973Vp7N1Pv9TzfedmH/nfe9rlduCLkYvTcFLML+G7ZltNa/BsBtJgN4A5AqlNq6g6hmdIqBbMvqY/8N27jW+jcBBG32ewniExZ+EXY/dcABsJqjUYxxTq3d8LG4dHvFdj91wAA41F7pK4venAI6iSWncJss0kaZFyp6WgN0BNXlGEMrU3p1ytBrP05hzROAG2OUUpynkmAtXEJEFR9WKrnmgxXWPAGYkGTmCmF6Wdnc1zV+AON6sAZz3b3a+wpgzRNg3013vuT+r37mx6ZYhmFN5NwhgBFBZtOERGLN20iRLwOnpzuX36CWEabVZZ3WesuFCxc+VSgUNlEYFbwsDYQQNDo6+uzIyMj9UsqmlnC1vnTqytuLsXXr1pUfahNrXgMAgBBiZmJi4saxsbGbiShFRBYAgaWrIANAc85LlmU9RkRXKE69u4hcA/TR21jzc1wfl0efADFHnwAxR58AMUefADFHnwAxR58AMUefADFHnwAxR58AMUefADFHnwAxR58AMUefADFHnwAxR58AMUefADFHnwAxR58AMUefADHH/wMpjNZhcg5kEQAAAA5lWElmTU0AKgAAAAgAAAAAAAAA0lOTAAAAAElFTkSuQmCC"}
8,23871:function(t,e,i){"use strict";t.exports=i.p+"img/jaccepte.24799875.png"},64475:function(t,e,i){"use strict";t.exports=i.p+"img/noDeviceFound.e32a1d7f.png"}}]); 9//# sourceMappingURL=9161-legacy.c4811a86.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.