@nabeeltahirdeveloper/chart-sdk 2.0.2 → 2.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chart-sdk.es.js +22105 -0
- package/dist/chart-sdk.umd.js +43 -0
- package/package.json +1 -1
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
(function(pA,h){typeof exports=="object"&&typeof module<"u"?h(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],h):(pA=typeof globalThis<"u"?globalThis:pA||self,h(pA.ChartSDK={},pA.jsxRuntime,pA.React))})(this,(function(pA,h,Q){"use strict";var Qi=typeof document<"u"?document.currentScript:null;function IA(s){var A=s.width,e=s.height;if(A<0)throw new Error("Negative width is not allowed for Size");if(e<0)throw new Error("Negative height is not allowed for Size");return{width:A,height:e}}function ut(s,A){return s.width===A.width&&s.height===A.height}var Iu=(function(){function s(A){var e=this;this._resolutionListener=function(){return e._onResolutionChanged()},this._resolutionMediaQueryList=null,this._observers=[],this._window=A,this._installResolutionListener()}return s.prototype.dispose=function(){this._uninstallResolutionListener(),this._window=null},Object.defineProperty(s.prototype,"value",{get:function(){return this._window.devicePixelRatio},enumerable:!1,configurable:!0}),s.prototype.subscribe=function(A){var e=this,t={next:A};return this._observers.push(t),{unsubscribe:function(){e._observers=e._observers.filter(function(r){return r!==t})}}},s.prototype._installResolutionListener=function(){if(this._resolutionMediaQueryList!==null)throw new Error("Resolution listener is already installed");var A=this._window.devicePixelRatio;this._resolutionMediaQueryList=this._window.matchMedia("all and (resolution: ".concat(A,"dppx)")),this._resolutionMediaQueryList.addListener(this._resolutionListener)},s.prototype._uninstallResolutionListener=function(){this._resolutionMediaQueryList!==null&&(this._resolutionMediaQueryList.removeListener(this._resolutionListener),this._resolutionMediaQueryList=null)},s.prototype._reinstallResolutionListener=function(){this._uninstallResolutionListener(),this._installResolutionListener()},s.prototype._onResolutionChanged=function(){var A=this;this._observers.forEach(function(e){return e.next(A._window.devicePixelRatio)}),this._reinstallResolutionListener()},s})();function Tu(s){return new Iu(s)}var Mu=(function(){function s(A,e,t){var r;this._canvasElement=null,this._bitmapSizeChangedListeners=[],this._suggestedBitmapSize=null,this._suggestedBitmapSizeChangedListeners=[],this._devicePixelRatioObservable=null,this._canvasElementResizeObserver=null,this._canvasElement=A,this._canvasElementClientSize=IA({width:this._canvasElement.clientWidth,height:this._canvasElement.clientHeight}),this._transformBitmapSize=e??(function(i){return i}),this._allowResizeObserver=(r=t?.allowResizeObserver)!==null&&r!==void 0?r:!0,this._chooseAndInitObserver()}return s.prototype.dispose=function(){var A,e;if(this._canvasElement===null)throw new Error("Object is disposed");(A=this._canvasElementResizeObserver)===null||A===void 0||A.disconnect(),this._canvasElementResizeObserver=null,(e=this._devicePixelRatioObservable)===null||e===void 0||e.dispose(),this._devicePixelRatioObservable=null,this._suggestedBitmapSizeChangedListeners.length=0,this._bitmapSizeChangedListeners.length=0,this._canvasElement=null},Object.defineProperty(s.prototype,"canvasElement",{get:function(){if(this._canvasElement===null)throw new Error("Object is disposed");return this._canvasElement},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"canvasElementClientSize",{get:function(){return this._canvasElementClientSize},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"bitmapSize",{get:function(){return IA({width:this.canvasElement.width,height:this.canvasElement.height})},enumerable:!1,configurable:!0}),s.prototype.resizeCanvasElement=function(A){this._canvasElementClientSize=IA(A),this.canvasElement.style.width="".concat(this._canvasElementClientSize.width,"px"),this.canvasElement.style.height="".concat(this._canvasElementClientSize.height,"px"),this._invalidateBitmapSize()},s.prototype.subscribeBitmapSizeChanged=function(A){this._bitmapSizeChangedListeners.push(A)},s.prototype.unsubscribeBitmapSizeChanged=function(A){this._bitmapSizeChangedListeners=this._bitmapSizeChangedListeners.filter(function(e){return e!==A})},Object.defineProperty(s.prototype,"suggestedBitmapSize",{get:function(){return this._suggestedBitmapSize},enumerable:!1,configurable:!0}),s.prototype.subscribeSuggestedBitmapSizeChanged=function(A){this._suggestedBitmapSizeChangedListeners.push(A)},s.prototype.unsubscribeSuggestedBitmapSizeChanged=function(A){this._suggestedBitmapSizeChangedListeners=this._suggestedBitmapSizeChangedListeners.filter(function(e){return e!==A})},s.prototype.applySuggestedBitmapSize=function(){if(this._suggestedBitmapSize!==null){var A=this._suggestedBitmapSize;this._suggestedBitmapSize=null,this._resizeBitmap(A),this._emitSuggestedBitmapSizeChanged(A,this._suggestedBitmapSize)}},s.prototype._resizeBitmap=function(A){var e=this.bitmapSize;ut(e,A)||(this.canvasElement.width=A.width,this.canvasElement.height=A.height,this._emitBitmapSizeChanged(e,A))},s.prototype._emitBitmapSizeChanged=function(A,e){var t=this;this._bitmapSizeChangedListeners.forEach(function(r){return r.call(t,A,e)})},s.prototype._suggestNewBitmapSize=function(A){var e=this._suggestedBitmapSize,t=IA(this._transformBitmapSize(A,this._canvasElementClientSize)),r=ut(this.bitmapSize,t)?null:t;e===null&&r===null||e!==null&&r!==null&&ut(e,r)||(this._suggestedBitmapSize=r,this._emitSuggestedBitmapSizeChanged(e,r))},s.prototype._emitSuggestedBitmapSizeChanged=function(A,e){var t=this;this._suggestedBitmapSizeChangedListeners.forEach(function(r){return r.call(t,A,e)})},s.prototype._chooseAndInitObserver=function(){var A=this;if(!this._allowResizeObserver){this._initDevicePixelRatioObservable();return}ku().then(function(e){return e?A._initResizeObserver():A._initDevicePixelRatioObservable()})},s.prototype._initDevicePixelRatioObservable=function(){var A=this;if(this._canvasElement!==null){var e=No(this._canvasElement);if(e===null)throw new Error("No window is associated with the canvas");this._devicePixelRatioObservable=Tu(e),this._devicePixelRatioObservable.subscribe(function(){return A._invalidateBitmapSize()}),this._invalidateBitmapSize()}},s.prototype._invalidateBitmapSize=function(){var A,e;if(this._canvasElement!==null){var t=No(this._canvasElement);if(t!==null){var r=(e=(A=this._devicePixelRatioObservable)===null||A===void 0?void 0:A.value)!==null&&e!==void 0?e:t.devicePixelRatio,i=this._canvasElement.getClientRects(),n=i[0]!==void 0?_u(i[0],r):IA({width:this._canvasElementClientSize.width*r,height:this._canvasElementClientSize.height*r});this._suggestNewBitmapSize(n)}}},s.prototype._initResizeObserver=function(){var A=this;this._canvasElement!==null&&(this._canvasElementResizeObserver=new ResizeObserver(function(e){var t=e.find(function(n){return n.target===A._canvasElement});if(!(!t||!t.devicePixelContentBoxSize||!t.devicePixelContentBoxSize[0])){var r=t.devicePixelContentBoxSize[0],i=IA({width:r.inlineSize,height:r.blockSize});A._suggestNewBitmapSize(i)}}),this._canvasElementResizeObserver.observe(this._canvasElement,{box:"device-pixel-content-box"}))},s})();function Du(s,A){return new Mu(s,A.transform,A.options)}function No(s){return s.ownerDocument.defaultView}function ku(){return new Promise(function(s){var A=new ResizeObserver(function(e){s(e.every(function(t){return"devicePixelContentBoxSize"in t})),A.disconnect()});A.observe(document.body,{box:"device-pixel-content-box"})}).catch(function(){return!1})}function _u(s,A){return IA({width:Math.round(s.left*A+s.width*A)-Math.round(s.left*A),height:Math.round(s.top*A+s.height*A)-Math.round(s.top*A)})}var Ou=(function(){function s(A,e,t){if(e.width===0||e.height===0)throw new TypeError("Rendering target could only be created on a media with positive width and height");if(this._mediaSize=e,t.width===0||t.height===0)throw new TypeError("Rendering target could only be created using a bitmap with positive integer width and height");this._bitmapSize=t,this._context=A}return s.prototype.useMediaCoordinateSpace=function(A){try{return this._context.save(),this._context.setTransform(1,0,0,1,0,0),this._context.scale(this._horizontalPixelRatio,this._verticalPixelRatio),A({context:this._context,mediaSize:this._mediaSize})}finally{this._context.restore()}},s.prototype.useBitmapCoordinateSpace=function(A){try{return this._context.save(),this._context.setTransform(1,0,0,1,0,0),A({context:this._context,mediaSize:this._mediaSize,bitmapSize:this._bitmapSize,horizontalPixelRatio:this._horizontalPixelRatio,verticalPixelRatio:this._verticalPixelRatio})}finally{this._context.restore()}},Object.defineProperty(s.prototype,"_horizontalPixelRatio",{get:function(){return this._bitmapSize.width/this._mediaSize.width},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"_verticalPixelRatio",{get:function(){return this._bitmapSize.height/this._mediaSize.height},enumerable:!1,configurable:!0}),s})();function ft(s,A){var e=s.canvasElementClientSize;if(e.width===0||e.height===0)return null;var t=s.bitmapSize;if(t.width===0||t.height===0)return null;var r=s.canvasElement.getContext("2d",A);return r===null?null:new Ou(r,e,t)}const Nu={upColor:"#26a69a",downColor:"#ef5350",wickVisible:!0,borderVisible:!0,borderColor:"#378658",borderUpColor:"#26a69a",borderDownColor:"#ef5350",wickColor:"#737375",wickUpColor:"#26a69a",wickDownColor:"#ef5350"},Ku={upColor:"#26a69a",downColor:"#ef5350",openVisible:!0,thinBars:!0},Vu={color:"#2196f3",lineStyle:0,lineWidth:3,lineType:0,lineVisible:!0,crosshairMarkerVisible:!0,crosshairMarkerRadius:4,crosshairMarkerBorderColor:"",crosshairMarkerBorderWidth:2,crosshairMarkerBackgroundColor:"",lastPriceAnimation:0,pointMarkersVisible:!1},Pu={topColor:"rgba( 46, 220, 135, 0.4)",bottomColor:"rgba( 40, 221, 100, 0)",invertFilledArea:!1,lineColor:"#33D778",lineStyle:0,lineWidth:3,lineType:0,lineVisible:!0,crosshairMarkerVisible:!0,crosshairMarkerRadius:4,crosshairMarkerBorderColor:"",crosshairMarkerBorderWidth:2,crosshairMarkerBackgroundColor:"",lastPriceAnimation:0,pointMarkersVisible:!1},Gu={baseValue:{type:"price",price:0},topFillColor1:"rgba(38, 166, 154, 0.28)",topFillColor2:"rgba(38, 166, 154, 0.05)",topLineColor:"rgba(38, 166, 154, 1)",bottomFillColor1:"rgba(239, 83, 80, 0.05)",bottomFillColor2:"rgba(239, 83, 80, 0.28)",bottomLineColor:"rgba(239, 83, 80, 1)",lineWidth:3,lineStyle:0,lineType:0,lineVisible:!0,crosshairMarkerVisible:!0,crosshairMarkerRadius:4,crosshairMarkerBorderColor:"",crosshairMarkerBorderWidth:2,crosshairMarkerBackgroundColor:"",lastPriceAnimation:0,pointMarkersVisible:!1},Ru={color:"#26a69a",base:0},Ko={color:"#2196f3"},Vo={title:"",visible:!0,lastValueVisible:!0,priceLineVisible:!0,priceLineSource:0,priceLineWidth:1,priceLineColor:"",priceLineStyle:2,baseLineVisible:!0,baseLineWidth:1,baseLineColor:"#B2B5BE",baseLineStyle:0,priceFormat:{type:"price",precision:2,minMove:.01}};var Po,Go;function dt(s,A){const e={0:[],1:[s.lineWidth,s.lineWidth],2:[2*s.lineWidth,2*s.lineWidth],3:[6*s.lineWidth,6*s.lineWidth],4:[s.lineWidth,4*s.lineWidth]}[A];s.setLineDash(e)}function Ro(s,A,e,t){s.beginPath();const r=s.lineWidth%2?.5:0;s.moveTo(e,A+r),s.lineTo(t,A+r),s.stroke()}function je(s,A){if(!s)throw new Error("Assertion failed"+(A?": "+A:""))}function ne(s){if(s===void 0)throw new Error("Value is undefined");return s}function L(s){if(s===null)throw new Error("Value is null");return s}function Ht(s){return L(ne(s))}(function(s){s[s.Simple=0]="Simple",s[s.WithSteps=1]="WithSteps",s[s.Curved=2]="Curved"})(Po||(Po={})),(function(s){s[s.Solid=0]="Solid",s[s.Dotted=1]="Dotted",s[s.Dashed=2]="Dashed",s[s.LargeDashed=3]="LargeDashed",s[s.SparseDotted=4]="SparseDotted"})(Go||(Go={}));const zo={khaki:"#f0e68c",azure:"#f0ffff",aliceblue:"#f0f8ff",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",gray:"#808080",green:"#008000",honeydew:"#f0fff0",floralwhite:"#fffaf0",lightblue:"#add8e6",lightcoral:"#f08080",lemonchiffon:"#fffacd",hotpink:"#ff69b4",lightyellow:"#ffffe0",greenyellow:"#adff2f",lightgoldenrodyellow:"#fafad2",limegreen:"#32cd32",linen:"#faf0e6",lightcyan:"#e0ffff",magenta:"#f0f",maroon:"#800000",olive:"#808000",orange:"#ffa500",oldlace:"#fdf5e6",mediumblue:"#0000cd",transparent:"#0000",lime:"#0f0",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",midnightblue:"#191970",orchid:"#da70d6",mediumorchid:"#ba55d3",mediumturquoise:"#48d1cc",orangered:"#ff4500",royalblue:"#4169e1",powderblue:"#b0e0e6",red:"#f00",coral:"#ff7f50",turquoise:"#40e0d0",white:"#fff",whitesmoke:"#f5f5f5",wheat:"#f5deb3",teal:"#008080",steelblue:"#4682b4",bisque:"#ffe4c4",aquamarine:"#7fffd4",aqua:"#0ff",sienna:"#a0522d",silver:"#c0c0c0",springgreen:"#00ff7f",antiquewhite:"#faebd7",burlywood:"#deb887",brown:"#a52a2a",beige:"#f5f5dc",chocolate:"#d2691e",chartreuse:"#7fff00",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cadetblue:"#5f9ea0",tomato:"#ff6347",fuchsia:"#f0f",blue:"#00f",salmon:"#fa8072",blanchedalmond:"#ffebcd",slateblue:"#6a5acd",slategray:"#708090",thistle:"#d8bfd8",tan:"#d2b48c",cyan:"#0ff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",blueviolet:"#8a2be2",black:"#000",darkmagenta:"#8b008b",darkslateblue:"#483d8b",darkkhaki:"#bdb76b",darkorchid:"#9932cc",darkorange:"#ff8c00",darkgreen:"#006400",darkred:"#8b0000",dodgerblue:"#1e90ff",darkslategray:"#2f4f4f",dimgray:"#696969",deepskyblue:"#00bfff",firebrick:"#b22222",forestgreen:"#228b22",indigo:"#4b0082",ivory:"#fffff0",lavenderblush:"#fff0f5",feldspar:"#d19275",indianred:"#cd5c5c",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightskyblue:"#87cefa",lightslategray:"#789",lightslateblue:"#8470ff",snow:"#fffafa",lightseagreen:"#20b2aa",lightsalmon:"#ffa07a",darksalmon:"#e9967a",darkviolet:"#9400d3",mediumpurple:"#9370d8",mediumaquamarine:"#66cdaa",skyblue:"#87ceeb",lavender:"#e6e6fa",lightsteelblue:"#b0c4de",mediumvioletred:"#c71585",mintcream:"#f5fffa",navajowhite:"#ffdead",navy:"#000080",olivedrab:"#6b8e23",palevioletred:"#d87093",violetred:"#d02090",yellow:"#ff0",yellowgreen:"#9acd32",lawngreen:"#7cfc00",pink:"#ffc0cb",paleturquoise:"#afeeee",palegoldenrod:"#eee8aa",darkolivegreen:"#556b2f",darkseagreen:"#8fbc8f",darkturquoise:"#00ced1",peachpuff:"#ffdab9",deeppink:"#ff1493",violet:"#ee82ee",palegreen:"#98fb98",mediumseagreen:"#3cb371",peru:"#cd853f",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",purple:"#800080",seagreen:"#2e8b57",seashell:"#fff5ee",papayawhip:"#ffefd5",mediumslateblue:"#7b68ee",plum:"#dda0dd",mediumspringgreen:"#00fa9a"};function me(s){return s<0?0:s>255?255:Math.round(s)||0}function Wo(s){return s<=0||s>1?Math.min(Math.max(s,0),1):Math.round(1e4*s)/1e4}const zu=/^#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])?$/i,Wu=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})?$/i,Xu=/^rgb\(\s*(-?\d{1,10})\s*,\s*(-?\d{1,10})\s*,\s*(-?\d{1,10})\s*\)$/,$u=/^rgba\(\s*(-?\d{1,10})\s*,\s*(-?\d{1,10})\s*,\s*(-?\d{1,10})\s*,\s*(-?\d*\.?\d+)\s*\)$/;function jt(s){(s=s.toLowerCase())in zo&&(s=zo[s]);{const A=$u.exec(s)||Xu.exec(s);if(A)return[me(parseInt(A[1],10)),me(parseInt(A[2],10)),me(parseInt(A[3],10)),Wo(A.length<5?1:parseFloat(A[4]))]}{const A=Wu.exec(s);if(A)return[me(parseInt(A[1],16)),me(parseInt(A[2],16)),me(parseInt(A[3],16)),1]}{const A=zu.exec(s);if(A)return[me(17*parseInt(A[1],16)),me(17*parseInt(A[2],16)),me(17*parseInt(A[3],16)),1]}throw new Error(`Cannot parse color: ${s}`)}function Xo(s){return .199*s[0]+.687*s[1]+.114*s[2]}function Ps(s){const A=jt(s);return{t:`rgb(${A[0]}, ${A[1]}, ${A[2]})`,i:Xo(A)>160?"black":"white"}}class KA{constructor(){this.h=[]}l(A,e,t){const r={o:A,_:e,u:t===!0};this.h.push(r)}v(A){const e=this.h.findIndex((t=>A===t.o));e>-1&&this.h.splice(e,1)}p(A){this.h=this.h.filter((e=>e._!==A))}m(A,e,t){const r=[...this.h];this.h=this.h.filter((i=>!i.u)),r.forEach((i=>i.o(A,e,t)))}M(){return this.h.length>0}S(){this.h=[]}}function Ee(s,...A){for(const e of A)for(const t in e)e[t]!==void 0&&Object.prototype.hasOwnProperty.call(e,t)&&!["__proto__","constructor","prototype"].includes(t)&&(typeof e[t]!="object"||s[t]===void 0||Array.isArray(e[t])?s[t]=e[t]:Ee(s[t],e[t]));return s}function Me(s){return typeof s=="number"&&isFinite(s)}function As(s){return typeof s=="number"&&s%1==0}function es(s){return typeof s=="string"}function Gs(s){return typeof s=="boolean"}function Xe(s){const A=s;if(!A||typeof A!="object")return A;let e,t,r;for(t in e=Array.isArray(A)?[]:{},A)A.hasOwnProperty(t)&&(r=A[t],e[t]=r&&typeof r=="object"?Xe(r):r);return e}function Ju(s){return s!==null}function ts(s){return s===null?void 0:s}const yi="-apple-system, BlinkMacSystemFont, 'Trebuchet MS', Roboto, Ubuntu, sans-serif";function Lt(s,A,e){return A===void 0&&(A=yi),`${e=e!==void 0?`${e} `:""}${s}px ${A}`}class Zu{constructor(A){this.k={C:1,T:5,P:NaN,R:"",D:"",V:"",O:"",B:0,A:0,I:0,L:0,N:0},this.F=A}W(){const A=this.k,e=this.j(),t=this.H();return A.P===e&&A.D===t||(A.P=e,A.D=t,A.R=Lt(e,t),A.L=2.5/12*e,A.B=A.L,A.A=e/12*A.T,A.I=e/12*A.T,A.N=0),A.V=this.$(),A.O=this.U(),this.k}$(){return this.F.W().layout.textColor}U(){return this.F.q()}j(){return this.F.W().layout.fontSize}H(){return this.F.W().layout.fontFamily}}class Ui{constructor(){this.Y=[]}Z(A){this.Y=A}X(A,e,t){this.Y.forEach((r=>{r.X(A,e,t)}))}}class xe{X(A,e,t){A.useBitmapCoordinateSpace((r=>this.K(r,e,t)))}}class Yu extends xe{constructor(){super(...arguments),this.G=null}J(A){this.G=A}K({context:A,horizontalPixelRatio:e,verticalPixelRatio:t}){if(this.G===null||this.G.tt===null)return;const r=this.G.tt,i=this.G,n=Math.max(1,Math.floor(e))%2/2,o=a=>{A.beginPath();for(let l=r.to-1;l>=r.from;--l){const c=i.it[l],u=Math.round(c.nt*e)+n,d=c.st*t,g=a*t+n;A.moveTo(u,d),A.arc(u,d,g,0,2*Math.PI)}A.fill()};i.et>0&&(A.fillStyle=i.rt,o(i.ht+i.et)),A.fillStyle=i.lt,o(i.ht)}}function qu(){return{it:[{nt:0,st:0,ot:0,_t:0}],lt:"",rt:"",ht:0,et:0,tt:null}}const ju={from:0,to:1};class Af{constructor(A,e){this.ut=new Ui,this.ct=[],this.dt=[],this.ft=!0,this.F=A,this.vt=e,this.ut.Z(this.ct)}bt(A){const e=this.F.wt();e.length!==this.ct.length&&(this.dt=e.map(qu),this.ct=this.dt.map((t=>{const r=new Yu;return r.J(t),r})),this.ut.Z(this.ct)),this.ft=!0}gt(){return this.ft&&(this.Mt(),this.ft=!1),this.ut}Mt(){const A=this.vt.W().mode===2,e=this.F.wt(),t=this.vt.xt(),r=this.F.St();e.forEach(((i,n)=>{var o;const a=this.dt[n],l=i.kt(t);if(A||l===null||!i.yt())return void(a.tt=null);const c=L(i.Ct());a.lt=l.Tt,a.ht=l.ht,a.et=l.Pt,a.it[0]._t=l._t,a.it[0].st=i.Dt().Rt(l._t,c.Vt),a.rt=(o=l.Ot)!==null&&o!==void 0?o:this.F.Bt(a.it[0].st/i.Dt().At()),a.it[0].ot=t,a.it[0].nt=r.It(t),a.tt=ju}))}}let ef=class extends xe{constructor(A){super(),this.zt=A}K({context:A,bitmapSize:e,horizontalPixelRatio:t,verticalPixelRatio:r}){if(this.zt===null)return;const i=this.zt.Lt.yt,n=this.zt.Et.yt;if(!i&&!n)return;const o=Math.round(this.zt.nt*t),a=Math.round(this.zt.st*r);A.lineCap="butt",i&&o>=0&&(A.lineWidth=Math.floor(this.zt.Lt.et*t),A.strokeStyle=this.zt.Lt.V,A.fillStyle=this.zt.Lt.V,dt(A,this.zt.Lt.Nt),(function(l,c,u,d){l.beginPath();const g=l.lineWidth%2?.5:0;l.moveTo(c+g,u),l.lineTo(c+g,d),l.stroke()})(A,o,0,e.height)),n&&a>=0&&(A.lineWidth=Math.floor(this.zt.Et.et*r),A.strokeStyle=this.zt.Et.V,A.fillStyle=this.zt.Et.V,dt(A,this.zt.Et.Nt),Ro(A,a,0,e.width))}};class tf{constructor(A){this.ft=!0,this.Ft={Lt:{et:1,Nt:0,V:"",yt:!1},Et:{et:1,Nt:0,V:"",yt:!1},nt:0,st:0},this.Wt=new ef(this.Ft),this.jt=A}bt(){this.ft=!0}gt(){return this.ft&&(this.Mt(),this.ft=!1),this.Wt}Mt(){const A=this.jt.yt(),e=L(this.jt.Ht()),t=e.$t().W().crosshair,r=this.Ft;if(t.mode===2)return r.Et.yt=!1,void(r.Lt.yt=!1);r.Et.yt=A&&this.jt.Ut(e),r.Lt.yt=A&&this.jt.qt(),r.Et.et=t.horzLine.width,r.Et.Nt=t.horzLine.style,r.Et.V=t.horzLine.color,r.Lt.et=t.vertLine.width,r.Lt.Nt=t.vertLine.style,r.Lt.V=t.vertLine.color,r.nt=this.jt.Yt(),r.st=this.jt.Zt()}}function sf(s,A,e,t,r,i){s.fillRect(A+i,e,t-2*i,i),s.fillRect(A+i,e+r-i,t-2*i,i),s.fillRect(A,e,i,r),s.fillRect(A+t-i,e,i,r)}function Rs(s,A,e,t,r,i){s.save(),s.globalCompositeOperation="copy",s.fillStyle=i,s.fillRect(A,e,t,r),s.restore()}function $o(s,A,e,t,r,i){s.beginPath(),s.roundRect?s.roundRect(A,e,t,r,i):(s.lineTo(A+t-i[1],e),i[1]!==0&&s.arcTo(A+t,e,A+t,e+i[1],i[1]),s.lineTo(A+t,e+r-i[2]),i[2]!==0&&s.arcTo(A+t,e+r,A+t-i[2],e+r,i[2]),s.lineTo(A+i[3],e+r),i[3]!==0&&s.arcTo(A,e+r,A,e+r-i[3],i[3]),s.lineTo(A,e+i[0]),i[0]!==0&&s.arcTo(A,e,A+i[0],e,i[0]))}function Jo(s,A,e,t,r,i,n=0,o=[0,0,0,0],a=""){if(s.save(),!n||!a||a===i)return $o(s,A,e,t,r,o),s.fillStyle=i,s.fill(),void s.restore();const l=n/2;var c;$o(s,A+l,e+l,t-n,r-n,(c=-l,o.map((u=>u===0?u:u+c)))),i!=="transparent"&&(s.fillStyle=i,s.fill()),a!=="transparent"&&(s.lineWidth=n,s.strokeStyle=a,s.closePath(),s.stroke()),s.restore()}function Zo(s,A,e,t,r,i,n){s.save(),s.globalCompositeOperation="copy";const o=s.createLinearGradient(0,0,0,r);o.addColorStop(0,i),o.addColorStop(1,n),s.fillStyle=o,s.fillRect(A,e,t,r),s.restore()}class Yo{constructor(A,e){this.J(A,e)}J(A,e){this.zt=A,this.Xt=e}At(A,e){return this.zt.yt?A.P+A.L+A.B:0}X(A,e,t,r){if(!this.zt.yt||this.zt.Kt.length===0)return;const i=this.zt.V,n=this.Xt.t,o=A.useBitmapCoordinateSpace((a=>{const l=a.context;l.font=e.R;const c=this.Gt(a,e,t,r),u=c.Jt;return c.Qt?Jo(l,u.ti,u.ii,u.ni,u.si,n,u.ei,[u.ht,0,0,u.ht],n):Jo(l,u.ri,u.ii,u.ni,u.si,n,u.ei,[0,u.ht,u.ht,0],n),this.zt.hi&&(l.fillStyle=i,l.fillRect(u.ri,u.li,u.ai-u.ri,u.oi)),this.zt._i&&(l.fillStyle=e.O,l.fillRect(c.Qt?u.ui-u.ei:0,u.ii,u.ei,u.ci-u.ii)),c}));A.useMediaCoordinateSpace((({context:a})=>{const l=o.di;a.font=e.R,a.textAlign=o.Qt?"right":"left",a.textBaseline="middle",a.fillStyle=i,a.fillText(this.zt.Kt,l.fi,(l.ii+l.ci)/2+l.pi)}))}Gt(A,e,t,r){var i;const{context:n,bitmapSize:o,mediaSize:a,horizontalPixelRatio:l,verticalPixelRatio:c}=A,u=this.zt.hi||!this.zt.mi?e.T:0,d=this.zt.bi?e.C:0,g=e.L+this.Xt.wi,B=e.B+this.Xt.gi,f=e.A,p=e.I,m=this.zt.Kt,w=e.P,v=t.Mi(n,m),y=Math.ceil(t.xi(n,m)),E=w+g+B,F=e.C+f+p+y+u,T=Math.max(1,Math.floor(c));let M=Math.round(E*c);M%2!=T%2&&(M+=1);const I=d>0?Math.max(1,Math.floor(d*l)):0,cA=Math.round(F*l),z=Math.round(u*l),fA=(i=this.Xt.Si)!==null&&i!==void 0?i:this.Xt.ki,W=Math.round(fA*c)-Math.floor(.5*c),nA=Math.floor(W+T/2-M/2),j=nA+M,H=r==="right",X=H?a.width-d:d,sA=H?o.width-I:I;let UA,yA,FA;return H?(UA=sA-cA,yA=sA-z,FA=X-u-f-d):(UA=sA+cA,yA=sA+z,FA=X+u+f),{Qt:H,Jt:{ii:nA,li:W,ci:j,ni:cA,si:M,ht:2*l,ei:I,ti:UA,ri:sA,ai:yA,oi:T,ui:o.width},di:{ii:nA/c,ci:j/c,fi:FA,pi:v}}}}class zs{constructor(A){this.yi={ki:0,t:"#000",gi:0,wi:0},this.Ci={Kt:"",yt:!1,hi:!0,mi:!1,Ot:"",V:"#FFF",_i:!1,bi:!1},this.Ti={Kt:"",yt:!1,hi:!1,mi:!0,Ot:"",V:"#FFF",_i:!0,bi:!0},this.ft=!0,this.Pi=new(A||Yo)(this.Ci,this.yi),this.Ri=new(A||Yo)(this.Ti,this.yi)}Kt(){return this.Di(),this.Ci.Kt}ki(){return this.Di(),this.yi.ki}bt(){this.ft=!0}At(A,e=!1){return Math.max(this.Pi.At(A,e),this.Ri.At(A,e))}Vi(){return this.yi.Si||0}Oi(A){this.yi.Si=A}Bi(){return this.Di(),this.Ci.yt||this.Ti.yt}Ai(){return this.Di(),this.Ci.yt}gt(A){return this.Di(),this.Ci.hi=this.Ci.hi&&A.W().ticksVisible,this.Ti.hi=this.Ti.hi&&A.W().ticksVisible,this.Pi.J(this.Ci,this.yi),this.Ri.J(this.Ti,this.yi),this.Pi}Ii(){return this.Di(),this.Pi.J(this.Ci,this.yi),this.Ri.J(this.Ti,this.yi),this.Ri}Di(){this.ft&&(this.Ci.hi=!0,this.Ti.hi=!1,this.zi(this.Ci,this.Ti,this.yi))}}class rf extends zs{constructor(A,e,t){super(),this.jt=A,this.Li=e,this.Ei=t}zi(A,e,t){if(A.yt=!1,this.jt.W().mode===2)return;const r=this.jt.W().horzLine;if(!r.labelVisible)return;const i=this.Li.Ct();if(!this.jt.yt()||this.Li.Ni()||i===null)return;const n=Ps(r.labelBackgroundColor);t.t=n.t,A.V=n.i;const o=2/12*this.Li.P();t.wi=o,t.gi=o;const a=this.Ei(this.Li);t.ki=a.ki,A.Kt=this.Li.Fi(a._t,i),A.yt=!0}}const nf=/[1-9]/g;class qo{constructor(){this.zt=null}J(A){this.zt=A}X(A,e){if(this.zt===null||this.zt.yt===!1||this.zt.Kt.length===0)return;const t=A.useMediaCoordinateSpace((({context:d})=>(d.font=e.R,Math.round(e.Wi.xi(d,L(this.zt).Kt,nf)))));if(t<=0)return;const r=e.ji,i=t+2*r,n=i/2,o=this.zt.Hi;let a=this.zt.ki,l=Math.floor(a-n)+.5;l<0?(a+=Math.abs(0-l),l=Math.floor(a-n)+.5):l+i>o&&(a-=Math.abs(o-(l+i)),l=Math.floor(a-n)+.5);const c=l+i,u=Math.ceil(0+e.C+e.T+e.L+e.P+e.B);A.useBitmapCoordinateSpace((({context:d,horizontalPixelRatio:g,verticalPixelRatio:B})=>{const f=L(this.zt);d.fillStyle=f.t;const p=Math.round(l*g),m=Math.round(0*B),w=Math.round(c*g),v=Math.round(u*B),y=Math.round(2*g);if(d.beginPath(),d.moveTo(p,m),d.lineTo(p,v-y),d.arcTo(p,v,p+y,v,y),d.lineTo(w-y,v),d.arcTo(w,v,w,v-y,y),d.lineTo(w,m),d.fill(),f.hi){const E=Math.round(f.ki*g),F=m,T=Math.round((F+e.T)*B);d.fillStyle=f.V;const M=Math.max(1,Math.floor(g)),I=Math.floor(.5*g);d.fillRect(E-I,F,M,T-F)}})),A.useMediaCoordinateSpace((({context:d})=>{const g=L(this.zt),B=0+e.C+e.T+e.L+e.P/2;d.font=e.R,d.textAlign="left",d.textBaseline="middle",d.fillStyle=g.V;const f=e.Wi.Mi(d,"Apr0");d.translate(l+r,B+f),d.fillText(g.Kt,0,0)}))}}class of{constructor(A,e,t){this.ft=!0,this.Wt=new qo,this.Ft={yt:!1,t:"#4c525e",V:"white",Kt:"",Hi:0,ki:NaN,hi:!0},this.vt=A,this.$i=e,this.Ei=t}bt(){this.ft=!0}gt(){return this.ft&&(this.Mt(),this.ft=!1),this.Wt.J(this.Ft),this.Wt}Mt(){const A=this.Ft;if(A.yt=!1,this.vt.W().mode===2)return;const e=this.vt.W().vertLine;if(!e.labelVisible)return;const t=this.$i.St();if(t.Ni())return;A.Hi=t.Hi();const r=this.Ei();if(r===null)return;A.ki=r.ki;const i=t.Ui(this.vt.xt());A.Kt=t.qi(L(i)),A.yt=!0;const n=Ps(e.labelBackgroundColor);A.t=n.t,A.V=n.i,A.hi=t.W().ticksVisible}}class Fi{constructor(){this.Yi=null,this.Zi=0}Xi(){return this.Zi}Ki(A){this.Zi=A}Dt(){return this.Yi}Gi(A){this.Yi=A}Ji(A){return[]}Qi(){return[]}yt(){return!0}}var jo;(function(s){s[s.Normal=0]="Normal",s[s.Magnet=1]="Magnet",s[s.Hidden=2]="Hidden"})(jo||(jo={}));class af extends Fi{constructor(A,e){super(),this.tn=null,this.nn=NaN,this.sn=0,this.en=!0,this.rn=new Map,this.hn=!1,this.ln=NaN,this.an=NaN,this._n=NaN,this.un=NaN,this.$i=A,this.cn=e,this.dn=new Af(A,this),this.fn=((r,i)=>n=>{const o=i(),a=r();if(n===L(this.tn).vn())return{_t:a,ki:o};{const l=L(n.Ct());return{_t:n.pn(o,l),ki:o}}})((()=>this.nn),(()=>this.an));const t=((r,i)=>()=>{const n=this.$i.St().mn(r()),o=i();return n&&Number.isFinite(o)?{ot:n,ki:o}:null})((()=>this.sn),(()=>this.Yt()));this.bn=new of(this,A,t),this.wn=new tf(this)}W(){return this.cn}gn(A,e){this._n=A,this.un=e}Mn(){this._n=NaN,this.un=NaN}xn(){return this._n}Sn(){return this.un}kn(A,e,t){this.hn||(this.hn=!0),this.en=!0,this.yn(A,e,t)}xt(){return this.sn}Yt(){return this.ln}Zt(){return this.an}yt(){return this.en}Cn(){this.en=!1,this.Tn(),this.nn=NaN,this.ln=NaN,this.an=NaN,this.tn=null,this.Mn()}Pn(A){return this.tn!==null?[this.wn,this.dn]:[]}Ut(A){return A===this.tn&&this.cn.horzLine.visible}qt(){return this.cn.vertLine.visible}Rn(A,e){this.en&&this.tn===A||this.rn.clear();const t=[];return this.tn===A&&t.push(this.Dn(this.rn,e,this.fn)),t}Qi(){return this.en?[this.bn]:[]}Ht(){return this.tn}Vn(){this.wn.bt(),this.rn.forEach((A=>A.bt())),this.bn.bt(),this.dn.bt()}On(A){return A&&!A.vn().Ni()?A.vn():null}yn(A,e,t){this.Bn(A,e,t)&&this.Vn()}Bn(A,e,t){const r=this.ln,i=this.an,n=this.nn,o=this.sn,a=this.tn,l=this.On(t);this.sn=A,this.ln=isNaN(A)?NaN:this.$i.St().It(A),this.tn=t;const c=l!==null?l.Ct():null;return l!==null&&c!==null?(this.nn=e,this.an=l.Rt(e,c)):(this.nn=NaN,this.an=NaN),r!==this.ln||i!==this.an||o!==this.sn||n!==this.nn||a!==this.tn}Tn(){const A=this.$i.wt().map((t=>t.In().An())).filter(Ju),e=A.length===0?null:Math.max(...A);this.sn=e!==null?e:NaN}Dn(A,e,t){let r=A.get(e);return r===void 0&&(r=new rf(this,e,t),A.set(e,r)),r}}function Ws(s){return s==="left"||s==="right"}class YA{constructor(A){this.zn=new Map,this.Ln=[],this.En=A}Nn(A,e){const t=(function(r,i){return r===void 0?i:{Fn:Math.max(r.Fn,i.Fn),Wn:r.Wn||i.Wn}})(this.zn.get(A),e);this.zn.set(A,t)}jn(){return this.En}Hn(A){const e=this.zn.get(A);return e===void 0?{Fn:this.En}:{Fn:Math.max(this.En,e.Fn),Wn:e.Wn}}$n(){this.Un(),this.Ln=[{qn:0}]}Yn(A){this.Un(),this.Ln=[{qn:1,Vt:A}]}Zn(A){this.Xn(),this.Ln.push({qn:5,Vt:A})}Un(){this.Xn(),this.Ln.push({qn:6})}Kn(){this.Un(),this.Ln=[{qn:4}]}Gn(A){this.Un(),this.Ln.push({qn:2,Vt:A})}Jn(A){this.Un(),this.Ln.push({qn:3,Vt:A})}Qn(){return this.Ln}ts(A){for(const e of A.Ln)this.ns(e);this.En=Math.max(this.En,A.En),A.zn.forEach(((e,t)=>{this.Nn(t,e)}))}static ss(){return new YA(2)}static es(){return new YA(3)}ns(A){switch(A.qn){case 0:this.$n();break;case 1:this.Yn(A.Vt);break;case 2:this.Gn(A.Vt);break;case 3:this.Jn(A.Vt);break;case 4:this.Kn();break;case 5:this.Zn(A.Vt);break;case 6:this.Xn()}}Xn(){const A=this.Ln.findIndex((e=>e.qn===5));A!==-1&&this.Ln.splice(A,1)}}const Aa=".";function $e(s,A){if(!Me(s))return"n/a";if(!As(A))throw new TypeError("invalid length");if(A<0||A>16)throw new TypeError("invalid length");return A===0?s.toString():("0000000000000000"+s.toString()).slice(-A)}class Xs{constructor(A,e){if(e||(e=1),Me(A)&&As(A)||(A=100),A<0)throw new TypeError("invalid base");this.Li=A,this.rs=e,this.hs()}format(A){const e=A<0?"−":"";return A=Math.abs(A),e+this.ls(A)}hs(){if(this._s=0,this.Li>0&&this.rs>0){let A=this.Li;for(;A>1;)A/=10,this._s++}}ls(A){const e=this.Li/this.rs;let t=Math.floor(A),r="";const i=this._s!==void 0?this._s:NaN;if(e>1){let n=+(Math.round(A*e)-t*e).toFixed(this._s);n>=e&&(n-=e,t+=1),r=Aa+$e(+n.toFixed(this._s)*this.rs,i)}else t=Math.round(t*e)/e,i>0&&(r=Aa+$e(0,i));return t.toFixed(0)+r}}class ea extends Xs{constructor(A=100){super(A)}format(A){return`${super.format(A)}%`}}class lf{constructor(A){this.us=A}format(A){let e="";return A<0&&(e="-",A=-A),A<995?e+this.cs(A):A<999995?e+this.cs(A/1e3)+"K":A<999999995?(A=1e3*Math.round(A/1e3),e+this.cs(A/1e6)+"M"):(A=1e6*Math.round(A/1e6),e+this.cs(A/1e9)+"B")}cs(A){let e;const t=Math.pow(10,this.us);return e=(A=Math.round(A*t)/t)>=1e-15&&A<1?A.toFixed(this.us).replace(/\.?0+$/,""):String(A),e.replace(/(\.[1-9]*)0+$/,((r,i)=>i))}}function ta(s,A,e,t,r,i,n){if(A.length===0||t.from>=A.length||t.to<=0)return;const{context:o,horizontalPixelRatio:a,verticalPixelRatio:l}=s,c=A[t.from];let u=i(s,c),d=c;if(t.to-t.from<2){const g=r/2;o.beginPath();const B={nt:c.nt-g,st:c.st},f={nt:c.nt+g,st:c.st};o.moveTo(B.nt*a,B.st*l),o.lineTo(f.nt*a,f.st*l),n(s,u,B,f)}else{const g=(f,p)=>{n(s,u,d,p),o.beginPath(),u=f,d=p};let B=d;o.beginPath(),o.moveTo(c.nt*a,c.st*l);for(let f=t.from+1;f<t.to;++f){B=A[f];const p=i(s,B);switch(e){case 0:o.lineTo(B.nt*a,B.st*l);break;case 1:o.lineTo(B.nt*a,A[f-1].st*l),p!==u&&(g(p,B),o.lineTo(B.nt*a,A[f-1].st*l)),o.lineTo(B.nt*a,B.st*l);break;case 2:{const[m,w]=cf(A,f-1,f);o.bezierCurveTo(m.nt*a,m.st*l,w.nt*a,w.st*l,B.nt*a,B.st*l);break}}e!==1&&p!==u&&(g(p,B),o.moveTo(B.nt*a,B.st*l))}(d!==B||d===B&&e===1)&&n(s,u,d,B)}}const sa=6;function Ei(s,A){return{nt:s.nt-A.nt,st:s.st-A.st}}function ra(s,A){return{nt:s.nt/A,st:s.st/A}}function cf(s,A,e){const t=Math.max(0,A-1),r=Math.min(s.length-1,e+1);var i,n;return[(i=s[A],n=ra(Ei(s[e],s[t]),sa),{nt:i.nt+n.nt,st:i.st+n.st}),Ei(s[e],ra(Ei(s[r],s[A]),sa))]}function hf(s,A,e,t,r){const{context:i,horizontalPixelRatio:n,verticalPixelRatio:o}=A;i.lineTo(r.nt*n,s*o),i.lineTo(t.nt*n,s*o),i.closePath(),i.fillStyle=e,i.fill()}class ia extends xe{constructor(){super(...arguments),this.G=null}J(A){this.G=A}K(A){var e;if(this.G===null)return;const{it:t,tt:r,ds:i,et:n,Nt:o,fs:a}=this.G,l=(e=this.G.vs)!==null&&e!==void 0?e:this.G.ps?0:A.mediaSize.height;if(r===null)return;const c=A.context;c.lineCap="butt",c.lineJoin="round",c.lineWidth=n,dt(c,o),c.lineWidth=1,ta(A,t,a,r,i,this.bs.bind(this),hf.bind(null,l))}}function xi(s,A,e){return Math.min(Math.max(s,A),e)}function $s(s,A,e){return A-s<=e}function na(s){const A=Math.ceil(s);return A%2==0?A-1:A}class Si{ws(A,e){const t=this.gs,{Ms:r,xs:i,Ss:n,ks:o,ys:a,vs:l}=e;if(this.Cs===void 0||t===void 0||t.Ms!==r||t.xs!==i||t.Ss!==n||t.ks!==o||t.vs!==l||t.ys!==a){const c=A.context.createLinearGradient(0,0,0,a);if(c.addColorStop(0,r),l!=null){const u=xi(l*A.verticalPixelRatio/a,0,1);c.addColorStop(u,i),c.addColorStop(u,n)}c.addColorStop(1,o),this.Cs=c,this.gs=e}return this.Cs}}class uf extends ia{constructor(){super(...arguments),this.Ts=new Si}bs(A,e){return this.Ts.ws(A,{Ms:e.Ps,xs:"",Ss:"",ks:e.Rs,ys:A.bitmapSize.height})}}function ff(s,A){const e=s.context;e.strokeStyle=A,e.stroke()}class oa extends xe{constructor(){super(...arguments),this.G=null}J(A){this.G=A}K(A){if(this.G===null)return;const{it:e,tt:t,ds:r,fs:i,et:n,Nt:o,Ds:a}=this.G;if(t===null)return;const l=A.context;l.lineCap="butt",l.lineWidth=n*A.verticalPixelRatio,dt(l,o),l.lineJoin="round";const c=this.Vs.bind(this);i!==void 0&&ta(A,e,i,t,r,c,ff),a&&(function(u,d,g,B,f){const{horizontalPixelRatio:p,verticalPixelRatio:m,context:w}=u;let v=null;const y=Math.max(1,Math.floor(p))%2/2,E=g*m+y;for(let F=B.to-1;F>=B.from;--F){const T=d[F];if(T){const M=f(u,T);M!==v&&(w.beginPath(),v!==null&&w.fill(),w.fillStyle=M,v=M);const I=Math.round(T.nt*p)+y,cA=T.st*m;w.moveTo(I,cA),w.arc(I,cA,E,0,2*Math.PI)}}w.fill()})(A,e,a,t,c)}}class aa extends oa{Vs(A,e){return e.lt}}function la(s,A,e,t,r=0,i=A.length){let n=i-r;for(;0<n;){const o=n>>1,a=r+o;t(A[a],e)===s?(r=a+1,n-=o+1):n=o}return r}const ss=la.bind(null,!0),ca=la.bind(null,!1);function df(s,A){return s.ot<A}function Bf(s,A){return A<s.ot}function ha(s,A,e){const t=A.Os(),r=A.ui(),i=ss(s,t,df),n=ca(s,r,Bf);if(!e)return{from:i,to:n};let o=i,a=n;return i>0&&i<s.length&&s[i].ot>=t&&(o=i-1),n>0&&n<s.length&&s[n-1].ot<=r&&(a=n+1),{from:o,to:a}}class Hi{constructor(A,e,t){this.Bs=!0,this.As=!0,this.Is=!0,this.zs=[],this.Ls=null,this.Es=A,this.Ns=e,this.Fs=t}bt(A){this.Bs=!0,A==="data"&&(this.As=!0),A==="options"&&(this.Is=!0)}gt(){return this.Es.yt()?(this.Ws(),this.Ls===null?null:this.js):null}Hs(){this.zs=this.zs.map((A=>Object.assign(Object.assign({},A),this.Es.Us().$s(A.ot))))}qs(){this.Ls=null}Ws(){this.As&&(this.Ys(),this.As=!1),this.Is&&(this.Hs(),this.Is=!1),this.Bs&&(this.Zs(),this.Bs=!1)}Zs(){const A=this.Es.Dt(),e=this.Ns.St();if(this.qs(),e.Ni()||A.Ni())return;const t=e.Xs();if(t===null||this.Es.In().Ks()===0)return;const r=this.Es.Ct();r!==null&&(this.Ls=ha(this.zs,t,this.Fs),this.Gs(A,e,r.Vt),this.Js())}}class Js extends Hi{constructor(A,e){super(A,e,!0)}Gs(A,e,t){e.Qs(this.zs,ts(this.Ls)),A.te(this.zs,t,ts(this.Ls))}ie(A,e){return{ot:A,_t:e,nt:NaN,st:NaN}}Ys(){const A=this.Es.Us();this.zs=this.Es.In().ne().map((e=>{const t=e.Vt[3];return this.se(e.ee,t,A)}))}}class gf extends Js{constructor(A,e){super(A,e),this.js=new Ui,this.re=new uf,this.he=new aa,this.js.Z([this.re,this.he])}se(A,e,t){return Object.assign(Object.assign({},this.ie(A,e)),t.$s(A))}Js(){const A=this.Es.W();this.re.J({fs:A.lineType,it:this.zs,Nt:A.lineStyle,et:A.lineWidth,vs:null,ps:A.invertFilledArea,tt:this.Ls,ds:this.Ns.St().le()}),this.he.J({fs:A.lineVisible?A.lineType:void 0,it:this.zs,Nt:A.lineStyle,et:A.lineWidth,tt:this.Ls,ds:this.Ns.St().le(),Ds:A.pointMarkersVisible?A.pointMarkersRadius||A.lineWidth/2+2:void 0})}}class pf extends xe{constructor(){super(...arguments),this.zt=null,this.ae=0,this.oe=0}J(A){this.zt=A}K({context:A,horizontalPixelRatio:e,verticalPixelRatio:t}){if(this.zt===null||this.zt.In.length===0||this.zt.tt===null)return;this.ae=this._e(e),this.ae>=2&&Math.max(1,Math.floor(e))%2!=this.ae%2&&this.ae--,this.oe=this.zt.ue?Math.min(this.ae,Math.floor(e)):this.ae;let r=null;const i=this.oe<=this.ae&&this.zt.le>=Math.floor(1.5*e);for(let n=this.zt.tt.from;n<this.zt.tt.to;++n){const o=this.zt.In[n];r!==o.ce&&(A.fillStyle=o.ce,r=o.ce);const a=Math.floor(.5*this.oe),l=Math.round(o.nt*e),c=l-a,u=this.oe,d=c+u-1,g=Math.min(o.de,o.fe),B=Math.max(o.de,o.fe),f=Math.round(g*t)-a,p=Math.round(B*t)+a,m=Math.max(p-f,this.oe);A.fillRect(c,f,u,m);const w=Math.ceil(1.5*this.ae);if(i){if(this.zt.ve){const F=l-w;let T=Math.max(f,Math.round(o.pe*t)-a),M=T+u-1;M>f+m-1&&(M=f+m-1,T=M-u+1),A.fillRect(F,T,c-F,M-T+1)}const v=l+w;let y=Math.max(f,Math.round(o.me*t)-a),E=y+u-1;E>f+m-1&&(E=f+m-1,y=E-u+1),A.fillRect(d+1,y,v-d,E-y+1)}}}_e(A){const e=Math.floor(A);return Math.max(e,Math.floor((function(t,r){return Math.floor(.3*t*r)})(L(this.zt).le,A)))}}class ua extends Hi{constructor(A,e){super(A,e,!1)}Gs(A,e,t){e.Qs(this.zs,ts(this.Ls)),A.be(this.zs,t,ts(this.Ls))}we(A,e,t){return{ot:A,ge:e.Vt[0],Me:e.Vt[1],xe:e.Vt[2],Se:e.Vt[3],nt:NaN,pe:NaN,de:NaN,fe:NaN,me:NaN}}Ys(){const A=this.Es.Us();this.zs=this.Es.In().ne().map((e=>this.se(e.ee,e,A)))}}class wf extends ua{constructor(){super(...arguments),this.js=new pf}se(A,e,t){return Object.assign(Object.assign({},this.we(A,e,t)),t.$s(A))}Js(){const A=this.Es.W();this.js.J({In:this.zs,le:this.Ns.St().le(),ve:A.openVisible,ue:A.thinBars,tt:this.Ls})}}class mf extends ia{constructor(){super(...arguments),this.Ts=new Si}bs(A,e){const t=this.G;return this.Ts.ws(A,{Ms:e.ke,xs:e.ye,Ss:e.Ce,ks:e.Te,ys:A.bitmapSize.height,vs:t.vs})}}class Cf extends oa{constructor(){super(...arguments),this.Pe=new Si}Vs(A,e){const t=this.G;return this.Pe.ws(A,{Ms:e.Re,xs:e.Re,Ss:e.De,ks:e.De,ys:A.bitmapSize.height,vs:t.vs})}}class vf extends Js{constructor(A,e){super(A,e),this.js=new Ui,this.Ve=new mf,this.Oe=new Cf,this.js.Z([this.Ve,this.Oe])}se(A,e,t){return Object.assign(Object.assign({},this.ie(A,e)),t.$s(A))}Js(){const A=this.Es.Ct();if(A===null)return;const e=this.Es.W(),t=this.Es.Dt().Rt(e.baseValue.price,A.Vt),r=this.Ns.St().le();this.Ve.J({it:this.zs,et:e.lineWidth,Nt:e.lineStyle,fs:e.lineType,vs:t,ps:!1,tt:this.Ls,ds:r}),this.Oe.J({it:this.zs,et:e.lineWidth,Nt:e.lineStyle,fs:e.lineVisible?e.lineType:void 0,Ds:e.pointMarkersVisible?e.pointMarkersRadius||e.lineWidth/2+2:void 0,vs:t,tt:this.Ls,ds:r})}}class bf extends xe{constructor(){super(...arguments),this.zt=null,this.ae=0}J(A){this.zt=A}K(A){if(this.zt===null||this.zt.In.length===0||this.zt.tt===null)return;const{horizontalPixelRatio:e}=A;this.ae=(function(i,n){if(i>=2.5&&i<=4)return Math.floor(3*n);const o=1-.2*Math.atan(Math.max(4,i)-4)/(.5*Math.PI),a=Math.floor(i*o*n),l=Math.floor(i*n),c=Math.min(a,l);return Math.max(Math.floor(n),c)})(this.zt.le,e),this.ae>=2&&Math.floor(e)%2!=this.ae%2&&this.ae--;const t=this.zt.In;this.zt.Be&&this.Ae(A,t,this.zt.tt),this.zt._i&&this.Ie(A,t,this.zt.tt);const r=this.ze(e);(!this.zt._i||this.ae>2*r)&&this.Le(A,t,this.zt.tt)}Ae(A,e,t){if(this.zt===null)return;const{context:r,horizontalPixelRatio:i,verticalPixelRatio:n}=A;let o="",a=Math.min(Math.floor(i),Math.floor(this.zt.le*i));a=Math.max(Math.floor(i),Math.min(a,this.ae));const l=Math.floor(.5*a);let c=null;for(let u=t.from;u<t.to;u++){const d=e[u];d.Ee!==o&&(r.fillStyle=d.Ee,o=d.Ee);const g=Math.round(Math.min(d.pe,d.me)*n),B=Math.round(Math.max(d.pe,d.me)*n),f=Math.round(d.de*n),p=Math.round(d.fe*n);let m=Math.round(i*d.nt)-l;const w=m+a-1;c!==null&&(m=Math.max(c+1,m),m=Math.min(m,w));const v=w-m+1;r.fillRect(m,f,v,g-f),r.fillRect(m,B+1,v,p-B),c=w}}ze(A){let e=Math.floor(1*A);this.ae<=2*e&&(e=Math.floor(.5*(this.ae-1)));const t=Math.max(Math.floor(A),e);return this.ae<=2*t?Math.max(Math.floor(A),Math.floor(1*A)):t}Ie(A,e,t){if(this.zt===null)return;const{context:r,horizontalPixelRatio:i,verticalPixelRatio:n}=A;let o="";const a=this.ze(i);let l=null;for(let c=t.from;c<t.to;c++){const u=e[c];u.Ne!==o&&(r.fillStyle=u.Ne,o=u.Ne);let d=Math.round(u.nt*i)-Math.floor(.5*this.ae);const g=d+this.ae-1,B=Math.round(Math.min(u.pe,u.me)*n),f=Math.round(Math.max(u.pe,u.me)*n);if(l!==null&&(d=Math.max(l+1,d),d=Math.min(d,g)),this.zt.le*i>2*a)sf(r,d,B,g-d+1,f-B+1,a);else{const p=g-d+1;r.fillRect(d,B,p,f-B+1)}l=g}}Le(A,e,t){if(this.zt===null)return;const{context:r,horizontalPixelRatio:i,verticalPixelRatio:n}=A;let o="";const a=this.ze(i);for(let l=t.from;l<t.to;l++){const c=e[l];let u=Math.round(Math.min(c.pe,c.me)*n),d=Math.round(Math.max(c.pe,c.me)*n),g=Math.round(c.nt*i)-Math.floor(.5*this.ae),B=g+this.ae-1;if(c.ce!==o){const f=c.ce;r.fillStyle=f,o=f}this.zt._i&&(g+=a,u+=a,B-=a,d-=a),u>d||r.fillRect(g,u,B-g+1,d-u+1)}}}class Qf extends ua{constructor(){super(...arguments),this.js=new bf}se(A,e,t){return Object.assign(Object.assign({},this.we(A,e,t)),t.$s(A))}Js(){const A=this.Es.W();this.js.J({In:this.zs,le:this.Ns.St().le(),Be:A.wickVisible,_i:A.borderVisible,tt:this.Ls})}}class yf{constructor(A,e){this.Fe=A,this.Li=e}X(A,e,t){this.Fe.draw(A,this.Li,e,t)}}class Li extends Hi{constructor(A,e,t){super(A,e,!1),this.wn=t,this.js=new yf(this.wn.renderer(),(r=>{const i=A.Ct();return i===null?null:A.Dt().Rt(r,i.Vt)}))}We(A){return this.wn.priceValueBuilder(A)}je(A){return this.wn.isWhitespace(A)}Ys(){const A=this.Es.Us();this.zs=this.Es.In().ne().map((e=>Object.assign(Object.assign({ot:e.ee,nt:NaN},A.$s(e.ee)),{He:e.$e})))}Gs(A,e){e.Qs(this.zs,ts(this.Ls))}Js(){this.wn.update({bars:this.zs.map(Uf),barSpacing:this.Ns.St().le(),visibleRange:this.Ls},this.Es.W())}}function Uf(s){return{x:s.nt,time:s.ot,originalData:s.He,barColor:s.ce}}class Ff extends xe{constructor(){super(...arguments),this.zt=null,this.Ue=[]}J(A){this.zt=A,this.Ue=[]}K({context:A,horizontalPixelRatio:e,verticalPixelRatio:t}){if(this.zt===null||this.zt.it.length===0||this.zt.tt===null)return;this.Ue.length||this.qe(e);const r=Math.max(1,Math.floor(t)),i=Math.round(this.zt.Ye*t)-Math.floor(r/2),n=i+r;for(let o=this.zt.tt.from;o<this.zt.tt.to;o++){const a=this.zt.it[o],l=this.Ue[o-this.zt.tt.from],c=Math.round(a.st*t);let u,d;A.fillStyle=a.ce,c<=i?(u=c,d=n):(u=i,d=c-Math.floor(r/2)+r),A.fillRect(l.Os,u,l.ui-l.Os+1,d-u)}}qe(A){if(this.zt===null||this.zt.it.length===0||this.zt.tt===null)return void(this.Ue=[]);const e=Math.ceil(this.zt.le*A)<=1?0:Math.max(1,Math.floor(A)),t=Math.round(this.zt.le*A)-e;this.Ue=new Array(this.zt.tt.to-this.zt.tt.from);for(let i=this.zt.tt.from;i<this.zt.tt.to;i++){const n=this.zt.it[i],o=Math.round(n.nt*A);let a,l;if(t%2){const c=(t-1)/2;a=o-c,l=o+c}else{const c=t/2;a=o-c,l=o+c-1}this.Ue[i-this.zt.tt.from]={Os:a,ui:l,Ze:o,Xe:n.nt*A,ot:n.ot}}for(let i=this.zt.tt.from+1;i<this.zt.tt.to;i++){const n=this.Ue[i-this.zt.tt.from],o=this.Ue[i-this.zt.tt.from-1];n.ot===o.ot+1&&n.Os-o.ui!==e+1&&(o.Ze>o.Xe?o.ui=n.Os-e-1:n.Os=o.ui+e+1)}let r=Math.ceil(this.zt.le*A);for(let i=this.zt.tt.from;i<this.zt.tt.to;i++){const n=this.Ue[i-this.zt.tt.from];n.ui<n.Os&&(n.ui=n.Os);const o=n.ui-n.Os+1;r=Math.min(o,r)}if(e>0&&r<4)for(let i=this.zt.tt.from;i<this.zt.tt.to;i++){const n=this.Ue[i-this.zt.tt.from];n.ui-n.Os+1>r&&(n.Ze>n.Xe?n.ui-=1:n.Os+=1)}}}class Ef extends Js{constructor(){super(...arguments),this.js=new Ff}se(A,e,t){return Object.assign(Object.assign({},this.ie(A,e)),t.$s(A))}Js(){const A={it:this.zs,le:this.Ns.St().le(),tt:this.Ls,Ye:this.Es.Dt().Rt(this.Es.W().base,L(this.Es.Ct()).Vt)};this.js.J(A)}}class xf extends Js{constructor(){super(...arguments),this.js=new aa}se(A,e,t){return Object.assign(Object.assign({},this.ie(A,e)),t.$s(A))}Js(){const A=this.Es.W(),e={it:this.zs,Nt:A.lineStyle,fs:A.lineVisible?A.lineType:void 0,et:A.lineWidth,Ds:A.pointMarkersVisible?A.pointMarkersRadius||A.lineWidth/2+2:void 0,tt:this.Ls,ds:this.Ns.St().le()};this.js.J(e)}}const Sf=/[2-9]/g;class rs{constructor(A=50){this.Ke=0,this.Ge=1,this.Je=1,this.Qe={},this.tr=new Map,this.ir=A}nr(){this.Ke=0,this.tr.clear(),this.Ge=1,this.Je=1,this.Qe={}}xi(A,e,t){return this.sr(A,e,t).width}Mi(A,e,t){const r=this.sr(A,e,t);return((r.actualBoundingBoxAscent||0)-(r.actualBoundingBoxDescent||0))/2}sr(A,e,t){const r=t||Sf,i=String(e).replace(r,"0");if(this.tr.has(i))return ne(this.tr.get(i)).er;if(this.Ke===this.ir){const o=this.Qe[this.Je];delete this.Qe[this.Je],this.tr.delete(o),this.Je++,this.Ke--}A.save(),A.textBaseline="middle";const n=A.measureText(i);return A.restore(),n.width===0&&e.length||(this.tr.set(i,{er:n,rr:this.Ge}),this.Qe[this.Ge]=i,this.Ke++,this.Ge++),n}}class Hf{constructor(A){this.hr=null,this.k=null,this.lr="right",this.ar=A}_r(A,e,t){this.hr=A,this.k=e,this.lr=t}X(A){this.k!==null&&this.hr!==null&&this.hr.X(A,this.k,this.ar,this.lr)}}class fa{constructor(A,e,t){this.ur=A,this.ar=new rs(50),this.cr=e,this.F=t,this.j=-1,this.Wt=new Hf(this.ar)}gt(){const A=this.F.dr(this.cr);if(A===null)return null;const e=A.vr(this.cr)?A.pr():this.cr.Dt();if(e===null)return null;const t=A.mr(e);if(t==="overlay")return null;const r=this.F.br();return r.P!==this.j&&(this.j=r.P,this.ar.nr()),this.Wt._r(this.ur.Ii(),r,t),this.Wt}}class Lf extends xe{constructor(){super(...arguments),this.zt=null}J(A){this.zt=A}wr(A,e){var t;if(!(!((t=this.zt)===null||t===void 0)&&t.yt))return null;const{st:r,et:i,gr:n}=this.zt;return e>=r-i-7&&e<=r+i+7?{Mr:this.zt,gr:n}:null}K({context:A,bitmapSize:e,horizontalPixelRatio:t,verticalPixelRatio:r}){if(this.zt===null||this.zt.yt===!1)return;const i=Math.round(this.zt.st*r);i<0||i>e.height||(A.lineCap="butt",A.strokeStyle=this.zt.V,A.lineWidth=Math.floor(this.zt.et*t),dt(A,this.zt.Nt),Ro(A,i,0,e.width))}}class Ii{constructor(A){this.Sr={st:0,V:"rgba(0, 0, 0, 0)",et:1,Nt:0,yt:!1},this.kr=new Lf,this.ft=!0,this.Es=A,this.Ns=A.$t(),this.kr.J(this.Sr)}bt(){this.ft=!0}gt(){return this.Es.yt()?(this.ft&&(this.yr(),this.ft=!1),this.kr):null}}class If extends Ii{constructor(A){super(A)}yr(){this.Sr.yt=!1;const A=this.Es.Dt(),e=A.Cr().Cr;if(e!==2&&e!==3)return;const t=this.Es.W();if(!t.baseLineVisible||!this.Es.yt())return;const r=this.Es.Ct();r!==null&&(this.Sr.yt=!0,this.Sr.st=A.Rt(r.Vt,r.Vt),this.Sr.V=t.baseLineColor,this.Sr.et=t.baseLineWidth,this.Sr.Nt=t.baseLineStyle)}}class Tf extends xe{constructor(){super(...arguments),this.zt=null}J(A){this.zt=A}$e(){return this.zt}K({context:A,horizontalPixelRatio:e,verticalPixelRatio:t}){const r=this.zt;if(r===null)return;const i=Math.max(1,Math.floor(e)),n=i%2/2,o=Math.round(r.Xe.x*e)+n,a=r.Xe.y*t;A.fillStyle=r.Tr,A.beginPath();const l=Math.max(2,1.5*r.Pr)*e;A.arc(o,a,l,0,2*Math.PI,!1),A.fill(),A.fillStyle=r.Rr,A.beginPath(),A.arc(o,a,r.ht*e,0,2*Math.PI,!1),A.fill(),A.lineWidth=i,A.strokeStyle=r.Dr,A.beginPath(),A.arc(o,a,r.ht*e+i/2,0,2*Math.PI,!1),A.stroke()}}const Mf=[{Vr:0,Or:.25,Br:4,Ar:10,Ir:.25,zr:0,Lr:.4,Er:.8},{Vr:.25,Or:.525,Br:10,Ar:14,Ir:0,zr:0,Lr:.8,Er:0},{Vr:.525,Or:1,Br:14,Ar:14,Ir:0,zr:0,Lr:0,Er:0}];function da(s,A,e,t){return(function(r,i){if(r==="transparent")return r;const n=jt(r),o=n[3];return`rgba(${n[0]}, ${n[1]}, ${n[2]}, ${i*o})`})(s,e+(t-e)*A)}function Ba(s,A){const e=s%2600/2600;let t;for(const a of Mf)if(e>=a.Vr&&e<=a.Or){t=a;break}je(t!==void 0,"Last price animation internal logic error");const r=(e-t.Vr)/(t.Or-t.Vr);return{Rr:da(A,r,t.Ir,t.zr),Dr:da(A,r,t.Lr,t.Er),ht:(i=r,n=t.Br,o=t.Ar,n+(o-n)*i)};var i,n,o}class Df{constructor(A){this.Wt=new Tf,this.ft=!0,this.Nr=!0,this.Fr=performance.now(),this.Wr=this.Fr-1,this.jr=A}Hr(){this.Wr=this.Fr-1,this.bt()}$r(){if(this.bt(),this.jr.W().lastPriceAnimation===2){const A=performance.now(),e=this.Wr-A;if(e>0)return void(e<650&&(this.Wr+=2600));this.Fr=A,this.Wr=A+2600}}bt(){this.ft=!0}Ur(){this.Nr=!0}yt(){return this.jr.W().lastPriceAnimation!==0}qr(){switch(this.jr.W().lastPriceAnimation){case 0:return!1;case 1:return!0;case 2:return performance.now()<=this.Wr}}gt(){return this.ft?(this.Mt(),this.ft=!1,this.Nr=!1):this.Nr&&(this.Yr(),this.Nr=!1),this.Wt}Mt(){this.Wt.J(null);const A=this.jr.$t().St(),e=A.Xs(),t=this.jr.Ct();if(e===null||t===null)return;const r=this.jr.Zr(!0);if(r.Xr||!e.Kr(r.ee))return;const i={x:A.It(r.ee),y:this.jr.Dt().Rt(r._t,t.Vt)},n=r.V,o=this.jr.W().lineWidth,a=Ba(this.Gr(),n);this.Wt.J({Tr:n,Pr:o,Rr:a.Rr,Dr:a.Dr,ht:a.ht,Xe:i})}Yr(){const A=this.Wt.$e();if(A!==null){const e=Ba(this.Gr(),A.Tr);A.Rr=e.Rr,A.Dr=e.Dr,A.ht=e.ht}}Gr(){return this.qr()?performance.now()-this.Fr:2599}}function is(s,A){return na(Math.min(Math.max(s,12),30)*A)}function ns(s,A){switch(s){case"arrowDown":case"arrowUp":return is(A,1);case"circle":return is(A,.8);case"square":return is(A,.7)}}function ga(s){return(function(A){const e=Math.ceil(A);return e%2!=0?e-1:e})(is(s,1))}function pa(s){return Math.max(is(s,.1),3)}function wa(s,A,e){return A?s:e?Math.ceil(s/2):0}function ma(s,A,e,t,r){const i=ns("square",e),n=(i-1)/2,o=s-n,a=A-n;return t>=o&&t<=o+i&&r>=a&&r<=a+i}function Ca(s,A,e,t){const r=(ns("arrowUp",t)-1)/2*e.Jr,i=(na(t/2)-1)/2*e.Jr;A.beginPath(),s?(A.moveTo(e.nt-r,e.st),A.lineTo(e.nt,e.st-r),A.lineTo(e.nt+r,e.st),A.lineTo(e.nt+i,e.st),A.lineTo(e.nt+i,e.st+r),A.lineTo(e.nt-i,e.st+r),A.lineTo(e.nt-i,e.st)):(A.moveTo(e.nt-r,e.st),A.lineTo(e.nt,e.st+r),A.lineTo(e.nt+r,e.st),A.lineTo(e.nt+i,e.st),A.lineTo(e.nt+i,e.st-r),A.lineTo(e.nt-i,e.st-r),A.lineTo(e.nt-i,e.st)),A.fill()}function kf(s,A,e,t,r,i){return ma(A,e,t,r,i)}class _f extends xe{constructor(){super(...arguments),this.zt=null,this.ar=new rs,this.j=-1,this.H="",this.Qr=""}J(A){this.zt=A}_r(A,e){this.j===A&&this.H===e||(this.j=A,this.H=e,this.Qr=Lt(A,e),this.ar.nr())}wr(A,e){if(this.zt===null||this.zt.tt===null)return null;for(let t=this.zt.tt.from;t<this.zt.tt.to;t++){const r=this.zt.it[t];if(Nf(r,A,e))return{Mr:r.th,gr:r.gr}}return null}K({context:A,horizontalPixelRatio:e,verticalPixelRatio:t},r,i){if(this.zt!==null&&this.zt.tt!==null){A.textBaseline="middle",A.font=this.Qr;for(let n=this.zt.tt.from;n<this.zt.tt.to;n++){const o=this.zt.it[n];o.Kt!==void 0&&(o.Kt.Hi=this.ar.xi(A,o.Kt.ih),o.Kt.At=this.j,o.Kt.nt=o.nt-o.Kt.Hi/2),Of(o,A,e,t)}}}}function Of(s,A,e,t){A.fillStyle=s.V,s.Kt!==void 0&&(function(r,i,n,o,a,l){r.save(),r.scale(a,l),r.fillText(i,n,o),r.restore()})(A,s.Kt.ih,s.Kt.nt,s.Kt.st,e,t),(function(r,i,n){if(r.Ks!==0){switch(r.nh){case"arrowDown":return void Ca(!1,i,n,r.Ks);case"arrowUp":return void Ca(!0,i,n,r.Ks);case"circle":return void(function(o,a,l){const c=(ns("circle",l)-1)/2;o.beginPath(),o.arc(a.nt,a.st,c*a.Jr,0,2*Math.PI,!1),o.fill()})(i,n,r.Ks);case"square":return void(function(o,a,l){const c=ns("square",l),u=(c-1)*a.Jr/2,d=a.nt-u,g=a.st-u;o.fillRect(d,g,c*a.Jr,c*a.Jr)})(i,n,r.Ks)}r.nh}})(s,A,(function(r,i,n){const o=Math.max(1,Math.floor(i))%2/2;return{nt:Math.round(r.nt*i)+o,st:r.st*n,Jr:i}})(s,e,t))}function Nf(s,A,e){return!(s.Kt===void 0||!(function(t,r,i,n,o,a){const l=n/2;return o>=t&&o<=t+i&&a>=r-l&&a<=r+l})(s.Kt.nt,s.Kt.st,s.Kt.Hi,s.Kt.At,A,e))||(function(t,r,i){if(t.Ks===0)return!1;switch(t.nh){case"arrowDown":case"arrowUp":return kf(0,t.nt,t.st,t.Ks,r,i);case"circle":return(function(n,o,a,l,c){const u=2+ns("circle",a)/2,d=n-l,g=o-c;return Math.sqrt(d*d+g*g)<=u})(t.nt,t.st,t.Ks,r,i);case"square":return ma(t.nt,t.st,t.Ks,r,i)}})(s,A,e)}function Kf(s,A,e,t,r,i,n,o,a){const l=Me(e)?e:e.Se,c=Me(e)?e:e.Me,u=Me(e)?e:e.xe,d=Me(A.size)?Math.max(A.size,0):1,g=ga(o.le())*d,B=g/2;switch(s.Ks=g,A.position){case"inBar":return s.st=n.Rt(l,a),void(s.Kt!==void 0&&(s.Kt.st=s.st+B+i+.6*r));case"aboveBar":return s.st=n.Rt(c,a)-B-t.sh,s.Kt!==void 0&&(s.Kt.st=s.st-B-.6*r,t.sh+=1.2*r),void(t.sh+=g+i);case"belowBar":return s.st=n.Rt(u,a)+B+t.eh,s.Kt!==void 0&&(s.Kt.st=s.st+B+i+.6*r,t.eh+=1.2*r),void(t.eh+=g+i)}A.position}class Vf{constructor(A,e){this.ft=!0,this.rh=!0,this.hh=!0,this.ah=null,this.oh=null,this.Wt=new _f,this.jr=A,this.$i=e,this.zt={it:[],tt:null}}bt(A){this.ft=!0,this.hh=!0,A==="data"&&(this.rh=!0,this.oh=null)}gt(A){if(!this.jr.yt())return null;this.ft&&this._h();const e=this.$i.W().layout;return this.Wt._r(e.fontSize,e.fontFamily),this.Wt.J(this.zt),this.Wt}uh(){if(this.hh){if(this.jr.dh().length>0){const A=this.$i.St().le(),e=pa(A),t=1.5*ga(A)+2*e,r=this.fh();this.ah={above:wa(t,r.aboveBar,r.inBar),below:wa(t,r.belowBar,r.inBar)}}else this.ah=null;this.hh=!1}return this.ah}fh(){return this.oh===null&&(this.oh=this.jr.dh().reduce(((A,e)=>(A[e.position]||(A[e.position]=!0),A)),{inBar:!1,aboveBar:!1,belowBar:!1})),this.oh}_h(){const A=this.jr.Dt(),e=this.$i.St(),t=this.jr.dh();this.rh&&(this.zt.it=t.map((c=>({ot:c.time,nt:0,st:0,Ks:0,nh:c.shape,V:c.color,th:c.th,gr:c.id,Kt:void 0}))),this.rh=!1);const r=this.$i.W().layout;this.zt.tt=null;const i=e.Xs();if(i===null)return;const n=this.jr.Ct();if(n===null||this.zt.it.length===0)return;let o=NaN;const a=pa(e.le()),l={sh:a,eh:a};this.zt.tt=ha(this.zt.it,i,!0);for(let c=this.zt.tt.from;c<this.zt.tt.to;c++){const u=t[c];u.time!==o&&(l.sh=a,l.eh=a,o=u.time);const d=this.zt.it[c];d.nt=e.It(u.time),u.text!==void 0&&u.text.length>0&&(d.Kt={ih:u.text,nt:0,st:0,Hi:0,At:0});const g=this.jr.ph(u.time);g!==null&&Kf(d,u,g,l,r.fontSize,a,A,e,n.Vt)}this.ft=!1}}class Pf extends Ii{constructor(A){super(A)}yr(){const A=this.Sr;A.yt=!1;const e=this.Es.W();if(!e.priceLineVisible||!this.Es.yt())return;const t=this.Es.Zr(e.priceLineSource===0);t.Xr||(A.yt=!0,A.st=t.ki,A.V=this.Es.mh(t.V),A.et=e.priceLineWidth,A.Nt=e.priceLineStyle)}}class Gf extends zs{constructor(A){super(),this.jt=A}zi(A,e,t){A.yt=!1,e.yt=!1;const r=this.jt;if(!r.yt())return;const i=r.W(),n=i.lastValueVisible,o=r.bh()!=="",a=i.seriesLastValueMode===0,l=r.Zr(!1);if(l.Xr)return;n&&(A.Kt=this.wh(l,n,a),A.yt=A.Kt.length!==0),(o||a)&&(e.Kt=this.gh(l,n,o,a),e.yt=e.Kt.length>0);const c=r.mh(l.V),u=Ps(c);t.t=u.t,t.ki=l.ki,e.Ot=r.$t().Bt(l.ki/r.Dt().At()),A.Ot=c,A.V=u.i,e.V=u.i}gh(A,e,t,r){let i="";const n=this.jt.bh();return t&&n.length!==0&&(i+=`${n} `),e&&r&&(i+=this.jt.Dt().Mh()?A.xh:A.Sh),i.trim()}wh(A,e,t){return e?t?this.jt.Dt().Mh()?A.Sh:A.xh:A.Kt:""}}function va(s,A,e,t){const r=Number.isFinite(A),i=Number.isFinite(e);return r&&i?s(A,e):r||i?r?A:e:t}class ce{constructor(A,e){this.kh=A,this.yh=e}Ch(A){return A!==null&&this.kh===A.kh&&this.yh===A.yh}Th(){return new ce(this.kh,this.yh)}Ph(){return this.kh}Rh(){return this.yh}Dh(){return this.yh-this.kh}Ni(){return this.yh===this.kh||Number.isNaN(this.yh)||Number.isNaN(this.kh)}ts(A){return A===null?this:new ce(va(Math.min,this.Ph(),A.Ph(),-1/0),va(Math.max,this.Rh(),A.Rh(),1/0))}Vh(A){if(!Me(A)||this.yh-this.kh===0)return;const e=.5*(this.yh+this.kh);let t=this.yh-e,r=this.kh-e;t*=A,r*=A,this.yh=e+t,this.kh=e+r}Oh(A){Me(A)&&(this.yh+=A,this.kh+=A)}Bh(){return{minValue:this.kh,maxValue:this.yh}}static Ah(A){return A===null?null:new ce(A.minValue,A.maxValue)}}class Zs{constructor(A,e){this.Ih=A,this.zh=e||null}Lh(){return this.Ih}Eh(){return this.zh}Bh(){return this.Ih===null?null:{priceRange:this.Ih.Bh(),margins:this.zh||void 0}}static Ah(A){return A===null?null:new Zs(ce.Ah(A.priceRange),A.margins)}}class Rf extends Ii{constructor(A,e){super(A),this.Nh=e}yr(){const A=this.Sr;A.yt=!1;const e=this.Nh.W();if(!this.Es.yt()||!e.lineVisible)return;const t=this.Nh.Fh();t!==null&&(A.yt=!0,A.st=t,A.V=e.color,A.et=e.lineWidth,A.Nt=e.lineStyle,A.gr=this.Nh.W().id)}}class zf extends zs{constructor(A,e){super(),this.jr=A,this.Nh=e}zi(A,e,t){A.yt=!1,e.yt=!1;const r=this.Nh.W(),i=r.axisLabelVisible,n=r.title!=="",o=this.jr;if(!i||!o.yt())return;const a=this.Nh.Fh();if(a===null)return;n&&(e.Kt=r.title,e.yt=!0),e.Ot=o.$t().Bt(a/o.Dt().At()),A.Kt=this.Wh(r.price),A.yt=!0;const l=Ps(r.axisLabelColor||r.color);t.t=l.t;const c=r.axisLabelTextColor||l.i;A.V=c,e.V=c,t.ki=a}Wh(A){const e=this.jr.Ct();return e===null?"":this.jr.Dt().Fi(A,e.Vt)}}class Wf{constructor(A,e){this.jr=A,this.cn=e,this.jh=new Rf(A,this),this.ur=new zf(A,this),this.Hh=new fa(this.ur,A,A.$t())}$h(A){Ee(this.cn,A),this.bt(),this.jr.$t().Uh()}W(){return this.cn}qh(){return this.jh}Yh(){return this.Hh}Zh(){return this.ur}bt(){this.jh.bt(),this.ur.bt()}Fh(){const A=this.jr,e=A.Dt();if(A.$t().St().Ni()||e.Ni())return null;const t=A.Ct();return t===null?null:e.Rt(this.cn.price,t.Vt)}}class Xf extends Fi{constructor(A){super(),this.$i=A}$t(){return this.$i}}const $f={Bar:(s,A,e,t)=>{var r;const i=A.upColor,n=A.downColor,o=L(s(e,t)),a=Ht(o.Vt[0])<=Ht(o.Vt[3]);return{ce:(r=o.V)!==null&&r!==void 0?r:a?i:n}},Candlestick:(s,A,e,t)=>{var r,i,n;const o=A.upColor,a=A.downColor,l=A.borderUpColor,c=A.borderDownColor,u=A.wickUpColor,d=A.wickDownColor,g=L(s(e,t)),B=Ht(g.Vt[0])<=Ht(g.Vt[3]);return{ce:(r=g.V)!==null&&r!==void 0?r:B?o:a,Ne:(i=g.Ot)!==null&&i!==void 0?i:B?l:c,Ee:(n=g.Xh)!==null&&n!==void 0?n:B?u:d}},Custom:(s,A,e,t)=>{var r;return{ce:(r=L(s(e,t)).V)!==null&&r!==void 0?r:A.color}},Area:(s,A,e,t)=>{var r,i,n,o;const a=L(s(e,t));return{ce:(r=a.lt)!==null&&r!==void 0?r:A.lineColor,lt:(i=a.lt)!==null&&i!==void 0?i:A.lineColor,Ps:(n=a.Ps)!==null&&n!==void 0?n:A.topColor,Rs:(o=a.Rs)!==null&&o!==void 0?o:A.bottomColor}},Baseline:(s,A,e,t)=>{var r,i,n,o,a,l;const c=L(s(e,t));return{ce:c.Vt[3]>=A.baseValue.price?A.topLineColor:A.bottomLineColor,Re:(r=c.Re)!==null&&r!==void 0?r:A.topLineColor,De:(i=c.De)!==null&&i!==void 0?i:A.bottomLineColor,ke:(n=c.ke)!==null&&n!==void 0?n:A.topFillColor1,ye:(o=c.ye)!==null&&o!==void 0?o:A.topFillColor2,Ce:(a=c.Ce)!==null&&a!==void 0?a:A.bottomFillColor1,Te:(l=c.Te)!==null&&l!==void 0?l:A.bottomFillColor2}},Line:(s,A,e,t)=>{var r,i;const n=L(s(e,t));return{ce:(r=n.V)!==null&&r!==void 0?r:A.color,lt:(i=n.V)!==null&&i!==void 0?i:A.color}},Histogram:(s,A,e,t)=>{var r;return{ce:(r=L(s(e,t)).V)!==null&&r!==void 0?r:A.color}}};class Jf{constructor(A){this.Kh=(e,t)=>t!==void 0?t.Vt:this.jr.In().Gh(e),this.jr=A,this.Jh=$f[A.Qh()]}$s(A,e){return this.Jh(this.Kh,this.jr.W(),A,e)}}var ba;(function(s){s[s.NearestLeft=-1]="NearestLeft",s[s.None=0]="None",s[s.NearestRight=1]="NearestRight"})(ba||(ba={}));const At=30;class Zf{constructor(){this.tl=[],this.il=new Map,this.nl=new Map}sl(){return this.Ks()>0?this.tl[this.tl.length-1]:null}el(){return this.Ks()>0?this.rl(0):null}An(){return this.Ks()>0?this.rl(this.tl.length-1):null}Ks(){return this.tl.length}Ni(){return this.Ks()===0}Kr(A){return this.hl(A,0)!==null}Gh(A){return this.ll(A)}ll(A,e=0){const t=this.hl(A,e);return t===null?null:Object.assign(Object.assign({},this.al(t)),{ee:this.rl(t)})}ne(){return this.tl}ol(A,e,t){if(this.Ni())return null;let r=null;for(const i of t)r=Ys(r,this._l(A,e,i));return r}J(A){this.nl.clear(),this.il.clear(),this.tl=A}rl(A){return this.tl[A].ee}al(A){return this.tl[A]}hl(A,e){const t=this.ul(A);if(t===null&&e!==0)switch(e){case-1:return this.cl(A);case 1:return this.dl(A);default:throw new TypeError("Unknown search mode")}return t}cl(A){let e=this.fl(A);return e>0&&(e-=1),e!==this.tl.length&&this.rl(e)<A?e:null}dl(A){const e=this.vl(A);return e!==this.tl.length&&A<this.rl(e)?e:null}ul(A){const e=this.fl(A);return e===this.tl.length||A<this.tl[e].ee?null:e}fl(A){return ss(this.tl,A,((e,t)=>e.ee<t))}vl(A){return ca(this.tl,A,((e,t)=>e.ee>t))}pl(A,e,t){let r=null;for(let i=A;i<e;i++){const n=this.tl[i].Vt[t];Number.isNaN(n)||(r===null?r={ml:n,bl:n}:(n<r.ml&&(r.ml=n),n>r.bl&&(r.bl=n)))}return r}_l(A,e,t){if(this.Ni())return null;let r=null;const i=L(this.el()),n=L(this.An()),o=Math.max(A,i),a=Math.min(e,n),l=Math.ceil(o/At)*At,c=Math.max(l,Math.floor(a/At)*At);{const d=this.fl(o),g=this.vl(Math.min(a,l,e));r=Ys(r,this.pl(d,g,t))}let u=this.il.get(t);u===void 0&&(u=new Map,this.il.set(t,u));for(let d=Math.max(l+1,o);d<c;d+=At){const g=Math.floor(d/At);let B=u.get(g);if(B===void 0){const f=this.fl(g*At),p=this.vl((g+1)*At-1);B=this.pl(f,p,t),u.set(g,B)}r=Ys(r,B)}{const d=this.fl(c),g=this.vl(a);r=Ys(r,this.pl(d,g,t))}return r}}function Ys(s,A){return s===null?A:A===null?s:{ml:Math.min(s.ml,A.ml),bl:Math.max(s.bl,A.bl)}}class Yf{constructor(A){this.wl=A}X(A,e,t){this.wl.draw(A)}gl(A,e,t){var r,i;(i=(r=this.wl).drawBackground)===null||i===void 0||i.call(r,A)}}class Ti{constructor(A){this.tr=null,this.wn=A}gt(){var A;const e=this.wn.renderer();if(e===null)return null;if(((A=this.tr)===null||A===void 0?void 0:A.Ml)===e)return this.tr.xl;const t=new Yf(e);return this.tr={Ml:e,xl:t},t}Sl(){var A,e,t;return(t=(e=(A=this.wn).zOrder)===null||e===void 0?void 0:e.call(A))!==null&&t!==void 0?t:"normal"}}function Qa(s){var A,e,t,r,i;return{Kt:s.text(),ki:s.coordinate(),Si:(A=s.fixedCoordinate)===null||A===void 0?void 0:A.call(s),V:s.textColor(),t:s.backColor(),yt:(t=(e=s.visible)===null||e===void 0?void 0:e.call(s))===null||t===void 0||t,hi:(i=(r=s.tickVisible)===null||r===void 0?void 0:r.call(s))===null||i===void 0||i}}class qf{constructor(A,e){this.Wt=new qo,this.kl=A,this.yl=e}gt(){return this.Wt.J(Object.assign({Hi:this.yl.Hi()},Qa(this.kl))),this.Wt}}class jf extends zs{constructor(A,e){super(),this.kl=A,this.Li=e}zi(A,e,t){const r=Qa(this.kl);t.t=r.t,A.V=r.V;const i=2/12*this.Li.P();t.wi=i,t.gi=i,t.ki=r.ki,t.Si=r.Si,A.Kt=r.Kt,A.yt=r.yt,A.hi=r.hi}}class Ad{constructor(A,e){this.Cl=null,this.Tl=null,this.Pl=null,this.Rl=null,this.Dl=null,this.Vl=A,this.jr=e}Ol(){return this.Vl}Vn(){var A,e;(e=(A=this.Vl).updateAllViews)===null||e===void 0||e.call(A)}Pn(){var A,e,t,r;const i=(t=(e=(A=this.Vl).paneViews)===null||e===void 0?void 0:e.call(A))!==null&&t!==void 0?t:[];if(((r=this.Cl)===null||r===void 0?void 0:r.Ml)===i)return this.Cl.xl;const n=i.map((o=>new Ti(o)));return this.Cl={Ml:i,xl:n},n}Qi(){var A,e,t,r;const i=(t=(e=(A=this.Vl).timeAxisViews)===null||e===void 0?void 0:e.call(A))!==null&&t!==void 0?t:[];if(((r=this.Tl)===null||r===void 0?void 0:r.Ml)===i)return this.Tl.xl;const n=this.jr.$t().St(),o=i.map((a=>new qf(a,n)));return this.Tl={Ml:i,xl:o},o}Rn(){var A,e,t,r;const i=(t=(e=(A=this.Vl).priceAxisViews)===null||e===void 0?void 0:e.call(A))!==null&&t!==void 0?t:[];if(((r=this.Pl)===null||r===void 0?void 0:r.Ml)===i)return this.Pl.xl;const n=this.jr.Dt(),o=i.map((a=>new jf(a,n)));return this.Pl={Ml:i,xl:o},o}Bl(){var A,e,t,r;const i=(t=(e=(A=this.Vl).priceAxisPaneViews)===null||e===void 0?void 0:e.call(A))!==null&&t!==void 0?t:[];if(((r=this.Rl)===null||r===void 0?void 0:r.Ml)===i)return this.Rl.xl;const n=i.map((o=>new Ti(o)));return this.Rl={Ml:i,xl:n},n}Al(){var A,e,t,r;const i=(t=(e=(A=this.Vl).timeAxisPaneViews)===null||e===void 0?void 0:e.call(A))!==null&&t!==void 0?t:[];if(((r=this.Dl)===null||r===void 0?void 0:r.Ml)===i)return this.Dl.xl;const n=i.map((o=>new Ti(o)));return this.Dl={Ml:i,xl:n},n}Il(A,e){var t,r,i;return(i=(r=(t=this.Vl).autoscaleInfo)===null||r===void 0?void 0:r.call(t,A,e))!==null&&i!==void 0?i:null}wr(A,e){var t,r,i;return(i=(r=(t=this.Vl).hitTest)===null||r===void 0?void 0:r.call(t,A,e))!==null&&i!==void 0?i:null}}function Mi(s,A,e,t){s.forEach((r=>{A(r).forEach((i=>{i.Sl()===e&&t.push(i)}))}))}function Di(s){return s.Pn()}function ed(s){return s.Bl()}function td(s){return s.Al()}class ki extends Xf{constructor(A,e,t,r,i){super(A),this.zt=new Zf,this.jh=new Pf(this),this.zl=[],this.Ll=new If(this),this.El=null,this.Nl=null,this.Fl=[],this.Wl=[],this.jl=null,this.Hl=[],this.cn=e,this.$l=t;const n=new Gf(this);this.rn=[n],this.Hh=new fa(n,this,A),t!=="Area"&&t!=="Line"&&t!=="Baseline"||(this.El=new Df(this)),this.Ul(),this.ql(i)}S(){this.jl!==null&&clearTimeout(this.jl)}mh(A){return this.cn.priceLineColor||A}Zr(A){const e={Xr:!0},t=this.Dt();if(this.$t().St().Ni()||t.Ni()||this.zt.Ni())return e;const r=this.$t().St().Xs(),i=this.Ct();if(r===null||i===null)return e;let n,o;if(A){const u=this.zt.sl();if(u===null)return e;n=u,o=u.ee}else{const u=this.zt.ll(r.ui(),-1);if(u===null||(n=this.zt.Gh(u.ee),n===null))return e;o=u.ee}const a=n.Vt[3],l=this.Us().$s(o,{Vt:n}),c=t.Rt(a,i.Vt);return{Xr:!1,_t:a,Kt:t.Fi(a,i.Vt),xh:t.Yl(a),Sh:t.Zl(a,i.Vt),V:l.ce,ki:c,ee:o}}Us(){return this.Nl!==null||(this.Nl=new Jf(this)),this.Nl}W(){return this.cn}$h(A){const e=A.priceScaleId;e!==void 0&&e!==this.cn.priceScaleId&&this.$t().Xl(this,e),Ee(this.cn,A),A.priceFormat!==void 0&&(this.Ul(),this.$t().Kl()),this.$t().Gl(this),this.$t().Jl(),this.wn.bt("options")}J(A,e){this.zt.J(A),this.Ql(),this.wn.bt("data"),this.dn.bt("data"),this.El!==null&&(e&&e.ta?this.El.$r():A.length===0&&this.El.Hr());const t=this.$t().dr(this);this.$t().ia(t),this.$t().Gl(this),this.$t().Jl(),this.$t().Uh()}na(A){this.Fl=A,this.Ql();const e=this.$t().dr(this);this.dn.bt("data"),this.$t().ia(e),this.$t().Gl(this),this.$t().Jl(),this.$t().Uh()}sa(){return this.Fl}dh(){return this.Wl}ea(A){const e=new Wf(this,A);return this.zl.push(e),this.$t().Gl(this),e}ra(A){const e=this.zl.indexOf(A);e!==-1&&this.zl.splice(e,1),this.$t().Gl(this)}Qh(){return this.$l}Ct(){const A=this.ha();return A===null?null:{Vt:A.Vt[3],la:A.ot}}ha(){const A=this.$t().St().Xs();if(A===null)return null;const e=A.Os();return this.zt.ll(e,1)}In(){return this.zt}ph(A){const e=this.zt.Gh(A);return e===null?null:this.$l==="Bar"||this.$l==="Candlestick"||this.$l==="Custom"?{ge:e.Vt[0],Me:e.Vt[1],xe:e.Vt[2],Se:e.Vt[3]}:e.Vt[3]}aa(A){const e=[];Mi(this.Hl,Di,"top",e);const t=this.El;return t!==null&&t.yt()&&(this.jl===null&&t.qr()&&(this.jl=setTimeout((()=>{this.jl=null,this.$t().oa()}),0)),t.Ur(),e.unshift(t)),e}Pn(){const A=[];this._a()||A.push(this.Ll),A.push(this.wn,this.jh,this.dn);const e=this.zl.map((t=>t.qh()));return A.push(...e),Mi(this.Hl,Di,"normal",A),A}ua(){return this.ca(Di,"bottom")}da(A){return this.ca(ed,A)}fa(A){return this.ca(td,A)}va(A,e){return this.Hl.map((t=>t.wr(A,e))).filter((t=>t!==null))}Ji(A){return[this.Hh,...this.zl.map((e=>e.Yh()))]}Rn(A,e){if(e!==this.Yi&&!this._a())return[];const t=[...this.rn];for(const r of this.zl)t.push(r.Zh());return this.Hl.forEach((r=>{t.push(...r.Rn())})),t}Qi(){const A=[];return this.Hl.forEach((e=>{A.push(...e.Qi())})),A}Il(A,e){if(this.cn.autoscaleInfoProvider!==void 0){const t=this.cn.autoscaleInfoProvider((()=>{const r=this.pa(A,e);return r===null?null:r.Bh()}));return Zs.Ah(t)}return this.pa(A,e)}ma(){return this.cn.priceFormat.minMove}ba(){return this.wa}Vn(){var A;this.wn.bt(),this.dn.bt();for(const e of this.rn)e.bt();for(const e of this.zl)e.bt();this.jh.bt(),this.Ll.bt(),(A=this.El)===null||A===void 0||A.bt(),this.Hl.forEach((e=>e.Vn()))}Dt(){return L(super.Dt())}kt(A){if(!((this.$l==="Line"||this.$l==="Area"||this.$l==="Baseline")&&this.cn.crosshairMarkerVisible))return null;const e=this.zt.Gh(A);return e===null?null:{_t:e.Vt[3],ht:this.ga(),Ot:this.Ma(),Pt:this.xa(),Tt:this.Sa(A)}}bh(){return this.cn.title}yt(){return this.cn.visible}ka(A){this.Hl.push(new Ad(A,this))}ya(A){this.Hl=this.Hl.filter((e=>e.Ol()!==A))}Ca(){if(this.wn instanceof Li)return A=>this.wn.We(A)}Ta(){if(this.wn instanceof Li)return A=>this.wn.je(A)}_a(){return!Ws(this.Dt().Pa())}pa(A,e){if(!As(A)||!As(e)||this.zt.Ni())return null;const t=this.$l==="Line"||this.$l==="Area"||this.$l==="Baseline"||this.$l==="Histogram"?[3]:[2,1],r=this.zt.ol(A,e,t);let i=r!==null?new ce(r.ml,r.bl):null;if(this.Qh()==="Histogram"){const o=this.cn.base,a=new ce(o,o);i=i!==null?i.ts(a):a}let n=this.dn.uh();return this.Hl.forEach((o=>{const a=o.Il(A,e);if(a?.priceRange){const g=new ce(a.priceRange.minValue,a.priceRange.maxValue);i=i!==null?i.ts(g):g}var l,c,u,d;a?.margins&&(l=n,c=a.margins,n={above:Math.max((u=l?.above)!==null&&u!==void 0?u:0,c.above),below:Math.max((d=l?.below)!==null&&d!==void 0?d:0,c.below)})})),new Zs(i,n)}ga(){switch(this.$l){case"Line":case"Area":case"Baseline":return this.cn.crosshairMarkerRadius}return 0}Ma(){switch(this.$l){case"Line":case"Area":case"Baseline":{const A=this.cn.crosshairMarkerBorderColor;if(A.length!==0)return A}}return null}xa(){switch(this.$l){case"Line":case"Area":case"Baseline":return this.cn.crosshairMarkerBorderWidth}return 0}Sa(A){switch(this.$l){case"Line":case"Area":case"Baseline":{const e=this.cn.crosshairMarkerBackgroundColor;if(e.length!==0)return e}}return this.Us().$s(A).ce}Ul(){switch(this.cn.priceFormat.type){case"custom":this.wa={format:this.cn.priceFormat.formatter};break;case"volume":this.wa=new lf(this.cn.priceFormat.precision);break;case"percent":this.wa=new ea(this.cn.priceFormat.precision);break;default:{const A=Math.pow(10,this.cn.priceFormat.precision);this.wa=new Xs(A,this.cn.priceFormat.minMove*A)}}this.Yi!==null&&this.Yi.Ra()}Ql(){const A=this.$t().St();if(!A.Da()||this.zt.Ni())return void(this.Wl=[]);const e=L(this.zt.el());this.Wl=this.Fl.map(((t,r)=>{const i=L(A.Va(t.time,!0)),n=i<e?1:-1;return{time:L(this.zt.ll(i,n)).ee,position:t.position,shape:t.shape,color:t.color,id:t.id,th:r,text:t.text,size:t.size,originalTime:t.originalTime}}))}ql(A){switch(this.dn=new Vf(this,this.$t()),this.$l){case"Bar":this.wn=new wf(this,this.$t());break;case"Candlestick":this.wn=new Qf(this,this.$t());break;case"Line":this.wn=new xf(this,this.$t());break;case"Custom":this.wn=new Li(this,this.$t(),ne(A));break;case"Area":this.wn=new gf(this,this.$t());break;case"Baseline":this.wn=new vf(this,this.$t());break;case"Histogram":this.wn=new Ef(this,this.$t());break;default:throw Error("Unknown chart style assigned: "+this.$l)}}ca(A,e){const t=[];return Mi(this.Hl,A,e,t),t}}class sd{constructor(A){this.cn=A}Oa(A,e,t){let r=A;if(this.cn.mode===0)return r;const i=t.vn(),n=i.Ct();if(n===null)return r;const o=i.Rt(A,n),a=t.Ba().filter((c=>c instanceof ki)).reduce(((c,u)=>{if(t.vr(u)||!u.yt())return c;const d=u.Dt(),g=u.In();if(d.Ni()||!g.Kr(e))return c;const B=g.Gh(e);if(B===null)return c;const f=Ht(u.Ct());return c.concat([d.Rt(B.Vt[3],f.Vt)])}),[]);if(a.length===0)return r;a.sort(((c,u)=>Math.abs(c-o)-Math.abs(u-o)));const l=a[0];return r=i.pn(l,n),r}}class rd extends xe{constructor(){super(...arguments),this.zt=null}J(A){this.zt=A}K({context:A,bitmapSize:e,horizontalPixelRatio:t,verticalPixelRatio:r}){if(this.zt===null)return;const i=Math.max(1,Math.floor(t));A.lineWidth=i,(function(n,o){n.save(),n.lineWidth%2&&n.translate(.5,.5),o(),n.restore()})(A,(()=>{const n=L(this.zt);if(n.Aa){A.strokeStyle=n.Ia,dt(A,n.za),A.beginPath();for(const o of n.La){const a=Math.round(o.Ea*t);A.moveTo(a,-i),A.lineTo(a,e.height+i)}A.stroke()}if(n.Na){A.strokeStyle=n.Fa,dt(A,n.Wa),A.beginPath();for(const o of n.ja){const a=Math.round(o.Ea*r);A.moveTo(-i,a),A.lineTo(e.width+i,a)}A.stroke()}}))}}class id{constructor(A){this.Wt=new rd,this.ft=!0,this.tn=A}bt(){this.ft=!0}gt(){if(this.ft){const A=this.tn.$t().W().grid,e={Na:A.horzLines.visible,Aa:A.vertLines.visible,Fa:A.horzLines.color,Ia:A.vertLines.color,Wa:A.horzLines.style,za:A.vertLines.style,ja:this.tn.vn().Ha(),La:(this.tn.$t().St().Ha()||[]).map((t=>({Ea:t.coord})))};this.Wt.J(e),this.ft=!1}return this.Wt}}class nd{constructor(A){this.wn=new id(A)}qh(){return this.wn}}const _i={$a:4,Ua:1e-4};function It(s,A){const e=100*(s-A)/A;return A<0?-e:e}function od(s,A){const e=It(s.Ph(),A),t=It(s.Rh(),A);return new ce(e,t)}function os(s,A){const e=100*(s-A)/A+100;return A<0?-e:e}function ad(s,A){const e=os(s.Ph(),A),t=os(s.Rh(),A);return new ce(e,t)}function qs(s,A){const e=Math.abs(s);if(e<1e-15)return 0;const t=Math.log10(e+A.Ua)+A.$a;return s<0?-t:t}function as(s,A){const e=Math.abs(s);if(e<1e-15)return 0;const t=Math.pow(10,e-A.$a)-A.Ua;return s<0?-t:t}function ls(s,A){if(s===null)return null;const e=qs(s.Ph(),A),t=qs(s.Rh(),A);return new ce(e,t)}function js(s,A){if(s===null)return null;const e=as(s.Ph(),A),t=as(s.Rh(),A);return new ce(e,t)}function Oi(s){if(s===null)return _i;const A=Math.abs(s.Rh()-s.Ph());if(A>=1||A<1e-15)return _i;const e=Math.ceil(Math.abs(Math.log10(A))),t=_i.$a+e;return{$a:t,Ua:1/Math.pow(10,t)}}class Ni{constructor(A,e){if(this.qa=A,this.Ya=e,(function(t){if(t<0)return!1;for(let r=t;r>1;r/=10)if(r%10!=0)return!1;return!0})(this.qa))this.Za=[2,2.5,2];else{this.Za=[];for(let t=this.qa;t!==1;){if(t%2==0)this.Za.push(2),t/=2;else{if(t%5!=0)throw new Error("unexpected base");this.Za.push(2,2.5),t/=5}if(this.Za.length>100)throw new Error("something wrong with base")}}}Xa(A,e,t){const r=this.qa===0?0:1/this.qa;let i=Math.pow(10,Math.max(0,Math.ceil(Math.log10(A-e)))),n=0,o=this.Ya[0];for(;;){const u=$s(i,r,1e-14)&&i>r+1e-14,d=$s(i,t*o,1e-14),g=$s(i,1,1e-14);if(!(u&&d&&g))break;i/=o,o=this.Ya[++n%this.Ya.length]}if(i<=r+1e-14&&(i=r),i=Math.max(1,i),this.Za.length>0&&(a=i,l=1,c=1e-14,Math.abs(a-l)<c))for(n=0,o=this.Za[0];$s(i,t*o,1e-14)&&i>r+1e-14;)i/=o,o=this.Za[++n%this.Za.length];var a,l,c;return i}}class ya{constructor(A,e,t,r){this.Ka=[],this.Li=A,this.qa=e,this.Ga=t,this.Ja=r}Xa(A,e){if(A<e)throw new Error("high < low");const t=this.Li.At(),r=(A-e)*this.Qa()/t,i=new Ni(this.qa,[2,2.5,2]),n=new Ni(this.qa,[2,2,2.5]),o=new Ni(this.qa,[2.5,2,2]),a=[];return a.push(i.Xa(A,e,r),n.Xa(A,e,r),o.Xa(A,e,r)),(function(l){if(l.length<1)throw Error("array is empty");let c=l[0];for(let u=1;u<l.length;++u)l[u]<c&&(c=l[u]);return c})(a)}io(){const A=this.Li,e=A.Ct();if(e===null)return void(this.Ka=[]);const t=A.At(),r=this.Ga(t-1,e),i=this.Ga(0,e),n=this.Li.W().entireTextOnly?this.no()/2:0,o=n,a=t-1-n,l=Math.max(r,i),c=Math.min(r,i);if(l===c)return void(this.Ka=[]);let u=this.Xa(l,c),d=l%u;d+=d<0?u:0;const g=l>=c?1:-1;let B=null,f=0;for(let p=l-d;p>c;p-=u){const m=this.Ja(p,e,!0);B!==null&&Math.abs(m-B)<this.Qa()||m<o||m>a||(f<this.Ka.length?(this.Ka[f].Ea=m,this.Ka[f].so=A.eo(p)):this.Ka.push({Ea:m,so:A.eo(p)}),f++,B=m,A.ro()&&(u=this.Xa(p*g,c)))}this.Ka.length=f}Ha(){return this.Ka}no(){return this.Li.P()}Qa(){return Math.ceil(2.5*this.no())}}function Ua(s){return s.slice().sort(((A,e)=>L(A.Xi())-L(e.Xi())))}var Fa;(function(s){s[s.Normal=0]="Normal",s[s.Logarithmic=1]="Logarithmic",s[s.Percentage=2]="Percentage",s[s.IndexedTo100=3]="IndexedTo100"})(Fa||(Fa={}));const Ea=new ea,xa=new Xs(100,1);class ld{constructor(A,e,t,r){this.ho=0,this.lo=null,this.Ih=null,this.ao=null,this.oo={_o:!1,uo:null},this.co=0,this.do=0,this.fo=new KA,this.vo=new KA,this.po=[],this.mo=null,this.bo=null,this.wo=null,this.Mo=null,this.wa=xa,this.xo=Oi(null),this.So=A,this.cn=e,this.ko=t,this.yo=r,this.Co=new ya(this,100,this.To.bind(this),this.Po.bind(this))}Pa(){return this.So}W(){return this.cn}$h(A){if(Ee(this.cn,A),this.Ra(),A.mode!==void 0&&this.Ro({Cr:A.mode}),A.scaleMargins!==void 0){const e=ne(A.scaleMargins.top),t=ne(A.scaleMargins.bottom);if(e<0||e>1)throw new Error(`Invalid top margin - expect value between 0 and 1, given=${e}`);if(t<0||t>1)throw new Error(`Invalid bottom margin - expect value between 0 and 1, given=${t}`);if(e+t>1)throw new Error(`Invalid margins - sum of margins must be less than 1, given=${e+t}`);this.Do(),this.bo=null}}Vo(){return this.cn.autoScale}ro(){return this.cn.mode===1}Mh(){return this.cn.mode===2}Oo(){return this.cn.mode===3}Cr(){return{Wn:this.cn.autoScale,Bo:this.cn.invertScale,Cr:this.cn.mode}}Ro(A){const e=this.Cr();let t=null;A.Wn!==void 0&&(this.cn.autoScale=A.Wn),A.Cr!==void 0&&(this.cn.mode=A.Cr,A.Cr!==2&&A.Cr!==3||(this.cn.autoScale=!0),this.oo._o=!1),e.Cr===1&&A.Cr!==e.Cr&&((function(i,n){if(i===null)return!1;const o=as(i.Ph(),n),a=as(i.Rh(),n);return isFinite(o)&&isFinite(a)})(this.Ih,this.xo)?(t=js(this.Ih,this.xo),t!==null&&this.Ao(t)):this.cn.autoScale=!0),A.Cr===1&&A.Cr!==e.Cr&&(t=ls(this.Ih,this.xo),t!==null&&this.Ao(t));const r=e.Cr!==this.cn.mode;r&&(e.Cr===2||this.Mh())&&this.Ra(),r&&(e.Cr===3||this.Oo())&&this.Ra(),A.Bo!==void 0&&e.Bo!==A.Bo&&(this.cn.invertScale=A.Bo,this.Io()),this.vo.m(e,this.Cr())}zo(){return this.vo}P(){return this.ko.fontSize}At(){return this.ho}Lo(A){this.ho!==A&&(this.ho=A,this.Do(),this.bo=null)}Eo(){if(this.lo)return this.lo;const A=this.At()-this.No()-this.Fo();return this.lo=A,A}Lh(){return this.Wo(),this.Ih}Ao(A,e){const t=this.Ih;(e||t===null&&A!==null||t!==null&&!t.Ch(A))&&(this.bo=null,this.Ih=A)}Ni(){return this.Wo(),this.ho===0||!this.Ih||this.Ih.Ni()}jo(A){return this.Bo()?A:this.At()-1-A}Rt(A,e){return this.Mh()?A=It(A,e):this.Oo()&&(A=os(A,e)),this.Po(A,e)}te(A,e,t){this.Wo();const r=this.Fo(),i=L(this.Lh()),n=i.Ph(),o=i.Rh(),a=this.Eo()-1,l=this.Bo(),c=a/(o-n),u=t===void 0?0:t.from,d=t===void 0?A.length:t.to,g=this.Ho();for(let B=u;B<d;B++){const f=A[B],p=f._t;if(isNaN(p))continue;let m=p;g!==null&&(m=g(f._t,e));const w=r+c*(m-n),v=l?w:this.ho-1-w;f.st=v}}be(A,e,t){this.Wo();const r=this.Fo(),i=L(this.Lh()),n=i.Ph(),o=i.Rh(),a=this.Eo()-1,l=this.Bo(),c=a/(o-n),u=t===void 0?0:t.from,d=t===void 0?A.length:t.to,g=this.Ho();for(let B=u;B<d;B++){const f=A[B];let p=f.ge,m=f.Me,w=f.xe,v=f.Se;g!==null&&(p=g(f.ge,e),m=g(f.Me,e),w=g(f.xe,e),v=g(f.Se,e));let y=r+c*(p-n),E=l?y:this.ho-1-y;f.pe=E,y=r+c*(m-n),E=l?y:this.ho-1-y,f.de=E,y=r+c*(w-n),E=l?y:this.ho-1-y,f.fe=E,y=r+c*(v-n),E=l?y:this.ho-1-y,f.me=E}}pn(A,e){const t=this.To(A,e);return this.$o(t,e)}$o(A,e){let t=A;return this.Mh()?t=(function(r,i){return i<0&&(r=-r),r/100*i+i})(t,e):this.Oo()&&(t=(function(r,i){return r-=100,i<0&&(r=-r),r/100*i+i})(t,e)),t}Ba(){return this.po}Uo(){if(this.mo)return this.mo;let A=[];for(let e=0;e<this.po.length;e++){const t=this.po[e];t.Xi()===null&&t.Ki(e+1),A.push(t)}return A=Ua(A),this.mo=A,this.mo}qo(A){this.po.indexOf(A)===-1&&(this.po.push(A),this.Ra(),this.Yo())}Zo(A){const e=this.po.indexOf(A);if(e===-1)throw new Error("source is not attached to scale");this.po.splice(e,1),this.po.length===0&&(this.Ro({Wn:!0}),this.Ao(null)),this.Ra(),this.Yo()}Ct(){let A=null;for(const e of this.po){const t=e.Ct();t!==null&&(A===null||t.la<A.la)&&(A=t)}return A===null?null:A.Vt}Bo(){return this.cn.invertScale}Ha(){const A=this.Ct()===null;if(this.bo!==null&&(A||this.bo.Xo===A))return this.bo.Ha;this.Co.io();const e=this.Co.Ha();return this.bo={Ha:e,Xo:A},this.fo.m(),e}Ko(){return this.fo}Go(A){this.Mh()||this.Oo()||this.wo===null&&this.ao===null&&(this.Ni()||(this.wo=this.ho-A,this.ao=L(this.Lh()).Th()))}Jo(A){if(this.Mh()||this.Oo()||this.wo===null)return;this.Ro({Wn:!1}),(A=this.ho-A)<0&&(A=0);let e=(this.wo+.2*(this.ho-1))/(A+.2*(this.ho-1));const t=L(this.ao).Th();e=Math.max(e,.1),t.Vh(e),this.Ao(t)}Qo(){this.Mh()||this.Oo()||(this.wo=null,this.ao=null)}t_(A){this.Vo()||this.Mo===null&&this.ao===null&&(this.Ni()||(this.Mo=A,this.ao=L(this.Lh()).Th()))}i_(A){if(this.Vo()||this.Mo===null)return;const e=L(this.Lh()).Dh()/(this.Eo()-1);let t=A-this.Mo;this.Bo()&&(t*=-1);const r=t*e,i=L(this.ao).Th();i.Oh(r),this.Ao(i,!0),this.bo=null}n_(){this.Vo()||this.Mo!==null&&(this.Mo=null,this.ao=null)}ba(){return this.wa||this.Ra(),this.wa}Fi(A,e){switch(this.cn.mode){case 2:return this.s_(It(A,e));case 3:return this.ba().format(os(A,e));default:return this.Wh(A)}}eo(A){switch(this.cn.mode){case 2:return this.s_(A);case 3:return this.ba().format(A);default:return this.Wh(A)}}Yl(A){return this.Wh(A,L(this.e_()).ba())}Zl(A,e){return A=It(A,e),this.s_(A,Ea)}r_(){return this.po}h_(A){this.oo={uo:A,_o:!1}}Vn(){this.po.forEach((A=>A.Vn()))}Ra(){this.bo=null;const A=this.e_();let e=100;A!==null&&(e=Math.round(1/A.ma())),this.wa=xa,this.Mh()?(this.wa=Ea,e=100):this.Oo()?(this.wa=new Xs(100,1),e=100):A!==null&&(this.wa=A.ba()),this.Co=new ya(this,e,this.To.bind(this),this.Po.bind(this)),this.Co.io()}Yo(){this.mo=null}e_(){return this.po[0]||null}No(){return this.Bo()?this.cn.scaleMargins.bottom*this.At()+this.do:this.cn.scaleMargins.top*this.At()+this.co}Fo(){return this.Bo()?this.cn.scaleMargins.top*this.At()+this.co:this.cn.scaleMargins.bottom*this.At()+this.do}Wo(){this.oo._o||(this.oo._o=!0,this.l_())}Do(){this.lo=null}Po(A,e){if(this.Wo(),this.Ni())return 0;A=this.ro()&&A?qs(A,this.xo):A;const t=L(this.Lh()),r=this.Fo()+(this.Eo()-1)*(A-t.Ph())/t.Dh();return this.jo(r)}To(A,e){if(this.Wo(),this.Ni())return 0;const t=this.jo(A),r=L(this.Lh()),i=r.Ph()+r.Dh()*((t-this.Fo())/(this.Eo()-1));return this.ro()?as(i,this.xo):i}Io(){this.bo=null,this.Co.io()}l_(){const A=this.oo.uo;if(A===null)return;let e=null;const t=this.r_();let r=0,i=0;for(const a of t){if(!a.yt())continue;const l=a.Ct();if(l===null)continue;const c=a.Il(A.Os(),A.ui());let u=c&&c.Lh();if(u!==null){switch(this.cn.mode){case 1:u=ls(u,this.xo);break;case 2:u=od(u,l.Vt);break;case 3:u=ad(u,l.Vt)}if(e=e===null?u:e.ts(L(u)),c!==null){const d=c.Eh();d!==null&&(r=Math.max(r,d.above),i=Math.max(i,d.below))}}}if(r===this.co&&i===this.do||(this.co=r,this.do=i,this.bo=null,this.Do()),e!==null){if(e.Ph()===e.Rh()){const a=this.e_(),l=5*(a===null||this.Mh()||this.Oo()?1:a.ma());this.ro()&&(e=js(e,this.xo)),e=new ce(e.Ph()-l,e.Rh()+l),this.ro()&&(e=ls(e,this.xo))}if(this.ro()){const a=js(e,this.xo),l=Oi(a);if(n=l,o=this.xo,n.$a!==o.$a||n.Ua!==o.Ua){const c=this.ao!==null?js(this.ao,this.xo):null;this.xo=l,e=ls(a,l),c!==null&&(this.ao=ls(c,l))}}this.Ao(e)}else this.Ih===null&&(this.Ao(new ce(-.5,.5)),this.xo=Oi(null));var n,o;this.oo._o=!0}Ho(){return this.Mh()?It:this.Oo()?os:this.ro()?A=>qs(A,this.xo):null}a_(A,e,t){return e===void 0?(t===void 0&&(t=this.ba()),t.format(A)):e(A)}Wh(A,e){return this.a_(A,this.yo.priceFormatter,e)}s_(A,e){return this.a_(A,this.yo.percentageFormatter,e)}}class cd{constructor(A,e){this.po=[],this.o_=new Map,this.ho=0,this.__=0,this.u_=1e3,this.mo=null,this.c_=new KA,this.yl=A,this.$i=e,this.d_=new nd(this);const t=e.W();this.f_=this.v_("left",t.leftPriceScale),this.p_=this.v_("right",t.rightPriceScale),this.f_.zo().l(this.m_.bind(this,this.f_),this),this.p_.zo().l(this.m_.bind(this,this.p_),this),this.b_(t)}b_(A){if(A.leftPriceScale&&this.f_.$h(A.leftPriceScale),A.rightPriceScale&&this.p_.$h(A.rightPriceScale),A.localization&&(this.f_.Ra(),this.p_.Ra()),A.overlayPriceScales){const e=Array.from(this.o_.values());for(const t of e){const r=L(t[0].Dt());r.$h(A.overlayPriceScales),A.localization&&r.Ra()}}}w_(A){switch(A){case"left":return this.f_;case"right":return this.p_}return this.o_.has(A)?ne(this.o_.get(A))[0].Dt():null}S(){this.$t().g_().p(this),this.f_.zo().p(this),this.p_.zo().p(this),this.po.forEach((A=>{A.S&&A.S()})),this.c_.m()}M_(){return this.u_}x_(A){this.u_=A}$t(){return this.$i}Hi(){return this.__}At(){return this.ho}S_(A){this.__=A,this.k_()}Lo(A){this.ho=A,this.f_.Lo(A),this.p_.Lo(A),this.po.forEach((e=>{if(this.vr(e)){const t=e.Dt();t!==null&&t.Lo(A)}})),this.k_()}Ba(){return this.po}vr(A){const e=A.Dt();return e===null||this.f_!==e&&this.p_!==e}qo(A,e,t){const r=t!==void 0?t:this.C_().y_+1;this.T_(A,e,r)}Zo(A){const e=this.po.indexOf(A);je(e!==-1,"removeDataSource: invalid data source"),this.po.splice(e,1);const t=L(A.Dt()).Pa();if(this.o_.has(t)){const i=ne(this.o_.get(t)),n=i.indexOf(A);n!==-1&&(i.splice(n,1),i.length===0&&this.o_.delete(t))}const r=A.Dt();r&&r.Ba().indexOf(A)>=0&&r.Zo(A),r!==null&&(r.Yo(),this.P_(r)),this.mo=null}mr(A){return A===this.f_?"left":A===this.p_?"right":"overlay"}R_(){return this.f_}D_(){return this.p_}V_(A,e){A.Go(e)}O_(A,e){A.Jo(e),this.k_()}B_(A){A.Qo()}A_(A,e){A.t_(e)}I_(A,e){A.i_(e),this.k_()}z_(A){A.n_()}k_(){this.po.forEach((A=>{A.Vn()}))}vn(){let A=null;return this.$i.W().rightPriceScale.visible&&this.p_.Ba().length!==0?A=this.p_:this.$i.W().leftPriceScale.visible&&this.f_.Ba().length!==0?A=this.f_:this.po.length!==0&&(A=this.po[0].Dt()),A===null&&(A=this.p_),A}pr(){let A=null;return this.$i.W().rightPriceScale.visible?A=this.p_:this.$i.W().leftPriceScale.visible&&(A=this.f_),A}P_(A){A!==null&&A.Vo()&&this.L_(A)}E_(A){const e=this.yl.Xs();A.Ro({Wn:!0}),e!==null&&A.h_(e),this.k_()}N_(){this.L_(this.f_),this.L_(this.p_)}F_(){this.P_(this.f_),this.P_(this.p_),this.po.forEach((A=>{this.vr(A)&&this.P_(A.Dt())})),this.k_(),this.$i.Uh()}Uo(){return this.mo===null&&(this.mo=Ua(this.po)),this.mo}W_(){return this.c_}j_(){return this.d_}L_(A){const e=A.r_();if(e&&e.length>0&&!this.yl.Ni()){const t=this.yl.Xs();t!==null&&A.h_(t)}A.Vn()}C_(){const A=this.Uo();if(A.length===0)return{H_:0,y_:0};let e=0,t=0;for(let r=0;r<A.length;r++){const i=A[r].Xi();i!==null&&(i<e&&(e=i),i>t&&(t=i))}return{H_:e,y_:t}}T_(A,e,t){let r=this.w_(e);if(r===null&&(r=this.v_(e,this.$i.W().overlayPriceScales)),this.po.push(A),!Ws(e)){const i=this.o_.get(e)||[];i.push(A),this.o_.set(e,i)}r.qo(A),A.Gi(r),A.Ki(t),this.P_(r),this.mo=null}m_(A,e,t){e.Cr!==t.Cr&&this.L_(A)}v_(A,e){const t=Object.assign({visible:!0,autoScale:!0},Xe(e)),r=new ld(A,t,this.$i.W().layout,this.$i.W().localization);return r.Lo(this.At()),r}}class hd{constructor(A,e,t=50){this.Ke=0,this.Ge=1,this.Je=1,this.tr=new Map,this.Qe=new Map,this.U_=A,this.q_=e,this.ir=t}Y_(A){const e=A.time,t=this.q_.cacheKey(e),r=this.tr.get(t);if(r!==void 0)return r.Z_;if(this.Ke===this.ir){const n=this.Qe.get(this.Je);this.Qe.delete(this.Je),this.tr.delete(ne(n)),this.Je++,this.Ke--}const i=this.U_(A);return this.tr.set(t,{Z_:i,rr:this.Ge}),this.Qe.set(this.Ge,t),this.Ke++,this.Ge++,i}}class cs{constructor(A,e){je(A<=e,"right should be >= left"),this.X_=A,this.K_=e}Os(){return this.X_}ui(){return this.K_}G_(){return this.K_-this.X_+1}Kr(A){return this.X_<=A&&A<=this.K_}Ch(A){return this.X_===A.Os()&&this.K_===A.ui()}}function Sa(s,A){return s===null||A===null?s===A:s.Ch(A)}class ud{constructor(){this.J_=new Map,this.tr=null,this.Q_=!1}tu(A){this.Q_=A,this.tr=null}iu(A,e){this.nu(e),this.tr=null;for(let t=e;t<A.length;++t){const r=A[t];let i=this.J_.get(r.timeWeight);i===void 0&&(i=[],this.J_.set(r.timeWeight,i)),i.push({index:t,time:r.time,weight:r.timeWeight,originalTime:r.originalTime})}}su(A,e){const t=Math.ceil(e/A);return this.tr!==null&&this.tr.eu===t||(this.tr={Ha:this.ru(t),eu:t}),this.tr.Ha}nu(A){if(A===0)return void this.J_.clear();const e=[];this.J_.forEach(((t,r)=>{A<=t[0].index?e.push(r):t.splice(ss(t,A,(i=>i.index<A)),1/0)}));for(const t of e)this.J_.delete(t)}ru(A){let e=[];for(const t of Array.from(this.J_.keys()).sort(((r,i)=>i-r))){if(!this.J_.get(t))continue;const r=e;e=[];const i=r.length;let n=0;const o=ne(this.J_.get(t)),a=o.length;let l=1/0,c=-1/0;for(let u=0;u<a;u++){const d=o[u],g=d.index;for(;n<i;){const B=r[n],f=B.index;if(!(f<g)){l=f;break}n++,e.push(B),c=f,l=1/0}if(l-g>=A&&g-c>=A)e.push(d),c=g;else if(this.Q_)return r}for(;n<i;n++)e.push(r[n])}return e}}class Tt{constructor(A){this.hu=A}lu(){return this.hu===null?null:new cs(Math.floor(this.hu.Os()),Math.ceil(this.hu.ui()))}au(){return this.hu}static ou(){return new Tt(null)}}function fd(s,A){return s.weight>A.weight?s:A}class dd{constructor(A,e,t,r){this.__=0,this._u=null,this.uu=[],this.Mo=null,this.wo=null,this.cu=new ud,this.du=new Map,this.fu=Tt.ou(),this.vu=!0,this.pu=new KA,this.mu=new KA,this.bu=new KA,this.wu=null,this.gu=null,this.Mu=[],this.cn=e,this.yo=t,this.xu=e.rightOffset,this.Su=e.barSpacing,this.$i=A,this.q_=r,this.ku(),this.cu.tu(e.uniformDistribution)}W(){return this.cn}yu(A){Ee(this.yo,A),this.Cu(),this.ku()}$h(A,e){var t;Ee(this.cn,A),this.cn.fixLeftEdge&&this.Tu(),this.cn.fixRightEdge&&this.Pu(),A.barSpacing!==void 0&&this.$i.Gn(A.barSpacing),A.rightOffset!==void 0&&this.$i.Jn(A.rightOffset),A.minBarSpacing!==void 0&&this.$i.Gn((t=A.barSpacing)!==null&&t!==void 0?t:this.Su),this.Cu(),this.ku(),this.bu.m()}mn(A){var e,t;return(t=(e=this.uu[A])===null||e===void 0?void 0:e.time)!==null&&t!==void 0?t:null}Ui(A){var e;return(e=this.uu[A])!==null&&e!==void 0?e:null}Va(A,e){if(this.uu.length<1)return null;if(this.q_.key(A)>this.q_.key(this.uu[this.uu.length-1].time))return e?this.uu.length-1:null;const t=ss(this.uu,this.q_.key(A),((r,i)=>this.q_.key(r.time)<i));return this.q_.key(A)<this.q_.key(this.uu[t].time)?e?t:null:t}Ni(){return this.__===0||this.uu.length===0||this._u===null}Da(){return this.uu.length>0}Xs(){return this.Ru(),this.fu.lu()}Du(){return this.Ru(),this.fu.au()}Vu(){const A=this.Xs();if(A===null)return null;const e={from:A.Os(),to:A.ui()};return this.Ou(e)}Ou(A){const e=Math.round(A.from),t=Math.round(A.to),r=L(this.Bu()),i=L(this.Au());return{from:L(this.Ui(Math.max(r,e))),to:L(this.Ui(Math.min(i,t)))}}Iu(A){return{from:L(this.Va(A.from,!0)),to:L(this.Va(A.to,!0))}}Hi(){return this.__}S_(A){if(!isFinite(A)||A<=0||this.__===A)return;const e=this.Du(),t=this.__;if(this.__=A,this.vu=!0,this.cn.lockVisibleTimeRangeOnResize&&t!==0){const r=this.Su*A/t;this.Su=r}if(this.cn.fixLeftEdge&&e!==null&&e.Os()<=0){const r=t-A;this.xu-=Math.round(r/this.Su)+1,this.vu=!0}this.zu(),this.Lu()}It(A){if(this.Ni()||!As(A))return 0;const e=this.Eu()+this.xu-A;return this.__-(e+.5)*this.Su-1}Qs(A,e){const t=this.Eu(),r=e===void 0?0:e.from,i=e===void 0?A.length:e.to;for(let n=r;n<i;n++){const o=A[n].ot,a=t+this.xu-o,l=this.__-(a+.5)*this.Su-1;A[n].nt=l}}Nu(A){return Math.ceil(this.Fu(A))}Jn(A){this.vu=!0,this.xu=A,this.Lu(),this.$i.Wu(),this.$i.Uh()}le(){return this.Su}Gn(A){this.ju(A),this.Lu(),this.$i.Wu(),this.$i.Uh()}Hu(){return this.xu}Ha(){if(this.Ni())return null;if(this.gu!==null)return this.gu;const A=this.Su,e=5*(this.$i.W().layout.fontSize+4)/8*(this.cn.tickMarkMaxCharacterLength||8),t=Math.round(e/A),r=L(this.Xs()),i=Math.max(r.Os(),r.Os()-t),n=Math.max(r.ui(),r.ui()-t),o=this.cu.su(A,e),a=this.Bu()+t,l=this.Au()-t,c=this.$u(),u=this.cn.fixLeftEdge||c,d=this.cn.fixRightEdge||c;let g=0;for(const B of o){if(!(i<=B.index&&B.index<=n))continue;let f;g<this.Mu.length?(f=this.Mu[g],f.coord=this.It(B.index),f.label=this.Uu(B),f.weight=B.weight):(f={needAlignCoordinate:!1,coord:this.It(B.index),label:this.Uu(B),weight:B.weight},this.Mu.push(f)),this.Su>e/2&&!c?f.needAlignCoordinate=!1:f.needAlignCoordinate=u&&B.index<=a||d&&B.index>=l,g++}return this.Mu.length=g,this.gu=this.Mu,this.Mu}qu(){this.vu=!0,this.Gn(this.cn.barSpacing),this.Jn(this.cn.rightOffset)}Yu(A){this.vu=!0,this._u=A,this.Lu(),this.Tu()}Zu(A,e){const t=this.Fu(A),r=this.le(),i=r+e*(r/10);this.Gn(i),this.cn.rightBarStaysOnScroll||this.Jn(this.Hu()+(t-this.Fu(A)))}Go(A){this.Mo&&this.n_(),this.wo===null&&this.wu===null&&(this.Ni()||(this.wo=A,this.Xu()))}Jo(A){if(this.wu===null)return;const e=xi(this.__-A,0,this.__),t=xi(this.__-L(this.wo),0,this.__);e!==0&&t!==0&&this.Gn(this.wu.le*e/t)}Qo(){this.wo!==null&&(this.wo=null,this.Ku())}t_(A){this.Mo===null&&this.wu===null&&(this.Ni()||(this.Mo=A,this.Xu()))}i_(A){if(this.Mo===null)return;const e=(this.Mo-A)/this.le();this.xu=L(this.wu).Hu+e,this.vu=!0,this.Lu()}n_(){this.Mo!==null&&(this.Mo=null,this.Ku())}Gu(){this.Ju(this.cn.rightOffset)}Ju(A,e=400){if(!isFinite(A))throw new RangeError("offset is required and must be finite number");if(!isFinite(e)||e<=0)throw new RangeError("animationDuration (optional) must be finite positive number");const t=this.xu,r=performance.now();this.$i.Zn({Qu:i=>(i-r)/e>=1,tc:i=>{const n=(i-r)/e;return n>=1?A:t+(A-t)*n}})}bt(A,e){this.vu=!0,this.uu=A,this.cu.iu(A,e),this.Lu()}nc(){return this.pu}sc(){return this.mu}ec(){return this.bu}Eu(){return this._u||0}rc(A){const e=A.G_();this.ju(this.__/e),this.xu=A.ui()-this.Eu(),this.Lu(),this.vu=!0,this.$i.Wu(),this.$i.Uh()}hc(){const A=this.Bu(),e=this.Au();A!==null&&e!==null&&this.rc(new cs(A,e+this.cn.rightOffset))}lc(A){const e=new cs(A.from,A.to);this.rc(e)}qi(A){return this.yo.timeFormatter!==void 0?this.yo.timeFormatter(A.originalTime):this.q_.formatHorzItem(A.time)}$u(){const{handleScroll:A,handleScale:e}=this.$i.W();return!(A.horzTouchDrag||A.mouseWheel||A.pressedMouseMove||A.vertTouchDrag||e.axisDoubleClickReset.time||e.axisPressedMouseMove.time||e.mouseWheel||e.pinch)}Bu(){return this.uu.length===0?null:0}Au(){return this.uu.length===0?null:this.uu.length-1}ac(A){return(this.__-1-A)/this.Su}Fu(A){const e=this.ac(A),t=this.Eu()+this.xu-e;return Math.round(1e6*t)/1e6}ju(A){const e=this.Su;this.Su=A,this.zu(),e!==this.Su&&(this.vu=!0,this.oc())}Ru(){if(!this.vu)return;if(this.vu=!1,this.Ni())return void this._c(Tt.ou());const A=this.Eu(),e=this.__/this.Su,t=this.xu+A,r=new cs(t-e+1,t);this._c(new Tt(r))}zu(){const A=this.uc();if(this.Su<A&&(this.Su=A,this.vu=!0),this.__!==0){const e=.5*this.__;this.Su>e&&(this.Su=e,this.vu=!0)}}uc(){return this.cn.fixLeftEdge&&this.cn.fixRightEdge&&this.uu.length!==0?this.__/this.uu.length:this.cn.minBarSpacing}Lu(){const A=this.cc();A!==null&&this.xu<A&&(this.xu=A,this.vu=!0);const e=this.dc();this.xu>e&&(this.xu=e,this.vu=!0)}cc(){const A=this.Bu(),e=this._u;return A===null||e===null?null:A-e-1+(this.cn.fixLeftEdge?this.__/this.Su:Math.min(2,this.uu.length))}dc(){return this.cn.fixRightEdge?0:this.__/this.Su-Math.min(2,this.uu.length)}Xu(){this.wu={le:this.le(),Hu:this.Hu()}}Ku(){this.wu=null}Uu(A){let e=this.du.get(A.weight);return e===void 0&&(e=new hd((t=>this.fc(t)),this.q_),this.du.set(A.weight,e)),e.Y_(A)}fc(A){return this.q_.formatTickmark(A,this.yo)}_c(A){const e=this.fu;this.fu=A,Sa(e.lu(),this.fu.lu())||this.pu.m(),Sa(e.au(),this.fu.au())||this.mu.m(),this.oc()}oc(){this.gu=null}Cu(){this.oc(),this.du.clear()}ku(){this.q_.updateFormatter(this.yo)}Tu(){if(!this.cn.fixLeftEdge)return;const A=this.Bu();if(A===null)return;const e=this.Xs();if(e===null)return;const t=e.Os()-A;if(t<0){const r=this.xu-t-1;this.Jn(r)}this.zu()}Pu(){this.Lu(),this.zu()}}class Bd{X(A,e,t){A.useMediaCoordinateSpace((r=>this.K(r,e,t)))}gl(A,e,t){A.useMediaCoordinateSpace((r=>this.vc(r,e,t)))}vc(A,e,t){}}class gd extends Bd{constructor(A){super(),this.mc=new Map,this.zt=A}K(A){}vc(A){if(!this.zt.yt)return;const{context:e,mediaSize:t}=A;let r=0;for(const n of this.zt.bc){if(n.Kt.length===0)continue;e.font=n.R;const o=this.wc(e,n.Kt);o>t.width?n.Zu=t.width/o:n.Zu=1,r+=n.gc*n.Zu}let i=0;switch(this.zt.Mc){case"top":i=0;break;case"center":i=Math.max((t.height-r)/2,0);break;case"bottom":i=Math.max(t.height-r,0)}e.fillStyle=this.zt.V;for(const n of this.zt.bc){e.save();let o=0;switch(this.zt.xc){case"left":e.textAlign="left",o=n.gc/2;break;case"center":e.textAlign="center",o=t.width/2;break;case"right":e.textAlign="right",o=t.width-1-n.gc/2}e.translate(o,i),e.textBaseline="top",e.font=n.R,e.scale(n.Zu,n.Zu),e.fillText(n.Kt,0,n.Sc),e.restore(),i+=n.gc*n.Zu}}wc(A,e){const t=this.kc(A.font);let r=t.get(e);return r===void 0&&(r=A.measureText(e).width,t.set(e,r)),r}kc(A){let e=this.mc.get(A);return e===void 0&&(e=new Map,this.mc.set(A,e)),e}}class pd{constructor(A){this.ft=!0,this.Ft={yt:!1,V:"",bc:[],Mc:"center",xc:"center"},this.Wt=new gd(this.Ft),this.jt=A}bt(){this.ft=!0}gt(){return this.ft&&(this.Mt(),this.ft=!1),this.Wt}Mt(){const A=this.jt.W(),e=this.Ft;e.yt=A.visible,e.yt&&(e.V=A.color,e.xc=A.horzAlign,e.Mc=A.vertAlign,e.bc=[{Kt:A.text,R:Lt(A.fontSize,A.fontFamily,A.fontStyle),gc:1.2*A.fontSize,Sc:0,Zu:0}])}}class wd extends Fi{constructor(A,e){super(),this.cn=e,this.wn=new pd(this)}Rn(){return[]}Pn(){return[this.wn]}W(){return this.cn}Vn(){this.wn.bt()}}var Ha,La,Ia,Ta,Ma;(function(s){s[s.OnTouchEnd=0]="OnTouchEnd",s[s.OnNextTap=1]="OnNextTap"})(Ha||(Ha={}));class md{constructor(A,e,t){this.yc=[],this.Cc=[],this.__=0,this.Tc=null,this.Pc=new KA,this.Rc=new KA,this.Dc=null,this.Vc=A,this.cn=e,this.q_=t,this.Oc=new Zu(this),this.yl=new dd(this,e.timeScale,this.cn.localization,t),this.vt=new af(this,e.crosshair),this.Bc=new sd(e.crosshair),this.Ac=new wd(this,e.watermark),this.Ic(),this.yc[0].x_(2e3),this.zc=this.Lc(0),this.Ec=this.Lc(1)}Kl(){this.Nc(YA.es())}Uh(){this.Nc(YA.ss())}oa(){this.Nc(new YA(1))}Gl(A){const e=this.Fc(A);this.Nc(e)}Wc(){return this.Tc}jc(A){const e=this.Tc;this.Tc=A,e!==null&&this.Gl(e.Hc),A!==null&&this.Gl(A.Hc)}W(){return this.cn}$h(A){Ee(this.cn,A),this.yc.forEach((e=>e.b_(A))),A.timeScale!==void 0&&this.yl.$h(A.timeScale),A.localization!==void 0&&this.yl.yu(A.localization),(A.leftPriceScale||A.rightPriceScale)&&this.Pc.m(),this.zc=this.Lc(0),this.Ec=this.Lc(1),this.Kl()}$c(A,e){if(A==="left")return void this.$h({leftPriceScale:e});if(A==="right")return void this.$h({rightPriceScale:e});const t=this.Uc(A);t!==null&&(t.Dt.$h(e),this.Pc.m())}Uc(A){for(const e of this.yc){const t=e.w_(A);if(t!==null)return{Ht:e,Dt:t}}return null}St(){return this.yl}qc(){return this.yc}Yc(){return this.Ac}Zc(){return this.vt}Xc(){return this.Rc}Kc(A,e){A.Lo(e),this.Wu()}S_(A){this.__=A,this.yl.S_(this.__),this.yc.forEach((e=>e.S_(A))),this.Wu()}Ic(A){const e=new cd(this.yl,this);A!==void 0?this.yc.splice(A,0,e):this.yc.push(e);const t=A===void 0?this.yc.length-1:A,r=YA.es();return r.Nn(t,{Fn:0,Wn:!0}),this.Nc(r),e}V_(A,e,t){A.V_(e,t)}O_(A,e,t){A.O_(e,t),this.Jl(),this.Nc(this.Gc(A,2))}B_(A,e){A.B_(e),this.Nc(this.Gc(A,2))}A_(A,e,t){e.Vo()||A.A_(e,t)}I_(A,e,t){e.Vo()||(A.I_(e,t),this.Jl(),this.Nc(this.Gc(A,2)))}z_(A,e){e.Vo()||(A.z_(e),this.Nc(this.Gc(A,2)))}E_(A,e){A.E_(e),this.Nc(this.Gc(A,2))}Jc(A){this.yl.Go(A)}Qc(A,e){const t=this.St();if(t.Ni()||e===0)return;const r=t.Hi();A=Math.max(1,Math.min(A,r)),t.Zu(A,e),this.Wu()}td(A){this.nd(0),this.sd(A),this.ed()}rd(A){this.yl.Jo(A),this.Wu()}hd(){this.yl.Qo(),this.Uh()}nd(A){this.yl.t_(A)}sd(A){this.yl.i_(A),this.Wu()}ed(){this.yl.n_(),this.Uh()}wt(){return this.Cc}ld(A,e,t,r,i){this.vt.gn(A,e);let n=NaN,o=this.yl.Nu(A);const a=this.yl.Xs();a!==null&&(o=Math.min(Math.max(a.Os(),o),a.ui()));const l=r.vn(),c=l.Ct();c!==null&&(n=l.pn(e,c)),n=this.Bc.Oa(n,o,r),this.vt.kn(o,n,r),this.oa(),i||this.Rc.m(this.vt.xt(),{x:A,y:e},t)}ad(A,e,t){const r=t.vn(),i=r.Ct(),n=r.Rt(A,L(i)),o=this.yl.Va(e,!0),a=this.yl.It(L(o));this.ld(a,n,null,t,!0)}od(A){this.Zc().Cn(),this.oa(),A||this.Rc.m(null,null,null)}Jl(){const A=this.vt.Ht();if(A!==null){const e=this.vt.xn(),t=this.vt.Sn();this.ld(e,t,null,A)}this.vt.Vn()}_d(A,e,t){const r=this.yl.mn(0);e!==void 0&&t!==void 0&&this.yl.bt(e,t);const i=this.yl.mn(0),n=this.yl.Eu(),o=this.yl.Xs();if(o!==null&&r!==null&&i!==null){const a=o.Kr(n),l=this.q_.key(r)>this.q_.key(i),c=A!==null&&A>n&&!l,u=this.yl.W().allowShiftVisibleRangeOnWhitespaceReplacement,d=a&&(t!==void 0||u)&&this.yl.W().shiftVisibleRangeOnNewBar;if(c&&!d){const g=A-n;this.yl.Jn(this.yl.Hu()-g)}}this.yl.Yu(A)}ia(A){A!==null&&A.F_()}dr(A){const e=this.yc.find((t=>t.Uo().includes(A)));return e===void 0?null:e}Wu(){this.Ac.Vn(),this.yc.forEach((A=>A.F_())),this.Jl()}S(){this.yc.forEach((A=>A.S())),this.yc.length=0,this.cn.localization.priceFormatter=void 0,this.cn.localization.percentageFormatter=void 0,this.cn.localization.timeFormatter=void 0}ud(){return this.Oc}br(){return this.Oc.W()}g_(){return this.Pc}dd(A,e,t){const r=this.yc[0],i=this.fd(e,A,r,t);return this.Cc.push(i),this.Cc.length===1?this.Kl():this.Uh(),i}vd(A){const e=this.dr(A),t=this.Cc.indexOf(A);je(t!==-1,"Series not found"),this.Cc.splice(t,1),L(e).Zo(A),A.S&&A.S()}Xl(A,e){const t=L(this.dr(A));t.Zo(A);const r=this.Uc(e);if(r===null){const i=A.Xi();t.qo(A,e,i)}else{const i=r.Ht===t?A.Xi():void 0;r.Ht.qo(A,e,i)}}hc(){const A=YA.ss();A.$n(),this.Nc(A)}pd(A){const e=YA.ss();e.Yn(A),this.Nc(e)}Kn(){const A=YA.ss();A.Kn(),this.Nc(A)}Gn(A){const e=YA.ss();e.Gn(A),this.Nc(e)}Jn(A){const e=YA.ss();e.Jn(A),this.Nc(e)}Zn(A){const e=YA.ss();e.Zn(A),this.Nc(e)}Un(){const A=YA.ss();A.Un(),this.Nc(A)}md(){return this.cn.rightPriceScale.visible?"right":"left"}bd(){return this.Ec}q(){return this.zc}Bt(A){const e=this.Ec,t=this.zc;if(e===t)return e;if(A=Math.max(0,Math.min(100,Math.round(100*A))),this.Dc===null||this.Dc.Ps!==t||this.Dc.Rs!==e)this.Dc={Ps:t,Rs:e,wd:new Map};else{const i=this.Dc.wd.get(A);if(i!==void 0)return i}const r=(function(i,n,o){const[a,l,c,u]=jt(i),[d,g,B,f]=jt(n),p=[me(a+o*(d-a)),me(l+o*(g-l)),me(c+o*(B-c)),Wo(u+o*(f-u))];return`rgba(${p[0]}, ${p[1]}, ${p[2]}, ${p[3]})`})(t,e,A/100);return this.Dc.wd.set(A,r),r}Gc(A,e){const t=new YA(e);if(A!==null){const r=this.yc.indexOf(A);t.Nn(r,{Fn:e})}return t}Fc(A,e){return e===void 0&&(e=2),this.Gc(this.dr(A),e)}Nc(A){this.Vc&&this.Vc(A),this.yc.forEach((e=>e.j_().qh().bt()))}fd(A,e,t,r){const i=new ki(this,A,e,t,r),n=A.priceScaleId!==void 0?A.priceScaleId:this.md();return t.qo(i,n),Ws(n)||i.$h(A),i}Lc(A){const e=this.cn.layout;return e.background.type==="gradient"?A===0?e.background.topColor:e.background.bottomColor:e.background.color}}function Ki(s){return!Me(s)&&!es(s)}function Da(s){return Me(s)}(function(s){s[s.Disabled=0]="Disabled",s[s.Continuous=1]="Continuous",s[s.OnDataUpdate=2]="OnDataUpdate"})(La||(La={})),(function(s){s[s.LastBar=0]="LastBar",s[s.LastVisible=1]="LastVisible"})(Ia||(Ia={})),(function(s){s.Solid="solid",s.VerticalGradient="gradient"})(Ta||(Ta={})),(function(s){s[s.Year=0]="Year",s[s.Month=1]="Month",s[s.DayOfMonth=2]="DayOfMonth",s[s.Time=3]="Time",s[s.TimeWithSeconds=4]="TimeWithSeconds"})(Ma||(Ma={}));const ka=s=>s.getUTCFullYear();function Cd(s,A,e){return A.replace(/yyyy/g,(t=>$e(ka(t),4))(s)).replace(/yy/g,(t=>$e(ka(t)%100,2))(s)).replace(/MMMM/g,((t,r)=>new Date(t.getUTCFullYear(),t.getUTCMonth(),1).toLocaleString(r,{month:"long"}))(s,e)).replace(/MMM/g,((t,r)=>new Date(t.getUTCFullYear(),t.getUTCMonth(),1).toLocaleString(r,{month:"short"}))(s,e)).replace(/MM/g,(t=>$e((r=>r.getUTCMonth()+1)(t),2))(s)).replace(/dd/g,(t=>$e((r=>r.getUTCDate())(t),2))(s))}class _a{constructor(A="yyyy-MM-dd",e="default"){this.gd=A,this.Md=e}Y_(A){return Cd(A,this.gd,this.Md)}}class vd{constructor(A){this.xd=A||"%h:%m:%s"}Y_(A){return this.xd.replace("%h",$e(A.getUTCHours(),2)).replace("%m",$e(A.getUTCMinutes(),2)).replace("%s",$e(A.getUTCSeconds(),2))}}const bd={Sd:"yyyy-MM-dd",kd:"%h:%m:%s",yd:" ",Cd:"default"};class Qd{constructor(A={}){const e=Object.assign(Object.assign({},bd),A);this.Td=new _a(e.Sd,e.Cd),this.Pd=new vd(e.kd),this.Rd=e.yd}Y_(A){return`${this.Td.Y_(A)}${this.Rd}${this.Pd.Y_(A)}`}}function Ar(s){return 60*s*60*1e3}function Vi(s){return 60*s*1e3}const er=[{Dd:(Oa=1,1e3*Oa),Vd:10},{Dd:Vi(1),Vd:20},{Dd:Vi(5),Vd:21},{Dd:Vi(30),Vd:22},{Dd:Ar(1),Vd:30},{Dd:Ar(3),Vd:31},{Dd:Ar(6),Vd:32},{Dd:Ar(12),Vd:33}];var Oa;function Na(s,A){if(s.getUTCFullYear()!==A.getUTCFullYear())return 70;if(s.getUTCMonth()!==A.getUTCMonth())return 60;if(s.getUTCDate()!==A.getUTCDate())return 50;for(let e=er.length-1;e>=0;--e)if(Math.floor(A.getTime()/er[e].Dd)!==Math.floor(s.getTime()/er[e].Dd))return er[e].Vd;return 0}function Pi(s){let A=s;if(es(s)&&(A=Gi(s)),!Ki(A))throw new Error("time must be of type BusinessDay");const e=new Date(Date.UTC(A.year,A.month-1,A.day,0,0,0,0));return{Od:Math.round(e.getTime()/1e3),Bd:A}}function Ka(s){if(!Da(s))throw new Error("time must be of type isUTCTimestamp");return{Od:s}}function Gi(s){const A=new Date(s);if(isNaN(A.getTime()))throw new Error(`Invalid date string=${s}, expected format=yyyy-mm-dd`);return{day:A.getUTCDate(),month:A.getUTCMonth()+1,year:A.getUTCFullYear()}}function Va(s){es(s.time)&&(s.time=Gi(s.time))}class Pa{options(){return this.cn}setOptions(A){this.cn=A,this.updateFormatter(A.localization)}preprocessData(A){Array.isArray(A)?(function(e){e.forEach(Va)})(A):Va(A)}createConverterToInternalObj(A){return L((function(e){return e.length===0?null:Ki(e[0].time)||es(e[0].time)?Pi:Ka})(A))}key(A){return typeof A=="object"&&"Od"in A?A.Od:this.key(this.convertHorzItemToInternal(A))}cacheKey(A){const e=A;return e.Bd===void 0?new Date(1e3*e.Od).getTime():new Date(Date.UTC(e.Bd.year,e.Bd.month-1,e.Bd.day)).getTime()}convertHorzItemToInternal(A){return Da(e=A)?Ka(e):Ki(e)?Pi(e):Pi(Gi(e));var e}updateFormatter(A){if(!this.cn)return;const e=A.dateFormat;this.cn.timeScale.timeVisible?this.Ad=new Qd({Sd:e,kd:this.cn.timeScale.secondsVisible?"%h:%m:%s":"%h:%m",yd:" ",Cd:A.locale}):this.Ad=new _a(e,A.locale)}formatHorzItem(A){const e=A;return this.Ad.Y_(new Date(1e3*e.Od))}formatTickmark(A,e){const t=(function(i,n,o){switch(i){case 0:case 10:return n?o?4:3:2;case 20:case 21:case 22:case 30:case 31:case 32:case 33:return n?3:2;case 50:return 2;case 60:return 1;case 70:return 0}})(A.weight,this.cn.timeScale.timeVisible,this.cn.timeScale.secondsVisible),r=this.cn.timeScale;if(r.tickMarkFormatter!==void 0){const i=r.tickMarkFormatter(A.originalTime,t,e.locale);if(i!==null)return i}return(function(i,n,o){const a={};switch(n){case 0:a.year="numeric";break;case 1:a.month="short";break;case 2:a.day="numeric";break;case 3:a.hour12=!1,a.hour="2-digit",a.minute="2-digit";break;case 4:a.hour12=!1,a.hour="2-digit",a.minute="2-digit",a.second="2-digit"}const l=i.Bd===void 0?new Date(1e3*i.Od):new Date(Date.UTC(i.Bd.year,i.Bd.month-1,i.Bd.day));return new Date(l.getUTCFullYear(),l.getUTCMonth(),l.getUTCDate(),l.getUTCHours(),l.getUTCMinutes(),l.getUTCSeconds(),l.getUTCMilliseconds()).toLocaleString(o,a)})(A.time,t,e.locale)}maxTickMarkWeight(A){let e=A.reduce(fd,A[0]).weight;return e>30&&e<50&&(e=30),e}fillWeightsForPoints(A,e){(function(t,r=0){if(t.length===0)return;let i=r===0?null:t[r-1].time.Od,n=i!==null?new Date(1e3*i):null,o=0;for(let a=r;a<t.length;++a){const l=t[a],c=new Date(1e3*l.time.Od);n!==null&&(l.timeWeight=Na(c,n)),o+=l.time.Od-(i||l.time.Od),i=l.time.Od,n=c}if(r===0&&t.length>1){const a=Math.ceil(o/(t.length-1)),l=new Date(1e3*(t[0].time.Od-a));t[0].timeWeight=Na(new Date(1e3*t[0].time.Od),l)}})(A,e)}static Id(A){return Ee({localization:{dateFormat:"dd MMM 'yy"}},A??{})}}const Mt=typeof window<"u";function Ga(){return!!Mt&&window.navigator.userAgent.toLowerCase().indexOf("firefox")>-1}function Ri(){return!!Mt&&/iPhone|iPad|iPod/.test(window.navigator.platform)}function zi(s){return s+s%2}function Wi(s,A){return s.zd-A.zd}function Xi(s,A,e){const t=(s.zd-A.zd)/(s.ot-A.ot);return Math.sign(t)*Math.min(Math.abs(t),e)}class yd{constructor(A,e,t,r){this.Ld=null,this.Ed=null,this.Nd=null,this.Fd=null,this.Wd=null,this.jd=0,this.Hd=0,this.$d=A,this.Ud=e,this.qd=t,this.rs=r}Yd(A,e){if(this.Ld!==null){if(this.Ld.ot===e)return void(this.Ld.zd=A);if(Math.abs(this.Ld.zd-A)<this.rs)return}this.Fd=this.Nd,this.Nd=this.Ed,this.Ed=this.Ld,this.Ld={ot:e,zd:A}}Vr(A,e){if(this.Ld===null||this.Ed===null||e-this.Ld.ot>50)return;let t=0;const r=Xi(this.Ld,this.Ed,this.Ud),i=Wi(this.Ld,this.Ed),n=[r],o=[i];if(t+=i,this.Nd!==null){const l=Xi(this.Ed,this.Nd,this.Ud);if(Math.sign(l)===Math.sign(r)){const c=Wi(this.Ed,this.Nd);if(n.push(l),o.push(c),t+=c,this.Fd!==null){const u=Xi(this.Nd,this.Fd,this.Ud);if(Math.sign(u)===Math.sign(r)){const d=Wi(this.Nd,this.Fd);n.push(u),o.push(d),t+=d}}}}let a=0;for(let l=0;l<n.length;++l)a+=o[l]/t*n[l];Math.abs(a)<this.$d||(this.Wd={zd:A,ot:e},this.Hd=a,this.jd=(function(l,c){const u=Math.log(c);return Math.log(1*u/-l)/u})(Math.abs(a),this.qd))}tc(A){const e=L(this.Wd),t=A-e.ot;return e.zd+this.Hd*(Math.pow(this.qd,t)-1)/Math.log(this.qd)}Qu(A){return this.Wd===null||this.Zd(A)===this.jd}Zd(A){const e=A-L(this.Wd).ot;return Math.min(e,this.jd)}}class Ud{constructor(A,e){this.Xd=void 0,this.Kd=void 0,this.Gd=void 0,this.en=!1,this.Jd=A,this.Qd=e,this.tf()}bt(){this.tf()}if(){this.Xd&&this.Jd.removeChild(this.Xd),this.Kd&&this.Jd.removeChild(this.Kd),this.Xd=void 0,this.Kd=void 0}nf(){return this.en!==this.sf()||this.Gd!==this.ef()}ef(){return Xo(jt(this.Qd.W().layout.textColor))>160?"dark":"light"}sf(){return this.Qd.W().layout.attributionLogo}rf(){const A=new URL(location.href);return A.hostname?"&utm_source="+A.hostname+A.pathname:""}tf(){this.nf()&&(this.if(),this.en=this.sf(),this.en&&(this.Gd=this.ef(),this.Kd=document.createElement("style"),this.Kd.innerText="a#tv-attr-logo{--fill:#131722;--stroke:#fff;position:absolute;left:10px;bottom:10px;height:19px;width:35px;margin:0;padding:0;border:0;z-index:3;}a#tv-attr-logo[data-dark]{--fill:#D1D4DC;--stroke:#131722;}",this.Xd=document.createElement("a"),this.Xd.href=`https://www.tradingview.com/?utm_medium=lwc-link&utm_campaign=lwc-chart${this.rf()}`,this.Xd.title="Charting by TradingView",this.Xd.id="tv-attr-logo",this.Xd.target="_blank",this.Xd.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 35 19" width="35" height="19" fill="none"><g fill-rule="evenodd" clip-path="url(#a)" clip-rule="evenodd"><path fill="var(--stroke)" d="M2 0H0v10h6v9h21.4l.5-1.3 6-15 1-2.7H23.7l-.5 1.3-.2.6a5 5 0 0 0-7-.9V0H2Zm20 17h4l5.2-13 .8-2h-7l-1 2.5-.2.5-1.5 3.8-.3.7V17Zm-.8-10a3 3 0 0 0 .7-2.7A3 3 0 1 0 16.8 7h4.4ZM14 7V2H2v6h6v9h4V7h2Z"/><path fill="var(--fill)" d="M14 2H2v6h6v9h6V2Zm12 15h-7l6-15h7l-6 15Zm-7-9a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"/></g><defs><clipPath id="a"><path fill="var(--stroke)" d="M0 0h35v19H0z"/></clipPath></defs></svg>',this.Xd.toggleAttribute("data-dark",this.Gd==="dark"),this.Jd.appendChild(this.Kd),this.Jd.appendChild(this.Xd)))}}function Bt(s,A){const e=L(s.ownerDocument).createElement("canvas");s.appendChild(e);const t=Du(e,{options:{allowResizeObserver:!1},transform:(r,i)=>({width:Math.max(r.width,i.width),height:Math.max(r.height,i.height)})});return t.resizeCanvasElement(A),t}function gt(s){var A;s.width=1,s.height=1,(A=s.getContext("2d"))===null||A===void 0||A.clearRect(0,0,1,1)}function $i(s,A,e,t){s.gl&&s.gl(A,e,t)}function tr(s,A,e,t){s.X(A,e,t)}function Ji(s,A,e,t){const r=s(e,t);for(const i of r){const n=i.gt();n!==null&&A(n)}}function Fd(s){Mt&&window.chrome!==void 0&&s.addEventListener("mousedown",(A=>{if(A.button===1)return A.preventDefault(),!1}))}class Zi{constructor(A,e,t){this.hf=0,this.lf=null,this.af={nt:Number.NEGATIVE_INFINITY,st:Number.POSITIVE_INFINITY},this._f=0,this.uf=null,this.cf={nt:Number.NEGATIVE_INFINITY,st:Number.POSITIVE_INFINITY},this.df=null,this.ff=!1,this.vf=null,this.pf=null,this.mf=!1,this.bf=!1,this.wf=!1,this.gf=null,this.Mf=null,this.xf=null,this.Sf=null,this.kf=null,this.yf=null,this.Cf=null,this.Tf=0,this.Pf=!1,this.Rf=!1,this.Df=!1,this.Vf=0,this.Of=null,this.Bf=!Ri(),this.Af=r=>{this.If(r)},this.zf=r=>{if(this.Lf(r)){const i=this.Ef(r);if(++this._f,this.uf&&this._f>1){const{Nf:n}=this.Ff(De(r),this.cf);n<30&&!this.wf&&this.Wf(i,this.Hf.jf),this.$f()}}else{const i=this.Ef(r);if(++this.hf,this.lf&&this.hf>1){const{Nf:n}=this.Ff(De(r),this.af);n<5&&!this.bf&&this.Uf(i,this.Hf.qf),this.Yf()}}},this.Zf=A,this.Hf=e,this.cn=t,this.Xf()}S(){this.gf!==null&&(this.gf(),this.gf=null),this.Mf!==null&&(this.Mf(),this.Mf=null),this.Sf!==null&&(this.Sf(),this.Sf=null),this.kf!==null&&(this.kf(),this.kf=null),this.yf!==null&&(this.yf(),this.yf=null),this.xf!==null&&(this.xf(),this.xf=null),this.Kf(),this.Yf()}Gf(A){this.Sf&&this.Sf();const e=this.Jf.bind(this);if(this.Sf=()=>{this.Zf.removeEventListener("mousemove",e)},this.Zf.addEventListener("mousemove",e),this.Lf(A))return;const t=this.Ef(A);this.Uf(t,this.Hf.Qf),this.Bf=!0}Yf(){this.lf!==null&&clearTimeout(this.lf),this.hf=0,this.lf=null,this.af={nt:Number.NEGATIVE_INFINITY,st:Number.POSITIVE_INFINITY}}$f(){this.uf!==null&&clearTimeout(this.uf),this._f=0,this.uf=null,this.cf={nt:Number.NEGATIVE_INFINITY,st:Number.POSITIVE_INFINITY}}Jf(A){if(this.Df||this.pf!==null||this.Lf(A))return;const e=this.Ef(A);this.Uf(e,this.Hf.tv),this.Bf=!0}iv(A){const e=Yi(A.changedTouches,L(this.Of));if(e===null||(this.Vf=sr(A),this.Cf!==null)||this.Rf)return;this.Pf=!0;const t=this.Ff(De(e),L(this.pf)),{nv:r,sv:i,Nf:n}=t;if(this.mf||!(n<5)){if(!this.mf){const o=.5*r,a=i>=o&&!this.cn.ev(),l=o>i&&!this.cn.rv();a||l||(this.Rf=!0),this.mf=!0,this.wf=!0,this.Kf(),this.$f()}if(!this.Rf){const o=this.Ef(A,e);this.Wf(o,this.Hf.hv),Dt(A)}}}lv(A){if(A.button!==0)return;const e=this.Ff(De(A),L(this.vf)),{Nf:t}=e;if(t>=5&&(this.bf=!0,this.Yf()),this.bf){const r=this.Ef(A);this.Uf(r,this.Hf.av)}}Ff(A,e){const t=Math.abs(e.nt-A.nt),r=Math.abs(e.st-A.st);return{nv:t,sv:r,Nf:t+r}}ov(A){let e=Yi(A.changedTouches,L(this.Of));if(e===null&&A.touches.length===0&&(e=A.changedTouches[0]),e===null)return;this.Of=null,this.Vf=sr(A),this.Kf(),this.pf=null,this.yf&&(this.yf(),this.yf=null);const t=this.Ef(A,e);if(this.Wf(t,this.Hf._v),++this._f,this.uf&&this._f>1){const{Nf:r}=this.Ff(De(e),this.cf);r<30&&!this.wf&&this.Wf(t,this.Hf.jf),this.$f()}else this.wf||(this.Wf(t,this.Hf.uv),this.Hf.uv&&Dt(A));this._f===0&&Dt(A),A.touches.length===0&&this.ff&&(this.ff=!1,Dt(A))}If(A){if(A.button!==0)return;const e=this.Ef(A);if(this.vf=null,this.Df=!1,this.kf&&(this.kf(),this.kf=null),Ga()&&this.Zf.ownerDocument.documentElement.removeEventListener("mouseleave",this.Af),!this.Lf(A))if(this.Uf(e,this.Hf.cv),++this.hf,this.lf&&this.hf>1){const{Nf:t}=this.Ff(De(A),this.af);t<5&&!this.bf&&this.Uf(e,this.Hf.qf),this.Yf()}else this.bf||this.Uf(e,this.Hf.dv)}Kf(){this.df!==null&&(clearTimeout(this.df),this.df=null)}fv(A){if(this.Of!==null)return;const e=A.changedTouches[0];this.Of=e.identifier,this.Vf=sr(A);const t=this.Zf.ownerDocument.documentElement;this.wf=!1,this.mf=!1,this.Rf=!1,this.pf=De(e),this.yf&&(this.yf(),this.yf=null);{const i=this.iv.bind(this),n=this.ov.bind(this);this.yf=()=>{t.removeEventListener("touchmove",i),t.removeEventListener("touchend",n)},t.addEventListener("touchmove",i,{passive:!1}),t.addEventListener("touchend",n,{passive:!1}),this.Kf(),this.df=setTimeout(this.vv.bind(this,A),240)}const r=this.Ef(A,e);this.Wf(r,this.Hf.pv),this.uf||(this._f=0,this.uf=setTimeout(this.$f.bind(this),500),this.cf=De(e))}mv(A){if(A.button!==0)return;const e=this.Zf.ownerDocument.documentElement;Ga()&&e.addEventListener("mouseleave",this.Af),this.bf=!1,this.vf=De(A),this.kf&&(this.kf(),this.kf=null);{const r=this.lv.bind(this),i=this.If.bind(this);this.kf=()=>{e.removeEventListener("mousemove",r),e.removeEventListener("mouseup",i)},e.addEventListener("mousemove",r),e.addEventListener("mouseup",i)}if(this.Df=!0,this.Lf(A))return;const t=this.Ef(A);this.Uf(t,this.Hf.bv),this.lf||(this.hf=0,this.lf=setTimeout(this.Yf.bind(this),500),this.af=De(A))}Xf(){this.Zf.addEventListener("mouseenter",this.Gf.bind(this)),this.Zf.addEventListener("touchcancel",this.Kf.bind(this));{const A=this.Zf.ownerDocument,e=t=>{this.Hf.wv&&(t.composed&&this.Zf.contains(t.composedPath()[0])||t.target&&this.Zf.contains(t.target)||this.Hf.wv())};this.Mf=()=>{A.removeEventListener("touchstart",e)},this.gf=()=>{A.removeEventListener("mousedown",e)},A.addEventListener("mousedown",e),A.addEventListener("touchstart",e,{passive:!0})}Ri()&&(this.xf=()=>{this.Zf.removeEventListener("dblclick",this.zf)},this.Zf.addEventListener("dblclick",this.zf)),this.Zf.addEventListener("mouseleave",this.gv.bind(this)),this.Zf.addEventListener("touchstart",this.fv.bind(this),{passive:!0}),Fd(this.Zf),this.Zf.addEventListener("mousedown",this.mv.bind(this)),this.Mv(),this.Zf.addEventListener("touchmove",(()=>{}),{passive:!1})}Mv(){this.Hf.xv===void 0&&this.Hf.Sv===void 0&&this.Hf.kv===void 0||(this.Zf.addEventListener("touchstart",(A=>this.yv(A.touches)),{passive:!0}),this.Zf.addEventListener("touchmove",(A=>{if(A.touches.length===2&&this.Cf!==null&&this.Hf.Sv!==void 0){const e=Ra(A.touches[0],A.touches[1])/this.Tf;this.Hf.Sv(this.Cf,e),Dt(A)}}),{passive:!1}),this.Zf.addEventListener("touchend",(A=>{this.yv(A.touches)})))}yv(A){A.length===1&&(this.Pf=!1),A.length!==2||this.Pf||this.ff?this.Cv():this.Tv(A)}Tv(A){const e=this.Zf.getBoundingClientRect()||{left:0,top:0};this.Cf={nt:(A[0].clientX-e.left+(A[1].clientX-e.left))/2,st:(A[0].clientY-e.top+(A[1].clientY-e.top))/2},this.Tf=Ra(A[0],A[1]),this.Hf.xv!==void 0&&this.Hf.xv(),this.Kf()}Cv(){this.Cf!==null&&(this.Cf=null,this.Hf.kv!==void 0&&this.Hf.kv())}gv(A){if(this.Sf&&this.Sf(),this.Lf(A)||!this.Bf)return;const e=this.Ef(A);this.Uf(e,this.Hf.Pv),this.Bf=!Ri()}vv(A){const e=Yi(A.touches,L(this.Of));if(e===null)return;const t=this.Ef(A,e);this.Wf(t,this.Hf.Rv),this.wf=!0,this.ff=!0}Lf(A){return A.sourceCapabilities&&A.sourceCapabilities.firesTouchEvents!==void 0?A.sourceCapabilities.firesTouchEvents:sr(A)<this.Vf+500}Wf(A,e){e&&e.call(this.Hf,A)}Uf(A,e){e&&e.call(this.Hf,A)}Ef(A,e){const t=e||A,r=this.Zf.getBoundingClientRect()||{left:0,top:0};return{clientX:t.clientX,clientY:t.clientY,pageX:t.pageX,pageY:t.pageY,screenX:t.screenX,screenY:t.screenY,localX:t.clientX-r.left,localY:t.clientY-r.top,ctrlKey:A.ctrlKey,altKey:A.altKey,shiftKey:A.shiftKey,metaKey:A.metaKey,Dv:!A.type.startsWith("mouse")&&A.type!=="contextmenu"&&A.type!=="click",Vv:A.type,Ov:t.target,Bv:A.view,Av:()=>{A.type!=="touchstart"&&Dt(A)}}}}function Ra(s,A){const e=s.clientX-A.clientX,t=s.clientY-A.clientY;return Math.sqrt(e*e+t*t)}function Dt(s){s.cancelable&&s.preventDefault()}function De(s){return{nt:s.pageX,st:s.pageY}}function sr(s){return s.timeStamp||performance.now()}function Yi(s,A){for(let e=0;e<s.length;++e)if(s[e].identifier===A)return s[e];return null}function rr(s){return{Hc:s.Hc,Iv:{gr:s.zv.externalId},Lv:s.zv.cursorStyle}}function Ed(s,A,e){for(const t of s){const r=t.gt();if(r!==null&&r.wr){const i=r.wr(A,e);if(i!==null)return{Bv:t,Iv:i}}}return null}function qi(s,A){return e=>{var t,r,i,n;return((r=(t=e.Dt())===null||t===void 0?void 0:t.Pa())!==null&&r!==void 0?r:"")!==A?[]:(n=(i=e.da)===null||i===void 0?void 0:i.call(e,s))!==null&&n!==void 0?n:[]}}function za(s,A,e,t){if(!s.length)return;let r=0;const i=e/2,n=s[0].At(t,!0);let o=A===1?i-(s[0].Vi()-n/2):s[0].Vi()-n/2-i;o=Math.max(0,o);for(let a=1;a<s.length;a++){const l=s[a],c=s[a-1],u=c.At(t,!1),d=l.Vi(),g=c.Vi();if(A===1?d>g-u:d<g+u){const B=g-u*A;l.Oi(B);const f=B-A*u/2;if((A===1?f<0:f>e)&&o>0){const p=A===1?-1-f:f-e,m=Math.min(p,o);for(let w=r;w<s.length;w++)s[w].Oi(s[w].Vi()+A*m);o-=m}}else r=a,o=A===1?g-u-d:d-(g+u)}}class Wa{constructor(A,e,t,r){this.Li=null,this.Ev=null,this.Nv=!1,this.Fv=new rs(200),this.Qr=null,this.Wv=0,this.jv=!1,this.Hv=()=>{this.jv||this.tn.$v().$t().Uh()},this.Uv=()=>{this.jv||this.tn.$v().$t().Uh()},this.tn=A,this.cn=e,this.ko=e.layout,this.Oc=t,this.qv=r==="left",this.Yv=qi("normal",r),this.Zv=qi("top",r),this.Xv=qi("bottom",r),this.Kv=document.createElement("div"),this.Kv.style.height="100%",this.Kv.style.overflow="hidden",this.Kv.style.width="25px",this.Kv.style.left="0",this.Kv.style.position="relative",this.Gv=Bt(this.Kv,IA({width:16,height:16})),this.Gv.subscribeSuggestedBitmapSizeChanged(this.Hv);const i=this.Gv.canvasElement;i.style.position="absolute",i.style.zIndex="1",i.style.left="0",i.style.top="0",this.Jv=Bt(this.Kv,IA({width:16,height:16})),this.Jv.subscribeSuggestedBitmapSizeChanged(this.Uv);const n=this.Jv.canvasElement;n.style.position="absolute",n.style.zIndex="2",n.style.left="0",n.style.top="0";const o={bv:this.Qv.bind(this),pv:this.Qv.bind(this),av:this.tp.bind(this),hv:this.tp.bind(this),wv:this.ip.bind(this),cv:this.np.bind(this),_v:this.np.bind(this),qf:this.sp.bind(this),jf:this.sp.bind(this),Qf:this.ep.bind(this),Pv:this.rp.bind(this)};this.hp=new Zi(this.Jv.canvasElement,o,{ev:()=>!this.cn.handleScroll.vertTouchDrag,rv:()=>!0})}S(){this.hp.S(),this.Jv.unsubscribeSuggestedBitmapSizeChanged(this.Uv),gt(this.Jv.canvasElement),this.Jv.dispose(),this.Gv.unsubscribeSuggestedBitmapSizeChanged(this.Hv),gt(this.Gv.canvasElement),this.Gv.dispose(),this.Li!==null&&this.Li.Ko().p(this),this.Li=null}lp(){return this.Kv}P(){return this.ko.fontSize}ap(){const A=this.Oc.W();return this.Qr!==A.R&&(this.Fv.nr(),this.Qr=A.R),A}op(){if(this.Li===null)return 0;let A=0;const e=this.ap(),t=L(this.Gv.canvasElement.getContext("2d"));t.save();const r=this.Li.Ha();t.font=this._p(),r.length>0&&(A=Math.max(this.Fv.xi(t,r[0].so),this.Fv.xi(t,r[r.length-1].so)));const i=this.up();for(let l=i.length;l--;){const c=this.Fv.xi(t,i[l].Kt());c>A&&(A=c)}const n=this.Li.Ct();if(n!==null&&this.Ev!==null&&(o=this.cn.crosshair).mode!==2&&o.horzLine.visible&&o.horzLine.labelVisible){const l=this.Li.pn(1,n),c=this.Li.pn(this.Ev.height-2,n);A=Math.max(A,this.Fv.xi(t,this.Li.Fi(Math.floor(Math.min(l,c))+.11111111111111,n)),this.Fv.xi(t,this.Li.Fi(Math.ceil(Math.max(l,c))-.11111111111111,n)))}var o;t.restore();const a=A||34;return zi(Math.ceil(e.C+e.T+e.A+e.I+5+a))}cp(A){this.Ev!==null&&ut(this.Ev,A)||(this.Ev=A,this.jv=!0,this.Gv.resizeCanvasElement(A),this.Jv.resizeCanvasElement(A),this.jv=!1,this.Kv.style.width=`${A.width}px`,this.Kv.style.height=`${A.height}px`)}dp(){return L(this.Ev).width}Gi(A){this.Li!==A&&(this.Li!==null&&this.Li.Ko().p(this),this.Li=A,A.Ko().l(this.fo.bind(this),this))}Dt(){return this.Li}nr(){const A=this.tn.fp();this.tn.$v().$t().E_(A,L(this.Dt()))}vp(A){if(this.Ev===null)return;if(A!==1){this.pp(),this.Gv.applySuggestedBitmapSize();const t=ft(this.Gv);t!==null&&(t.useBitmapCoordinateSpace((r=>{this.mp(r),this.Ie(r)})),this.tn.bp(t,this.Xv),this.wp(t),this.tn.bp(t,this.Yv),this.gp(t))}this.Jv.applySuggestedBitmapSize();const e=ft(this.Jv);e!==null&&(e.useBitmapCoordinateSpace((({context:t,bitmapSize:r})=>{t.clearRect(0,0,r.width,r.height)})),this.Mp(e),this.tn.bp(e,this.Zv))}xp(){return this.Gv.bitmapSize}Sp(A,e,t){const r=this.xp();r.width>0&&r.height>0&&A.drawImage(this.Gv.canvasElement,e,t)}bt(){var A;(A=this.Li)===null||A===void 0||A.Ha()}Qv(A){if(this.Li===null||this.Li.Ni()||!this.cn.handleScale.axisPressedMouseMove.price)return;const e=this.tn.$v().$t(),t=this.tn.fp();this.Nv=!0,e.V_(t,this.Li,A.localY)}tp(A){if(this.Li===null||!this.cn.handleScale.axisPressedMouseMove.price)return;const e=this.tn.$v().$t(),t=this.tn.fp(),r=this.Li;e.O_(t,r,A.localY)}ip(){if(this.Li===null||!this.cn.handleScale.axisPressedMouseMove.price)return;const A=this.tn.$v().$t(),e=this.tn.fp(),t=this.Li;this.Nv&&(this.Nv=!1,A.B_(e,t))}np(A){if(this.Li===null||!this.cn.handleScale.axisPressedMouseMove.price)return;const e=this.tn.$v().$t(),t=this.tn.fp();this.Nv=!1,e.B_(t,this.Li)}sp(A){this.cn.handleScale.axisDoubleClickReset.price&&this.nr()}ep(A){this.Li!==null&&(!this.tn.$v().$t().W().handleScale.axisPressedMouseMove.price||this.Li.Mh()||this.Li.Oo()||this.kp(1))}rp(A){this.kp(0)}up(){const A=[],e=this.Li===null?void 0:this.Li;return(t=>{for(let r=0;r<t.length;++r){const i=t[r].Rn(this.tn.fp(),e);for(let n=0;n<i.length;n++)A.push(i[n])}})(this.tn.fp().Uo()),A}mp({context:A,bitmapSize:e}){const{width:t,height:r}=e,i=this.tn.fp().$t(),n=i.q(),o=i.bd();n===o?Rs(A,0,0,t,r,n):Zo(A,0,0,t,r,n,o)}Ie({context:A,bitmapSize:e,horizontalPixelRatio:t}){if(this.Ev===null||this.Li===null||!this.Li.W().borderVisible)return;A.fillStyle=this.Li.W().borderColor;const r=Math.max(1,Math.floor(this.ap().C*t));let i;i=this.qv?e.width-r:0,A.fillRect(i,0,r,e.height)}wp(A){if(this.Ev===null||this.Li===null)return;const e=this.Li.Ha(),t=this.Li.W(),r=this.ap(),i=this.qv?this.Ev.width-r.T:0;t.borderVisible&&t.ticksVisible&&A.useBitmapCoordinateSpace((({context:n,horizontalPixelRatio:o,verticalPixelRatio:a})=>{n.fillStyle=t.borderColor;const l=Math.max(1,Math.floor(a)),c=Math.floor(.5*a),u=Math.round(r.T*o);n.beginPath();for(const d of e)n.rect(Math.floor(i*o),Math.round(d.Ea*a)-c,u,l);n.fill()})),A.useMediaCoordinateSpace((({context:n})=>{var o;n.font=this._p(),n.fillStyle=(o=t.textColor)!==null&&o!==void 0?o:this.ko.textColor,n.textAlign=this.qv?"right":"left",n.textBaseline="middle";const a=this.qv?Math.round(i-r.A):Math.round(i+r.T+r.A),l=e.map((c=>this.Fv.Mi(n,c.so)));for(let c=e.length;c--;){const u=e[c];n.fillText(u.so,a,u.Ea+l[c])}}))}pp(){if(this.Ev===null||this.Li===null)return;const A=[],e=this.Li.Uo().slice(),t=this.tn.fp(),r=this.ap();this.Li===t.pr()&&this.tn.fp().Uo().forEach((n=>{t.vr(n)&&e.push(n)}));const i=this.Li;e.forEach((n=>{n.Rn(t,i).forEach((o=>{o.Oi(null),o.Bi()&&A.push(o)}))})),A.forEach((n=>n.Oi(n.ki()))),this.Li.W().alignLabels&&this.yp(A,r)}yp(A,e){if(this.Ev===null)return;const t=this.Ev.height/2,r=A.filter((n=>n.ki()<=t)),i=A.filter((n=>n.ki()>t));r.sort(((n,o)=>o.ki()-n.ki())),i.sort(((n,o)=>n.ki()-o.ki()));for(const n of A){const o=Math.floor(n.At(e)/2),a=n.ki();a>-o&&a<o&&n.Oi(o),a>this.Ev.height-o&&a<this.Ev.height+o&&n.Oi(this.Ev.height-o)}za(r,1,this.Ev.height,e),za(i,-1,this.Ev.height,e)}gp(A){if(this.Ev===null)return;const e=this.up(),t=this.ap(),r=this.qv?"right":"left";e.forEach((i=>{i.Ai()&&i.gt(L(this.Li)).X(A,t,this.Fv,r)}))}Mp(A){if(this.Ev===null||this.Li===null)return;const e=this.tn.$v().$t(),t=[],r=this.tn.fp(),i=e.Zc().Rn(r,this.Li);i.length&&t.push(i);const n=this.ap(),o=this.qv?"right":"left";t.forEach((a=>{a.forEach((l=>{l.gt(L(this.Li)).X(A,n,this.Fv,o)}))}))}kp(A){this.Kv.style.cursor=A===1?"ns-resize":"default"}fo(){const A=this.op();this.Wv<A&&this.tn.$v().$t().Kl(),this.Wv=A}_p(){return Lt(this.ko.fontSize,this.ko.fontFamily)}}function xd(s,A){var e,t;return(t=(e=s.ua)===null||e===void 0?void 0:e.call(s,A))!==null&&t!==void 0?t:[]}function ir(s,A){var e,t;return(t=(e=s.Pn)===null||e===void 0?void 0:e.call(s,A))!==null&&t!==void 0?t:[]}function Sd(s,A){var e,t;return(t=(e=s.Ji)===null||e===void 0?void 0:e.call(s,A))!==null&&t!==void 0?t:[]}function Hd(s,A){var e,t;return(t=(e=s.aa)===null||e===void 0?void 0:e.call(s,A))!==null&&t!==void 0?t:[]}class ji{constructor(A,e){this.Ev=IA({width:0,height:0}),this.Cp=null,this.Tp=null,this.Pp=null,this.Rp=null,this.Dp=!1,this.Vp=new KA,this.Op=new KA,this.Bp=0,this.Ap=!1,this.Ip=null,this.zp=!1,this.Lp=null,this.Ep=null,this.jv=!1,this.Hv=()=>{this.jv||this.Np===null||this.$i().Uh()},this.Uv=()=>{this.jv||this.Np===null||this.$i().Uh()},this.Qd=A,this.Np=e,this.Np.W_().l(this.Fp.bind(this),this,!0),this.Wp=document.createElement("td"),this.Wp.style.padding="0",this.Wp.style.position="relative";const t=document.createElement("div");t.style.width="100%",t.style.height="100%",t.style.position="relative",t.style.overflow="hidden",this.jp=document.createElement("td"),this.jp.style.padding="0",this.Hp=document.createElement("td"),this.Hp.style.padding="0",this.Wp.appendChild(t),this.Gv=Bt(t,IA({width:16,height:16})),this.Gv.subscribeSuggestedBitmapSizeChanged(this.Hv);const r=this.Gv.canvasElement;r.style.position="absolute",r.style.zIndex="1",r.style.left="0",r.style.top="0",this.Jv=Bt(t,IA({width:16,height:16})),this.Jv.subscribeSuggestedBitmapSizeChanged(this.Uv);const i=this.Jv.canvasElement;i.style.position="absolute",i.style.zIndex="2",i.style.left="0",i.style.top="0",this.$p=document.createElement("tr"),this.$p.appendChild(this.jp),this.$p.appendChild(this.Wp),this.$p.appendChild(this.Hp),this.Up(),this.hp=new Zi(this.Jv.canvasElement,this,{ev:()=>this.Ip===null&&!this.Qd.W().handleScroll.vertTouchDrag,rv:()=>this.Ip===null&&!this.Qd.W().handleScroll.horzTouchDrag})}S(){this.Cp!==null&&this.Cp.S(),this.Tp!==null&&this.Tp.S(),this.Pp=null,this.Jv.unsubscribeSuggestedBitmapSizeChanged(this.Uv),gt(this.Jv.canvasElement),this.Jv.dispose(),this.Gv.unsubscribeSuggestedBitmapSizeChanged(this.Hv),gt(this.Gv.canvasElement),this.Gv.dispose(),this.Np!==null&&this.Np.W_().p(this),this.hp.S()}fp(){return L(this.Np)}qp(A){var e,t;this.Np!==null&&this.Np.W_().p(this),this.Np=A,this.Np!==null&&this.Np.W_().l(ji.prototype.Fp.bind(this),this,!0),this.Up(),this.Qd.Yp().indexOf(this)===this.Qd.Yp().length-1?(this.Pp=(e=this.Pp)!==null&&e!==void 0?e:new Ud(this.Wp,this.Qd),this.Pp.bt()):((t=this.Pp)===null||t===void 0||t.if(),this.Pp=null)}$v(){return this.Qd}lp(){return this.$p}Up(){if(this.Np!==null&&(this.Zp(),this.$i().wt().length!==0)){if(this.Cp!==null){const A=this.Np.R_();this.Cp.Gi(L(A))}if(this.Tp!==null){const A=this.Np.D_();this.Tp.Gi(L(A))}}}Xp(){this.Cp!==null&&this.Cp.bt(),this.Tp!==null&&this.Tp.bt()}M_(){return this.Np!==null?this.Np.M_():0}x_(A){this.Np&&this.Np.x_(A)}Qf(A){if(!this.Np)return;this.Kp();const e=A.localX,t=A.localY;this.Gp(e,t,A)}bv(A){this.Kp(),this.Jp(),this.Gp(A.localX,A.localY,A)}tv(A){var e;if(!this.Np)return;this.Kp();const t=A.localX,r=A.localY;this.Gp(t,r,A);const i=this.wr(t,r);this.Qd.Qp((e=i?.Lv)!==null&&e!==void 0?e:null),this.$i().jc(i&&{Hc:i.Hc,Iv:i.Iv})}dv(A){this.Np!==null&&(this.Kp(),this.tm(A))}qf(A){this.Np!==null&&this.im(this.Op,A)}jf(A){this.qf(A)}av(A){this.Kp(),this.nm(A),this.Gp(A.localX,A.localY,A)}cv(A){this.Np!==null&&(this.Kp(),this.Ap=!1,this.sm(A))}uv(A){this.Np!==null&&this.tm(A)}Rv(A){if(this.Ap=!0,this.Ip===null){const e={x:A.localX,y:A.localY};this.rm(e,e,A)}}Pv(A){this.Np!==null&&(this.Kp(),this.Np.$t().jc(null),this.hm())}lm(){return this.Vp}am(){return this.Op}xv(){this.Bp=1,this.$i().Un()}Sv(A,e){if(!this.Qd.W().handleScale.pinch)return;const t=5*(e-this.Bp);this.Bp=e,this.$i().Qc(A.nt,t)}pv(A){this.Ap=!1,this.zp=this.Ip!==null,this.Jp();const e=this.$i().Zc();this.Ip!==null&&e.yt()&&(this.Lp={x:e.Yt(),y:e.Zt()},this.Ip={x:A.localX,y:A.localY})}hv(A){if(this.Np===null)return;const e=A.localX,t=A.localY;if(this.Ip===null)this.nm(A);else{this.zp=!1;const r=L(this.Lp),i=r.x+(e-this.Ip.x),n=r.y+(t-this.Ip.y);this.Gp(i,n,A)}}_v(A){this.$v().W().trackingMode.exitMode===0&&(this.zp=!0),this.om(),this.sm(A)}wr(A,e){const t=this.Np;return t===null?null:(function(r,i,n){const o=r.Uo(),a=(function(l,c,u){var d,g;let B,f;for(const w of l){const v=(g=(d=w.va)===null||d===void 0?void 0:d.call(w,c,u))!==null&&g!==void 0?g:[];for(const y of v)p=y.zOrder,(!(m=B?.zOrder)||p==="top"&&m!=="top"||p==="normal"&&m==="bottom")&&(B=y,f=w)}var p,m;return B&&f?{zv:B,Hc:f}:null})(o,i,n);if(a?.zv.zOrder==="top")return rr(a);for(const l of o){if(a&&a.Hc===l&&a.zv.zOrder!=="bottom"&&!a.zv.isBackground)return rr(a);const c=Ed(l.Pn(r),i,n);if(c!==null)return{Hc:l,Bv:c.Bv,Iv:c.Iv};if(a&&a.Hc===l&&a.zv.zOrder!=="bottom"&&a.zv.isBackground)return rr(a)}return a?.zv?rr(a):null})(t,A,e)}_m(A,e){L(e==="left"?this.Cp:this.Tp).cp(IA({width:A,height:this.Ev.height}))}um(){return this.Ev}cp(A){ut(this.Ev,A)||(this.Ev=A,this.jv=!0,this.Gv.resizeCanvasElement(A),this.Jv.resizeCanvasElement(A),this.jv=!1,this.Wp.style.width=A.width+"px",this.Wp.style.height=A.height+"px")}dm(){const A=L(this.Np);A.P_(A.R_()),A.P_(A.D_());for(const e of A.Ba())if(A.vr(e)){const t=e.Dt();t!==null&&A.P_(t),e.Vn()}}xp(){return this.Gv.bitmapSize}Sp(A,e,t){const r=this.xp();r.width>0&&r.height>0&&A.drawImage(this.Gv.canvasElement,e,t)}vp(A){if(A===0||this.Np===null)return;if(A>1&&this.dm(),this.Cp!==null&&this.Cp.vp(A),this.Tp!==null&&this.Tp.vp(A),A!==1){this.Gv.applySuggestedBitmapSize();const t=ft(this.Gv);t!==null&&(t.useBitmapCoordinateSpace((r=>{this.mp(r)})),this.Np&&(this.fm(t,xd),this.vm(t),this.pm(t),this.fm(t,ir),this.fm(t,Sd)))}this.Jv.applySuggestedBitmapSize();const e=ft(this.Jv);e!==null&&(e.useBitmapCoordinateSpace((({context:t,bitmapSize:r})=>{t.clearRect(0,0,r.width,r.height)})),this.bm(e),this.fm(e,Hd))}wm(){return this.Cp}gm(){return this.Tp}bp(A,e){this.fm(A,e)}Fp(){this.Np!==null&&this.Np.W_().p(this),this.Np=null}tm(A){this.im(this.Vp,A)}im(A,e){const t=e.localX,r=e.localY;A.M()&&A.m(this.$i().St().Nu(t),{x:t,y:r},e)}mp({context:A,bitmapSize:e}){const{width:t,height:r}=e,i=this.$i(),n=i.q(),o=i.bd();n===o?Rs(A,0,0,t,r,o):Zo(A,0,0,t,r,n,o)}vm(A){const e=L(this.Np).j_().qh().gt();e!==null&&e.X(A,!1)}pm(A){const e=this.$i().Yc();this.Mm(A,ir,$i,e),this.Mm(A,ir,tr,e)}bm(A){this.Mm(A,ir,tr,this.$i().Zc())}fm(A,e){const t=L(this.Np).Uo();for(const r of t)this.Mm(A,e,$i,r);for(const r of t)this.Mm(A,e,tr,r)}Mm(A,e,t,r){const i=L(this.Np),n=i.$t().Wc(),o=n!==null&&n.Hc===r,a=n!==null&&o&&n.Iv!==void 0?n.Iv.Mr:void 0;Ji(e,(l=>t(l,A,o,a)),r,i)}Zp(){if(this.Np===null)return;const A=this.Qd,e=this.Np.R_().W().visible,t=this.Np.D_().W().visible;e||this.Cp===null||(this.jp.removeChild(this.Cp.lp()),this.Cp.S(),this.Cp=null),t||this.Tp===null||(this.Hp.removeChild(this.Tp.lp()),this.Tp.S(),this.Tp=null);const r=A.$t().ud();e&&this.Cp===null&&(this.Cp=new Wa(this,A.W(),r,"left"),this.jp.appendChild(this.Cp.lp())),t&&this.Tp===null&&(this.Tp=new Wa(this,A.W(),r,"right"),this.Hp.appendChild(this.Tp.lp()))}xm(A){return A.Dv&&this.Ap||this.Ip!==null}Sm(A){return Math.max(0,Math.min(A,this.Ev.width-1))}km(A){return Math.max(0,Math.min(A,this.Ev.height-1))}Gp(A,e,t){this.$i().ld(this.Sm(A),this.km(e),t,L(this.Np))}hm(){this.$i().od()}om(){this.zp&&(this.Ip=null,this.hm())}rm(A,e,t){this.Ip=A,this.zp=!1,this.Gp(e.x,e.y,t);const r=this.$i().Zc();this.Lp={x:r.Yt(),y:r.Zt()}}$i(){return this.Qd.$t()}sm(A){if(!this.Dp)return;const e=this.$i(),t=this.fp();if(e.z_(t,t.vn()),this.Rp=null,this.Dp=!1,e.ed(),this.Ep!==null){const r=performance.now(),i=e.St();this.Ep.Vr(i.Hu(),r),this.Ep.Qu(r)||e.Zn(this.Ep)}}Kp(){this.Ip=null}Jp(){if(this.Np){if(this.$i().Un(),document.activeElement!==document.body&&document.activeElement!==document.documentElement)L(document.activeElement).blur();else{const A=document.getSelection();A!==null&&A.removeAllRanges()}!this.Np.vn().Ni()&&this.$i().St().Ni()}}nm(A){if(this.Np===null)return;const e=this.$i(),t=e.St();if(t.Ni())return;const r=this.Qd.W(),i=r.handleScroll,n=r.kineticScroll;if((!i.pressedMouseMove||A.Dv)&&(!i.horzTouchDrag&&!i.vertTouchDrag||!A.Dv))return;const o=this.Np.vn(),a=performance.now();if(this.Rp!==null||this.xm(A)||(this.Rp={x:A.clientX,y:A.clientY,Od:a,ym:A.localX,Cm:A.localY}),this.Rp!==null&&!this.Dp&&(this.Rp.x!==A.clientX||this.Rp.y!==A.clientY)){if(A.Dv&&n.touch||!A.Dv&&n.mouse){const l=t.le();this.Ep=new yd(.2/l,7/l,.997,15/l),this.Ep.Yd(t.Hu(),this.Rp.Od)}else this.Ep=null;o.Ni()||e.A_(this.Np,o,A.localY),e.nd(A.localX),this.Dp=!0}this.Dp&&(o.Ni()||e.I_(this.Np,o,A.localY),e.sd(A.localX),this.Ep!==null&&this.Ep.Yd(t.Hu(),a))}}class Xa{constructor(A,e,t,r,i){this.ft=!0,this.Ev=IA({width:0,height:0}),this.Hv=()=>this.vp(3),this.qv=A==="left",this.Oc=t.ud,this.cn=e,this.Tm=r,this.Pm=i,this.Kv=document.createElement("div"),this.Kv.style.width="25px",this.Kv.style.height="100%",this.Kv.style.overflow="hidden",this.Gv=Bt(this.Kv,IA({width:16,height:16})),this.Gv.subscribeSuggestedBitmapSizeChanged(this.Hv)}S(){this.Gv.unsubscribeSuggestedBitmapSizeChanged(this.Hv),gt(this.Gv.canvasElement),this.Gv.dispose()}lp(){return this.Kv}um(){return this.Ev}cp(A){ut(this.Ev,A)||(this.Ev=A,this.Gv.resizeCanvasElement(A),this.Kv.style.width=`${A.width}px`,this.Kv.style.height=`${A.height}px`,this.ft=!0)}vp(A){if(A<3&&!this.ft||this.Ev.width===0||this.Ev.height===0)return;this.ft=!1,this.Gv.applySuggestedBitmapSize();const e=ft(this.Gv);e!==null&&e.useBitmapCoordinateSpace((t=>{this.mp(t),this.Ie(t)}))}xp(){return this.Gv.bitmapSize}Sp(A,e,t){const r=this.xp();r.width>0&&r.height>0&&A.drawImage(this.Gv.canvasElement,e,t)}Ie({context:A,bitmapSize:e,horizontalPixelRatio:t,verticalPixelRatio:r}){if(!this.Tm())return;A.fillStyle=this.cn.timeScale.borderColor;const i=Math.floor(this.Oc.W().C*t),n=Math.floor(this.Oc.W().C*r),o=this.qv?e.width-i:0;A.fillRect(o,0,i,n)}mp({context:A,bitmapSize:e}){Rs(A,0,0,e.width,e.height,this.Pm())}}function An(s){return A=>{var e,t;return(t=(e=A.fa)===null||e===void 0?void 0:e.call(A,s))!==null&&t!==void 0?t:[]}}const Ld=An("normal"),Id=An("top"),Td=An("bottom");class Md{constructor(A,e){this.Rm=null,this.Dm=null,this.k=null,this.Vm=!1,this.Ev=IA({width:0,height:0}),this.Om=new KA,this.Fv=new rs(5),this.jv=!1,this.Hv=()=>{this.jv||this.Qd.$t().Uh()},this.Uv=()=>{this.jv||this.Qd.$t().Uh()},this.Qd=A,this.q_=e,this.cn=A.W().layout,this.Xd=document.createElement("tr"),this.Bm=document.createElement("td"),this.Bm.style.padding="0",this.Am=document.createElement("td"),this.Am.style.padding="0",this.Kv=document.createElement("td"),this.Kv.style.height="25px",this.Kv.style.padding="0",this.Im=document.createElement("div"),this.Im.style.width="100%",this.Im.style.height="100%",this.Im.style.position="relative",this.Im.style.overflow="hidden",this.Kv.appendChild(this.Im),this.Gv=Bt(this.Im,IA({width:16,height:16})),this.Gv.subscribeSuggestedBitmapSizeChanged(this.Hv);const t=this.Gv.canvasElement;t.style.position="absolute",t.style.zIndex="1",t.style.left="0",t.style.top="0",this.Jv=Bt(this.Im,IA({width:16,height:16})),this.Jv.subscribeSuggestedBitmapSizeChanged(this.Uv);const r=this.Jv.canvasElement;r.style.position="absolute",r.style.zIndex="2",r.style.left="0",r.style.top="0",this.Xd.appendChild(this.Bm),this.Xd.appendChild(this.Kv),this.Xd.appendChild(this.Am),this.zm(),this.Qd.$t().g_().l(this.zm.bind(this),this),this.hp=new Zi(this.Jv.canvasElement,this,{ev:()=>!0,rv:()=>!this.Qd.W().handleScroll.horzTouchDrag})}S(){this.hp.S(),this.Rm!==null&&this.Rm.S(),this.Dm!==null&&this.Dm.S(),this.Jv.unsubscribeSuggestedBitmapSizeChanged(this.Uv),gt(this.Jv.canvasElement),this.Jv.dispose(),this.Gv.unsubscribeSuggestedBitmapSizeChanged(this.Hv),gt(this.Gv.canvasElement),this.Gv.dispose()}lp(){return this.Xd}Lm(){return this.Rm}Em(){return this.Dm}bv(A){if(this.Vm)return;this.Vm=!0;const e=this.Qd.$t();!e.St().Ni()&&this.Qd.W().handleScale.axisPressedMouseMove.time&&e.Jc(A.localX)}pv(A){this.bv(A)}wv(){const A=this.Qd.$t();!A.St().Ni()&&this.Vm&&(this.Vm=!1,this.Qd.W().handleScale.axisPressedMouseMove.time&&A.hd())}av(A){const e=this.Qd.$t();!e.St().Ni()&&this.Qd.W().handleScale.axisPressedMouseMove.time&&e.rd(A.localX)}hv(A){this.av(A)}cv(){this.Vm=!1;const A=this.Qd.$t();A.St().Ni()&&!this.Qd.W().handleScale.axisPressedMouseMove.time||A.hd()}_v(){this.cv()}qf(){this.Qd.W().handleScale.axisDoubleClickReset.time&&this.Qd.$t().Kn()}jf(){this.qf()}Qf(){this.Qd.$t().W().handleScale.axisPressedMouseMove.time&&this.kp(1)}Pv(){this.kp(0)}um(){return this.Ev}Nm(){return this.Om}Fm(A,e,t){ut(this.Ev,A)||(this.Ev=A,this.jv=!0,this.Gv.resizeCanvasElement(A),this.Jv.resizeCanvasElement(A),this.jv=!1,this.Kv.style.width=`${A.width}px`,this.Kv.style.height=`${A.height}px`,this.Om.m(A)),this.Rm!==null&&this.Rm.cp(IA({width:e,height:A.height})),this.Dm!==null&&this.Dm.cp(IA({width:t,height:A.height}))}Wm(){const A=this.jm();return Math.ceil(A.C+A.T+A.P+A.L+A.B+A.Hm)}bt(){this.Qd.$t().St().Ha()}xp(){return this.Gv.bitmapSize}Sp(A,e,t){const r=this.xp();r.width>0&&r.height>0&&A.drawImage(this.Gv.canvasElement,e,t)}vp(A){if(A===0)return;if(A!==1){this.Gv.applySuggestedBitmapSize();const t=ft(this.Gv);t!==null&&(t.useBitmapCoordinateSpace((r=>{this.mp(r),this.Ie(r),this.$m(t,Td)})),this.wp(t),this.$m(t,Ld)),this.Rm!==null&&this.Rm.vp(A),this.Dm!==null&&this.Dm.vp(A)}this.Jv.applySuggestedBitmapSize();const e=ft(this.Jv);e!==null&&(e.useBitmapCoordinateSpace((({context:t,bitmapSize:r})=>{t.clearRect(0,0,r.width,r.height)})),this.Um([...this.Qd.$t().wt(),this.Qd.$t().Zc()],e),this.$m(e,Id))}$m(A,e){const t=this.Qd.$t().wt();for(const r of t)Ji(e,(i=>$i(i,A,!1,void 0)),r,void 0);for(const r of t)Ji(e,(i=>tr(i,A,!1,void 0)),r,void 0)}mp({context:A,bitmapSize:e}){Rs(A,0,0,e.width,e.height,this.Qd.$t().bd())}Ie({context:A,bitmapSize:e,verticalPixelRatio:t}){if(this.Qd.W().timeScale.borderVisible){A.fillStyle=this.qm();const r=Math.max(1,Math.floor(this.jm().C*t));A.fillRect(0,0,e.width,r)}}wp(A){const e=this.Qd.$t().St(),t=e.Ha();if(!t||t.length===0)return;const r=this.q_.maxTickMarkWeight(t),i=this.jm(),n=e.W();n.borderVisible&&n.ticksVisible&&A.useBitmapCoordinateSpace((({context:o,horizontalPixelRatio:a,verticalPixelRatio:l})=>{o.strokeStyle=this.qm(),o.fillStyle=this.qm();const c=Math.max(1,Math.floor(a)),u=Math.floor(.5*a);o.beginPath();const d=Math.round(i.T*l);for(let g=t.length;g--;){const B=Math.round(t[g].coord*a);o.rect(B-u,0,c,d)}o.fill()})),A.useMediaCoordinateSpace((({context:o})=>{const a=i.C+i.T+i.L+i.P/2;o.textAlign="center",o.textBaseline="middle",o.fillStyle=this.$(),o.font=this._p();for(const l of t)if(l.weight<r){const c=l.needAlignCoordinate?this.Ym(o,l.coord,l.label):l.coord;o.fillText(l.label,c,a)}this.Qd.W().timeScale.allowBoldLabels&&(o.font=this.Zm());for(const l of t)if(l.weight>=r){const c=l.needAlignCoordinate?this.Ym(o,l.coord,l.label):l.coord;o.fillText(l.label,c,a)}}))}Ym(A,e,t){const r=this.Fv.xi(A,t),i=r/2,n=Math.floor(e-i)+.5;return n<0?e+=Math.abs(0-n):n+r>this.Ev.width&&(e-=Math.abs(this.Ev.width-(n+r))),e}Um(A,e){const t=this.jm();for(const r of A)for(const i of r.Qi())i.gt().X(e,t)}qm(){return this.Qd.W().timeScale.borderColor}$(){return this.cn.textColor}j(){return this.cn.fontSize}_p(){return Lt(this.j(),this.cn.fontFamily)}Zm(){return Lt(this.j(),this.cn.fontFamily,"bold")}jm(){this.k===null&&(this.k={C:1,N:NaN,L:NaN,B:NaN,ji:NaN,T:5,P:NaN,R:"",Wi:new rs,Hm:0});const A=this.k,e=this._p();if(A.R!==e){const t=this.j();A.P=t,A.R=e,A.L=3*t/12,A.B=3*t/12,A.ji=9*t/12,A.N=0,A.Hm=4*t/12,A.Wi.nr()}return this.k}kp(A){this.Kv.style.cursor=A===1?"ew-resize":"default"}zm(){const A=this.Qd.$t(),e=A.W();e.leftPriceScale.visible||this.Rm===null||(this.Bm.removeChild(this.Rm.lp()),this.Rm.S(),this.Rm=null),e.rightPriceScale.visible||this.Dm===null||(this.Am.removeChild(this.Dm.lp()),this.Dm.S(),this.Dm=null);const t={ud:this.Qd.$t().ud()},r=()=>e.leftPriceScale.borderVisible&&A.St().W().borderVisible,i=()=>A.bd();e.leftPriceScale.visible&&this.Rm===null&&(this.Rm=new Xa("left",e,t,r,i),this.Bm.appendChild(this.Rm.lp())),e.rightPriceScale.visible&&this.Dm===null&&(this.Dm=new Xa("right",e,t,r,i),this.Am.appendChild(this.Dm.lp()))}}const Dd=!!Mt&&!!navigator.userAgentData&&navigator.userAgentData.brands.some((s=>s.brand.includes("Chromium")))&&!!Mt&&(!((en=navigator?.userAgentData)===null||en===void 0)&&en.platform?navigator.userAgentData.platform==="Windows":navigator.userAgent.toLowerCase().indexOf("win")>=0);var en;class kd{constructor(A,e,t){var r;this.Xm=[],this.Km=0,this.ho=0,this.__=0,this.Gm=0,this.Jm=0,this.Qm=null,this.tb=!1,this.Vp=new KA,this.Op=new KA,this.Rc=new KA,this.ib=null,this.nb=null,this.Jd=A,this.cn=e,this.q_=t,this.Xd=document.createElement("div"),this.Xd.classList.add("tv-lightweight-charts"),this.Xd.style.overflow="hidden",this.Xd.style.direction="ltr",this.Xd.style.width="100%",this.Xd.style.height="100%",(r=this.Xd).style.userSelect="none",r.style.webkitUserSelect="none",r.style.msUserSelect="none",r.style.MozUserSelect="none",r.style.webkitTapHighlightColor="transparent",this.sb=document.createElement("table"),this.sb.setAttribute("cellspacing","0"),this.Xd.appendChild(this.sb),this.eb=this.rb.bind(this),tn(this.cn)&&this.hb(!0),this.$i=new md(this.Vc.bind(this),this.cn,t),this.$t().Xc().l(this.lb.bind(this),this),this.ab=new Md(this,this.q_),this.sb.appendChild(this.ab.lp());const i=e.autoSize&&this.ob();let n=this.cn.width,o=this.cn.height;if(i||n===0||o===0){const a=A.getBoundingClientRect();n=n||a.width,o=o||a.height}this._b(n,o),this.ub(),A.appendChild(this.Xd),this.cb(),this.$i.St().ec().l(this.$i.Kl.bind(this.$i),this),this.$i.g_().l(this.$i.Kl.bind(this.$i),this)}$t(){return this.$i}W(){return this.cn}Yp(){return this.Xm}fb(){return this.ab}S(){this.hb(!1),this.Km!==0&&window.cancelAnimationFrame(this.Km),this.$i.Xc().p(this),this.$i.St().ec().p(this),this.$i.g_().p(this),this.$i.S();for(const A of this.Xm)this.sb.removeChild(A.lp()),A.lm().p(this),A.am().p(this),A.S();this.Xm=[],L(this.ab).S(),this.Xd.parentElement!==null&&this.Xd.parentElement.removeChild(this.Xd),this.Rc.S(),this.Vp.S(),this.Op.S(),this.pb()}_b(A,e,t=!1){if(this.ho===e&&this.__===A)return;const r=(function(o){const a=Math.floor(o.width),l=Math.floor(o.height);return IA({width:a-a%2,height:l-l%2})})(IA({width:A,height:e}));this.ho=r.height,this.__=r.width;const i=this.ho+"px",n=this.__+"px";L(this.Xd).style.height=i,L(this.Xd).style.width=n,this.sb.style.height=i,this.sb.style.width=n,t?this.mb(YA.es(),performance.now()):this.$i.Kl()}vp(A){A===void 0&&(A=YA.es());for(let e=0;e<this.Xm.length;e++)this.Xm[e].vp(A.Hn(e).Fn);this.cn.timeScale.visible&&this.ab.vp(A.jn())}$h(A){const e=tn(this.cn);this.$i.$h(A);const t=tn(this.cn);t!==e&&this.hb(t),this.cb(),this.bb(A)}lm(){return this.Vp}am(){return this.Op}Xc(){return this.Rc}wb(){this.Qm!==null&&(this.mb(this.Qm,performance.now()),this.Qm=null);const A=this.gb(null),e=document.createElement("canvas");e.width=A.width,e.height=A.height;const t=L(e.getContext("2d"));return this.gb(t),e}Mb(A){return A==="left"&&!this.xb()||A==="right"&&!this.Sb()||this.Xm.length===0?0:L(A==="left"?this.Xm[0].wm():this.Xm[0].gm()).dp()}kb(){return this.cn.autoSize&&this.ib!==null}yb(){return this.Xd}Qp(A){this.nb=A,this.nb?this.yb().style.setProperty("cursor",A):this.yb().style.removeProperty("cursor")}Cb(){return this.nb}Tb(){return ne(this.Xm[0]).um()}bb(A){(A.autoSize!==void 0||!this.ib||A.width===void 0&&A.height===void 0)&&(A.autoSize&&!this.ib&&this.ob(),A.autoSize===!1&&this.ib!==null&&this.pb(),A.autoSize||A.width===void 0&&A.height===void 0||this._b(A.width||this.__,A.height||this.ho))}gb(A){let e=0,t=0;const r=this.Xm[0],i=(o,a)=>{let l=0;for(let c=0;c<this.Xm.length;c++){const u=this.Xm[c],d=L(o==="left"?u.wm():u.gm()),g=d.xp();A!==null&&d.Sp(A,a,l),l+=g.height}};this.xb()&&(i("left",0),e+=L(r.wm()).xp().width);for(let o=0;o<this.Xm.length;o++){const a=this.Xm[o],l=a.xp();A!==null&&a.Sp(A,e,t),t+=l.height}e+=r.xp().width,this.Sb()&&(i("right",e),e+=L(r.gm()).xp().width);const n=(o,a,l)=>{L(o==="left"?this.ab.Lm():this.ab.Em()).Sp(L(A),a,l)};if(this.cn.timeScale.visible){const o=this.ab.xp();if(A!==null){let a=0;this.xb()&&(n("left",a,t),a=L(r.wm()).xp().width),this.ab.Sp(A,a,t),a+=o.width,this.Sb()&&n("right",a,t)}t+=o.height}return IA({width:e,height:t})}Pb(){let A=0,e=0,t=0;for(const B of this.Xm)this.xb()&&(e=Math.max(e,L(B.wm()).op(),this.cn.leftPriceScale.minimumWidth)),this.Sb()&&(t=Math.max(t,L(B.gm()).op(),this.cn.rightPriceScale.minimumWidth)),A+=B.M_();e=zi(e),t=zi(t);const r=this.__,i=this.ho,n=Math.max(r-e-t,0),o=this.cn.timeScale.visible;let a=o?Math.max(this.ab.Wm(),this.cn.timeScale.minimumHeight):0;var l;a=(l=a)+l%2;const c=0+a,u=i<c?0:i-c,d=u/A;let g=0;for(let B=0;B<this.Xm.length;++B){const f=this.Xm[B];f.qp(this.$i.qc()[B]);let p=0,m=0;m=B===this.Xm.length-1?u-g:Math.round(f.M_()*d),p=Math.max(m,2),g+=p,f.cp(IA({width:n,height:p})),this.xb()&&f._m(e,"left"),this.Sb()&&f._m(t,"right"),f.fp()&&this.$i.Kc(f.fp(),p)}this.ab.Fm(IA({width:o?n:0,height:a}),o?e:0,o?t:0),this.$i.S_(n),this.Gm!==e&&(this.Gm=e),this.Jm!==t&&(this.Jm=t)}hb(A){A?this.Xd.addEventListener("wheel",this.eb,{passive:!1}):this.Xd.removeEventListener("wheel",this.eb)}Rb(A){switch(A.deltaMode){case A.DOM_DELTA_PAGE:return 120;case A.DOM_DELTA_LINE:return 32}return Dd?1/window.devicePixelRatio:1}rb(A){if(!(A.deltaX!==0&&this.cn.handleScroll.mouseWheel||A.deltaY!==0&&this.cn.handleScale.mouseWheel))return;const e=this.Rb(A),t=e*A.deltaX/100,r=-e*A.deltaY/100;if(A.cancelable&&A.preventDefault(),r!==0&&this.cn.handleScale.mouseWheel){const i=Math.sign(r)*Math.min(1,Math.abs(r)),n=A.clientX-this.Xd.getBoundingClientRect().left;this.$t().Qc(n,i)}t!==0&&this.cn.handleScroll.mouseWheel&&this.$t().td(-80*t)}mb(A,e){var t;const r=A.jn();r===3&&this.Db(),r!==3&&r!==2||(this.Vb(A),this.Ob(A,e),this.ab.bt(),this.Xm.forEach((i=>{i.Xp()})),((t=this.Qm)===null||t===void 0?void 0:t.jn())===3&&(this.Qm.ts(A),this.Db(),this.Vb(this.Qm),this.Ob(this.Qm,e),A=this.Qm,this.Qm=null)),this.vp(A)}Ob(A,e){for(const t of A.Qn())this.ns(t,e)}Vb(A){const e=this.$i.qc();for(let t=0;t<e.length;t++)A.Hn(t).Wn&&e[t].N_()}ns(A,e){const t=this.$i.St();switch(A.qn){case 0:t.hc();break;case 1:t.lc(A.Vt);break;case 2:t.Gn(A.Vt);break;case 3:t.Jn(A.Vt);break;case 4:t.qu();break;case 5:A.Vt.Qu(e)||t.Jn(A.Vt.tc(e))}}Vc(A){this.Qm!==null?this.Qm.ts(A):this.Qm=A,this.tb||(this.tb=!0,this.Km=window.requestAnimationFrame((e=>{if(this.tb=!1,this.Km=0,this.Qm!==null){const t=this.Qm;this.Qm=null,this.mb(t,e);for(const r of t.Qn())if(r.qn===5&&!r.Vt.Qu(e)){this.$t().Zn(r.Vt);break}}})))}Db(){this.ub()}ub(){const A=this.$i.qc(),e=A.length,t=this.Xm.length;for(let r=e;r<t;r++){const i=ne(this.Xm.pop());this.sb.removeChild(i.lp()),i.lm().p(this),i.am().p(this),i.S()}for(let r=t;r<e;r++){const i=new ji(this,A[r]);i.lm().l(this.Bb.bind(this),this),i.am().l(this.Ab.bind(this),this),this.Xm.push(i),this.sb.insertBefore(i.lp(),this.ab.lp())}for(let r=0;r<e;r++){const i=A[r],n=this.Xm[r];n.fp()!==i?n.qp(i):n.Up()}this.cb(),this.Pb()}Ib(A,e,t){var r;const i=new Map;A!==null&&this.$i.wt().forEach((c=>{const u=c.In().ll(A);u!==null&&i.set(c,u)}));let n;if(A!==null){const c=(r=this.$i.St().Ui(A))===null||r===void 0?void 0:r.originalTime;c!==void 0&&(n=c)}const o=this.$t().Wc(),a=o!==null&&o.Hc instanceof ki?o.Hc:void 0,l=o!==null&&o.Iv!==void 0?o.Iv.gr:void 0;return{zb:n,ee:A??void 0,Lb:e??void 0,Eb:a,Nb:i,Fb:l,Wb:t??void 0}}Bb(A,e,t){this.Vp.m((()=>this.Ib(A,e,t)))}Ab(A,e,t){this.Op.m((()=>this.Ib(A,e,t)))}lb(A,e,t){this.Rc.m((()=>this.Ib(A,e,t)))}cb(){const A=this.cn.timeScale.visible?"":"none";this.ab.lp().style.display=A}xb(){return this.Xm[0].fp().R_().W().visible}Sb(){return this.Xm[0].fp().D_().W().visible}ob(){return"ResizeObserver"in window&&(this.ib=new ResizeObserver((A=>{const e=A.find((t=>t.target===this.Jd));e&&this._b(e.contentRect.width,e.contentRect.height)})),this.ib.observe(this.Jd,{box:"border-box"}),!0)}pb(){this.ib!==null&&this.ib.disconnect(),this.ib=null}}function tn(s){return!!(s.handleScroll.mouseWheel||s.handleScale.mouseWheel)}function _d(s){return(function(A){return A.open!==void 0})(s)||(function(A){return A.value!==void 0})(s)}function $a(s,A){var e={};for(var t in s)Object.prototype.hasOwnProperty.call(s,t)&&A.indexOf(t)<0&&(e[t]=s[t]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function"){var r=0;for(t=Object.getOwnPropertySymbols(s);r<t.length;r++)A.indexOf(t[r])<0&&Object.prototype.propertyIsEnumerable.call(s,t[r])&&(e[t[r]]=s[t[r]])}return e}function Ja(s,A,e,t){const r=e.value,i={ee:A,ot:s,Vt:[r,r,r,r],zb:t};return e.color!==void 0&&(i.V=e.color),i}function Od(s,A,e,t){const r=e.value,i={ee:A,ot:s,Vt:[r,r,r,r],zb:t};return e.lineColor!==void 0&&(i.lt=e.lineColor),e.topColor!==void 0&&(i.Ps=e.topColor),e.bottomColor!==void 0&&(i.Rs=e.bottomColor),i}function Nd(s,A,e,t){const r=e.value,i={ee:A,ot:s,Vt:[r,r,r,r],zb:t};return e.topLineColor!==void 0&&(i.Re=e.topLineColor),e.bottomLineColor!==void 0&&(i.De=e.bottomLineColor),e.topFillColor1!==void 0&&(i.ke=e.topFillColor1),e.topFillColor2!==void 0&&(i.ye=e.topFillColor2),e.bottomFillColor1!==void 0&&(i.Ce=e.bottomFillColor1),e.bottomFillColor2!==void 0&&(i.Te=e.bottomFillColor2),i}function Kd(s,A,e,t){const r={ee:A,ot:s,Vt:[e.open,e.high,e.low,e.close],zb:t};return e.color!==void 0&&(r.V=e.color),r}function Vd(s,A,e,t){const r={ee:A,ot:s,Vt:[e.open,e.high,e.low,e.close],zb:t};return e.color!==void 0&&(r.V=e.color),e.borderColor!==void 0&&(r.Ot=e.borderColor),e.wickColor!==void 0&&(r.Xh=e.wickColor),r}function Pd(s,A,e,t,r){const i=ne(r)(e),n=Math.max(...i),o=Math.min(...i),a=i[i.length-1],l=[a,n,o,a],c=e,{time:u,color:d}=c;return{ee:A,ot:s,Vt:l,zb:t,$e:$a(c,["time","color"]),V:d}}function nr(s){return s.Vt!==void 0}function Za(s,A){return A.customValues!==void 0&&(s.jb=A.customValues),s}function pt(s){return(A,e,t,r,i,n)=>(function(o,a){return a?a(o):(l=o).open===void 0&&l.value===void 0;var l})(t,n)?Za({ot:A,ee:e,zb:r},t):Za(s(A,e,t,r,i),t)}function Ya(s){return{Candlestick:pt(Vd),Bar:pt(Kd),Area:pt(Od),Baseline:pt(Nd),Histogram:pt(Ja),Line:pt(Ja),Custom:pt(Pd)}[s]}function qa(s){return{ee:0,Hb:new Map,la:s}}function ja(s,A){if(s!==void 0&&s.length!==0)return{$b:A.key(s[0].ot),Ub:A.key(s[s.length-1].ot)}}function Al(s){let A;return s.forEach((e=>{A===void 0&&(A=e.zb)})),ne(A)}class Gd{constructor(A){this.qb=new Map,this.Yb=new Map,this.Zb=new Map,this.Xb=[],this.q_=A}S(){this.qb.clear(),this.Yb.clear(),this.Zb.clear(),this.Xb=[]}Kb(A,e){let t=this.qb.size!==0,r=!1;const i=this.Yb.get(A);if(i!==void 0)if(this.Yb.size===1)t=!1,r=!0,this.qb.clear();else for(const a of this.Xb)a.pointData.Hb.delete(A)&&(r=!0);let n=[];if(e.length!==0){const a=e.map((g=>g.time)),l=this.q_.createConverterToInternalObj(e),c=Ya(A.Qh()),u=A.Ca(),d=A.Ta();n=e.map(((g,B)=>{const f=l(g.time),p=this.q_.key(f);let m=this.qb.get(p);m===void 0&&(m=qa(f),this.qb.set(p,m),r=!0);const w=c(f,m.ee,g,a[B],u,d);return m.Hb.set(A,w),w}))}t&&this.Gb(),this.Jb(A,n);let o=-1;if(r){const a=[];this.qb.forEach((l=>{a.push({timeWeight:0,time:l.la,pointData:l,originalTime:Al(l.Hb)})})),a.sort(((l,c)=>this.q_.key(l.time)-this.q_.key(c.time))),o=this.Qb(a)}return this.tw(A,o,(function(a,l,c){const u=ja(a,c),d=ja(l,c);if(u!==void 0&&d!==void 0)return{ta:u.Ub>=d.Ub&&u.$b>=d.$b}})(this.Yb.get(A),i,this.q_))}vd(A){return this.Kb(A,[])}iw(A,e){const t=e;(function(f){f.zb===void 0&&(f.zb=f.time)})(t),this.q_.preprocessData(e);const r=this.q_.createConverterToInternalObj([e])(e.time),i=this.Zb.get(A);if(i!==void 0&&this.q_.key(r)<this.q_.key(i))throw new Error(`Cannot update oldest data, last time=${i}, new time=${r}`);let n=this.qb.get(this.q_.key(r));const o=n===void 0;n===void 0&&(n=qa(r),this.qb.set(this.q_.key(r),n));const a=Ya(A.Qh()),l=A.Ca(),c=A.Ta(),u=a(r,n.ee,e,t.zb,l,c);n.Hb.set(A,u),this.nw(A,u);const d={ta:nr(u)};if(!o)return this.tw(A,-1,d);const g={timeWeight:0,time:n.la,pointData:n,originalTime:Al(n.Hb)},B=ss(this.Xb,this.q_.key(g.time),((f,p)=>this.q_.key(f.time)<p));this.Xb.splice(B,0,g);for(let f=B;f<this.Xb.length;++f)sn(this.Xb[f].pointData,f);return this.q_.fillWeightsForPoints(this.Xb,B),this.tw(A,B,d)}nw(A,e){let t=this.Yb.get(A);t===void 0&&(t=[],this.Yb.set(A,t));const r=t.length!==0?t[t.length-1]:null;r===null||this.q_.key(e.ot)>this.q_.key(r.ot)?nr(e)&&t.push(e):nr(e)?t[t.length-1]=e:t.splice(-1,1),this.Zb.set(A,e.ot)}Jb(A,e){e.length!==0?(this.Yb.set(A,e.filter(nr)),this.Zb.set(A,e[e.length-1].ot)):(this.Yb.delete(A),this.Zb.delete(A))}Gb(){for(const A of this.Xb)A.pointData.Hb.size===0&&this.qb.delete(this.q_.key(A.time))}Qb(A){let e=-1;for(let t=0;t<this.Xb.length&&t<A.length;++t){const r=this.Xb[t],i=A[t];if(this.q_.key(r.time)!==this.q_.key(i.time)){e=t;break}i.timeWeight=r.timeWeight,sn(i.pointData,t)}if(e===-1&&this.Xb.length!==A.length&&(e=Math.min(this.Xb.length,A.length)),e===-1)return-1;for(let t=e;t<A.length;++t)sn(A[t].pointData,t);return this.q_.fillWeightsForPoints(A,e),this.Xb=A,e}sw(){if(this.Yb.size===0)return null;let A=0;return this.Yb.forEach((e=>{e.length!==0&&(A=Math.max(A,e[e.length-1].ee))})),A}tw(A,e,t){const r={ew:new Map,St:{Eu:this.sw()}};if(e!==-1)this.Yb.forEach(((i,n)=>{r.ew.set(n,{$e:i,rw:n===A?t:void 0})})),this.Yb.has(A)||r.ew.set(A,{$e:[],rw:t}),r.St.hw=this.Xb,r.St.lw=e;else{const i=this.Yb.get(A);r.ew.set(A,{$e:i||[],rw:t})}return r}}function sn(s,A){s.ee=A,s.Hb.forEach((e=>{e.ee=A}))}function rn(s){const A={value:s.Vt[3],time:s.zb};return s.jb!==void 0&&(A.customValues=s.jb),A}function el(s){const A=rn(s);return s.V!==void 0&&(A.color=s.V),A}function Rd(s){const A=rn(s);return s.lt!==void 0&&(A.lineColor=s.lt),s.Ps!==void 0&&(A.topColor=s.Ps),s.Rs!==void 0&&(A.bottomColor=s.Rs),A}function zd(s){const A=rn(s);return s.Re!==void 0&&(A.topLineColor=s.Re),s.De!==void 0&&(A.bottomLineColor=s.De),s.ke!==void 0&&(A.topFillColor1=s.ke),s.ye!==void 0&&(A.topFillColor2=s.ye),s.Ce!==void 0&&(A.bottomFillColor1=s.Ce),s.Te!==void 0&&(A.bottomFillColor2=s.Te),A}function tl(s){const A={open:s.Vt[0],high:s.Vt[1],low:s.Vt[2],close:s.Vt[3],time:s.zb};return s.jb!==void 0&&(A.customValues=s.jb),A}function Wd(s){const A=tl(s);return s.V!==void 0&&(A.color=s.V),A}function Xd(s){const A=tl(s),{V:e,Ot:t,Xh:r}=s;return e!==void 0&&(A.color=e),t!==void 0&&(A.borderColor=t),r!==void 0&&(A.wickColor=r),A}function nn(s){return{Area:Rd,Line:el,Baseline:zd,Histogram:el,Bar:Wd,Candlestick:Xd,Custom:$d}[s]}function $d(s){const A=s.zb;return Object.assign(Object.assign({},s.$e),{time:A})}const Jd={vertLine:{color:"#9598A1",width:1,style:3,visible:!0,labelVisible:!0,labelBackgroundColor:"#131722"},horzLine:{color:"#9598A1",width:1,style:3,visible:!0,labelVisible:!0,labelBackgroundColor:"#131722"},mode:1},Zd={vertLines:{color:"#D6DCDE",style:0,visible:!0},horzLines:{color:"#D6DCDE",style:0,visible:!0}},Yd={background:{type:"solid",color:"#FFFFFF"},textColor:"#191919",fontSize:12,fontFamily:yi,attributionLogo:!0},on={autoScale:!0,mode:0,invertScale:!1,alignLabels:!0,borderVisible:!0,borderColor:"#2B2B43",entireTextOnly:!1,visible:!1,ticksVisible:!1,scaleMargins:{bottom:.1,top:.2},minimumWidth:0},qd={rightOffset:0,barSpacing:6,minBarSpacing:.5,fixLeftEdge:!1,fixRightEdge:!1,lockVisibleTimeRangeOnResize:!1,rightBarStaysOnScroll:!1,borderVisible:!0,borderColor:"#2B2B43",visible:!0,timeVisible:!1,secondsVisible:!0,shiftVisibleRangeOnNewBar:!0,allowShiftVisibleRangeOnWhitespaceReplacement:!1,ticksVisible:!1,uniformDistribution:!1,minimumHeight:0,allowBoldLabels:!0},jd={color:"rgba(0, 0, 0, 0)",visible:!1,fontSize:48,fontFamily:yi,fontStyle:"",text:"",horzAlign:"center",vertAlign:"center"};function sl(){return{width:0,height:0,autoSize:!1,layout:Yd,crosshair:Jd,grid:Zd,overlayPriceScales:Object.assign({},on),leftPriceScale:Object.assign(Object.assign({},on),{visible:!1}),rightPriceScale:Object.assign(Object.assign({},on),{visible:!0}),timeScale:qd,watermark:jd,localization:{locale:Mt?navigator.language:"",dateFormat:"dd MMM 'yy"},handleScroll:{mouseWheel:!0,pressedMouseMove:!0,horzTouchDrag:!0,vertTouchDrag:!0},handleScale:{axisPressedMouseMove:{time:!0,price:!0},axisDoubleClickReset:{time:!0,price:!0},mouseWheel:!0,pinch:!0},kineticScroll:{mouse:!1,touch:!0},trackingMode:{exitMode:1}}}class AB{constructor(A,e){this.aw=A,this.ow=e}applyOptions(A){this.aw.$t().$c(this.ow,A)}options(){return this.Li().W()}width(){return Ws(this.ow)?this.aw.Mb(this.ow):0}Li(){return L(this.aw.$t().Uc(this.ow)).Dt}}function rl(s,A,e){const t=$a(s,["time","originalTime"]),r=Object.assign({time:A},t);return e!==void 0&&(r.originalTime=e),r}const eB={color:"#FF0000",price:0,lineStyle:2,lineWidth:1,lineVisible:!0,axisLabelVisible:!0,title:"",axisLabelColor:"",axisLabelTextColor:""};class tB{constructor(A){this.Nh=A}applyOptions(A){this.Nh.$h(A)}options(){return this.Nh.W()}_w(){return this.Nh}}class sB{constructor(A,e,t,r,i){this.uw=new KA,this.Es=A,this.cw=e,this.dw=t,this.q_=i,this.fw=r}S(){this.uw.S()}priceFormatter(){return this.Es.ba()}priceToCoordinate(A){const e=this.Es.Ct();return e===null?null:this.Es.Dt().Rt(A,e.Vt)}coordinateToPrice(A){const e=this.Es.Ct();return e===null?null:this.Es.Dt().pn(A,e.Vt)}barsInLogicalRange(A){if(A===null)return null;const e=new Tt(new cs(A.from,A.to)).lu(),t=this.Es.In();if(t.Ni())return null;const r=t.ll(e.Os(),1),i=t.ll(e.ui(),-1),n=L(t.el()),o=L(t.An());if(r!==null&&i!==null&&r.ee>i.ee)return{barsBefore:A.from-n,barsAfter:o-A.to};const a={barsBefore:r===null||r.ee===n?A.from-n:r.ee-n,barsAfter:i===null||i.ee===o?o-A.to:o-i.ee};return r!==null&&i!==null&&(a.from=r.zb,a.to=i.zb),a}setData(A){this.q_,this.Es.Qh(),this.cw.pw(this.Es,A),this.mw("full")}update(A){this.Es.Qh(),this.cw.bw(this.Es,A),this.mw("update")}dataByIndex(A,e){const t=this.Es.In().ll(A,e);return t===null?null:nn(this.seriesType())(t)}data(){const A=nn(this.seriesType());return this.Es.In().ne().map((e=>A(e)))}subscribeDataChanged(A){this.uw.l(A)}unsubscribeDataChanged(A){this.uw.v(A)}setMarkers(A){this.q_;const e=A.map((t=>rl(t,this.q_.convertHorzItemToInternal(t.time),t.time)));this.Es.na(e)}markers(){return this.Es.sa().map((A=>rl(A,A.originalTime,void 0)))}applyOptions(A){this.Es.$h(A)}options(){return Xe(this.Es.W())}priceScale(){return this.dw.priceScale(this.Es.Dt().Pa())}createPriceLine(A){const e=Ee(Xe(eB),A),t=this.Es.ea(e);return new tB(t)}removePriceLine(A){this.Es.ra(A._w())}seriesType(){return this.Es.Qh()}attachPrimitive(A){this.Es.ka(A),A.attached&&A.attached({chart:this.fw,series:this,requestUpdate:()=>this.Es.$t().Kl()})}detachPrimitive(A){this.Es.ya(A),A.detached&&A.detached()}mw(A){this.uw.M()&&this.uw.m(A)}}class rB{constructor(A,e,t){this.ww=new KA,this.mu=new KA,this.Om=new KA,this.$i=A,this.yl=A.St(),this.ab=e,this.yl.nc().l(this.gw.bind(this)),this.yl.sc().l(this.Mw.bind(this)),this.ab.Nm().l(this.xw.bind(this)),this.q_=t}S(){this.yl.nc().p(this),this.yl.sc().p(this),this.ab.Nm().p(this),this.ww.S(),this.mu.S(),this.Om.S()}scrollPosition(){return this.yl.Hu()}scrollToPosition(A,e){e?this.yl.Ju(A,1e3):this.$i.Jn(A)}scrollToRealTime(){this.yl.Gu()}getVisibleRange(){const A=this.yl.Vu();return A===null?null:{from:A.from.originalTime,to:A.to.originalTime}}setVisibleRange(A){const e={from:this.q_.convertHorzItemToInternal(A.from),to:this.q_.convertHorzItemToInternal(A.to)},t=this.yl.Iu(e);this.$i.pd(t)}getVisibleLogicalRange(){const A=this.yl.Du();return A===null?null:{from:A.Os(),to:A.ui()}}setVisibleLogicalRange(A){je(A.from<=A.to,"The from index cannot be after the to index."),this.$i.pd(A)}resetTimeScale(){this.$i.Kn()}fitContent(){this.$i.hc()}logicalToCoordinate(A){const e=this.$i.St();return e.Ni()?null:e.It(A)}coordinateToLogical(A){return this.yl.Ni()?null:this.yl.Nu(A)}timeToCoordinate(A){const e=this.q_.convertHorzItemToInternal(A),t=this.yl.Va(e,!1);return t===null?null:this.yl.It(t)}coordinateToTime(A){const e=this.$i.St(),t=e.Nu(A),r=e.Ui(t);return r===null?null:r.originalTime}width(){return this.ab.um().width}height(){return this.ab.um().height}subscribeVisibleTimeRangeChange(A){this.ww.l(A)}unsubscribeVisibleTimeRangeChange(A){this.ww.v(A)}subscribeVisibleLogicalRangeChange(A){this.mu.l(A)}unsubscribeVisibleLogicalRangeChange(A){this.mu.v(A)}subscribeSizeChange(A){this.Om.l(A)}unsubscribeSizeChange(A){this.Om.v(A)}applyOptions(A){this.yl.$h(A)}options(){return Object.assign(Object.assign({},Xe(this.yl.W())),{barSpacing:this.yl.le()})}gw(){this.ww.M()&&this.ww.m(this.getVisibleRange())}Mw(){this.mu.M()&&this.mu.m(this.getVisibleLogicalRange())}xw(A){this.Om.m(A.width,A.height)}}function iB(s){if(s===void 0||s.type==="custom")return;const A=s;A.minMove!==void 0&&A.precision===void 0&&(A.precision=(function(e){if(e>=1)return 0;let t=0;for(;t<8;t++){const r=Math.round(e);if(Math.abs(r-e)<1e-8)return t;e*=10}return t})(A.minMove))}function il(s){return(function(A){if(Gs(A.handleScale)){const t=A.handleScale;A.handleScale={axisDoubleClickReset:{time:t,price:t},axisPressedMouseMove:{time:t,price:t},mouseWheel:t,pinch:t}}else if(A.handleScale!==void 0){const{axisPressedMouseMove:t,axisDoubleClickReset:r}=A.handleScale;Gs(t)&&(A.handleScale.axisPressedMouseMove={time:t,price:t}),Gs(r)&&(A.handleScale.axisDoubleClickReset={time:r,price:r})}const e=A.handleScroll;Gs(e)&&(A.handleScroll={horzTouchDrag:e,vertTouchDrag:e,mouseWheel:e,pressedMouseMove:e})})(s),s}class nB{constructor(A,e,t){this.Sw=new Map,this.kw=new Map,this.yw=new KA,this.Cw=new KA,this.Tw=new KA,this.Pw=new Gd(e);const r=t===void 0?Xe(sl()):Ee(Xe(sl()),il(t));this.q_=e,this.aw=new kd(A,r,e),this.aw.lm().l((n=>{this.yw.M()&&this.yw.m(this.Rw(n()))}),this),this.aw.am().l((n=>{this.Cw.M()&&this.Cw.m(this.Rw(n()))}),this),this.aw.Xc().l((n=>{this.Tw.M()&&this.Tw.m(this.Rw(n()))}),this);const i=this.aw.$t();this.Dw=new rB(i,this.aw.fb(),this.q_)}remove(){this.aw.lm().p(this),this.aw.am().p(this),this.aw.Xc().p(this),this.Dw.S(),this.aw.S(),this.Sw.clear(),this.kw.clear(),this.yw.S(),this.Cw.S(),this.Tw.S(),this.Pw.S()}resize(A,e,t){this.autoSizeActive()||this.aw._b(A,e,t)}addCustomSeries(A,e){const t=Ht(A),r=Object.assign(Object.assign({},Ko),t.defaultOptions());return this.Vw("Custom",r,e,t)}addAreaSeries(A){return this.Vw("Area",Pu,A)}addBaselineSeries(A){return this.Vw("Baseline",Gu,A)}addBarSeries(A){return this.Vw("Bar",Ku,A)}addCandlestickSeries(A={}){return(function(e){e.borderColor!==void 0&&(e.borderUpColor=e.borderColor,e.borderDownColor=e.borderColor),e.wickColor!==void 0&&(e.wickUpColor=e.wickColor,e.wickDownColor=e.wickColor)})(A),this.Vw("Candlestick",Nu,A)}addHistogramSeries(A){return this.Vw("Histogram",Ru,A)}addLineSeries(A){return this.Vw("Line",Vu,A)}removeSeries(A){const e=ne(this.Sw.get(A)),t=this.Pw.vd(e);this.aw.$t().vd(e),this.Ow(t),this.Sw.delete(A),this.kw.delete(e)}pw(A,e){this.Ow(this.Pw.Kb(A,e))}bw(A,e){this.Ow(this.Pw.iw(A,e))}subscribeClick(A){this.yw.l(A)}unsubscribeClick(A){this.yw.v(A)}subscribeCrosshairMove(A){this.Tw.l(A)}unsubscribeCrosshairMove(A){this.Tw.v(A)}subscribeDblClick(A){this.Cw.l(A)}unsubscribeDblClick(A){this.Cw.v(A)}priceScale(A){return new AB(this.aw,A)}timeScale(){return this.Dw}applyOptions(A){this.aw.$h(il(A))}options(){return this.aw.W()}takeScreenshot(){return this.aw.wb()}autoSizeActive(){return this.aw.kb()}chartElement(){return this.aw.yb()}paneSize(){const A=this.aw.Tb();return{height:A.height,width:A.width}}setCrosshairPosition(A,e,t){const r=this.Sw.get(t);if(r===void 0)return;const i=this.aw.$t().dr(r);i!==null&&this.aw.$t().ad(A,e,i)}clearCrosshairPosition(){this.aw.$t().od(!0)}Vw(A,e,t={},r){iB(t.priceFormat);const i=Ee(Xe(Vo),Xe(e),t),n=this.aw.$t().dd(A,i,r),o=new sB(n,this,this,this,this.q_);return this.Sw.set(o,n),this.kw.set(n,o),o}Ow(A){const e=this.aw.$t();e._d(A.St.Eu,A.St.hw,A.St.lw),A.ew.forEach(((t,r)=>r.J(t.$e,t.rw))),e.Wu()}Bw(A){return ne(this.kw.get(A))}Rw(A){const e=new Map;A.Nb.forEach(((r,i)=>{const n=i.Qh(),o=nn(n)(r);if(n!=="Custom")je(_d(o));else{const a=i.Ta();je(!a||a(o)===!1)}e.set(this.Bw(i),o)}));const t=A.Eb!==void 0&&this.kw.has(A.Eb)?this.Bw(A.Eb):void 0;return{time:A.zb,logical:A.ee,point:A.Lb,hoveredSeries:t,hoveredObjectId:A.Fb,seriesData:e,sourceEvent:A.Wb}}}function oB(s,A,e){let t;if(es(s)){const i=document.getElementById(s);je(i!==null,`Cannot find element in DOM with id=${s}`),t=i}else t=s;const r=new nB(t,A,e);return A.setOptions(r.options()),r}function aB(s,A){return oB(s,new Pa,Pa.Id(A))}Object.assign(Object.assign({},Vo),Ko);function nl(s,A){return function(){return s.apply(A,arguments)}}const{toString:lB}=Object.prototype,{getPrototypeOf:an}=Object,{iterator:or,toStringTag:ol}=Symbol,ar=(s=>A=>{const e=lB.call(A);return s[e]||(s[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),Se=s=>(s=s.toLowerCase(),A=>ar(A)===s),lr=s=>A=>typeof A===s,{isArray:kt}=Array,_t=lr("undefined");function hs(s){return s!==null&&!_t(s)&&s.constructor!==null&&!_t(s.constructor)&&he(s.constructor.isBuffer)&&s.constructor.isBuffer(s)}const al=Se("ArrayBuffer");function cB(s){let A;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?A=ArrayBuffer.isView(s):A=s&&s.buffer&&al(s.buffer),A}const hB=lr("string"),he=lr("function"),ll=lr("number"),us=s=>s!==null&&typeof s=="object",uB=s=>s===!0||s===!1,cr=s=>{if(ar(s)!=="object")return!1;const A=an(s);return(A===null||A===Object.prototype||Object.getPrototypeOf(A)===null)&&!(ol in s)&&!(or in s)},fB=s=>{if(!us(s)||hs(s))return!1;try{return Object.keys(s).length===0&&Object.getPrototypeOf(s)===Object.prototype}catch{return!1}},dB=Se("Date"),BB=Se("File"),gB=Se("Blob"),pB=Se("FileList"),wB=s=>us(s)&&he(s.pipe),mB=s=>{let A;return s&&(typeof FormData=="function"&&s instanceof FormData||he(s.append)&&((A=ar(s))==="formdata"||A==="object"&&he(s.toString)&&s.toString()==="[object FormData]"))},CB=Se("URLSearchParams"),[vB,bB,QB,yB]=["ReadableStream","Request","Response","Headers"].map(Se),UB=s=>s.trim?s.trim():s.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function fs(s,A,{allOwnKeys:e=!1}={}){if(s===null||typeof s>"u")return;let t,r;if(typeof s!="object"&&(s=[s]),kt(s))for(t=0,r=s.length;t<r;t++)A.call(null,s[t],t,s);else{if(hs(s))return;const i=e?Object.getOwnPropertyNames(s):Object.keys(s),n=i.length;let o;for(t=0;t<n;t++)o=i[t],A.call(null,s[o],o,s)}}function cl(s,A){if(hs(s))return null;A=A.toLowerCase();const e=Object.keys(s);let t=e.length,r;for(;t-- >0;)if(r=e[t],A===r.toLowerCase())return r;return null}const wt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,hl=s=>!_t(s)&&s!==wt;function ln(){const{caseless:s,skipUndefined:A}=hl(this)&&this||{},e={},t=(r,i)=>{if(i==="__proto__"||i==="constructor"||i==="prototype")return;const n=s&&cl(e,i)||i;cr(e[n])&&cr(r)?e[n]=ln(e[n],r):cr(r)?e[n]=ln({},r):kt(r)?e[n]=r.slice():(!A||!_t(r))&&(e[n]=r)};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&fs(arguments[r],t);return e}const FB=(s,A,e,{allOwnKeys:t}={})=>(fs(A,(r,i)=>{e&&he(r)?Object.defineProperty(s,i,{value:nl(r,e),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(s,i,{value:r,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:t}),s),EB=s=>(s.charCodeAt(0)===65279&&(s=s.slice(1)),s),xB=(s,A,e,t)=>{s.prototype=Object.create(A.prototype,t),Object.defineProperty(s.prototype,"constructor",{value:s,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(s,"super",{value:A.prototype}),e&&Object.assign(s.prototype,e)},SB=(s,A,e,t)=>{let r,i,n;const o={};if(A=A||{},s==null)return A;do{for(r=Object.getOwnPropertyNames(s),i=r.length;i-- >0;)n=r[i],(!t||t(n,s,A))&&!o[n]&&(A[n]=s[n],o[n]=!0);s=e!==!1&&an(s)}while(s&&(!e||e(s,A))&&s!==Object.prototype);return A},HB=(s,A,e)=>{s=String(s),(e===void 0||e>s.length)&&(e=s.length),e-=A.length;const t=s.indexOf(A,e);return t!==-1&&t===e},LB=s=>{if(!s)return null;if(kt(s))return s;let A=s.length;if(!ll(A))return null;const e=new Array(A);for(;A-- >0;)e[A]=s[A];return e},IB=(s=>A=>s&&A instanceof s)(typeof Uint8Array<"u"&&an(Uint8Array)),TB=(s,A)=>{const t=(s&&s[or]).call(s);let r;for(;(r=t.next())&&!r.done;){const i=r.value;A.call(s,i[0],i[1])}},MB=(s,A)=>{let e;const t=[];for(;(e=s.exec(A))!==null;)t.push(e);return t},DB=Se("HTMLFormElement"),kB=s=>s.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,r){return t.toUpperCase()+r}),ul=(({hasOwnProperty:s})=>(A,e)=>s.call(A,e))(Object.prototype),_B=Se("RegExp"),fl=(s,A)=>{const e=Object.getOwnPropertyDescriptors(s),t={};fs(e,(r,i)=>{let n;(n=A(r,i,s))!==!1&&(t[i]=n||r)}),Object.defineProperties(s,t)},OB=s=>{fl(s,(A,e)=>{if(he(s)&&["arguments","caller","callee"].indexOf(e)!==-1)return!1;const t=s[e];if(he(t)){if(A.enumerable=!1,"writable"in A){A.writable=!1;return}A.set||(A.set=()=>{throw Error("Can not rewrite read-only method '"+e+"'")})}})},NB=(s,A)=>{const e={},t=r=>{r.forEach(i=>{e[i]=!0})};return kt(s)?t(s):t(String(s).split(A)),e},KB=()=>{},VB=(s,A)=>s!=null&&Number.isFinite(s=+s)?s:A;function PB(s){return!!(s&&he(s.append)&&s[ol]==="FormData"&&s[or])}const GB=s=>{const A=new Array(10),e=(t,r)=>{if(us(t)){if(A.indexOf(t)>=0)return;if(hs(t))return t;if(!("toJSON"in t)){A[r]=t;const i=kt(t)?[]:{};return fs(t,(n,o)=>{const a=e(n,r+1);!_t(a)&&(i[o]=a)}),A[r]=void 0,i}}return t};return e(s,0)},RB=Se("AsyncFunction"),zB=s=>s&&(us(s)||he(s))&&he(s.then)&&he(s.catch),dl=((s,A)=>s?setImmediate:A?((e,t)=>(wt.addEventListener("message",({source:r,data:i})=>{r===wt&&i===e&&t.length&&t.shift()()},!1),r=>{t.push(r),wt.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate=="function",he(wt.postMessage)),WB=typeof queueMicrotask<"u"?queueMicrotask.bind(wt):typeof process<"u"&&process.nextTick||dl,b={isArray:kt,isArrayBuffer:al,isBuffer:hs,isFormData:mB,isArrayBufferView:cB,isString:hB,isNumber:ll,isBoolean:uB,isObject:us,isPlainObject:cr,isEmptyObject:fB,isReadableStream:vB,isRequest:bB,isResponse:QB,isHeaders:yB,isUndefined:_t,isDate:dB,isFile:BB,isBlob:gB,isRegExp:_B,isFunction:he,isStream:wB,isURLSearchParams:CB,isTypedArray:IB,isFileList:pB,forEach:fs,merge:ln,extend:FB,trim:UB,stripBOM:EB,inherits:xB,toFlatObject:SB,kindOf:ar,kindOfTest:Se,endsWith:HB,toArray:LB,forEachEntry:TB,matchAll:MB,isHTMLForm:DB,hasOwnProperty:ul,hasOwnProp:ul,reduceDescriptors:fl,freezeMethods:OB,toObjectSet:NB,toCamelCase:kB,noop:KB,toFiniteNumber:VB,findKey:cl,global:wt,isContextDefined:hl,isSpecCompliantForm:PB,toJSONObject:GB,isAsyncFn:RB,isThenable:zB,setImmediate:dl,asap:WB,isIterable:s=>s!=null&&he(s[or])};let hA=class Hu extends Error{static from(A,e,t,r,i,n){const o=new Hu(A.message,e||A.code,t,r,i);return o.cause=A,o.name=A.name,n&&Object.assign(o,n),o}constructor(A,e,t,r,i){super(A),this.name="AxiosError",this.isAxiosError=!0,e&&(this.code=e),t&&(this.config=t),r&&(this.request=r),i&&(this.response=i,this.status=i.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:b.toJSONObject(this.config),code:this.code,status:this.status}}};hA.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",hA.ERR_BAD_OPTION="ERR_BAD_OPTION",hA.ECONNABORTED="ECONNABORTED",hA.ETIMEDOUT="ETIMEDOUT",hA.ERR_NETWORK="ERR_NETWORK",hA.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",hA.ERR_DEPRECATED="ERR_DEPRECATED",hA.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",hA.ERR_BAD_REQUEST="ERR_BAD_REQUEST",hA.ERR_CANCELED="ERR_CANCELED",hA.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",hA.ERR_INVALID_URL="ERR_INVALID_URL";const XB=null;function cn(s){return b.isPlainObject(s)||b.isArray(s)}function Bl(s){return b.endsWith(s,"[]")?s.slice(0,-2):s}function gl(s,A,e){return s?s.concat(A).map(function(r,i){return r=Bl(r),!e&&i?"["+r+"]":r}).join(e?".":""):A}function $B(s){return b.isArray(s)&&!s.some(cn)}const JB=b.toFlatObject(b,{},null,function(A){return/^is[A-Z]/.test(A)});function hr(s,A,e){if(!b.isObject(s))throw new TypeError("target must be an object");A=A||new FormData,e=b.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(f,p){return!b.isUndefined(p[f])});const t=e.metaTokens,r=e.visitor||c,i=e.dots,n=e.indexes,a=(e.Blob||typeof Blob<"u"&&Blob)&&b.isSpecCompliantForm(A);if(!b.isFunction(r))throw new TypeError("visitor must be a function");function l(B){if(B===null)return"";if(b.isDate(B))return B.toISOString();if(b.isBoolean(B))return B.toString();if(!a&&b.isBlob(B))throw new hA("Blob is not supported. Use a Buffer instead.");return b.isArrayBuffer(B)||b.isTypedArray(B)?a&&typeof Blob=="function"?new Blob([B]):Buffer.from(B):B}function c(B,f,p){let m=B;if(B&&!p&&typeof B=="object"){if(b.endsWith(f,"{}"))f=t?f:f.slice(0,-2),B=JSON.stringify(B);else if(b.isArray(B)&&$B(B)||(b.isFileList(B)||b.endsWith(f,"[]"))&&(m=b.toArray(B)))return f=Bl(f),m.forEach(function(v,y){!(b.isUndefined(v)||v===null)&&A.append(n===!0?gl([f],y,i):n===null?f:f+"[]",l(v))}),!1}return cn(B)?!0:(A.append(gl(p,f,i),l(B)),!1)}const u=[],d=Object.assign(JB,{defaultVisitor:c,convertValue:l,isVisitable:cn});function g(B,f){if(!b.isUndefined(B)){if(u.indexOf(B)!==-1)throw Error("Circular reference detected in "+f.join("."));u.push(B),b.forEach(B,function(m,w){(!(b.isUndefined(m)||m===null)&&r.call(A,m,b.isString(w)?w.trim():w,f,d))===!0&&g(m,f?f.concat(w):[w])}),u.pop()}}if(!b.isObject(s))throw new TypeError("data must be an object");return g(s),A}function pl(s){const A={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(s).replace(/[!'()~]|%20|%00/g,function(t){return A[t]})}function hn(s,A){this._pairs=[],s&&hr(s,this,A)}const wl=hn.prototype;wl.append=function(A,e){this._pairs.push([A,e])},wl.toString=function(A){const e=A?function(t){return A.call(this,t,pl)}:pl;return this._pairs.map(function(r){return e(r[0])+"="+e(r[1])},"").join("&")};function ZB(s){return encodeURIComponent(s).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ml(s,A,e){if(!A)return s;const t=e&&e.encode||ZB,r=b.isFunction(e)?{serialize:e}:e,i=r&&r.serialize;let n;if(i?n=i(A,r):n=b.isURLSearchParams(A)?A.toString():new hn(A,r).toString(t),n){const o=s.indexOf("#");o!==-1&&(s=s.slice(0,o)),s+=(s.indexOf("?")===-1?"?":"&")+n}return s}class Cl{constructor(){this.handlers=[]}use(A,e,t){return this.handlers.push({fulfilled:A,rejected:e,synchronous:t?t.synchronous:!1,runWhen:t?t.runWhen:null}),this.handlers.length-1}eject(A){this.handlers[A]&&(this.handlers[A]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(A){b.forEach(this.handlers,function(t){t!==null&&A(t)})}}const un={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},YB={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:hn,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},fn=typeof window<"u"&&typeof document<"u",dn=typeof navigator=="object"&&navigator||void 0,qB=fn&&(!dn||["ReactNative","NativeScript","NS"].indexOf(dn.product)<0),jB=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",A0=fn&&window.location.href||"http://localhost",Ae={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:fn,hasStandardBrowserEnv:qB,hasStandardBrowserWebWorkerEnv:jB,navigator:dn,origin:A0},Symbol.toStringTag,{value:"Module"})),...YB};function e0(s,A){return hr(s,new Ae.classes.URLSearchParams,{visitor:function(e,t,r,i){return Ae.isNode&&b.isBuffer(e)?(this.append(t,e.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...A})}function t0(s){return b.matchAll(/\w+|\[(\w*)]/g,s).map(A=>A[0]==="[]"?"":A[1]||A[0])}function s0(s){const A={},e=Object.keys(s);let t;const r=e.length;let i;for(t=0;t<r;t++)i=e[t],A[i]=s[i];return A}function vl(s){function A(e,t,r,i){let n=e[i++];if(n==="__proto__")return!0;const o=Number.isFinite(+n),a=i>=e.length;return n=!n&&b.isArray(r)?r.length:n,a?(b.hasOwnProp(r,n)?r[n]=[r[n],t]:r[n]=t,!o):((!r[n]||!b.isObject(r[n]))&&(r[n]=[]),A(e,t,r[n],i)&&b.isArray(r[n])&&(r[n]=s0(r[n])),!o)}if(b.isFormData(s)&&b.isFunction(s.entries)){const e={};return b.forEachEntry(s,(t,r)=>{A(t0(t),r,e,0)}),e}return null}function r0(s,A,e){if(b.isString(s))try{return(A||JSON.parse)(s),b.trim(s)}catch(t){if(t.name!=="SyntaxError")throw t}return(e||JSON.stringify)(s)}const ds={transitional:un,adapter:["xhr","http","fetch"],transformRequest:[function(A,e){const t=e.getContentType()||"",r=t.indexOf("application/json")>-1,i=b.isObject(A);if(i&&b.isHTMLForm(A)&&(A=new FormData(A)),b.isFormData(A))return r?JSON.stringify(vl(A)):A;if(b.isArrayBuffer(A)||b.isBuffer(A)||b.isStream(A)||b.isFile(A)||b.isBlob(A)||b.isReadableStream(A))return A;if(b.isArrayBufferView(A))return A.buffer;if(b.isURLSearchParams(A))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),A.toString();let o;if(i){if(t.indexOf("application/x-www-form-urlencoded")>-1)return e0(A,this.formSerializer).toString();if((o=b.isFileList(A))||t.indexOf("multipart/form-data")>-1){const a=this.env&&this.env.FormData;return hr(o?{"files[]":A}:A,a&&new a,this.formSerializer)}}return i||r?(e.setContentType("application/json",!1),r0(A)):A}],transformResponse:[function(A){const e=this.transitional||ds.transitional,t=e&&e.forcedJSONParsing,r=this.responseType==="json";if(b.isResponse(A)||b.isReadableStream(A))return A;if(A&&b.isString(A)&&(t&&!this.responseType||r)){const n=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(A,this.parseReviver)}catch(o){if(n)throw o.name==="SyntaxError"?hA.from(o,hA.ERR_BAD_RESPONSE,this,null,this.response):o}}return A}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ae.classes.FormData,Blob:Ae.classes.Blob},validateStatus:function(A){return A>=200&&A<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};b.forEach(["delete","get","head","post","put","patch"],s=>{ds.headers[s]={}});const i0=b.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),n0=s=>{const A={};let e,t,r;return s&&s.split(`
|
|
2
|
+
`).forEach(function(n){r=n.indexOf(":"),e=n.substring(0,r).trim().toLowerCase(),t=n.substring(r+1).trim(),!(!e||A[e]&&i0[e])&&(e==="set-cookie"?A[e]?A[e].push(t):A[e]=[t]:A[e]=A[e]?A[e]+", "+t:t)}),A},bl=Symbol("internals");function Bs(s){return s&&String(s).trim().toLowerCase()}function ur(s){return s===!1||s==null?s:b.isArray(s)?s.map(ur):String(s)}function o0(s){const A=Object.create(null),e=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let t;for(;t=e.exec(s);)A[t[1]]=t[2];return A}const a0=s=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(s.trim());function Bn(s,A,e,t,r){if(b.isFunction(t))return t.call(this,A,e);if(r&&(A=e),!!b.isString(A)){if(b.isString(t))return A.indexOf(t)!==-1;if(b.isRegExp(t))return t.test(A)}}function l0(s){return s.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(A,e,t)=>e.toUpperCase()+t)}function c0(s,A){const e=b.toCamelCase(" "+A);["get","set","has"].forEach(t=>{Object.defineProperty(s,t+e,{value:function(r,i,n){return this[t].call(this,A,r,i,n)},configurable:!0})})}let ue=class{constructor(A){A&&this.set(A)}set(A,e,t){const r=this;function i(o,a,l){const c=Bs(a);if(!c)throw new Error("header name must be a non-empty string");const u=b.findKey(r,c);(!u||r[u]===void 0||l===!0||l===void 0&&r[u]!==!1)&&(r[u||a]=ur(o))}const n=(o,a)=>b.forEach(o,(l,c)=>i(l,c,a));if(b.isPlainObject(A)||A instanceof this.constructor)n(A,e);else if(b.isString(A)&&(A=A.trim())&&!a0(A))n(n0(A),e);else if(b.isObject(A)&&b.isIterable(A)){let o={},a,l;for(const c of A){if(!b.isArray(c))throw TypeError("Object iterator must return a key-value pair");o[l=c[0]]=(a=o[l])?b.isArray(a)?[...a,c[1]]:[a,c[1]]:c[1]}n(o,e)}else A!=null&&i(e,A,t);return this}get(A,e){if(A=Bs(A),A){const t=b.findKey(this,A);if(t){const r=this[t];if(!e)return r;if(e===!0)return o0(r);if(b.isFunction(e))return e.call(this,r,t);if(b.isRegExp(e))return e.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(A,e){if(A=Bs(A),A){const t=b.findKey(this,A);return!!(t&&this[t]!==void 0&&(!e||Bn(this,this[t],t,e)))}return!1}delete(A,e){const t=this;let r=!1;function i(n){if(n=Bs(n),n){const o=b.findKey(t,n);o&&(!e||Bn(t,t[o],o,e))&&(delete t[o],r=!0)}}return b.isArray(A)?A.forEach(i):i(A),r}clear(A){const e=Object.keys(this);let t=e.length,r=!1;for(;t--;){const i=e[t];(!A||Bn(this,this[i],i,A,!0))&&(delete this[i],r=!0)}return r}normalize(A){const e=this,t={};return b.forEach(this,(r,i)=>{const n=b.findKey(t,i);if(n){e[n]=ur(r),delete e[i];return}const o=A?l0(i):String(i).trim();o!==i&&delete e[i],e[o]=ur(r),t[o]=!0}),this}concat(...A){return this.constructor.concat(this,...A)}toJSON(A){const e=Object.create(null);return b.forEach(this,(t,r)=>{t!=null&&t!==!1&&(e[r]=A&&b.isArray(t)?t.join(", "):t)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([A,e])=>A+": "+e).join(`
|
|
3
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(A){return A instanceof this?A:new this(A)}static concat(A,...e){const t=new this(A);return e.forEach(r=>t.set(r)),t}static accessor(A){const t=(this[bl]=this[bl]={accessors:{}}).accessors,r=this.prototype;function i(n){const o=Bs(n);t[o]||(c0(r,n),t[o]=!0)}return b.isArray(A)?A.forEach(i):i(A),this}};ue.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),b.reduceDescriptors(ue.prototype,({value:s},A)=>{let e=A[0].toUpperCase()+A.slice(1);return{get:()=>s,set(t){this[e]=t}}}),b.freezeMethods(ue);function gn(s,A){const e=this||ds,t=A||e,r=ue.from(t.headers);let i=t.data;return b.forEach(s,function(o){i=o.call(e,i,r.normalize(),A?A.status:void 0)}),r.normalize(),i}function Ql(s){return!!(s&&s.__CANCEL__)}let gs=class extends hA{constructor(A,e,t){super(A??"canceled",hA.ERR_CANCELED,e,t),this.name="CanceledError",this.__CANCEL__=!0}};function yl(s,A,e){const t=e.config.validateStatus;!e.status||!t||t(e.status)?s(e):A(new hA("Request failed with status code "+e.status,[hA.ERR_BAD_REQUEST,hA.ERR_BAD_RESPONSE][Math.floor(e.status/100)-4],e.config,e.request,e))}function h0(s){const A=/^([-+\w]{1,25})(:?\/\/|:)/.exec(s);return A&&A[1]||""}function u0(s,A){s=s||10;const e=new Array(s),t=new Array(s);let r=0,i=0,n;return A=A!==void 0?A:1e3,function(a){const l=Date.now(),c=t[i];n||(n=l),e[r]=a,t[r]=l;let u=i,d=0;for(;u!==r;)d+=e[u++],u=u%s;if(r=(r+1)%s,r===i&&(i=(i+1)%s),l-n<A)return;const g=c&&l-c;return g?Math.round(d*1e3/g):void 0}}function f0(s,A){let e=0,t=1e3/A,r,i;const n=(l,c=Date.now())=>{e=c,r=null,i&&(clearTimeout(i),i=null),s(...l)};return[(...l)=>{const c=Date.now(),u=c-e;u>=t?n(l,c):(r=l,i||(i=setTimeout(()=>{i=null,n(r)},t-u)))},()=>r&&n(r)]}const fr=(s,A,e=3)=>{let t=0;const r=u0(50,250);return f0(i=>{const n=i.loaded,o=i.lengthComputable?i.total:void 0,a=n-t,l=r(a),c=n<=o;t=n;const u={loaded:n,total:o,progress:o?n/o:void 0,bytes:a,rate:l||void 0,estimated:l&&o&&c?(o-n)/l:void 0,event:i,lengthComputable:o!=null,[A?"download":"upload"]:!0};s(u)},e)},Ul=(s,A)=>{const e=s!=null;return[t=>A[0]({lengthComputable:e,total:s,loaded:t}),A[1]]},Fl=s=>(...A)=>b.asap(()=>s(...A)),d0=Ae.hasStandardBrowserEnv?((s,A)=>e=>(e=new URL(e,Ae.origin),s.protocol===e.protocol&&s.host===e.host&&(A||s.port===e.port)))(new URL(Ae.origin),Ae.navigator&&/(msie|trident)/i.test(Ae.navigator.userAgent)):()=>!0,B0=Ae.hasStandardBrowserEnv?{write(s,A,e,t,r,i,n){if(typeof document>"u")return;const o=[`${s}=${encodeURIComponent(A)}`];b.isNumber(e)&&o.push(`expires=${new Date(e).toUTCString()}`),b.isString(t)&&o.push(`path=${t}`),b.isString(r)&&o.push(`domain=${r}`),i===!0&&o.push("secure"),b.isString(n)&&o.push(`SameSite=${n}`),document.cookie=o.join("; ")},read(s){if(typeof document>"u")return null;const A=document.cookie.match(new RegExp("(?:^|; )"+s+"=([^;]*)"));return A?decodeURIComponent(A[1]):null},remove(s){this.write(s,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function g0(s){return typeof s!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(s)}function p0(s,A){return A?s.replace(/\/?\/$/,"")+"/"+A.replace(/^\/+/,""):s}function El(s,A,e){let t=!g0(A);return s&&(t||e==!1)?p0(s,A):A}const xl=s=>s instanceof ue?{...s}:s;function mt(s,A){A=A||{};const e={};function t(l,c,u,d){return b.isPlainObject(l)&&b.isPlainObject(c)?b.merge.call({caseless:d},l,c):b.isPlainObject(c)?b.merge({},c):b.isArray(c)?c.slice():c}function r(l,c,u,d){if(b.isUndefined(c)){if(!b.isUndefined(l))return t(void 0,l,u,d)}else return t(l,c,u,d)}function i(l,c){if(!b.isUndefined(c))return t(void 0,c)}function n(l,c){if(b.isUndefined(c)){if(!b.isUndefined(l))return t(void 0,l)}else return t(void 0,c)}function o(l,c,u){if(u in A)return t(l,c);if(u in s)return t(void 0,l)}const a={url:i,method:i,data:i,baseURL:n,transformRequest:n,transformResponse:n,paramsSerializer:n,timeout:n,timeoutMessage:n,withCredentials:n,withXSRFToken:n,adapter:n,responseType:n,xsrfCookieName:n,xsrfHeaderName:n,onUploadProgress:n,onDownloadProgress:n,decompress:n,maxContentLength:n,maxBodyLength:n,beforeRedirect:n,transport:n,httpAgent:n,httpsAgent:n,cancelToken:n,socketPath:n,responseEncoding:n,validateStatus:o,headers:(l,c,u)=>r(xl(l),xl(c),u,!0)};return b.forEach(Object.keys({...s,...A}),function(c){if(c==="__proto__"||c==="constructor"||c==="prototype")return;const u=b.hasOwnProp(a,c)?a[c]:r,d=u(s[c],A[c],c);b.isUndefined(d)&&u!==o||(e[c]=d)}),e}const Sl=s=>{const A=mt({},s);let{data:e,withXSRFToken:t,xsrfHeaderName:r,xsrfCookieName:i,headers:n,auth:o}=A;if(A.headers=n=ue.from(n),A.url=ml(El(A.baseURL,A.url,A.allowAbsoluteUrls),s.params,s.paramsSerializer),o&&n.set("Authorization","Basic "+btoa((o.username||"")+":"+(o.password?unescape(encodeURIComponent(o.password)):""))),b.isFormData(e)){if(Ae.hasStandardBrowserEnv||Ae.hasStandardBrowserWebWorkerEnv)n.setContentType(void 0);else if(b.isFunction(e.getHeaders)){const a=e.getHeaders(),l=["content-type","content-length"];Object.entries(a).forEach(([c,u])=>{l.includes(c.toLowerCase())&&n.set(c,u)})}}if(Ae.hasStandardBrowserEnv&&(t&&b.isFunction(t)&&(t=t(A)),t||t!==!1&&d0(A.url))){const a=r&&i&&B0.read(i);a&&n.set(r,a)}return A},w0=typeof XMLHttpRequest<"u"&&function(s){return new Promise(function(e,t){const r=Sl(s);let i=r.data;const n=ue.from(r.headers).normalize();let{responseType:o,onUploadProgress:a,onDownloadProgress:l}=r,c,u,d,g,B;function f(){g&&g(),B&&B(),r.cancelToken&&r.cancelToken.unsubscribe(c),r.signal&&r.signal.removeEventListener("abort",c)}let p=new XMLHttpRequest;p.open(r.method.toUpperCase(),r.url,!0),p.timeout=r.timeout;function m(){if(!p)return;const v=ue.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),E={data:!o||o==="text"||o==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:v,config:s,request:p};yl(function(T){e(T),f()},function(T){t(T),f()},E),p=null}"onloadend"in p?p.onloadend=m:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(m)},p.onabort=function(){p&&(t(new hA("Request aborted",hA.ECONNABORTED,s,p)),p=null)},p.onerror=function(y){const E=y&&y.message?y.message:"Network Error",F=new hA(E,hA.ERR_NETWORK,s,p);F.event=y||null,t(F),p=null},p.ontimeout=function(){let y=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const E=r.transitional||un;r.timeoutErrorMessage&&(y=r.timeoutErrorMessage),t(new hA(y,E.clarifyTimeoutError?hA.ETIMEDOUT:hA.ECONNABORTED,s,p)),p=null},i===void 0&&n.setContentType(null),"setRequestHeader"in p&&b.forEach(n.toJSON(),function(y,E){p.setRequestHeader(E,y)}),b.isUndefined(r.withCredentials)||(p.withCredentials=!!r.withCredentials),o&&o!=="json"&&(p.responseType=r.responseType),l&&([d,B]=fr(l,!0),p.addEventListener("progress",d)),a&&p.upload&&([u,g]=fr(a),p.upload.addEventListener("progress",u),p.upload.addEventListener("loadend",g)),(r.cancelToken||r.signal)&&(c=v=>{p&&(t(!v||v.type?new gs(null,s,p):v),p.abort(),p=null)},r.cancelToken&&r.cancelToken.subscribe(c),r.signal&&(r.signal.aborted?c():r.signal.addEventListener("abort",c)));const w=h0(r.url);if(w&&Ae.protocols.indexOf(w)===-1){t(new hA("Unsupported protocol "+w+":",hA.ERR_BAD_REQUEST,s));return}p.send(i||null)})},m0=(s,A)=>{const{length:e}=s=s?s.filter(Boolean):[];if(A||e){let t=new AbortController,r;const i=function(l){if(!r){r=!0,o();const c=l instanceof Error?l:this.reason;t.abort(c instanceof hA?c:new gs(c instanceof Error?c.message:c))}};let n=A&&setTimeout(()=>{n=null,i(new hA(`timeout of ${A}ms exceeded`,hA.ETIMEDOUT))},A);const o=()=>{s&&(n&&clearTimeout(n),n=null,s.forEach(l=>{l.unsubscribe?l.unsubscribe(i):l.removeEventListener("abort",i)}),s=null)};s.forEach(l=>l.addEventListener("abort",i));const{signal:a}=t;return a.unsubscribe=()=>b.asap(o),a}},C0=function*(s,A){let e=s.byteLength;if(e<A){yield s;return}let t=0,r;for(;t<e;)r=t+A,yield s.slice(t,r),t=r},v0=async function*(s,A){for await(const e of b0(s))yield*C0(e,A)},b0=async function*(s){if(s[Symbol.asyncIterator]){yield*s;return}const A=s.getReader();try{for(;;){const{done:e,value:t}=await A.read();if(e)break;yield t}}finally{await A.cancel()}},Hl=(s,A,e,t)=>{const r=v0(s,A);let i=0,n,o=a=>{n||(n=!0,t&&t(a))};return new ReadableStream({async pull(a){try{const{done:l,value:c}=await r.next();if(l){o(),a.close();return}let u=c.byteLength;if(e){let d=i+=u;e(d)}a.enqueue(new Uint8Array(c))}catch(l){throw o(l),l}},cancel(a){return o(a),r.return()}},{highWaterMark:2})},Ll=64*1024,{isFunction:dr}=b,Q0=(({Request:s,Response:A})=>({Request:s,Response:A}))(b.global),{ReadableStream:Il,TextEncoder:Tl}=b.global,Ml=(s,...A)=>{try{return!!s(...A)}catch{return!1}},y0=s=>{s=b.merge.call({skipUndefined:!0},Q0,s);const{fetch:A,Request:e,Response:t}=s,r=A?dr(A):typeof fetch=="function",i=dr(e),n=dr(t);if(!r)return!1;const o=r&&dr(Il),a=r&&(typeof Tl=="function"?(B=>f=>B.encode(f))(new Tl):async B=>new Uint8Array(await new e(B).arrayBuffer())),l=i&&o&&Ml(()=>{let B=!1;const f=new e(Ae.origin,{body:new Il,method:"POST",get duplex(){return B=!0,"half"}}).headers.has("Content-Type");return B&&!f}),c=n&&o&&Ml(()=>b.isReadableStream(new t("").body)),u={stream:c&&(B=>B.body)};r&&["text","arrayBuffer","blob","formData","stream"].forEach(B=>{!u[B]&&(u[B]=(f,p)=>{let m=f&&f[B];if(m)return m.call(f);throw new hA(`Response type '${B}' is not supported`,hA.ERR_NOT_SUPPORT,p)})});const d=async B=>{if(B==null)return 0;if(b.isBlob(B))return B.size;if(b.isSpecCompliantForm(B))return(await new e(Ae.origin,{method:"POST",body:B}).arrayBuffer()).byteLength;if(b.isArrayBufferView(B)||b.isArrayBuffer(B))return B.byteLength;if(b.isURLSearchParams(B)&&(B=B+""),b.isString(B))return(await a(B)).byteLength},g=async(B,f)=>{const p=b.toFiniteNumber(B.getContentLength());return p??d(f)};return async B=>{let{url:f,method:p,data:m,signal:w,cancelToken:v,timeout:y,onDownloadProgress:E,onUploadProgress:F,responseType:T,headers:M,withCredentials:I="same-origin",fetchOptions:cA}=Sl(B),z=A||fetch;T=T?(T+"").toLowerCase():"text";let fA=m0([w,v&&v.toAbortSignal()],y),W=null;const nA=fA&&fA.unsubscribe&&(()=>{fA.unsubscribe()});let j;try{if(F&&l&&p!=="get"&&p!=="head"&&(j=await g(M,m))!==0){let FA=new e(f,{method:"POST",body:m,duplex:"half"}),AA;if(b.isFormData(m)&&(AA=FA.headers.get("content-type"))&&M.setContentType(AA),FA.body){const[eA,wA]=Ul(j,fr(Fl(F)));m=Hl(FA.body,Ll,eA,wA)}}b.isString(I)||(I=I?"include":"omit");const H=i&&"credentials"in e.prototype,X={...cA,signal:fA,method:p.toUpperCase(),headers:M.normalize().toJSON(),body:m,duplex:"half",credentials:H?I:void 0};W=i&&new e(f,X);let sA=await(i?z(W,cA):z(f,X));const UA=c&&(T==="stream"||T==="response");if(c&&(E||UA&&nA)){const FA={};["status","statusText","headers"].forEach(dA=>{FA[dA]=sA[dA]});const AA=b.toFiniteNumber(sA.headers.get("content-length")),[eA,wA]=E&&Ul(AA,fr(Fl(E),!0))||[];sA=new t(Hl(sA.body,Ll,eA,()=>{wA&&wA(),nA&&nA()}),FA)}T=T||"text";let yA=await u[b.findKey(u,T)||"text"](sA,B);return!UA&&nA&&nA(),await new Promise((FA,AA)=>{yl(FA,AA,{data:yA,headers:ue.from(sA.headers),status:sA.status,statusText:sA.statusText,config:B,request:W})})}catch(H){throw nA&&nA(),H&&H.name==="TypeError"&&/Load failed|fetch/i.test(H.message)?Object.assign(new hA("Network Error",hA.ERR_NETWORK,B,W,H&&H.response),{cause:H.cause||H}):hA.from(H,H&&H.code,B,W,H&&H.response)}}},U0=new Map,Dl=s=>{let A=s&&s.env||{};const{fetch:e,Request:t,Response:r}=A,i=[t,r,e];let n=i.length,o=n,a,l,c=U0;for(;o--;)a=i[o],l=c.get(a),l===void 0&&c.set(a,l=o?new Map:y0(A)),c=l;return l};Dl();const pn={http:XB,xhr:w0,fetch:{get:Dl}};b.forEach(pn,(s,A)=>{if(s){try{Object.defineProperty(s,"name",{value:A})}catch{}Object.defineProperty(s,"adapterName",{value:A})}});const kl=s=>`- ${s}`,F0=s=>b.isFunction(s)||s===null||s===!1;function E0(s,A){s=b.isArray(s)?s:[s];const{length:e}=s;let t,r;const i={};for(let n=0;n<e;n++){t=s[n];let o;if(r=t,!F0(t)&&(r=pn[(o=String(t)).toLowerCase()],r===void 0))throw new hA(`Unknown adapter '${o}'`);if(r&&(b.isFunction(r)||(r=r.get(A))))break;i[o||"#"+n]=r}if(!r){const n=Object.entries(i).map(([a,l])=>`adapter ${a} `+(l===!1?"is not supported by the environment":"is not available in the build"));let o=e?n.length>1?`since :
|
|
4
|
+
`+n.map(kl).join(`
|
|
5
|
+
`):" "+kl(n[0]):"as no adapter specified";throw new hA("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return r}const _l={getAdapter:E0,adapters:pn};function wn(s){if(s.cancelToken&&s.cancelToken.throwIfRequested(),s.signal&&s.signal.aborted)throw new gs(null,s)}function Ol(s){return wn(s),s.headers=ue.from(s.headers),s.data=gn.call(s,s.transformRequest),["post","put","patch"].indexOf(s.method)!==-1&&s.headers.setContentType("application/x-www-form-urlencoded",!1),_l.getAdapter(s.adapter||ds.adapter,s)(s).then(function(t){return wn(s),t.data=gn.call(s,s.transformResponse,t),t.headers=ue.from(t.headers),t},function(t){return Ql(t)||(wn(s),t&&t.response&&(t.response.data=gn.call(s,s.transformResponse,t.response),t.response.headers=ue.from(t.response.headers))),Promise.reject(t)})}const Nl="1.13.5",Br={};["object","boolean","number","function","string","symbol"].forEach((s,A)=>{Br[s]=function(t){return typeof t===s||"a"+(A<1?"n ":" ")+s}});const Kl={};Br.transitional=function(A,e,t){function r(i,n){return"[Axios v"+Nl+"] Transitional option '"+i+"'"+n+(t?". "+t:"")}return(i,n,o)=>{if(A===!1)throw new hA(r(n," has been removed"+(e?" in "+e:"")),hA.ERR_DEPRECATED);return e&&!Kl[n]&&(Kl[n]=!0,console.warn(r(n," has been deprecated since v"+e+" and will be removed in the near future"))),A?A(i,n,o):!0}},Br.spelling=function(A){return(e,t)=>(console.warn(`${t} is likely a misspelling of ${A}`),!0)};function x0(s,A,e){if(typeof s!="object")throw new hA("options must be an object",hA.ERR_BAD_OPTION_VALUE);const t=Object.keys(s);let r=t.length;for(;r-- >0;){const i=t[r],n=A[i];if(n){const o=s[i],a=o===void 0||n(o,i,s);if(a!==!0)throw new hA("option "+i+" must be "+a,hA.ERR_BAD_OPTION_VALUE);continue}if(e!==!0)throw new hA("Unknown option "+i,hA.ERR_BAD_OPTION)}}const gr={assertOptions:x0,validators:Br},Ce=gr.validators;let Ct=class{constructor(A){this.defaults=A||{},this.interceptors={request:new Cl,response:new Cl}}async request(A,e){try{return await this._request(A,e)}catch(t){if(t instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;const i=r.stack?r.stack.replace(/^.+\n/,""):"";try{t.stack?i&&!String(t.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(t.stack+=`
|
|
6
|
+
`+i):t.stack=i}catch{}}throw t}}_request(A,e){typeof A=="string"?(e=e||{},e.url=A):e=A||{},e=mt(this.defaults,e);const{transitional:t,paramsSerializer:r,headers:i}=e;t!==void 0&&gr.assertOptions(t,{silentJSONParsing:Ce.transitional(Ce.boolean),forcedJSONParsing:Ce.transitional(Ce.boolean),clarifyTimeoutError:Ce.transitional(Ce.boolean),legacyInterceptorReqResOrdering:Ce.transitional(Ce.boolean)},!1),r!=null&&(b.isFunction(r)?e.paramsSerializer={serialize:r}:gr.assertOptions(r,{encode:Ce.function,serialize:Ce.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),gr.assertOptions(e,{baseUrl:Ce.spelling("baseURL"),withXsrfToken:Ce.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let n=i&&b.merge(i.common,i[e.method]);i&&b.forEach(["delete","get","head","post","put","patch","common"],B=>{delete i[B]}),e.headers=ue.concat(n,i);const o=[];let a=!0;this.interceptors.request.forEach(function(f){if(typeof f.runWhen=="function"&&f.runWhen(e)===!1)return;a=a&&f.synchronous;const p=e.transitional||un;p&&p.legacyInterceptorReqResOrdering?o.unshift(f.fulfilled,f.rejected):o.push(f.fulfilled,f.rejected)});const l=[];this.interceptors.response.forEach(function(f){l.push(f.fulfilled,f.rejected)});let c,u=0,d;if(!a){const B=[Ol.bind(this),void 0];for(B.unshift(...o),B.push(...l),d=B.length,c=Promise.resolve(e);u<d;)c=c.then(B[u++],B[u++]);return c}d=o.length;let g=e;for(;u<d;){const B=o[u++],f=o[u++];try{g=B(g)}catch(p){f.call(this,p);break}}try{c=Ol.call(this,g)}catch(B){return Promise.reject(B)}for(u=0,d=l.length;u<d;)c=c.then(l[u++],l[u++]);return c}getUri(A){A=mt(this.defaults,A);const e=El(A.baseURL,A.url,A.allowAbsoluteUrls);return ml(e,A.params,A.paramsSerializer)}};b.forEach(["delete","get","head","options"],function(A){Ct.prototype[A]=function(e,t){return this.request(mt(t||{},{method:A,url:e,data:(t||{}).data}))}}),b.forEach(["post","put","patch"],function(A){function e(t){return function(i,n,o){return this.request(mt(o||{},{method:A,headers:t?{"Content-Type":"multipart/form-data"}:{},url:i,data:n}))}}Ct.prototype[A]=e(),Ct.prototype[A+"Form"]=e(!0)});let S0=class Lu{constructor(A){if(typeof A!="function")throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(i){e=i});const t=this;this.promise.then(r=>{if(!t._listeners)return;let i=t._listeners.length;for(;i-- >0;)t._listeners[i](r);t._listeners=null}),this.promise.then=r=>{let i;const n=new Promise(o=>{t.subscribe(o),i=o}).then(r);return n.cancel=function(){t.unsubscribe(i)},n},A(function(i,n,o){t.reason||(t.reason=new gs(i,n,o),e(t.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(A){if(this.reason){A(this.reason);return}this._listeners?this._listeners.push(A):this._listeners=[A]}unsubscribe(A){if(!this._listeners)return;const e=this._listeners.indexOf(A);e!==-1&&this._listeners.splice(e,1)}toAbortSignal(){const A=new AbortController,e=t=>{A.abort(t)};return this.subscribe(e),A.signal.unsubscribe=()=>this.unsubscribe(e),A.signal}static source(){let A;return{token:new Lu(function(r){A=r}),cancel:A}}};function H0(s){return function(e){return s.apply(null,e)}}function L0(s){return b.isObject(s)&&s.isAxiosError===!0}const mn={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(mn).forEach(([s,A])=>{mn[A]=s});function Vl(s){const A=new Ct(s),e=nl(Ct.prototype.request,A);return b.extend(e,Ct.prototype,A,{allOwnKeys:!0}),b.extend(e,A,null,{allOwnKeys:!0}),e.create=function(r){return Vl(mt(s,r))},e}const TA=Vl(ds);TA.Axios=Ct,TA.CanceledError=gs,TA.CancelToken=S0,TA.isCancel=Ql,TA.VERSION=Nl,TA.toFormData=hr,TA.AxiosError=hA,TA.Cancel=TA.CanceledError,TA.all=function(A){return Promise.all(A)},TA.spread=H0,TA.isAxiosError=L0,TA.mergeConfig=mt,TA.AxiosHeaders=ue,TA.formToJSON=s=>vl(b.isHTMLForm(s)?new FormData(s):s),TA.getAdapter=_l.getAdapter,TA.HttpStatusCode=mn,TA.default=TA;const{Axios:Xv,AxiosError:$v,CanceledError:Jv,isCancel:Zv,CancelToken:Yv,VERSION:qv,all:jv,Cancel:Ab,isAxiosError:eb,spread:tb,toFormData:sb,AxiosHeaders:rb,HttpStatusCode:ib,formToJSON:nb,getAdapter:ob,mergeConfig:ab}=TA,ke=Object.create(null);ke.open="0",ke.close="1",ke.ping="2",ke.pong="3",ke.message="4",ke.upgrade="5",ke.noop="6";const pr=Object.create(null);Object.keys(ke).forEach(s=>{pr[ke[s]]=s});const Cn={type:"error",data:"parser error"},Pl=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Gl=typeof ArrayBuffer=="function",Rl=s=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(s):s&&s.buffer instanceof ArrayBuffer,vn=({type:s,data:A},e,t)=>Pl&&A instanceof Blob?e?t(A):zl(A,t):Gl&&(A instanceof ArrayBuffer||Rl(A))?e?t(A):zl(new Blob([A]),t):t(ke[s]+(A||"")),zl=(s,A)=>{const e=new FileReader;return e.onload=function(){const t=e.result.split(",")[1];A("b"+(t||""))},e.readAsDataURL(s)};function Wl(s){return s instanceof Uint8Array?s:s instanceof ArrayBuffer?new Uint8Array(s):new Uint8Array(s.buffer,s.byteOffset,s.byteLength)}let bn;function I0(s,A){if(Pl&&s.data instanceof Blob)return s.data.arrayBuffer().then(Wl).then(A);if(Gl&&(s.data instanceof ArrayBuffer||Rl(s.data)))return A(Wl(s.data));vn(s,!1,e=>{bn||(bn=new TextEncoder),A(bn.encode(e))})}const Xl="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ps=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let s=0;s<Xl.length;s++)ps[Xl.charCodeAt(s)]=s;const T0=s=>{let A=s.length*.75,e=s.length,t,r=0,i,n,o,a;s[s.length-1]==="="&&(A--,s[s.length-2]==="="&&A--);const l=new ArrayBuffer(A),c=new Uint8Array(l);for(t=0;t<e;t+=4)i=ps[s.charCodeAt(t)],n=ps[s.charCodeAt(t+1)],o=ps[s.charCodeAt(t+2)],a=ps[s.charCodeAt(t+3)],c[r++]=i<<2|n>>4,c[r++]=(n&15)<<4|o>>2,c[r++]=(o&3)<<6|a&63;return l},M0=typeof ArrayBuffer=="function",Qn=(s,A)=>{if(typeof s!="string")return{type:"message",data:$l(s,A)};const e=s.charAt(0);return e==="b"?{type:"message",data:D0(s.substring(1),A)}:pr[e]?s.length>1?{type:pr[e],data:s.substring(1)}:{type:pr[e]}:Cn},D0=(s,A)=>{if(M0){const e=T0(s);return $l(e,A)}else return{base64:!0,data:s}},$l=(s,A)=>A==="blob"?s instanceof Blob?s:new Blob([s]):s instanceof ArrayBuffer?s:s.buffer,Jl="",k0=(s,A)=>{const e=s.length,t=new Array(e);let r=0;s.forEach((i,n)=>{vn(i,!1,o=>{t[n]=o,++r===e&&A(t.join(Jl))})})},_0=(s,A)=>{const e=s.split(Jl),t=[];for(let r=0;r<e.length;r++){const i=Qn(e[r],A);if(t.push(i),i.type==="error")break}return t};function O0(){return new TransformStream({transform(s,A){I0(s,e=>{const t=e.length;let r;if(t<126)r=new Uint8Array(1),new DataView(r.buffer).setUint8(0,t);else if(t<65536){r=new Uint8Array(3);const i=new DataView(r.buffer);i.setUint8(0,126),i.setUint16(1,t)}else{r=new Uint8Array(9);const i=new DataView(r.buffer);i.setUint8(0,127),i.setBigUint64(1,BigInt(t))}s.data&&typeof s.data!="string"&&(r[0]|=128),A.enqueue(r),A.enqueue(e)})}})}let yn;function wr(s){return s.reduce((A,e)=>A+e.length,0)}function mr(s,A){if(s[0].length===A)return s.shift();const e=new Uint8Array(A);let t=0;for(let r=0;r<A;r++)e[r]=s[0][t++],t===s[0].length&&(s.shift(),t=0);return s.length&&t<s[0].length&&(s[0]=s[0].slice(t)),e}function N0(s,A){yn||(yn=new TextDecoder);const e=[];let t=0,r=-1,i=!1;return new TransformStream({transform(n,o){for(e.push(n);;){if(t===0){if(wr(e)<1)break;const a=mr(e,1);i=(a[0]&128)===128,r=a[0]&127,r<126?t=3:r===126?t=1:t=2}else if(t===1){if(wr(e)<2)break;const a=mr(e,2);r=new DataView(a.buffer,a.byteOffset,a.length).getUint16(0),t=3}else if(t===2){if(wr(e)<8)break;const a=mr(e,8),l=new DataView(a.buffer,a.byteOffset,a.length),c=l.getUint32(0);if(c>Math.pow(2,21)-1){o.enqueue(Cn);break}r=c*Math.pow(2,32)+l.getUint32(4),t=3}else{if(wr(e)<r)break;const a=mr(e,r);o.enqueue(Qn(i?a:yn.decode(a),A)),t=0}if(r===0||r>s){o.enqueue(Cn);break}}}})}const Zl=4;function GA(s){if(s)return K0(s)}function K0(s){for(var A in GA.prototype)s[A]=GA.prototype[A];return s}GA.prototype.on=GA.prototype.addEventListener=function(s,A){return this._callbacks=this._callbacks||{},(this._callbacks["$"+s]=this._callbacks["$"+s]||[]).push(A),this},GA.prototype.once=function(s,A){function e(){this.off(s,e),A.apply(this,arguments)}return e.fn=A,this.on(s,e),this},GA.prototype.off=GA.prototype.removeListener=GA.prototype.removeAllListeners=GA.prototype.removeEventListener=function(s,A){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var e=this._callbacks["$"+s];if(!e)return this;if(arguments.length==1)return delete this._callbacks["$"+s],this;for(var t,r=0;r<e.length;r++)if(t=e[r],t===A||t.fn===A){e.splice(r,1);break}return e.length===0&&delete this._callbacks["$"+s],this},GA.prototype.emit=function(s){this._callbacks=this._callbacks||{};for(var A=new Array(arguments.length-1),e=this._callbacks["$"+s],t=1;t<arguments.length;t++)A[t-1]=arguments[t];if(e){e=e.slice(0);for(var t=0,r=e.length;t<r;++t)e[t].apply(this,A)}return this},GA.prototype.emitReserved=GA.prototype.emit,GA.prototype.listeners=function(s){return this._callbacks=this._callbacks||{},this._callbacks["$"+s]||[]},GA.prototype.hasListeners=function(s){return!!this.listeners(s).length};const Cr=typeof Promise=="function"&&typeof Promise.resolve=="function"?A=>Promise.resolve().then(A):(A,e)=>e(A,0),ve=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),V0="arraybuffer";function lb(){}function Yl(s,...A){return A.reduce((e,t)=>(s.hasOwnProperty(t)&&(e[t]=s[t]),e),{})}const P0=ve.setTimeout,G0=ve.clearTimeout;function vr(s,A){A.useNativeTimers?(s.setTimeoutFn=P0.bind(ve),s.clearTimeoutFn=G0.bind(ve)):(s.setTimeoutFn=ve.setTimeout.bind(ve),s.clearTimeoutFn=ve.clearTimeout.bind(ve))}const R0=1.33;function z0(s){return typeof s=="string"?W0(s):Math.ceil((s.byteLength||s.size)*R0)}function W0(s){let A=0,e=0;for(let t=0,r=s.length;t<r;t++)A=s.charCodeAt(t),A<128?e+=1:A<2048?e+=2:A<55296||A>=57344?e+=3:(t++,e+=4);return e}function ql(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function X0(s){let A="";for(let e in s)s.hasOwnProperty(e)&&(A.length&&(A+="&"),A+=encodeURIComponent(e)+"="+encodeURIComponent(s[e]));return A}function $0(s){let A={},e=s.split("&");for(let t=0,r=e.length;t<r;t++){let i=e[t].split("=");A[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return A}class J0 extends Error{constructor(A,e,t){super(A),this.description=e,this.context=t,this.type="TransportError"}}class Un extends GA{constructor(A){super(),this.writable=!1,vr(this,A),this.opts=A,this.query=A.query,this.socket=A.socket,this.supportsBinary=!A.forceBase64}onError(A,e,t){return super.emitReserved("error",new J0(A,e,t)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(A){this.readyState==="open"&&this.write(A)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(A){const e=Qn(A,this.socket.binaryType);this.onPacket(e)}onPacket(A){super.emitReserved("packet",A)}onClose(A){this.readyState="closed",super.emitReserved("close",A)}pause(A){}createUri(A,e={}){return A+"://"+this._hostname()+this._port()+this.opts.path+this._query(e)}_hostname(){const A=this.opts.hostname;return A.indexOf(":")===-1?A:"["+A+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(A){const e=X0(A);return e.length?"?"+e:""}}class Z0 extends Un{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(A){this.readyState="pausing";const e=()=>{this.readyState="paused",A()};if(this._polling||!this.writable){let t=0;this._polling&&(t++,this.once("pollComplete",function(){--t||e()})),this.writable||(t++,this.once("drain",function(){--t||e()}))}else e()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(A){const e=t=>{if(this.readyState==="opening"&&t.type==="open"&&this.onOpen(),t.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(t)};_0(A,this.socket.binaryType).forEach(e),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const A=()=>{this.write([{type:"close"}])};this.readyState==="open"?A():this.once("open",A)}write(A){this.writable=!1,k0(A,e=>{this.doWrite(e,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const A=this.opts.secure?"https":"http",e=this.query||{};return this.opts.timestampRequests!==!1&&(e[this.opts.timestampParam]=ql()),!this.supportsBinary&&!e.sid&&(e.b64=1),this.createUri(A,e)}}let jl=!1;try{jl=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Y0=jl;function q0(){}class j0 extends Z0{constructor(A){if(super(A),typeof location<"u"){const e=location.protocol==="https:";let t=location.port;t||(t=e?"443":"80"),this.xd=typeof location<"u"&&A.hostname!==location.hostname||t!==A.port}}doWrite(A,e){const t=this.request({method:"POST",data:A});t.on("success",e),t.on("error",(r,i)=>{this.onError("xhr post error",r,i)})}doPoll(){const A=this.request();A.on("data",this.onData.bind(this)),A.on("error",(e,t)=>{this.onError("xhr poll error",e,t)}),this.pollXhr=A}}class _e extends GA{constructor(A,e,t){super(),this.createRequest=A,vr(this,t),this._opts=t,this._method=t.method||"GET",this._uri=e,this._data=t.data!==void 0?t.data:null,this._create()}_create(){var A;const e=Yl(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");e.xdomain=!!this._opts.xd;const t=this._xhr=this.createRequest(e);try{t.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){t.setDisableHeaderCheck&&t.setDisableHeaderCheck(!0);for(let r in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(r)&&t.setRequestHeader(r,this._opts.extraHeaders[r])}}catch{}if(this._method==="POST")try{t.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{t.setRequestHeader("Accept","*/*")}catch{}(A=this._opts.cookieJar)===null||A===void 0||A.addCookies(t),"withCredentials"in t&&(t.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(t.timeout=this._opts.requestTimeout),t.onreadystatechange=()=>{var r;t.readyState===3&&((r=this._opts.cookieJar)===null||r===void 0||r.parseCookies(t.getResponseHeader("set-cookie"))),t.readyState===4&&(t.status===200||t.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof t.status=="number"?t.status:0)},0))},t.send(this._data)}catch(r){this.setTimeoutFn(()=>{this._onError(r)},0);return}typeof document<"u"&&(this._index=_e.requestsCount++,_e.requests[this._index]=this)}_onError(A){this.emitReserved("error",A,this._xhr),this._cleanup(!0)}_cleanup(A){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=q0,A)try{this._xhr.abort()}catch{}typeof document<"u"&&delete _e.requests[this._index],this._xhr=null}}_onLoad(){const A=this._xhr.responseText;A!==null&&(this.emitReserved("data",A),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}if(_e.requestsCount=0,_e.requests={},typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Ac);else if(typeof addEventListener=="function"){const s="onpagehide"in ve?"pagehide":"unload";addEventListener(s,Ac,!1)}}function Ac(){for(let s in _e.requests)_e.requests.hasOwnProperty(s)&&_e.requests[s].abort()}const Ag=(function(){const s=ec({xdomain:!1});return s&&s.responseType!==null})();class eg extends j0{constructor(A){super(A);const e=A&&A.forceBase64;this.supportsBinary=Ag&&!e}request(A={}){return Object.assign(A,{xd:this.xd},this.opts),new _e(ec,this.uri(),A)}}function ec(s){const A=s.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!A||Y0))return new XMLHttpRequest}catch{}if(!A)try{return new ve[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const tc=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class tg extends Un{get name(){return"websocket"}doOpen(){const A=this.uri(),e=this.opts.protocols,t=tc?{}:Yl(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(t.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(A,e,t)}catch(r){return this.emitReserved("error",r)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=A=>this.onClose({description:"websocket connection closed",context:A}),this.ws.onmessage=A=>this.onData(A.data),this.ws.onerror=A=>this.onError("websocket error",A)}write(A){this.writable=!1;for(let e=0;e<A.length;e++){const t=A[e],r=e===A.length-1;vn(t,this.supportsBinary,i=>{try{this.doWrite(t,i)}catch{}r&&Cr(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const A=this.opts.secure?"wss":"ws",e=this.query||{};return this.opts.timestampRequests&&(e[this.opts.timestampParam]=ql()),this.supportsBinary||(e.b64=1),this.createUri(A,e)}}const Fn=ve.WebSocket||ve.MozWebSocket;class sg extends tg{createSocket(A,e,t){return tc?new Fn(A,e,t):e?new Fn(A,e):new Fn(A)}doWrite(A,e){this.ws.send(e)}}class rg extends Un{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(A){return this.emitReserved("error",A)}this._transport.closed.then(()=>{this.onClose()}).catch(A=>{this.onError("webtransport error",A)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(A=>{const e=N0(Number.MAX_SAFE_INTEGER,this.socket.binaryType),t=A.readable.pipeThrough(e).getReader(),r=O0();r.readable.pipeTo(A.writable),this._writer=r.writable.getWriter();const i=()=>{t.read().then(({done:o,value:a})=>{o||(this.onPacket(a),i())}).catch(o=>{})};i();const n={type:"open"};this.query.sid&&(n.data=`{"sid":"${this.query.sid}"}`),this._writer.write(n).then(()=>this.onOpen())})})}write(A){this.writable=!1;for(let e=0;e<A.length;e++){const t=A[e],r=e===A.length-1;this._writer.write(t).then(()=>{r&&Cr(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var A;(A=this._transport)===null||A===void 0||A.close()}}const ig={websocket:sg,webtransport:rg,polling:eg},ng=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,og=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function En(s){if(s.length>8e3)throw"URI too long";const A=s,e=s.indexOf("["),t=s.indexOf("]");e!=-1&&t!=-1&&(s=s.substring(0,e)+s.substring(e,t).replace(/:/g,";")+s.substring(t,s.length));let r=ng.exec(s||""),i={},n=14;for(;n--;)i[og[n]]=r[n]||"";return e!=-1&&t!=-1&&(i.source=A,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i.pathNames=ag(i,i.path),i.queryKey=lg(i,i.query),i}function ag(s,A){const e=/\/{2,9}/g,t=A.replace(e,"/").split("/");return(A.slice(0,1)=="/"||A.length===0)&&t.splice(0,1),A.slice(-1)=="/"&&t.splice(t.length-1,1),t}function lg(s,A){const e={};return A.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(t,r,i){r&&(e[r]=i)}),e}const xn=typeof addEventListener=="function"&&typeof removeEventListener=="function",br=[];xn&&addEventListener("offline",()=>{br.forEach(s=>s())},!1);class et extends GA{constructor(A,e){if(super(),this.binaryType=V0,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,A&&typeof A=="object"&&(e=A,A=null),A){const t=En(A);e.hostname=t.host,e.secure=t.protocol==="https"||t.protocol==="wss",e.port=t.port,t.query&&(e.query=t.query)}else e.host&&(e.hostname=En(e.host).host);vr(this,e),this.secure=e.secure!=null?e.secure:typeof location<"u"&&location.protocol==="https:",e.hostname&&!e.port&&(e.port=this.secure?"443":"80"),this.hostname=e.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=e.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},e.transports.forEach(t=>{const r=t.prototype.name;this.transports.push(r),this._transportsByName[r]=t}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},e),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=$0(this.opts.query)),xn&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},br.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(A){const e=Object.assign({},this.opts.query);e.EIO=Zl,e.transport=A,this.id&&(e.sid=this.id);const t=Object.assign({},this.opts,{query:e,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[A]);return new this._transportsByName[A](t)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const A=this.opts.rememberUpgrade&&et.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const e=this.createTransport(A);e.open(),this.setTransport(e)}setTransport(A){this.transport&&this.transport.removeAllListeners(),this.transport=A,A.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",e=>this._onClose("transport close",e))}onOpen(){this.readyState="open",et.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(A){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",A),this.emitReserved("heartbeat"),A.type){case"open":this.onHandshake(JSON.parse(A.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const e=new Error("server error");e.code=A.data,this._onError(e);break;case"message":this.emitReserved("data",A.data),this.emitReserved("message",A.data);break}}onHandshake(A){this.emitReserved("handshake",A),this.id=A.sid,this.transport.query.sid=A.sid,this._pingInterval=A.pingInterval,this._pingTimeout=A.pingTimeout,this._maxPayload=A.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const A=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+A,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},A),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const A=this._getWritablePackets();this.transport.send(A),this._prevBufferLen=A.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let e=1;for(let t=0;t<this.writeBuffer.length;t++){const r=this.writeBuffer[t].data;if(r&&(e+=z0(r)),t>0&&e>this._maxPayload)return this.writeBuffer.slice(0,t);e+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const A=Date.now()>this._pingTimeoutTime;return A&&(this._pingTimeoutTime=0,Cr(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),A}write(A,e,t){return this._sendPacket("message",A,e,t),this}send(A,e,t){return this._sendPacket("message",A,e,t),this}_sendPacket(A,e,t,r){if(typeof e=="function"&&(r=e,e=void 0),typeof t=="function"&&(r=t,t=null),this.readyState==="closing"||this.readyState==="closed")return;t=t||{},t.compress=t.compress!==!1;const i={type:A,data:e,options:t};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),r&&this.once("flush",r),this.flush()}close(){const A=()=>{this._onClose("forced close"),this.transport.close()},e=()=>{this.off("upgrade",e),this.off("upgradeError",e),A()},t=()=>{this.once("upgrade",e),this.once("upgradeError",e)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?t():A()}):this.upgrading?t():A()),this}_onError(A){if(et.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",A),this._onClose("transport error",A)}_onClose(A,e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),xn&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const t=br.indexOf(this._offlineEventListener);t!==-1&&br.splice(t,1)}this.readyState="closed",this.id=null,this.emitReserved("close",A,e),this.writeBuffer=[],this._prevBufferLen=0}}}et.protocol=Zl;class cg extends et{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let A=0;A<this._upgrades.length;A++)this._probe(this._upgrades[A])}_probe(A){let e=this.createTransport(A),t=!1;et.priorWebsocketSuccess=!1;const r=()=>{t||(e.send([{type:"ping",data:"probe"}]),e.once("packet",u=>{if(!t)if(u.type==="pong"&&u.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",e),!e)return;et.priorWebsocketSuccess=e.name==="websocket",this.transport.pause(()=>{t||this.readyState!=="closed"&&(c(),this.setTransport(e),e.send([{type:"upgrade"}]),this.emitReserved("upgrade",e),e=null,this.upgrading=!1,this.flush())})}else{const d=new Error("probe error");d.transport=e.name,this.emitReserved("upgradeError",d)}}))};function i(){t||(t=!0,c(),e.close(),e=null)}const n=u=>{const d=new Error("probe error: "+u);d.transport=e.name,i(),this.emitReserved("upgradeError",d)};function o(){n("transport closed")}function a(){n("socket closed")}function l(u){e&&u.name!==e.name&&i()}const c=()=>{e.removeListener("open",r),e.removeListener("error",n),e.removeListener("close",o),this.off("close",a),this.off("upgrading",l)};e.once("open",r),e.once("error",n),e.once("close",o),this.once("close",a),this.once("upgrading",l),this._upgrades.indexOf("webtransport")!==-1&&A!=="webtransport"?this.setTimeoutFn(()=>{t||e.open()},200):e.open()}onHandshake(A){this._upgrades=this._filterUpgrades(A.upgrades),super.onHandshake(A)}_filterUpgrades(A){const e=[];for(let t=0;t<A.length;t++)~this.transports.indexOf(A[t])&&e.push(A[t]);return e}}let hg=class extends cg{constructor(A,e={}){const t=typeof A=="object"?A:e;(!t.transports||t.transports&&typeof t.transports[0]=="string")&&(t.transports=(t.transports||["polling","websocket","webtransport"]).map(r=>ig[r]).filter(r=>!!r)),super(A,t)}};function ug(s,A="",e){let t=s;e=e||typeof location<"u"&&location,s==null&&(s=e.protocol+"//"+e.host),typeof s=="string"&&(s.charAt(0)==="/"&&(s.charAt(1)==="/"?s=e.protocol+s:s=e.host+s),/^(https?|wss?):\/\//.test(s)||(typeof e<"u"?s=e.protocol+"//"+s:s="https://"+s),t=En(s)),t.port||(/^(http|ws)$/.test(t.protocol)?t.port="80":/^(http|ws)s$/.test(t.protocol)&&(t.port="443")),t.path=t.path||"/";const i=t.host.indexOf(":")!==-1?"["+t.host+"]":t.host;return t.id=t.protocol+"://"+i+":"+t.port+A,t.href=t.protocol+"://"+i+(e&&e.port===t.port?"":":"+t.port),t}const fg=typeof ArrayBuffer=="function",dg=s=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(s):s.buffer instanceof ArrayBuffer,sc=Object.prototype.toString,Bg=typeof Blob=="function"||typeof Blob<"u"&&sc.call(Blob)==="[object BlobConstructor]",gg=typeof File=="function"||typeof File<"u"&&sc.call(File)==="[object FileConstructor]";function Sn(s){return fg&&(s instanceof ArrayBuffer||dg(s))||Bg&&s instanceof Blob||gg&&s instanceof File}function Qr(s,A){if(!s||typeof s!="object")return!1;if(Array.isArray(s)){for(let e=0,t=s.length;e<t;e++)if(Qr(s[e]))return!0;return!1}if(Sn(s))return!0;if(s.toJSON&&typeof s.toJSON=="function"&&arguments.length===1)return Qr(s.toJSON(),!0);for(const e in s)if(Object.prototype.hasOwnProperty.call(s,e)&&Qr(s[e]))return!0;return!1}function pg(s){const A=[],e=s.data,t=s;return t.data=Hn(e,A),t.attachments=A.length,{packet:t,buffers:A}}function Hn(s,A){if(!s)return s;if(Sn(s)){const e={_placeholder:!0,num:A.length};return A.push(s),e}else if(Array.isArray(s)){const e=new Array(s.length);for(let t=0;t<s.length;t++)e[t]=Hn(s[t],A);return e}else if(typeof s=="object"&&!(s instanceof Date)){const e={};for(const t in s)Object.prototype.hasOwnProperty.call(s,t)&&(e[t]=Hn(s[t],A));return e}return s}function wg(s,A){return s.data=Ln(s.data,A),delete s.attachments,s}function Ln(s,A){if(!s)return s;if(s&&s._placeholder===!0){if(typeof s.num=="number"&&s.num>=0&&s.num<A.length)return A[s.num];throw new Error("illegal attachments")}else if(Array.isArray(s))for(let e=0;e<s.length;e++)s[e]=Ln(s[e],A);else if(typeof s=="object")for(const e in s)Object.prototype.hasOwnProperty.call(s,e)&&(s[e]=Ln(s[e],A));return s}const mg=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var QA;(function(s){s[s.CONNECT=0]="CONNECT",s[s.DISCONNECT=1]="DISCONNECT",s[s.EVENT=2]="EVENT",s[s.ACK=3]="ACK",s[s.CONNECT_ERROR=4]="CONNECT_ERROR",s[s.BINARY_EVENT=5]="BINARY_EVENT",s[s.BINARY_ACK=6]="BINARY_ACK"})(QA||(QA={}));class Cg{constructor(A){this.replacer=A}encode(A){return(A.type===QA.EVENT||A.type===QA.ACK)&&Qr(A)?this.encodeAsBinary({type:A.type===QA.EVENT?QA.BINARY_EVENT:QA.BINARY_ACK,nsp:A.nsp,data:A.data,id:A.id}):[this.encodeAsString(A)]}encodeAsString(A){let e=""+A.type;return(A.type===QA.BINARY_EVENT||A.type===QA.BINARY_ACK)&&(e+=A.attachments+"-"),A.nsp&&A.nsp!=="/"&&(e+=A.nsp+","),A.id!=null&&(e+=A.id),A.data!=null&&(e+=JSON.stringify(A.data,this.replacer)),e}encodeAsBinary(A){const e=pg(A),t=this.encodeAsString(e.packet),r=e.buffers;return r.unshift(t),r}}class In extends GA{constructor(A){super(),this.reviver=A}add(A){let e;if(typeof A=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");e=this.decodeString(A);const t=e.type===QA.BINARY_EVENT;t||e.type===QA.BINARY_ACK?(e.type=t?QA.EVENT:QA.ACK,this.reconstructor=new vg(e),e.attachments===0&&super.emitReserved("decoded",e)):super.emitReserved("decoded",e)}else if(Sn(A)||A.base64)if(this.reconstructor)e=this.reconstructor.takeBinaryData(A),e&&(this.reconstructor=null,super.emitReserved("decoded",e));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+A)}decodeString(A){let e=0;const t={type:Number(A.charAt(0))};if(QA[t.type]===void 0)throw new Error("unknown packet type "+t.type);if(t.type===QA.BINARY_EVENT||t.type===QA.BINARY_ACK){const i=e+1;for(;A.charAt(++e)!=="-"&&e!=A.length;);const n=A.substring(i,e);if(n!=Number(n)||A.charAt(e)!=="-")throw new Error("Illegal attachments");t.attachments=Number(n)}if(A.charAt(e+1)==="/"){const i=e+1;for(;++e&&!(A.charAt(e)===","||e===A.length););t.nsp=A.substring(i,e)}else t.nsp="/";const r=A.charAt(e+1);if(r!==""&&Number(r)==r){const i=e+1;for(;++e;){const n=A.charAt(e);if(n==null||Number(n)!=n){--e;break}if(e===A.length)break}t.id=Number(A.substring(i,e+1))}if(A.charAt(++e)){const i=this.tryParse(A.substr(e));if(In.isPayloadValid(t.type,i))t.data=i;else throw new Error("invalid payload")}return t}tryParse(A){try{return JSON.parse(A,this.reviver)}catch{return!1}}static isPayloadValid(A,e){switch(A){case QA.CONNECT:return rc(e);case QA.DISCONNECT:return e===void 0;case QA.CONNECT_ERROR:return typeof e=="string"||rc(e);case QA.EVENT:case QA.BINARY_EVENT:return Array.isArray(e)&&(typeof e[0]=="number"||typeof e[0]=="string"&&mg.indexOf(e[0])===-1);case QA.ACK:case QA.BINARY_ACK:return Array.isArray(e)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class vg{constructor(A){this.packet=A,this.buffers=[],this.reconPack=A}takeBinaryData(A){if(this.buffers.push(A),this.buffers.length===this.reconPack.attachments){const e=wg(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function rc(s){return Object.prototype.toString.call(s)==="[object Object]"}const bg=Object.freeze(Object.defineProperty({__proto__:null,Decoder:In,Encoder:Cg,get PacketType(){return QA}},Symbol.toStringTag,{value:"Module"}));function He(s,A,e){return s.on(A,e),function(){s.off(A,e)}}const Qg=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class ic extends GA{constructor(A,e,t){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=A,this.nsp=e,t&&t.auth&&(this.auth=t.auth),this._opts=Object.assign({},t),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const A=this.io;this.subs=[He(A,"open",this.onopen.bind(this)),He(A,"packet",this.onpacket.bind(this)),He(A,"error",this.onerror.bind(this)),He(A,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...A){return A.unshift("message"),this.emit.apply(this,A),this}emit(A,...e){var t,r,i;if(Qg.hasOwnProperty(A))throw new Error('"'+A.toString()+'" is a reserved event name');if(e.unshift(A),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(e),this;const n={type:QA.EVENT,data:e};if(n.options={},n.options.compress=this.flags.compress!==!1,typeof e[e.length-1]=="function"){const c=this.ids++,u=e.pop();this._registerAckCallback(c,u),n.id=c}const o=(r=(t=this.io.engine)===null||t===void 0?void 0:t.transport)===null||r===void 0?void 0:r.writable,a=this.connected&&!(!((i=this.io.engine)===null||i===void 0)&&i._hasPingExpired());return this.flags.volatile&&!o||(a?(this.notifyOutgoingListeners(n),this.packet(n)):this.sendBuffer.push(n)),this.flags={},this}_registerAckCallback(A,e){var t;const r=(t=this.flags.timeout)!==null&&t!==void 0?t:this._opts.ackTimeout;if(r===void 0){this.acks[A]=e;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[A];for(let o=0;o<this.sendBuffer.length;o++)this.sendBuffer[o].id===A&&this.sendBuffer.splice(o,1);e.call(this,new Error("operation has timed out"))},r),n=(...o)=>{this.io.clearTimeoutFn(i),e.apply(this,o)};n.withError=!0,this.acks[A]=n}emitWithAck(A,...e){return new Promise((t,r)=>{const i=(n,o)=>n?r(n):t(o);i.withError=!0,e.push(i),this.emit(A,...e)})}_addToQueue(A){let e;typeof A[A.length-1]=="function"&&(e=A.pop());const t={id:this._queueSeq++,tryCount:0,pending:!1,args:A,flags:Object.assign({fromQueue:!0},this.flags)};A.push((r,...i)=>(this._queue[0],r!==null?t.tryCount>this._opts.retries&&(this._queue.shift(),e&&e(r)):(this._queue.shift(),e&&e(null,...i)),t.pending=!1,this._drainQueue())),this._queue.push(t),this._drainQueue()}_drainQueue(A=!1){if(!this.connected||this._queue.length===0)return;const e=this._queue[0];e.pending&&!A||(e.pending=!0,e.tryCount++,this.flags=e.flags,this.emit.apply(this,e.args))}packet(A){A.nsp=this.nsp,this.io._packet(A)}onopen(){typeof this.auth=="function"?this.auth(A=>{this._sendConnectPacket(A)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(A){this.packet({type:QA.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},A):A})}onerror(A){this.connected||this.emitReserved("connect_error",A)}onclose(A,e){this.connected=!1,delete this.id,this.emitReserved("disconnect",A,e),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(A=>{if(!this.sendBuffer.some(t=>String(t.id)===A)){const t=this.acks[A];delete this.acks[A],t.withError&&t.call(this,new Error("socket has been disconnected"))}})}onpacket(A){if(A.nsp===this.nsp)switch(A.type){case QA.CONNECT:A.data&&A.data.sid?this.onconnect(A.data.sid,A.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case QA.EVENT:case QA.BINARY_EVENT:this.onevent(A);break;case QA.ACK:case QA.BINARY_ACK:this.onack(A);break;case QA.DISCONNECT:this.ondisconnect();break;case QA.CONNECT_ERROR:this.destroy();const t=new Error(A.data.message);t.data=A.data.data,this.emitReserved("connect_error",t);break}}onevent(A){const e=A.data||[];A.id!=null&&e.push(this.ack(A.id)),this.connected?this.emitEvent(e):this.receiveBuffer.push(Object.freeze(e))}emitEvent(A){if(this._anyListeners&&this._anyListeners.length){const e=this._anyListeners.slice();for(const t of e)t.apply(this,A)}super.emit.apply(this,A),this._pid&&A.length&&typeof A[A.length-1]=="string"&&(this._lastOffset=A[A.length-1])}ack(A){const e=this;let t=!1;return function(...r){t||(t=!0,e.packet({type:QA.ACK,id:A,data:r}))}}onack(A){const e=this.acks[A.id];typeof e=="function"&&(delete this.acks[A.id],e.withError&&A.data.unshift(null),e.apply(this,A.data))}onconnect(A,e){this.id=A,this.recovered=e&&this._pid===e,this._pid=e,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(A=>this.emitEvent(A)),this.receiveBuffer=[],this.sendBuffer.forEach(A=>{this.notifyOutgoingListeners(A),this.packet(A)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(A=>A()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:QA.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(A){return this.flags.compress=A,this}get volatile(){return this.flags.volatile=!0,this}timeout(A){return this.flags.timeout=A,this}onAny(A){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(A),this}prependAny(A){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(A),this}offAny(A){if(!this._anyListeners)return this;if(A){const e=this._anyListeners;for(let t=0;t<e.length;t++)if(A===e[t])return e.splice(t,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(A){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(A),this}prependAnyOutgoing(A){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(A),this}offAnyOutgoing(A){if(!this._anyOutgoingListeners)return this;if(A){const e=this._anyOutgoingListeners;for(let t=0;t<e.length;t++)if(A===e[t])return e.splice(t,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(A){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const e=this._anyOutgoingListeners.slice();for(const t of e)t.apply(this,A.data)}}}function Ot(s){s=s||{},this.ms=s.min||100,this.max=s.max||1e4,this.factor=s.factor||2,this.jitter=s.jitter>0&&s.jitter<=1?s.jitter:0,this.attempts=0}Ot.prototype.duration=function(){var s=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var A=Math.random(),e=Math.floor(A*this.jitter*s);s=(Math.floor(A*10)&1)==0?s-e:s+e}return Math.min(s,this.max)|0},Ot.prototype.reset=function(){this.attempts=0},Ot.prototype.setMin=function(s){this.ms=s},Ot.prototype.setMax=function(s){this.max=s},Ot.prototype.setJitter=function(s){this.jitter=s};class Tn extends GA{constructor(A,e){var t;super(),this.nsps={},this.subs=[],A&&typeof A=="object"&&(e=A,A=void 0),e=e||{},e.path=e.path||"/socket.io",this.opts=e,vr(this,e),this.reconnection(e.reconnection!==!1),this.reconnectionAttempts(e.reconnectionAttempts||1/0),this.reconnectionDelay(e.reconnectionDelay||1e3),this.reconnectionDelayMax(e.reconnectionDelayMax||5e3),this.randomizationFactor((t=e.randomizationFactor)!==null&&t!==void 0?t:.5),this.backoff=new Ot({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(e.timeout==null?2e4:e.timeout),this._readyState="closed",this.uri=A;const r=e.parser||bg;this.encoder=new r.Encoder,this.decoder=new r.Decoder,this._autoConnect=e.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(A){return arguments.length?(this._reconnection=!!A,A||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(A){return A===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=A,this)}reconnectionDelay(A){var e;return A===void 0?this._reconnectionDelay:(this._reconnectionDelay=A,(e=this.backoff)===null||e===void 0||e.setMin(A),this)}randomizationFactor(A){var e;return A===void 0?this._randomizationFactor:(this._randomizationFactor=A,(e=this.backoff)===null||e===void 0||e.setJitter(A),this)}reconnectionDelayMax(A){var e;return A===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=A,(e=this.backoff)===null||e===void 0||e.setMax(A),this)}timeout(A){return arguments.length?(this._timeout=A,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(A){if(~this._readyState.indexOf("open"))return this;this.engine=new hg(this.uri,this.opts);const e=this.engine,t=this;this._readyState="opening",this.skipReconnect=!1;const r=He(e,"open",function(){t.onopen(),A&&A()}),i=o=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",o),A?A(o):this.maybeReconnectOnOpen()},n=He(e,"error",i);if(this._timeout!==!1){const o=this._timeout,a=this.setTimeoutFn(()=>{r(),i(new Error("timeout")),e.close()},o);this.opts.autoUnref&&a.unref(),this.subs.push(()=>{this.clearTimeoutFn(a)})}return this.subs.push(r),this.subs.push(n),this}connect(A){return this.open(A)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const A=this.engine;this.subs.push(He(A,"ping",this.onping.bind(this)),He(A,"data",this.ondata.bind(this)),He(A,"error",this.onerror.bind(this)),He(A,"close",this.onclose.bind(this)),He(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(A){try{this.decoder.add(A)}catch(e){this.onclose("parse error",e)}}ondecoded(A){Cr(()=>{this.emitReserved("packet",A)},this.setTimeoutFn)}onerror(A){this.emitReserved("error",A)}socket(A,e){let t=this.nsps[A];return t?this._autoConnect&&!t.active&&t.connect():(t=new ic(this,A,e),this.nsps[A]=t),t}_destroy(A){const e=Object.keys(this.nsps);for(const t of e)if(this.nsps[t].active)return;this._close()}_packet(A){const e=this.encoder.encode(A);for(let t=0;t<e.length;t++)this.engine.write(e[t],A.options)}cleanup(){this.subs.forEach(A=>A()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(A,e){var t;this.cleanup(),(t=this.engine)===null||t===void 0||t.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",A,e),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const A=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const e=this.backoff.duration();this._reconnecting=!0;const t=this.setTimeoutFn(()=>{A.skipReconnect||(this.emitReserved("reconnect_attempt",A.backoff.attempts),!A.skipReconnect&&A.open(r=>{r?(A._reconnecting=!1,A.reconnect(),this.emitReserved("reconnect_error",r)):A.onreconnect()}))},e);this.opts.autoUnref&&t.unref(),this.subs.push(()=>{this.clearTimeoutFn(t)})}}onreconnect(){const A=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",A)}}const ws={};function yr(s,A){typeof s=="object"&&(A=s,s=void 0),A=A||{};const e=ug(s,A.path||"/socket.io"),t=e.source,r=e.id,i=e.path,n=ws[r]&&i in ws[r].nsps,o=A.forceNew||A["force new connection"]||A.multiplex===!1||n;let a;return o?a=new Tn(t,A):(ws[r]||(ws[r]=new Tn(t,A)),a=ws[r]),e.query&&!A.query&&(A.query=e.queryKey),a.socket(e.path,A)}Object.assign(yr,{Manager:Tn,Socket:ic,io:yr,connect:yr});let fe="http://localhost:8000";function nc(s){if(!s){console.warn("⚠️ [SOCKET DEBUG] setBaseUrl called with empty URL");return}if(s!==fe){const A=fe;fe=s,console.log(`🔄 [SOCKET DEBUG] SocketService: Changing baseUrl from ${A} to ${s}`),OA&&(console.log("🔄 [SOCKET DEBUG] Disconnecting old socket..."),OA.disconnect(),OA.removeAllListeners(),OA=null)}else console.log(`✅ [SOCKET DEBUG] BaseUrl already set to ${s}, no change needed`)}let OA=null;function yg(){const A=(()=>{try{return localStorage.getItem("token")||localStorage.getItem("authToken")||localStorage.getItem("accessToken")||localStorage.getItem("jwt_token")}catch{return null}})();console.log("🔧 [SOCKET DEBUG] Creating socket for MT5 backend:",{baseUrl:fe,hasToken:!!A,tokenLength:A?.length||0,note:"Connecting to MT5 backend WebSocket (root namespace for candles)"});const e=yr(fe,{transports:["websocket","polling"],reconnection:!0,reconnectionDelay:1e3,reconnectionAttempts:10,timeout:15e3,forceNew:!1,withCredentials:!0,autoConnect:!0,upgrade:!0,auth:A?{token:A}:void 0});return e.on("connect",()=>{console.log("✅ [SOCKET DEBUG] SocketService: connected to ROOT namespace",{socketId:e.id,baseUrl:fe,transport:e.io.engine.transport.name,namespace:e.nsp.name||"/",note:"This socket connects to CandlesGateway (root namespace)"})}),e.on("disconnect",t=>{console.log("⚠️ [SOCKET DEBUG] SocketService: disconnected:",{reason:t,socketId:e.id})}),e.on("connect_error",t=>{console.error("❌ [SOCKET DEBUG] SocketService: connection error to ROOT namespace:",{message:t?.message,description:t?.description,context:t?.context,type:t?.type,baseUrl:fe,namespace:e.nsp.name||"/",note:"CandlesGateway requires JWT authentication - check if token is valid"})}),e.on("reconnect_attempt",t=>{console.log("🔄 [SOCKET DEBUG] SocketService: reconnect attempt",{attempt:t,baseUrl:fe})}),e.on("reconnect_failed",()=>{console.error("❌ [SOCKET DEBUG] SocketService: failed to reconnect",{baseUrl:fe})}),e.on("reconnect",t=>{console.log("✅ [SOCKET DEBUG] SocketService: reconnected after",{attempts:t,socketId:e.id})}),e}function Mn(){const s=OA?.io?.uri||OA?.io?.opts?.host||null;return!OA||OA.io&&s&&s!==fe?(OA&&(console.log("🔄 [SOCKET DEBUG] Recreating socket:",{oldUri:s,newBaseUrl:fe,wasConnected:OA.connected,reason:"baseUrl changed"}),OA.disconnect(),OA.removeAllListeners(),OA=null),console.log("🔧 [SOCKET DEBUG] Creating new socket instance for MT5 backend:",fe),OA=yg()):OA.connected?console.log("✅ [SOCKET DEBUG] Reusing existing connected socket:",{socketId:OA.id,connected:OA.connected,baseUrl:fe,uri:s}):console.log("⏳ [SOCKET DEBUG] Socket exists but not connected, waiting...",{socketId:OA.id,baseUrl:fe}),OA}function Ug(s,A){const e=Mn();return e.on(s,A),()=>e.off(s,A)}function Fg(s,A){OA&&OA.off(s,A)}function Eg(s,A){Mn().emit(s,A)}function xg(){return OA?OA.connected?"connected":"connecting":"disconnected"}const Ur={getSocket:Mn,on:Ug,off:Fg,emit:Eg,getStatus:xg,setBaseUrl:nc},Sg={},oc=Q.createContext(),oe=()=>{const s=Q.useContext(oc);if(!s)throw new Error("useTrading must be used within TradingProvider");return s},Hg=({children:s,baseUrl:A,endpoints:e,accountId:t})=>{const r=A??(typeof{url:typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:Qi&&Qi.tagName.toUpperCase()==="SCRIPT"&&Qi.src||new URL("chart-sdk.umd.js",document.baseURI).href}<"u"&&Sg?.VITE_BASE_URL)??"http://localhost:8000",n={...{candles:"/api/chart/candles",symbols:"/symbols",trades:"/trades",account:"/api/user/account"},...e},o=e?.params||{},[a,l]=Q.useState("BTCUSD"),[c,u]=Q.useState("M1"),[d,g]=Q.useState([]),[B,f]=Q.useState(!0),[p,m]=Q.useState([]),[w,v]=Q.useState(!1),[y,E]=Q.useState(1e5),[F,T]=Q.useState(null),[M,I]=Q.useState([]),[cA,z]=Q.useState(!0),[fA,W]=Q.useState(!1),[nA,j]=Q.useState(!0),[H,X]=Q.useState("candles"),[sA,UA]=Q.useState(!1),[yA,FA]=Q.useState("dark"),AA=Q.useRef(null);Q.useEffect(()=>{Ur.setBaseUrl(r)},[r]);const eA=Q.useRef(new Map),wA=Q.useRef(null),dA=1e3,WA=Q.useCallback(async()=>{if(!t){console.log("⚠️ No accountId, skipping orders fetch");return}try{const uA=localStorage.getItem("token");if(!uA){console.log("⚠️ No token, skipping orders fetch");return}v(!0);const J=await TA.get(`${r}/trades/account/${t}`,{headers:{Authorization:`Bearer ${uA}`}});let k=[];Array.isArray(J.data)?k=J.data:J.data?.data&&Array.isArray(J.data.data)&&(k=J.data.data);const G=k.filter(O=>O.closePrice===null||O.closePrice===void 0).map(O=>({id:O.id,ticket:O.id?.substring(0,8),symbol:O.symbol,type:O.type,volume:O.volume,price:O.openPrice,stopLoss:O.stopLoss,takeProfit:O.takeProfit,comment:O.comment||"",status:"OPEN",swap:0,profit:O.profit||0,profitCurrency:"USD",time:new Date(O.openedAt||O.openAt||Date.now()).toLocaleTimeString(),openAt:O.openedAt||O.openAt,closeAt:O.closedAt||O.closeAt}));m(G)}catch(uA){console.error("❌ Error fetching orders:",uA.response?.data||uA.message),m([])}finally{v(!1)}},[r,t]),HA=Q.useCallback((uA,J)=>!J||!uA.price||isNaN(J)||isNaN(uA.price)?uA.profit||0:(uA.type==="BUY"?J-uA.price:uA.price-J)*uA.volume,[]),pe=Q.useCallback(async()=>{try{const uA=localStorage.getItem("token");if(!uA){console.log("⚠️ No token, skipping balance fetch");return}const J=await TA.get(`${r}${n.account}`,{headers:{Authorization:`Bearer ${uA}`}});if(J.data&&J.data.data){const k=parseFloat(J.data.data.balance);isNaN(k)||E(k)}}catch(uA){console.error("❌ Error fetching user balance:",uA.response?.data||uA.message)}},[r]),Ft=Q.useMemo(()=>{const uA=y,J=p.reduce((mA,NA)=>mA+NA.volume*NA.price*.01,0),k=p.reduce((mA,NA)=>{const JA=d.find(ZA=>ZA.symbol===NA.symbol);if(JA){const ZA=NA.type==="BUY"?parseFloat(JA.bid||0):parseFloat(JA.ask||0);if(ZA&&ZA>0&&!isNaN(ZA))return mA+HA(NA,ZA)}return mA+(NA.profit||0)},0),G=uA+k,O=G-J,Y=J>0?G/J*100:0;return{balance:uA,equity:G,margin:J,freeMargin:O,level:Y.toFixed(2)}},[p,d,y,HA]);Q.useEffect(()=>{localStorage.getItem("token")&&t&&(WA(),pe())},[WA,pe,t]),Q.useEffect(()=>{(async()=>{try{f(!0);const J=n.symbols.includes("?")?`${r}${n.symbols}`:`${r}${n.symbols}`,k=await TA.get(J);let G=[];Array.isArray(k.data)?(console.log("1 console",k.data),G=k.data):k.data&&k.data.data&&Array.isArray(k.data.data)?(console.log("2 console",k.data.data),G=k.data.data):k.data&&k.data.prices&&Array.isArray(k.data.prices)?(console.log("3 console",k.data.price),G=k.data.prices):k.data&&Array.isArray(k.data)&&(G=k.data,console.log("else format",k.data));const O=G.map(Y=>Y.symbol&&(Y.bid!==void 0||Y.price!==void 0)?{symbol:Y.symbol,bid:Y.bid??Y.price??0,ask:Y.ask??Y.price??0,change:Y.change??0}:Y);O.length>0?(g(O),O.find(mA=>mA.symbol===a)||l(O[0].symbol)):g([])}catch(J){console.error("❌ Error fetching symbols:",J.response?.data||J.message),g([])}finally{f(!1)}})()},[r,n.symbols]);const Et=Q.useCallback(()=>{const uA=eA.current;if(uA.size===0)return;const J=new Map(uA);uA.clear(),g(k=>k.map(G=>{const O=J.get(G.symbol);return O?{...G,...O}:G})),m(k=>{let G=!1;const O=k.map(Y=>{const mA=J.get(Y.symbol);if(!mA)return Y;const NA=Y.type==="BUY"?parseFloat(mA.bid||0):parseFloat(mA.ask||0);if(!NA||isNaN(NA)||NA<=0)return Y;const JA=HA(Y,NA);return JA===Y.profit?Y:(G=!0,{...Y,profit:JA})});return G?O:k})},[HA]);Q.useEffect(()=>{AA.current||(AA.current=Ur.getSocket());const uA=AA.current,J=()=>console.log("✅ TradingContext: Connected"),k=()=>console.log("⚠️ TradingContext: Disconnected"),G=Y=>{Y?.symbol&&(eA.current.set(Y.symbol,Y),wA.current||(wA.current=setTimeout(()=>{wA.current=null,Et()},dA)))},O=async Y=>{if(console.log("🔔 Trade closed event received:",Y),!!Y){if(Y.newBalance!==void 0){const mA=parseFloat(Y.newBalance);isNaN(mA)||E(mA)}if(window.notify){const mA=Y.profitLoss||Y.profit||0,NA=mA>=0?`+${mA.toFixed(2)}`:mA.toFixed(2),JA=Y.symbol||"Trade",ZA=Y.reason||"Closed";window.notify(`Trade Closed: ${ZA} | ${JA} | P/L: ${NA} USD`,mA>=0?"success":"error")}Y.tradeId&&m(mA=>mA.filter(NA=>NA.id!==Y.tradeId)),await WA(),await pe()}};return uA.on("connect",J),uA.on("disconnect",k),uA.on("priceUpdate",G),uA.on("tradeClosed",O),()=>{uA.off("connect",J),uA.off("disconnect",k),uA.off("priceUpdate",G),uA.off("tradeClosed",O),wA.current&&(clearTimeout(wA.current),wA.current=null),eA.current.clear()}},[Et,WA,pe]),Q.useEffect(()=>{try{const uA=document.documentElement;if(!uA)return;uA.dataset.theme=yA}catch{}},[yA]);const Te=Q.useMemo(()=>d.find(uA=>uA.symbol===a)||{bid:"0.00000",ask:"0.00000",change:0},[d,a]),bi=Q.useMemo(()=>({selectedSymbol:a,setSelectedSymbol:l,selectedTimeframe:c,setSelectedTimeframe:u,symbols:d,setSymbols:g,symbolsLoading:B,orders:p,setOrders:m,ordersLoading:w,fetchOrders:WA,fetchUserBalance:pe,userBalance:y,setUserBalance:E,accountSummary:Ft,currentSymbolData:Te,activeTool:F,setActiveTool:T,chartObjects:M,setChartObjects:I,showGrid:cA,setShowGrid:z,snapToGrid:fA,setSnapToGrid:W,drawingsVisible:nA,setDrawingsVisible:j,chartType:H,setChartType:X,chartLocked:sA,setChartLocked:UA,theme:yA,setTheme:FA,baseUrl:r,endpoints:n,endpointParams:o,accountId:t}),[a,c,d,B,p,w,WA,pe,y,Ft,Te,F,M,cA,fA,nA,H,sA,yA,r,n,o]);return h.jsx(oc.Provider,{value:bi,children:s})},Lg=({bidPrice:s,askPrice:A,onBuyClick:e,onSellClick:t})=>{const r=()=>{e&&e(null)},i=()=>{t&&t(null)};return h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsx("button",{onClick:i,className:"text-white font-semibold rounded transition-colors text-sm",children:h.jsxs("div",{className:"flex items-center",children:[h.jsx("span",{className:"text-xs bg-[#BD3E3E] px-3 py-1.5",children:"SELL"}),h.jsx("span",{className:"text-xs font-bold bg-[#DE4848] px-3 py-1.5",children:s||"0.00000"})]})}),h.jsx("button",{onClick:r,className:"text-white font-semibold rounded transition-colors text-sm",children:h.jsxs("div",{className:"flex items-center",children:[h.jsx("span",{className:"text-xs bg-[#2869CE] px-3 py-1.5 cursor-pointer",children:"BUY"}),h.jsx("span",{className:"text-xs font-bold bg-[#2F7CF2] px-3 py-1.5 cursor-pointer",children:A||"0.00000"})]})})]})},Ig={},ac=({isOpen:s,onClose:A,orderType:e,bidPrice:t,askPrice:r,onExecuteTrade:i,userAccountId:n})=>{const{selectedSymbol:o,selectedTimeframe:a,setOrders:l,symbols:c,fetchOrders:u,theme:d,baseUrl:g,endpoints:B}=oe(),f=d==="light",[p,m]=Q.useState("0.01"),[w,v]=Q.useState(""),[y,E]=Q.useState(""),[F,T]=Q.useState(""),[M,I]=Q.useState(!1),[cA,z]=Q.useState(null),[fA,W]=Q.useState(""),[nA,j]=Q.useState(e||"BUY"),[H,X]=Q.useState(parseFloat(t)||0),[sA,UA]=Q.useState(parseFloat(r)||0),[yA,FA]=Q.useState("text-white"),[AA,eA]=Q.useState("text-white"),wA=Q.useRef(parseFloat(t)||0),dA=Q.useRef(parseFloat(r)||0);Q.useEffect(()=>{if(!s)return;const J=Ur.getSocket(),k=O=>{if(!(!O||!O.symbol)&&O.symbol.toUpperCase()===o?.toUpperCase()){const Y=parseFloat(O.bid)||0,mA=parseFloat(O.ask)||0;Y>0&&(Y>wA.current?(FA("text-green-400"),setTimeout(()=>FA("text-white"),500)):Y<wA.current&&wA.current>0&&(FA("text-red-400"),setTimeout(()=>FA("text-white"),500)),X(Y),wA.current=Y),mA>0&&(mA>dA.current?(eA("text-green-400"),setTimeout(()=>eA("text-white"),500)):mA<dA.current&&dA.current>0&&(eA("text-red-400"),setTimeout(()=>eA("text-white"),500)),UA(mA),dA.current=mA)}};J.on("priceUpdate",k);const G=c.find(O=>O.symbol===o);if(G){const O=parseFloat(G.bid)||0,Y=parseFloat(G.ask)||0;O>0&&(X(O),wA.current=O),Y>0&&(UA(Y),dA.current=Y)}return()=>{J.off("priceUpdate",k)}},[s,o,c]),Q.useEffect(()=>{if(s){m("0.01"),v(""),E(""),T(""),W(""),j(e||"BUY");const J=parseFloat(t)||0,k=parseFloat(r)||0;J>0&&(X(J),wA.current=J),k>0&&(UA(k),dA.current=k)}},[s,e,t,r]);const WA=H||0,HA=sA||0,pe=J=>{const k=parseFloat(p)||.01,G=Math.max(.01,k+J);m(G.toFixed(2))},Ft=J=>{const k=parseFloat(w)||0,G=parseFloat(nA==="BUY"?sA:H)||0;if(!G){W("Current price not available. Please wait...");return}let O=k+J;nA==="BUY"?O=Math.max(1e-5,Math.min(O,G-1e-5)):O=Math.max(G+1e-5,O),v(O>0?O.toFixed(5):""),W("")},Et=J=>{const k=parseFloat(y)||0,G=parseFloat(nA==="BUY"?sA:H)||0;if(!G){W("Current price not available. Please wait...");return}let O=k+J;nA==="BUY"?O=Math.max(G+1e-5,O):O=Math.max(1e-5,Math.min(O,G-1e-5)),E(O>0?O.toFixed(5):""),W("")},Te=async J=>{W("");const k=J||nA,G=parseFloat(k==="BUY"?sA:H),O=parseFloat(p),Y=w?parseFloat(w):null,mA=y?parseFloat(y):null;if(!O||O<=0||isNaN(O)){W("Please enter a valid volume (minimum 0.01)");return}if(O<.01){W("Volume must be at least 0.01");return}if(!G||G<=0||isNaN(G)){W("Invalid price. Please refresh and try again.");return}if(Y!==null&&Y!==""){if(isNaN(Y)||Y<=0){W("Stop Loss must be a valid positive number");return}if(k==="BUY"&&Y>=G){W("Stop Loss must be below the current price for BUY orders");return}if(k==="SELL"&&Y<=G){W("Stop Loss must be above the current price for SELL orders");return}}if(mA!==null&&mA!==""){if(isNaN(mA)||mA<=0){W("Take Profit must be a valid positive number");return}if(k==="BUY"){if(mA<=G){W(`Take Profit must be above the entry price (${G.toFixed(5)}) for BUY orders`);return}}else if(k==="SELL"&&mA>=G){W(`Take Profit must be below the entry price (${G.toFixed(5)}) for SELL orders`);return}}j(k),z(k),I(!0);const NA=new Date,JA=NA.toLocaleTimeString(),ZA=`temp_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,qt=localStorage.getItem("token");if(!qt){W("Please login to place trades"),I(!1),z(null);return}const _o={accountId:n,symbol:o,type:k,volume:O,price:G,takeProfit:mA,stopLoss:Y,comment:F.trim()||null},Oo={ticket:ZA.substring(0,8),symbol:o,type:k,volume:parseFloat(O),price:parseFloat(G),time:JA,stopLoss:Y?parseFloat(Y):null,takeProfit:mA?parseFloat(mA):null,swap:0,profit:0,profitCurrency:"USD",comment:F.trim()||"",id:ZA,status:"OPEN",openAt:NA.toISOString()};if(l&&l(xt=>[...xt,Oo]),i){I(!1),z(null),A();const xt={symbol:o,type:k,lotSize:O,entryPrice:G,stopLoss:Y,takeProfit:mA,comment:F.trim()||null};Promise.resolve(i(xt)).then(()=>{console.log("✅ Trade executed successfully via parent handler"),u&&u()}).catch(C=>{console.error("❌ Trade execution failed:",C),l&&l(U=>U.filter(x=>x.id!==ZA))})}else{I(!1),z(null),A();const xt=g||Ig?.VITE_BASE_URL||"http://localhost:8000",C=B?.trades||"/api/trades";TA.post(`${xt}${C}`,_o,{headers:{Authorization:`Bearer ${qt}`,"Content-Type":"application/json"}}).then(U=>{if(U.data&&U.data.data){const x=U.data.data.trade;l&&l(_=>_.map(S=>S.id===ZA?{...S,id:x.id,ticket:x.id.substring(0,8),time:JA,openAt:x.openAt}:S)),console.log("✅ Trade saved successfully:",x),window.notify&&window.notify(`Trade placed successfully: ${x.symbol} ${x.type}`,"success")}else{l&&l(_=>_.filter(S=>S.id!==ZA));const x=U.data?.message||"Failed to place trade";window.notify&&window.notify(x,"error")}}).catch(U=>{console.error("Error placing trade:",U),l&&l(_=>_.filter(S=>S.id!==ZA));let x="Failed to place trade";if(U.response){const _=U.response.status,S=U.response.data;_===400?x=S?.message||"Invalid trade data. Please check your inputs.":_===401?x="Authentication failed. Please login again.":_===404?x=S?.message||"Symbol not found. Please select a valid symbol.":_===500?x="Server error. Please try again later.":x=S?.message||`Error: ${_}`}else U.request&&(x="Network error. Please check your internet connection.");window.notify&&window.notify(x,"error")})}},uA=((parseFloat(p)||0)*1e5).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2});return s?h.jsxs("div",{className:`w-full max-w-sm rounded-lg shadow-2xl flex flex-col pointer-events-auto z-30 ${f?"bg-white border border-slate-400":"bg-[#12161d] border border-slate-700"}`,style:{maxHeight:"95vh",marginTop:"57px"},children:[h.jsxs("div",{className:`px-4 py-2.5 flex items-center justify-between ${f?"border-slate-400 bg-white":"border-slate-700 bg-[#12161d]"}`,children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("h3",{className:`text-sm font-semibold ${f?"text-slate-800":"text-white"}`,children:"Market Execution"}),h.jsx("button",{className:`p-0.5 transition-colors ${f?"text-slate-600 hover:text-slate-800":"text-white hover:text-white"}`,children:h.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})})]}),h.jsx("button",{onClick:A,className:`p-1 rounded transition-colors ${f?"text-slate-600 hover:text-slate-800 hover:bg-slate-100":"text-white hover:text-white hover:bg-[#12161d]"}`,children:h.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),h.jsxs("div",{className:"overflow-y-auto p-4 space-y-4",style:{maxHeight:"calc(90vh - 60px)"},children:[fA&&h.jsx("div",{className:"p-2 rounded-lg bg-rose-500/10 border border-rose-500/50 text-rose-400 text-xs",children:fA}),h.jsxs("div",{children:[h.jsxs("div",{className:"flex items-center justify-between mb-2",children:[h.jsx("label",{className:`text-sm font-medium ${f?"text-slate-700":"text-white"}`,children:"Volume"}),h.jsxs("span",{className:`text-sm ${f?"text-slate-700":"text-white"}`,children:[uA," CAD"]})]}),h.jsxs("div",{className:"relative flex items-center",children:[h.jsx("button",{type:"button",onClick:()=>pe(-.01),className:`absolute left-1 w-8 h-8 flex items-center justify-center rounded text-sm transition-colors z-10 ${f?"bg-slate-100 hover:bg-slate-400 text-slate-700":"bg-[#12161d] hover:bg-slate-600 text-white"}`,children:"−"}),h.jsx("input",{type:"number",value:p,onChange:J=>{m(J.target.value),W("")},className:`w-full px-10 py-2 rounded text-sm focus:outline-none focus:border-secondary text-center ${f?"bg-white border border-slate-400 text-slate-800":"bg-[#12161d] border border-slate-700 text-white"}`,step:"0.01",min:"0.01",placeholder:"0.01"}),h.jsx("button",{type:"button",onClick:()=>pe(.01),className:`absolute right-1 w-8 h-8 flex items-center justify-center rounded text-sm transition-colors z-10 ${f?"bg-slate-100 hover:bg-slate-400 text-slate-700":"bg-[#12161d] hover:bg-slate-600 text-white"}`,children:"+"})]})]}),h.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[h.jsxs("div",{children:[h.jsx("div",{className:"flex items-center justify-between mb-2",children:h.jsx("label",{className:`text-sm font-medium ${f?"text-slate-700":"text-white"}`,children:"Stop Loss"})}),h.jsxs("div",{className:"relative flex items-center",children:[h.jsx("button",{type:"button",onClick:()=>Ft(-1e-4),className:`absolute left-1 w-8 h-8 flex items-center justify-center rounded text-sm transition-colors z-10 ${f?"bg-slate-100 hover:bg-slate-400 text-slate-700":"bg-[#12161d] hover:bg-slate-600 text-white"}`,title:"Decrease SL",children:"−"}),h.jsx("input",{type:"text",value:w,onChange:J=>{const k=J.target.value;(k===""||/^\d*\.?\d*$/.test(k))&&(v(k),W(""))},onBlur:J=>{const k=parseFloat(J.target.value);!isNaN(k)&&k>0?v(k.toFixed(5)):J.target.value===""&&v("")},placeholder:"0.00000",className:`w-full px-10 py-2 rounded text-sm focus:outline-none focus:border-secondary text-center ${f?"bg-white border border-slate-400 text-slate-800":"bg-[#12161d] border border-slate-700 text-slate-100"}`}),h.jsx("button",{type:"button",onClick:()=>Ft(1e-4),className:`absolute right-1 w-8 h-8 flex items-center justify-center rounded text-sm transition-colors z-10 ${f?"bg-slate-100 hover:bg-slate-400 text-slate-700":"bg-[#12161d] hover:bg-slate-600 text-white"}`,title:"Increase SL",children:"+"})]})]}),h.jsxs("div",{children:[h.jsx("div",{className:"flex items-center justify-between mb-2",children:h.jsx("label",{className:`text-sm font-medium ${f?"text-slate-700":"text-white"}`,children:"Take Profit"})}),h.jsxs("div",{className:"relative flex items-center",children:[h.jsx("button",{type:"button",onClick:()=>Et(-1e-4),className:`absolute left-1 w-8 h-8 flex items-center justify-center rounded text-sm transition-colors z-10 ${f?"bg-slate-100 hover:bg-slate-400 text-slate-700":"bg-[#12161d] hover:bg-slate-600 text-white"}`,title:"Decrease TP",children:"−"}),h.jsx("input",{type:"text",value:y,onChange:J=>{const k=J.target.value;(k===""||/^\d*\.?\d*$/.test(k))&&(E(k),W(""))},onBlur:J=>{const k=parseFloat(J.target.value);!isNaN(k)&&k>0?E(k.toFixed(5)):J.target.value===""&&E("")},placeholder:"0.00000",className:`w-full px-10 py-2 rounded text-sm focus:outline-none focus:border-secondary text-center ${f?"bg-white border border-slate-400 text-slate-800":"bg-[#12161d] border border-slate-700 text-slate-100"}`}),h.jsx("button",{type:"button",onClick:()=>Et(1e-4),className:`absolute right-1 w-8 h-8 flex items-center justify-center rounded text-sm transition-colors z-10 ${f?"bg-slate-100 hover:bg-slate-400 text-slate-700":"bg-[#12161d] hover:bg-slate-600 text-white"}`,title:"Increase TP",children:"+"})]})]})]}),h.jsxs("div",{children:[h.jsx("label",{className:`block text-sm font-medium mb-2 ${f?"text-slate-700":"text-white"}`,children:"Comment"}),h.jsx("textarea",{value:F,onChange:J=>T(J.target.value),placeholder:"Optional comment",rows:2,className:`w-full px-3 py-2 rounded text-sm focus:outline-none focus:border-secondary resize-none ${f?"bg-white border border-slate-400 text-slate-800":"bg-[#12161d] border border-slate-700 text-slate-100"}`})]}),h.jsxs("div",{className:`flex items-center justify-between py-2 border-t ${f?"border-slate-400":"border-slate-700"}`,children:[h.jsxs("div",{className:"text-sm",children:[h.jsx("span",{className:f?"text-slate-700":"text-white",children:"Bid: "}),h.jsx("span",{className:`${yA} font-medium transition-colors duration-400`,children:WA>0?WA.toFixed(5):"---"})]}),h.jsxs("div",{className:"text-sm",children:[h.jsx("span",{className:f?"text-slate-700":"text-white",children:"Ask: "}),h.jsx("span",{className:`${AA} font-medium transition-colors duration-400`,children:HA>0?HA.toFixed(5):"---"})]})]}),h.jsxs("div",{className:"grid grid-cols-2 gap-3 pt-2",children:[h.jsx("button",{onClick:()=>Te("SELL"),disabled:M,className:"px-4 py-3 bg-rose-600 hover:bg-rose-700 text-white font-semibold rounded text-sm transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:M&&cA==="SELL"?h.jsxs("span",{className:"flex items-center justify-center gap-2",children:[h.jsxs("svg",{className:"animate-spin h-4 w-4",viewBox:"0 0 24 24",children:[h.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4",fill:"none"}),h.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Placing..."]}):"Sell by Market"}),h.jsx("button",{onClick:()=>Te("BUY"),disabled:M,className:"px-4 py-3 bg-sky-600 hover:bg-sky-700 text-white font-semibold rounded text-sm transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:M&&cA==="BUY"?h.jsxs("span",{className:"flex items-center justify-center gap-2",children:[h.jsxs("svg",{className:"animate-spin h-4 w-4",viewBox:"0 0 24 24",children:[h.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4",fill:"none"}),h.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Placing..."]}):"Buy by Market"})]})]})]}):null};function RA(s){if(s==null)return null;if(typeof s=="number"){if(Number.isNaN(s)||!Number.isFinite(s))return null;let A;s>1e10?A=s/1e3:(s<1e9,A=s);const e=Math.floor(A);return e<946684800||e>4102444800?null:e}if(typeof s=="string"){const A=Date.parse(s);return Number.isNaN(A)?null:Math.floor(A/1e3)}if(typeof s=="object"&&"year"in s&&"month"in s&&"day"in s){const e=new Date(Date.UTC(s.year,s.month-1,s.day)).getTime();return Number.isNaN(e)?null:Math.floor(e/1e3)}return null}function Tg(s,A){if(!s||s.length<2)return[];const e=[],t=2;for(let r=1;r<s.length;r++){const i=s[r-1].time,n=s[r].time,o=n-i;o>A*t&&e.push({from:i,to:n,gapSeconds:o,gapHours:(o/3600).toFixed(1),fromDate:new Date(i*1e3).toISOString(),toDate:new Date(n*1e3).toISOString()})}return e}function Mg(s,A="America/New_York"){const e=new Date(s*1e3),t=new Date(e.toLocaleString("en-US",{timeZone:A})),r=t.getDay();return!(r===0||r===6||r===5&&t.getHours()>=17)}function lc(s){return Array.isArray(s)?s.map(A=>({...A,time:RA(A.time)})).filter(A=>A.time!=null):[]}function Dg(s){if(!s||s.length<2)return!0;for(let A=1;A<s.length;A++)if(s[A].time<=s[A-1].time)return!1;return!0}function Nt(s,A){return!Number.isFinite(s)||!Number.isFinite(A)||A<=0?s:Math.floor(s/A)*A}const ee="17:00-17:00",te="America/New_York",Oe="24x7",Ne="UTC",cc={EURUSD:{type:"forex",sessionTZ:te,session:ee,priceMode:"mid"},GBPUSD:{type:"forex",sessionTZ:te,session:ee,priceMode:"mid"},USDJPY:{type:"forex",sessionTZ:te,session:ee,priceMode:"mid"},USDCHF:{type:"forex",sessionTZ:te,session:ee,priceMode:"mid"},AUDUSD:{type:"forex",sessionTZ:te,session:ee,priceMode:"mid"},USDCAD:{type:"forex",sessionTZ:te,session:ee,priceMode:"mid"},NZDUSD:{type:"forex",sessionTZ:te,session:ee,priceMode:"mid"},EURGBP:{type:"forex",sessionTZ:te,session:ee,priceMode:"mid"},EURJPY:{type:"forex",sessionTZ:te,session:ee,priceMode:"mid"},GBPJPY:{type:"forex",sessionTZ:te,session:ee,priceMode:"mid"},CADJPY:{type:"forex",sessionTZ:te,session:ee,priceMode:"mid"},EURJPY:{type:"forex",sessionTZ:te,session:ee,priceMode:"mid"},XAUUSD:{type:"forex",sessionTZ:te,session:ee,priceMode:"mid"},XAGUSD:{type:"forex",sessionTZ:te,session:ee,priceMode:"mid"},OILUSD:{type:"forex",sessionTZ:te,session:ee,priceMode:"mid"},BTCUSDT:{type:"crypto",session:Oe,sessionTZ:Ne,priceMode:"last"},ETHUSDT:{type:"crypto",session:Oe,sessionTZ:Ne,priceMode:"last"},BNBUSDT:{type:"crypto",session:Oe,sessionTZ:Ne,priceMode:"last"},SOLUSDT:{type:"crypto",session:Oe,sessionTZ:Ne,priceMode:"last"},ADAUSDT:{type:"crypto",session:Oe,sessionTZ:Ne,priceMode:"last"},XRPUSDT:{type:"crypto",session:Oe,sessionTZ:Ne,priceMode:"last"},DOGEUSDT:{type:"crypto",session:Oe,sessionTZ:Ne,priceMode:"last"},DOTUSDT:{type:"crypto",session:Oe,sessionTZ:Ne,priceMode:"last"},MATICUSDT:{type:"crypto",session:Oe,sessionTZ:Ne,priceMode:"last"},LINKUSDT:{type:"crypto",session:Oe,sessionTZ:Ne,priceMode:"last"}},hc={type:"forex",sessionTZ:te,session:ee,priceMode:"mid"};function ms(s){return s&&cc[s.toUpperCase()]||hc}function kg(s){return ms(s).type==="forex"}function _g(s){return ms(s).type==="crypto"}function Og(s){return ms(s).session==="24x7"}function uc(s){if(!s||typeof s!="object")return!1;const{time:A,open:e,high:t,low:r,close:i,volume:n}=s;return!(RA(A)==null||typeof e!="number"||!Number.isFinite(e)||typeof t!="number"||!Number.isFinite(t)||typeof r!="number"||!Number.isFinite(r)||typeof i!="number"||!Number.isFinite(i)||n!=null&&(typeof n!="number"||n<0||!Number.isFinite(n))||t<e||t<i||t<r||r>e||r>i||r>t||e<=0||t<=0||r<=0||i<=0)}function fc(s){const A=n=>Math.round(n*1e5)/1e5;let e=A(s.open),t=A(s.high),r=A(s.low),i=A(s.close);return t=Math.max(t,e,i,r),r=Math.min(r,e,i,t),{...s,open:e,high:t,low:r,close:i,volume:s.volume!=null?Math.round(s.volume):s.volume}}function dc(s){if(!Array.isArray(s)||s.length===0)return[];const A=new Map;return s.forEach(e=>{const t=RA(e.time);if(t!=null)if(A.has(t)){const r=A.get(t);A.set(t,{...e,time:t,open:e.open,high:Math.max(r.high,e.high),low:Math.min(r.low,e.low),close:e.close,volume:(r.volume||0)+(e.volume||0)})}else A.set(t,{...e,time:t})}),Array.from(A.values())}function Ng(s,A="percentile"){if(!Array.isArray(s)||s.length<3)return s;const e=s.map(n=>n.close).filter(n=>Number.isFinite(n));if(e.length<3)return s;const t=[...e].sort((n,o)=>n-o);let r,i;if(A==="percentile"){const n=Math.floor(t.length*.25),o=Math.floor(t.length*.75),a=t[n],l=t[o],c=l-a;r=a-1.5*c,i=l+1.5*c}else{const n=e.reduce((l,c)=>l+c,0)/e.length,o=e.reduce((l,c)=>l+Math.pow(c-n,2),0)/e.length,a=Math.sqrt(o);if(a===0)return s;r=n-3*a,i=n+3*a}return s.map((n,o)=>{const a=n.close;if(a<r||a>i){if(o===0)return n;const l=s[o-1].close;return{...n,open:l,high:Math.max(l,n.high),low:Math.min(l,n.low),close:l}}return n})}function Kg(s,A){if(!Array.isArray(s)||s.length===0)return s;const e=[],t=Math.max(A*10080,604800),r=1e4;for(let o=0;o<s.length;o++)if(e.push(s[o]),o<s.length-1){const a=s[o].time,l=s[o+1].time,c=l-a;if(c>t&&((c/3600).toFixed(1),(t/3600).toFixed(1)),c>A&&c<=t){const u=s[o];let d=a+A,g=0;for(d=Nt(d,A);d<l&&g<r;){const B=Nt(d,A);e.some(p=>p.time===B)||(e.push({time:B,open:u.close,high:u.close,low:u.close,close:u.close,volume:0}),g++),d+=A}if(d<l&&g>=r){const B=Nt(l-A,A);e.some(p=>p.time===B)||e.push({time:B,open:u.close,high:u.close,low:u.close,close:u.close,volume:0})}}}e.sort((o,a)=>o.time-a.time);const i=[],n=new Set;for(const o of e)n.has(o.time)||(n.add(o.time),i.push(o));return i}function Fr(s){if(!s||typeof s!="string")return 60;const A=s.toUpperCase();if(A==="MN")return 2592e3;let e=A.match(/^([MHDW])(\d+)$/);if(e){const t=e[1];return parseInt(e[2],10)*({M:60,H:3600,D:86400,W:604800}[t]||60)}if(e=s.match(/^(\d+)([mhdwy])$/i),e){const t=parseInt(e[1],10),r=e[2].toLowerCase();return t*({m:60,h:3600,d:86400,w:604800,y:31536e3}[r]||60)}return 60}function Bc(s,A,e){if(!Array.isArray(s)||s.length===0)return{candles:[],stats:{original:0,processed:0,duplicates:0,outliers:0,gaps:[]}};const t=ms(A),r=Fr(e),o=lc(s).map(p=>({...p,time:Nt(p.time,r)})).filter(p=>uc(p)).map(p=>fc(p)),a=dc(o);a.sort((p,m)=>p.time-m.time);const l=a.filter((p,m)=>m===0?!0:p.time>a[m-1].time),c=l.length>10?Ng(l,"percentile"):l,u=dc(c);u.sort((p,m)=>p.time-m.time);const d=Kg(u,r),g=[];for(let p=1;p<d.length;p++){const m=d[p].time-d[p-1].time;m>r*2&&g.push({from:d[p-1].time,to:d[p].time,gapSeconds:m,gapMinutes:Math.round(m/60),fromDate:new Date(d[p-1].time*1e3).toISOString(),toDate:new Date(d[p].time*1e3).toISOString()})}const B=c.filter((p,m)=>m===0?!1:p.close===c[m-1].close&&p.open===c[m-1].close).length,f={original:s.length,processed:d.length,duplicates:s.length-a.length,outliers:B,gaps:g,filledGaps:d.length-u.length,symbolConfig:t};return{candles:d,stats:f}}function gc(s,A,e="1m"){if(!s||!A||!uc(s))return null;const t=RA(s.time);if(t==null)return null;const r=Fr(e),i=Nt(t,r);return fc({...s,time:i})}var Dn=function(s,A){return Dn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},Dn(s,A)};function Le(s,A){if(typeof A!="function"&&A!==null)throw new TypeError("Class extends value "+String(A)+" is not a constructor or null");Dn(s,A);function e(){this.constructor=s}s.prototype=A===null?Object.create(A):(e.prototype=A.prototype,new e)}var kn=function(){return kn=Object.assign||function(A){for(var e,t=1,r=arguments.length;t<r;t++){e=arguments[t];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(A[i]=e[i])}return A},kn.apply(this,arguments)};function ae(s,A,e,t){function r(i){return i instanceof e?i:new e(function(n){n(i)})}return new(e||(e=Promise))(function(i,n){function o(c){try{l(t.next(c))}catch(u){n(u)}}function a(c){try{l(t.throw(c))}catch(u){n(u)}}function l(c){c.done?i(c.value):r(c.value).then(o,a)}l((t=t.apply(s,[])).next())})}function se(s,A){var e={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},t,r,i,n;return n={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(n[Symbol.iterator]=function(){return this}),n;function o(l){return function(c){return a([l,c])}}function a(l){if(t)throw new TypeError("Generator is already executing.");for(;e;)try{if(t=1,r&&(i=l[0]&2?r.return:l[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,l[1])).done)return i;switch(r=0,i&&(l=[l[0]&2,i.value]),l[0]){case 0:case 1:i=l;break;case 4:return e.label++,{value:l[1],done:!1};case 5:e.label++,r=l[1],l=[0];continue;case 7:l=e.ops.pop(),e.trys.pop();continue;default:if(i=e.trys,!(i=i.length>0&&i[i.length-1])&&(l[0]===6||l[0]===2)){e=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]<i[3])){e.label=l[1];break}if(l[0]===6&&e.label<i[1]){e.label=i[1],i=l;break}if(i&&e.label<i[2]){e.label=i[2],e.ops.push(l);break}i[2]&&e.ops.pop(),e.trys.pop();continue}l=A.call(s,e)}catch(c){l=[6,c],r=0}finally{t=i=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function Er(s,A,e){if(arguments.length===2)for(var t=0,r=A.length,i;t<r;t++)(i||!(t in A))&&(i||(i=Array.prototype.slice.call(A,0,t)),i[t]=A[t]);return s.concat(i||A)}for(var Je=(function(){function s(A,e,t,r){this.left=A,this.top=e,this.width=t,this.height=r}return s.prototype.add=function(A,e,t,r){return new s(this.left+A,this.top+e,this.width+t,this.height+r)},s.fromClientRect=function(A,e){return new s(e.left+A.windowBounds.left,e.top+A.windowBounds.top,e.width,e.height)},s.fromDOMRectList=function(A,e){var t=Array.from(e).find(function(r){return r.width!==0});return t?new s(t.left+A.windowBounds.left,t.top+A.windowBounds.top,t.width,t.height):s.EMPTY},s.EMPTY=new s(0,0,0,0),s})(),xr=function(s,A){return Je.fromClientRect(s,A.getBoundingClientRect())},Vg=function(s){var A=s.body,e=s.documentElement;if(!A||!e)throw new Error("Unable to get document size");var t=Math.max(Math.max(A.scrollWidth,e.scrollWidth),Math.max(A.offsetWidth,e.offsetWidth),Math.max(A.clientWidth,e.clientWidth)),r=Math.max(Math.max(A.scrollHeight,e.scrollHeight),Math.max(A.offsetHeight,e.offsetHeight),Math.max(A.clientHeight,e.clientHeight));return new Je(0,0,t,r)},Sr=function(s){for(var A=[],e=0,t=s.length;e<t;){var r=s.charCodeAt(e++);if(r>=55296&&r<=56319&&e<t){var i=s.charCodeAt(e++);(i&64512)===56320?A.push(((r&1023)<<10)+(i&1023)+65536):(A.push(r),e--)}else A.push(r)}return A},VA=function(){for(var s=[],A=0;A<arguments.length;A++)s[A]=arguments[A];if(String.fromCodePoint)return String.fromCodePoint.apply(String,s);var e=s.length;if(!e)return"";for(var t=[],r=-1,i="";++r<e;){var n=s[r];n<=65535?t.push(n):(n-=65536,t.push((n>>10)+55296,n%1024+56320)),(r+1===e||t.length>16384)&&(i+=String.fromCharCode.apply(String,t),t.length=0)}return i},pc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Pg=typeof Uint8Array>"u"?[]:new Uint8Array(256),Hr=0;Hr<pc.length;Hr++)Pg[pc.charCodeAt(Hr)]=Hr;for(var wc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Cs=typeof Uint8Array>"u"?[]:new Uint8Array(256),Lr=0;Lr<wc.length;Lr++)Cs[wc.charCodeAt(Lr)]=Lr;for(var Gg=function(s){var A=s.length*.75,e=s.length,t,r=0,i,n,o,a;s[s.length-1]==="="&&(A--,s[s.length-2]==="="&&A--);var l=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&typeof Uint8Array.prototype.slice<"u"?new ArrayBuffer(A):new Array(A),c=Array.isArray(l)?l:new Uint8Array(l);for(t=0;t<e;t+=4)i=Cs[s.charCodeAt(t)],n=Cs[s.charCodeAt(t+1)],o=Cs[s.charCodeAt(t+2)],a=Cs[s.charCodeAt(t+3)],c[r++]=i<<2|n>>4,c[r++]=(n&15)<<4|o>>2,c[r++]=(o&3)<<6|a&63;return l},Rg=function(s){for(var A=s.length,e=[],t=0;t<A;t+=2)e.push(s[t+1]<<8|s[t]);return e},zg=function(s){for(var A=s.length,e=[],t=0;t<A;t+=4)e.push(s[t+3]<<24|s[t+2]<<16|s[t+1]<<8|s[t]);return e},vt=5,_n=11,On=2,Wg=_n-vt,mc=65536>>vt,Xg=1<<vt,Nn=Xg-1,$g=1024>>vt,Jg=mc+$g,Zg=Jg,Yg=32,qg=Zg+Yg,jg=65536>>_n,Ap=1<<Wg,ep=Ap-1,Cc=function(s,A,e){return s.slice?s.slice(A,e):new Uint16Array(Array.prototype.slice.call(s,A,e))},tp=function(s,A,e){return s.slice?s.slice(A,e):new Uint32Array(Array.prototype.slice.call(s,A,e))},sp=function(s,A){var e=Gg(s),t=Array.isArray(e)?zg(e):new Uint32Array(e),r=Array.isArray(e)?Rg(e):new Uint16Array(e),i=24,n=Cc(r,i/2,t[4]/2),o=t[5]===2?Cc(r,(i+t[4])/2):tp(t,Math.ceil((i+t[4])/4));return new rp(t[0],t[1],t[2],t[3],n,o)},rp=(function(){function s(A,e,t,r,i,n){this.initialValue=A,this.errorValue=e,this.highStart=t,this.highValueIndex=r,this.index=i,this.data=n}return s.prototype.get=function(A){var e;if(A>=0){if(A<55296||A>56319&&A<=65535)return e=this.index[A>>vt],e=(e<<On)+(A&Nn),this.data[e];if(A<=65535)return e=this.index[mc+(A-55296>>vt)],e=(e<<On)+(A&Nn),this.data[e];if(A<this.highStart)return e=qg-jg+(A>>_n),e=this.index[e],e+=A>>vt&ep,e=this.index[e],e=(e<<On)+(A&Nn),this.data[e];if(A<=1114111)return this.data[this.highValueIndex]}return this.errorValue},s})(),vc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ip=typeof Uint8Array>"u"?[]:new Uint8Array(256),Ir=0;Ir<vc.length;Ir++)ip[vc.charCodeAt(Ir)]=Ir;var np="KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF8AZwBgAGgAcQB5AHUAfQCFAI0AlQCdAKIAqgCyALoAYABoAGAAaABgAGgAwgDKAGAAaADGAM4A0wDbAOEA6QDxAPkAAQEJAQ8BFwF1AH0AHAEkASwBNAE6AUIBQQFJAVEBWQFhAWgBcAF4ATAAgAGGAY4BlQGXAZ8BpwGvAbUBvQHFAc0B0wHbAeMB6wHxAfkBAQIJAvEBEQIZAiECKQIxAjgCQAJGAk4CVgJeAmQCbAJ0AnwCgQKJApECmQKgAqgCsAK4ArwCxAIwAMwC0wLbAjAA4wLrAvMC+AIAAwcDDwMwABcDHQMlAy0DNQN1AD0DQQNJA0kDSQNRA1EDVwNZA1kDdQB1AGEDdQBpA20DdQN1AHsDdQCBA4kDkQN1AHUAmQOhA3UAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AKYDrgN1AHUAtgO+A8YDzgPWAxcD3gPjA+sD8wN1AHUA+wMDBAkEdQANBBUEHQQlBCoEFwMyBDgEYABABBcDSARQBFgEYARoBDAAcAQzAXgEgASIBJAEdQCXBHUAnwSnBK4EtgS6BMIEyAR1AHUAdQB1AHUAdQCVANAEYABgAGAAYABgAGAAYABgANgEYADcBOQEYADsBPQE/AQEBQwFFAUcBSQFLAU0BWQEPAVEBUsFUwVbBWAAYgVgAGoFcgV6BYIFigWRBWAAmQWfBaYFYABgAGAAYABgAKoFYACxBbAFuQW6BcEFwQXHBcEFwQXPBdMF2wXjBeoF8gX6BQIGCgYSBhoGIgYqBjIGOgZgAD4GRgZMBmAAUwZaBmAAYABgAGAAYABgAGAAYABgAGAAYABgAGIGYABpBnAGYABgAGAAYABgAGAAYABgAGAAYAB4Bn8GhQZgAGAAYAB1AHcDFQSLBmAAYABgAJMGdQA9A3UAmwajBqsGqwaVALMGuwbDBjAAywbSBtIG1QbSBtIG0gbSBtIG0gbdBuMG6wbzBvsGAwcLBxMHAwcbByMHJwcsBywHMQcsB9IGOAdAB0gHTgfSBkgHVgfSBtIG0gbSBtIG0gbSBtIG0gbSBiwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdgAGAALAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdbB2MHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB2kH0gZwB64EdQB1AHUAdQB1AHUAdQB1AHUHfQdgAIUHjQd1AHUAlQedB2AAYAClB6sHYACzB7YHvgfGB3UAzgfWBzMB3gfmB1EB7gf1B/0HlQENAQUIDQh1ABUIHQglCBcDLQg1CD0IRQhNCEEDUwh1AHUAdQBbCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIcAh3CHoIMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIgggwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAALAcsBywHLAcsBywHLAcsBywHLAcsB4oILAcsB44I0gaWCJ4Ipgh1AHUAqgiyCHUAdQB1AHUAdQB1AHUAdQB1AHUAtwh8AXUAvwh1AMUIyQjRCNkI4AjoCHUAdQB1AO4I9gj+CAYJDgkTCS0HGwkjCYIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiAAIAAAAFAAYABgAGIAXwBgAHEAdQBFAJUAogCyAKAAYABgAEIA4ABGANMA4QDxAMEBDwE1AFwBLAE6AQEBUQF4QkhCmEKoQrhCgAHIQsAB0MLAAcABwAHAAeDC6ABoAHDCwMMAAcABwAHAAdDDGMMAAcAB6MM4wwjDWMNow3jDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEjDqABWw6bDqABpg6gAaABoAHcDvwOPA+gAaABfA/8DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DpcPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB9cPKwkyCToJMAB1AHUAdQBCCUoJTQl1AFUJXAljCWcJawkwADAAMAAwAHMJdQB2CX4JdQCECYoJjgmWCXUAngkwAGAAYABxAHUApgn3A64JtAl1ALkJdQDACTAAMAAwADAAdQB1AHUAdQB1AHUAdQB1AHUAowYNBMUIMAAwADAAMADICcsJ0wnZCRUE4QkwAOkJ8An4CTAAMAB1AAAKvwh1AAgKDwoXCh8KdQAwACcKLgp1ADYKqAmICT4KRgowADAAdQB1AE4KMAB1AFYKdQBeCnUAZQowADAAMAAwADAAMAAwADAAMAAVBHUAbQowADAAdQC5CXUKMAAwAHwBxAijBogEMgF9CoQKiASMCpQKmgqIBKIKqgquCogEDQG2Cr4KxgrLCjAAMADTCtsKCgHjCusK8Qr5CgELMAAwADAAMAB1AIsECQsRC3UANAEZCzAAMAAwADAAMAB1ACELKQswAHUANAExCzkLdQBBC0kLMABRC1kLMAAwADAAMAAwADAAdQBhCzAAMAAwAGAAYABpC3ELdwt/CzAAMACHC4sLkwubC58Lpwt1AK4Ltgt1APsDMAAwADAAMAAwADAAMAAwAL4LwwvLC9IL1wvdCzAAMADlC+kL8Qv5C/8LSQswADAAMAAwADAAMAAwADAAMAAHDDAAMAAwADAAMAAODBYMHgx1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1ACYMMAAwADAAdQB1AHUALgx1AHUAdQB1AHUAdQA2DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AD4MdQBGDHUAdQB1AHUAdQB1AEkMdQB1AHUAdQB1AFAMMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQBYDHUAdQB1AF8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUA+wMVBGcMMAAwAHwBbwx1AHcMfwyHDI8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAYABgAJcMMAAwADAAdQB1AJ8MlQClDDAAMACtDCwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB7UMLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AA0EMAC9DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAsBywHLAcsBywHLAcsBywHLQcwAMEMyAwsBywHLAcsBywHLAcsBywHLAcsBywHzAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1ANQM2QzhDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMABgAGAAYABgAGAAYABgAOkMYADxDGAA+AwADQYNYABhCWAAYAAODTAAMAAwADAAFg1gAGAAHg37AzAAMAAwADAAYABgACYNYAAsDTQNPA1gAEMNPg1LDWAAYABgAGAAYABgAGAAYABgAGAAUg1aDYsGVglhDV0NcQBnDW0NdQ15DWAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAlQCBDZUAiA2PDZcNMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAnw2nDTAAMAAwADAAMAAwAHUArw23DTAAMAAwADAAMAAwADAAMAAwADAAMAB1AL8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQDHDTAAYABgAM8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA1w11ANwNMAAwAD0B5A0wADAAMAAwADAAMADsDfQN/A0EDgwOFA4wABsOMAAwADAAMAAwADAAMAAwANIG0gbSBtIG0gbSBtIG0gYjDigOwQUuDsEFMw7SBjoO0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGQg5KDlIOVg7SBtIGXg5lDm0OdQ7SBtIGfQ6EDooOjQ6UDtIGmg6hDtIG0gaoDqwO0ga0DrwO0gZgAGAAYADEDmAAYAAkBtIGzA5gANIOYADaDokO0gbSBt8O5w7SBu8O0gb1DvwO0gZgAGAAxA7SBtIG0gbSBtIGYABgAGAAYAAED2AAsAUMD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHJA8sBywHLAcsBywHLAccDywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywPLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAc0D9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHPA/SBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gYUD0QPlQCVAJUAMAAwADAAMACVAJUAlQCVAJUAlQCVAEwPMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA//8EAAQABAAEAAQABAAEAAQABAANAAMAAQABAAIABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQACgATABcAHgAbABoAHgAXABYAEgAeABsAGAAPABgAHABLAEsASwBLAEsASwBLAEsASwBLABgAGAAeAB4AHgATAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYAGwASAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWAA0AEQAeAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAFAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJABYAGgAbABsAGwAeAB0AHQAeAE8AFwAeAA0AHgAeABoAGwBPAE8ADgBQAB0AHQAdAE8ATwAXAE8ATwBPABYAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAFAATwBAAE8ATwBPAEAATwBQAFAATwBQAB4AHgAeAB4AHgAeAB0AHQAdAB0AHgAdAB4ADgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgBQAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkACQAJAAkACQAJAAkABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAFAAHgAeAB4AKwArAFAAUABQAFAAGABQACsAKwArACsAHgAeAFAAHgBQAFAAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUAAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAYAA0AKwArAB4AHgAbACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAB4ABAAEAB4ABAAEABMABAArACsAKwArACsAKwArACsAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAKwArACsAKwBWAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsABAAbABsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEAA0ADQBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABABQACsAKwArACsAKwArACsAKwAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUAAaABoAUABQAFAAUABQAEwAHgAbAFAAHgAEACsAKwAEAAQABAArAFAAUABQAFAAUABQACsAKwArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQACsAUABQACsAKwAEACsABAAEAAQABAAEACsAKwArACsABAAEACsAKwAEAAQABAArACsAKwAEACsAKwArACsAKwArACsAUABQAFAAUAArAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAAQABABQAFAAUAAEAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAArACsAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AGwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAKwArACsAKwArAAQABAAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAAQAUAArAFAAUABQAFAAUABQACsAKwArAFAAUABQACsAUABQAFAAUAArACsAKwBQAFAAKwBQACsAUABQACsAKwArAFAAUAArACsAKwBQAFAAUAArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAArACsAKwAEAAQABAArAAQABAAEAAQAKwArAFAAKwArACsAKwArACsABAArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAHgAeAB4AHgAeAB4AGwAeACsAKwArACsAKwAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAUABQAFAAKwArACsAKwArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwAOAFAAUABQAFAAUABQAFAAHgBQAAQABAAEAA4AUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAKwArAAQAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAKwArACsAKwArACsAUAArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAXABcAFwAXABcACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAXAArAFwAXABcAFwAXABcAFwAXABcAFwAKgBcAFwAKgAqACoAKgAqACoAKgAqACoAXAArACsAXABcAFwAXABcACsAXAArACoAKgAqACoAKgAqACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwBcAFwAXABcAFAADgAOAA4ADgAeAA4ADgAJAA4ADgANAAkAEwATABMAEwATAAkAHgATAB4AHgAeAAQABAAeAB4AHgAeAB4AHgBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAADQAEAB4ABAAeAAQAFgARABYAEQAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAAQABAAEAAQADQAEAAQAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAA0ADQAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeACsAHgAeAA4ADgANAA4AHgAeAB4AHgAeAAkACQArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgBcAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4AHgAeAB4AXABcAFwAXABcAFwAKgAqACoAKgBcAFwAXABcACoAKgAqAFwAKgAqACoAXABcACoAKgAqACoAKgAqACoAXABcAFwAKgAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwAKgBLAEsASwBLAEsASwBLAEsASwBLACoAKgAqACoAKgAqAFAAUABQAFAAUABQACsAUAArACsAKwArACsAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAKwBQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsABAAEAAQAHgANAB4AHgAeAB4AHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUAArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWABEAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAANAA0AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUAArAAQABAArACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAA0ADQAVAFwADQAeAA0AGwBcACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwAeAB4AEwATAA0ADQAOAB4AEwATAB4ABAAEAAQACQArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAHgArACsAKwATABMASwBLAEsASwBLAEsASwBLAEsASwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAXABcAFwAXABcACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXAArACsAKwAqACoAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsAHgAeAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKwArAAQASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACoAKgAqACoAKgAqACoAXAAqACoAKgAqACoAKgArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABABQAFAAUABQAFAAUABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgANAA0ADQANAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwAeAB4AHgAeAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArAA0ADQANAA0ADQBLAEsASwBLAEsASwBLAEsASwBLACsAKwArAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUAAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAAQAUABQAFAAUABQAFAABABQAFAABAAEAAQAUAArACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQACsAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQACsAKwAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQACsAHgAeAB4AHgAeAB4AHgAOAB4AKwANAA0ADQANAA0ADQANAAkADQANAA0ACAAEAAsABAAEAA0ACQANAA0ADAAdAB0AHgAXABcAFgAXABcAFwAWABcAHQAdAB4AHgAUABQAFAANAAEAAQAEAAQABAAEAAQACQAaABoAGgAaABoAGgAaABoAHgAXABcAHQAVABUAHgAeAB4AHgAeAB4AGAAWABEAFQAVABUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ADQAeAA0ADQANAA0AHgANAA0ADQAHAB4AHgAeAB4AKwAEAAQABAAEAAQABAAEAAQABAAEAFAAUAArACsATwBQAFAAUABQAFAAHgAeAB4AFgARAE8AUABPAE8ATwBPAFAAUABQAFAAUAAeAB4AHgAWABEAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArABsAGwAbABsAGwAbABsAGgAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGgAbABsAGwAbABoAGwAbABoAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAHgAeAFAAGgAeAB0AHgBQAB4AGgAeAB4AHgAeAB4AHgAeAB4AHgBPAB4AUAAbAB4AHgBQAFAAUABQAFAAHgAeAB4AHQAdAB4AUAAeAFAAHgBQAB4AUABPAFAAUAAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgBQAFAAUABQAE8ATwBQAFAAUABQAFAATwBQAFAATwBQAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAUABQAFAATwBPAE8ATwBPAE8ATwBPAE8ATwBQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABPAB4AHgArACsAKwArAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHQAdAB4AHgAeAB0AHQAeAB4AHQAeAB4AHgAdAB4AHQAbABsAHgAdAB4AHgAeAB4AHQAeAB4AHQAdAB0AHQAeAB4AHQAeAB0AHgAdAB0AHQAdAB0AHQAeAB0AHgAeAB4AHgAeAB0AHQAdAB0AHgAeAB4AHgAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB0AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAdAB0AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAWABEAHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AHQAdAB0AHgAeAB0AHgAeAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlAB4AHQAdAB4AHgAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AJQAlAB0AHQAlAB4AJQAlACUAIAAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAdAB0AHQAeAB0AJQAdAB0AHgAdAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAdAB0AHQAdACUAHgAlACUAJQAdACUAJQAdAB0AHQAlACUAHQAdACUAHQAdACUAJQAlAB4AHQAeAB4AHgAeAB0AHQAlAB0AHQAdAB0AHQAdACUAJQAlACUAJQAdACUAJQAgACUAHQAdACUAJQAlACUAJQAlACUAJQAeAB4AHgAlACUAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AFwAXABcAFwAXABcAHgATABMAJQAeAB4AHgAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARABYAEQAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAeAB4AKwArACsAKwArABMADQANAA0AUAATAA0AUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUAANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANAA0AHgANAB4ADQANAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArAA0AEQARACUAJQBHAFcAVwAWABEAFgARABYAEQAWABEAFgARACUAJQAWABEAFgARABYAEQAWABEAFQAWABEAEQAlAFcAVwBXAFcAVwBXAFcAVwBXAAQABAAEAAQABAAEACUAVwBXAFcAVwA2ACUAJQBXAFcAVwBHAEcAJQAlACUAKwBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBRAFcAUQBXAFEAVwBXAFcAVwBXAFcAUQBXAFcAVwBXAFcAVwBRAFEAKwArAAQABAAVABUARwBHAFcAFQBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBRAFcAVwBXAFcAVwBXAFEAUQBXAFcAVwBXABUAUQBHAEcAVwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwAlACUAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACsAKwArACsAKwArACsAKwArACsAKwArAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBPAE8ATwBPAE8ATwBPAE8AJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADQATAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQAHgBQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAeAA0ADQANAA0ADQArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeAAQAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUABQAAQAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAUABQAFAAUABQAAQABAAEACsABAAEACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAKwBQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAA0ADQANAA0ADQANAA0ADQAeACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAArACsAKwArAFAAUABQAFAAUAANAA0ADQANAA0ADQAUACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQANAA0ADQANAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAANACsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAB4AHgAeAB4AHgArACsAKwArACsAKwAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANAFAABAAEAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAEAAQABAAEAB4ABAAEAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsABAAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLAA0ADQArAB4ABABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUAAeAFAAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAAEAAQADgANAA0AEwATAB4AHgAeAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAFAAUABQAFAABAAEACsAKwAEAA0ADQAeAFAAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcAFwADQANAA0AKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQAKwAEAAQAKwArAAQABAAEAAQAUAAEAFAABAAEAA0ADQANACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABABQAA4AUAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANAFAADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAaABoAGgAaAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAJAAkACQAJAAkACQAJABYAEQArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AHgAeACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAARwBHABUARwAJACsAKwArACsAKwArACsAKwArACsAKwAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAKwArACsAKwArACsAKwArACsAKwArACsAKwBRAFEAUQBRACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAHgAEAAQADQAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAeAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQAHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAKwArAFAAKwArAFAAUAArACsAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUAArAFAAUABQAFAAUABQAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAHgAeAFAAUABQAFAAUAArAFAAKwArACsAUABQAFAAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeACsAKwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4ABAAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAHgAeAA0ADQANAA0AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArAAQABAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwBQAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArABsAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAB4AHgAeAB4ABAAEAAQABAAEAAQABABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArABYAFgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAGgBQAFAAUAAaAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUAArACsAKwArACsAKwBQACsAKwArACsAUAArAFAAKwBQACsAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUAArAFAAKwBQACsAUAArAFAAUAArAFAAKwArAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAKwBQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeACUAJQAlAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAHgAlACUAJQAlACUAIAAgACAAJQAlACAAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACEAIQAhACEAIQAlACUAIAAgACUAJQAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAlACUAJQAlACAAIAAgACUAIAAgACAAJQAlACUAJQAlACUAJQAgACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAlAB4AJQAeACUAJQAlACUAJQAgACUAJQAlACUAHgAlAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACAAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABcAFwAXABUAFQAVAB4AHgAeAB4AJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAgACUAJQAgACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAIAAgACUAJQAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACAAIAAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACAAIAAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAA==",bc=50,op=1,Qc=2,yc=3,ap=4,lp=5,Uc=7,Fc=8,Ec=9,tt=10,Kn=11,xc=12,Vn=13,cp=14,vs=15,Pn=16,Tr=17,bs=18,hp=19,Sc=20,Gn=21,Qs=22,Rn=23,Kt=24,we=25,ys=26,Us=27,Vt=28,up=29,bt=30,fp=31,Mr=32,Dr=33,zn=34,Wn=35,Xn=36,Fs=37,$n=38,kr=39,_r=40,Jn=41,Hc=42,dp=43,Bp=[9001,65288],Lc="!",bA="×",Or="÷",Zn=sp(np),Ze=[bt,Xn],Yn=[op,Qc,yc,lp],Ic=[tt,Fc],Tc=[Us,ys],gp=Yn.concat(Ic),Mc=[$n,kr,_r,zn,Wn],pp=[vs,Vn],wp=function(s,A){A===void 0&&(A="strict");var e=[],t=[],r=[];return s.forEach(function(i,n){var o=Zn.get(i);if(o>bc?(r.push(!0),o-=bc):r.push(!1),["normal","auto","loose"].indexOf(A)!==-1&&[8208,8211,12316,12448].indexOf(i)!==-1)return t.push(n),e.push(Pn);if(o===ap||o===Kn){if(n===0)return t.push(n),e.push(bt);var a=e[n-1];return gp.indexOf(a)===-1?(t.push(t[n-1]),e.push(a)):(t.push(n),e.push(bt))}if(t.push(n),o===fp)return e.push(A==="strict"?Gn:Fs);if(o===Hc||o===up)return e.push(bt);if(o===dp)return i>=131072&&i<=196605||i>=196608&&i<=262141?e.push(Fs):e.push(bt);e.push(o)}),[t,e,r]},qn=function(s,A,e,t){var r=t[e];if(Array.isArray(s)?s.indexOf(r)!==-1:s===r)for(var i=e;i<=t.length;){i++;var n=t[i];if(n===A)return!0;if(n!==tt)break}if(r===tt)for(var i=e;i>0;){i--;var o=t[i];if(Array.isArray(s)?s.indexOf(o)!==-1:s===o)for(var a=e;a<=t.length;){a++;var n=t[a];if(n===A)return!0;if(n!==tt)break}if(o!==tt)break}return!1},Dc=function(s,A){for(var e=s;e>=0;){var t=A[e];if(t===tt)e--;else return t}return 0},mp=function(s,A,e,t,r){if(e[t]===0)return bA;var i=t-1;if(Array.isArray(r)&&r[i]===!0)return bA;var n=i-1,o=i+1,a=A[i],l=n>=0?A[n]:0,c=A[o];if(a===Qc&&c===yc)return bA;if(Yn.indexOf(a)!==-1)return Lc;if(Yn.indexOf(c)!==-1||Ic.indexOf(c)!==-1)return bA;if(Dc(i,A)===Fc)return Or;if(Zn.get(s[i])===Kn||(a===Mr||a===Dr)&&Zn.get(s[o])===Kn||a===Uc||c===Uc||a===Ec||[tt,Vn,vs].indexOf(a)===-1&&c===Ec||[Tr,bs,hp,Kt,Vt].indexOf(c)!==-1||Dc(i,A)===Qs||qn(Rn,Qs,i,A)||qn([Tr,bs],Gn,i,A)||qn(xc,xc,i,A))return bA;if(a===tt)return Or;if(a===Rn||c===Rn)return bA;if(c===Pn||a===Pn)return Or;if([Vn,vs,Gn].indexOf(c)!==-1||a===cp||l===Xn&&pp.indexOf(a)!==-1||a===Vt&&c===Xn||c===Sc||Ze.indexOf(c)!==-1&&a===we||Ze.indexOf(a)!==-1&&c===we||a===Us&&[Fs,Mr,Dr].indexOf(c)!==-1||[Fs,Mr,Dr].indexOf(a)!==-1&&c===ys||Ze.indexOf(a)!==-1&&Tc.indexOf(c)!==-1||Tc.indexOf(a)!==-1&&Ze.indexOf(c)!==-1||[Us,ys].indexOf(a)!==-1&&(c===we||[Qs,vs].indexOf(c)!==-1&&A[o+1]===we)||[Qs,vs].indexOf(a)!==-1&&c===we||a===we&&[we,Vt,Kt].indexOf(c)!==-1)return bA;if([we,Vt,Kt,Tr,bs].indexOf(c)!==-1)for(var u=i;u>=0;){var d=A[u];if(d===we)return bA;if([Vt,Kt].indexOf(d)!==-1)u--;else break}if([Us,ys].indexOf(c)!==-1)for(var u=[Tr,bs].indexOf(a)!==-1?n:i;u>=0;){var d=A[u];if(d===we)return bA;if([Vt,Kt].indexOf(d)!==-1)u--;else break}if($n===a&&[$n,kr,zn,Wn].indexOf(c)!==-1||[kr,zn].indexOf(a)!==-1&&[kr,_r].indexOf(c)!==-1||[_r,Wn].indexOf(a)!==-1&&c===_r||Mc.indexOf(a)!==-1&&[Sc,ys].indexOf(c)!==-1||Mc.indexOf(c)!==-1&&a===Us||Ze.indexOf(a)!==-1&&Ze.indexOf(c)!==-1||a===Kt&&Ze.indexOf(c)!==-1||Ze.concat(we).indexOf(a)!==-1&&c===Qs&&Bp.indexOf(s[o])===-1||Ze.concat(we).indexOf(c)!==-1&&a===bs)return bA;if(a===Jn&&c===Jn){for(var g=e[i],B=1;g>0&&(g--,A[g]===Jn);)B++;if(B%2!==0)return bA}return a===Mr&&c===Dr?bA:Or},Cp=function(s,A){A||(A={lineBreak:"normal",wordBreak:"normal"});var e=wp(s,A.lineBreak),t=e[0],r=e[1],i=e[2];(A.wordBreak==="break-all"||A.wordBreak==="break-word")&&(r=r.map(function(o){return[we,bt,Hc].indexOf(o)!==-1?Fs:o}));var n=A.wordBreak==="keep-all"?i.map(function(o,a){return o&&s[a]>=19968&&s[a]<=40959}):void 0;return[t,r,n]},vp=(function(){function s(A,e,t,r){this.codePoints=A,this.required=e===Lc,this.start=t,this.end=r}return s.prototype.slice=function(){return VA.apply(void 0,this.codePoints.slice(this.start,this.end))},s})(),bp=function(s,A){var e=Sr(s),t=Cp(e,A),r=t[0],i=t[1],n=t[2],o=e.length,a=0,l=0;return{next:function(){if(l>=o)return{done:!0,value:null};for(var c=bA;l<o&&(c=mp(e,i,r,++l,n))===bA;);if(c!==bA||l===o){var u=new vp(e,c,a,l);return a=l,{value:u,done:!1}}return{done:!0,value:null}}}},Qp=1,yp=2,Es=4,kc=8,Nr=10,_c=47,xs=92,Up=9,Fp=32,Kr=34,Ss=61,Ep=35,xp=36,Sp=37,Vr=39,Pr=40,Hs=41,Hp=95,de=45,Lp=33,Ip=60,Tp=62,Mp=64,Dp=91,kp=93,_p=61,Op=123,Gr=63,Np=125,Oc=124,Kp=126,Vp=128,Nc=65533,jn=42,Qt=43,Pp=44,Gp=58,Rp=59,Ls=46,zp=0,Wp=8,Xp=11,$p=14,Jp=31,Zp=127,Ke=-1,Kc=48,Vc=97,Pc=101,Yp=102,qp=117,jp=122,Gc=65,Rc=69,zc=70,Aw=85,ew=90,re=function(s){return s>=Kc&&s<=57},tw=function(s){return s>=55296&&s<=57343},Pt=function(s){return re(s)||s>=Gc&&s<=zc||s>=Vc&&s<=Yp},sw=function(s){return s>=Vc&&s<=jp},rw=function(s){return s>=Gc&&s<=ew},iw=function(s){return sw(s)||rw(s)},nw=function(s){return s>=Vp},Rr=function(s){return s===Nr||s===Up||s===Fp},zr=function(s){return iw(s)||nw(s)||s===Hp},Wc=function(s){return zr(s)||re(s)||s===de},ow=function(s){return s>=zp&&s<=Wp||s===Xp||s>=$p&&s<=Jp||s===Zp},st=function(s,A){return s!==xs?!1:A!==Nr},Wr=function(s,A,e){return s===de?zr(A)||st(A,e):zr(s)?!0:!!(s===xs&&st(s,A))},Ao=function(s,A,e){return s===Qt||s===de?re(A)?!0:A===Ls&&re(e):re(s===Ls?A:s)},aw=function(s){var A=0,e=1;(s[A]===Qt||s[A]===de)&&(s[A]===de&&(e=-1),A++);for(var t=[];re(s[A]);)t.push(s[A++]);var r=t.length?parseInt(VA.apply(void 0,t),10):0;s[A]===Ls&&A++;for(var i=[];re(s[A]);)i.push(s[A++]);var n=i.length,o=n?parseInt(VA.apply(void 0,i),10):0;(s[A]===Rc||s[A]===Pc)&&A++;var a=1;(s[A]===Qt||s[A]===de)&&(s[A]===de&&(a=-1),A++);for(var l=[];re(s[A]);)l.push(s[A++]);var c=l.length?parseInt(VA.apply(void 0,l),10):0;return e*(r+o*Math.pow(10,-n))*Math.pow(10,a*c)},lw={type:2},cw={type:3},hw={type:4},uw={type:13},fw={type:8},dw={type:21},Bw={type:9},gw={type:10},pw={type:11},ww={type:12},mw={type:14},Xr={type:23},Cw={type:1},vw={type:25},bw={type:24},Qw={type:26},yw={type:27},Uw={type:28},Fw={type:29},Ew={type:31},eo={type:32},Xc=(function(){function s(){this._value=[]}return s.prototype.write=function(A){this._value=this._value.concat(Sr(A))},s.prototype.read=function(){for(var A=[],e=this.consumeToken();e!==eo;)A.push(e),e=this.consumeToken();return A},s.prototype.consumeToken=function(){var A=this.consumeCodePoint();switch(A){case Kr:return this.consumeStringToken(Kr);case Ep:var e=this.peekCodePoint(0),t=this.peekCodePoint(1),r=this.peekCodePoint(2);if(Wc(e)||st(t,r)){var i=Wr(e,t,r)?yp:Qp,n=this.consumeName();return{type:5,value:n,flags:i}}break;case xp:if(this.peekCodePoint(0)===Ss)return this.consumeCodePoint(),uw;break;case Vr:return this.consumeStringToken(Vr);case Pr:return lw;case Hs:return cw;case jn:if(this.peekCodePoint(0)===Ss)return this.consumeCodePoint(),mw;break;case Qt:if(Ao(A,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(A),this.consumeNumericToken();break;case Pp:return hw;case de:var o=A,a=this.peekCodePoint(0),l=this.peekCodePoint(1);if(Ao(o,a,l))return this.reconsumeCodePoint(A),this.consumeNumericToken();if(Wr(o,a,l))return this.reconsumeCodePoint(A),this.consumeIdentLikeToken();if(a===de&&l===Tp)return this.consumeCodePoint(),this.consumeCodePoint(),bw;break;case Ls:if(Ao(A,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(A),this.consumeNumericToken();break;case _c:if(this.peekCodePoint(0)===jn)for(this.consumeCodePoint();;){var c=this.consumeCodePoint();if(c===jn&&(c=this.consumeCodePoint(),c===_c))return this.consumeToken();if(c===Ke)return this.consumeToken()}break;case Gp:return Qw;case Rp:return yw;case Ip:if(this.peekCodePoint(0)===Lp&&this.peekCodePoint(1)===de&&this.peekCodePoint(2)===de)return this.consumeCodePoint(),this.consumeCodePoint(),vw;break;case Mp:var u=this.peekCodePoint(0),d=this.peekCodePoint(1),g=this.peekCodePoint(2);if(Wr(u,d,g)){var n=this.consumeName();return{type:7,value:n}}break;case Dp:return Uw;case xs:if(st(A,this.peekCodePoint(0)))return this.reconsumeCodePoint(A),this.consumeIdentLikeToken();break;case kp:return Fw;case _p:if(this.peekCodePoint(0)===Ss)return this.consumeCodePoint(),fw;break;case Op:return pw;case Np:return ww;case qp:case Aw:var B=this.peekCodePoint(0),f=this.peekCodePoint(1);return B===Qt&&(Pt(f)||f===Gr)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(A),this.consumeIdentLikeToken();case Oc:if(this.peekCodePoint(0)===Ss)return this.consumeCodePoint(),Bw;if(this.peekCodePoint(0)===Oc)return this.consumeCodePoint(),dw;break;case Kp:if(this.peekCodePoint(0)===Ss)return this.consumeCodePoint(),gw;break;case Ke:return eo}return Rr(A)?(this.consumeWhiteSpace(),Ew):re(A)?(this.reconsumeCodePoint(A),this.consumeNumericToken()):zr(A)?(this.reconsumeCodePoint(A),this.consumeIdentLikeToken()):{type:6,value:VA(A)}},s.prototype.consumeCodePoint=function(){var A=this._value.shift();return typeof A>"u"?-1:A},s.prototype.reconsumeCodePoint=function(A){this._value.unshift(A)},s.prototype.peekCodePoint=function(A){return A>=this._value.length?-1:this._value[A]},s.prototype.consumeUnicodeRangeToken=function(){for(var A=[],e=this.consumeCodePoint();Pt(e)&&A.length<6;)A.push(e),e=this.consumeCodePoint();for(var t=!1;e===Gr&&A.length<6;)A.push(e),e=this.consumeCodePoint(),t=!0;if(t){var r=parseInt(VA.apply(void 0,A.map(function(a){return a===Gr?Kc:a})),16),i=parseInt(VA.apply(void 0,A.map(function(a){return a===Gr?zc:a})),16);return{type:30,start:r,end:i}}var n=parseInt(VA.apply(void 0,A),16);if(this.peekCodePoint(0)===de&&Pt(this.peekCodePoint(1))){this.consumeCodePoint(),e=this.consumeCodePoint();for(var o=[];Pt(e)&&o.length<6;)o.push(e),e=this.consumeCodePoint();var i=parseInt(VA.apply(void 0,o),16);return{type:30,start:n,end:i}}else return{type:30,start:n,end:n}},s.prototype.consumeIdentLikeToken=function(){var A=this.consumeName();return A.toLowerCase()==="url"&&this.peekCodePoint(0)===Pr?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===Pr?(this.consumeCodePoint(),{type:19,value:A}):{type:20,value:A}},s.prototype.consumeUrlToken=function(){var A=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===Ke)return{type:22,value:""};var e=this.peekCodePoint(0);if(e===Vr||e===Kr){var t=this.consumeStringToken(this.consumeCodePoint());return t.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===Ke||this.peekCodePoint(0)===Hs)?(this.consumeCodePoint(),{type:22,value:t.value}):(this.consumeBadUrlRemnants(),Xr)}for(;;){var r=this.consumeCodePoint();if(r===Ke||r===Hs)return{type:22,value:VA.apply(void 0,A)};if(Rr(r))return this.consumeWhiteSpace(),this.peekCodePoint(0)===Ke||this.peekCodePoint(0)===Hs?(this.consumeCodePoint(),{type:22,value:VA.apply(void 0,A)}):(this.consumeBadUrlRemnants(),Xr);if(r===Kr||r===Vr||r===Pr||ow(r))return this.consumeBadUrlRemnants(),Xr;if(r===xs)if(st(r,this.peekCodePoint(0)))A.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),Xr;else A.push(r)}},s.prototype.consumeWhiteSpace=function(){for(;Rr(this.peekCodePoint(0));)this.consumeCodePoint()},s.prototype.consumeBadUrlRemnants=function(){for(;;){var A=this.consumeCodePoint();if(A===Hs||A===Ke)return;st(A,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},s.prototype.consumeStringSlice=function(A){for(var e=5e4,t="";A>0;){var r=Math.min(e,A);t+=VA.apply(void 0,this._value.splice(0,r)),A-=r}return this._value.shift(),t},s.prototype.consumeStringToken=function(A){var e="",t=0;do{var r=this._value[t];if(r===Ke||r===void 0||r===A)return e+=this.consumeStringSlice(t),{type:0,value:e};if(r===Nr)return this._value.splice(0,t),Cw;if(r===xs){var i=this._value[t+1];i!==Ke&&i!==void 0&&(i===Nr?(e+=this.consumeStringSlice(t),t=-1,this._value.shift()):st(r,i)&&(e+=this.consumeStringSlice(t),e+=VA(this.consumeEscapedCodePoint()),t=-1))}t++}while(!0)},s.prototype.consumeNumber=function(){var A=[],e=Es,t=this.peekCodePoint(0);for((t===Qt||t===de)&&A.push(this.consumeCodePoint());re(this.peekCodePoint(0));)A.push(this.consumeCodePoint());t=this.peekCodePoint(0);var r=this.peekCodePoint(1);if(t===Ls&&re(r))for(A.push(this.consumeCodePoint(),this.consumeCodePoint()),e=kc;re(this.peekCodePoint(0));)A.push(this.consumeCodePoint());t=this.peekCodePoint(0),r=this.peekCodePoint(1);var i=this.peekCodePoint(2);if((t===Rc||t===Pc)&&((r===Qt||r===de)&&re(i)||re(r)))for(A.push(this.consumeCodePoint(),this.consumeCodePoint()),e=kc;re(this.peekCodePoint(0));)A.push(this.consumeCodePoint());return[aw(A),e]},s.prototype.consumeNumericToken=function(){var A=this.consumeNumber(),e=A[0],t=A[1],r=this.peekCodePoint(0),i=this.peekCodePoint(1),n=this.peekCodePoint(2);if(Wr(r,i,n)){var o=this.consumeName();return{type:15,number:e,flags:t,unit:o}}return r===Sp?(this.consumeCodePoint(),{type:16,number:e,flags:t}):{type:17,number:e,flags:t}},s.prototype.consumeEscapedCodePoint=function(){var A=this.consumeCodePoint();if(Pt(A)){for(var e=VA(A);Pt(this.peekCodePoint(0))&&e.length<6;)e+=VA(this.consumeCodePoint());Rr(this.peekCodePoint(0))&&this.consumeCodePoint();var t=parseInt(e,16);return t===0||tw(t)||t>1114111?Nc:t}return A===Ke?Nc:A},s.prototype.consumeName=function(){for(var A="";;){var e=this.consumeCodePoint();if(Wc(e))A+=VA(e);else if(st(e,this.peekCodePoint(0)))A+=VA(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(e),A}},s})(),$c=(function(){function s(A){this._tokens=A}return s.create=function(A){var e=new Xc;return e.write(A),new s(e.read())},s.parseValue=function(A){return s.create(A).parseComponentValue()},s.parseValues=function(A){return s.create(A).parseComponentValues()},s.prototype.parseComponentValue=function(){for(var A=this.consumeToken();A.type===31;)A=this.consumeToken();if(A.type===32)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(A);var e=this.consumeComponentValue();do A=this.consumeToken();while(A.type===31);if(A.type===32)return e;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},s.prototype.parseComponentValues=function(){for(var A=[];;){var e=this.consumeComponentValue();if(e.type===32)return A;A.push(e),A.push()}},s.prototype.consumeComponentValue=function(){var A=this.consumeToken();switch(A.type){case 11:case 28:case 2:return this.consumeSimpleBlock(A.type);case 19:return this.consumeFunction(A)}return A},s.prototype.consumeSimpleBlock=function(A){for(var e={type:A,values:[]},t=this.consumeToken();;){if(t.type===32||Sw(t,A))return e;this.reconsumeToken(t),e.values.push(this.consumeComponentValue()),t=this.consumeToken()}},s.prototype.consumeFunction=function(A){for(var e={name:A.value,values:[],type:18};;){var t=this.consumeToken();if(t.type===32||t.type===3)return e;this.reconsumeToken(t),e.values.push(this.consumeComponentValue())}},s.prototype.consumeToken=function(){var A=this._tokens.shift();return typeof A>"u"?eo:A},s.prototype.reconsumeToken=function(A){this._tokens.unshift(A)},s})(),Is=function(s){return s.type===15},Gt=function(s){return s.type===17},SA=function(s){return s.type===20},xw=function(s){return s.type===0},to=function(s,A){return SA(s)&&s.value===A},Jc=function(s){return s.type!==31},Rt=function(s){return s.type!==31&&s.type!==4},Ve=function(s){var A=[],e=[];return s.forEach(function(t){if(t.type===4){if(e.length===0)throw new Error("Error parsing function args, zero tokens for arg");A.push(e),e=[];return}t.type!==31&&e.push(t)}),e.length&&A.push(e),A},Sw=function(s,A){return A===11&&s.type===12||A===28&&s.type===29?!0:A===2&&s.type===3},rt=function(s){return s.type===17||s.type===15},zA=function(s){return s.type===16||rt(s)},Zc=function(s){return s.length>1?[s[0],s[1]]:[s[0]]},qA={type:17,number:0,flags:Es},so={type:16,number:50,flags:Es},it={type:16,number:100,flags:Es},Ts=function(s,A,e){var t=s[0],r=s[1];return[LA(t,A),LA(typeof r<"u"?r:t,e)]},LA=function(s,A){if(s.type===16)return s.number/100*A;if(Is(s))switch(s.unit){case"rem":case"em":return 16*s.number;default:return s.number}return s.number},Yc="deg",qc="grad",jc="rad",Ah="turn",$r={name:"angle",parse:function(s,A){if(A.type===15)switch(A.unit){case Yc:return Math.PI*A.number/180;case qc:return Math.PI/200*A.number;case jc:return A.number;case Ah:return Math.PI*2*A.number}throw new Error("Unsupported angle type")}},eh=function(s){return s.type===15&&(s.unit===Yc||s.unit===qc||s.unit===jc||s.unit===Ah)},th=function(s){var A=s.filter(SA).map(function(e){return e.value}).join(" ");switch(A){case"to bottom right":case"to right bottom":case"left top":case"top left":return[qA,qA];case"to top":case"bottom":return be(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[qA,it];case"to right":case"left":return be(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[it,it];case"to bottom":case"top":return be(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[it,qA];case"to left":case"right":return be(270)}return 0},be=function(s){return Math.PI*s/180},nt={name:"color",parse:function(s,A){if(A.type===18){var e=Hw[A.name];if(typeof e>"u")throw new Error('Attempting to parse an unsupported color function "'+A.name+'"');return e(s,A.values)}if(A.type===5){if(A.value.length===3){var t=A.value.substring(0,1),r=A.value.substring(1,2),i=A.value.substring(2,3);return at(parseInt(t+t,16),parseInt(r+r,16),parseInt(i+i,16),1)}if(A.value.length===4){var t=A.value.substring(0,1),r=A.value.substring(1,2),i=A.value.substring(2,3),n=A.value.substring(3,4);return at(parseInt(t+t,16),parseInt(r+r,16),parseInt(i+i,16),parseInt(n+n,16)/255)}if(A.value.length===6){var t=A.value.substring(0,2),r=A.value.substring(2,4),i=A.value.substring(4,6);return at(parseInt(t,16),parseInt(r,16),parseInt(i,16),1)}if(A.value.length===8){var t=A.value.substring(0,2),r=A.value.substring(2,4),i=A.value.substring(4,6),n=A.value.substring(6,8);return at(parseInt(t,16),parseInt(r,16),parseInt(i,16),parseInt(n,16)/255)}}if(A.type===20){var o=Ye[A.value.toUpperCase()];if(typeof o<"u")return o}return Ye.TRANSPARENT}},ot=function(s){return(255&s)===0},$A=function(s){var A=255&s,e=255&s>>8,t=255&s>>16,r=255&s>>24;return A<255?"rgba("+r+","+t+","+e+","+A/255+")":"rgb("+r+","+t+","+e+")"},at=function(s,A,e,t){return(s<<24|A<<16|e<<8|Math.round(t*255)<<0)>>>0},sh=function(s,A){if(s.type===17)return s.number;if(s.type===16){var e=A===3?1:255;return A===3?s.number/100*e:Math.round(s.number/100*e)}return 0},rh=function(s,A){var e=A.filter(Rt);if(e.length===3){var t=e.map(sh),r=t[0],i=t[1],n=t[2];return at(r,i,n,1)}if(e.length===4){var o=e.map(sh),r=o[0],i=o[1],n=o[2],a=o[3];return at(r,i,n,a)}return 0};function ro(s,A,e){return e<0&&(e+=1),e>=1&&(e-=1),e<1/6?(A-s)*e*6+s:e<1/2?A:e<2/3?(A-s)*6*(2/3-e)+s:s}var ih=function(s,A){var e=A.filter(Rt),t=e[0],r=e[1],i=e[2],n=e[3],o=(t.type===17?be(t.number):$r.parse(s,t))/(Math.PI*2),a=zA(r)?r.number/100:0,l=zA(i)?i.number/100:0,c=typeof n<"u"&&zA(n)?LA(n,1):1;if(a===0)return at(l*255,l*255,l*255,1);var u=l<=.5?l*(a+1):l+a-l*a,d=l*2-u,g=ro(d,u,o+1/3),B=ro(d,u,o),f=ro(d,u,o-1/3);return at(g*255,B*255,f*255,c)},Hw={hsl:ih,hsla:ih,rgb:rh,rgba:rh},Ms=function(s,A){return nt.parse(s,$c.create(A).parseComponentValue())},Ye={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},Lw={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(s,A){return A.map(function(e){if(SA(e))switch(e.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},Iw={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Jr=function(s,A){var e=nt.parse(s,A[0]),t=A[1];return t&&zA(t)?{color:e,stop:t}:{color:e,stop:null}},nh=function(s,A){var e=s[0],t=s[s.length-1];e.stop===null&&(e.stop=qA),t.stop===null&&(t.stop=it);for(var r=[],i=0,n=0;n<s.length;n++){var o=s[n].stop;if(o!==null){var a=LA(o,A);a>i?r.push(a):r.push(i),i=a}else r.push(null)}for(var l=null,n=0;n<r.length;n++){var c=r[n];if(c===null)l===null&&(l=n);else if(l!==null){for(var u=n-l,d=r[l-1],g=(c-d)/(u+1),B=1;B<=u;B++)r[l+B-1]=g*B;l=null}}return s.map(function(f,p){var m=f.color;return{color:m,stop:Math.max(Math.min(1,r[p]/A),0)}})},Tw=function(s,A,e){var t=A/2,r=e/2,i=LA(s[0],A)-t,n=r-LA(s[1],e);return(Math.atan2(n,i)+Math.PI*2)%(Math.PI*2)},Mw=function(s,A,e){var t=typeof s=="number"?s:Tw(s,A,e),r=Math.abs(A*Math.sin(t))+Math.abs(e*Math.cos(t)),i=A/2,n=e/2,o=r/2,a=Math.sin(t-Math.PI/2)*o,l=Math.cos(t-Math.PI/2)*o;return[r,i-l,i+l,n-a,n+a]},Ie=function(s,A){return Math.sqrt(s*s+A*A)},oh=function(s,A,e,t,r){var i=[[0,0],[0,A],[s,0],[s,A]];return i.reduce(function(n,o){var a=o[0],l=o[1],c=Ie(e-a,t-l);return(r?c<n.optimumDistance:c>n.optimumDistance)?{optimumCorner:o,optimumDistance:c}:n},{optimumDistance:r?1/0:-1/0,optimumCorner:null}).optimumCorner},Dw=function(s,A,e,t,r){var i=0,n=0;switch(s.size){case 0:s.shape===0?i=n=Math.min(Math.abs(A),Math.abs(A-t),Math.abs(e),Math.abs(e-r)):s.shape===1&&(i=Math.min(Math.abs(A),Math.abs(A-t)),n=Math.min(Math.abs(e),Math.abs(e-r)));break;case 2:if(s.shape===0)i=n=Math.min(Ie(A,e),Ie(A,e-r),Ie(A-t,e),Ie(A-t,e-r));else if(s.shape===1){var o=Math.min(Math.abs(e),Math.abs(e-r))/Math.min(Math.abs(A),Math.abs(A-t)),a=oh(t,r,A,e,!0),l=a[0],c=a[1];i=Ie(l-A,(c-e)/o),n=o*i}break;case 1:s.shape===0?i=n=Math.max(Math.abs(A),Math.abs(A-t),Math.abs(e),Math.abs(e-r)):s.shape===1&&(i=Math.max(Math.abs(A),Math.abs(A-t)),n=Math.max(Math.abs(e),Math.abs(e-r)));break;case 3:if(s.shape===0)i=n=Math.max(Ie(A,e),Ie(A,e-r),Ie(A-t,e),Ie(A-t,e-r));else if(s.shape===1){var o=Math.max(Math.abs(e),Math.abs(e-r))/Math.max(Math.abs(A),Math.abs(A-t)),u=oh(t,r,A,e,!1),l=u[0],c=u[1];i=Ie(l-A,(c-e)/o),n=o*i}break}return Array.isArray(s.size)&&(i=LA(s.size[0],t),n=s.size.length===2?LA(s.size[1],r):i),[i,n]},kw=function(s,A){var e=be(180),t=[];return Ve(A).forEach(function(r,i){if(i===0){var n=r[0];if(n.type===20&&n.value==="to"){e=th(r);return}else if(eh(n)){e=$r.parse(s,n);return}}var o=Jr(s,r);t.push(o)}),{angle:e,stops:t,type:1}},Zr=function(s,A){var e=be(180),t=[];return Ve(A).forEach(function(r,i){if(i===0){var n=r[0];if(n.type===20&&["top","left","right","bottom"].indexOf(n.value)!==-1){e=th(r);return}else if(eh(n)){e=($r.parse(s,n)+be(270))%be(360);return}}var o=Jr(s,r);t.push(o)}),{angle:e,stops:t,type:1}},_w=function(s,A){var e=be(180),t=[],r=1,i=0,n=3,o=[];return Ve(A).forEach(function(a,l){var c=a[0];if(l===0){if(SA(c)&&c.value==="linear"){r=1;return}else if(SA(c)&&c.value==="radial"){r=2;return}}if(c.type===18){if(c.name==="from"){var u=nt.parse(s,c.values[0]);t.push({stop:qA,color:u})}else if(c.name==="to"){var u=nt.parse(s,c.values[0]);t.push({stop:it,color:u})}else if(c.name==="color-stop"){var d=c.values.filter(Rt);if(d.length===2){var u=nt.parse(s,d[1]),g=d[0];Gt(g)&&t.push({stop:{type:16,number:g.number*100,flags:g.flags},color:u})}}}}),r===1?{angle:(e+be(180))%be(360),stops:t,type:r}:{size:n,shape:i,stops:t,position:o,type:r}},ah="closest-side",lh="farthest-side",ch="closest-corner",hh="farthest-corner",uh="circle",fh="ellipse",dh="cover",Bh="contain",Ow=function(s,A){var e=0,t=3,r=[],i=[];return Ve(A).forEach(function(n,o){var a=!0;if(o===0){var l=!1;a=n.reduce(function(u,d){if(l)if(SA(d))switch(d.value){case"center":return i.push(so),u;case"top":case"left":return i.push(qA),u;case"right":case"bottom":return i.push(it),u}else(zA(d)||rt(d))&&i.push(d);else if(SA(d))switch(d.value){case uh:return e=0,!1;case fh:return e=1,!1;case"at":return l=!0,!1;case ah:return t=0,!1;case dh:case lh:return t=1,!1;case Bh:case ch:return t=2,!1;case hh:return t=3,!1}else if(rt(d)||zA(d))return Array.isArray(t)||(t=[]),t.push(d),!1;return u},a)}if(a){var c=Jr(s,n);r.push(c)}}),{size:t,shape:e,stops:r,position:i,type:2}},Yr=function(s,A){var e=0,t=3,r=[],i=[];return Ve(A).forEach(function(n,o){var a=!0;if(o===0?a=n.reduce(function(c,u){if(SA(u))switch(u.value){case"center":return i.push(so),!1;case"top":case"left":return i.push(qA),!1;case"right":case"bottom":return i.push(it),!1}else if(zA(u)||rt(u))return i.push(u),!1;return c},a):o===1&&(a=n.reduce(function(c,u){if(SA(u))switch(u.value){case uh:return e=0,!1;case fh:return e=1,!1;case Bh:case ah:return t=0,!1;case lh:return t=1,!1;case ch:return t=2,!1;case dh:case hh:return t=3,!1}else if(rt(u)||zA(u))return Array.isArray(t)||(t=[]),t.push(u),!1;return c},a)),a){var l=Jr(s,n);r.push(l)}}),{size:t,shape:e,stops:r,position:i,type:2}},Nw=function(s){return s.type===1},Kw=function(s){return s.type===2},io={name:"image",parse:function(s,A){if(A.type===22){var e={url:A.value,type:0};return s.cache.addImage(A.value),e}if(A.type===18){var t=gh[A.name];if(typeof t>"u")throw new Error('Attempting to parse an unsupported image function "'+A.name+'"');return t(s,A.values)}throw new Error("Unsupported image type "+A.type)}};function Vw(s){return!(s.type===20&&s.value==="none")&&(s.type!==18||!!gh[s.name])}var gh={"linear-gradient":kw,"-moz-linear-gradient":Zr,"-ms-linear-gradient":Zr,"-o-linear-gradient":Zr,"-webkit-linear-gradient":Zr,"radial-gradient":Ow,"-moz-radial-gradient":Yr,"-ms-radial-gradient":Yr,"-o-radial-gradient":Yr,"-webkit-radial-gradient":Yr,"-webkit-gradient":_w},Pw={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(s,A){if(A.length===0)return[];var e=A[0];return e.type===20&&e.value==="none"?[]:A.filter(function(t){return Rt(t)&&Vw(t)}).map(function(t){return io.parse(s,t)})}},Gw={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(s,A){return A.map(function(e){if(SA(e))switch(e.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},Rw={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(s,A){return Ve(A).map(function(e){return e.filter(zA)}).map(Zc)}},zw={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(s,A){return Ve(A).map(function(e){return e.filter(SA).map(function(t){return t.value}).join(" ")}).map(Ww)}},Ww=function(s){switch(s){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;default:return 0}},zt;(function(s){s.AUTO="auto",s.CONTAIN="contain",s.COVER="cover"})(zt||(zt={}));var Xw={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(s,A){return Ve(A).map(function(e){return e.filter($w)})}},$w=function(s){return SA(s)||zA(s)},qr=function(s){return{name:"border-"+s+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},Jw=qr("top"),Zw=qr("right"),Yw=qr("bottom"),qw=qr("left"),jr=function(s){return{name:"border-radius-"+s,initialValue:"0 0",prefix:!1,type:1,parse:function(A,e){return Zc(e.filter(zA))}}},jw=jr("top-left"),A1=jr("top-right"),e1=jr("bottom-right"),t1=jr("bottom-left"),Ai=function(s){return{name:"border-"+s+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(A,e){switch(e){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},s1=Ai("top"),r1=Ai("right"),i1=Ai("bottom"),n1=Ai("left"),ei=function(s){return{name:"border-"+s+"-width",initialValue:"0",type:0,prefix:!1,parse:function(A,e){return Is(e)?e.number:0}}},o1=ei("top"),a1=ei("right"),l1=ei("bottom"),c1=ei("left"),h1={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},u1={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(s,A){return A==="rtl"?1:0}},f1={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(s,A){return A.filter(SA).reduce(function(e,t){return e|d1(t.value)},0)}},d1=function(s){switch(s){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},B1={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(s,A){switch(A){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},g1={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(s,A){return A.type===20&&A.value==="normal"?0:A.type===17||A.type===15?A.number:0}},ti;(function(s){s.NORMAL="normal",s.STRICT="strict"})(ti||(ti={}));var p1={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(s,A){return A==="strict"?ti.STRICT:ti.NORMAL}},w1={name:"line-height",initialValue:"normal",prefix:!1,type:4},ph=function(s,A){return SA(s)&&s.value==="normal"?1.2*A:s.type===17?A*s.number:zA(s)?LA(s,A):A},m1={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(s,A){return A.type===20&&A.value==="none"?null:io.parse(s,A)}},C1={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(s,A){return A==="inside"?0:1}},no={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(s,A){switch(A){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":return 22;case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;default:return-1}}},si=function(s){return{name:"margin-"+s,initialValue:"0",prefix:!1,type:4}},v1=si("top"),b1=si("right"),Q1=si("bottom"),y1=si("left"),U1={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(s,A){return A.filter(SA).map(function(e){switch(e.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;default:return 0}})}},F1={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(s,A){return A==="break-word"?"break-word":"normal"}},ri=function(s){return{name:"padding-"+s,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},E1=ri("top"),x1=ri("right"),S1=ri("bottom"),H1=ri("left"),L1={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(s,A){switch(A){case"right":return 2;case"center":case"justify":return 1;default:return 0}}},I1={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(s,A){switch(A){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},T1={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(s,A){return A.length===1&&to(A[0],"none")?[]:Ve(A).map(function(e){for(var t={color:Ye.TRANSPARENT,offsetX:qA,offsetY:qA,blur:qA},r=0,i=0;i<e.length;i++){var n=e[i];rt(n)?(r===0?t.offsetX=n:r===1?t.offsetY=n:t.blur=n,r++):t.color=nt.parse(s,n)}return t})}},M1={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(s,A){switch(A){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},D1={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(s,A){if(A.type===20&&A.value==="none")return null;if(A.type===18){var e=O1[A.name];if(typeof e>"u")throw new Error('Attempting to parse an unsupported transform function "'+A.name+'"');return e(A.values)}return null}},k1=function(s){var A=s.filter(function(e){return e.type===17}).map(function(e){return e.number});return A.length===6?A:null},_1=function(s){var A=s.filter(function(a){return a.type===17}).map(function(a){return a.number}),e=A[0],t=A[1];A[2],A[3];var r=A[4],i=A[5];A[6],A[7],A[8],A[9],A[10],A[11];var n=A[12],o=A[13];return A[14],A[15],A.length===16?[e,t,r,i,n,o]:null},O1={matrix:k1,matrix3d:_1},wh={type:16,number:50,flags:Es},N1=[wh,wh],K1={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(s,A){var e=A.filter(zA);return e.length!==2?N1:[e[0],e[1]]}},V1={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(s,A){switch(A){case"hidden":return 1;case"collapse":return 2;default:return 0}}},Ds;(function(s){s.NORMAL="normal",s.BREAK_ALL="break-all",s.KEEP_ALL="keep-all"})(Ds||(Ds={}));for(var P1={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(s,A){switch(A){case"break-all":return Ds.BREAK_ALL;case"keep-all":return Ds.KEEP_ALL;default:return Ds.NORMAL}}},G1={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(s,A){if(A.type===20)return{auto:!0,order:0};if(Gt(A))return{auto:!1,order:A.number};throw new Error("Invalid z-index number parsed")}},mh={name:"time",parse:function(s,A){if(A.type===15)switch(A.unit.toLowerCase()){case"s":return 1e3*A.number;case"ms":return A.number}throw new Error("Unsupported time type")}},R1={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(s,A){return Gt(A)?A.number:1}},z1={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},W1={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(s,A){return A.filter(SA).map(function(e){switch(e.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(function(e){return e!==0})}},X1={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(s,A){var e=[],t=[];return A.forEach(function(r){switch(r.type){case 20:case 0:e.push(r.value);break;case 17:e.push(r.number.toString());break;case 4:t.push(e.join(" ")),e.length=0;break}}),e.length&&t.push(e.join(" ")),t.map(function(r){return r.indexOf(" ")===-1?r:"'"+r+"'"})}},$1={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},J1={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(s,A){return Gt(A)?A.number:SA(A)&&A.value==="bold"?700:400}},Z1={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(s,A){return A.filter(SA).map(function(e){return e.value})}},Y1={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(s,A){switch(A){case"oblique":return"oblique";case"italic":return"italic";default:return"normal"}}},XA=function(s,A){return(s&A)!==0},q1={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(s,A){if(A.length===0)return[];var e=A[0];return e.type===20&&e.value==="none"?[]:A}},j1={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(s,A){if(A.length===0)return null;var e=A[0];if(e.type===20&&e.value==="none")return null;for(var t=[],r=A.filter(Jc),i=0;i<r.length;i++){var n=r[i],o=r[i+1];if(n.type===20){var a=o&&Gt(o)?o.number:1;t.push({counter:n.value,increment:a})}}return t}},Am={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(s,A){if(A.length===0)return[];for(var e=[],t=A.filter(Jc),r=0;r<t.length;r++){var i=t[r],n=t[r+1];if(SA(i)&&i.value!=="none"){var o=n&&Gt(n)?n.number:0;e.push({counter:i.value,reset:o})}}return e}},em={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(s,A){return A.filter(Is).map(function(e){return mh.parse(s,e)})}},tm={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(s,A){if(A.length===0)return null;var e=A[0];if(e.type===20&&e.value==="none")return null;var t=[],r=A.filter(xw);if(r.length%2!==0)return null;for(var i=0;i<r.length;i+=2){var n=r[i].value,o=r[i+1].value;t.push({open:n,close:o})}return t}},Ch=function(s,A,e){if(!s)return"";var t=s[Math.min(A,s.length-1)];return t?e?t.open:t.close:""},sm={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(s,A){return A.length===1&&to(A[0],"none")?[]:Ve(A).map(function(e){for(var t={color:255,offsetX:qA,offsetY:qA,blur:qA,spread:qA,inset:!1},r=0,i=0;i<e.length;i++){var n=e[i];to(n,"inset")?t.inset=!0:rt(n)?(r===0?t.offsetX=n:r===1?t.offsetY=n:r===2?t.blur=n:t.spread=n,r++):t.color=nt.parse(s,n)}return t})}},rm={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(s,A){var e=[0,1,2],t=[];return A.filter(SA).forEach(function(r){switch(r.value){case"stroke":t.push(1);break;case"fill":t.push(0);break;case"markers":t.push(2);break}}),e.forEach(function(r){t.indexOf(r)===-1&&t.push(r)}),t}},im={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},nm={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(s,A){return Is(A)?A.number:0}},om=(function(){function s(A,e){var t,r;this.animationDuration=R(A,em,e.animationDuration),this.backgroundClip=R(A,Lw,e.backgroundClip),this.backgroundColor=R(A,Iw,e.backgroundColor),this.backgroundImage=R(A,Pw,e.backgroundImage),this.backgroundOrigin=R(A,Gw,e.backgroundOrigin),this.backgroundPosition=R(A,Rw,e.backgroundPosition),this.backgroundRepeat=R(A,zw,e.backgroundRepeat),this.backgroundSize=R(A,Xw,e.backgroundSize),this.borderTopColor=R(A,Jw,e.borderTopColor),this.borderRightColor=R(A,Zw,e.borderRightColor),this.borderBottomColor=R(A,Yw,e.borderBottomColor),this.borderLeftColor=R(A,qw,e.borderLeftColor),this.borderTopLeftRadius=R(A,jw,e.borderTopLeftRadius),this.borderTopRightRadius=R(A,A1,e.borderTopRightRadius),this.borderBottomRightRadius=R(A,e1,e.borderBottomRightRadius),this.borderBottomLeftRadius=R(A,t1,e.borderBottomLeftRadius),this.borderTopStyle=R(A,s1,e.borderTopStyle),this.borderRightStyle=R(A,r1,e.borderRightStyle),this.borderBottomStyle=R(A,i1,e.borderBottomStyle),this.borderLeftStyle=R(A,n1,e.borderLeftStyle),this.borderTopWidth=R(A,o1,e.borderTopWidth),this.borderRightWidth=R(A,a1,e.borderRightWidth),this.borderBottomWidth=R(A,l1,e.borderBottomWidth),this.borderLeftWidth=R(A,c1,e.borderLeftWidth),this.boxShadow=R(A,sm,e.boxShadow),this.color=R(A,h1,e.color),this.direction=R(A,u1,e.direction),this.display=R(A,f1,e.display),this.float=R(A,B1,e.cssFloat),this.fontFamily=R(A,X1,e.fontFamily),this.fontSize=R(A,$1,e.fontSize),this.fontStyle=R(A,Y1,e.fontStyle),this.fontVariant=R(A,Z1,e.fontVariant),this.fontWeight=R(A,J1,e.fontWeight),this.letterSpacing=R(A,g1,e.letterSpacing),this.lineBreak=R(A,p1,e.lineBreak),this.lineHeight=R(A,w1,e.lineHeight),this.listStyleImage=R(A,m1,e.listStyleImage),this.listStylePosition=R(A,C1,e.listStylePosition),this.listStyleType=R(A,no,e.listStyleType),this.marginTop=R(A,v1,e.marginTop),this.marginRight=R(A,b1,e.marginRight),this.marginBottom=R(A,Q1,e.marginBottom),this.marginLeft=R(A,y1,e.marginLeft),this.opacity=R(A,R1,e.opacity);var i=R(A,U1,e.overflow);this.overflowX=i[0],this.overflowY=i[i.length>1?1:0],this.overflowWrap=R(A,F1,e.overflowWrap),this.paddingTop=R(A,E1,e.paddingTop),this.paddingRight=R(A,x1,e.paddingRight),this.paddingBottom=R(A,S1,e.paddingBottom),this.paddingLeft=R(A,H1,e.paddingLeft),this.paintOrder=R(A,rm,e.paintOrder),this.position=R(A,I1,e.position),this.textAlign=R(A,L1,e.textAlign),this.textDecorationColor=R(A,z1,(t=e.textDecorationColor)!==null&&t!==void 0?t:e.color),this.textDecorationLine=R(A,W1,(r=e.textDecorationLine)!==null&&r!==void 0?r:e.textDecoration),this.textShadow=R(A,T1,e.textShadow),this.textTransform=R(A,M1,e.textTransform),this.transform=R(A,D1,e.transform),this.transformOrigin=R(A,K1,e.transformOrigin),this.visibility=R(A,V1,e.visibility),this.webkitTextStrokeColor=R(A,im,e.webkitTextStrokeColor),this.webkitTextStrokeWidth=R(A,nm,e.webkitTextStrokeWidth),this.wordBreak=R(A,P1,e.wordBreak),this.zIndex=R(A,G1,e.zIndex)}return s.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},s.prototype.isTransparent=function(){return ot(this.backgroundColor)},s.prototype.isTransformed=function(){return this.transform!==null},s.prototype.isPositioned=function(){return this.position!==0},s.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},s.prototype.isFloating=function(){return this.float!==0},s.prototype.isInlineLevel=function(){return XA(this.display,4)||XA(this.display,33554432)||XA(this.display,268435456)||XA(this.display,536870912)||XA(this.display,67108864)||XA(this.display,134217728)},s})(),am=(function(){function s(A,e){this.content=R(A,q1,e.content),this.quotes=R(A,tm,e.quotes)}return s})(),vh=(function(){function s(A,e){this.counterIncrement=R(A,j1,e.counterIncrement),this.counterReset=R(A,Am,e.counterReset)}return s})(),R=function(s,A,e){var t=new Xc,r=e!==null&&typeof e<"u"?e.toString():A.initialValue;t.write(r);var i=new $c(t.read());switch(A.type){case 2:var n=i.parseComponentValue();return A.parse(s,SA(n)?n.value:A.initialValue);case 0:return A.parse(s,i.parseComponentValue());case 1:return A.parse(s,i.parseComponentValues());case 4:return i.parseComponentValue();case 3:switch(A.format){case"angle":return $r.parse(s,i.parseComponentValue());case"color":return nt.parse(s,i.parseComponentValue());case"image":return io.parse(s,i.parseComponentValue());case"length":var o=i.parseComponentValue();return rt(o)?o:qA;case"length-percentage":var a=i.parseComponentValue();return zA(a)?a:qA;case"time":return mh.parse(s,i.parseComponentValue())}break}},lm="data-html2canvas-debug",cm=function(s){var A=s.getAttribute(lm);switch(A){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},oo=function(s,A){var e=cm(s);return e===1||A===e},Pe=(function(){function s(A,e){if(this.context=A,this.textNodes=[],this.elements=[],this.flags=0,oo(e,3))debugger;this.styles=new om(A,window.getComputedStyle(e,null)),bo(e)&&(this.styles.animationDuration.some(function(t){return t>0})&&(e.style.animationDuration="0s"),this.styles.transform!==null&&(e.style.transform="none")),this.bounds=xr(this.context,e),oo(e,4)&&(this.flags|=16)}return s})(),hm="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=",bh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ks=typeof Uint8Array>"u"?[]:new Uint8Array(256),ii=0;ii<bh.length;ii++)ks[bh.charCodeAt(ii)]=ii;for(var um=function(s){var A=s.length*.75,e=s.length,t,r=0,i,n,o,a;s[s.length-1]==="="&&(A--,s[s.length-2]==="="&&A--);var l=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&typeof Uint8Array.prototype.slice<"u"?new ArrayBuffer(A):new Array(A),c=Array.isArray(l)?l:new Uint8Array(l);for(t=0;t<e;t+=4)i=ks[s.charCodeAt(t)],n=ks[s.charCodeAt(t+1)],o=ks[s.charCodeAt(t+2)],a=ks[s.charCodeAt(t+3)],c[r++]=i<<2|n>>4,c[r++]=(n&15)<<4|o>>2,c[r++]=(o&3)<<6|a&63;return l},fm=function(s){for(var A=s.length,e=[],t=0;t<A;t+=2)e.push(s[t+1]<<8|s[t]);return e},dm=function(s){for(var A=s.length,e=[],t=0;t<A;t+=4)e.push(s[t+3]<<24|s[t+2]<<16|s[t+1]<<8|s[t]);return e},yt=5,ao=11,lo=2,Bm=ao-yt,Qh=65536>>yt,gm=1<<yt,co=gm-1,pm=1024>>yt,wm=Qh+pm,mm=wm,Cm=32,vm=mm+Cm,bm=65536>>ao,Qm=1<<Bm,ym=Qm-1,yh=function(s,A,e){return s.slice?s.slice(A,e):new Uint16Array(Array.prototype.slice.call(s,A,e))},Um=function(s,A,e){return s.slice?s.slice(A,e):new Uint32Array(Array.prototype.slice.call(s,A,e))},Fm=function(s,A){var e=um(s),t=Array.isArray(e)?dm(e):new Uint32Array(e),r=Array.isArray(e)?fm(e):new Uint16Array(e),i=24,n=yh(r,i/2,t[4]/2),o=t[5]===2?yh(r,(i+t[4])/2):Um(t,Math.ceil((i+t[4])/4));return new Em(t[0],t[1],t[2],t[3],n,o)},Em=(function(){function s(A,e,t,r,i,n){this.initialValue=A,this.errorValue=e,this.highStart=t,this.highValueIndex=r,this.index=i,this.data=n}return s.prototype.get=function(A){var e;if(A>=0){if(A<55296||A>56319&&A<=65535)return e=this.index[A>>yt],e=(e<<lo)+(A&co),this.data[e];if(A<=65535)return e=this.index[Qh+(A-55296>>yt)],e=(e<<lo)+(A&co),this.data[e];if(A<this.highStart)return e=vm-bm+(A>>ao),e=this.index[e],e+=A>>yt&ym,e=this.index[e],e=(e<<lo)+(A&co),this.data[e];if(A<=1114111)return this.data[this.highValueIndex]}return this.errorValue},s})(),Uh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",xm=typeof Uint8Array>"u"?[]:new Uint8Array(256),ni=0;ni<Uh.length;ni++)xm[Uh.charCodeAt(ni)]=ni;var Sm=1,ho=2,uo=3,Fh=4,Eh=5,Hm=7,xh=8,fo=9,Bo=10,Sh=11,Hh=12,Lh=13,Ih=14,go=15,Lm=function(s){for(var A=[],e=0,t=s.length;e<t;){var r=s.charCodeAt(e++);if(r>=55296&&r<=56319&&e<t){var i=s.charCodeAt(e++);(i&64512)===56320?A.push(((r&1023)<<10)+(i&1023)+65536):(A.push(r),e--)}else A.push(r)}return A},Im=function(){for(var s=[],A=0;A<arguments.length;A++)s[A]=arguments[A];if(String.fromCodePoint)return String.fromCodePoint.apply(String,s);var e=s.length;if(!e)return"";for(var t=[],r=-1,i="";++r<e;){var n=s[r];n<=65535?t.push(n):(n-=65536,t.push((n>>10)+55296,n%1024+56320)),(r+1===e||t.length>16384)&&(i+=String.fromCharCode.apply(String,t),t.length=0)}return i},Tm=Fm(hm),Qe="×",po="÷",Mm=function(s){return Tm.get(s)},Dm=function(s,A,e){var t=e-2,r=A[t],i=A[e-1],n=A[e];if(i===ho&&n===uo)return Qe;if(i===ho||i===uo||i===Fh||n===ho||n===uo||n===Fh)return po;if(i===xh&&[xh,fo,Sh,Hh].indexOf(n)!==-1||(i===Sh||i===fo)&&(n===fo||n===Bo)||(i===Hh||i===Bo)&&n===Bo||n===Lh||n===Eh||n===Hm||i===Sm)return Qe;if(i===Lh&&n===Ih){for(;r===Eh;)r=A[--t];if(r===Ih)return Qe}if(i===go&&n===go){for(var o=0;r===go;)o++,r=A[--t];if(o%2===0)return Qe}return po},km=function(s){var A=Lm(s),e=A.length,t=0,r=0,i=A.map(Mm);return{next:function(){if(t>=e)return{done:!0,value:null};for(var n=Qe;t<e&&(n=Dm(A,i,++t))===Qe;);if(n!==Qe||t===e){var o=Im.apply(null,A.slice(r,t));return r=t,{value:o,done:!1}}return{done:!0,value:null}}}},_m=function(s){for(var A=km(s),e=[],t;!(t=A.next()).done;)t.value&&e.push(t.value.slice());return e},Om=function(s){var A=123;if(s.createRange){var e=s.createRange();if(e.getBoundingClientRect){var t=s.createElement("boundtest");t.style.height=A+"px",t.style.display="block",s.body.appendChild(t),e.selectNode(t);var r=e.getBoundingClientRect(),i=Math.round(r.height);if(s.body.removeChild(t),i===A)return!0}}return!1},Nm=function(s){var A=s.createElement("boundtest");A.style.width="50px",A.style.display="block",A.style.fontSize="12px",A.style.letterSpacing="0px",A.style.wordSpacing="0px",s.body.appendChild(A);var e=s.createRange();A.innerHTML=typeof"".repeat=="function"?"👨".repeat(10):"";var t=A.firstChild,r=Sr(t.data).map(function(a){return VA(a)}),i=0,n={},o=r.every(function(a,l){e.setStart(t,i),e.setEnd(t,i+a.length);var c=e.getBoundingClientRect();i+=a.length;var u=c.x>n.x||c.y>n.y;return n=c,l===0?!0:u});return s.body.removeChild(A),o},Km=function(){return typeof new Image().crossOrigin<"u"},Vm=function(){return typeof new XMLHttpRequest().responseType=="string"},Pm=function(s){var A=new Image,e=s.createElement("canvas"),t=e.getContext("2d");if(!t)return!1;A.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{t.drawImage(A,0,0),e.toDataURL()}catch{return!1}return!0},Th=function(s){return s[0]===0&&s[1]===255&&s[2]===0&&s[3]===255},Gm=function(s){var A=s.createElement("canvas"),e=100;A.width=e,A.height=e;var t=A.getContext("2d");if(!t)return Promise.reject(!1);t.fillStyle="rgb(0, 255, 0)",t.fillRect(0,0,e,e);var r=new Image,i=A.toDataURL();r.src=i;var n=wo(e,e,0,0,r);return t.fillStyle="red",t.fillRect(0,0,e,e),Mh(n).then(function(o){t.drawImage(o,0,0);var a=t.getImageData(0,0,e,e).data;t.fillStyle="red",t.fillRect(0,0,e,e);var l=s.createElement("div");return l.style.backgroundImage="url("+i+")",l.style.height=e+"px",Th(a)?Mh(wo(e,e,0,0,l)):Promise.reject(!1)}).then(function(o){return t.drawImage(o,0,0),Th(t.getImageData(0,0,e,e).data)}).catch(function(){return!1})},wo=function(s,A,e,t,r){var i="http://www.w3.org/2000/svg",n=document.createElementNS(i,"svg"),o=document.createElementNS(i,"foreignObject");return n.setAttributeNS(null,"width",s.toString()),n.setAttributeNS(null,"height",A.toString()),o.setAttributeNS(null,"width","100%"),o.setAttributeNS(null,"height","100%"),o.setAttributeNS(null,"x",e.toString()),o.setAttributeNS(null,"y",t.toString()),o.setAttributeNS(null,"externalResourcesRequired","true"),n.appendChild(o),o.appendChild(r),n},Mh=function(s){return new Promise(function(A,e){var t=new Image;t.onload=function(){return A(t)},t.onerror=e,t.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(s))})},jA={get SUPPORT_RANGE_BOUNDS(){var s=Om(document);return Object.defineProperty(jA,"SUPPORT_RANGE_BOUNDS",{value:s}),s},get SUPPORT_WORD_BREAKING(){var s=jA.SUPPORT_RANGE_BOUNDS&&Nm(document);return Object.defineProperty(jA,"SUPPORT_WORD_BREAKING",{value:s}),s},get SUPPORT_SVG_DRAWING(){var s=Pm(document);return Object.defineProperty(jA,"SUPPORT_SVG_DRAWING",{value:s}),s},get SUPPORT_FOREIGNOBJECT_DRAWING(){var s=typeof Array.from=="function"&&typeof window.fetch=="function"?Gm(document):Promise.resolve(!1);return Object.defineProperty(jA,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:s}),s},get SUPPORT_CORS_IMAGES(){var s=Km();return Object.defineProperty(jA,"SUPPORT_CORS_IMAGES",{value:s}),s},get SUPPORT_RESPONSE_TYPE(){var s=Vm();return Object.defineProperty(jA,"SUPPORT_RESPONSE_TYPE",{value:s}),s},get SUPPORT_CORS_XHR(){var s="withCredentials"in new XMLHttpRequest;return Object.defineProperty(jA,"SUPPORT_CORS_XHR",{value:s}),s},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var s=!!(typeof Intl<"u"&&Intl.Segmenter);return Object.defineProperty(jA,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:s}),s}},_s=(function(){function s(A,e){this.text=A,this.bounds=e}return s})(),Rm=function(s,A,e,t){var r=Xm(A,e),i=[],n=0;return r.forEach(function(o){if(e.textDecorationLine.length||o.trim().length>0)if(jA.SUPPORT_RANGE_BOUNDS){var a=Dh(t,n,o.length).getClientRects();if(a.length>1){var l=mo(o),c=0;l.forEach(function(d){i.push(new _s(d,Je.fromDOMRectList(s,Dh(t,c+n,d.length).getClientRects()))),c+=d.length})}else i.push(new _s(o,Je.fromDOMRectList(s,a)))}else{var u=t.splitText(o.length);i.push(new _s(o,zm(s,t))),t=u}else jA.SUPPORT_RANGE_BOUNDS||(t=t.splitText(o.length));n+=o.length}),i},zm=function(s,A){var e=A.ownerDocument;if(e){var t=e.createElement("html2canvaswrapper");t.appendChild(A.cloneNode(!0));var r=A.parentNode;if(r){r.replaceChild(t,A);var i=xr(s,t);return t.firstChild&&r.replaceChild(t.firstChild,t),i}}return Je.EMPTY},Dh=function(s,A,e){var t=s.ownerDocument;if(!t)throw new Error("Node has no owner document");var r=t.createRange();return r.setStart(s,A),r.setEnd(s,A+e),r},mo=function(s){if(jA.SUPPORT_NATIVE_TEXT_SEGMENTATION){var A=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(A.segment(s)).map(function(e){return e.segment})}return _m(s)},Wm=function(s,A){if(jA.SUPPORT_NATIVE_TEXT_SEGMENTATION){var e=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(e.segment(s)).map(function(t){return t.segment})}return Jm(s,A)},Xm=function(s,A){return A.letterSpacing!==0?mo(s):Wm(s,A)},$m=[32,160,4961,65792,65793,4153,4241],Jm=function(s,A){for(var e=bp(s,{lineBreak:A.lineBreak,wordBreak:A.overflowWrap==="break-word"?"break-word":A.wordBreak}),t=[],r,i=function(){if(r.value){var n=r.value.slice(),o=Sr(n),a="";o.forEach(function(l){$m.indexOf(l)===-1?a+=VA(l):(a.length&&t.push(a),t.push(VA(l)),a="")}),a.length&&t.push(a)}};!(r=e.next()).done;)i();return t},Zm=(function(){function s(A,e,t){this.text=Ym(e.data,t.textTransform),this.textBounds=Rm(A,this.text,t,e)}return s})(),Ym=function(s,A){switch(A){case 1:return s.toLowerCase();case 3:return s.replace(qm,jm);case 2:return s.toUpperCase();default:return s}},qm=/(^|\s|:|-|\(|\))([a-z])/g,jm=function(s,A,e){return s.length>0?A+e.toUpperCase():s},kh=(function(s){Le(A,s);function A(e,t){var r=s.call(this,e,t)||this;return r.src=t.currentSrc||t.src,r.intrinsicWidth=t.naturalWidth,r.intrinsicHeight=t.naturalHeight,r.context.cache.addImage(r.src),r}return A})(Pe),_h=(function(s){Le(A,s);function A(e,t){var r=s.call(this,e,t)||this;return r.canvas=t,r.intrinsicWidth=t.width,r.intrinsicHeight=t.height,r}return A})(Pe),Oh=(function(s){Le(A,s);function A(e,t){var r=s.call(this,e,t)||this,i=new XMLSerializer,n=xr(e,t);return t.setAttribute("width",n.width+"px"),t.setAttribute("height",n.height+"px"),r.svg="data:image/svg+xml,"+encodeURIComponent(i.serializeToString(t)),r.intrinsicWidth=t.width.baseVal.value,r.intrinsicHeight=t.height.baseVal.value,r.context.cache.addImage(r.svg),r}return A})(Pe),Nh=(function(s){Le(A,s);function A(e,t){var r=s.call(this,e,t)||this;return r.value=t.value,r}return A})(Pe),Co=(function(s){Le(A,s);function A(e,t){var r=s.call(this,e,t)||this;return r.start=t.start,r.reversed=typeof t.reversed=="boolean"&&t.reversed===!0,r}return A})(Pe),AC=[{type:15,flags:0,unit:"px",number:3}],eC=[{type:16,flags:0,number:50}],tC=function(s){return s.width>s.height?new Je(s.left+(s.width-s.height)/2,s.top,s.height,s.height):s.width<s.height?new Je(s.left,s.top+(s.height-s.width)/2,s.width,s.width):s},sC=function(s){var A=s.type===rC?new Array(s.value.length+1).join("•"):s.value;return A.length===0?s.placeholder||"":A},oi="checkbox",ai="radio",rC="password",Kh=707406591,vo=(function(s){Le(A,s);function A(e,t){var r=s.call(this,e,t)||this;switch(r.type=t.type.toLowerCase(),r.checked=t.checked,r.value=sC(t),(r.type===oi||r.type===ai)&&(r.styles.backgroundColor=3739148031,r.styles.borderTopColor=r.styles.borderRightColor=r.styles.borderBottomColor=r.styles.borderLeftColor=2779096575,r.styles.borderTopWidth=r.styles.borderRightWidth=r.styles.borderBottomWidth=r.styles.borderLeftWidth=1,r.styles.borderTopStyle=r.styles.borderRightStyle=r.styles.borderBottomStyle=r.styles.borderLeftStyle=1,r.styles.backgroundClip=[0],r.styles.backgroundOrigin=[0],r.bounds=tC(r.bounds)),r.type){case oi:r.styles.borderTopRightRadius=r.styles.borderTopLeftRadius=r.styles.borderBottomRightRadius=r.styles.borderBottomLeftRadius=AC;break;case ai:r.styles.borderTopRightRadius=r.styles.borderTopLeftRadius=r.styles.borderBottomRightRadius=r.styles.borderBottomLeftRadius=eC;break}return r}return A})(Pe),Vh=(function(s){Le(A,s);function A(e,t){var r=s.call(this,e,t)||this,i=t.options[t.selectedIndex||0];return r.value=i&&i.text||"",r}return A})(Pe),Ph=(function(s){Le(A,s);function A(e,t){var r=s.call(this,e,t)||this;return r.value=t.value,r}return A})(Pe),Gh=(function(s){Le(A,s);function A(e,t){var r=s.call(this,e,t)||this;r.src=t.src,r.width=parseInt(t.width,10)||0,r.height=parseInt(t.height,10)||0,r.backgroundColor=r.styles.backgroundColor;try{if(t.contentWindow&&t.contentWindow.document&&t.contentWindow.document.documentElement){r.tree=zh(e,t.contentWindow.document.documentElement);var i=t.contentWindow.document.documentElement?Ms(e,getComputedStyle(t.contentWindow.document.documentElement).backgroundColor):Ye.TRANSPARENT,n=t.contentWindow.document.body?Ms(e,getComputedStyle(t.contentWindow.document.body).backgroundColor):Ye.TRANSPARENT;r.backgroundColor=ot(i)?ot(n)?r.styles.backgroundColor:n:i}}catch{}return r}return A})(Pe),iC=["OL","UL","MENU"],li=function(s,A,e,t){for(var r=A.firstChild,i=void 0;r;r=i)if(i=r.nextSibling,Wh(r)&&r.data.trim().length>0)e.textNodes.push(new Zm(s,r,e.styles));else if(Wt(r))if(qh(r)&&r.assignedNodes)r.assignedNodes().forEach(function(o){return li(s,o,e,t)});else{var n=Rh(s,r);n.styles.isVisible()&&(nC(r,n,t)?n.flags|=4:oC(n.styles)&&(n.flags|=2),iC.indexOf(r.tagName)!==-1&&(n.flags|=8),e.elements.push(n),r.slot,r.shadowRoot?li(s,r.shadowRoot,n,t):!hi(r)&&!Xh(r)&&!ui(r)&&li(s,r,n,t))}},Rh=function(s,A){return yo(A)?new kh(s,A):$h(A)?new _h(s,A):Xh(A)?new Oh(s,A):aC(A)?new Nh(s,A):lC(A)?new Co(s,A):cC(A)?new vo(s,A):ui(A)?new Vh(s,A):hi(A)?new Ph(s,A):Zh(A)?new Gh(s,A):new Pe(s,A)},zh=function(s,A){var e=Rh(s,A);return e.flags|=4,li(s,A,e,e),e},nC=function(s,A,e){return A.styles.isPositionedWithZIndex()||A.styles.opacity<1||A.styles.isTransformed()||Qo(s)&&e.styles.isTransparent()},oC=function(s){return s.isPositioned()||s.isFloating()},Wh=function(s){return s.nodeType===Node.TEXT_NODE},Wt=function(s){return s.nodeType===Node.ELEMENT_NODE},bo=function(s){return Wt(s)&&typeof s.style<"u"&&!ci(s)},ci=function(s){return typeof s.className=="object"},aC=function(s){return s.tagName==="LI"},lC=function(s){return s.tagName==="OL"},cC=function(s){return s.tagName==="INPUT"},hC=function(s){return s.tagName==="HTML"},Xh=function(s){return s.tagName==="svg"},Qo=function(s){return s.tagName==="BODY"},$h=function(s){return s.tagName==="CANVAS"},Jh=function(s){return s.tagName==="VIDEO"},yo=function(s){return s.tagName==="IMG"},Zh=function(s){return s.tagName==="IFRAME"},Yh=function(s){return s.tagName==="STYLE"},uC=function(s){return s.tagName==="SCRIPT"},hi=function(s){return s.tagName==="TEXTAREA"},ui=function(s){return s.tagName==="SELECT"},qh=function(s){return s.tagName==="SLOT"},jh=function(s){return s.tagName.indexOf("-")>0},fC=(function(){function s(){this.counters={}}return s.prototype.getCounterValue=function(A){var e=this.counters[A];return e&&e.length?e[e.length-1]:1},s.prototype.getCounterValues=function(A){var e=this.counters[A];return e||[]},s.prototype.pop=function(A){var e=this;A.forEach(function(t){return e.counters[t].pop()})},s.prototype.parse=function(A){var e=this,t=A.counterIncrement,r=A.counterReset,i=!0;t!==null&&t.forEach(function(o){var a=e.counters[o.counter];a&&o.increment!==0&&(i=!1,a.length||a.push(1),a[Math.max(0,a.length-1)]+=o.increment)});var n=[];return i&&r.forEach(function(o){var a=e.counters[o.counter];n.push(o.counter),a||(a=e.counters[o.counter]=[]),a.push(o.reset)}),n},s})(),Au={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},eu={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},dC={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},BC={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","ყ","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},Xt=function(s,A,e,t,r,i){return s<A||s>e?Ns(s,r,i.length>0):t.integers.reduce(function(n,o,a){for(;s>=o;)s-=o,n+=t.values[a];return n},"")+i},tu=function(s,A,e,t){var r="";do e||s--,r=t(s)+r,s/=A;while(s*A>=A);return r},PA=function(s,A,e,t,r){var i=e-A+1;return(s<0?"-":"")+(tu(Math.abs(s),i,t,function(n){return VA(Math.floor(n%i)+A)})+r)},Ut=function(s,A,e){e===void 0&&(e=". ");var t=A.length;return tu(Math.abs(s),t,!1,function(r){return A[Math.floor(r%t)]})+e},$t=1,lt=2,ct=4,Os=8,qe=function(s,A,e,t,r,i){if(s<-9999||s>9999)return Ns(s,4,r.length>0);var n=Math.abs(s),o=r;if(n===0)return A[0]+o;for(var a=0;n>0&&a<=4;a++){var l=n%10;l===0&&XA(i,$t)&&o!==""?o=A[l]+o:l>1||l===1&&a===0||l===1&&a===1&&XA(i,lt)||l===1&&a===1&&XA(i,ct)&&s>100||l===1&&a>1&&XA(i,Os)?o=A[l]+(a>0?e[a-1]:"")+o:l===1&&a>0&&(o=e[a-1]+o),n=Math.floor(n/10)}return(s<0?t:"")+o},su="十百千萬",ru="拾佰仟萬",iu="マイナス",Uo="마이너스",Ns=function(s,A,e){var t=e?". ":"",r=e?"、":"",i=e?", ":"",n=e?" ":"";switch(A){case 0:return"•"+n;case 1:return"◦"+n;case 2:return"◾"+n;case 5:var o=PA(s,48,57,!0,t);return o.length<4?"0"+o:o;case 4:return Ut(s,"〇一二三四五六七八九",r);case 6:return Xt(s,1,3999,Au,3,t).toLowerCase();case 7:return Xt(s,1,3999,Au,3,t);case 8:return PA(s,945,969,!1,t);case 9:return PA(s,97,122,!1,t);case 10:return PA(s,65,90,!1,t);case 11:return PA(s,1632,1641,!0,t);case 12:case 49:return Xt(s,1,9999,eu,3,t);case 35:return Xt(s,1,9999,eu,3,t).toLowerCase();case 13:return PA(s,2534,2543,!0,t);case 14:case 30:return PA(s,6112,6121,!0,t);case 15:return Ut(s,"子丑寅卯辰巳午未申酉戌亥",r);case 16:return Ut(s,"甲乙丙丁戊己庚辛壬癸",r);case 17:case 48:return qe(s,"零一二三四五六七八九",su,"負",r,lt|ct|Os);case 47:return qe(s,"零壹貳參肆伍陸柒捌玖",ru,"負",r,$t|lt|ct|Os);case 42:return qe(s,"零一二三四五六七八九",su,"负",r,lt|ct|Os);case 41:return qe(s,"零壹贰叁肆伍陆柒捌玖",ru,"负",r,$t|lt|ct|Os);case 26:return qe(s,"〇一二三四五六七八九","十百千万",iu,r,0);case 25:return qe(s,"零壱弐参四伍六七八九","拾百千万",iu,r,$t|lt|ct);case 31:return qe(s,"영일이삼사오육칠팔구","십백천만",Uo,i,$t|lt|ct);case 33:return qe(s,"零一二三四五六七八九","十百千萬",Uo,i,0);case 32:return qe(s,"零壹貳參四五六七八九","拾百千",Uo,i,$t|lt|ct);case 18:return PA(s,2406,2415,!0,t);case 20:return Xt(s,1,19999,BC,3,t);case 21:return PA(s,2790,2799,!0,t);case 22:return PA(s,2662,2671,!0,t);case 22:return Xt(s,1,10999,dC,3,t);case 23:return Ut(s,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case 24:return Ut(s,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case 27:return PA(s,3302,3311,!0,t);case 28:return Ut(s,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",r);case 29:return Ut(s,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",r);case 34:return PA(s,3792,3801,!0,t);case 37:return PA(s,6160,6169,!0,t);case 38:return PA(s,4160,4169,!0,t);case 39:return PA(s,2918,2927,!0,t);case 40:return PA(s,1776,1785,!0,t);case 43:return PA(s,3046,3055,!0,t);case 44:return PA(s,3174,3183,!0,t);case 45:return PA(s,3664,3673,!0,t);case 46:return PA(s,3872,3881,!0,t);default:return PA(s,48,57,!0,t)}},nu="data-html2canvas-ignore",ou=(function(){function s(A,e,t){if(this.context=A,this.options=t,this.scrolledElements=[],this.referenceElement=e,this.counters=new fC,this.quoteDepth=0,!e.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(e.ownerDocument.documentElement,!1)}return s.prototype.toIFrame=function(A,e){var t=this,r=gC(A,e);if(!r.contentWindow)return Promise.reject("Unable to find iframe window");var i=A.defaultView.pageXOffset,n=A.defaultView.pageYOffset,o=r.contentWindow,a=o.document,l=mC(r).then(function(){return ae(t,void 0,void 0,function(){var c,u;return se(this,function(d){switch(d.label){case 0:return this.scrolledElements.forEach(QC),o&&(o.scrollTo(e.left,e.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(o.scrollY!==e.top||o.scrollX!==e.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(o.scrollX-e.left,o.scrollY-e.top,0,0))),c=this.options.onclone,u=this.clonedReferenceElement,typeof u>"u"?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:a.fonts&&a.fonts.ready?[4,a.fonts.ready]:[3,2];case 1:d.sent(),d.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,wC(a)]:[3,4];case 3:d.sent(),d.label=4;case 4:return typeof c=="function"?[2,Promise.resolve().then(function(){return c(a,u)}).then(function(){return r})]:[2,r]}})})});return a.open(),a.write(vC(document.doctype)+"<html></html>"),bC(this.referenceElement.ownerDocument,i,n),a.replaceChild(a.adoptNode(this.documentElement),a.documentElement),a.close(),l},s.prototype.createElementClone=function(A){if(oo(A,2))debugger;if($h(A))return this.createCanvasClone(A);if(Jh(A))return this.createVideoClone(A);if(Yh(A))return this.createStyleClone(A);var e=A.cloneNode(!1);return yo(e)&&(yo(A)&&A.currentSrc&&A.currentSrc!==A.src&&(e.src=A.currentSrc,e.srcset=""),e.loading==="lazy"&&(e.loading="eager")),jh(e)?this.createCustomElementClone(e):e},s.prototype.createCustomElementClone=function(A){var e=document.createElement("html2canvascustomelement");return Fo(A.style,e),e},s.prototype.createStyleClone=function(A){try{var e=A.sheet;if(e&&e.cssRules){var t=[].slice.call(e.cssRules,0).reduce(function(i,n){return n&&typeof n.cssText=="string"?i+n.cssText:i},""),r=A.cloneNode(!1);return r.textContent=t,r}}catch(i){if(this.context.logger.error("Unable to access cssRules property",i),i.name!=="SecurityError")throw i}return A.cloneNode(!1)},s.prototype.createCanvasClone=function(A){var e;if(this.options.inlineImages&&A.ownerDocument){var t=A.ownerDocument.createElement("img");try{return t.src=A.toDataURL(),t}catch{this.context.logger.info("Unable to inline canvas contents, canvas is tainted",A)}}var r=A.cloneNode(!1);try{r.width=A.width,r.height=A.height;var i=A.getContext("2d"),n=r.getContext("2d");if(n)if(!this.options.allowTaint&&i)n.putImageData(i.getImageData(0,0,A.width,A.height),0,0);else{var o=(e=A.getContext("webgl2"))!==null&&e!==void 0?e:A.getContext("webgl");if(o){var a=o.getContextAttributes();a?.preserveDrawingBuffer===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",A)}n.drawImage(A,0,0)}return r}catch{this.context.logger.info("Unable to clone canvas as it is tainted",A)}return r},s.prototype.createVideoClone=function(A){var e=A.ownerDocument.createElement("canvas");e.width=A.offsetWidth,e.height=A.offsetHeight;var t=e.getContext("2d");try{return t&&(t.drawImage(A,0,0,e.width,e.height),this.options.allowTaint||t.getImageData(0,0,e.width,e.height)),e}catch{this.context.logger.info("Unable to clone video as it is tainted",A)}var r=A.ownerDocument.createElement("canvas");return r.width=A.offsetWidth,r.height=A.offsetHeight,r},s.prototype.appendChildNode=function(A,e,t){(!Wt(e)||!uC(e)&&!e.hasAttribute(nu)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(e)))&&(!this.options.copyStyles||!Wt(e)||!Yh(e))&&A.appendChild(this.cloneNode(e,t))},s.prototype.cloneChildNodes=function(A,e,t){for(var r=this,i=A.shadowRoot?A.shadowRoot.firstChild:A.firstChild;i;i=i.nextSibling)if(Wt(i)&&qh(i)&&typeof i.assignedNodes=="function"){var n=i.assignedNodes();n.length&&n.forEach(function(o){return r.appendChildNode(e,o,t)})}else this.appendChildNode(e,i,t)},s.prototype.cloneNode=function(A,e){if(Wh(A))return document.createTextNode(A.data);if(!A.ownerDocument)return A.cloneNode(!1);var t=A.ownerDocument.defaultView;if(t&&Wt(A)&&(bo(A)||ci(A))){var r=this.createElementClone(A);r.style.transitionProperty="none";var i=t.getComputedStyle(A),n=t.getComputedStyle(A,":before"),o=t.getComputedStyle(A,":after");this.referenceElement===A&&bo(r)&&(this.clonedReferenceElement=r),Qo(r)&&FC(r);var a=this.counters.parse(new vh(this.context,i)),l=this.resolvePseudoContent(A,r,n,Ks.BEFORE);jh(A)&&(e=!0),Jh(A)||this.cloneChildNodes(A,r,e),l&&r.insertBefore(l,r.firstChild);var c=this.resolvePseudoContent(A,r,o,Ks.AFTER);return c&&r.appendChild(c),this.counters.pop(a),(i&&(this.options.copyStyles||ci(A))&&!Zh(A)||e)&&Fo(i,r),(A.scrollTop!==0||A.scrollLeft!==0)&&this.scrolledElements.push([r,A.scrollLeft,A.scrollTop]),(hi(A)||ui(A))&&(hi(r)||ui(r))&&(r.value=A.value),r}return A.cloneNode(!1)},s.prototype.resolvePseudoContent=function(A,e,t,r){var i=this;if(t){var n=t.content,o=e.ownerDocument;if(!(!o||!n||n==="none"||n==="-moz-alt-content"||t.display==="none")){this.counters.parse(new vh(this.context,t));var a=new am(this.context,t),l=o.createElement("html2canvaspseudoelement");Fo(t,l),a.content.forEach(function(u){if(u.type===0)l.appendChild(o.createTextNode(u.value));else if(u.type===22){var d=o.createElement("img");d.src=u.value,d.style.opacity="1",l.appendChild(d)}else if(u.type===18){if(u.name==="attr"){var g=u.values.filter(SA);g.length&&l.appendChild(o.createTextNode(A.getAttribute(g[0].value)||""))}else if(u.name==="counter"){var B=u.values.filter(Rt),f=B[0],p=B[1];if(f&&SA(f)){var m=i.counters.getCounterValue(f.value),w=p&&SA(p)?no.parse(i.context,p.value):3;l.appendChild(o.createTextNode(Ns(m,w,!1)))}}else if(u.name==="counters"){var v=u.values.filter(Rt),f=v[0],y=v[1],p=v[2];if(f&&SA(f)){var E=i.counters.getCounterValues(f.value),F=p&&SA(p)?no.parse(i.context,p.value):3,T=y&&y.type===0?y.value:"",M=E.map(function(z){return Ns(z,F,!1)}).join(T);l.appendChild(o.createTextNode(M))}}}else if(u.type===20)switch(u.value){case"open-quote":l.appendChild(o.createTextNode(Ch(a.quotes,i.quoteDepth++,!0)));break;case"close-quote":l.appendChild(o.createTextNode(Ch(a.quotes,--i.quoteDepth,!1)));break;default:l.appendChild(o.createTextNode(u.value))}}),l.className=Eo+" "+xo;var c=r===Ks.BEFORE?" "+Eo:" "+xo;return ci(e)?e.className.baseValue+=c:e.className+=c,l}}},s.destroy=function(A){return A.parentNode?(A.parentNode.removeChild(A),!0):!1},s})(),Ks;(function(s){s[s.BEFORE=0]="BEFORE",s[s.AFTER=1]="AFTER"})(Ks||(Ks={}));var gC=function(s,A){var e=s.createElement("iframe");return e.className="html2canvas-container",e.style.visibility="hidden",e.style.position="fixed",e.style.left="-10000px",e.style.top="0px",e.style.border="0",e.width=A.width.toString(),e.height=A.height.toString(),e.scrolling="no",e.setAttribute(nu,"true"),s.body.appendChild(e),e},pC=function(s){return new Promise(function(A){if(s.complete){A();return}if(!s.src){A();return}s.onload=A,s.onerror=A})},wC=function(s){return Promise.all([].slice.call(s.images,0).map(pC))},mC=function(s){return new Promise(function(A,e){var t=s.contentWindow;if(!t)return e("No window assigned for iframe");var r=t.document;t.onload=s.onload=function(){t.onload=s.onload=null;var i=setInterval(function(){r.body.childNodes.length>0&&r.readyState==="complete"&&(clearInterval(i),A(s))},50)}})},CC=["all","d","content"],Fo=function(s,A){for(var e=s.length-1;e>=0;e--){var t=s.item(e);CC.indexOf(t)===-1&&A.style.setProperty(t,s.getPropertyValue(t))}return A},vC=function(s){var A="";return s&&(A+="<!DOCTYPE ",s.name&&(A+=s.name),s.internalSubset&&(A+=s.internalSubset),s.publicId&&(A+='"'+s.publicId+'"'),s.systemId&&(A+='"'+s.systemId+'"'),A+=">"),A},bC=function(s,A,e){s&&s.defaultView&&(A!==s.defaultView.pageXOffset||e!==s.defaultView.pageYOffset)&&s.defaultView.scrollTo(A,e)},QC=function(s){var A=s[0],e=s[1],t=s[2];A.scrollLeft=e,A.scrollTop=t},yC=":before",UC=":after",Eo="___html2canvas___pseudoelement_before",xo="___html2canvas___pseudoelement_after",au=`{
|
|
7
|
+
content: "" !important;
|
|
8
|
+
display: none !important;
|
|
9
|
+
}`,FC=function(s){EC(s,"."+Eo+yC+au+`
|
|
10
|
+
.`+xo+UC+au)},EC=function(s,A){var e=s.ownerDocument;if(e){var t=e.createElement("style");t.textContent=A,s.appendChild(t)}},lu=(function(){function s(){}return s.getOrigin=function(A){var e=s._link;return e?(e.href=A,e.href=e.href,e.protocol+e.hostname+e.port):"about:blank"},s.isSameOrigin=function(A){return s.getOrigin(A)===s._origin},s.setContext=function(A){s._link=A.document.createElement("a"),s._origin=s.getOrigin(A.location.href)},s._origin="about:blank",s})(),xC=(function(){function s(A,e){this.context=A,this._options=e,this._cache={}}return s.prototype.addImage=function(A){var e=Promise.resolve();return this.has(A)||(Ho(A)||IC(A))&&(this._cache[A]=this.loadImage(A)).catch(function(){}),e},s.prototype.match=function(A){return this._cache[A]},s.prototype.loadImage=function(A){return ae(this,void 0,void 0,function(){var e,t,r,i,n=this;return se(this,function(o){switch(o.label){case 0:return e=lu.isSameOrigin(A),t=!So(A)&&this._options.useCORS===!0&&jA.SUPPORT_CORS_IMAGES&&!e,r=!So(A)&&!e&&!Ho(A)&&typeof this._options.proxy=="string"&&jA.SUPPORT_CORS_XHR&&!t,!e&&this._options.allowTaint===!1&&!So(A)&&!Ho(A)&&!r&&!t?[2]:(i=A,r?[4,this.proxy(i)]:[3,2]);case 1:i=o.sent(),o.label=2;case 2:return this.context.logger.debug("Added image "+A.substring(0,256)),[4,new Promise(function(a,l){var c=new Image;c.onload=function(){return a(c)},c.onerror=l,(TC(i)||t)&&(c.crossOrigin="anonymous"),c.src=i,c.complete===!0&&setTimeout(function(){return a(c)},500),n._options.imageTimeout>0&&setTimeout(function(){return l("Timed out ("+n._options.imageTimeout+"ms) loading image")},n._options.imageTimeout)})];case 3:return[2,o.sent()]}})})},s.prototype.has=function(A){return typeof this._cache[A]<"u"},s.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},s.prototype.proxy=function(A){var e=this,t=this._options.proxy;if(!t)throw new Error("No proxy defined");var r=A.substring(0,256);return new Promise(function(i,n){var o=jA.SUPPORT_RESPONSE_TYPE?"blob":"text",a=new XMLHttpRequest;a.onload=function(){if(a.status===200)if(o==="text")i(a.response);else{var u=new FileReader;u.addEventListener("load",function(){return i(u.result)},!1),u.addEventListener("error",function(d){return n(d)},!1),u.readAsDataURL(a.response)}else n("Failed to proxy resource "+r+" with status code "+a.status)},a.onerror=n;var l=t.indexOf("?")>-1?"&":"?";if(a.open("GET",""+t+l+"url="+encodeURIComponent(A)+"&responseType="+o),o!=="text"&&a instanceof XMLHttpRequest&&(a.responseType=o),e._options.imageTimeout){var c=e._options.imageTimeout;a.timeout=c,a.ontimeout=function(){return n("Timed out ("+c+"ms) proxying "+r)}}a.send()})},s})(),SC=/^data:image\/svg\+xml/i,HC=/^data:image\/.*;base64,/i,LC=/^data:image\/.*/i,IC=function(s){return jA.SUPPORT_SVG_DRAWING||!MC(s)},So=function(s){return LC.test(s)},TC=function(s){return HC.test(s)},Ho=function(s){return s.substr(0,4)==="blob"},MC=function(s){return s.substr(-3).toLowerCase()==="svg"||SC.test(s)},V=(function(){function s(A,e){this.type=0,this.x=A,this.y=e}return s.prototype.add=function(A,e){return new s(this.x+A,this.y+e)},s})(),Jt=function(s,A,e){return new V(s.x+(A.x-s.x)*e,s.y+(A.y-s.y)*e)},fi=(function(){function s(A,e,t,r){this.type=1,this.start=A,this.startControl=e,this.endControl=t,this.end=r}return s.prototype.subdivide=function(A,e){var t=Jt(this.start,this.startControl,A),r=Jt(this.startControl,this.endControl,A),i=Jt(this.endControl,this.end,A),n=Jt(t,r,A),o=Jt(r,i,A),a=Jt(n,o,A);return e?new s(this.start,t,n,a):new s(a,o,i,this.end)},s.prototype.add=function(A,e){return new s(this.start.add(A,e),this.startControl.add(A,e),this.endControl.add(A,e),this.end.add(A,e))},s.prototype.reverse=function(){return new s(this.end,this.endControl,this.startControl,this.start)},s})(),ye=function(s){return s.type===1},DC=(function(){function s(A){var e=A.styles,t=A.bounds,r=Ts(e.borderTopLeftRadius,t.width,t.height),i=r[0],n=r[1],o=Ts(e.borderTopRightRadius,t.width,t.height),a=o[0],l=o[1],c=Ts(e.borderBottomRightRadius,t.width,t.height),u=c[0],d=c[1],g=Ts(e.borderBottomLeftRadius,t.width,t.height),B=g[0],f=g[1],p=[];p.push((i+a)/t.width),p.push((B+u)/t.width),p.push((n+f)/t.height),p.push((l+d)/t.height);var m=Math.max.apply(Math,p);m>1&&(i/=m,n/=m,a/=m,l/=m,u/=m,d/=m,B/=m,f/=m);var w=t.width-a,v=t.height-d,y=t.width-u,E=t.height-f,F=e.borderTopWidth,T=e.borderRightWidth,M=e.borderBottomWidth,I=e.borderLeftWidth,cA=LA(e.paddingTop,A.bounds.width),z=LA(e.paddingRight,A.bounds.width),fA=LA(e.paddingBottom,A.bounds.width),W=LA(e.paddingLeft,A.bounds.width);this.topLeftBorderDoubleOuterBox=i>0||n>0?DA(t.left+I/3,t.top+F/3,i-I/3,n-F/3,xA.TOP_LEFT):new V(t.left+I/3,t.top+F/3),this.topRightBorderDoubleOuterBox=i>0||n>0?DA(t.left+w,t.top+F/3,a-T/3,l-F/3,xA.TOP_RIGHT):new V(t.left+t.width-T/3,t.top+F/3),this.bottomRightBorderDoubleOuterBox=u>0||d>0?DA(t.left+y,t.top+v,u-T/3,d-M/3,xA.BOTTOM_RIGHT):new V(t.left+t.width-T/3,t.top+t.height-M/3),this.bottomLeftBorderDoubleOuterBox=B>0||f>0?DA(t.left+I/3,t.top+E,B-I/3,f-M/3,xA.BOTTOM_LEFT):new V(t.left+I/3,t.top+t.height-M/3),this.topLeftBorderDoubleInnerBox=i>0||n>0?DA(t.left+I*2/3,t.top+F*2/3,i-I*2/3,n-F*2/3,xA.TOP_LEFT):new V(t.left+I*2/3,t.top+F*2/3),this.topRightBorderDoubleInnerBox=i>0||n>0?DA(t.left+w,t.top+F*2/3,a-T*2/3,l-F*2/3,xA.TOP_RIGHT):new V(t.left+t.width-T*2/3,t.top+F*2/3),this.bottomRightBorderDoubleInnerBox=u>0||d>0?DA(t.left+y,t.top+v,u-T*2/3,d-M*2/3,xA.BOTTOM_RIGHT):new V(t.left+t.width-T*2/3,t.top+t.height-M*2/3),this.bottomLeftBorderDoubleInnerBox=B>0||f>0?DA(t.left+I*2/3,t.top+E,B-I*2/3,f-M*2/3,xA.BOTTOM_LEFT):new V(t.left+I*2/3,t.top+t.height-M*2/3),this.topLeftBorderStroke=i>0||n>0?DA(t.left+I/2,t.top+F/2,i-I/2,n-F/2,xA.TOP_LEFT):new V(t.left+I/2,t.top+F/2),this.topRightBorderStroke=i>0||n>0?DA(t.left+w,t.top+F/2,a-T/2,l-F/2,xA.TOP_RIGHT):new V(t.left+t.width-T/2,t.top+F/2),this.bottomRightBorderStroke=u>0||d>0?DA(t.left+y,t.top+v,u-T/2,d-M/2,xA.BOTTOM_RIGHT):new V(t.left+t.width-T/2,t.top+t.height-M/2),this.bottomLeftBorderStroke=B>0||f>0?DA(t.left+I/2,t.top+E,B-I/2,f-M/2,xA.BOTTOM_LEFT):new V(t.left+I/2,t.top+t.height-M/2),this.topLeftBorderBox=i>0||n>0?DA(t.left,t.top,i,n,xA.TOP_LEFT):new V(t.left,t.top),this.topRightBorderBox=a>0||l>0?DA(t.left+w,t.top,a,l,xA.TOP_RIGHT):new V(t.left+t.width,t.top),this.bottomRightBorderBox=u>0||d>0?DA(t.left+y,t.top+v,u,d,xA.BOTTOM_RIGHT):new V(t.left+t.width,t.top+t.height),this.bottomLeftBorderBox=B>0||f>0?DA(t.left,t.top+E,B,f,xA.BOTTOM_LEFT):new V(t.left,t.top+t.height),this.topLeftPaddingBox=i>0||n>0?DA(t.left+I,t.top+F,Math.max(0,i-I),Math.max(0,n-F),xA.TOP_LEFT):new V(t.left+I,t.top+F),this.topRightPaddingBox=a>0||l>0?DA(t.left+Math.min(w,t.width-T),t.top+F,w>t.width+T?0:Math.max(0,a-T),Math.max(0,l-F),xA.TOP_RIGHT):new V(t.left+t.width-T,t.top+F),this.bottomRightPaddingBox=u>0||d>0?DA(t.left+Math.min(y,t.width-I),t.top+Math.min(v,t.height-M),Math.max(0,u-T),Math.max(0,d-M),xA.BOTTOM_RIGHT):new V(t.left+t.width-T,t.top+t.height-M),this.bottomLeftPaddingBox=B>0||f>0?DA(t.left+I,t.top+Math.min(E,t.height-M),Math.max(0,B-I),Math.max(0,f-M),xA.BOTTOM_LEFT):new V(t.left+I,t.top+t.height-M),this.topLeftContentBox=i>0||n>0?DA(t.left+I+W,t.top+F+cA,Math.max(0,i-(I+W)),Math.max(0,n-(F+cA)),xA.TOP_LEFT):new V(t.left+I+W,t.top+F+cA),this.topRightContentBox=a>0||l>0?DA(t.left+Math.min(w,t.width+I+W),t.top+F+cA,w>t.width+I+W?0:a-I+W,l-(F+cA),xA.TOP_RIGHT):new V(t.left+t.width-(T+z),t.top+F+cA),this.bottomRightContentBox=u>0||d>0?DA(t.left+Math.min(y,t.width-(I+W)),t.top+Math.min(v,t.height+F+cA),Math.max(0,u-(T+z)),d-(M+fA),xA.BOTTOM_RIGHT):new V(t.left+t.width-(T+z),t.top+t.height-(M+fA)),this.bottomLeftContentBox=B>0||f>0?DA(t.left+I+W,t.top+E,Math.max(0,B-(I+W)),f-(M+fA),xA.BOTTOM_LEFT):new V(t.left+I+W,t.top+t.height-(M+fA))}return s})(),xA;(function(s){s[s.TOP_LEFT=0]="TOP_LEFT",s[s.TOP_RIGHT=1]="TOP_RIGHT",s[s.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",s[s.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(xA||(xA={}));var DA=function(s,A,e,t,r){var i=4*((Math.sqrt(2)-1)/3),n=e*i,o=t*i,a=s+e,l=A+t;switch(r){case xA.TOP_LEFT:return new fi(new V(s,l),new V(s,l-o),new V(a-n,A),new V(a,A));case xA.TOP_RIGHT:return new fi(new V(s,A),new V(s+n,A),new V(a,l-o),new V(a,l));case xA.BOTTOM_RIGHT:return new fi(new V(a,A),new V(a,A+o),new V(s+n,l),new V(s,l));case xA.BOTTOM_LEFT:default:return new fi(new V(a,l),new V(a-n,l),new V(s,A+o),new V(s,A))}},di=function(s){return[s.topLeftBorderBox,s.topRightBorderBox,s.bottomRightBorderBox,s.bottomLeftBorderBox]},kC=function(s){return[s.topLeftContentBox,s.topRightContentBox,s.bottomRightContentBox,s.bottomLeftContentBox]},Bi=function(s){return[s.topLeftPaddingBox,s.topRightPaddingBox,s.bottomRightPaddingBox,s.bottomLeftPaddingBox]},_C=(function(){function s(A,e,t){this.offsetX=A,this.offsetY=e,this.matrix=t,this.type=0,this.target=6}return s})(),gi=(function(){function s(A,e){this.path=A,this.target=e,this.type=1}return s})(),OC=(function(){function s(A){this.opacity=A,this.type=2,this.target=6}return s})(),NC=function(s){return s.type===0},cu=function(s){return s.type===1},KC=function(s){return s.type===2},hu=function(s,A){return s.length===A.length?s.some(function(e,t){return e===A[t]}):!1},VC=function(s,A,e,t,r){return s.map(function(i,n){switch(n){case 0:return i.add(A,e);case 1:return i.add(A+t,e);case 2:return i.add(A+t,e+r);case 3:return i.add(A,e+r)}return i})},uu=(function(){function s(A){this.element=A,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return s})(),fu=(function(){function s(A,e){if(this.container=A,this.parent=e,this.effects=[],this.curves=new DC(this.container),this.container.styles.opacity<1&&this.effects.push(new OC(this.container.styles.opacity)),this.container.styles.transform!==null){var t=this.container.bounds.left+this.container.styles.transformOrigin[0].number,r=this.container.bounds.top+this.container.styles.transformOrigin[1].number,i=this.container.styles.transform;this.effects.push(new _C(t,r,i))}if(this.container.styles.overflowX!==0){var n=di(this.curves),o=Bi(this.curves);hu(n,o)?this.effects.push(new gi(n,6)):(this.effects.push(new gi(n,2)),this.effects.push(new gi(o,4)))}}return s.prototype.getEffects=function(A){for(var e=[2,3].indexOf(this.container.styles.position)===-1,t=this.parent,r=this.effects.slice(0);t;){var i=t.effects.filter(function(a){return!cu(a)});if(e||t.container.styles.position!==0||!t.parent){if(r.unshift.apply(r,i),e=[2,3].indexOf(t.container.styles.position)===-1,t.container.styles.overflowX!==0){var n=di(t.curves),o=Bi(t.curves);hu(n,o)||r.unshift(new gi(o,6))}}else r.unshift.apply(r,i);t=t.parent}return r.filter(function(a){return XA(a.target,A)})},s})(),Lo=function(s,A,e,t){s.container.elements.forEach(function(r){var i=XA(r.flags,4),n=XA(r.flags,2),o=new fu(r,s);XA(r.styles.display,2048)&&t.push(o);var a=XA(r.flags,8)?[]:t;if(i||n){var l=i||r.styles.isPositioned()?e:A,c=new uu(o);if(r.styles.isPositioned()||r.styles.opacity<1||r.styles.isTransformed()){var u=r.styles.zIndex.order;if(u<0){var d=0;l.negativeZIndex.some(function(B,f){return u>B.element.container.styles.zIndex.order?(d=f,!1):d>0}),l.negativeZIndex.splice(d,0,c)}else if(u>0){var g=0;l.positiveZIndex.some(function(B,f){return u>=B.element.container.styles.zIndex.order?(g=f+1,!1):g>0}),l.positiveZIndex.splice(g,0,c)}else l.zeroOrAutoZIndexOrTransformedOrOpacity.push(c)}else r.styles.isFloating()?l.nonPositionedFloats.push(c):l.nonPositionedInlineLevel.push(c);Lo(o,c,i?c:e,a)}else r.styles.isInlineLevel()?A.inlineLevel.push(o):A.nonInlineLevel.push(o),Lo(o,A,e,a);XA(r.flags,8)&&du(r,a)})},du=function(s,A){for(var e=s instanceof Co?s.start:1,t=s instanceof Co?s.reversed:!1,r=0;r<A.length;r++){var i=A[r];i.container instanceof Nh&&typeof i.container.value=="number"&&i.container.value!==0&&(e=i.container.value),i.listValue=Ns(e,i.container.styles.listStyleType,!0),e+=t?-1:1}},PC=function(s){var A=new fu(s,null),e=new uu(A),t=[];return Lo(A,e,e,t),du(A.container,t),e},Bu=function(s,A){switch(A){case 0:return Ue(s.topLeftBorderBox,s.topLeftPaddingBox,s.topRightBorderBox,s.topRightPaddingBox);case 1:return Ue(s.topRightBorderBox,s.topRightPaddingBox,s.bottomRightBorderBox,s.bottomRightPaddingBox);case 2:return Ue(s.bottomRightBorderBox,s.bottomRightPaddingBox,s.bottomLeftBorderBox,s.bottomLeftPaddingBox);default:return Ue(s.bottomLeftBorderBox,s.bottomLeftPaddingBox,s.topLeftBorderBox,s.topLeftPaddingBox)}},GC=function(s,A){switch(A){case 0:return Ue(s.topLeftBorderBox,s.topLeftBorderDoubleOuterBox,s.topRightBorderBox,s.topRightBorderDoubleOuterBox);case 1:return Ue(s.topRightBorderBox,s.topRightBorderDoubleOuterBox,s.bottomRightBorderBox,s.bottomRightBorderDoubleOuterBox);case 2:return Ue(s.bottomRightBorderBox,s.bottomRightBorderDoubleOuterBox,s.bottomLeftBorderBox,s.bottomLeftBorderDoubleOuterBox);default:return Ue(s.bottomLeftBorderBox,s.bottomLeftBorderDoubleOuterBox,s.topLeftBorderBox,s.topLeftBorderDoubleOuterBox)}},RC=function(s,A){switch(A){case 0:return Ue(s.topLeftBorderDoubleInnerBox,s.topLeftPaddingBox,s.topRightBorderDoubleInnerBox,s.topRightPaddingBox);case 1:return Ue(s.topRightBorderDoubleInnerBox,s.topRightPaddingBox,s.bottomRightBorderDoubleInnerBox,s.bottomRightPaddingBox);case 2:return Ue(s.bottomRightBorderDoubleInnerBox,s.bottomRightPaddingBox,s.bottomLeftBorderDoubleInnerBox,s.bottomLeftPaddingBox);default:return Ue(s.bottomLeftBorderDoubleInnerBox,s.bottomLeftPaddingBox,s.topLeftBorderDoubleInnerBox,s.topLeftPaddingBox)}},zC=function(s,A){switch(A){case 0:return pi(s.topLeftBorderStroke,s.topRightBorderStroke);case 1:return pi(s.topRightBorderStroke,s.bottomRightBorderStroke);case 2:return pi(s.bottomRightBorderStroke,s.bottomLeftBorderStroke);default:return pi(s.bottomLeftBorderStroke,s.topLeftBorderStroke)}},pi=function(s,A){var e=[];return ye(s)?e.push(s.subdivide(.5,!1)):e.push(s),ye(A)?e.push(A.subdivide(.5,!0)):e.push(A),e},Ue=function(s,A,e,t){var r=[];return ye(s)?r.push(s.subdivide(.5,!1)):r.push(s),ye(e)?r.push(e.subdivide(.5,!0)):r.push(e),ye(t)?r.push(t.subdivide(.5,!0).reverse()):r.push(t),ye(A)?r.push(A.subdivide(.5,!1).reverse()):r.push(A),r},gu=function(s){var A=s.bounds,e=s.styles;return A.add(e.borderLeftWidth,e.borderTopWidth,-(e.borderRightWidth+e.borderLeftWidth),-(e.borderTopWidth+e.borderBottomWidth))},wi=function(s){var A=s.styles,e=s.bounds,t=LA(A.paddingLeft,e.width),r=LA(A.paddingRight,e.width),i=LA(A.paddingTop,e.width),n=LA(A.paddingBottom,e.width);return e.add(t+A.borderLeftWidth,i+A.borderTopWidth,-(A.borderRightWidth+A.borderLeftWidth+t+r),-(A.borderTopWidth+A.borderBottomWidth+i+n))},WC=function(s,A){return s===0?A.bounds:s===2?wi(A):gu(A)},XC=function(s,A){return s===0?A.bounds:s===2?wi(A):gu(A)},Io=function(s,A,e){var t=WC(Yt(s.styles.backgroundOrigin,A),s),r=XC(Yt(s.styles.backgroundClip,A),s),i=$C(Yt(s.styles.backgroundSize,A),e,t),n=i[0],o=i[1],a=Ts(Yt(s.styles.backgroundPosition,A),t.width-n,t.height-o),l=JC(Yt(s.styles.backgroundRepeat,A),a,i,t,r),c=Math.round(t.left+a[0]),u=Math.round(t.top+a[1]);return[l,c,u,n,o]},Zt=function(s){return SA(s)&&s.value===zt.AUTO},mi=function(s){return typeof s=="number"},$C=function(s,A,e){var t=A[0],r=A[1],i=A[2],n=s[0],o=s[1];if(!n)return[0,0];if(zA(n)&&o&&zA(o))return[LA(n,e.width),LA(o,e.height)];var a=mi(i);if(SA(n)&&(n.value===zt.CONTAIN||n.value===zt.COVER)){if(mi(i)){var l=e.width/e.height;return l<i!=(n.value===zt.COVER)?[e.width,e.width/i]:[e.height*i,e.height]}return[e.width,e.height]}var c=mi(t),u=mi(r),d=c||u;if(Zt(n)&&(!o||Zt(o))){if(c&&u)return[t,r];if(!a&&!d)return[e.width,e.height];if(d&&a){var g=c?t:r*i,B=u?r:t/i;return[g,B]}var f=c?t:e.width,p=u?r:e.height;return[f,p]}if(a){var m=0,w=0;return zA(n)?m=LA(n,e.width):zA(o)&&(w=LA(o,e.height)),Zt(n)?m=w*i:(!o||Zt(o))&&(w=m/i),[m,w]}var v=null,y=null;if(zA(n)?v=LA(n,e.width):o&&zA(o)&&(y=LA(o,e.height)),v!==null&&(!o||Zt(o))&&(y=c&&u?v/t*r:e.height),y!==null&&Zt(n)&&(v=c&&u?y/r*t:e.width),v!==null&&y!==null)return[v,y];throw new Error("Unable to calculate background-size for element")},Yt=function(s,A){var e=s[A];return typeof e>"u"?s[0]:e},JC=function(s,A,e,t,r){var i=A[0],n=A[1],o=e[0],a=e[1];switch(s){case 2:return[new V(Math.round(t.left),Math.round(t.top+n)),new V(Math.round(t.left+t.width),Math.round(t.top+n)),new V(Math.round(t.left+t.width),Math.round(a+t.top+n)),new V(Math.round(t.left),Math.round(a+t.top+n))];case 3:return[new V(Math.round(t.left+i),Math.round(t.top)),new V(Math.round(t.left+i+o),Math.round(t.top)),new V(Math.round(t.left+i+o),Math.round(t.height+t.top)),new V(Math.round(t.left+i),Math.round(t.height+t.top))];case 1:return[new V(Math.round(t.left+i),Math.round(t.top+n)),new V(Math.round(t.left+i+o),Math.round(t.top+n)),new V(Math.round(t.left+i+o),Math.round(t.top+n+a)),new V(Math.round(t.left+i),Math.round(t.top+n+a))];default:return[new V(Math.round(r.left),Math.round(r.top)),new V(Math.round(r.left+r.width),Math.round(r.top)),new V(Math.round(r.left+r.width),Math.round(r.height+r.top)),new V(Math.round(r.left),Math.round(r.height+r.top))]}},ZC="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",pu="Hidden Text",YC=(function(){function s(A){this._data={},this._document=A}return s.prototype.parseMetrics=function(A,e){var t=this._document.createElement("div"),r=this._document.createElement("img"),i=this._document.createElement("span"),n=this._document.body;t.style.visibility="hidden",t.style.fontFamily=A,t.style.fontSize=e,t.style.margin="0",t.style.padding="0",t.style.whiteSpace="nowrap",n.appendChild(t),r.src=ZC,r.width=1,r.height=1,r.style.margin="0",r.style.padding="0",r.style.verticalAlign="baseline",i.style.fontFamily=A,i.style.fontSize=e,i.style.margin="0",i.style.padding="0",i.appendChild(this._document.createTextNode(pu)),t.appendChild(i),t.appendChild(r);var o=r.offsetTop-i.offsetTop+2;t.removeChild(i),t.appendChild(this._document.createTextNode(pu)),t.style.lineHeight="normal",r.style.verticalAlign="super";var a=r.offsetTop-t.offsetTop+2;return n.removeChild(t),{baseline:o,middle:a}},s.prototype.getMetrics=function(A,e){var t=A+" "+e;return typeof this._data[t]>"u"&&(this._data[t]=this.parseMetrics(A,e)),this._data[t]},s})(),wu=(function(){function s(A,e){this.context=A,this.options=e}return s})(),qC=1e4,jC=(function(s){Le(A,s);function A(e,t){var r=s.call(this,e,t)||this;return r._activeEffects=[],r.canvas=t.canvas?t.canvas:document.createElement("canvas"),r.ctx=r.canvas.getContext("2d"),t.canvas||(r.canvas.width=Math.floor(t.width*t.scale),r.canvas.height=Math.floor(t.height*t.scale),r.canvas.style.width=t.width+"px",r.canvas.style.height=t.height+"px"),r.fontMetrics=new YC(document),r.ctx.scale(r.options.scale,r.options.scale),r.ctx.translate(-t.x,-t.y),r.ctx.textBaseline="bottom",r._activeEffects=[],r.context.logger.debug("Canvas renderer initialized ("+t.width+"x"+t.height+") with scale "+t.scale),r}return A.prototype.applyEffects=function(e){for(var t=this;this._activeEffects.length;)this.popEffect();e.forEach(function(r){return t.applyEffect(r)})},A.prototype.applyEffect=function(e){this.ctx.save(),KC(e)&&(this.ctx.globalAlpha=e.opacity),NC(e)&&(this.ctx.translate(e.offsetX,e.offsetY),this.ctx.transform(e.matrix[0],e.matrix[1],e.matrix[2],e.matrix[3],e.matrix[4],e.matrix[5]),this.ctx.translate(-e.offsetX,-e.offsetY)),cu(e)&&(this.path(e.path),this.ctx.clip()),this._activeEffects.push(e)},A.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},A.prototype.renderStack=function(e){return ae(this,void 0,void 0,function(){var t;return se(this,function(r){switch(r.label){case 0:return t=e.element.container.styles,t.isVisible()?[4,this.renderStackContent(e)]:[3,2];case 1:r.sent(),r.label=2;case 2:return[2]}})})},A.prototype.renderNode=function(e){return ae(this,void 0,void 0,function(){return se(this,function(t){switch(t.label){case 0:if(XA(e.container.flags,16))debugger;return e.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(e)]:[3,3];case 1:return t.sent(),[4,this.renderNodeContent(e)];case 2:t.sent(),t.label=3;case 3:return[2]}})})},A.prototype.renderTextWithLetterSpacing=function(e,t,r){var i=this;if(t===0)this.ctx.fillText(e.text,e.bounds.left,e.bounds.top+r);else{var n=mo(e.text);n.reduce(function(o,a){return i.ctx.fillText(a,o,e.bounds.top+r),o+i.ctx.measureText(a).width},e.bounds.left)}},A.prototype.createFontStyle=function(e){var t=e.fontVariant.filter(function(n){return n==="normal"||n==="small-caps"}).join(""),r=rv(e.fontFamily).join(", "),i=Is(e.fontSize)?""+e.fontSize.number+e.fontSize.unit:e.fontSize.number+"px";return[[e.fontStyle,t,e.fontWeight,i,r].join(" "),r,i]},A.prototype.renderTextNode=function(e,t){return ae(this,void 0,void 0,function(){var r,i,n,o,a,l,c,u,d=this;return se(this,function(g){return r=this.createFontStyle(t),i=r[0],n=r[1],o=r[2],this.ctx.font=i,this.ctx.direction=t.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",a=this.fontMetrics.getMetrics(n,o),l=a.baseline,c=a.middle,u=t.paintOrder,e.textBounds.forEach(function(B){u.forEach(function(f){switch(f){case 0:d.ctx.fillStyle=$A(t.color),d.renderTextWithLetterSpacing(B,t.letterSpacing,l);var p=t.textShadow;p.length&&B.text.trim().length&&(p.slice(0).reverse().forEach(function(m){d.ctx.shadowColor=$A(m.color),d.ctx.shadowOffsetX=m.offsetX.number*d.options.scale,d.ctx.shadowOffsetY=m.offsetY.number*d.options.scale,d.ctx.shadowBlur=m.blur.number,d.renderTextWithLetterSpacing(B,t.letterSpacing,l)}),d.ctx.shadowColor="",d.ctx.shadowOffsetX=0,d.ctx.shadowOffsetY=0,d.ctx.shadowBlur=0),t.textDecorationLine.length&&(d.ctx.fillStyle=$A(t.textDecorationColor||t.color),t.textDecorationLine.forEach(function(m){switch(m){case 1:d.ctx.fillRect(B.bounds.left,Math.round(B.bounds.top+l),B.bounds.width,1);break;case 2:d.ctx.fillRect(B.bounds.left,Math.round(B.bounds.top),B.bounds.width,1);break;case 3:d.ctx.fillRect(B.bounds.left,Math.ceil(B.bounds.top+c),B.bounds.width,1);break}}));break;case 1:t.webkitTextStrokeWidth&&B.text.trim().length&&(d.ctx.strokeStyle=$A(t.webkitTextStrokeColor),d.ctx.lineWidth=t.webkitTextStrokeWidth,d.ctx.lineJoin=window.chrome?"miter":"round",d.ctx.strokeText(B.text,B.bounds.left,B.bounds.top+l)),d.ctx.strokeStyle="",d.ctx.lineWidth=0,d.ctx.lineJoin="miter";break}})}),[2]})})},A.prototype.renderReplacedElement=function(e,t,r){if(r&&e.intrinsicWidth>0&&e.intrinsicHeight>0){var i=wi(e),n=Bi(t);this.path(n),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(r,0,0,e.intrinsicWidth,e.intrinsicHeight,i.left,i.top,i.width,i.height),this.ctx.restore()}},A.prototype.renderNodeContent=function(e){return ae(this,void 0,void 0,function(){var t,r,i,n,o,a,w,w,l,c,u,d,y,g,B,E,f,p,m,w,v,y,E;return se(this,function(F){switch(F.label){case 0:this.applyEffects(e.getEffects(4)),t=e.container,r=e.curves,i=t.styles,n=0,o=t.textNodes,F.label=1;case 1:return n<o.length?(a=o[n],[4,this.renderTextNode(a,i)]):[3,4];case 2:F.sent(),F.label=3;case 3:return n++,[3,1];case 4:if(!(t instanceof kh))return[3,8];F.label=5;case 5:return F.trys.push([5,7,,8]),[4,this.context.cache.match(t.src)];case 6:return w=F.sent(),this.renderReplacedElement(t,r,w),[3,8];case 7:return F.sent(),this.context.logger.error("Error loading image "+t.src),[3,8];case 8:if(t instanceof _h&&this.renderReplacedElement(t,r,t.canvas),!(t instanceof Oh))return[3,12];F.label=9;case 9:return F.trys.push([9,11,,12]),[4,this.context.cache.match(t.svg)];case 10:return w=F.sent(),this.renderReplacedElement(t,r,w),[3,12];case 11:return F.sent(),this.context.logger.error("Error loading svg "+t.svg.substring(0,255)),[3,12];case 12:return t instanceof Gh&&t.tree?(l=new A(this.context,{scale:this.options.scale,backgroundColor:t.backgroundColor,x:0,y:0,width:t.width,height:t.height}),[4,l.render(t.tree)]):[3,14];case 13:c=F.sent(),t.width&&t.height&&this.ctx.drawImage(c,0,0,t.width,t.height,t.bounds.left,t.bounds.top,t.bounds.width,t.bounds.height),F.label=14;case 14:if(t instanceof vo&&(u=Math.min(t.bounds.width,t.bounds.height),t.type===oi?t.checked&&(this.ctx.save(),this.path([new V(t.bounds.left+u*.39363,t.bounds.top+u*.79),new V(t.bounds.left+u*.16,t.bounds.top+u*.5549),new V(t.bounds.left+u*.27347,t.bounds.top+u*.44071),new V(t.bounds.left+u*.39694,t.bounds.top+u*.5649),new V(t.bounds.left+u*.72983,t.bounds.top+u*.23),new V(t.bounds.left+u*.84,t.bounds.top+u*.34085),new V(t.bounds.left+u*.39363,t.bounds.top+u*.79)]),this.ctx.fillStyle=$A(Kh),this.ctx.fill(),this.ctx.restore()):t.type===ai&&t.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(t.bounds.left+u/2,t.bounds.top+u/2,u/4,0,Math.PI*2,!0),this.ctx.fillStyle=$A(Kh),this.ctx.fill(),this.ctx.restore())),Av(t)&&t.value.length){switch(d=this.createFontStyle(i),y=d[0],g=d[1],B=this.fontMetrics.getMetrics(y,g).baseline,this.ctx.font=y,this.ctx.fillStyle=$A(i.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=tv(t.styles.textAlign),E=wi(t),f=0,t.styles.textAlign){case 1:f+=E.width/2;break;case 2:f+=E.width;break}p=E.add(f,0,0,-E.height/2+1),this.ctx.save(),this.path([new V(E.left,E.top),new V(E.left+E.width,E.top),new V(E.left+E.width,E.top+E.height),new V(E.left,E.top+E.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new _s(t.value,p),i.letterSpacing,B),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!XA(t.styles.display,2048))return[3,20];if(t.styles.listStyleImage===null)return[3,19];if(m=t.styles.listStyleImage,m.type!==0)return[3,18];w=void 0,v=m.url,F.label=15;case 15:return F.trys.push([15,17,,18]),[4,this.context.cache.match(v)];case 16:return w=F.sent(),this.ctx.drawImage(w,t.bounds.left-(w.width+10),t.bounds.top),[3,18];case 17:return F.sent(),this.context.logger.error("Error loading list-style-image "+v),[3,18];case 18:return[3,20];case 19:e.listValue&&t.styles.listStyleType!==-1&&(y=this.createFontStyle(i)[0],this.ctx.font=y,this.ctx.fillStyle=$A(i.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",E=new Je(t.bounds.left,t.bounds.top+LA(t.styles.paddingTop,t.bounds.width),t.bounds.width,ph(i.lineHeight,i.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new _s(e.listValue,E),i.letterSpacing,ph(i.lineHeight,i.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),F.label=20;case 20:return[2]}})})},A.prototype.renderStackContent=function(e){return ae(this,void 0,void 0,function(){var t,r,m,i,n,m,o,a,m,l,c,m,u,d,m,g,B,m,f,p,m;return se(this,function(w){switch(w.label){case 0:if(XA(e.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(e.element)];case 1:w.sent(),t=0,r=e.negativeZIndex,w.label=2;case 2:return t<r.length?(m=r[t],[4,this.renderStack(m)]):[3,5];case 3:w.sent(),w.label=4;case 4:return t++,[3,2];case 5:return[4,this.renderNodeContent(e.element)];case 6:w.sent(),i=0,n=e.nonInlineLevel,w.label=7;case 7:return i<n.length?(m=n[i],[4,this.renderNode(m)]):[3,10];case 8:w.sent(),w.label=9;case 9:return i++,[3,7];case 10:o=0,a=e.nonPositionedFloats,w.label=11;case 11:return o<a.length?(m=a[o],[4,this.renderStack(m)]):[3,14];case 12:w.sent(),w.label=13;case 13:return o++,[3,11];case 14:l=0,c=e.nonPositionedInlineLevel,w.label=15;case 15:return l<c.length?(m=c[l],[4,this.renderStack(m)]):[3,18];case 16:w.sent(),w.label=17;case 17:return l++,[3,15];case 18:u=0,d=e.inlineLevel,w.label=19;case 19:return u<d.length?(m=d[u],[4,this.renderNode(m)]):[3,22];case 20:w.sent(),w.label=21;case 21:return u++,[3,19];case 22:g=0,B=e.zeroOrAutoZIndexOrTransformedOrOpacity,w.label=23;case 23:return g<B.length?(m=B[g],[4,this.renderStack(m)]):[3,26];case 24:w.sent(),w.label=25;case 25:return g++,[3,23];case 26:f=0,p=e.positiveZIndex,w.label=27;case 27:return f<p.length?(m=p[f],[4,this.renderStack(m)]):[3,30];case 28:w.sent(),w.label=29;case 29:return f++,[3,27];case 30:return[2]}})})},A.prototype.mask=function(e){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(e.slice(0).reverse()),this.ctx.closePath()},A.prototype.path=function(e){this.ctx.beginPath(),this.formatPath(e),this.ctx.closePath()},A.prototype.formatPath=function(e){var t=this;e.forEach(function(r,i){var n=ye(r)?r.start:r;i===0?t.ctx.moveTo(n.x,n.y):t.ctx.lineTo(n.x,n.y),ye(r)&&t.ctx.bezierCurveTo(r.startControl.x,r.startControl.y,r.endControl.x,r.endControl.y,r.end.x,r.end.y)})},A.prototype.renderRepeat=function(e,t,r,i){this.path(e),this.ctx.fillStyle=t,this.ctx.translate(r,i),this.ctx.fill(),this.ctx.translate(-r,-i)},A.prototype.resizeImage=function(e,t,r){var i;if(e.width===t&&e.height===r)return e;var n=(i=this.canvas.ownerDocument)!==null&&i!==void 0?i:document,o=n.createElement("canvas");o.width=Math.max(1,t),o.height=Math.max(1,r);var a=o.getContext("2d");return a.drawImage(e,0,0,e.width,e.height,0,0,t,r),o},A.prototype.renderBackgroundImage=function(e){return ae(this,void 0,void 0,function(){var t,r,i,n,o,a;return se(this,function(l){switch(l.label){case 0:t=e.styles.backgroundImage.length-1,r=function(c){var u,d,g,cA,H,X,W,nA,M,B,cA,H,X,W,nA,f,p,m,w,v,y,E,F,T,M,I,cA,z,fA,W,nA,j,H,X,sA,UA,yA,FA,AA,eA,wA,dA;return se(this,function(WA){switch(WA.label){case 0:if(c.type!==0)return[3,5];u=void 0,d=c.url,WA.label=1;case 1:return WA.trys.push([1,3,,4]),[4,i.context.cache.match(d)];case 2:return u=WA.sent(),[3,4];case 3:return WA.sent(),i.context.logger.error("Error loading background-image "+d),[3,4];case 4:return u&&(g=Io(e,t,[u.width,u.height,u.width/u.height]),cA=g[0],H=g[1],X=g[2],W=g[3],nA=g[4],M=i.ctx.createPattern(i.resizeImage(u,W,nA),"repeat"),i.renderRepeat(cA,M,H,X)),[3,6];case 5:Nw(c)?(B=Io(e,t,[null,null,null]),cA=B[0],H=B[1],X=B[2],W=B[3],nA=B[4],f=Mw(c.angle,W,nA),p=f[0],m=f[1],w=f[2],v=f[3],y=f[4],E=document.createElement("canvas"),E.width=W,E.height=nA,F=E.getContext("2d"),T=F.createLinearGradient(m,v,w,y),nh(c.stops,p).forEach(function(HA){return T.addColorStop(HA.stop,$A(HA.color))}),F.fillStyle=T,F.fillRect(0,0,W,nA),W>0&&nA>0&&(M=i.ctx.createPattern(E,"repeat"),i.renderRepeat(cA,M,H,X))):Kw(c)&&(I=Io(e,t,[null,null,null]),cA=I[0],z=I[1],fA=I[2],W=I[3],nA=I[4],j=c.position.length===0?[so]:c.position,H=LA(j[0],W),X=LA(j[j.length-1],nA),sA=Dw(c,H,X,W,nA),UA=sA[0],yA=sA[1],UA>0&&yA>0&&(FA=i.ctx.createRadialGradient(z+H,fA+X,0,z+H,fA+X,UA),nh(c.stops,UA*2).forEach(function(HA){return FA.addColorStop(HA.stop,$A(HA.color))}),i.path(cA),i.ctx.fillStyle=FA,UA!==yA?(AA=e.bounds.left+.5*e.bounds.width,eA=e.bounds.top+.5*e.bounds.height,wA=yA/UA,dA=1/wA,i.ctx.save(),i.ctx.translate(AA,eA),i.ctx.transform(1,0,0,wA,0,0),i.ctx.translate(-AA,-eA),i.ctx.fillRect(z,dA*(fA-eA)+eA,W,nA*dA),i.ctx.restore()):i.ctx.fill())),WA.label=6;case 6:return t--,[2]}})},i=this,n=0,o=e.styles.backgroundImage.slice(0).reverse(),l.label=1;case 1:return n<o.length?(a=o[n],[5,r(a)]):[3,4];case 2:l.sent(),l.label=3;case 3:return n++,[3,1];case 4:return[2]}})})},A.prototype.renderSolidBorder=function(e,t,r){return ae(this,void 0,void 0,function(){return se(this,function(i){return this.path(Bu(r,t)),this.ctx.fillStyle=$A(e),this.ctx.fill(),[2]})})},A.prototype.renderDoubleBorder=function(e,t,r,i){return ae(this,void 0,void 0,function(){var n,o;return se(this,function(a){switch(a.label){case 0:return t<3?[4,this.renderSolidBorder(e,r,i)]:[3,2];case 1:return a.sent(),[2];case 2:return n=GC(i,r),this.path(n),this.ctx.fillStyle=$A(e),this.ctx.fill(),o=RC(i,r),this.path(o),this.ctx.fill(),[2]}})})},A.prototype.renderNodeBackgroundAndBorders=function(e){return ae(this,void 0,void 0,function(){var t,r,i,n,o,a,l,c,u=this;return se(this,function(d){switch(d.label){case 0:return this.applyEffects(e.getEffects(2)),t=e.container.styles,r=!ot(t.backgroundColor)||t.backgroundImage.length,i=[{style:t.borderTopStyle,color:t.borderTopColor,width:t.borderTopWidth},{style:t.borderRightStyle,color:t.borderRightColor,width:t.borderRightWidth},{style:t.borderBottomStyle,color:t.borderBottomColor,width:t.borderBottomWidth},{style:t.borderLeftStyle,color:t.borderLeftColor,width:t.borderLeftWidth}],n=ev(Yt(t.backgroundClip,0),e.curves),r||t.boxShadow.length?(this.ctx.save(),this.path(n),this.ctx.clip(),ot(t.backgroundColor)||(this.ctx.fillStyle=$A(t.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(e.container)]):[3,2];case 1:d.sent(),this.ctx.restore(),t.boxShadow.slice(0).reverse().forEach(function(g){u.ctx.save();var B=di(e.curves),f=g.inset?0:qC,p=VC(B,-f+(g.inset?1:-1)*g.spread.number,(g.inset?1:-1)*g.spread.number,g.spread.number*(g.inset?-2:2),g.spread.number*(g.inset?-2:2));g.inset?(u.path(B),u.ctx.clip(),u.mask(p)):(u.mask(B),u.ctx.clip(),u.path(p)),u.ctx.shadowOffsetX=g.offsetX.number+f,u.ctx.shadowOffsetY=g.offsetY.number,u.ctx.shadowColor=$A(g.color),u.ctx.shadowBlur=g.blur.number,u.ctx.fillStyle=g.inset?$A(g.color):"rgba(0,0,0,1)",u.ctx.fill(),u.ctx.restore()}),d.label=2;case 2:o=0,a=0,l=i,d.label=3;case 3:return a<l.length?(c=l[a],c.style!==0&&!ot(c.color)&&c.width>0?c.style!==2?[3,5]:[4,this.renderDashedDottedBorder(c.color,c.width,o,e.curves,2)]:[3,11]):[3,13];case 4:return d.sent(),[3,11];case 5:return c.style!==3?[3,7]:[4,this.renderDashedDottedBorder(c.color,c.width,o,e.curves,3)];case 6:return d.sent(),[3,11];case 7:return c.style!==4?[3,9]:[4,this.renderDoubleBorder(c.color,c.width,o,e.curves)];case 8:return d.sent(),[3,11];case 9:return[4,this.renderSolidBorder(c.color,o,e.curves)];case 10:d.sent(),d.label=11;case 11:o++,d.label=12;case 12:return a++,[3,3];case 13:return[2]}})})},A.prototype.renderDashedDottedBorder=function(e,t,r,i,n){return ae(this,void 0,void 0,function(){var o,a,l,c,u,d,g,B,f,p,m,w,v,y,E,F,E,F;return se(this,function(T){return this.ctx.save(),o=zC(i,r),a=Bu(i,r),n===2&&(this.path(a),this.ctx.clip()),ye(a[0])?(l=a[0].start.x,c=a[0].start.y):(l=a[0].x,c=a[0].y),ye(a[1])?(u=a[1].end.x,d=a[1].end.y):(u=a[1].x,d=a[1].y),r===0||r===2?g=Math.abs(l-u):g=Math.abs(c-d),this.ctx.beginPath(),n===3?this.formatPath(o):this.formatPath(a.slice(0,2)),B=t<3?t*3:t*2,f=t<3?t*2:t,n===3&&(B=t,f=t),p=!0,g<=B*2?p=!1:g<=B*2+f?(m=g/(2*B+f),B*=m,f*=m):(w=Math.floor((g+f)/(B+f)),v=(g-w*B)/(w-1),y=(g-(w+1)*B)/w,f=y<=0||Math.abs(f-v)<Math.abs(f-y)?v:y),p&&(n===3?this.ctx.setLineDash([0,B+f]):this.ctx.setLineDash([B,f])),n===3?(this.ctx.lineCap="round",this.ctx.lineWidth=t):this.ctx.lineWidth=t*2+1.1,this.ctx.strokeStyle=$A(e),this.ctx.stroke(),this.ctx.setLineDash([]),n===2&&(ye(a[0])&&(E=a[3],F=a[0],this.ctx.beginPath(),this.formatPath([new V(E.end.x,E.end.y),new V(F.start.x,F.start.y)]),this.ctx.stroke()),ye(a[1])&&(E=a[1],F=a[2],this.ctx.beginPath(),this.formatPath([new V(E.end.x,E.end.y),new V(F.start.x,F.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},A.prototype.render=function(e){return ae(this,void 0,void 0,function(){var t;return se(this,function(r){switch(r.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=$A(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),t=PC(e),[4,this.renderStack(t)];case 1:return r.sent(),this.applyEffects([]),[2,this.canvas]}})})},A})(wu),Av=function(s){return s instanceof Ph||s instanceof Vh?!0:s instanceof vo&&s.type!==ai&&s.type!==oi},ev=function(s,A){switch(s){case 0:return di(A);case 2:return kC(A);default:return Bi(A)}},tv=function(s){switch(s){case 1:return"center";case 2:return"right";default:return"left"}},sv=["-apple-system","system-ui"],rv=function(s){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?s.filter(function(A){return sv.indexOf(A)===-1}):s},iv=(function(s){Le(A,s);function A(e,t){var r=s.call(this,e,t)||this;return r.canvas=t.canvas?t.canvas:document.createElement("canvas"),r.ctx=r.canvas.getContext("2d"),r.options=t,r.canvas.width=Math.floor(t.width*t.scale),r.canvas.height=Math.floor(t.height*t.scale),r.canvas.style.width=t.width+"px",r.canvas.style.height=t.height+"px",r.ctx.scale(r.options.scale,r.options.scale),r.ctx.translate(-t.x,-t.y),r.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+t.width+"x"+t.height+" at "+t.x+","+t.y+") with scale "+t.scale),r}return A.prototype.render=function(e){return ae(this,void 0,void 0,function(){var t,r;return se(this,function(i){switch(i.label){case 0:return t=wo(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,e),[4,nv(t)];case 1:return r=i.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=$A(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(r,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},A})(wu),nv=function(s){return new Promise(function(A,e){var t=new Image;t.onload=function(){A(t)},t.onerror=e,t.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(s))})},ov=(function(){function s(A){var e=A.id,t=A.enabled;this.id=e,this.enabled=t,this.start=Date.now()}return s.prototype.debug=function(){for(var A=[],e=0;e<arguments.length;e++)A[e]=arguments[e];this.enabled&&(typeof window<"u"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,Er([this.id,this.getTime()+"ms"],A)):this.info.apply(this,A))},s.prototype.getTime=function(){return Date.now()-this.start},s.prototype.info=function(){for(var A=[],e=0;e<arguments.length;e++)A[e]=arguments[e];this.enabled&&typeof window<"u"&&window.console&&typeof console.info=="function"&&console.info.apply(console,Er([this.id,this.getTime()+"ms"],A))},s.prototype.warn=function(){for(var A=[],e=0;e<arguments.length;e++)A[e]=arguments[e];this.enabled&&(typeof window<"u"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,Er([this.id,this.getTime()+"ms"],A)):this.info.apply(this,A))},s.prototype.error=function(){for(var A=[],e=0;e<arguments.length;e++)A[e]=arguments[e];this.enabled&&(typeof window<"u"&&window.console&&typeof console.error=="function"?console.error.apply(console,Er([this.id,this.getTime()+"ms"],A)):this.info.apply(this,A))},s.instances={},s})(),av=(function(){function s(A,e){var t;this.windowBounds=e,this.instanceName="#"+s.instanceCount++,this.logger=new ov({id:this.instanceName,enabled:A.logging}),this.cache=(t=A.cache)!==null&&t!==void 0?t:new xC(this,A)}return s.instanceCount=1,s})(),lv=function(s,A){return A===void 0&&(A={}),cv(s,A)};typeof window<"u"&&lu.setContext(window);var cv=function(s,A){return ae(void 0,void 0,void 0,function(){var e,t,r,i,n,o,a,l,c,u,d,g,B,f,p,m,w,v,y,E,T,F,T,M,I,cA,z,fA,W,nA,j,H,X,sA,UA,yA,FA,AA,eA,wA;return se(this,function(dA){switch(dA.label){case 0:if(!s||typeof s!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(e=s.ownerDocument,!e)throw new Error("Element is not attached to a Document");if(t=e.defaultView,!t)throw new Error("Document is not attached to a Window");return r={allowTaint:(M=A.allowTaint)!==null&&M!==void 0?M:!1,imageTimeout:(I=A.imageTimeout)!==null&&I!==void 0?I:15e3,proxy:A.proxy,useCORS:(cA=A.useCORS)!==null&&cA!==void 0?cA:!1},i=kn({logging:(z=A.logging)!==null&&z!==void 0?z:!0,cache:A.cache},r),n={windowWidth:(fA=A.windowWidth)!==null&&fA!==void 0?fA:t.innerWidth,windowHeight:(W=A.windowHeight)!==null&&W!==void 0?W:t.innerHeight,scrollX:(nA=A.scrollX)!==null&&nA!==void 0?nA:t.pageXOffset,scrollY:(j=A.scrollY)!==null&&j!==void 0?j:t.pageYOffset},o=new Je(n.scrollX,n.scrollY,n.windowWidth,n.windowHeight),a=new av(i,o),l=(H=A.foreignObjectRendering)!==null&&H!==void 0?H:!1,c={allowTaint:(X=A.allowTaint)!==null&&X!==void 0?X:!1,onclone:A.onclone,ignoreElements:A.ignoreElements,inlineImages:l,copyStyles:l},a.logger.debug("Starting document clone with size "+o.width+"x"+o.height+" scrolled to "+-o.left+","+-o.top),u=new ou(a,s,c),d=u.clonedReferenceElement,d?[4,u.toIFrame(e,o)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return g=dA.sent(),B=Qo(d)||hC(d)?Vg(d.ownerDocument):xr(a,d),f=B.width,p=B.height,m=B.left,w=B.top,v=hv(a,d,A.backgroundColor),y={canvas:A.canvas,backgroundColor:v,scale:(UA=(sA=A.scale)!==null&&sA!==void 0?sA:t.devicePixelRatio)!==null&&UA!==void 0?UA:1,x:((yA=A.x)!==null&&yA!==void 0?yA:0)+m,y:((FA=A.y)!==null&&FA!==void 0?FA:0)+w,width:(AA=A.width)!==null&&AA!==void 0?AA:Math.ceil(f),height:(eA=A.height)!==null&&eA!==void 0?eA:Math.ceil(p)},l?(a.logger.debug("Document cloned, using foreign object rendering"),T=new iv(a,y),[4,T.render(d)]):[3,3];case 2:return E=dA.sent(),[3,5];case 3:return a.logger.debug("Document cloned, element located at "+m+","+w+" with size "+f+"x"+p+" using computed rendering"),a.logger.debug("Starting DOM parsing"),F=zh(a,d),v===F.styles.backgroundColor&&(F.styles.backgroundColor=Ye.TRANSPARENT),a.logger.debug("Starting renderer for element at "+y.x+","+y.y+" with size "+y.width+"x"+y.height),T=new jC(a,y),[4,T.render(F)];case 4:E=dA.sent(),dA.label=5;case 5:return(!((wA=A.removeContainer)!==null&&wA!==void 0)||wA)&&(ou.destroy(g)||a.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),a.logger.debug("Finished rendering"),[2,E]}})})},hv=function(s,A,e){var t=A.ownerDocument,r=t.documentElement?Ms(s,getComputedStyle(t.documentElement).backgroundColor):Ye.TRANSPARENT,i=t.body?Ms(s,getComputedStyle(t.body).backgroundColor):Ye.TRANSPARENT,n=typeof e=="string"?Ms(s,e):e===null?Ye.TRANSPARENT:4294967295;return A===t.documentElement?ot(r)?ot(i)?n:i:r:n};const uv={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},fv={M1:3,M5:7,M15:14,M30:30,H1:90,H4:180,D1:1095,W1:1825,MN:3650};function mu(s){if(!s)return 7;const A=String(s).toUpperCase();return fv[A]??7}function dv(s,A){const e=String(s||"").toUpperCase(),t=A||mu(s),r={M1:1440,M5:288,M15:96,M30:48,H1:24,H4:6,D1:1,W1:1/7,MN:1/30}[e]||96,i=Math.ceil(t*(typeof r=="number"?r:96));return Math.min(Math.max(i,500),5e3)}const ie=s=>{if(!Array.isArray(s)||s.length===0)return[];const A=s.map(t=>({...t,time:RA(t.time)})).filter(t=>t.time!=null);A.sort((t,r)=>t.time-r.time);const e=new Map;for(const t of A)e.set(t.time,t);return Array.from(e.values()).sort((t,r)=>t.time-r.time)};function Bv(s,A,e,t,r,i){const n=r-e,o=i-t,a=Math.sqrt(n*n+o*o);if(a===0)return Math.hypot(s-e,A-t);let l=((s-e)*n+(A-t)*o)/(a*a);l=Math.max(0,Math.min(1,l));const c=e+l*n,u=t+l*o;return Math.hypot(s-c,A-u)}function To(s,A,e,t,r){if(!e||!t||!r)return null;const i=e.time,n=t.time,o=n-i,a=e.price,l=t.price,c=r.price;if(Math.abs(o)<1e-9){const B=c-a;return[{time:i,price:a+B},{time:n+1,price:l+B}]}const u=(l-a)/o,d=c+u*(i-r.time),g=c+u*(n-r.time);return[{time:i,price:d},{time:n,price:g}]}const gv=Q.forwardRef(function({bidPrice:A="113.638",askPrice:e="113.649",showBuySellPanel:t=!0,onBuyClick:r,onSellClick:i},n){const o=Q.useRef(null),a=Q.useRef(null),l=Q.useRef(null),c=Q.useRef(null),u=Q.useRef([]),d=Q.useRef(!1),g=Q.useRef(null),B=Q.useRef(null),f=Q.useRef(null),p=Q.useRef(null),m=Q.useRef([]),[w,v]=Q.useState(null),[y,E]=Q.useState([]),F=Q.useRef(null),T=Q.useRef(null),M=Q.useRef(null),I=Q.useRef(!1);Q.useEffect(()=>{M.current=w},[w]);const cA=Q.useRef(new Map),z=Q.useRef(null),fA=(C,U)=>`${C}_${U}`,W=()=>{const C=fA(AA,eA);return cA.current.get(C)||null},nA=C=>{if(!C)return;const U=fA(AA,eA);cA.current.set(U,C)},{activeTool:j,setActiveTool:H,showGrid:X,snapToGrid:sA,chartObjects:UA,setChartObjects:yA,orders:FA,selectedSymbol:AA,selectedTimeframe:eA,drawingsVisible:wA,chartType:dA,chartLocked:WA,theme:HA,baseUrl:pe,endpoints:Ft,endpointParams:Et}=oe(),Te=Q.useRef([]),[bi,uA]=Q.useState(!1),[J,k]=Q.useState(null),[G,O]=Q.useState([]),[Y,mA]=Q.useState(!0),NA=Q.useRef(null),JA=Q.useRef(new Map);Q.useRef(null);const ZA=Q.useRef(0);Q.useImperativeHandle(n,()=>({zoomIn:()=>{const C=a.current?.timeScale();if(!C)return;const U=C.getVisibleRange();if(!U||!U.from||!U.to)return;const x=U.to-U.from,_=(U.from+U.to)/2,S=x*.8;try{C.setVisibleRange({from:_-S/2,to:_+S/2}),nA(C.getVisibleRange())}catch{}},zoomOut:()=>{const C=a.current?.timeScale();if(!C)return;const U=C.getVisibleRange();if(!U||!U.from||!U.to)return;const x=U.to-U.from,_=(U.from+U.to)/2,S=x*1.25;try{C.setVisibleRange({from:_-S/2,to:_+S/2}),nA(C.getVisibleRange())}catch{}},downloadChartAsPNG:()=>{const C=o.current;if(!C){typeof window.notify=="function"&&window.notify("Chart not ready","error");return}const U=C.querySelectorAll("canvas"),x=HA==="light"?"#ffffff":"#12161d";let _=null,S=0;if(U.forEach(Z=>{if(Z.width>0&&Z.height>0){const tA=Z.width*Z.height;tA>S&&(S=tA,_=Z)}}),_)try{const Z=document.createElement("canvas");Z.width=_.width,Z.height=_.height;const tA=Z.getContext("2d");tA.fillStyle=x,tA.fillRect(0,0,Z.width,Z.height),tA.drawImage(_,0,0);const K=document.createElement("a");K.download=`chart-${AA}-${eA}-${Date.now()}.png`,K.href=Z.toDataURL("image/png"),K.click(),typeof window.notify=="function"&&window.notify("Chart saved as PNG","success");return}catch(Z){console.warn("Canvas export failed, trying html2canvas",Z)}lv(C,{useCORS:!0,allowTaint:!0,backgroundColor:x,scale:2,logging:!1}).then(Z=>{const tA=document.createElement("a");tA.download=`chart-${AA}-${eA}-${Date.now()}.png`,tA.href=Z.toDataURL("image/png"),tA.click(),typeof window.notify=="function"&&window.notify("Chart saved as PNG","success")}).catch(Z=>{console.error("Chart screenshot failed",Z),typeof window.notify=="function"&&window.notify("Screenshot failed. Try again.","error")})}}),[AA,eA,HA]);const qt=Q.useMemo(()=>G.length===0?[]:dA==="line"||dA==="area"?G.map(C=>({time:C.time,value:C.close})):G,[G,dA]),_o=C=>{console.log("Buy Order:",C),r?r("BUY"):(k("BUY"),uA(!0))},Oo=C=>{console.log("Sell Order:",C),i?i("SELL"):(k("SELL"),uA(!0))},xt=()=>{uA(!1),k(null)};return Q.useEffect(()=>{const C=o.current;if(!C)return;const U=C.getBoundingClientRect(),x=P=>{const gA=Math.abs(Number(P));return Number.isFinite(gA)?gA>=1e3?gA.toFixed(2):gA>=1?gA.toFixed(4):gA.toFixed(5):"0"},_=HA==="light",S=aB(C,{width:U.width||C.clientWidth,height:U.height||C.clientHeight,autoSize:!0,localization:{priceFormatter:x},layout:{background:{color:_?"#FFFFFF":"#0d1117",type:"solid"},textColor:_?"#020617":"#e6edf3",fontSize:12,fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif'},grid:{vertLines:{visible:X,color:X?_?"rgba(100, 116, 139, 0.15)":"rgba(110, 118, 129, 0.15)":"transparent",style:X?2:0},horzLines:{visible:X,color:X?_?"rgba(100, 116, 139, 0.15)":"rgba(110, 118, 129, 0.15)":"transparent",style:X?2:0}},rightPriceScale:{borderColor:_?"#e5e7eb":"#21262d",autoScale:!0,scaleMargins:{top:.1,bottom:.1},ticksVisible:!0,ensureEdgeTickMarksVisible:!0,entireTextOnly:!1,textColor:_?"#64748b":"#8b949e"},leftPriceScale:{visible:!1},timeScale:{borderColor:_?"#e5e7eb":"#21262d",timeVisible:!0,secondsVisible:!1,rightOffset:12,barSpacing:6,minBarSpacing:4,shiftVisibleRangeOnNewBar:!1,fixLeftEdge:!1,fixRightEdge:!1,rightBarStaysOnScroll:!0,allowShiftVisibleRangeOnWhitespaceClick:!0},crosshair:{mode:j===1?1:0,vertLine:{width:1,color:_?"#3b82f6":"#58a6ff",style:0,labelBackgroundColor:_?"#eff6ff":"#161b22",labelVisible:!0},horzLine:{width:1,color:_?"#3b82f6":"#58a6ff",style:0,labelBackgroundColor:_?"#eff6ff":"#161b22",labelVisible:!0},vertLineVisible:j===1,horzLineVisible:j===1},handleScroll:{mouseWheel:!0,pressedMouseMove:j===null||j===1,horzTouchDrag:!0,vertTouchDrag:!0},handleScale:{axisPressedMouseMove:{time:!0,price:!0},axisDoubleClickReset:{time:!0,price:!0},axisTouch:{time:!0,price:!0},mouseWheel:!0,pinch:!0}}),Z=S.addCandlestickSeries({upColor:_?"#089981":"#26a69a",downColor:_?"#f23645":"#ef5350",wickUpColor:_?"#089981":"#26a69a",wickDownColor:_?"#f23645":"#ef5350",borderUpColor:_?"#089981":"#26a69a",borderDownColor:_?"#f23645":"#ef5350",borderVisible:!0});a.current=S,l.current=Z,requestAnimationFrame(()=>{if(C&&S){const P=C.getBoundingClientRect();P.width>0&&P.height>0&&S.resize(P.width,P.height)}});const tA=S.timeScale(),K=()=>{if(I.current&&JA.current.size>0){const P=tA.getVisibleRange();P&&nA(P)}};tA.subscribeVisibleTimeRangeChange(K);const N=new ResizeObserver(P=>{for(const gA of P){const{width:BA,height:D}=gA.contentRect;if(BA>0&&D>0&&S){const oA=tA.getVisibleRange();S.resize(BA,D),oA&&setTimeout(()=>{try{tA.setVisibleRange(oA)}catch{}},0)}}});return N.observe(C),()=>{tA.unsubscribeVisibleTimeRangeChange(K),N.disconnect(),S.remove(),a.current=null,l.current=null,c.current=null,u.current=[]}},[]),Q.useEffect(()=>{a.current&&a.current.applyOptions({grid:{vertLines:{visible:X,color:X?"rgba(110, 118, 129, 0.15)":"transparent",style:X?2:0},horzLines:{visible:X,color:X?"rgba(110, 118, 129, 0.15)":"transparent",style:X?2:0}}})},[X]),Q.useEffect(()=>{const C=a.current;if(!C)return;const U=HA==="light";C.applyOptions({layout:{background:{color:U?"#FFFFFF":"#12161d"},textColor:U?"#020617":"#fff"},grid:{vertLines:{color:X?U?"rgba(100, 116, 139, 0.25)":"rgba(148, 163, 184, 0.2)":"transparent"},horzLines:{color:X?U?"rgba(100, 116, 139, 0.25)":"rgba(148, 163, 184, 0.2)":"transparent"}},rightPriceScale:{borderColor:U?"#e5e7eb":"#1e293b"},timeScale:{borderColor:U?"#e5e7eb":"#1e293b"},crosshair:{vertLine:{color:U?"#3b82f6":"#58a6ff",labelBackgroundColor:U?"#eff6ff":"#161b22",width:1},horzLine:{color:U?"#3b82f6":"#58a6ff",labelBackgroundColor:U?"#eff6ff":"#161b22",width:1}}})},[HA,X]),Q.useEffect(()=>{if(!a.current)return;const U=!WA&&!(j!==null&&j!==1&&j!==0),x=!WA;a.current.applyOptions({crosshair:{mode:j===1?1:0,vertLine:{visible:j===1,width:1,color:HA==="light"?"#94a3b8":"#64748b",style:0,labelBackgroundColor:HA==="light"?"#e5e7eb":"#1e293b"},horzLine:{visible:j===1,width:1,color:HA==="light"?"#94a3b8":"#64748b",style:0,labelBackgroundColor:HA==="light"?"#e5e7eb":"#1e293b"}},handleScroll:{mouseWheel:x,pressedMouseMove:U,horzTouchDrag:U,vertTouchDrag:U},handleScale:{axisPressedMouseMove:{time:U,price:U},axisDoubleClickReset:{time:x,price:x},axisTouch:{time:U,price:U},mouseWheel:x,pinch:x}})},[j,WA]),Q.useEffect(()=>{(async()=>{if(!AA||!eA){O([]),I.current=!1;return}try{if(mA(!0),O([]),I.current=!1,l.current)try{l.current.setData([])}catch{}console.log(`📊 Fetching candles for ${AA} @ ${eA}`);const U=mu(eA),x=dv(eA,U),_=pe||uv?.VITE_BASE_URL||"http://localhost:8000",S=Ft?.candles||"/api/chart/candles",Z=Et?.candles||{},tA={symbol:Z.symbol||"symbol",timeframe:Z.timeframe||"timeframe",limit:Z.limit||"limit",daysBack:Z.daysBack||"daysBack"},K={};K[tA.symbol]=AA,K[tA.timeframe]=eA,K[tA.limit]=x,Z.daysBack!==!1&&(K[tA.daysBack]=U);const N=await TA.get(`${_}${S}`,{params:K,timeout:1e4});let P=[];if(Array.isArray(N.data)?P=N.data:N.data&&N.data.data&&Array.isArray(N.data.data)?P=N.data.data:N.data&&Array.isArray(N.data)&&(P=N.data),P&&P.length>0){console.log(`✅ Loaded ${P.length} raw candles from server`);const{candles:gA,stats:BA}=Bc(P,AA,eA);gA.length>0?(O(gA),JA.current=new Map,gA.forEach(D=>{JA.current.set(D.time,D)})):(console.warn(`⚠️ No valid candles after processing for ${AA}`),O([]))}else console.warn(`⚠️ No candle data returned for ${AA}`),O([])}catch(U){console.error(`❌ Error fetching ${AA}:`,U.message),O([])}finally{mA(!1)}})()},[AA,eA]),Q.useEffect(()=>{console.log("🔧 [CANDLES DEBUG] Setting up WebSocket for candles:",{baseUrl:pe,symbol:AA,timeframe:eA}),NA.current=Ur.getSocket();const C=NA.current;console.log("🔌 [CANDLES DEBUG] Socket status for CandlesGateway (ROOT namespace):",{socketId:C.id,connected:C.connected,baseUrl:pe,socketUrl:C.io?.uri||"unknown",namespace:C.nsp?.name||"/",hasAuth:!!C.auth,note:"This socket MUST connect to root namespace for CandlesGateway"});const U=()=>{if(console.log("📡 [CANDLES DEBUG] subscribeToCandles called:",{selectedSymbol:AA,selectedTimeframe:eA,connected:C.connected,socketId:C.id}),AA&&eA&&C.connected){const K={symbol:AA,timeframe:eA};console.log("📡 [CANDLES DEBUG] Emitting subscribeCandles:",K),C.emit("subscribeCandles",K),console.log("✅ [CANDLES DEBUG] subscribeCandles event emitted successfully")}else console.warn("⚠️ [CANDLES DEBUG] Cannot subscribe to candles:",{selectedSymbol:AA,selectedTimeframe:eA,connected:C.connected,socketId:C.id,reason:AA?eA?"Not connected":"No timeframe":"No symbol"})},x=()=>{console.log("✅ [CANDLES DEBUG] Chart WebSocket connected to backend, socket ID:",C.id),setTimeout(()=>{AA&&eA&&(console.log("📡 [CANDLES DEBUG] Backend connected, subscribing to candles..."),U())},200)},_=K=>{console.log("⚠️ [CANDLES DEBUG] Chart WebSocket disconnected:",K)},S=K=>{console.error("❌ [CANDLES DEBUG] Chart WebSocket connection error:",K),console.error("❌ [CANDLES DEBUG] Error details:",{message:K.message,description:K.description,context:K.context,type:K.type})};C.on("connect",x),C.on("disconnect",_),C.on("connect_error",S),C.on("subscription:confirmed",K=>{console.log("✅ [CANDLES DEBUG] Subscription confirmed:",K),K.type==="candles"&&console.log("✅ [CANDLES DEBUG] Candle subscription confirmed for:",{symbol:K.symbol,timeframe:K.timeframe})});const Z=K=>{if(console.log("📊 [CANDLES DEBUG] candleUpdate event received:",K),!K||!K.candle||!K.symbol){console.warn("⚠️ [CANDLES DEBUG] Invalid candleUpdate data:",K);return}if(console.log("✅ [CANDLES DEBUG] Valid candleUpdate received:",{symbol:K.symbol,timeframe:K.timeframe,candle:K.candle,selectedSymbol:AA,selectedTimeframe:eA}),K.symbol.toUpperCase()!==AA?.toUpperCase()){console.log(`⚠️ [CANDLES DEBUG] Symbol mismatch: received ${K.symbol}, selected ${AA}`);return}const{candle:N}=K;console.log("✅ [CANDLES DEBUG] Processing candle update:",{symbol:K.symbol,timeframe:K.timeframe,candle:N,candleTime:N.time,candleClose:N.close});const P=gc(N,AA,eA);if(!P){console.warn("⚠️ [CANDLES DEBUG] Rejected realtime candle (invalid):",{symbol:K.symbol,candle:N});return}console.log("✅ [CANDLES DEBUG] Processed candle:",{time:P.time,open:P.open,high:P.high,low:P.low,close:P.close});const gA=Date.now();if(gA-ZA.current<200)return;ZA.current=gA;const BA=a.current?.timeScale(),D=BA?.getVisibleRange(),oA=l.current,$=a.current;if(!oA||!$||!I.current){console.warn("⚠️ [CANDLES DEBUG] Chart not ready for update:",{hasSeries:!!oA,hasChart:!!$,hasInitialized:I.current});return}const iA=oA?.seriesType?.(),rA=dA==="line"?"Line":dA==="area"?"Area":dA==="bars"?"Bar":"Candlestick";if(iA!==rA){console.warn("⚠️ [CANDLES DEBUG] Series type mismatch:",{expected:rA,actual:iA,chartType:dA,note:"Chart type switch might be in progress, skipping update"});return}try{const lA=JA.current.get(P.time),q=lA?{time:P.time,open:lA.open,high:Math.max(lA.high,P.close),low:Math.min(lA.low,P.close),close:P.close}:P;JA.current.set(P.time,q);try{dA==="line"||dA==="area"?oA.update({time:q.time,value:q.close}):oA.update(q),BA&&D&&nA(D),console.log("✅ [CANDLES DEBUG] Candle update completed successfully")}catch(aA){throw console.error("❌ [CANDLES DEBUG] Error in s.update():",aA),console.error("❌ [CANDLES DEBUG] Series type:",oA?.seriesType?.()),console.error("❌ [CANDLES DEBUG] Processed candle:",P),aA}}catch(lA){console.error("❌ [CANDLES DEBUG] Error updating candle:",lA),console.error("❌ [CANDLES DEBUG] Error stack:",lA.stack)}};C.on("candleUpdate",Z);const tA=()=>{C.connected&&AA&&eA?(console.log("✅ [CANDLES DEBUG] Socket connected, subscribing to backend..."),U()):console.log("⏳ [CANDLES DEBUG] Waiting for socket connection...",{connected:C.connected,hasSymbol:!!AA,hasTimeframe:!!eA})};if(C.connected)tA();else{const K=()=>{console.log("✅ [CANDLES DEBUG] Socket connected to backend, subscribing..."),setTimeout(tA,200)};C.once("connect",K),setTimeout(()=>{C.connected&&tA()},500)}return()=>{C.off("candleUpdate",Z),C.off("connect",x),C.off("disconnect",_),C.off("connect_error",S),C.off("subscription:confirmed"),AA&&eA&&C.connected&&(console.log(`🔌 Unsubscribing from: ${AA}@${eA}`),C.emit("unsubscribeCandles",{symbol:AA,timeframe:eA}))}},[AA,eA,pe]),Q.useEffect(()=>{const C=l.current,U=a.current;if(!(!C||!U)&&!(G.length===0&&I.current)){if(G.length===0&&!I.current){if(Y)return;const x=U.timeScale();C.setData([]),x.fitContent();return}if(!I.current){const x=U.timeScale(),_=fA(AA,eA);z.current,z.current=_,console.log("sorted candles 1");const S=[...G].sort((tA,K)=>tA.time-K.time);if(console.log("📊 [CANDLES DEBUG] Initializing chart with candles:",{candleCount:S?.length,chartType:dA,seriesType:C?.seriesType?.()||"unknown",firstCandle:S[0],lastCandle:S[S?.length-1]}),console.log("sorted candles 2"),dA==="line"||dA==="area"){const tA=S?.map(K=>({time:K.time,value:K.close})).filter(K=>K.time!=null);tA.length>0&&(console.log("📊 [CANDLES DEBUG] Setting line/area data:",tA.length,"points"),C.setData(tA),console.log("✅ [CANDLES DEBUG] Line/area data set successfully"))}else console.log("sorted candles 3"),S?.length>0&&(console.log("📊 [CANDLES DEBUG] Setting candlestick data:",S?.length,"candles"),console.log("📊 [CANDLES DEBUG] First candle sample:",S[0]),console.log("📊 [CANDLES DEBUG] Last candle sample:",S[S?.length-1]),C.setData(S),console.log("✅ [CANDLES DEBUG] Candlestick data set successfully"));if(console.log("sorted candles 4"),S?.length>0){const tA=S[S?.length-1].time,K=Fr(eA)||60,N=eA==="M1"?150:eA==="M5"?120:100,P=tA-N*K;console.log("📊 [CANDLES DEBUG] Setting visible range:",{from:P,to:tA+K*2,visibleBars:N,timeframeSeconds:K});try{x.setVisibleRange({from:P,to:tA+K*2}),console.log("✅ [CANDLES DEBUG] Visible range set successfully")}catch(gA){console.warn("⚠️ [CANDLES DEBUG] Failed to set visible range, using fitContent:",gA),x.fitContent()}}else console.warn("⚠️ [CANDLES DEBUG] No candles to set visible range, using fitContent"),x.fitContent();try{U.priceScale("right").applyOptions({borderColor:"#1e293b",autoScale:!0,scaleMargins:{top:.1,bottom:.1},ticksVisible:!0,ensureEdgeTickMarksVisible:!0}),console.log("✅ [CANDLES DEBUG] Price scale configured successfully")}catch{console.warn("⚠️ [CANDLES DEBUG] Failed to configure price scale")}I.current=!0;const Z=x.getVisibleRange();nA(Z),console.log("sorted candles 5"),console.log("✅ [CANDLES DEBUG] Chart initialization completed:",{hasInitialized:I.current,visibleRange:Z,candleCount:S?.length})}}},[G.length,dA,AA,eA]),Q.useEffect(()=>{const C=a.current;if(!C||!I.current||G.length===0){console.log("⏳ [CANDLES DEBUG] Chart type switch skipped:",{hasChart:!!C,hasInitialized:I.current,candleCount:G.length,chartType:dA});return}console.log("🔄 [CANDLES DEBUG] Switching chart type:",{from:l.current?.seriesType?.()||"unknown",to:dA,candleCount:G.length});const U=C.timeScale(),x=U.getVisibleRange()||W();if(l.current)try{C.removeSeries(l.current)}catch{}if(c.current)try{C.removeSeries(c.current),c.current=null}catch{}let _;if(dA==="bars"){const S=HA==="light";_=C.addBarSeries({upColor:S?"#089981":"#26A69A",downColor:S?"#f23645":"#EF5350",borderUpColor:S?"#089981":"#26A69A",borderDownColor:S?"#f23645":"#EF5350",scaleMargins:{top:.1,bottom:.1}}),console.log("sorted candles 6");const Z=[...G].sort((tA,K)=>tA.time-K.time);Z?.length>0&&_.setData(Z)}else if(dA==="line"){_=C.addLineSeries({color:"#38bdf8",lineWidth:2,priceLineVisible:!1,lastValueVisible:!0,scaleMargins:{top:.1,bottom:.1}});const S=ie(qt);S.length>0&&_.setData(S)}else if(dA==="area"){_=C.addAreaSeries({lineColor:"#38bdf8",topColor:"rgba(56,189,248,0.4)",bottomColor:"rgba(56,189,248,0.0)",lineWidth:2,priceLineVisible:!1,lastValueVisible:!0,scaleMargins:{top:.1,bottom:.1}});const S=ie(qt);S.length>0&&_.setData(S)}else if(dA==="volume ticks"||dA==="volume"){const S=HA==="light";_=C.addCandlestickSeries({upColor:S?"#089981":"#26A69A",downColor:S?"#f23645":"#EF5350",wickUpColor:S?"#089981":"#26A69A",wickDownColor:S?"#f23645":"#EF5350",borderUpColor:S?"#089981":"#26A69A",borderDownColor:S?"#f23645":"#EF5350",borderVisible:!0,priceScaleId:"right"}),console.log("sorted candles 7");const Z=[...G].sort((N,P)=>N.time-P.time);Z?.length>0&&_.setData(Z);const tA=C.addHistogramSeries({priceFormat:{type:"volume"},priceScaleId:"vol",base:0,priceLineVisible:!1,lastValueVisible:!1,color:"rgba(38,166,154,0.15)"});C.priceScale("right").applyOptions({scaleMargins:{top:.05,bottom:.3}}),C.priceScale("vol").applyOptions({scaleMargins:{top:.75,bottom:0},visible:!1}),console.log("sorted candles 8");const K=Z?.map(N=>({time:N.time,value:N.volume||0,color:N.close>=N.open?"rgba(38,166,154,0.25)":"rgba(239,83,80,0.25)"}));K.length>0&&tA.setData(K),c.current=tA}else{const S=HA==="light";_=C.addCandlestickSeries({upColor:S?"#089981":"#26A69A",downColor:S?"#f23645":"#EF5350",wickUpColor:S?"#089981":"#26A69A",wickDownColor:S?"#f23645":"#EF5350",borderUpColor:S?"#089981":"#26A69A",borderDownColor:S?"#f23645":"#EF5350",borderVisible:!0,scaleMargins:{top:.1,bottom:.1}}),console.log("sorted candles 9");const Z=[...G].sort((tA,K)=>tA.time-K.time);Z?.length>0&&_.setData(Z)}if(l.current=_,x&&I.current)setTimeout(()=>{try{U.setVisibleRange(x),nA(x)}catch{if(G.length>0)try{const Z=G[G.length-1].time,tA=Z-6e3;U.setVisibleRange({from:tA,to:Z}),nA(U.getVisibleRange())}catch{U.fitContent(),nA(U.getVisibleRange())}}try{C.priceScale("right").applyOptions({borderColor:"#1e293b",autoScale:!0,scaleMargins:{top:.1,bottom:.1},ticksVisible:!0,ensureEdgeTickMarksVisible:!0})}catch{}},0);else if(!I.current){U.fitContent();try{C.priceScale("right").applyOptions({borderColor:"#1e293b",autoScale:!0,scaleMargins:{top:.1,bottom:.1},ticksVisible:!0,ensureEdgeTickMarksVisible:!0})}catch{}I.current=!0,nA(U.getVisibleRange())}},[dA,G.length,qt.length]),Q.useEffect(()=>{const C=a.current,U=c.current;if(!C||!U||!I.current||G.length===0||dA!=="volume"&&dA!=="volume ticks")return;console.log("sorted candles 10");const x=[...G].sort((S,Z)=>S.time-Z.time);console.log("sorted candles 11");const _=x?.map(S=>({time:S.time,value:S.volume||0,color:S.close>=S.open?"rgba(38,166,154,0.25)":"rgba(239,83,80,0.25)"}));_.length>0&&U.setData(_)},[G,dA]),Q.useEffect(()=>{const C=a.current,U=l.current,x=o.current;if(!C||!U||!x)return;const S=j!==null?[null,null,"trendline","parallellines","fibonacci","rectangle","pricelevel","text",null,null,null,null,null,null,null,null,null][j]:null;if(!S){if(d.current=!1,g.current=null,B.current=null,p.current=null,f.current?.series)try{C.removeSeries(f.current.series)}catch{}f.current=null;return}if(S==="pricelevel"){const N=P=>{const gA=x.getBoundingClientRect(),BA=P.clientX-gA.left,D=P.clientY-gA.top,oA=C.timeScale().coordinateToTime(BA),$=U.coordinateToPrice(D);if(oA==null||$==null)return;const rA={type:"pricelevel",priceLine:U.createPriceLine({price:$,color:"#3b82f6",lineWidth:2,lineStyle:2,axisLabelVisible:!0,title:$.toFixed(5)}),price:$};yA(lA=>[...lA,rA]),u.current.push(rA)};return x.addEventListener("click",N),()=>{x.removeEventListener("click",N)}}if(S==="trendline"){const N=D=>{D.preventDefault(),D.stopPropagation(),D.stopImmediatePropagation();const oA=x.getBoundingClientRect(),$=D.clientX-oA.left,iA=D.clientY-oA.top;let rA=C.timeScale().coordinateToTime($);const lA=U.coordinateToPrice(iA);if(!(rA==null||lA==null)&&(rA=RA(rA),rA!=null))if(p.current===null){p.current={time:rA,price:lA};const q=C.addLineSeries({color:"#22c55e",lineWidth:2,priceLineVisible:!1,lastValueVisible:!1});f.current={type:"trendline",series:q},q.setData([{time:rA,value:lA}])}else{const q=p.current,aA={time:rA,price:lA},CA=1,MA=1e-5,EA=Math.abs(aA.time-q.time),_A=Math.abs(aA.price-q.price);if(EA<CA&&_A<MA){try{C.removeSeries(f.current.series)}catch{}p.current=null,f.current=null;return}const ze={time:q.time,price:q.price},We={time:aA.time,price:aA.price},Fe=ie([{time:ze.time,value:ze.price},{time:We.time,value:We.price}]);if(Fe.length>0){f.current.series.setData(Fe);const ht={type:"trendline",series:f.current.series,point1:ze,point2:We};yA(St=>[...St,ht]),u.current.push(ht)}H(null),p.current=null,f.current=null}},P=D=>{if(p.current===null||f.current?.type!=="trendline")return;D.preventDefault(),D.stopPropagation();const oA=x.getBoundingClientRect(),$=D.clientX-oA.left,iA=D.clientY-oA.top;let rA=C.timeScale().coordinateToTime($);const lA=U.coordinateToPrice(iA);if(rA==null||lA==null||(rA=RA(rA),rA==null))return;const q=p.current,aA=ie([{time:q.time,value:q.price},{time:rA,value:lA}]);aA.length>0&&f.current.series.setData(aA)},gA=D=>{D.stopPropagation()},BA={capture:!0,passive:!1};return x.addEventListener("click",N,BA),x.addEventListener("mousemove",P,BA),x.addEventListener("mousemove",gA,BA),()=>{if(p.current=null,f.current?.type==="trendline"&&f.current?.series){try{C.removeSeries(f.current.series)}catch{}f.current=null}x.removeEventListener("click",N,BA),x.removeEventListener("mousemove",P,BA),x.removeEventListener("mousemove",gA,BA)}}if(S==="parallellines"){const N={capture:!0,passive:!1},P=$=>{$.preventDefault(),$.stopPropagation(),$.stopImmediatePropagation();const iA=x.getBoundingClientRect(),rA=$.clientX-iA.left,lA=$.clientY-iA.top;let q=C.timeScale().coordinateToTime(rA);const aA=U.coordinateToPrice(lA);if(q==null||aA==null||(q=RA(q),q==null))return;const CA={time:q,price:aA},MA=m.current;if(MA.length===0){m.current=[CA];const EA=C.addLineSeries({color:"#8b5cf6",lineWidth:2,priceLineVisible:!1,lastValueVisible:!1});EA.setData([{time:q,value:aA}]),f.current={type:"parallellines",series:EA,previewLine:null}}else if(MA.length===1){m.current=[MA[0],CA];const EA=ie([{time:MA[0].time,value:MA[0].price},{time:q,value:aA}]);EA.length>0&&f.current.series.setData(EA),f.current.previewLine=C.addLineSeries({color:"#8b5cf6",lineWidth:2,lineStyle:2,priceLineVisible:!1,lastValueVisible:!1});const _A=To(C,U,MA[0],CA,CA);_A&&f.current.previewLine.setData(ie([{time:_A[0].time,value:_A[0].price},{time:_A[1].time,value:_A[1].price}]))}else{const[EA,_A]=MA,ze=CA;if(f.current?.previewLine){try{C.removeSeries(f.current.previewLine)}catch{}f.current.previewLine=null}const We=f.current?.series;if(!We)return;const Fe=To(C,U,EA,_A,ze);if(!Fe)return;const ht=C.addLineSeries({color:"#8b5cf6",lineWidth:2,priceLineVisible:!1,lastValueVisible:!1});We.setData(ie([{time:EA.time,value:EA.price},{time:_A.time,value:_A.price}])),ht.setData(ie([{time:Fe[0].time,value:Fe[0].price},{time:Fe[1].time,value:Fe[1].price}]));const St={type:"parallellines",point1:EA,point2:_A,point3:ze,baseLine:We,parallelLine:ht};yA(Vs=>[...Vs,St]),u.current.push(St),H(null),m.current=[],f.current=null}},gA=$=>{const iA=m.current;if(iA.length!==1||!f.current?.series)return;const rA=x.getBoundingClientRect(),lA=$.clientX-rA.left,q=$.clientY-rA.top;let aA=C.timeScale().coordinateToTime(lA);const CA=U.coordinateToPrice(q);if(aA==null||CA==null||(aA=RA(aA),aA==null))return;const MA=ie([{time:iA[0].time,value:iA[0].price},{time:aA,value:CA}]);MA.length>0&&f.current.series.setData(MA)},BA=$=>{const iA=m.current;if(iA.length!==2||!f.current?.previewLine)return;const rA=x.getBoundingClientRect(),lA=$.clientX-rA.left,q=$.clientY-rA.top;let aA=C.timeScale().coordinateToTime(lA);const CA=U.coordinateToPrice(q);if(aA==null||CA==null||(aA=RA(aA),aA==null))return;const MA={time:aA,price:CA},EA=To(C,U,iA[0],iA[1],MA);EA&&f.current.previewLine.setData(ie([{time:EA[0].time,value:EA[0].price},{time:EA[1].time,value:EA[1].price}]))},D=$=>{gA($),BA($)},oA=$=>{$.stopPropagation()};return x.addEventListener("click",P,N),x.addEventListener("mousemove",D,N),x.addEventListener("mousemove",oA,N),()=>{if(m.current=[],f.current?.type==="parallellines"){try{f.current.series&&C.removeSeries(f.current.series),f.current.previewLine&&C.removeSeries(f.current.previewLine)}catch{}f.current=null}x.removeEventListener("click",P,N),x.removeEventListener("mousemove",D,N),x.removeEventListener("mousemove",oA,N)}}if(p.current=null,f.current?.type==="trendline"&&f.current?.series){try{C.removeSeries(f.current.series)}catch{}f.current=null}const Z=N=>{if(N.preventDefault(),N.stopPropagation(),N.stopImmediatePropagation(),S==="trendline"||S==="parallellines"||S!=="rectangle"&&S!=="fibonacci")return;const P=x.getBoundingClientRect(),gA=N.clientX-P.left,BA=N.clientY-P.top;let D=C.timeScale().coordinateToTime(gA);const oA=U.coordinateToPrice(BA);if(!(D==null||oA==null)&&(D=RA(D),D!=null)){if(d.current=!0,g.current={time:D,price:oA},B.current=null,S==="rectangle"){const $=C.addBaselineSeries({baseValue:{type:"price",price:oA},topLineColor:"#2563eb",bottomLineColor:"#2563eb",topFillColor1:"rgba(59, 130, 246, 0.38)",topFillColor2:"rgba(59, 130, 246, 0.22)",bottomFillColor1:"rgba(59, 130, 246, 0.22)",bottomFillColor2:"rgba(59, 130, 246, 0.38)",priceLineVisible:!1,lastValueVisible:!1,lineWidth:2,lineStyle:0});f.current={type:"rectangle",series:$}}if(S==="fibonacci"){const $=C.addLineSeries({color:"#f59e0b",lineWidth:2,priceLineVisible:!1,lastValueVisible:!1});f.current={type:"fibonacci",series:$,priceLines:[]}}if(S==="parallellines"){const $=C.addLineSeries({color:"#8b5cf6",lineWidth:2,priceLineVisible:!1,lastValueVisible:!1});f.current={type:"parallellines",series:$,firstLine:null,secondLine:null}}}},tA=N=>{if(!d.current||!g.current||!f.current)return;N.preventDefault(),N.stopPropagation(),N.stopImmediatePropagation();const P=x.getBoundingClientRect(),gA=N.clientX-P.left,BA=N.clientY-P.top;let D=C.timeScale().coordinateToTime(gA);const oA=U.coordinateToPrice(BA);if(D==null||oA==null||(D=RA(D),D==null))return;B.current={time:D,price:oA};const $=g.current;if(f.current.type==="rectangle"){const iA=Math.max($.price,oA),rA=Math.min($.price,oA),lA=RA(Math.min($.time,D)),q=RA(Math.max($.time,D));if(lA==null||q==null||Math.abs(q-lA)<1||Math.abs(iA-rA)<1e-5)return;const aA=f.current.series;aA.setData(ie([{time:lA,value:iA},{time:q,value:iA}])),aA.applyOptions({baseValue:{type:"price",price:rA}})}if(f.current.type==="fibonacci"){const iA=[{time:$.time,value:$.price},{time:D,value:oA}],rA=ie(iA);rA.length>0&&f.current.series.setData(rA),B.current={time:D,price:oA},f.current.priceLines&&(f.current.priceLines.forEach(lA=>{try{U.removePriceLine(lA)}catch{}}),f.current.priceLines=[])}if(f.current.type==="parallellines")if(f.current.firstLine){const iA=f.current.firstLine;iA.endTime-iA.startTime;const rA=iA.endPrice-iA.startPrice,lA=oA,q=lA+rA;if(f.current.secondLine)f.current.secondLine.setData([{time:$.time,value:lA},{time:D,value:q}]);else{const aA=C.addLineSeries({color:"#8b5cf6",lineWidth:2,priceLineVisible:!1,lastValueVisible:!1});aA.setData([{time:$.time,value:lA},{time:D,value:q}]),f.current.secondLine=aA}}else f.current.series.setData([{time:$.time,value:$.price},{time:D,value:oA}])},K=N=>{if(N&&(N.preventDefault(),N.stopPropagation()),!d.current||!f.current||!g.current)return;const P=g.current,gA=B.current||P;if(f.current.type==="parallellines")if(f.current.firstLine){const BA={type:"parallellines",firstLine:f.current.series,secondLine:f.current.secondLine,firstLineData:f.current.firstLine};yA(D=>[...D,BA]),u.current.push(BA),H(null),f.current=null,d.current=!1,g.current=null,B.current=null;return}else{f.current.firstLine={startTime:P.time,startPrice:P.price,endTime:gA.time,endPrice:gA.price},d.current=!1,g.current=null,B.current=null;return}if(f.current.type==="fibonacci"){const D=(B.current||P).price;if(Math.abs(P.price-D)<1e-4){try{C.removeSeries(f.current.series)}catch{}d.current=!1,g.current=null,B.current=null,f.current=null;return}const oA=Math.max(P.price,D),$=Math.min(P.price,D),iA=oA-$,rA=[{level:0,label:"0.0%"},{level:.236,label:"23.6%"},{level:.382,label:"38.2%"},{level:.5,label:"50.0%"},{level:.618,label:"61.8%"},{level:.786,label:"78.6%"},{level:1,label:"100.0%"}],lA=[],q=f.current.series;try{C.removeSeries(q)}catch{}rA.forEach(({level:CA,label:MA})=>{const EA=oA-iA*CA,_A=U.createPriceLine({price:EA,color:CA===0||CA===1?"#f59e0b":"#fbbf24",lineWidth:CA===0||CA===1?2:1,lineStyle:CA===0||CA===1?0:2,axisLabelVisible:!0,title:`${MA} (${EA.toFixed(5)})`,textColor:CA===0||CA===1?"#f59e0b":"#fbbf24"});lA.push(_A)});const aA={type:"fibonacci",priceLines:lA,startPrice:P.price,endPrice:D,high:oA,low:$};yA(CA=>[...CA,aA]),u.current.push(aA),H(null)}if(f.current.type==="rectangle"){const BA=g.current,D=B.current||BA,oA=Math.max(BA.price,D.price),$=Math.min(BA.price,D.price),iA=RA(Math.min(BA.time,D.time)),rA=RA(Math.max(BA.time,D.time));if(iA!=null&&rA!=null&&Math.abs(rA-iA)>=1&&Math.abs(oA-$)>=1e-5){const lA=f.current.series;lA.setData(ie([{time:iA,value:oA},{time:rA,value:oA}])),lA.applyOptions({baseValue:{type:"price",price:$}});const q={type:"rectangle",timeStart:iA,timeEnd:rA,priceTop:oA,priceBottom:$,series:lA};yA(aA=>[...aA,q]),u.current.push(q),H(null)}else try{C.removeSeries(f.current.series)}catch{}}d.current=!1,g.current=null,B.current=null,f.current=null};if(S==="rectangle"||S==="fibonacci"||S==="parallellines"){const N={capture:!0,passive:!1},P=gA=>{d.current||gA.stopPropagation()};return x.addEventListener("mousedown",Z,N),x.addEventListener("mousemove",tA,N),x.addEventListener("mousemove",P,N),x.addEventListener("mouseup",K,N),()=>{x.removeEventListener("mousedown",Z,N),x.removeEventListener("mousemove",tA,N),x.removeEventListener("mousemove",P,N),x.removeEventListener("mouseup",K,N)}}},[j,yA,H]),Q.useEffect(()=>{const C=a.current,U=l.current,x=o.current,_=j===null||j===1;if(!_||!C||!U||!x){_||(v(null),E([]));return}const S=10,Z=8;function tA(BA,D){const oA=UA.filter($=>$.type==="trendline"&&$.point1&&$.point2);for(let $=oA.length-1;$>=0;$--){const iA=oA[$],rA=C.timeScale().timeToCoordinate(iA.point1.time),lA=U.priceToCoordinate(iA.point1.price),q=C.timeScale().timeToCoordinate(iA.point2.time),aA=U.priceToCoordinate(iA.point2.price);if(rA==null||lA==null||q==null||aA==null)continue;const CA=Math.hypot(BA-rA,D-lA),MA=Math.hypot(BA-q,D-aA);if(CA<S)return{object:iA,mode:"handle1"};if(MA<S)return{object:iA,mode:"handle2"};if(Bv(BA,D,rA,lA,q,aA)<Z)return{object:iA,mode:"line"}}return null}const K=BA=>{const D=x.getBoundingClientRect(),oA=BA.clientX-D.left,$=BA.clientY-D.top,iA=tA(oA,$);iA?(BA.preventDefault(),BA.stopPropagation(),v(iA.object),F.current=iA.mode,iA.mode==="line"&&(T.current={x:oA,y:$,point1:{...iA.object.point1},point2:{...iA.object.point2}})):(v(null),F.current=null)},N=BA=>{if(!F.current)return;const D=M.current;if(!D||!D.point1||!D.point2)return;const oA=x.getBoundingClientRect(),$=BA.clientX-oA.left,iA=BA.clientY-oA.top;let rA=C.timeScale().coordinateToTime($);const lA=U.coordinateToPrice(iA);if(!(rA==null||lA==null)&&(rA=RA(rA),rA!=null)){if(F.current==="handle1"){const q={time:rA,price:lA},aA=ie([{time:q.time,value:q.price},{time:D.point2.time,value:D.point2.price}]);aA.length>0&&D.series.setData(aA);const CA={...D,point1:q};yA(MA=>{const EA=MA.map(_A=>_A===D?CA:_A);return u.current=EA,EA}),v(CA),M.current=CA}else if(F.current==="handle2"){const q={time:rA,price:lA},aA=ie([{time:D.point1.time,value:D.point1.price},{time:q.time,value:q.price}]);aA.length>0&&D.series.setData(aA);const CA={...D,point2:q};yA(MA=>{const EA=MA.map(_A=>_A===D?CA:_A);return u.current=EA,EA}),v(CA),M.current=CA}else if(F.current==="line"){const q=T.current;if(!q)return;const aA=C.timeScale().coordinateToTime(q.x),CA=U.coordinateToPrice(q.y);if(aA==null||CA==null)return;const MA=rA-aA,EA=lA-CA,_A={time:RA(q.point1.time+MA),price:q.point1.price+EA},ze={time:RA(q.point2.time+MA),price:q.point2.price+EA},We=ie([{time:_A.time,value:_A.price},{time:ze.time,value:ze.price}]);We.length>0&&D.series.setData(We);const Fe={...D,point1:_A,point2:ze};yA(ht=>{const St=ht.map(Vs=>Vs===D?Fe:Vs);return u.current=St,St}),v(Fe),M.current=Fe}}},P=()=>{F.current=null,T.current=null},gA={capture:!0,passive:!1};return x.addEventListener("mousedown",K,gA),x.addEventListener("mousemove",N,gA),x.addEventListener("mouseup",P,gA),()=>{x.removeEventListener("mousedown",K,gA),x.removeEventListener("mousemove",N,gA),x.removeEventListener("mouseup",P,gA)}},[j,UA,yA]),Q.useEffect(()=>{const C=a.current,U=l.current;if(!C||!U)return;const x=()=>{const S=w;if(!S||S.type!=="trendline"||!S.point1||!S.point2){E([]);return}const Z=C.timeScale(),tA=Z.timeToCoordinate(S.point1.time),K=U.priceToCoordinate(S.point1.price),N=Z.timeToCoordinate(S.point2.time),P=U.priceToCoordinate(S.point2.price);tA!=null&&K!=null&&N!=null&&P!=null?E([{x:tA,y:K},{x:N,y:P}]):E([])};x();const _=C.timeScale();return _.subscribeVisibleTimeRangeChange(x),()=>{_.unsubscribeVisibleTimeRangeChange(x)}},[w]),Q.useEffect(()=>{!a.current||!l.current||u.current.forEach(C=>{C.series&&C.series.applyOptions({visible:wA}),C.priceLine&&C.priceLine.applyOptions(wA?{color:"#3b82f6",axisLabelVisible:!0,title:typeof C.price=="number"?C.price.toFixed(5):""}:{color:"rgba(0,0,0,0)",axisLabelVisible:!1,title:""}),C.type==="fibonacci"&&C.priceLines&&C.priceLines.forEach(U=>{try{U.applyOptions({lineVisible:wA,axisLabelVisible:wA})}catch{}}),C.type==="rectangle"&&C.series&&C.series.applyOptions({visible:wA}),C.type==="parallellines"&&(C.baseLine&&C.baseLine.applyOptions({visible:wA}),C.parallelLine&&C.parallelLine.applyOptions({visible:wA}),C.firstLine&&C.firstLine.applyOptions({visible:wA}),C.secondLine&&C.secondLine.applyOptions({visible:wA}))})},[wA,UA]),Q.useEffect(()=>{!wA&&w&&(v(null),E([]))},[wA,w]),Q.useEffect(()=>{if(u.current.length>UA.length){const C=u.current.filter((U,x)=>!UA.includes(U));w&&C.some(U=>U===w)&&(v(null),E([])),C.forEach(U=>{if(U.series&&a.current?.removeSeries(U.series),U.priceLine&&l.current?.removePriceLine(U.priceLine),U.type==="fibonacci"&&U.priceLines&&U.priceLines.forEach(x=>{try{l.current?.removePriceLine(x)}catch{}}),U.type==="rectangle"&&U.series)try{a.current?.removeSeries(U.series)}catch{}if(U.type==="parallellines")try{U.baseLine&&a.current?.removeSeries(U.baseLine),U.parallelLine&&a.current?.removeSeries(U.parallelLine),U.firstLine&&a.current?.removeSeries(U.firstLine),U.secondLine&&a.current?.removeSeries(U.secondLine)}catch{}}),u.current=UA}},[UA,w]),Q.useEffect(()=>{const C=l.current;return C?(Te.current.forEach(x=>{try{C.removePriceLine(x)}catch{}}),Te.current=[],FA.filter(x=>x.symbol===AA).forEach(x=>{const _=parseFloat(x.price);if(isNaN(_))return;const Z=x.type==="BUY"?"#26A69A":"#EF5350",tA=C.createPriceLine({price:_,color:Z,lineWidth:2,lineStyle:0,axisLabelVisible:!0,title:`${x.type} ${x.volume} @ ${x.price}`,textColor:Z});Te.current.push(tA)}),()=>{Te.current.forEach(x=>{try{C.removePriceLine(x)}catch{}}),Te.current=[]}):void 0},[FA,AA]),h.jsx("div",{className:`flex-1 flex flex-col min-w-0 overflow-hidden ${HA==="light"?"bg-white":"bg-[#12161d]"}`,children:h.jsxs("div",{ref:o,className:"flex-1 w-full h-full relative",style:{cursor:j===1||j!==null?"crosshair":"default",minHeight:0,minWidth:0},onDoubleClick:C=>{a.current&&!d.current&&(C.preventDefault(),C.stopPropagation(),a.current.timeScale().fitContent(),nA(a.current.timeScale().getVisibleRange()))},children:[t&&h.jsx("div",{className:"absolute top-3 left-3 z-30",children:h.jsx(Lg,{bidPrice:A,askPrice:e,onBuyClick:_o,onSellClick:Oo})}),h.jsx(ac,{isOpen:bi,onClose:xt,orderType:J,bidPrice:A,askPrice:e}),wA&&w?.type==="trendline"&&w?.point1&&w?.point2&&y.length===2&&h.jsx("div",{className:"absolute inset-0 z-20 pointer-events-none","aria-hidden":!0,children:y.map((C,U)=>h.jsx("div",{className:"absolute w-[10px] h-[10px] rounded-full border-2 border-white bg-[#22c55e] shadow",style:{left:C.x-5,top:C.y-5}},U))})]})})}),kA={container:{position:"relative",display:"inline-block",fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif"},button:{display:"flex",alignItems:"center",gap:"6px",padding:"6px 12px",backgroundColor:"#1e293b",border:"1px solid #334155",borderRadius:"6px",color:"#e2e8f0",fontSize:"13px",fontWeight:600,cursor:"pointer",minWidth:"120px",justifyContent:"space-between",transition:"all 0.15s ease"},buttonHover:{borderColor:"#3b82f6",backgroundColor:"#1e3a5f"},arrow:{fontSize:"10px",color:"#94a3b8",transition:"transform 0.2s ease"},arrowOpen:{transform:"rotate(180deg)"},dropdown:{position:"absolute",top:"100%",left:0,marginTop:"4px",backgroundColor:"#1e293b",border:"1px solid #334155",borderRadius:"8px",boxShadow:"0 8px 24px rgba(0,0,0,0.4)",zIndex:1e3,minWidth:"220px",maxHeight:"320px",overflow:"hidden",display:"flex",flexDirection:"column"},searchContainer:{padding:"8px",borderBottom:"1px solid #334155"},searchInput:{width:"100%",padding:"6px 10px",backgroundColor:"#0f172a",border:"1px solid #334155",borderRadius:"4px",color:"#e2e8f0",fontSize:"12px",outline:"none",boxSizing:"border-box"},list:{overflowY:"auto",maxHeight:"260px",padding:"4px 0"},item:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"8px 12px",cursor:"pointer",fontSize:"13px",color:"#cbd5e1",transition:"background-color 0.1s ease"},itemSelected:{backgroundColor:"#1e3a5f",color:"#60a5fa"},symbolName:{fontWeight:600},symbolPrice:{fontSize:"11px",color:"#94a3b8"},priceUp:{color:"#26A69A"},priceDown:{color:"#EF5350"},categoryLabel:{padding:"6px 12px 4px",fontSize:"10px",fontWeight:700,color:"#64748b",textTransform:"uppercase",letterSpacing:"0.05em"},empty:{padding:"16px",textAlign:"center",color:"#64748b",fontSize:"12px"}};function Cu({style:s,className:A}){const{selectedSymbol:e,setSelectedSymbol:t,symbols:r,symbolsLoading:i}=oe(),[n,o]=Q.useState(!1),[a,l]=Q.useState(""),[c,u]=Q.useState(-1),d=Q.useRef(null),g=Q.useRef(null);Q.useEffect(()=>{const w=v=>{d.current&&!d.current.contains(v.target)&&(o(!1),l(""))};return document.addEventListener("mousedown",w),()=>document.removeEventListener("mousedown",w)},[]),Q.useEffect(()=>{n&&g.current&&g.current.focus()},[n]);const B=r.filter(w=>w.symbol.toLowerCase().includes(a.toLowerCase())),f=B.filter(w=>!w.symbol.endsWith("USDT")),p=B.filter(w=>w.symbol.endsWith("USDT")),m=w=>{t(w),o(!1),l("")};return r.find(w=>w.symbol===e),h.jsxs("div",{ref:d,style:{...kA.container,...s},className:A,children:[h.jsxs("button",{style:kA.button,onClick:()=>o(!n),onMouseEnter:w=>Object.assign(w.currentTarget.style,kA.buttonHover),onMouseLeave:w=>{w.currentTarget.style.borderColor="#334155",w.currentTarget.style.backgroundColor="#1e293b"},children:[h.jsx("span",{children:i?"Loading...":e||"Select Coin"}),h.jsx("span",{style:{...kA.arrow,...n?kA.arrowOpen:{}},children:"▼"})]}),n&&h.jsxs("div",{style:kA.dropdown,children:[h.jsx("div",{style:kA.searchContainer,children:h.jsx("input",{ref:g,style:kA.searchInput,type:"text",placeholder:"Search symbol...",value:a,onChange:w=>l(w.target.value)})}),h.jsx("div",{style:kA.list,children:B.length===0?h.jsx("div",{style:kA.empty,children:"No symbols found"}):h.jsxs(h.Fragment,{children:[f.length>0&&h.jsxs(h.Fragment,{children:[h.jsx("div",{style:kA.categoryLabel,children:"Forex & Metals"}),f.map(w=>h.jsxs("div",{style:{...kA.item,...w.symbol===e?kA.itemSelected:{}},onClick:()=>m(w.symbol),onMouseEnter:v=>{w.symbol!==e&&(v.currentTarget.style.backgroundColor="#334155")},onMouseLeave:v=>{w.symbol!==e&&(v.currentTarget.style.backgroundColor="transparent")},children:[h.jsx("span",{style:kA.symbolName,children:w.symbol}),w.bid&&h.jsx("span",{style:{...kA.symbolPrice,...parseFloat(w.change)>=0?kA.priceUp:kA.priceDown},children:parseFloat(w.bid).toFixed(5)})]},w.symbol))]}),p.length>0&&h.jsxs(h.Fragment,{children:[h.jsx("div",{style:kA.categoryLabel,children:"Crypto"}),p.map(w=>h.jsxs("div",{style:{...kA.item,...w.symbol===e?kA.itemSelected:{}},onClick:()=>m(w.symbol),onMouseEnter:v=>{w.symbol!==e&&(v.currentTarget.style.backgroundColor="#334155")},onMouseLeave:v=>{w.symbol!==e&&(v.currentTarget.style.backgroundColor="transparent")},children:[h.jsx("span",{style:kA.symbolName,children:w.symbol}),w.bid&&h.jsx("span",{style:{...kA.symbolPrice,...parseFloat(w.change)>=0?kA.priceUp:kA.priceDown},children:parseFloat(w.bid).toFixed(2)})]},w.symbol))]})]})})]})]})}const Ge={container:{display:"inline-flex",alignItems:"center",gap:"4px",fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif"},label:{fontSize:"11px",color:"#94a3b8",fontWeight:600,textTransform:"uppercase",letterSpacing:"0.03em",marginRight:"4px",whiteSpace:"nowrap"},btn:{display:"flex",alignItems:"center",justifyContent:"center",width:"26px",height:"26px",backgroundColor:"#1e293b",border:"1px solid #334155",borderRadius:"4px",color:"#e2e8f0",fontSize:"14px",fontWeight:700,cursor:"pointer",transition:"all 0.15s ease",padding:0,lineHeight:1,userSelect:"none"},btnHover:{borderColor:"#3b82f6",backgroundColor:"#1e3a5f"},input:{width:"70px",padding:"4px 6px",backgroundColor:"#0f172a",border:"1px solid #334155",borderRadius:"4px",color:"#e2e8f0",fontSize:"13px",fontWeight:600,textAlign:"center",outline:"none",boxSizing:"border-box"},presets:{display:"inline-flex",gap:"2px",marginLeft:"4px"},preset:{padding:"3px 8px",backgroundColor:"#1e293b",border:"1px solid #334155",borderRadius:"4px",color:"#94a3b8",fontSize:"11px",cursor:"pointer",transition:"all 0.15s ease",whiteSpace:"nowrap"},presetActive:{backgroundColor:"#1e3a5f",borderColor:"#3b82f6",color:"#60a5fa"}},pv=[.01,.05,.1,.5,1];function vu({value:s,onChange:A,min:e=.01,max:t=100,step:r=.01,presets:i=pv,showPresets:n=!0,showLabel:o=!0,label:a="Vol",style:l,className:c}){const[u,d]=Q.useState(.1),g=s!==void 0?s:u,B=Q.useCallback(w=>{const v=Math.max(e,Math.min(t,parseFloat(w)||e)),y=Math.round(v/r)*r,E=parseFloat(y.toFixed(8));s!==void 0||d(E),A?.(E)},[e,t,r,s,A]),f=()=>B(g+r),p=()=>B(g-r),m=(g>=1,g.toFixed(2));return h.jsxs("div",{style:{...Ge.container,...l},className:c,children:[o&&h.jsx("span",{style:Ge.label,children:a}),h.jsx("button",{style:Ge.btn,onClick:p,onMouseEnter:w=>Object.assign(w.currentTarget.style,Ge.btnHover),onMouseLeave:w=>{w.currentTarget.style.borderColor="#334155",w.currentTarget.style.backgroundColor="#1e293b"},children:"−"}),h.jsx("input",{style:Ge.input,type:"text",value:m,onChange:w=>{const v=w.target.value;if(v===""||v==="."||v==="0.")return;const y=parseFloat(v);isNaN(y)||B(y)},onBlur:()=>B(g)}),h.jsx("button",{style:Ge.btn,onClick:f,onMouseEnter:w=>Object.assign(w.currentTarget.style,Ge.btnHover),onMouseLeave:w=>{w.currentTarget.style.borderColor="#334155",w.currentTarget.style.backgroundColor="#1e293b"},children:"+"}),n&&i&&i.length>0&&h.jsx("div",{style:Ge.presets,children:i.map(w=>h.jsx("button",{style:{...Ge.preset,...Math.abs(g-w)<1e-4?Ge.presetActive:{}},onClick:()=>B(w),onMouseEnter:v=>{Math.abs(g-w)>=1e-4&&Object.assign(v.currentTarget.style,{borderColor:"#3b82f6"})},onMouseLeave:v=>{Math.abs(g-w)>=1e-4&&(v.currentTarget.style.borderColor="#334155")},children:w},w))})]})}const Be={container:{display:"inline-flex",alignItems:"center",gap:"6px",fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif"},label:{fontSize:"11px",fontWeight:700,color:"#EF5350",textTransform:"uppercase",letterSpacing:"0.03em",whiteSpace:"nowrap"},toggle:{position:"relative",width:"32px",height:"18px",borderRadius:"9px",cursor:"pointer",transition:"background-color 0.2s ease",border:"none",padding:0},toggleOff:{backgroundColor:"#334155"},toggleOn:{backgroundColor:"#EF5350"},toggleKnob:{position:"absolute",top:"2px",width:"14px",height:"14px",borderRadius:"50%",backgroundColor:"#fff",transition:"left 0.2s ease"},knobOff:{left:"2px"},knobOn:{left:"16px"},inputGroup:{display:"inline-flex",alignItems:"center",gap:"4px"},input:{width:"90px",padding:"4px 8px",backgroundColor:"#0f172a",border:"1px solid #334155",borderRadius:"4px",color:"#e2e8f0",fontSize:"13px",fontWeight:600,textAlign:"right",outline:"none",boxSizing:"border-box",transition:"border-color 0.15s ease"},modeBtn:{padding:"3px 8px",backgroundColor:"#1e293b",border:"1px solid #334155",borderRadius:"4px",color:"#94a3b8",fontSize:"10px",cursor:"pointer",transition:"all 0.15s ease",whiteSpace:"nowrap"},modeBtnActive:{backgroundColor:"#3b1515",borderColor:"#EF5350",color:"#EF5350"}};function bu({value:s,onChange:A,enabled:e,onEnabledChange:t,mode:r,onModeChange:i,showToggle:n=!0,showModeSwitch:o=!0,showLabel:a=!0,label:l="SL",style:c,className:u}){const{currentSymbolData:d}=oe(),[g,B]=Q.useState(""),[f,p]=Q.useState(!1),[m,w]=Q.useState("price"),v=s!==void 0?s:g,y=e!==void 0?e:f,E=r!==void 0?r:m,F=Q.useCallback(z=>{e!==void 0||p(z),t?.(z)},[e,t]),T=Q.useCallback(z=>{r!==void 0||w(z),i?.(z)},[r,i]),M=Q.useCallback(z=>{s!==void 0||B(z),A?.(z)},[s,A]),I=z=>{const fA=z.target.value;if(fA===""||fA==="."||fA==="0."){M(fA);return}const W=parseFloat(fA);isNaN(W)||M(fA)},cA=E==="price"?d?.bid?parseFloat(d.bid).toFixed(5):"0.00000":"50";return h.jsxs("div",{style:{...Be.container,...c},className:u,children:[a&&h.jsx("span",{style:Be.label,children:l}),n&&h.jsx("button",{style:{...Be.toggle,...y?Be.toggleOn:Be.toggleOff},onClick:()=>F(!y),children:h.jsx("div",{style:{...Be.toggleKnob,...y?Be.knobOn:Be.knobOff}})}),(y||!n)&&h.jsxs("div",{style:Be.inputGroup,children:[h.jsx("input",{style:Be.input,type:"text",value:v,onChange:I,placeholder:cA,onFocus:z=>z.currentTarget.style.borderColor="#EF5350",onBlur:z=>z.currentTarget.style.borderColor="#334155"}),o&&h.jsxs(h.Fragment,{children:[h.jsx("button",{style:{...Be.modeBtn,...E==="price"?Be.modeBtnActive:{}},onClick:()=>T("price"),children:"Price"}),h.jsx("button",{style:{...Be.modeBtn,...E==="pips"?Be.modeBtnActive:{}},onClick:()=>T("pips"),children:"Pips"})]})]})]})}const ge={container:{display:"inline-flex",alignItems:"center",gap:"6px",fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif"},label:{fontSize:"11px",fontWeight:700,color:"#26A69A",textTransform:"uppercase",letterSpacing:"0.03em",whiteSpace:"nowrap"},toggle:{position:"relative",width:"32px",height:"18px",borderRadius:"9px",cursor:"pointer",transition:"background-color 0.2s ease",border:"none",padding:0},toggleOff:{backgroundColor:"#334155"},toggleOn:{backgroundColor:"#26A69A"},toggleKnob:{position:"absolute",top:"2px",width:"14px",height:"14px",borderRadius:"50%",backgroundColor:"#fff",transition:"left 0.2s ease"},knobOff:{left:"2px"},knobOn:{left:"16px"},inputGroup:{display:"inline-flex",alignItems:"center",gap:"4px"},input:{width:"90px",padding:"4px 8px",backgroundColor:"#0f172a",border:"1px solid #334155",borderRadius:"4px",color:"#e2e8f0",fontSize:"13px",fontWeight:600,textAlign:"right",outline:"none",boxSizing:"border-box",transition:"border-color 0.15s ease"},modeBtn:{padding:"3px 8px",backgroundColor:"#1e293b",border:"1px solid #334155",borderRadius:"4px",color:"#94a3b8",fontSize:"10px",cursor:"pointer",transition:"all 0.15s ease",whiteSpace:"nowrap"},modeBtnActive:{backgroundColor:"#0d2e2a",borderColor:"#26A69A",color:"#26A69A"}};function Qu({value:s,onChange:A,enabled:e,onEnabledChange:t,mode:r,onModeChange:i,showToggle:n=!0,showModeSwitch:o=!0,showLabel:a=!0,label:l="TP",style:c,className:u}){const{currentSymbolData:d}=oe(),[g,B]=Q.useState(""),[f,p]=Q.useState(!1),[m,w]=Q.useState("price"),v=s!==void 0?s:g,y=e!==void 0?e:f,E=r!==void 0?r:m,F=Q.useCallback(z=>{e!==void 0||p(z),t?.(z)},[e,t]),T=Q.useCallback(z=>{r!==void 0||w(z),i?.(z)},[r,i]),M=Q.useCallback(z=>{s!==void 0||B(z),A?.(z)},[s,A]),I=z=>{const fA=z.target.value;if(fA===""||fA==="."||fA==="0."){M(fA);return}const W=parseFloat(fA);isNaN(W)||M(fA)},cA=E==="price"?d?.ask?parseFloat(d.ask).toFixed(5):"0.00000":"50";return h.jsxs("div",{style:{...ge.container,...c},className:u,children:[a&&h.jsx("span",{style:ge.label,children:l}),n&&h.jsx("button",{style:{...ge.toggle,...y?ge.toggleOn:ge.toggleOff},onClick:()=>F(!y),children:h.jsx("div",{style:{...ge.toggleKnob,...y?ge.knobOn:ge.knobOff}})}),(y||!n)&&h.jsxs("div",{style:ge.inputGroup,children:[h.jsx("input",{style:ge.input,type:"text",value:v,onChange:I,placeholder:cA,onFocus:z=>z.currentTarget.style.borderColor="#26A69A",onBlur:z=>z.currentTarget.style.borderColor="#334155"}),o&&h.jsxs(h.Fragment,{children:[h.jsx("button",{style:{...ge.modeBtn,...E==="price"?ge.modeBtnActive:{}},onClick:()=>T("price"),children:"Price"}),h.jsx("button",{style:{...ge.modeBtn,...E==="pips"?ge.modeBtnActive:{}},onClick:()=>T("pips"),children:"Pips"})]})]})]})}const wv=[{id:1,name:"Crosshair",icon:"+"},{id:2,name:"Trend Line",icon:"╱"},{id:3,name:"Parallel Channel",icon:"═"},{id:4,name:"Fibonacci",icon:"≡"},{id:5,name:"Rectangle",icon:"▭"},{id:6,name:"Price Level",icon:"─"}],Re={container:{display:"inline-flex",alignItems:"center",gap:"2px",fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif"},label:{fontSize:"11px",color:"#94a3b8",fontWeight:600,textTransform:"uppercase",letterSpacing:"0.03em",marginRight:"4px",whiteSpace:"nowrap"},btn:{display:"flex",alignItems:"center",justifyContent:"center",width:"30px",height:"30px",backgroundColor:"#1e293b",border:"1px solid #334155",borderRadius:"4px",color:"#94a3b8",fontSize:"14px",cursor:"pointer",transition:"all 0.15s ease",padding:0,position:"relative"},btnActive:{backgroundColor:"#1e3a5f",borderColor:"#3b82f6",color:"#60a5fa"},btnHover:{borderColor:"#3b82f6",backgroundColor:"#1e3a5f"},tooltip:{position:"absolute",bottom:"calc(100% + 6px)",left:"50%",transform:"translateX(-50%)",padding:"4px 8px",backgroundColor:"#0f172a",border:"1px solid #334155",borderRadius:"4px",color:"#e2e8f0",fontSize:"11px",whiteSpace:"nowrap",pointerEvents:"none",zIndex:100},divider:{width:"1px",height:"20px",backgroundColor:"#334155",margin:"0 4px"},deleteBtn:{display:"flex",alignItems:"center",justifyContent:"center",width:"30px",height:"30px",backgroundColor:"#1e293b",border:"1px solid #334155",borderRadius:"4px",color:"#94a3b8",fontSize:"13px",cursor:"pointer",transition:"all 0.15s ease",padding:0},deleteBtnHover:{borderColor:"#EF5350",backgroundColor:"#3b1515",color:"#EF5350"},visibilityBtn:{display:"flex",alignItems:"center",justifyContent:"center",width:"30px",height:"30px",backgroundColor:"#1e293b",border:"1px solid #334155",borderRadius:"4px",color:"#94a3b8",fontSize:"13px",cursor:"pointer",transition:"all 0.15s ease",padding:0}};function yu({showLabel:s=!0,showDelete:A=!0,showVisibility:e=!0,tools:t,label:r="Draw",style:i,className:n}){const{activeTool:o,setActiveTool:a,drawingsVisible:l,setDrawingsVisible:c,chartObjects:u,setChartObjects:d}=oe(),[g,B]=Q.useState(null),f=t||wv,p=v=>{a(o===v?null:v)},m=()=>{d([]),a(null)},w=()=>{c(!l)};return h.jsxs("div",{style:{...Re.container,...i},className:n,children:[s&&h.jsx("span",{style:Re.label,children:r}),f.map(v=>h.jsxs("button",{style:{...Re.btn,...o===v.id?Re.btnActive:{}},onClick:()=>p(v.id),onMouseEnter:y=>{B(v.id),o!==v.id&&Object.assign(y.currentTarget.style,Re.btnHover)},onMouseLeave:y=>{B(null),o!==v.id&&(y.currentTarget.style.borderColor="#334155",y.currentTarget.style.backgroundColor="#1e293b",y.currentTarget.style.color="#94a3b8")},title:v.name,children:[v.icon,g===v.id&&h.jsx("div",{style:Re.tooltip,children:v.name})]},v.id)),(A||e)&&h.jsx("div",{style:Re.divider}),e&&h.jsx("button",{style:{...Re.visibilityBtn,...l?{}:{color:"#64748b",backgroundColor:"#0f172a"}},onClick:w,onMouseEnter:v=>{v.currentTarget.style.borderColor="#3b82f6"},onMouseLeave:v=>{v.currentTarget.style.borderColor="#334155"},title:l?"Hide Drawings":"Show Drawings",children:l?"👁":"○"}),A&&h.jsx("button",{style:Re.deleteBtn,onClick:m,onMouseEnter:v=>Object.assign(v.currentTarget.style,Re.deleteBtnHover),onMouseLeave:v=>{v.currentTarget.style.borderColor="#334155",v.currentTarget.style.backgroundColor="#1e293b",v.currentTarget.style.color="#94a3b8"},title:"Delete All Drawings",children:"🗑"})]})}const Uu={toolbar:{display:"flex",alignItems:"center",gap:"12px",padding:"6px 12px",backgroundColor:"#0f172a",borderBottom:"1px solid #1e293b",fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",flexWrap:"wrap",minHeight:"42px"},divider:{width:"1px",height:"24px",backgroundColor:"#1e293b",flexShrink:0}};function mv({showCoinSelector:s=!0,showVolumeControl:A=!0,showStopLoss:e=!0,showTakeProfit:t=!0,showDrawingTools:r=!0,showDividers:i=!0,volume:n,onVolumeChange:o,stopLoss:a,onStopLossChange:l,stopLossEnabled:c,onStopLossEnabledChange:u,takeProfit:d,onTakeProfitChange:g,takeProfitEnabled:B,onTakeProfitEnabledChange:f,coinSelectorProps:p={},volumeControlProps:m={},stopLossProps:w={},takeProfitProps:v={},drawingToolsProps:y={},style:E,className:F}){const T=[];s&&T.push(h.jsx(Cu,{...p},"coin")),A&&T.push(h.jsx(vu,{value:n,onChange:o,...m},"volume")),e&&T.push(h.jsx(bu,{value:a,onChange:l,enabled:c,onEnabledChange:u,...w},"sl")),t&&T.push(h.jsx(Qu,{value:d,onChange:g,enabled:B,onEnabledChange:f,...v},"tp")),r&&T.push(h.jsx(yu,{...y},"draw"));const M=[];return T.forEach((I,cA)=>{M.push(I),i&&cA<T.length-1&&M.push(h.jsx("div",{style:Uu.divider},`div-${cA}`))}),h.jsx("div",{style:{...Uu.toolbar,...E},className:F,children:M})}const Cv=[{label:"M1",value:"M1"},{label:"M5",value:"M5"},{label:"M15",value:"M15"},{label:"M30",value:"M30"},{label:"H1",value:"H1"},{label:"H4",value:"H4"},{label:"D1",value:"D1"},{label:"W1",value:"W1"}],Mo={container:{display:"inline-flex",alignItems:"center",gap:"2px",fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif"},btn:{padding:"4px 8px",backgroundColor:"#1e293b",border:"1px solid #334155",borderRadius:"4px",color:"#94a3b8",fontSize:"11px",fontWeight:600,cursor:"pointer",transition:"all 0.15s ease",whiteSpace:"nowrap"},btnActive:{backgroundColor:"#1e3a5f",borderColor:"#3b82f6",color:"#60a5fa"}};function vv({style:s,className:A}){const{selectedTimeframe:e,setSelectedTimeframe:t}=oe();return h.jsx("div",{style:{...Mo.container,...s},className:A,children:Cv.map(r=>h.jsx("button",{style:{...Mo.btn,...e===r.value?Mo.btnActive:{}},onClick:()=>t(r.value),onMouseEnter:i=>{e!==r.value&&(i.currentTarget.style.borderColor="#3b82f6")},onMouseLeave:i=>{e!==r.value&&(i.currentTarget.style.borderColor="#334155")},children:r.label},r.value))})}const bv=[{label:"Candles",value:"candles",icon:"📊"},{label:"Line",value:"line",icon:"📈"},{label:"Area",value:"area",icon:"▤"},{label:"Bars",value:"bars",icon:"▥"}],Do={container:{display:"inline-flex",alignItems:"center",gap:"2px",fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif"},btn:{padding:"4px 8px",backgroundColor:"#1e293b",border:"1px solid #334155",borderRadius:"4px",color:"#94a3b8",fontSize:"11px",fontWeight:600,cursor:"pointer",transition:"all 0.15s ease",whiteSpace:"nowrap",display:"flex",alignItems:"center",gap:"3px"},btnActive:{backgroundColor:"#1e3a5f",borderColor:"#3b82f6",color:"#60a5fa"}};function Qv({style:s,className:A}){const{chartType:e,setChartType:t}=oe();return h.jsx("div",{style:{...Do.container,...s},className:A,children:bv.map(r=>h.jsxs("button",{style:{...Do.btn,...e===r.value?Do.btnActive:{}},onClick:()=>t(r.value),onMouseEnter:i=>{e!==r.value&&(i.currentTarget.style.borderColor="#3b82f6")},onMouseLeave:i=>{e!==r.value&&(i.currentTarget.style.borderColor="#334155")},title:r.label,children:[h.jsx("span",{children:r.icon}),h.jsx("span",{children:r.label})]},r.value))})}const le={container:{display:"inline-flex",alignItems:"center",gap:"6px",fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif"},priceBox:{display:"flex",flexDirection:"column",alignItems:"center",padding:"4px 10px",backgroundColor:"#0f172a",borderRadius:"4px",minWidth:"80px"},priceLabel:{fontSize:"9px",color:"#64748b",textTransform:"uppercase",fontWeight:600,letterSpacing:"0.05em"},priceValue:{fontSize:"13px",fontWeight:700,fontFamily:"monospace"},spread:{fontSize:"9px",color:"#64748b",padding:"0 4px",display:"flex",flexDirection:"column",alignItems:"center",gap:"1px"},spreadLabel:{fontSize:"8px",textTransform:"uppercase",letterSpacing:"0.05em"},spreadValue:{fontSize:"10px",fontWeight:700,color:"#94a3b8"},sellBtn:{padding:"6px 16px",backgroundColor:"#7f1d1d",border:"1px solid #991b1b",borderRadius:"4px",color:"#fca5a5",fontSize:"12px",fontWeight:700,cursor:"pointer",transition:"all 0.15s ease",textTransform:"uppercase",letterSpacing:"0.03em",minWidth:"70px"},sellBtnHover:{backgroundColor:"#991b1b",borderColor:"#EF5350"},buyBtn:{padding:"6px 16px",backgroundColor:"#14532d",border:"1px solid #166534",borderRadius:"4px",color:"#86efac",fontSize:"12px",fontWeight:700,cursor:"pointer",transition:"all 0.15s ease",textTransform:"uppercase",letterSpacing:"0.03em",minWidth:"70px"},buyBtnHover:{backgroundColor:"#166534",borderColor:"#26A69A"},status:{fontSize:"10px",padding:"2px 8px",borderRadius:"3px",fontWeight:600,whiteSpace:"nowrap"}};function yv({volume:s=.1,stopLoss:A,takeProfit:e,onTradeExecuted:t,style:r,className:i}){const{selectedSymbol:n,currentSymbolData:o,setOrders:a,setUserBalance:l}=oe(),[c,u]=Q.useState(null),d=parseFloat(o?.bid||0),g=parseFloat(o?.ask||0),B=g>0&&d>0?Math.abs(g-d):0,f=w=>!w||w===0?"-.-----":w>=1e3?w.toFixed(2):w>=1?w.toFixed(4):w.toFixed(5),p=w=>w===0?"-":w>=1?w.toFixed(1):w>=.01?w.toFixed(3):(w*1e4).toFixed(1)+"p",m=Q.useCallback(w=>{if(!n)return;const v=w==="BUY"?g:d;if(!v||v<=0){u({type:"error",message:"No price available"});return}const y={id:Date.now().toString(),ticket:Math.floor(Math.random()*9e5)+1e5,symbol:n,type:w,volume:s,price:v,stopLoss:A?parseFloat(A):null,takeProfit:e?parseFloat(e):null,status:"OPEN",profit:0,swap:0,openAt:new Date().toISOString(),time:new Date().toLocaleTimeString()};a(F=>[...F,y]);const E=s*v*.01;l(F=>F-E),u({type:"success",message:`${w} executed`}),t?.(y),setTimeout(()=>u(null),3e3)},[n,g,d,s,A,e,a,l,t]);return h.jsxs("div",{style:{...le.container,...r},className:i,children:[h.jsx("button",{style:le.sellBtn,onClick:()=>m("SELL"),onMouseEnter:w=>{Object.assign(w.currentTarget.style,le.sellBtnHover)},onMouseLeave:w=>{w.currentTarget.style.backgroundColor="#7f1d1d",w.currentTarget.style.borderColor="#991b1b"},children:"Sell"}),h.jsxs("div",{style:le.priceBox,children:[h.jsx("span",{style:le.priceLabel,children:"Bid"}),h.jsx("span",{style:{...le.priceValue,color:"#EF5350"},children:f(d)})]}),h.jsxs("div",{style:le.spread,children:[h.jsx("span",{style:le.spreadLabel,children:"Spread"}),h.jsx("span",{style:le.spreadValue,children:p(B)})]}),h.jsxs("div",{style:le.priceBox,children:[h.jsx("span",{style:le.priceLabel,children:"Ask"}),h.jsx("span",{style:{...le.priceValue,color:"#26A69A"},children:f(g)})]}),h.jsx("button",{style:le.buyBtn,onClick:()=>m("BUY"),onMouseEnter:w=>{Object.assign(w.currentTarget.style,le.buyBtnHover)},onMouseLeave:w=>{w.currentTarget.style.backgroundColor="#14532d",w.currentTarget.style.borderColor="#166534"},children:"Buy"}),c&&h.jsx("span",{style:{...le.status,backgroundColor:c.type==="success"?"#14532d":"#7f1d1d",color:c.type==="success"?"#86efac":"#fca5a5",border:`1px solid ${c.type==="success"?"#166534":"#991b1b"}`},children:c.message})]})}const vA={container:{fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",backgroundColor:"#0f172a",borderTop:"1px solid #1e293b",fontSize:"11px",overflow:"hidden",display:"flex",flexDirection:"column"},header:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"6px 12px",backgroundColor:"#0f172a",borderBottom:"1px solid #1e293b"},headerTitle:{color:"#94a3b8",fontSize:"11px",fontWeight:700,textTransform:"uppercase",letterSpacing:"0.05em"},summary:{display:"flex",gap:"16px",fontSize:"11px"},summaryItem:{display:"flex",gap:"4px",alignItems:"center"},summaryLabel:{color:"#64748b",fontWeight:600},summaryValue:{fontWeight:700,fontFamily:"monospace"},table:{width:"100%",borderCollapse:"collapse"},th:{padding:"4px 8px",textAlign:"left",color:"#64748b",fontWeight:700,fontSize:"10px",textTransform:"uppercase",letterSpacing:"0.05em",borderBottom:"1px solid #1e293b",whiteSpace:"nowrap"},td:{padding:"4px 8px",color:"#cbd5e1",borderBottom:"1px solid #1e293b",whiteSpace:"nowrap",fontFamily:"monospace",fontSize:"11px"},closeBtn:{padding:"2px 8px",backgroundColor:"#7f1d1d",border:"1px solid #991b1b",borderRadius:"3px",color:"#fca5a5",fontSize:"10px",fontWeight:700,cursor:"pointer",transition:"all 0.15s ease"},emptyRow:{padding:"16px",textAlign:"center",color:"#475569",fontSize:"12px"},scrollArea:{overflowY:"auto",maxHeight:"200px"},typeBuy:{color:"#26A69A",fontWeight:700},typeSell:{color:"#EF5350",fontWeight:700}};function Uv({style:s,className:A,maxHeight:e=200}){const{orders:t,setOrders:r,symbols:i,accountSummary:n,setUserBalance:o}=oe(),[a,l]=Q.useState(null),c=t.filter(f=>f.status==="OPEN"||!f.closeAt),u=Q.useCallback((f,p)=>{const m=i.find(w=>w.symbol===f);return m?parseFloat(p==="BUY"?m.bid||0:m.ask||0):0},[i]),d=Q.useCallback(f=>{if(a)return;l(f.id);const p=u(f.symbol,f.type),w=(f.type==="BUY"?p-f.price:f.price-p)*f.volume,v=f.volume*f.price*.01;r(y=>y.filter(E=>E.id!==f.id)),o(y=>y+v+w),l(null)},[a,u,r,o]),g=f=>{const p=parseFloat(f);return!p||isNaN(p)?"-":p>=1e3?p.toFixed(2):p>=1?p.toFixed(4):p.toFixed(5)},B=f=>{const p=parseFloat(f);return isNaN(p)?"-":(p>=0?"+":"")+p.toFixed(2)};return h.jsxs("div",{style:{...vA.container,...s},className:A,children:[h.jsxs("div",{style:vA.header,children:[h.jsxs("span",{style:vA.headerTitle,children:["Positions (",c.length,")"]}),h.jsxs("div",{style:vA.summary,children:[h.jsxs("div",{style:vA.summaryItem,children:[h.jsx("span",{style:vA.summaryLabel,children:"Balance:"}),h.jsxs("span",{style:{...vA.summaryValue,color:"#e2e8f0"},children:["$",n?.balance?.toFixed(2)||"0.00"]})]}),h.jsxs("div",{style:vA.summaryItem,children:[h.jsx("span",{style:vA.summaryLabel,children:"Equity:"}),h.jsxs("span",{style:{...vA.summaryValue,color:(n?.equity||0)>=(n?.balance||0)?"#26A69A":"#EF5350"},children:["$",n?.equity?.toFixed(2)||"0.00"]})]}),h.jsxs("div",{style:vA.summaryItem,children:[h.jsx("span",{style:vA.summaryLabel,children:"Free:"}),h.jsxs("span",{style:{...vA.summaryValue,color:"#94a3b8"},children:["$",n?.freeMargin?.toFixed(2)||"0.00"]})]})]})]}),h.jsx("div",{style:{...vA.scrollArea,maxHeight:e},children:h.jsxs("table",{style:vA.table,children:[h.jsx("thead",{children:h.jsxs("tr",{children:[h.jsx("th",{style:vA.th,children:"Symbol"}),h.jsx("th",{style:vA.th,children:"Type"}),h.jsx("th",{style:vA.th,children:"Volume"}),h.jsx("th",{style:vA.th,children:"Open Price"}),h.jsx("th",{style:vA.th,children:"Current"}),h.jsx("th",{style:vA.th,children:"SL"}),h.jsx("th",{style:vA.th,children:"TP"}),h.jsx("th",{style:vA.th,children:"Profit"}),h.jsx("th",{style:vA.th,children:"Action"})]})}),h.jsx("tbody",{children:c.length===0?h.jsx("tr",{children:h.jsx("td",{colSpan:9,style:vA.emptyRow,children:"No open positions"})}):c.map(f=>{const p=u(f.symbol,f.type),m=f.profit||0;return h.jsxs("tr",{children:[h.jsx("td",{style:{...vA.td,fontWeight:700,color:"#e2e8f0"},children:f.symbol}),h.jsx("td",{style:{...vA.td,...f.type==="BUY"?vA.typeBuy:vA.typeSell},children:f.type}),h.jsx("td",{style:vA.td,children:f.volume}),h.jsx("td",{style:vA.td,children:g(f.price)}),h.jsx("td",{style:vA.td,children:g(p)}),h.jsx("td",{style:vA.td,children:f.stopLoss?g(f.stopLoss):"-"}),h.jsx("td",{style:vA.td,children:f.takeProfit?g(f.takeProfit):"-"}),h.jsx("td",{style:{...vA.td,color:m>=0?"#26A69A":"#EF5350",fontWeight:700},children:B(m)}),h.jsx("td",{style:vA.td,children:h.jsx("button",{style:{...vA.closeBtn,...a===f.id?{opacity:.5,cursor:"not-allowed"}:{}},onClick:()=>d(f),disabled:a===f.id,onMouseEnter:w=>{a!==f.id&&(w.currentTarget.style.backgroundColor="#991b1b")},onMouseLeave:w=>{w.currentTarget.style.backgroundColor="#7f1d1d"},children:a===f.id?"...":"Close"})})]},f.id)})})]})})]})}var Fu={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Eu=Q.createContext&&Q.createContext(Fu),Fv=["attr","size","title"];function Ev(s,A){if(s==null)return{};var e=xv(s,A),t,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(s);for(r=0;r<i.length;r++)t=i[r],!(A.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(s,t)&&(e[t]=s[t])}return e}function xv(s,A){if(s==null)return{};var e={};for(var t in s)if(Object.prototype.hasOwnProperty.call(s,t)){if(A.indexOf(t)>=0)continue;e[t]=s[t]}return e}function Ci(){return Ci=Object.assign?Object.assign.bind():function(s){for(var A=1;A<arguments.length;A++){var e=arguments[A];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(s[t]=e[t])}return s},Ci.apply(this,arguments)}function xu(s,A){var e=Object.keys(s);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(s);A&&(t=t.filter(function(r){return Object.getOwnPropertyDescriptor(s,r).enumerable})),e.push.apply(e,t)}return e}function vi(s){for(var A=1;A<arguments.length;A++){var e=arguments[A]!=null?arguments[A]:{};A%2?xu(Object(e),!0).forEach(function(t){Sv(s,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(e)):xu(Object(e)).forEach(function(t){Object.defineProperty(s,t,Object.getOwnPropertyDescriptor(e,t))})}return s}function Sv(s,A,e){return A=Hv(A),A in s?Object.defineProperty(s,A,{value:e,enumerable:!0,configurable:!0,writable:!0}):s[A]=e,s}function Hv(s){var A=Lv(s,"string");return typeof A=="symbol"?A:A+""}function Lv(s,A){if(typeof s!="object"||!s)return s;var e=s[Symbol.toPrimitive];if(e!==void 0){var t=e.call(s,A);if(typeof t!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(A==="string"?String:Number)(s)}function Su(s){return s&&s.map((A,e)=>Q.createElement(A.tag,vi({key:e},A.attr),Su(A.child)))}function ko(s){return A=>Q.createElement(Iv,Ci({attr:vi({},s.attr)},A),Su(s.child))}function Iv(s){var A=e=>{var{attr:t,size:r,title:i}=s,n=Ev(s,Fv),o=r||e.size||"1em",a;return e.className&&(a=e.className),s.className&&(a=(a?a+" ":"")+s.className),Q.createElement("svg",Ci({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},e.attr,t,n,{className:a,style:vi(vi({color:s.color||e.color},e.style),s.style),height:o,width:o,xmlns:"http://www.w3.org/2000/svg"}),i&&Q.createElement("title",null,i),s.children)};return Eu!==void 0?Q.createElement(Eu.Consumer,null,e=>A(e)):A(Fu)}function Tv(s){return ko({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"},child:[]}]})(s)}function Mv(s){return ko({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 13H5v-2h14v2z"},child:[]}]})(s)}const Dv=({selectedSymbol:s,selectedTimeframe:A,onTimeframeChange:e,chartType:t="candles",onChartTypeChange:r,onNewOrder:i,onZoomIn:n,onZoomOut:o,onToggleBuySell:a,onDownloadChartPNG:l,onToggleFullscreen:c,marketWatchOpen:u=!0,onToggleMarketWatch:d,buySellPanelOpen:g,onMove:B})=>{const{theme:f}=oe(),p=f==="light",m=["M1","M5","M15","M30","H1","H4","D1","W1","MN"],w={bars:h.jsxs("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",children:[h.jsx("path",{fill:"none",d:"M0 0h24v24H0z"}),h.jsx("path",{fillRule:"evenodd",d:"M20.999 15.002H19v3a1 1 0 0 1-2.001 0V8H15a1 1 0 1 1 0-2h1.999v-3A1 1 0 1 1 19 3v10h1.999a1 1 0 0 1 0 2Zm-10.999-4H6.999v10a1 1 0 1 1-1.999 0v-3H3a1 1 0 0 1 0-2h2v-11a1 1 0 1 1 1.999 0V9H10a1 1 0 0 1 0 2Z",clipRule:"evenodd",fill:"currentColor"})]}),candles:h.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:h.jsx("path",{d:"M9 3V9H11V18H9V21H7V18H5V9H7V3H9ZM17 3V6H19V16H17V19H15V16H13V6H15V3H17ZM17 8H15V14H17V8Z",fill:"currentColor"})}),area:h.jsxs("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",children:[h.jsx("path",{fill:"none",d:"M0 0h24v24H0z"}),h.jsx("path",{d:"m2.166 16.571 7.013-7.194c.38-.583 1.116-.273 1.707.256l4.14 2.31 5.136-6.692c.277-.425 1.853-.182 1.853-.182v13.952H2.047a7.772 7.772 0 0 1 .119-2.45Z",opacity:".2",fill:"currentColor"}),h.jsx("path",{d:"M3.027 18.011a1 1 0 0 1-.81-1.58c.81-1.128 1.5-2.154 2.113-3.065 1.938-2.887 3.22-4.795 5.234-5.042 1.607-.195 3.364.683 6.28 3.212l4.35-6.086a1 1 0 0 1 1.626 1.16l-4.994 6.99a1 1 0 0 1-1.483.16c-2.824-2.552-4.481-3.587-5.536-3.454-1.108.136-2.186 1.742-3.82 4.173-.621.927-1.323 1.971-2.148 3.117a1.001 1.001 0 0 1-.812.415Z",fill:"currentColor"})]}),line:h.jsxs("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",children:[h.jsx("path",{fill:"none",d:"M0 0h24v24H0z"}),h.jsx("path",{d:"M3.027 18.011a1 1 0 0 1-.81-1.58c.81-1.128 1.5-2.154 2.113-3.065 1.938-2.887 3.22-4.795 5.234-5.042 1.607-.195 3.364.683 6.28 3.212l4.35-6.086a1 1 0 0 1 1.626 1.16l-4.994 6.99a1 1 0 0 1-1.483.16c-2.824-2.552-4.481-3.587-5.536-3.454-1.108.136-2.186 1.742-3.82 4.173-.621.927-1.323 1.971-2.148 3.117a1.001 1.001 0 0 1-.812.415Z",fill:"currentColor"})]}),volume:h.jsxs("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",children:[h.jsx("path",{fill:"none",d:"M0 0h24v24H0z"}),h.jsx("path",{fillRule:"evenodd",d:"M19.024 17.844H19a1 1 0 0 1-1-1V13a1 1 0 0 1 1-1h.024a1 1 0 0 1 1 1v3.844a1 1 0 0 1-1 1Zm-3 0H16a1 1 0 0 1-1-1v-5.845A1 1 0 0 1 16 10h.024a1 1 0 0 1 1 .999v5.845a1 1 0 0 1-1 1Zm-3 0H13a1 1 0 0 1-1-1V6.999A1 1 0 0 1 13 6h.024a1 1 0 0 1 1 .999v9.845a1 1 0 0 1-1 1Zm-3 0H10a1 1 0 0 1-1-1V12a1 1 0 0 1 1-1h.024a1 1 0 0 1 1 1v4.844a1 1 0 0 1-1 1Zm-3 0H7a1 1 0 0 1-1-1V9.999A.999.999 0 0 1 7 9h.024a1 1 0 0 1 1 .999v6.845a1 1 0 0 1-1 1Zm-3 0H4a1 1 0 0 1-1-1v-2.845a1 1 0 0 1 1-1h.024a1 1 0 0 1 1 1v2.845a1 1 0 0 1-1 1Z",clipRule:"evenodd",fill:"currentColor"})]}),"volume ticks":h.jsxs("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",children:[h.jsx("path",{d:"M0 0h24v24H0z",fill:"none"}),h.jsx("path",{fillRule:"evenodd",d:"M20.009 6.993h-.985v3.985a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1V6.993h-.946c-.565 0-1.023-.441-1.023-.985v-.024c0-.543.458-.984 1.023-.984h3.955c.565 0 1.023.441 1.023.984v.024c0 .544-.458.985-1.023.985Zm-3.985 6.14v5.845a1 1 0 0 1-1 1H15a1 1 0 0 1-1-1v-5.845a1 1 0 0 1 1-.999h.024a1 1 0 0 1 1 .999Zm-4 6.845H12a1 1 0 0 1-1-1V9.133a1 1 0 0 1 1-.999h.024a1 1 0 0 1 1 .999v9.845a1 1 0 0 1-1 1Zm-3 0H9a1 1 0 0 1-1-1v-4.844a1 1 0 0 1 1-1h.024a1 1 0 0 1 1 1v4.844a1 1 0 0 1-1 1Zm-3 0H6a1 1 0 0 1-1-1v-6.845a.998.998 0 0 1 1-.999h.024a1 1 0 0 1 1 .999v6.845a1 1 0 0 1-1 1Zm-3 0H3a1 1 0 0 1-1-1v-2.845a1 1 0 0 1 1-1h.024a1 1 0 0 1 1 1v2.845a1 1 0 0 1-1 1ZM18 14.134h.024a1 1 0 0 1 1 1v3.844a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-3.844a1 1 0 0 1 1-1Z",clipRule:"evenodd",fill:"currentColor"})]})};return h.jsxs("div",{className:`flex items-center justify-between px-4 py-1 border-b ${p?"bg-white border-slate-200":"bg-[#12161d] border-slate-700"}`,children:[h.jsxs("div",{className:"flex items-center gap-4",children:[h.jsx("div",{className:`flex items-center gap-1 border-r pr-3 ${p?"border-slate-200":"border-slate-700"}`,children:["bars","candles","line","area"].map(v=>h.jsx("button",{onClick:()=>r(v),className:`px-1 py-1.5 text-[11px] font-medium rounded transition-colors capitalize flex items-center gap-1.5
|
|
11
|
+
${t===v?p?"text-sky-600":"text-sky-400":p?"text-slate-700 hover:text-slate-900 hover:bg-[#E5F4FF]":"text-white hover:text-slate-200 hover:bg-slate-800"}
|
|
12
|
+
`,title:v,children:w[v]},v))}),h.jsx("div",{className:`flex items-center gap-1 border-r ${p?"border-slate-200":"border-slate-700"} pr-1`,children:["volume ticks","volume"].map(v=>h.jsx("button",{onClick:()=>r(v),className:`px-1 py-1.5 text-[11px] font-medium rounded transition-colors capitalize flex items-center gap-1.5
|
|
13
|
+
${t===v?p?"text-sky-600":"text-sky-400":p?"text-slate-700 hover:text-slate-900 hover:bg-[#E5F4FF]":"text-white hover:text-slate-200 hover:bg-slate-800"}
|
|
14
|
+
`,title:v,children:w[v]},v))}),h.jsxs("div",{className:"flex items-center gap-2",children:[m.map(v=>h.jsx("button",{onClick:()=>e(v),className:`px-1.5 py-2 text-sm font-medium rounded transition-colors ${A===v?p?"text-sky-600":"text-sky-400":p?"text-slate-700 hover:text-slate-900 hover:bg-[#E5F4FF]":"text-white hover:text-slate-200 hover:bg-slate-800"}`,children:v},v)),h.jsx("div",{className:`border-r h-6 mx-1 ${p?"border-slate-200":"border-slate-700"}`}),h.jsx("button",{onClick:()=>a?.(),title:g?"Hide Buy/Sell on Chart":"Show Buy/Sell on Chart",className:`px-2 py-2 flex justify-center items-center rounded transition-colors ${g?p?"text-sky-600 bg-sky-50 hover:bg-[#E5F4FF]":"text-sky-400 bg-slate-700 hover:bg-[#25303C]":p?"text-slate-600 hover:text-sky-600 hover:bg-[#E5F4FF]":"text-slate-200 hover:bg-[#25303C]"}`,children:h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:h.jsxs("g",{fill:"none",fillRule:"evenodd",children:[h.jsx("path",{fill:"#DA5244",d:"M11.5 5v4H9c-1.054 0-1.918.816-1.995 1.85L7 11v2c0 1.105.895 2 2 2h2.5v4H4c-1.105 0-2-.895-2-2V7c0-1.105.895-2 2-2h7.5z"}),h.jsx("path",{fill:"#3687ED",d:"M20 5c1.105 0 2 .895 2 2v10c0 1.105-.895 2-2 2h-7.5v-4H15c1.054 0 1.918-.816 1.995-1.85L17 13v-2c0-1.105-.895-2-2-2h-2.5V5H20z"}),h.jsx("path",{fill:"#B0BEC5",d:"M10 10h4c1.105 0 2 .895 2 2s-.895 2-2 2h-4c-1.105 0-2-.895-2-2s.895-2 2-2z"})]})})}),h.jsxs("button",{onClick:i,className:`px-2 py-2 flex justify-center items-center gap-1 cursor-pointer text-xs font-medium rounded transition-colors ${p?"text-slate-700 hover:text-slate-900 hover:bg-[#E5F4FF]":"text-white hover:bg-[#25303C]"}`,children:[h.jsx("svg",{width:24,height:24,viewBox:"0 0 24 24 ",xmlns:"http://www.w3.org/2000/svg",children:h.jsxs("g",{fill:"none",fillRule:"evenodd",children:[h.jsx("path",{fill:"#DA5244",d:"M11.5 4v2.02C8.42 6.276 6 8.856 6 12c0 3.145 2.42 5.725 5.5 5.98V20H10c-4.418 0-8-3.582-8-8s3.582-8 8-8h1.5z"}),h.jsx("path",{fill:"#3687ED",d:"M14 4c4.418 0 8 3.582 8 8s-3.582 8-8 8h-1.5v-2.02c3.08-.256 5.5-2.836 5.5-5.98 0-3.145-2.42-5.725-5.5-5.98V4H14z"}),h.jsx("path",{fill:"#B0BEC5",d:"M13 8v4.186l2.657 2.657-1.414 1.414L11 13V8z"})]})}),h.jsx("span",{className:"button-text svelte-1iwf8ix",children:"New Order"})]}),h.jsx("div",{className:`border-r ${p?"border-slate-200":"border-slate-700"} h-6 mx-1`}),h.jsxs("div",{className:"flex items-center gap-1",children:[h.jsx("button",{onClick:n,className:`p-1 ${p?"text-slate-700 hover:bg-[#E5F4FF]":"text-white hover:bg-slate-800"} rounded transition-colors`,title:"Zoom In",children:h.jsx(Tv,{className:"w-5 h-5"})}),h.jsx("button",{onClick:o,className:`p-2 ${p?"text-slate-700 hover:bg-[#E5F4FF]":"text-white hover:bg-slate-800"} rounded transition-colors`,title:"Zoom Out",children:h.jsx(Mv,{className:"w-5 h-5"})}),h.jsx("div",{className:`border-r ${p?"border-slate-200":"border-slate-700"} h-6 mx-1`}),h.jsx("button",{onClick:B,className:`px-2 py-2 flex justify-center items-center gap-1 cursor-pointer text-xs font-medium rounded transition-colors ${p?"text-slate-700 hover:text-slate-900 hover:bg-[#E5F4FF]":"text-slate-200 hover:bg-[#25303C]"}`,children:h.jsx("svg",{width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",children:h.jsx("path",{fillRule:"evenodd",d:"M9 4V5H15V4H17V5H19C20.1046 5 21 5.89543 21 7V18C21 19.1046 20.1046 20 19 20H5C3.89543 20 3 19.1046 3 18V7C3 5.89543 3.89543 5 5 5H7V4H9ZM7 7H6C5.44772 7 5 7.44772 5 8V17C5 17.5523 5.44772 18 6 18H18C18.5523 18 19 17.5523 19 17V8C19 7.44772 18.5523 7 18 7H17V8H15V7H9V8H7V7ZM13 14V16H11V14H13ZM9 14V16H7V14H9ZM17 14V16H15V14H17ZM13 10V12H11V10H13ZM17 10V12H15V10H17Z",clipRule:"evenodd"})})}),h.jsx("div",{className:`border-r ${p?"border-slate-200":"border-slate-700"} h-6 mx-1`}),h.jsx("button",{type:"button",onClick:()=>d?.(),title:u?"Close Market Watch":"Open Market Watch",className:`px-2 py-2 flex justify-center items-center gap-1 cursor-pointer text-xs font-medium rounded transition-colors ${u?p?"text-sky-600 bg-sky-50 hover:bg-[#E5F4FF]":"text-sky-400 bg-slate-700 hover:bg-[#25303C]":p?"text-slate-600 hover:text-sky-600 hover:bg-[#E5F4FF]":"text-slate-200 hover:bg-[#25303C]"}`,children:h.jsxs("svg",{width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",children:[h.jsx("path",{d:"M15 7H7v2h8V7ZM7 15h5v2H7v-2ZM17 11H7v2h10v-2Z"}),h.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19 3a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14Zm-1 2a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h12Z"})]})})]})]})]}),h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsx("button",{type:"button",onClick:()=>l?.(),title:"Download chart as PNG",className:`p-2 rounded transition-colors ${p?"text-slate-500 hover:text-slate-800 hover:bg-slate-100":"text-slate-300 hover:text-white hover:bg-slate-800"}`,children:h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",className:"inline-block",fill:"currentColor",children:h.jsx("path",{d:"M22 10a1 1 0 1 1 0-2 1 1 0 0 1 0 2Zm0-4a1 1 0 0 1-1-1V4h-1a1 1 0 1 1 0-2h1a2 2 0 0 1 2 2v1a1 1 0 0 1-1 1Zm1 7v8a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1v-8l3.764-1s.45-.428.789-1.105l.171-.342a.998.998 0 0 1 .894-.553h4.764a1 1 0 0 1 .894.552l.171.342c.339.678.789 1.106.789 1.106L23 13Zm-8 1a3 3 0 1 0 0 6 3 3 0 0 0 0-6Zm0 4.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3ZM16 4h-2a1 1 0 1 1 0-2h2a1 1 0 1 1 0 2Zm-6 0H8a1 1 0 0 1 0-2h2a1 1 0 1 1 0 2ZM4 22H3a2 2 0 0 1-2-2v-1a1 1 0 1 1 2 0v1h1a1 1 0 1 1 0 2ZM4 4H3v1a1 1 0 0 1-2 0V4a2 2 0 0 1 2-2h1a1 1 0 0 1 0 2ZM2 8a1 1 0 0 1 1 1v1a1 1 0 1 1-2 0V9a1 1 0 0 1 1-1Zm0 5a1 1 0 0 1 1 1v1a1 1 0 1 1-2 0v-1a1 1 0 0 1 1-1Z"})})}),h.jsx("button",{type:"button",onClick:()=>c?.(),title:"Full screen (F11)",className:`p-2 rounded transition-colors ${p?"text-slate-600 hover:text-slate-800 hover:bg-slate-100":"text-slate-300 hover:text-white hover:bg-slate-800"}`,children:h.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5l-5-5m5 5v-4m0 4h-4"})})})]})]})},kv=({AccountId:s,UserName:A,UserId:e})=>{const{activeTool:t,setActiveTool:r,showGrid:i,setShowGrid:n,snapToGrid:o,setSnapToGrid:a,chartObjects:l,setChartObjects:c,drawingsVisible:u,setDrawingsVisible:d,chartLocked:g,setChartLocked:B,theme:f,setTheme:p}=oe(),[m,w]=Q.useState(!1),[v,y]=Q.useState(null),[E,F]=Q.useState({chart:"Grid",colors:"Green & Red",lang:"English"}),T=Q.useRef(null),M=Q.useRef(null);Q.useEffect(()=>{const H=X=>{if(!m)return;const sA=T.current;sA&&!sA.contains(X.target)&&(w(!1),y(null))};return window.addEventListener("mousedown",H),()=>window.removeEventListener("mousedown",H)},[m]),Q.useEffect(()=>{const H=X=>{X.key==="Escape"&&(w(!1),y(null))};return window.addEventListener("keydown",H),()=>window.removeEventListener("keydown",H)},[]);const I=Q.useMemo(()=>[{icon:h.jsx("div",{className:"icon svelte-1qoe9jm",style:{width:"calc(var(--indent-half) * 6)",height:"calc(var(--indent-half) * 6)",cursor:"pointer"},children:h.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[h.jsx("path",{d:"M0 0h24v24H0z",fill:"none"}),h.jsx("path",{d:"M3 18H21V16H3V18ZM3 13H21V11H3V13ZM3 6V8H21V6H3Z",fill:"currentColor"})]})}),label:"Menu",description:"Opens/closes navigation menu"},{icon:h.jsx("div",{className:"icon svelte-1qoe9jm",style:{width:"calc(var(--indent-half) * 6)",height:"calc(var(--indent-half) * 6)",cursor:"pointer"},children:h.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[h.jsx("path",{d:"M12 13C12.5523 13 13 12.5523 13 12C13 11.4477 12.5523 11 12 11C11.4477 11 11 11.4477 11 12C11 12.5523 11.4477 13 12 13Z",fill:"currentColor"}),h.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20 13H15.874C15.5122 14.4056 14.4056 15.5122 13 15.874V20C13 20.2652 12.8946 20.5196 12.7071 20.7071C12.5196 20.8946 12.2652 21 12 21C11.7348 21 11.4804 20.8946 11.2929 20.7071C11.1054 20.5196 11 20.2652 11 20V15.874C9.59439 15.5122 8.4878 14.4056 8.12602 13H4C3.73478 13 3.48043 12.8946 3.29289 12.7071C3.10536 12.5196 3 12.2652 3 12C3 11.7348 3.10536 11.4804 3.29289 11.2929C3.48043 11.1054 3.73478 11 4 11H8.12602C8.4878 9.59439 9.59439 8.4878 11 8.12602V4C11 3.73478 11.1054 3.48043 11.2929 3.29289C11.4804 3.10536 11.7348 3 12 3C12.2652 3 12.5196 3.10536 12.7071 3.29289C12.8946 3.48043 13 3.73478 13 4V8.12602C14.4056 8.4878 15.5122 9.59439 15.874 11H20C20.2652 11 20.5196 11.1054 20.7071 11.2929C20.8946 11.4804 21 11.7348 21 12C21 12.2652 20.8946 12.5196 20.7071 12.7071C20.5196 12.8946 20.2652 13 20 13ZM12 10C10.8954 10 10 10.8954 10 12C10 13.1046 10.8954 14 12 14C13.1046 14 14 13.1046 14 12C14 10.8954 13.1046 10 12 10Z",fill:"currentColor"})]})}),label:"Crosshair",description:"Precise cursor positioning for measurement on chart"},{icon:h.jsx("div",{className:"icon svelte-1qoe9jm",style:{width:"calc(var(--indent-half) * 6)",height:"calc(var(--indent-half) * 6)",cursor:"pointer"},children:h.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",children:[h.jsx("path",{fill:"none",d:"M0 0h24v24H0z"}),h.jsx("path",{fillRule:"evenodd",d:"M19.054 7.988a2.988 2.988 0 0 1-1.31-.312l-10 10a3.027 3.027 0 1 1-1.38-1.381l10-10a2.994 2.994 0 1 1 2.69 1.693Zm-14 10a1 1 0 1 0 0 2 1 1 0 0 0 0-2Zm14-14a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z",clipRule:"evenodd",fill:"currentColor"})]})}),label:"Trend Line",description:"Draw trend line (drag from first point to second point)"},{icon:h.jsx("div",{className:"icon svelte-1qoe9jm",style:{width:"calc(var(--indent-half) * 6)",height:"calc(var(--indent-half) * 6)",cursor:"pointer"},children:h.jsx("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",children:h.jsx("path",{d:"m2.285 10.333 8.048-8.048a.977.977 0 1 1 1.381 1.381l-8.048 8.049a.977.977 0 0 1-1.381-1.382Zm10 10 8.048-8.048a.977.977 0 1 1 1.381 1.381l-8.048 8.049a.977.977 0 0 1-1.381-1.382ZM19 8a2.966 2.966 0 0 1-1.308-.312l-10 10c.202.408.307.857.308 1.312a3.03 3.03 0 1 1-1.693-2.689l10-10A2.993 2.993 0 1 1 19 8ZM5 18a1 1 0 1 0 0 2 1 1 0 0 0 0-2ZM19 4a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z",fillRule:"evenodd",clipRule:"evenodd",fill:"currentColor"})})}),label:"Parallel Lines",description:"Draw two parallel trend lines (draw first line, then second)"},{icon:h.jsx("div",{className:"icon svelte-1qoe9jm",style:{width:"calc(var(--indent-half) * 6)",height:"calc(var(--indent-half) * 6)",cursor:"pointer"},children:h.jsx("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",children:h.jsx("path",{d:"M21 15H3a1 1 0 0 1 0-2h18a1 1 0 0 1 0 2Zm-2-3a2.99 2.99 0 0 1-2.816-2H3a1 1 0 0 1 0-2h13.184A2.995 2.995 0 1 1 19 12Zm0-4a1 1 0 1 0 0 2 1 1 0 0 0 0-2Zm2-3H3a1 1 0 0 1 0-2h18a1 1 0 1 1 0 2ZM5 16a2.99 2.99 0 0 1 2.816 2H21a1 1 0 0 1 0 2H7.816A2.995 2.995 0 1 1 5 16Zm0 4a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",fillRule:"evenodd",clipRule:"evenodd",fill:"currentColor"})})}),label:"Fibonacci",description:"Draw Fibonacci retracement levels"},{icon:h.jsx(h.Fragment,{children:h.jsx("div",{className:"icon svelte-1qoe9jm",style:{width:"calc(var(--indent-half) * 6)",height:"calc(var(--indent-half) * 6)",cursor:"pointer"},children:h.jsx("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",children:h.jsx("path",{d:"M3 6C3 7.30622 3.83481 8.41746 5 8.82929V15.1707C3.83481 15.5825 3 16.6938 3 18C3 19.6569 4.34315 21 6 21C7.30622 21 8.41746 20.1652 8.82929 19H15.1707C15.5825 20.1652 16.6938 21 18 21C19.6569 21 21 19.6569 21 18C21 16.6938 20.1652 15.5825 19 15.1707V8.82929C20.1652 8.41746 21 7.30622 21 6C21 4.34315 19.6569 3 18 3C16.6938 3 15.5825 3.83481 15.1707 5H8.82929C8.41746 3.83481 7.30622 3 6 3C4.34315 3 3 4.34315 3 6ZM6 7C6.55228 7 7 6.55228 7 6C7 5.44772 6.55228 5 6 5C5.44772 5 5 5.44772 5 6C5 6.55228 5.44772 7 6 7ZM17 15.1707V8.82929C16.1476 8.52801 15.472 7.85242 15.1707 7H8.82929C8.52801 7.85241 7.85241 8.52801 7 8.82929V15.1707C7.85241 15.472 8.52801 16.1476 8.82929 17H15.1707C15.472 16.1476 16.1476 15.472 17 15.1707ZM18 7C18.5523 7 19 6.55228 19 6C19 5.44772 18.5523 5 18 5C17.4477 5 17 5.44772 17 6C17 6.55228 17.4477 7 18 7ZM7 18C7 18.5523 6.55228 19 6 19C5.44772 19 5 18.5523 5 18C5 17.4477 5.44772 17 6 17C6.55228 17 7 17.4477 7 18ZM19 18C19 18.5523 18.5523 19 18 19C17.4477 19 17 18.5523 17 18C17 17.4477 17.4477 17 18 17C18.5523 17 19 17.4477 19 18Z",fillRule:"evenodd",clipRule:"evenodd",fill:"currentColor"})})})}),label:"Rectangle",description:"Draw support/resistance zone (drag from corner to corner)"},{icon:h.jsx("div",{className:"icon svelte-1qoe9jm",style:{width:"calc(var(--indent-half) * 6)",height:"calc(var(--indent-half) * 6)",cursor:"pointer"},children:h.jsx("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",children:h.jsx("path",{d:"M4 12h16M4 12v.01M16 12v.01",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})}),label:"Price Level",description:"Add horizontal price line (click on chart)"},{icon:h.jsx("div",{className:"icon svelte-1qoe9jm",style:{width:"calc(var(--indent-half) * 6)",height:"calc(var(--indent-half) * 6)",cursor:"pointer"},children:h.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:h.jsx("path",{d:"M20 4V8H18V6H13V18H16V20H8V18H11V6H6V8H4V4H20Z",fill:"currentColor"})})}),label:"Text",description:"Add text label on chart (coming soon)"},{icon:h.jsx(h.Fragment,{children:h.jsx("div",{className:"icon svelte-1qoe9jm",style:{width:"calc(var(--indent-half) * 6)",height:"calc(var(--indent-half) * 6)",cursor:"pointer"},children:h.jsx("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",children:h.jsx("path",{d:"M12.76 17.958c-.504.07-1.016.07-1.52 0C6.07 17.532 2 12.932 2 12c0-.977 4.48-6 10-6s10 5.043 10 6c0 .912-4.07 5.529-9.24 5.958ZM3.63 12a11.724 11.724 0 0 0 3.03 2.741 5.963 5.963 0 0 1 .02-5.492A11.7 11.7 0 0 0 3.63 12ZM12 7.57a4.443 4.443 0 1 0-.006 8.886A4.443 4.443 0 0 0 12 7.57Zm5.31 1.652a5.954 5.954 0 0 1 .01 5.546A11.45 11.45 0 0 0 20.37 12a11.525 11.525 0 0 0-3.06-2.778ZM12 14a2 2 0 1 1 0-4 2 2 0 0 1 0 4Z",fillRule:"evenodd",clipRule:"evenodd",fill:"currentColor"})})})}),label:"Eye",description:"Show or hide all drawing objects on chart"},{icon:h.jsx(h.Fragment,{children:h.jsx("div",{className:"icon svelte-1qoe9jm",style:{width:"calc(var(--indent-half) * 6)",height:"calc(var(--indent-half) * 6)",cursor:"pointer"},children:h.jsx("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",children:h.jsx("path",{d:"M16 20H8a2 2 0 0 1-2-2v-7a2 2 0 0 1 1.05-1.749A1.044 1.044 0 0 1 7 9a5 5 0 0 1 8.75-3.3 1.008 1.008 0 0 1-.09 1.411 1 1 0 0 1-1.41-.09A3 3 0 0 0 9 9h7a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2Zm0-9H8v7h8v-7Zm-4 2a1 1 0 0 1 1 1v1a1 1 0 0 1-2 0v-1a1 1 0 0 1 1-1Z",fillRule:"evenodd",clipRule:"evenodd",fill:"currentColor"})})})}),label:"Lock",description:"Lock chart (disable pan and zoom)"},{icon:h.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})}),label:"Delete",description:"Remove last drawn object from chart"},{icon:h.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16M6 4v16M12 4v16M18 4v16"})}),label:"Grid",description:"Toggle grid display on/off for chart alignment"},{icon:h.jsxs("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[h.jsx("circle",{cx:"12",cy:"12",r:"8",strokeWidth:2}),h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4l-3 3m6-3l-3-3"})]}),label:"History",description:"Undo/redo actions and view action history"},{icon:h.jsxs("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[h.jsx("rect",{x:"3",y:"3",width:"8",height:"8",strokeWidth:2}),h.jsx("rect",{x:"13",y:"3",width:"8",height:"8",strokeWidth:2}),h.jsx("rect",{x:"3",y:"13",width:"8",height:"8",strokeWidth:2}),h.jsx("rect",{x:"13",y:"13",width:"8",height:"8",strokeWidth:2})]}),label:"Layout",description:"Manage chart layouts and panel arrangements"}],[]),cA=H=>{const X=I[H].label;if(X==="Menu"){w(sA=>!sA),y(null);return}if(X==="Grid"){n(!i);return}if(X==="Magnet"){a(!o),r(o?null:H);return}if(X==="Delete"){if(l.length>0){const sA=[...l];sA.pop(),c(sA)}return}if(X==="Eye"){d(!u);return}if(X==="Lock"){B(!g);return}if(X==="Light Theme"||X==="Dark Theme"){p(f==="light"?"dark":"light"),w(!1),y(null);return}r(t===H?null:H)},z=I.slice(0,12),fA=I.slice(12),W=[{key:"accounts",label:"Trading accounts",icon:h.jsx(h.Fragment,{children:h.jsx("div",{className:"icon svelte-1qoe9jm",style:{width:"calc(var(--indent-half) * 6)",height:"calc(var(--indent-half) * 6)"},children:h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",children:h.jsx("path",{d:"M12 2a10 10 0 1 1 0 20 10 10 0 0 1 0-20zm0 14a6 6 0 0 0-5 2 8 8 0 0 0 5 2l5-2a6 6 0 0 0-5-2zm0-12a8 8 0 0 0-6 13 8 8 0 0 1 6-3 8 8 0 0 1 6 3 8 8 0 0 0-6-13zm0 2a4 4 0 1 1 0 8 4 4 0 0 1 0-8zm0 2a2 2 0 1 0 0 4 2 2 0 0 0 0-4z",fill:"currentColor"})})})}),submenu:[{label:"Connect to account",icon:h.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[h.jsx("path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),h.jsx("path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]})},{label:"Open Demo account",icon:h.jsx(h.Fragment,{children:h.jsx("div",{className:"icon svelte-1qoe9jm",style:{width:"calc(var(--indent-half) * 6)",height:"calc(var(--indent-half) * 6)"},children:h.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[h.jsx("path",{fill:"#CDFDDA",fillRule:"evenodd",d:"M14.5 13.103c1.836 0 3.667.723 5.5 2.14V19l-10.5.5-.5-4.257c1.833-1.417 3.664-2.14 5.5-2.14Z","clip-rule":"evenodd"}),h.jsx("path",{fill:"#00AC00",fillRule:"evenodd",d:"M9.53 15.469 9.5 19l10-.477v-3.032c-1.703-1.27-3.365-1.888-5-1.888-1.626 0-3.277.611-4.97 1.866Zm-.836-.622c1.895-1.465 3.83-2.244 5.806-2.244 1.975 0 3.91.78 5.806 2.244l.194.15v4.48l-12.03.545V15.02l.224-.173Z","clip-rule":"evenodd"}),h.jsx("path",{fill:"#CDFDDA",fillRule:"evenodd",d:"m7.736 13.701-.734 2.345L7.001 20H4.5a1 1 0 0 1-1-1v-4c1.412-.669 2.824-1.102 4.236-1.299Z","clip-rule":"evenodd"}),h.jsx("path",{fill:"#00AC00",fillRule:"evenodd",d:"m7.913 13.678-.475 1.086c-.988.111-1.87.308-2.646.59l-.29.11v3.529H7L7.002 20H4.5a1 1 0 0 1-1-1v-4c1.471-.697 2.942-1.138 4.413-1.322Z","clip-rule":"evenodd"}),h.jsx("path",{fill:"#CDFDDA",d:"M14.5 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z"}),h.jsx("path",{fill:"#00AC00",fillRule:"evenodd",d:"M14.5 4a4 4 0 1 1 0 8 4 4 0 0 1 0-8Zm0 1a3 3 0 1 0 0 6 3 3 0 0 0 0-6Z","clip-rule":"evenodd"}),h.jsx("path",{fill:"#00AC00",d:"M11.471 11.979A4.992 4.992 0 0 1 9.5 8c0-.67.131-1.308.37-1.891a3.5 3.5 0 1 0 1.601 5.87Z"}),h.jsx("path",{fill:"#CDFDDA",d:"M9.586 7.07a2.5 2.5 0 1 0 1.153 4.226A4.981 4.981 0 0 1 9.5 8c0-.318.03-.63.086-.93Z"})]})})})}]},{key:"chart",label:"Chart settings",icon:h.jsx(h.Fragment,{children:h.jsx("div",{className:"icon svelte-1qoe9jm",style:{width:"calc(var(--indent-half) * 6)",height:"calc(var(--indent-half) * 6)"},children:h.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:h.jsx("path",{d:"M9 3V9H11V18H9V21H7V18H5V9H7V3H9ZM17 3V6H19V16H17V19H15V16H13V6H15V3H17ZM17 8H15V14H17V8Z",stroke:"currentColor"})})})}),submenu:[{label:"Grid",icon:h.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:h.jsx("g",{clipPath:"url(#a)",children:h.jsx("path",{fillRule:"evenodd","clip-rule":"evenodd",d:"M20 6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V6zm-2 3V6h-3v3h3zm-4-3h-4v2.999h4V6zM9 6H6v3l3-.001V6zm-3 4v4l3-.001v-4H6zm0 5v3h3v-3.001H6zm4 3h4v-3.001h-4V18zm5 0h3v-3h-3v3zm3-4v-4h-3v4h3zm-8-.001v-4h4v4h-4z",fill:"currentColor"})})})},{label:"Trade Orders",icon:h.jsx(h.Fragment,{children:h.jsx("div",{className:"icon svelte-1qoe9jm",style:{width:"calc(var(--indent-half) * 6)",height:"calc(var(--indent-half) * 6)"},children:h.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[h.jsx("path",{d:"M4 9H20V10H4V9Z",fill:"#3183FF"}),h.jsx("path",{d:"M4 17H20V18H4V17Z",fill:"#EA4C4C"}),h.jsx("react",{x:"4",y:"14",width:"5",height:"2",fill:"#EA4C4C"}),h.jsx("react",{x:"4",y:"6",width:"5",height:"2",fill:"#3183FF"})]})})})},{label:"Trade Position",icon:h.jsx(h.Fragment,{children:h.jsx("div",{className:"icon svelte-1qoe9jm",style:{width:"calc(var(--indent-half) * 6)",height:"calc(var(--indent-half) * 6)"},children:h.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[h.jsx("path",{d:"M16 10L12 5H20L16 10Z",fill:"#D95852"}),h.jsx("path",{d:"M16 10H20V11H4V10H16Z",fill:"#D95852"}),h.jsx("path",{d:"M20 13H4V14H8L4 19H12L8 14H20V13Z",fill:"#4682F7"})]})})})},{label:"Trade History",icon:h.jsx(h.Fragment,{children:h.jsx("div",{className:"icon svelte-1qoe9jm",style:{width:"calc(var(--indent-half) * 6)",height:"calc(var(--indent-half) * 6)"},children:h.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[h.jsx("path",{d:"M4 19L8 14L12 19H4Z",fill:"#3183FF"}),h.jsx("path",{d:"M7 16L17.5 8",stroke:"#3183FF",strokeDasharray:"2 2"}),h.jsx("path",{d:"M13 5L17 10L21 5H13Z",fill:"#EA4C4C"})]})})})},{label:"SL/TP Levels",icon:h.jsx(h.Fragment,{children:h.jsx("div",{className:"icon svelte-1qoe9jm",style:{width:"calc(var(--indent-half) * 6)",height:"calc(var(--indent-half) * 6)"},children:h.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[h.jsx("path",{d:"m4.688 17.773-.375.91c.43.277.911.415 1.445.415.614 0 1.104-.15 1.469-.45.367-.299.55-.68.55-1.144 0-.258-.044-.491-.132-.7a1.568 1.568 0 0 0-.387-.55c-.17-.159-.446-.332-.828-.52-.727-.354-1.09-.695-1.09-1.023 0-.198.064-.358.191-.48.13-.126.313-.188.547-.188.396 0 .772.128 1.129.383l.309-.875c-.31-.248-.796-.371-1.457-.371-.508 0-.925.146-1.25.437a1.421 1.421 0 0 0-.485 1.102c0 .237.04.453.121.648.084.195.2.365.352.508.154.14.45.322.887.543.44.219.73.417.87.594.141.177.212.363.212.558 0 .417-.299.625-.895.625-.388 0-.782-.14-1.184-.422ZM8.68 13.277V19h3.601v-.902H9.695v-4.82H8.68ZM20 20H4v1h16v-1Z",fill:"#EA4C4C"}),h.jsx("path",{d:"M10.5 10V7.895c.193.018.346.027.46.027 1.548 0 2.321-.656 2.321-1.969 0-.588-.21-1.02-.629-1.297-.416-.278-1.076-.418-1.98-.418-.115 0-.51.015-1.188.043V10H10.5Zm0-3.008V5.16c.099-.013.202-.02.309-.02.955 0 1.433.298 1.433.891 0 .35-.107.602-.32.758-.214.154-.552.23-1.016.23-.099 0-.234-.009-.406-.027Z",fill:"#3183FF",fillRule:"evenodd","clip-rule":"evenodd"}),h.jsx("path",{d:"M6.914 10V5.18h1.902v-.903H4.078v.903h1.82V10h1.016ZM20 11H4v1h16v-1Z",fill:"#3183FF"})]})})})},{label:"Ask Price",icon:h.jsx(h.Fragment,{children:h.jsx("div",{className:"icon svelte-1qoe9jm",style:{width:"calc(var(--indent-half) * 6)",height:"calc(var(--indent-half) * 6)"},children:h.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:h.jsx("path",{d:"m6.926 14-.418-1.16H4.547L4.148 14H3.02L5.3 8.2h.446l2.3 5.8h-1.12ZM5.523 9.95l-.687 2.113H6.21l-.688-2.114Zm2.86 3.734.375-.91c.4.28.795.421 1.183.421.597 0 .895-.208.895-.625a.886.886 0 0 0-.211-.558c-.14-.177-.431-.375-.871-.594-.438-.221-.733-.402-.887-.543a1.506 1.506 0 0 1-.351-.508 1.682 1.682 0 0 1-.121-.648c0-.443.161-.81.484-1.102.325-.291.742-.437 1.25-.437.661 0 1.147.123 1.457.37l-.309.876a1.909 1.909 0 0 0-1.129-.383c-.234 0-.416.062-.546.187a.635.635 0 0 0-.192.48c0 .33.363.67 1.09 1.024.383.188.659.361.828.52.17.156.298.34.387.55.088.209.133.442.133.7 0 .463-.184.845-.551 1.144-.365.3-.854.45-1.469.45a2.617 2.617 0 0 1-1.445-.414Zm7.613.316-1.594-2.438-.636.872V14H12.75V8.277h1.016v2.739l1.945-2.739h1.156l-1.793 2.5L17.211 14h-1.215ZM3 15h18v1H3z",fill:"#C96057"})})})})},{label:"Chart Controls",icon:h.jsx(h.Fragment,{children:h.jsx("div",{className:"icon svelte-1qoe9jm",style:{width:"calc(var(--indent-half) * 6)",height:"calc(var(--indent-half) * 6)"},children:h.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[h.jsx("path",{d:"M0 0h24v24H0z",fill:"none"}),h.jsx("path",{d:"M10 10L20 14L18 16L20 18L18 20L16 18L14 20L10 10Z",fill:"currentColor"}),h.jsx("path",{d:"M11.2574 18.9959C11.1719 18.9986 11.0861 19 11 19C6.58172 19 3 15.4183 3 11C3 6.58172 6.58172 3 11 3C15.4183 3 19 6.58172 19 11C19 11.0599 18.9993 11.1196 18.998 11.1791L16.9574 10.2813C16.6023 7.3064 14.0705 5 11 5C7.68629 5 5 7.68629 5 11C5 14.191 7.49101 16.8002 10.6345 16.9891L11.2574 18.9959Z",fill:"currentColor"})]})})})},{label:"Trade Notification",icon:h.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[h.jsx("path",{d:"M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),h.jsx("path",{d:"M13.73 21a2 2 0 0 1-3.46 0",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]})},{label:"Crosshair cursor",icon:h.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[h.jsx("path",{d:"M12 12m-3 0a3 3 0 1 0 6 0a3 3 0 1 0-6 0",stroke:"currentColor",strokeWidth:"2"}),h.jsx("path",{d:"M12 2v4M12 18v4M2 12h4M18 12h4",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]})},{label:"Show OHLC",icon:h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:h.jsx("path",{d:"M7 17V7M12 17v-6M17 17v-4",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}]},{key:"oneclick",label:"One Click Trading",icon:h.jsx(h.Fragment,{children:h.jsx("div",{className:"icon svelte-1qoe9jm",style:{width:"calc(var(--indent-half) * 6)",height:"calc(var(--indent-half) * 6)"},children:h.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:h.jsx("path",{d:"M20.9914 12.3966L18.9885 11.5954C18.7789 7.91769 15.7302 5 12 5C8.13401 5 5 8.13401 5 12C5 15.7302 7.91769 18.7789 11.5954 18.9885L12.3966 20.9914C12.2651 20.9971 12.1329 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12C21 12.1329 20.9971 12.2651 20.9914 12.3966ZM11 11L21 15L19 17L22 20L20 22L17 19L15 21L11 11Z",fill:"currentColor"})})})})},{key:"theme",label:f==="light"?"Dark Theme":"Light Theme",icon:h.jsx(h.Fragment,{children:h.jsx("div",{className:"icon svelte-1qoe9jm",style:{width:"calc(var(--indent-half) * 6)",height:"calc(var(--indent-half) * 6)"},children:h.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[h.jsx("path",{d:"m4.408 12.954-2.265-.756a.209.209 0 0 1 0-.396l2.265-.755a.209.209 0 0 1 .276.198v1.51c0 .143-.14.244-.276.198ZM5.959 7.306 4.89 5.17c-.09-.18.1-.37.28-.28l2.136 1.068a.209.209 0 0 1 .054.334L6.293 7.36c-.1.101-.27.074-.334-.054ZM11.802 21.857l-.755-2.265a.209.209 0 0 1 .198-.276h1.51c.143 0 .244.14.198.276l-.755 2.265a.21.21 0 0 1-.396 0ZM11.802 2.143l-.755 2.265a.209.209 0 0 0 .198.276h1.51c.143 0 .244-.14.198-.276l-.755-2.265a.209.209 0 0 0-.396 0ZM18.83 19.11l-2.137-1.068a.209.209 0 0 1-.054-.335l1.068-1.068c.1-.1.27-.073.334.055l1.069 2.136c.09.18-.101.37-.28.28ZM16.693 5.958 18.83 4.89c.18-.09.37.1.28.28l-1.068 2.136a.209.209 0 0 1-.334.054l-1.068-1.068a.209.209 0 0 1 .054-.334ZM4.89 18.83l1.069-2.136a.209.209 0 0 1 .334-.055l1.068 1.068c.101.101.074.271-.054.335L5.171 19.11c-.18.09-.37-.1-.28-.28ZM21.857 12.198l-2.265.755a.209.209 0 0 1-.276-.198v-1.51c0-.143.14-.244.276-.198l2.265.755a.21.21 0 0 1 0 .396Z",fill:"#FEBC5A"}),h.jsx("circle",{cx:"12",cy:"12",r:"5",fill:"#FED05A"})]})})})},{key:"colors",label:"Color Templates",icon:h.jsx(h.Fragment,{children:h.jsx("div",{className:"icon svelte-1qoe9jm",style:{width:"calc(var(--indent-half) * 6)",height:"calc(var(--indent-half) * 6)"},children:h.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[h.jsx("path",{fillRule:"evenodd",d:"M20.775 8.992C20.922 9.638 21 10.31 21 11a8.354 8.354 0 0 0-.787 0c-1.467.072-2.422.564-3.082 1.283l-1.18-1.65c.761-.718 1.697-1.205 2.81-1.452A7 7 0 1 0 12 18c.396-.001.565-.082.63-.12.07-.042.17-.124.295-.34.218-.375.36-.835.534-1.49l1.518 1.822C14.485 19.102 13.705 20 12 20a9 9 0 1 1 8.775-11.008Z","clip-rule":"evenodd",fill:"currentColor"}),h.jsx("circle",{cx:"8.5",cy:"12.5",r:"1.5",fill:"currentColor"}),h.jsx("circle",{cx:"9.5",cy:"8.5",r:"1.5",fill:"currentColor"}),h.jsx("circle",{cx:"13.5",cy:"7.5",r:"1.5",fill:"currentColor"}),h.jsx("path",{d:"M13.892 14.693c-2.034.46-2.59-1.07-2.892-4.693 3.85.352 5.232 1.05 4.697 3.012L20 17.192s.038 1.023-.361 1.447c-.463.49-1.687.361-1.687.361l-4.06-4.307Z",fill:"currentColor"})]})})}),submenu:[{label:"Green & Red",icon:h.jsx(h.Fragment,{children:h.jsx("div",{className:"icon svelte-1qoe9jm",style:{width:"calc(var(--indent-half) * 6)",height:"calc(var(--indent-half) * 6)"},children:h.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[h.jsx("path",{d:"M17.0579 5.11914V7.08486H19.0236V17.8963H17.0579V20.8449H15.0922V17.8963H13.1265V7.08486H15.0922V5.11914H17.0579Z",fill:"#ef5350"}),h.jsx("path",{d:"M9.19522 7.08376V3.15234H7.22951V7.08376H5.26379V15.9295H7.22951V20.8438H9.19522V15.9295H11.1609V7.08376H9.19522Z",fill:"#26a69a"})]})})})},{label:"Blue & Red",icon:h.jsx(h.Fragment,{children:h.jsx("div",{className:"icon svelte-1qoe9jm",style:{width:"calc(var(--indent-half) * 6)",height:"calc(var(--indent-half) * 6)"},children:h.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[h.jsx("path",{d:"M17.0579 5.11914V7.08486H19.0236V17.8963H17.0579V20.8449H15.0922V17.8963H13.1265V7.08486H15.0922V5.11914H17.0579Z",fill:"#ff574d"}),h.jsx("path",{d:"M9.19522 7.08376V3.15234H7.22951V7.08376H5.26379V15.9295H7.22951V20.8438H9.19522V15.9295H11.1609V7.08376H9.19522Z",fill:"#578cf2"})]})})})},{label:"Black & White",icon:h.jsx(h.Fragment,{children:h.jsx("div",{className:"icon svelte-1qoe9jm",style:{width:"calc(var(--indent-half) * 6)",height:"calc(var(--indent-half) * 6)"},children:h.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[h.jsx("path",{d:"M17.0579 5.11914V7.08486H19.0236V17.8963H17.0579V20.8449H15.0922V17.8963H13.1265V7.08486H15.0922V5.11914H17.0579Z",fill:"#7a7a7a"}),h.jsx("path",{d:"M9.19522 7.08376V3.15234H7.22951V7.08376H5.26379V15.9295H7.22951V20.8438H9.19522V15.9295H11.1609V7.08376H9.19522Z",fill:"#ffffff"})]})})})},{label:"Neutral",icon:h.jsx(h.Fragment,{children:h.jsx("div",{className:"icon svelte-1qoe9jm",style:{width:"calc(var(--indent-half) * 6)",height:"calc(var(--indent-half) * 6)"},children:h.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[h.jsx("path",{d:"M17.0579 5.11914V7.08486H19.0236V17.8963H17.0579V20.8449H15.0922V17.8963H13.1265V7.08486H15.0922V5.11914H17.0579Z",fill:"#c86a6a"}),h.jsx("path",{d:"M9.19522 7.08376V3.15234H7.22951V7.08376H5.26379V15.9295H7.22951V20.8438H9.19522V15.9295H11.1609V7.08376H9.19522Z",fill:"#76ac85"})]})})})}]},{key:"lang",label:"Language",rightText:"EN",icon:h.jsx(h.Fragment,{children:h.jsx("div",{className:"icon svelte-1qoe9jm",style:{width:"calc(var(--indent-half) * 6)",height:"calc(var(--indent-half) * 6)"},children:h.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:h.jsx("path",{d:"M17.9 17.39C17.64 16.59 16.89 16 16 16H15V13C15 12.4477 14.5523 12 14 12H8V10H10C10.5523 10 11 9.55228 11 9V7H13C14.1046 7 15 6.10457 15 5V4.59C17.93 5.77 20 8.64 20 12C20 14.08 19.2 15.97 17.9 17.39ZM11 19.93C7.05 19.44 4 16.08 4 12C4 11.38 4.08 10.78 4.21 10.21L9 15V16C9 17.1046 9.89543 18 11 18V19.93ZM12 2C6.47715 2 2 6.47715 2 12C2 14.6522 3.05357 17.1957 4.92893 19.0711C6.8043 20.9464 9.34784 22 12 22C14.6522 22 17.1957 20.9464 19.0711 19.0711C20.9464 17.1957 22 14.6522 22 12C22 9.34784 20.9464 6.8043 19.0711 4.92893C17.1957 3.05357 14.6522 2 12 2Z",fill:"currentColor"})})})}),submenu:[{label:"English",icon:h.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[h.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2"}),h.jsx("path",{d:"M2 12h20M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]})},{label:"Arabic",icon:h.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[h.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2"}),h.jsx("path",{d:"M2 12h20M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]})},{label:"Bulgarian",icon:h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:h.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2"})})},{label:"Chinese Simplified",icon:h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:h.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2"})})},{label:"Chinese Traditional",icon:h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:h.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2"})})},{label:"Czech",icon:h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:h.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2"})})},{label:"Dutch",icon:h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:h.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2"})})},{label:"Urdu",icon:h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:h.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2"})})}]},{key:"shortcuts",label:"Shortcuts",icon:h.jsx(h.Fragment,{children:h.jsx("div",{className:"icon svelte-1qoe9jm",style:{width:"calc(var(--indent-half) * 6)",height:"calc(var(--indent-half) * 6)"},children:h.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:h.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 20C7.59 20 4 16.41 4 12C4 7.59 7.59 4 12 4C16.41 4 20 7.59 20 12C20 16.41 16.41 20 12 20ZM11 18H13V16H11V18ZM12 6C9.79 6 8 7.79 8 10H10C10 8.9 10.9 8 12 8C13.1 8 14 8.9 14 10C14 12 11 11.75 11 15H13C13 12.75 16 12.5 16 10C16 7.79 14.21 6 12 6Z",fill:"currentColor"})})})})},{key:"contact",label:"Contact us",icon:h.jsx(h.Fragment,{children:h.jsx("div",{className:"icon svelte-1qoe9jm",style:{width:"calc(var(--indent-half) * 6)",height:"calc(var(--indent-half) * 6)"},children:h.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:h.jsx("path",{d:"M5 4C3.89543 4 3 4.89543 3 6V15C3 16.1046 3.89543 17 5 17H5.98719L6 21L13 17H19C20.1046 17 21 16.1046 21 15V6C21 4.89543 20.1046 4 19 4H5ZM6 6H18C18.5128 6 18.9355 6.38604 18.9933 6.88338L19 7V14C19 14.5128 18.614 14.9355 18.1166 14.9933L18 15H12.5339C12.4234 15 12.314 15.0183 12.21 15.0539L12.108 15.0952L8 17.0289V16C8 15.4872 7.61396 15.0645 7.11662 15.0067L7 15H6C5.48716 15 5.06449 14.614 5.00673 14.1166L5 14V7C5 6.48716 5.38604 6.06449 5.88338 6.00673L6 6Z",fillRule:"evenodd","clip-rule":"evenodd",fill:"currentColor"})})})})},{key:"about",label:"About program",icon:h.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[h.jsx("path",{d:"M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20Z",stroke:"currentColor",strokeWidth:"2"}),h.jsx("path",{d:"M12 10v7",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),h.jsx("path",{d:"M12 7h.01",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round"})]})}],nA=({item:H})=>{const X=!!H.submenu?.length;return h.jsxs("div",{className:"relative",onMouseEnter:()=>{M.current&&(clearTimeout(M.current),M.current=null),X&&y(H.key)},onMouseLeave:()=>{X&&(M.current=setTimeout(()=>y(null),120))},children:[h.jsxs("button",{type:"button",onClick:()=>{X?y(sA=>sA===H.key?null:H.key):(H.key==="theme"&&p(sA=>sA==="light"?"dark":"light"),w(!1),y(null))},className:`w-full flex items-center gap-3 px-4 py-2.5 text-left text-[13px] ${j?"text-slate-700 hover:bg-slate-100":"text-slate-200 hover:bg-[#202933]"}`,children:[h.jsx("span",{className:`w-5 h-5 flex shrink-0 items-center justify-center ${j?"text-slate-500":"text-slate-400"}`,children:H.icon}),h.jsx("span",{className:"flex-1 text-[15px]",children:H.label}),H.rightText&&h.jsx("span",{className:`text-xs ${j?"text-slate-500":"text-slate-400"}`,children:H.rightText}),X&&h.jsx("svg",{className:`w-4 h-4 ${j?"text-slate-500":"text-slate-400"}`,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:h.jsx("path",{d:"M9 6l6 6-6 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})]}),X&&v===H.key&&h.jsx("div",{className:`absolute top-0 left-full ml-0 w-52 min-w-44 rounded-md shadow-2xl overflow-hidden z-100 border ${j?"bg-white border-slate-200":"bg-[#262F3F] border-white/10"}`,children:h.jsx("div",{className:"py-1",children:H.submenu.map((sA,UA)=>{const yA=E[H.key]===sA.label||sA.selected&&E[H.key]==null;return h.jsxs("button",{type:"button",onClick:()=>{F(FA=>({...FA,[H.key]:sA.label})),console.log("Sub selected:",H.key,sA.label)},className:`w-full flex items-center gap-3 pl-3 pr-3 py-2 text-[13px] text-left ${j?"text-slate-700 hover:bg-slate-100":"text-slate-200 hover:bg-[#202933]"}`,children:[h.jsx("span",{className:`w-5 h-5 flex shrink-0 items-center justify-center ${j?"text-slate-500":"text-slate-400"}`,children:sA.icon||null}),h.jsx("span",{className:"flex-1 min-w-0",children:sA.label}),yA&&h.jsx("span",{className:"w-5 h-5 flex shrink-0 items-center justify-center text-emerald-400",children:h.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:h.jsx("path",{d:"M20 6L9 17l-5-5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]},UA)})})})]})},j=f==="light";return h.jsxs("div",{className:"relative h-full",children:[h.jsxs("div",{className:`w-12 flex flex-col items-center py-3 h-full border-r ${j?"bg-white border-slate-200":"bg-[#12161d] border-slate-700"}`,children:[h.jsx("div",{className:"flex flex-col items-center gap-2",children:z.map((H,X)=>h.jsxs(Q.Fragment,{children:[h.jsx("button",{onClick:()=>cA(X),className:`w-10 h-10 flex items-center justify-center rounded-md transition-colors duration-150
|
|
15
|
+
${H.label==="Grid"&&i||H.label==="Eye"&&!u||H.label==="Lock"&&g||t===X?j?"text-sky-600 bg-sky-100":"text-sky-300 bg-slate-700":j?"text-slate-600 hover:text-slate-900 hover:bg-slate-100":"text-slate-400 hover:text-slate-100 hover:bg-slate-700"}`,title:`${H.label}: ${H.description}`,children:H.icon}),H.label==="Text"&&h.jsx("div",{className:`w-8 border-t my-1 ${j?"border-slate-200":"border-slate-700"}`})]},H.label))}),h.jsx("div",{className:"flex-1"}),h.jsx("div",{className:"flex flex-col items-center gap-2 pb-1",children:fA.map((H,X)=>{const sA=12+X;return h.jsx("button",{onClick:()=>cA(sA),className:`w-10 h-10 flex items-center justify-center rounded-md transition-colors duration-150
|
|
16
|
+
${H.label==="Grid"&&i||H.label==="Eye"&&!u||H.label==="Lock"&&g||t===sA?j?"text-sky-600 bg-sky-100":"text-sky-300 bg-slate-700":j?"text-slate-600 hover:text-slate-900 hover:bg-slate-100":"text-slate-400 hover:text-slate-100 hover:bg-slate-700"}`,title:`${H.label}: ${H.description}`,children:H.icon},H.label)})})]}),m&&h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"fixed inset-0 z-40 bg-black/20",onClick:()=>{w(!1),y(null)},"aria-hidden":"true"}),h.jsxs("div",{ref:T,className:`absolute left-12 top-2 z-50 w-68 border shadow-2xl overflow-visible ${j?"bg-white border-slate-200":"bg-[#262F3F] border-white/10"}`,children:[h.jsxs("div",{className:`relative px-4 py-3 border-b overflow-hidden ${j?"bg-white border-slate-200":"border-white/10 bg-[#262F3F]"}`,children:[h.jsx("div",{className:`text-[16px] font-medium pr-12 ${j?"text-slate-800":"text-slate-100"}`,children:A||"MT5 Account"}),h.jsx("div",{className:`text-[12px] mt-0.5 ${j?"text-slate-500":"text-slate-400"}`,children:s})]}),h.jsx("div",{className:"py-2",children:W.map(H=>h.jsx(nA,{item:H},H.key))})]})]})]})};function _v(s){return ko({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M337.509 305.372h-17.501l-6.571-5.486c20.791-25.232 33.922-57.054 33.922-93.257C347.358 127.632 283.896 64 205.135 64 127.452 64 64 127.632 64 206.629s63.452 142.628 142.225 142.628c35.011 0 67.831-13.167 92.991-34.008l6.561 5.487v17.551L415.18 448 448 415.086 337.509 305.372zm-131.284 0c-54.702 0-98.463-43.887-98.463-98.743 0-54.858 43.761-98.742 98.463-98.742 54.7 0 98.462 43.884 98.462 98.742 0 54.856-43.762 98.743-98.462 98.743z"},child:[]}]})(s)}const Ov=({width:s=256,symbols:A=[],selectedSymbol:e,onSymbolSelect:t,symbolsLoading:r=!1,isOpen:i})=>{const{theme:n}=oe(),o=n==="light",[a,l]=Q.useState(""),c=A.filter(g=>g.symbol.toLowerCase().includes(a.toLowerCase())),u=c.filter(g=>!g.symbol.toUpperCase().endsWith("USDT")),d=c.filter(g=>g.symbol.toUpperCase().endsWith("USDT"));return h.jsxs(h.Fragment,{children:[h.jsx("style",{children:`
|
|
17
|
+
.scrollbar-dark::-webkit-scrollbar {
|
|
18
|
+
width: 8px;
|
|
19
|
+
}
|
|
20
|
+
.scrollbar-dark::-webkit-scrollbar-track {
|
|
21
|
+
background: #12161d;
|
|
22
|
+
}
|
|
23
|
+
.scrollbar-dark::-webkit-scrollbar-thumb {
|
|
24
|
+
background: #1e293b;
|
|
25
|
+
border-radius: 4px;
|
|
26
|
+
}
|
|
27
|
+
.scrollbar-dark::-webkit-scrollbar-thumb:hover {
|
|
28
|
+
background: #334155;
|
|
29
|
+
}
|
|
30
|
+
.scrollbar-light::-webkit-scrollbar {
|
|
31
|
+
width: 8px;
|
|
32
|
+
}
|
|
33
|
+
.scrollbar-light::-webkit-scrollbar-track {
|
|
34
|
+
background: #ffffff;
|
|
35
|
+
}
|
|
36
|
+
.scrollbar-light::-webkit-scrollbar-thumb {
|
|
37
|
+
background: #cbd5e1;
|
|
38
|
+
border-radius: 4px;
|
|
39
|
+
}
|
|
40
|
+
.scrollbar-light::-webkit-scrollbar-thumb:hover {
|
|
41
|
+
background: #94a3b8;
|
|
42
|
+
}
|
|
43
|
+
`}),h.jsxs("div",{style:{width:`${s}px`,minWidth:"550px",maxWidth:"1900px"},className:`border-l flex flex-col h-full shrink-0 ${o?"bg-white border-slate-200":"bg-[#12161d] border-slate-700"}`,children:[h.jsxs("div",{className:`p-3 border-b flex justify-center items-center gap-2 ${o?"border-slate-200":"border-slate-700"}`,children:[h.jsx(_v,{className:o?"text-2xl text-slate-500":"text-2xl text-slate-400"}),h.jsx("input",{type:"text",placeholder:"Search symbol",value:a,onChange:g=>l(g.target.value),className:`w-full px-3 py-1.5 rounded text-md focus:outline-none focus:border-sky-500 ${o?"bg-white border border-slate-200 text-slate-800 placeholder:text-slate-400":"bg-slate-800 border border-slate-600 text-slate-100 placeholder:text-slate-400"}`})]}),h.jsx("div",{className:`flex-1 overflow-y-auto ${o?"scrollbar-light":"scrollbar-dark"}`,style:{scrollbarWidth:"thin",scrollbarColor:o?"#cbd5e1 #ffffff":"#1e293b #12161d"},children:r?h.jsx("div",{className:"flex items-center justify-center h-full",children:h.jsx("div",{className:`text-sm ${o?"text-slate-700":"text-slate-200"}`,children:"Loading symbols..."})}):c.length===0?h.jsx("div",{className:"flex items-center justify-center h-full",children:h.jsx("div",{className:`text-sm text-center px-4 ${o?"text-slate-700":"text-slate-200"}`,children:A.length===0?"No symbols found. Please check server connection.":"No symbols match your search."})}):h.jsxs("table",{className:"w-full text-xs",children:[h.jsx("thead",{className:`sticky top-0 z-10 ${o?"bg-white border-b border-slate-200":"bg-[#12161d] border-b border-slate-700"}`,children:h.jsxs("tr",{children:[h.jsx("th",{className:`px-3 py-2 text-left text-md ${o?"text-slate-700":"text-slate-300"}`,children:"Symbol"}),h.jsx("th",{className:`px-3 py-2 text-right text-md ${o?"text-slate-700":"text-slate-300"}`,children:"Bid"}),h.jsx("th",{className:`px-3 py-2 text-right text-md ${o?"text-slate-700":"text-slate-300"}`,children:"Ask"}),h.jsx("th",{className:`px-3 py-2 text-right text-md ${o?"text-slate-700":"text-slate-300"}`,children:"Change"})]})}),h.jsxs("tbody",{children:[u.length>0&&h.jsx("tr",{className:o?"bg-slate-50":"bg-slate-900",children:h.jsx("td",{colSpan:4,className:`px-3 py-2 text-xs font-semibold ${o?"text-sky-600":"text-sky-400"}`,children:"FOREX"})}),u.map(g=>h.jsxs("tr",{onClick:()=>t(g.symbol),className:`cursor-pointer transition-colors ${e===g.symbol?o?"bg-sky-50 border-l-2 border-sky-500":"bg-slate-800 border-l-2 border-sky-500":o?"hover:bg-slate-50":"hover:bg-slate-800"}`,children:[h.jsx("td",{className:`px-3 py-2 text-md font-medium ${o?"text-slate-800":"text-slate-100"}`,children:g.symbol}),h.jsx("td",{className:`px-3 py-2 text-right text-md ${g.change>=0?o?"text-blue-600":"text-sky-400":o?"text-rose-600":"text-rose-400"}`,children:g.bid}),h.jsx("td",{className:`px-3 py-2 text-right text-md ${g.change>=0?o?"text-blue-600":"text-sky-400":o?"text-rose-600":"text-rose-400"}`,children:g.ask}),h.jsxs("td",{className:`px-3 py-2 text-right font-medium ${g.change>=0?o?"text-emerald-600":"text-emerald-400":o?"text-rose-600":"text-rose-400"}`,children:[g.change>=0?"+":"",g.change,"%"]})]},g.symbol)),d.length>0&&h.jsx("tr",{className:o?"bg-slate-50":"bg-slate-900",children:h.jsx("td",{colSpan:4,className:`px-3 py-2 text-xs font-semibold ${o?"text-emerald-600":"text-emerald-400"}`,children:"CRYPTO"})}),d.map(g=>h.jsxs("tr",{onClick:()=>t(g.symbol),className:`cursor-pointer transition-colors ${e===g.symbol?o?"bg-sky-50 border-l-2 border-sky-500":"bg-slate-800 border-l-2 border-sky-500":o?"hover:bg-slate-50":"hover:bg-slate-800"}`,children:[h.jsx("td",{className:`px-3 py-2 text-md font-medium ${o?"text-slate-800":"text-slate-100"}`,children:g.symbol}),h.jsx("td",{className:`px-3 py-2 text-right text-md ${g.change>=0?o?"text-blue-600":"text-sky-400":o?"text-rose-600":"text-rose-400"}`,children:g.bid}),h.jsx("td",{className:`px-3 py-2 text-right text-md ${g.change>=0?o?"text-blue-600":"text-sky-400":o?"text-rose-600":"text-rose-400"}`,children:g.ask}),h.jsxs("td",{className:`px-3 py-2 text-right font-medium ${g.change>=0?o?"text-emerald-600":"text-emerald-400":o?"text-rose-600":"text-rose-400"}`,children:[g.change>=0?"+":"",g.change,"%"]})]},g.symbol))]})]})})]})]})},Nv=({accountSummary:s,orders:A,height:e})=>{const{accountSummary:t,orders:r,theme:i}=oe(),n=s||t,o=A||r,a=i==="light",l=o?.filter(c=>c.status==="OPEN"||!c.closeAt)||[];return h.jsxs("div",{style:{height:e?`${e}px`:"auto"},className:`flex flex-col overflow-hidden ${a?"bg-white border-t border-slate-200":"bg-[#12161d] border-t border-slate-700"}`,children:[h.jsxs("div",{className:`px-4 py-2 border-b flex items-center justify-between ${a?"border-slate-200":"border-slate-700"}`,children:[h.jsx("h3",{className:`text-sm font-semibold ${a?"text-slate-800":"text-slate-200"}`,children:"Account Summary"}),h.jsxs("div",{className:`text-xs ${a?"text-slate-500":"text-slate-400"}`,children:[l.length," Position",l.length!==1?"s":""]})]}),h.jsxs("div",{className:`px-4 py-3 border-b grid grid-cols-3 gap-4 ${a?"border-slate-200":"border-slate-700"}`,children:[h.jsxs("div",{children:[h.jsx("div",{className:`text-xs ${a?"text-slate-500":"text-slate-400"}`,children:"Balance"}),h.jsxs("div",{className:`text-sm font-semibold ${a?"text-slate-800":"text-slate-200"}`,children:["$",n?.balance?.toFixed(2)||"0.00"]})]}),h.jsxs("div",{children:[h.jsx("div",{className:`text-xs ${a?"text-slate-500":"text-slate-400"}`,children:"Equity"}),h.jsxs("div",{className:`text-sm font-semibold ${(n?.equity||0)>=(n?.balance||0)?"text-emerald-500":"text-rose-500"}`,children:["$",n?.equity?.toFixed(2)||"0.00"]})]}),h.jsxs("div",{children:[h.jsx("div",{className:`text-xs ${a?"text-slate-500":"text-slate-400"}`,children:"Free Margin"}),h.jsxs("div",{className:`text-sm font-semibold ${a?"text-slate-800":"text-slate-200"}`,children:["$",n?.freeMargin?.toFixed(2)||"0.00"]})]})]}),h.jsx("div",{className:"flex-1 overflow-y-auto",children:l.length===0?h.jsx("div",{className:`flex items-center justify-center h-full ${a?"text-slate-500":"text-slate-400"}`,children:h.jsx("div",{className:"text-sm",children:"No open positions"})}):h.jsx("div",{className:"overflow-x-auto",children:h.jsxs("table",{className:"w-full text-xs",children:[h.jsx("thead",{className:`sticky top-0 ${a?"bg-white border-b border-slate-200":"bg-slate-800 border-b border-slate-700"}`,children:h.jsxs("tr",{children:[h.jsx("th",{className:`px-3 py-2 text-left ${a?"text-slate-700":"text-slate-300"}`,children:"Symbol"}),h.jsx("th",{className:`px-3 py-2 text-left ${a?"text-slate-700":"text-slate-300"}`,children:"Type"}),h.jsx("th",{className:`px-3 py-2 text-right ${a?"text-slate-700":"text-slate-300"}`,children:"Volume"}),h.jsx("th",{className:`px-3 py-2 text-right ${a?"text-slate-700":"text-slate-300"}`,children:"Open Price"}),h.jsx("th",{className:`px-3 py-2 text-right ${a?"text-slate-700":"text-slate-300"}`,children:"Profit"})]})}),h.jsx("tbody",{children:l.map(c=>h.jsxs("tr",{className:`${a?"hover:bg-slate-50":"hover:bg-slate-800"}`,children:[h.jsx("td",{className:`px-3 py-2 ${a?"text-slate-800":"text-slate-200"}`,children:c.symbol}),h.jsx("td",{className:`px-3 py-2 ${c.type==="BUY"?"text-emerald-500":"text-rose-500"}`,children:c.type}),h.jsx("td",{className:`px-3 py-2 text-right ${a?"text-slate-800":"text-slate-200"}`,children:c.volume}),h.jsx("td",{className:`px-3 py-2 text-right ${a?"text-slate-800":"text-slate-200"}`,children:c.price?.toFixed(4)||"-"}),h.jsxs("td",{className:`px-3 py-2 text-right font-semibold ${(c.profit||0)>=0?"text-emerald-500":"text-rose-500"}`,children:[(c.profit||0)>=0?"+":"",(c.profit||0).toFixed(2)]})]},c.id))})]})})})]})},Kv="1.2.1";pA.AccountPanel=Nv,pA.Chart=gv,pA.ChartTypeSelector=Qv,pA.CoinSelector=Cu,pA.DrawingTools=yu,pA.LeftSidebar=kv,pA.MarketExecutionModal=ac,pA.MarketWatch=Ov,pA.PositionsPanel=Uv,pA.SYMBOL_CONFIG=cc,pA.StopLoss=bu,pA.TakeProfit=Qu,pA.TimeframeSelector=vv,pA.TopBar=Dv,pA.TradePanel=yv,pA.TradingProvider=Hg,pA.TradingToolbar=mv,pA.VolumeControl=vu,pA.alignToTimeframe=Nt,pA.detectGaps=Tg,pA.getSymbolConfig=ms,pA.is24x7Symbol=Og,pA.isCryptoSymbol=_g,pA.isForexSymbol=kg,pA.isWithinTradingSession=Mg,pA.normalizeCandleTimes=lc,pA.normalizeTime=RA,pA.processCandles=Bc,pA.processSingleCandle=gc,pA.setSocketBaseUrl=nc,pA.timeframeToSeconds=Fr,pA.useTrading=oe,pA.validateTimeOrdering=Dg,pA.version=Kv,Object.defineProperty(pA,Symbol.toStringTag,{value:"Module"})}));
|