1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./qgrHOAx6.js","./n-bHumwf.js","./entry.Dy40LT6D.css","./DyTkGwmm.js","./BYfgXQC1.js","./Be_KLEFM.js","./B5x4eILT.js","./DKazUoX9.js","./CuuAoUVR.js","./C17x2JyX.js","./VAvatar.I3upbxdF.css","./Buj7Yi7q.js","./BHASOSKV.js","./VInput.DLOkTOHd.css","./4iwNX7wJ.js","./DY33fIBh.js","./BGcgY5e7.js","./VDivider.DVWKP2HQ.css","./VOverlay.DpRumaFv.css","./sTWuow-P.js","./Bv0KflD0.js","./autofocus.OZQHJehP.css","./CNMKzhtw.js","./VSheet.CJWPiaVh.css","./u6nLeTgE.js","./VChip.Mk0OGgaT.css","./VSelect.WQX5cdDx.css","./Logo.BJ9SGRve.css","./Bg2LMq8G.js","./CBrYxiqp.js","./BN4HtSQm.js","./VNavigationDrawer.Cd2wUyer.css","./NNa4OGsg.js","./VContainer.BexUYEwW.css","./DvId9Vyj.js","./VRow.B9A3ZRbC.css","./XkVmb8w9.js","./VAppBar.iH3nckfj.css","./VFooter.Bnt1MvrA.css","./BpbqQr7z.js","./C3d3t3G-.js","./MNdvXDtb.js","./FooterMain.DrA-tbKE.css","./75LvYuON.js","./BHavI6Eu.js","./VCard.CHO6100k.css","./BuZNoCQt.js","./VMain.BUNCw7dA.css","./index.CbOFRt1L.css"])))=>i.map(i=>d[i]); 2import{q as z}from"./n-bHumwf.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};r.SENTRY_RELEASE={id:"ba21dd7c7321af314f917df960443d737115ba56"};var c=new r.Error().stack;c&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[c]="e7c077ac-aee0-42ea-bc2f-fac091653d0d",r._sentryDebugIdIdentifier="sentry-dbid-e7c077ac-aee0-42ea-bc2f-fac091653d0d")}catch{}})();function V(r,c){const{width:i,height:h,margin:a}=c,p=a.left,x=a.top,b=Math.max(0,i-a.left-a.right),y=Math.max(0,h-a.top-a.bottom),[m,S]=r.xDomain,[e,d]=r.yDomain,s=S-m||1,o=d-e||1;return{xOf:k=>p+b*(k-m)/s,yOf:k=>x+y*(1-(k-e)/o),candleWidth:()=>b/s,plotLeft:p,plotTop:x,plotWidth:b,plotHeight:y}}const Z="http://www.w3.org/2000/svg";function M(r){return document.createElementNS(Z,r)}function K(r,c,i,h){const a=M("g");a.setAttribute("data-mp-scene","animation");const p=[],x=[],b=Math.max(1,i.candleWidth()*.7);for(const d of c.candles){const s=i.xOf(d.i),E=d.c>=d.o?h.bullishColor:h.bearishColor,u=M("line");u.setAttribute("x1",String(s)),u.setAttribute("x2",String(s)),u.setAttribute("y1",String(i.yOf(d.h))),u.setAttribute("y2",String(i.yOf(d.l))),u.setAttribute("stroke",E),u.setAttribute("stroke-width",String(h.wickWidth)),u.style.opacity="0",a.appendChild(u),x.push(u);const v=i.yOf(d.o),k=i.yOf(d.c),L=Math.min(v,k),T=Math.max(1,Math.abs(k-v)),w=M("rect");w.setAttribute("x",String(s-b/2)),w.setAttribute("y",String(L)),w.setAttribute("width",String(b)),w.setAttribute("height",String(T)),w.setAttribute("fill",E),w.style.opacity="0",a.appendChild(w),p.push(w)}const y=[];for(const d of c.priceLines){const s=i.yOf(d.value),o=M("line");o.setAttribute("x1",String(i.plotLeft)),o.setAttribute("x2",String(i.plotLeft+i.plotWidth)),o.setAttribute("y1",String(s)),o.setAttribute("y2",String(s)),o.setAttribute("stroke",h.priceLineColors[d.role]??h.eventMarkerColor),o.setAttribute("stroke-width",String(h.priceLineWidth)),o.style.opacity="0",o.setAttribute("data-role",d.role),a.appendChild(o),y.push(o)}const m=[];for(const d of c.slStaircase){const s=i.yOf(d.price),o=M("line");o.setAttribute("x1",String(i.xOf(d.fromIndex))),o.setAttribute("x2",String(i.xOf(d.toIndex))),o.setAttribute("y1",String(s)),o.setAttribute("y2",String(s)),o.setAttribute("stroke",h.slStaircaseColor),o.setAttribute("stroke-width",String(h.priceLineWidth)),o.style.opacity="0",a.appendChild(o),m.push(o)}const S=[];for(const d of c.slTransitions){const s=M("circle");s.setAttribute("cx",String(i.xOf(d.atIndex))),s.setAttribute("cy",String(i.yOf(d.to))),s.setAttribute("r",String(Math.max(2,h.priceLineWidth+1))),s.setAttribute("fill",h.slStaircaseColor),s.style.opacity="0",a.appendChild(s),S.push(s)}const e=[];for(const d of c.eventMarkers){const s=i.xOf(d.atIndex),o=M("line");o.setAttribute("x1",String(s)),o.setAttribute("x2",String(s)),o.setAttribute("y1",String(i.plotTop)),o.setAttribute("y2",String(i.plotTop+i.plotHeight)),o.setAttribute("stroke",h.eventMarkerColor),o.setAttribute("stroke-width","1"),o.style.opacity="0",o.setAttribute("data-event-type",d.eventType),a.appendChild(o),e.push(o)}return r.appendChild(a),{root:a,candleBodies:p,candleWicks:x,priceLines:y,slSegments:m,slTransitions:S,eventMarkers:e}}function j(r,c){const i=c.yOf(r.o),h=c.yOf(r.c),a=c.yOf(r.h),p=c.yOf(r.l),x=r.c>=r.o,b={body:{y:i,height:0},wick:{y1:i,y2:i}};return x?{initial:b,phase1:{body:{y:i,height:p-i},wick:{y1:i,y2:p}},phase2:{body:{y:a,height:i-a},wick:{y1:a,y2:p}},phase3:{body:{y:h,height:i-h},wick:{y1:a,y2:p}}}:{initial:b,phase1:{body:{y:a,height:i-a},wick:{y1:a,y2:i}}
2,phase2:{body:{y:i,height:p-i},wick:{y1:a,y2:p}},phase3:{body:{y:i,height:h-i},wick:{y1:a,y2:p}}}}const J={phase1:.25,phase2:.4,phase3:.35},Q={phase1:"power1.in",phase2:"power2.out",phase3:"power1.out"},N={candleDurationSec:.4,candleStaggerSec:.12,easing:{candle:"power2.out",slStep:"power2.inOut",priceLine:"power1.out"}};async function $(r){const{scene:c,dimensions:i,style:h,mode:a="draw"}=r,p={candleDurationSec:r.timing?.candleDurationSec??N.candleDurationSec,candleStaggerSec:r.timing?.candleStaggerSec??N.candleStaggerSec,easing:{...N.easing,...r.timing?.easing}},x=r.gsap??(await z(async()=>{const{gsap:t}=await import("./qgrHOAx6.js").then(n=>n.i);return{gsap:t}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48]),import.meta.url)).gsap,b=V(c,i);let y;if(a==="draw"){if(!r.target)throw new Error("ScenePlayer: `target` requis en mode draw");y=K(r.target,c,b,h)}else{if(!r.elements)throw new Error("ScenePlayer: `elements` requis en mode reveal");y=r.elements}const m=new Map,S=t=>{m.get(t.type)?.forEach(n=>n(t))},e=x.timeline({paused:!0}),d=p.candleStaggerSec,s=p.candleDurationSec,o=(r.timing?.candleAppearance??"fade")==="form"&&a==="draw",E=r.timing?.formPhaseRatios??J,u={...Q,...r.timing?.formEasing},v=r.timing?.speedZones??[],k=t=>v.find(n=>t>=n.fromIndex&&t<=n.toIndex),L=t=>{const n=k(t);return n?.speed&&n.speed>0?n.speed:1},T=[],w=new Map;{let t=0;c.candles.forEach((n,l)=>{T[l]=t,w.set(n.i,t);const g=L(n.i);t+=(o?s:d)/g;const A=k(n.i);A?.pauseAfter&&n.i===A.toIndex&&(t+=A.pauseAfter)})}const _=t=>w.get(t)??0,G=y.candleBodies??[],U=y.candleWicks??[];c.candles.forEach((t,n)=>{const l=T[n],g=G[n],A=U[n];if(o&&g&&A){const O=s/L(t.i),f=j(t,b);e.to(g,{opacity:1,attr:{y:f.initial.body.y,height:f.initial.body.height},duration:0},l),e.to(A,{opacity:1,attr:{y1:f.initial.wick.y1,y2:f.initial.wick.y2},duration:0},l);const W=O*E.phase1;e.to(g,{attr:{y:f.phase1.body.y,height:f.phase1.body.height},duration:W,ease:u.phase1},l),e.to(A,{attr:{y1:f.phase1.wick.y1,y2:f.phase1.wick.y2},duration:W,ease:u.phase1},l);const R=l+W,F=O*E.phase2;e.to(g,{attr:{y:f.phase2.body.y,height:f.phase2.body.height},duration:F,ease:u.phase2},R),e.to(A,{attr:{y1:f.phase2.wick.y1,y2:f.phase2.wick.y2},duration:F,ease:u.phase2},R);const B=R+F;e.to(g,{attr:{y:f.phase3.body.y,height:f.phase3.body.height},duration:O*E.phase3,ease:u.phase3},B)}else{const O=[];g&&O.push(g),A&&O.push(A),O.length>0&&e.fromTo(O,{opacity:0},{opacity:1,duration:s,ease:p.easing.candle,immediateRender:!1},l)}e.call(()=>S({type:"candleAnimated",atIndex:t.i}),void 0,l)});const q=T.length>0?T[T.length-1]:0;(y.priceLines??[]).forEach(t=>{e.to(t,{opacity:1,duration:s,ease:p.easing.priceLine},0)}),(y.slSegments??[]).forEach((t,n)=>{const l=c.slStaircase[n]?.fromIndex??0;e.to(t,{opacity:1,duration:s,ease:p.easing.slStep},_(l))}),(y.slTransitions??[]).forEach((t,n)=>{const l=c.slTransitions[n],g=_(l?.atIndex??0);e.fromTo(t,{opacity:0,scale:0},{opacity:1,scale:1,duration:s,ease:p.easing.slStep,transformOrigin:"center"},g),e.call(()=>S({type:"slStepped",atIndex:l?.atIndex}),void 0,g)}),(y.eventMarkers??[]).forEach((t,n)=>{const l=c.eventMarkers[n],g=_(l?.atIndex??0);e.to(t,{opacity:1,duration:s,ease:p.easing.priceLine},g),e.call(()=>S({type:"eventMarkerShown",atIndex:l?.atIndex}),void 0,g)}),e.call(()=>S({type:"complete"}),void 0,q+s);const Y=[...c.slTransitions.map(t=>({time:_(t.atIndex??0),atIndex:t.atIndex,kind:"slStep"})),...c.eventMarkers.map(t=>({time:_(t.atIndex??0),atIndex:t.atIndex,kind:"event"}))].sort((t,n)=>t.time-n.time),H=Array.from(new Set(Y.map(t=>t.time))).sort((t,n)=>t-n),C=1e-4,D=()=>e.progress()*e.duration();let I=null;e.eventCallback("onUpdate",()=>{if(I!==null&&D()>=I-C){e.pause();const t=I;I=null,S({type:"stepPaused",atTime:t})}});let P=r.loop??!1;return e.repeat(P?-1:0),r.autoPlay&&e.play(),{elements:y,play:()=>{I=null,e.play()},pause:()=>{e.pause()},restart:()=>{I=null,e.restart()},seek:t=>{e.seek(t)},progress:t=>{const n=e.progress(t);return typeof n=="number"?n:e.progress()},setLoop:t=>{t&&(I=null),P=t,e.repeat(t?-1:0)},isLooping:()=>P,getStops:()=>Y,stepForward:()=>{I=H.find(n=>n>D()+C)??e.duration(),e.play()},stepBackward:()=>{const t=D();let n=0;for(const l of H)if(l<t-C)n=l;else break;I=null,e.pause(),e.seek(n),S({type:"stepPaused",atTime:n})},duration:()=>e.duration(),isActive:()=>e.isActive(),kill:()=>{e.kill(),a==="draw"&&y.root?.remove(),m.clear()},on:(t,n)=>{m.has(t)||m.set(t,new Set),m.get(t).add(n)},off:(t,n)=>{m.get(t)?.delete(n)}}}const tt="@magic-position/position-chart-player";export{tt as POSITION_CHART_PLAYER_PACKAGE,j as computeCandleFormationPhases,$ as createScenePlayer,V as createSceneScales,K as drawScene};
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.