@nabeeltahirdeveloper/chart-sdk 2.0.0 → 2.0.2

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.
@@ -1,43 +0,0 @@
1
- (function(dA,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):(dA=typeof globalThis<"u"?globalThis:dA||self,h(dA.ChartSDK={},dA.jsxRuntime,dA.React))})(this,(function(dA,h,b){"use strict";var bi=typeof document<"u"?document.currentScript:null;function IA(r){var A=r.width,e=r.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 ft(r,A){return r.width===A.width&&r.height===A.height}var Hu=(function(){function r(A){var e=this;this._resolutionListener=function(){return e._onResolutionChanged()},this._resolutionMediaQueryList=null,this._observers=[],this._window=A,this._installResolutionListener()}return r.prototype.dispose=function(){this._uninstallResolutionListener(),this._window=null},Object.defineProperty(r.prototype,"value",{get:function(){return this._window.devicePixelRatio},enumerable:!1,configurable:!0}),r.prototype.subscribe=function(A){var e=this,t={next:A};return this._observers.push(t),{unsubscribe:function(){e._observers=e._observers.filter(function(s){return s!==t})}}},r.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)},r.prototype._uninstallResolutionListener=function(){this._resolutionMediaQueryList!==null&&(this._resolutionMediaQueryList.removeListener(this._resolutionListener),this._resolutionMediaQueryList=null)},r.prototype._reinstallResolutionListener=function(){this._uninstallResolutionListener(),this._installResolutionListener()},r.prototype._onResolutionChanged=function(){var A=this;this._observers.forEach(function(e){return e.next(A._window.devicePixelRatio)}),this._reinstallResolutionListener()},r})();function Lu(r){return new Hu(r)}var Iu=(function(){function r(A,e,t){var s;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=(s=t?.allowResizeObserver)!==null&&s!==void 0?s:!0,this._chooseAndInitObserver()}return r.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(r.prototype,"canvasElement",{get:function(){if(this._canvasElement===null)throw new Error("Object is disposed");return this._canvasElement},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"canvasElementClientSize",{get:function(){return this._canvasElementClientSize},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"bitmapSize",{get:function(){return IA({width:this.canvasElement.width,height:this.canvasElement.height})},enumerable:!1,configurable:!0}),r.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()},r.prototype.subscribeBitmapSizeChanged=function(A){this._bitmapSizeChangedListeners.push(A)},r.prototype.unsubscribeBitmapSizeChanged=function(A){this._bitmapSizeChangedListeners=this._bitmapSizeChangedListeners.filter(function(e){return e!==A})},Object.defineProperty(r.prototype,"suggestedBitmapSize",{get:function(){return this._suggestedBitmapSize},enumerable:!1,configurable:!0}),r.prototype.subscribeSuggestedBitmapSizeChanged=function(A){this._suggestedBitmapSizeChangedListeners.push(A)},r.prototype.unsubscribeSuggestedBitmapSizeChanged=function(A){this._suggestedBitmapSizeChangedListeners=this._suggestedBitmapSizeChangedListeners.filter(function(e){return e!==A})},r.prototype.applySuggestedBitmapSize=function(){if(this._suggestedBitmapSize!==null){var A=this._suggestedBitmapSize;this._suggestedBitmapSize=null,this._resizeBitmap(A),this._emitSuggestedBitmapSizeChanged(A,this._suggestedBitmapSize)}},r.prototype._resizeBitmap=function(A){var e=this.bitmapSize;ft(e,A)||(this.canvasElement.width=A.width,this.canvasElement.height=A.height,this._emitBitmapSizeChanged(e,A))},r.prototype._emitBitmapSizeChanged=function(A,e){var t=this;this._bitmapSizeChangedListeners.forEach(function(s){return s.call(t,A,e)})},r.prototype._suggestNewBitmapSize=function(A){var e=this._suggestedBitmapSize,t=IA(this._transformBitmapSize(A,this._canvasElementClientSize)),s=ft(this.bitmapSize,t)?null:t;e===null&&s===null||e!==null&&s!==null&&ft(e,s)||(this._suggestedBitmapSize=s,this._emitSuggestedBitmapSizeChanged(e,s))},r.prototype._emitSuggestedBitmapSizeChanged=function(A,e){var t=this;this._suggestedBitmapSizeChangedListeners.forEach(function(s){return s.call(t,A,e)})},r.prototype._chooseAndInitObserver=function(){var A=this;if(!this._allowResizeObserver){this._initDevicePixelRatioObservable();return}Mu().then(function(e){return e?A._initResizeObserver():A._initDevicePixelRatioObservable()})},r.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=Lu(e),this._devicePixelRatioObservable.subscribe(function(){return A._invalidateBitmapSize()}),this._invalidateBitmapSize()}},r.prototype._invalidateBitmapSize=function(){var A,e;if(this._canvasElement!==null){var t=No(this._canvasElement);if(t!==null){var s=(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?Du(i[0],s):IA({width:this._canvasElementClientSize.width*s,height:this._canvasElementClientSize.height*s});this._suggestNewBitmapSize(n)}}},r.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 s=t.devicePixelContentBoxSize[0],i=IA({width:s.inlineSize,height:s.blockSize});A._suggestNewBitmapSize(i)}}),this._canvasElementResizeObserver.observe(this._canvasElement,{box:"device-pixel-content-box"}))},r})();function Tu(r,A){return new Iu(r,A.transform,A.options)}function No(r){return r.ownerDocument.defaultView}function Mu(){return new Promise(function(r){var A=new ResizeObserver(function(e){r(e.every(function(t){return"devicePixelContentBoxSize"in t})),A.disconnect()});A.observe(document.body,{box:"device-pixel-content-box"})}).catch(function(){return!1})}function Du(r,A){return IA({width:Math.round(r.left*A+r.width*A)-Math.round(r.left*A),height:Math.round(r.top*A+r.height*A)-Math.round(r.top*A)})}var Ou=(function(){function r(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 r.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()}},r.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(r.prototype,"_horizontalPixelRatio",{get:function(){return this._bitmapSize.width/this._mediaSize.width},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"_verticalPixelRatio",{get:function(){return this._bitmapSize.height/this._mediaSize.height},enumerable:!1,configurable:!0}),r})();function dt(r,A){var e=r.canvasElementClientSize;if(e.width===0||e.height===0)return null;var t=r.bitmapSize;if(t.width===0||t.height===0)return null;var s=r.canvasElement.getContext("2d",A);return s===null?null:new Ou(s,e,t)}const ku={upColor:"#26a69a",downColor:"#ef5350",wickVisible:!0,borderVisible:!0,borderColor:"#378658",borderUpColor:"#26a69a",borderDownColor:"#ef5350",wickColor:"#737375",wickUpColor:"#26a69a",wickDownColor:"#ef5350"},_u={upColor:"#26a69a",downColor:"#ef5350",openVisible:!0,thinBars:!0},Nu={color:"#2196f3",lineStyle:0,lineWidth:3,lineType:0,lineVisible:!0,crosshairMarkerVisible:!0,crosshairMarkerRadius:4,crosshairMarkerBorderColor:"",crosshairMarkerBorderWidth:2,crosshairMarkerBackgroundColor:"",lastPriceAnimation:0,pointMarkersVisible:!1},Ku={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},Vu={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},Pu={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 Bt(r,A){const e={0:[],1:[r.lineWidth,r.lineWidth],2:[2*r.lineWidth,2*r.lineWidth],3:[6*r.lineWidth,6*r.lineWidth],4:[r.lineWidth,4*r.lineWidth]}[A];r.setLineDash(e)}function Ro(r,A,e,t){r.beginPath();const s=r.lineWidth%2?.5:0;r.moveTo(e,A+s),r.lineTo(t,A+s),r.stroke()}function At(r,A){if(!r)throw new Error("Assertion failed"+(A?": "+A:""))}function ie(r){if(r===void 0)throw new Error("Value is undefined");return r}function H(r){if(r===null)throw new Error("Value is null");return r}function xt(r){return H(ie(r))}(function(r){r[r.Simple=0]="Simple",r[r.WithSteps=1]="WithSteps",r[r.Curved=2]="Curved"})(Po||(Po={})),(function(r){r[r.Solid=0]="Solid",r[r.Dotted=1]="Dotted",r[r.Dashed=2]="Dashed",r[r.LargeDashed=3]="LargeDashed",r[r.SparseDotted=4]="SparseDotted"})(Go||(Go={}));const Wo={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(r){return r<0?0:r>255?255:Math.round(r)||0}function zo(r){return r<=0||r>0?r<0?0:r>1?1:Math.round(1e4*r)/1e4:0}const Gu=/^#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])?$/i,Ru=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})?$/i,Wu=/^rgb\(\s*(-?\d{1,10})\s*,\s*(-?\d{1,10})\s*,\s*(-?\d{1,10})\s*\)$/,zu=/^rgba\(\s*(-?\d{1,10})\s*,\s*(-?\d{1,10})\s*,\s*(-?\d{1,10})\s*,\s*(-?[\d]{0,10}(?:\.\d+)?)\s*\)$/;function Kr(r){(r=r.toLowerCase())in Wo&&(r=Wo[r]);{const A=zu.exec(r)||Wu.exec(r);if(A)return[me(parseInt(A[1],10)),me(parseInt(A[2],10)),me(parseInt(A[3],10)),zo(A.length<5?1:parseFloat(A[4]))]}{const A=Ru.exec(r);if(A)return[me(parseInt(A[1],16)),me(parseInt(A[2],16)),me(parseInt(A[3],16)),1]}{const A=Gu.exec(r);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: ${r}`)}function Vr(r){const A=Kr(r);return{t:`rgb(${A[0]}, ${A[1]}, ${A[2]})`,i:(e=A,.199*e[0]+.687*e[1]+.114*e[2]>160?"black":"white")};var e}class KA{constructor(){this.h=[]}l(A,e,t){const s={o:A,_:e,u:t===!0};this.h.push(s)}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 s=[...this.h];this.h=this.h.filter((i=>!i.u)),s.forEach((i=>i.o(A,e,t)))}M(){return this.h.length>0}S(){this.h=[]}}function Ue(r,...A){for(const e of A)for(const t in e)e[t]!==void 0&&(typeof e[t]!="object"||r[t]===void 0||Array.isArray(e[t])?r[t]=e[t]:Ue(r[t],e[t]));return r}function Le(r){return typeof r=="number"&&isFinite(r)}function Yt(r){return typeof r=="number"&&r%1==0}function qt(r){return typeof r=="string"}function Pr(r){return typeof r=="boolean"}function ze(r){const A=r;if(!A||typeof A!="object")return A;let e,t,s;for(t in e=Array.isArray(A)?[]:{},A)A.hasOwnProperty(t)&&(s=A[t],e[t]=s&&typeof s=="object"?ze(s):s);return e}function Xu(r){return r!==null}function $t(r){return r===null?void 0:r}const Qi="-apple-system, BlinkMacSystemFont, 'Trebuchet MS', Roboto, Ubuntu, sans-serif";function St(r,A,e){return A===void 0&&(A=Qi),`${e=e!==void 0?`${e} `:""}${r}px ${A}`}let Ju=class{constructor(A){this.k={C:1,T:5,P:NaN,R:"",D:"",O:"",A:"",V:0,B: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=St(e,t),A.L=2.5/12*e,A.V=A.L,A.B=e/12*A.T,A.I=e/12*A.T,A.N=0),A.O=this.$(),A.A=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 Fi{constructor(){this.Y=[]}X(A){this.Y=A}K(A,e,t){this.Y.forEach((s=>{s.K(A,e,t)}))}}class yi{K(A,e,t){A.useMediaCoordinateSpace((s=>this.Z(s,e,t)))}G(A,e,t){A.useMediaCoordinateSpace((s=>this.J(s,e,t)))}J(A,e,t){}}class Zu extends yi{constructor(){super(...arguments),this.tt=null}it(A){this.tt=A}Z({context:A}){if(this.tt===null||this.tt.nt===null)return;const e=this.tt.nt,t=this.tt,s=i=>{A.beginPath();for(let n=e.to-1;n>=e.from;--n){const o=t.st[n];A.moveTo(o.et,o.rt),A.arc(o.et,o.rt,i,0,2*Math.PI)}A.fill()};t.ht>0&&(A.fillStyle=t.lt,s(t.ot+t.ht)),A.fillStyle=t._t,s(t.ot)}}function Yu(){return{st:[{et:0,rt:0,ut:0,ct:0}],_t:"",lt:"",ot:0,ht:0,nt:null}}const qu={from:0,to:1};class $u{constructor(A,e){this.dt=new Fi,this.ft=[],this.vt=[],this.bt=!0,this.F=A,this.wt=e,this.dt.X(this.ft)}gt(A){const e=this.F.Mt();e.length!==this.ft.length&&(this.vt=e.map(Yu),this.ft=this.vt.map((t=>{const s=new Zu;return s.it(t),s})),this.dt.X(this.ft)),this.bt=!0}xt(){return this.bt&&(this.St(),this.bt=!1),this.dt}St(){const A=this.wt.W().mode===2,e=this.F.Mt(),t=this.wt.kt(),s=this.F.yt();e.forEach(((i,n)=>{var o;const a=this.vt[n],l=i.Ct(t);if(A||l===null||!i.Tt())return void(a.nt=null);const c=H(i.Pt());a._t=l.Rt,a.ot=l.ot,a.ht=l.Dt,a.st[0].ct=l.ct,a.st[0].rt=i.At().Ot(l.ct,c.Vt),a.lt=(o=l.Bt)!==null&&o!==void 0?o:this.F.It(a.st[0].rt/i.At().zt()),a.st[0].ut=t,a.st[0].et=s.Et(t),a.nt=qu}))}}class Xe{K(A,e,t){A.useBitmapCoordinateSpace((s=>this.Z(s,e,t)))}}class ju extends Xe{constructor(A){super(),this.Lt=A}Z({context:A,bitmapSize:e,horizontalPixelRatio:t,verticalPixelRatio:s}){if(this.Lt===null)return;const i=this.Lt.Nt.Tt,n=this.Lt.Ft.Tt;if(!i&&!n)return;const o=Math.round(this.Lt.et*t),a=Math.round(this.Lt.rt*s);A.lineCap="butt",i&&o>=0&&(A.lineWidth=Math.floor(this.Lt.Nt.ht*t),A.strokeStyle=this.Lt.Nt.O,A.fillStyle=this.Lt.Nt.O,Bt(A,this.Lt.Nt.Wt),(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.Lt.Ft.ht*s),A.strokeStyle=this.Lt.Ft.O,A.fillStyle=this.Lt.Ft.O,Bt(A,this.Lt.Ft.Wt),Ro(A,a,0,e.width))}}class Af{constructor(A){this.bt=!0,this.jt={Nt:{ht:1,Wt:0,O:"",Tt:!1},Ft:{ht:1,Wt:0,O:"",Tt:!1},et:0,rt:0},this.Ht=new ju(this.jt),this.$t=A}gt(){this.bt=!0}xt(){return this.bt&&(this.St(),this.bt=!1),this.Ht}St(){const A=this.$t.Tt(),e=H(this.$t.Ut()),t=e.qt().W().crosshair,s=this.jt;if(t.mode===2)return s.Ft.Tt=!1,void(s.Nt.Tt=!1);s.Ft.Tt=A&&this.$t.Yt(e),s.Nt.Tt=A&&this.$t.Xt(),s.Ft.ht=t.horzLine.width,s.Ft.Wt=t.horzLine.style,s.Ft.O=t.horzLine.color,s.Nt.ht=t.vertLine.width,s.Nt.Wt=t.vertLine.style,s.Nt.O=t.vertLine.color,s.et=this.$t.Kt(),s.rt=this.$t.Zt()}}function ef(r,A,e,t,s,i){r.fillRect(A+i,e,t-2*i,i),r.fillRect(A+i,e+s-i,t-2*i,i),r.fillRect(A,e,i,s),r.fillRect(A+t-i,e,i,s)}function Gr(r,A,e,t,s,i){r.save(),r.globalCompositeOperation="copy",r.fillStyle=i,r.fillRect(A,e,t,s),r.restore()}function Xo(r,A){return r.map((e=>e===0?e:e+A))}function Ui(r,A,e,t,s,i){r.beginPath(),r.lineTo(A+t-i[1],e),i[1]!==0&&r.arcTo(A+t,e,A+t,e+i[1],i[1]),r.lineTo(A+t,e+s-i[2]),i[2]!==0&&r.arcTo(A+t,e+s,A+t-i[2],e+s,i[2]),r.lineTo(A+i[3],e+s),i[3]!==0&&r.arcTo(A,e+s,A,e+s-i[3],i[3]),r.lineTo(A,e+i[0]),i[0]!==0&&r.arcTo(A,e,A+i[0],e,i[0])}function Jo(r,A,e,t,s,i,n=0,o=[0,0,0,0],a=""){if(r.save(),!n||!a||a===i)return Ui(r,A,e,t,s,o),r.fillStyle=i,r.fill(),void r.restore();const l=n/2;i!=="transparent"&&(Ui(r,A+n,e+n,t-2*n,s-2*n,Xo(o,-n)),r.fillStyle=i,r.fill()),a!=="transparent"&&(Ui(r,A+l,e+l,t-n,s-n,Xo(o,-l)),r.lineWidth=n,r.strokeStyle=a,r.closePath(),r.stroke()),r.restore()}function Zo(r,A,e,t,s,i,n){r.save(),r.globalCompositeOperation="copy";const o=r.createLinearGradient(0,0,0,s);o.addColorStop(0,i),o.addColorStop(1,n),r.fillStyle=o,r.fillRect(A,e,t,s),r.restore()}class Yo{constructor(A,e){this.it(A,e)}it(A,e){this.Lt=A,this.Gt=e}zt(A,e){return this.Lt.Tt?A.P+A.L+A.V:0}K(A,e,t,s){if(!this.Lt.Tt||this.Lt.Jt.length===0)return;const i=this.Lt.O,n=this.Gt.t,o=A.useBitmapCoordinateSpace((a=>{const l=a.context;l.font=e.R;const c=this.Qt(a,e,t,s),u=c.ti,d=(g,B)=>{c.ii?Jo(l,u.ni,u.si,u.ei,u.ri,g,u.hi,[u.ot,0,0,u.ot],B):Jo(l,u.li,u.si,u.ei,u.ri,g,u.hi,[0,u.ot,u.ot,0],B)};return d(n,"transparent"),this.Lt.ai&&(l.fillStyle=i,l.fillRect(u.li,u.oi,u._i-u.li,u.ui)),d("transparent",n),this.Lt.ci&&(l.fillStyle=e.A,l.fillRect(c.ii?u.di-u.hi:0,u.si,u.hi,u.fi-u.si)),c}));A.useMediaCoordinateSpace((({context:a})=>{const l=o.vi;a.font=e.R,a.textAlign=o.ii?"right":"left",a.textBaseline="middle",a.fillStyle=i,a.fillText(this.Lt.Jt,l.pi,(l.si+l.fi)/2+l.mi)}))}Qt(A,e,t,s){var i;const{context:n,bitmapSize:o,mediaSize:a,horizontalPixelRatio:l,verticalPixelRatio:c}=A,u=this.Lt.ai||!this.Lt.bi?e.T:0,d=this.Lt.wi?e.C:0,g=e.L+this.Gt.gi,B=e.V+this.Gt.Mi,f=e.B,w=e.I,m=this.Lt.Jt,p=e.P,v=t.xi(n,m),y=Math.ceil(t.Si(n,m)),E=p+g+B,U=e.C+f+w+y+u,I=Math.max(1,Math.floor(c));let O=Math.round(E*c);O%2!=I%2&&(O+=1);const T=d>0?Math.max(1,Math.floor(d*l)):0,lA=Math.round(U*l),M=Math.round(u*l),Z=(i=this.Gt.ki)!==null&&i!==void 0?i:this.Gt.yi,S=Math.round(Z*c)-Math.floor(.5*c),V=Math.floor(S+I/2-O/2),X=V+O,cA=s==="right",hA=cA?a.width-d:d,EA=cA?o.width-T:T;let vA,UA,bA;return cA?(vA=EA-lA,UA=EA-M,bA=hA-u-f-d):(vA=EA+lA,UA=EA+M,bA=hA+u+f),{ii:cA,ti:{si:V,oi:S,fi:X,ei:lA,ri:O,ot:2*l,hi:T,ni:vA,li:EA,_i:UA,ui:I,di:o.width},vi:{si:V/c,fi:X/c,pi:bA,mi:v}}}}class Rr{constructor(A){this.Ci={yi:0,t:"#000",Mi:0,gi:0},this.Ti={Jt:"",Tt:!1,ai:!0,bi:!1,Bt:"",O:"#FFF",ci:!1,wi:!1},this.Pi={Jt:"",Tt:!1,ai:!1,bi:!0,Bt:"",O:"#FFF",ci:!0,wi:!0},this.bt=!0,this.Ri=new(A||Yo)(this.Ti,this.Ci),this.Di=new(A||Yo)(this.Pi,this.Ci)}Jt(){return this.Oi(),this.Ti.Jt}yi(){return this.Oi(),this.Ci.yi}gt(){this.bt=!0}zt(A,e=!1){return Math.max(this.Ri.zt(A,e),this.Di.zt(A,e))}Ai(){return this.Ci.ki||0}Vi(A){this.Ci.ki=A}Bi(){return this.Oi(),this.Ti.Tt||this.Pi.Tt}Ii(){return this.Oi(),this.Ti.Tt}xt(A){return this.Oi(),this.Ti.ai=this.Ti.ai&&A.W().ticksVisible,this.Pi.ai=this.Pi.ai&&A.W().ticksVisible,this.Ri.it(this.Ti,this.Ci),this.Di.it(this.Pi,this.Ci),this.Ri}zi(){return this.Oi(),this.Ri.it(this.Ti,this.Ci),this.Di.it(this.Pi,this.Ci),this.Di}Oi(){this.bt&&(this.Ti.ai=!0,this.Pi.ai=!1,this.Ei(this.Ti,this.Pi,this.Ci))}}class tf extends Rr{constructor(A,e,t){super(),this.$t=A,this.Li=e,this.Ni=t}Ei(A,e,t){if(A.Tt=!1,this.$t.W().mode===2)return;const s=this.$t.W().horzLine;if(!s.labelVisible)return;const i=this.Li.Pt();if(!this.$t.Tt()||this.Li.Fi()||i===null)return;const n=Vr(s.labelBackgroundColor);t.t=n.t,A.O=n.i;const o=2/12*this.Li.P();t.gi=o,t.Mi=o;const a=this.Ni(this.Li);t.yi=a.yi,A.Jt=this.Li.Wi(a.ct,i),A.Tt=!0}}const rf=/[1-9]/g;class qo{constructor(){this.Lt=null}it(A){this.Lt=A}K(A,e){if(this.Lt===null||this.Lt.Tt===!1||this.Lt.Jt.length===0)return;const t=A.useMediaCoordinateSpace((({context:d})=>(d.font=e.R,Math.round(e.ji.Si(d,H(this.Lt).Jt,rf)))));if(t<=0)return;const s=e.Hi,i=t+2*s,n=i/2,o=this.Lt.$i;let a=this.Lt.yi,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.V);A.useBitmapCoordinateSpace((({context:d,horizontalPixelRatio:g,verticalPixelRatio:B})=>{const f=H(this.Lt);d.fillStyle=f.t;const w=Math.round(l*g),m=Math.round(0*B),p=Math.round(c*g),v=Math.round(u*B),y=Math.round(2*g);if(d.beginPath(),d.moveTo(w,m),d.lineTo(w,v-y),d.arcTo(w,v,w+y,v,y),d.lineTo(p-y,v),d.arcTo(p,v,p,v-y,y),d.lineTo(p,m),d.fill(),f.ai){const E=Math.round(f.yi*g),U=m,I=Math.round((U+e.T)*B);d.fillStyle=f.O;const O=Math.max(1,Math.floor(g)),T=Math.floor(.5*g);d.fillRect(E-T,U,O,I-U)}})),A.useMediaCoordinateSpace((({context:d})=>{const g=H(this.Lt),B=0+e.C+e.T+e.L+e.P/2;d.font=e.R,d.textAlign="left",d.textBaseline="middle",d.fillStyle=g.O;const f=e.ji.xi(d,"Apr0");d.translate(l+s,B+f),d.fillText(g.Jt,0,0)}))}}class sf{constructor(A,e,t){this.bt=!0,this.Ht=new qo,this.jt={Tt:!1,t:"#4c525e",O:"white",Jt:"",$i:0,yi:NaN,ai:!0},this.wt=A,this.Ui=e,this.Ni=t}gt(){this.bt=!0}xt(){return this.bt&&(this.St(),this.bt=!1),this.Ht.it(this.jt),this.Ht}St(){const A=this.jt;if(A.Tt=!1,this.wt.W().mode===2)return;const e=this.wt.W().vertLine;if(!e.labelVisible)return;const t=this.Ui.yt();if(t.Fi())return;A.$i=t.$i();const s=this.Ni();if(s===null)return;A.yi=s.yi;const i=t.qi(this.wt.kt());A.Jt=t.Yi(H(i)),A.Tt=!0;const n=Vr(e.labelBackgroundColor);A.t=n.t,A.O=n.i,A.ai=t.W().ticksVisible}}class Ei{constructor(){this.Xi=null,this.Ki=0}Zi(){return this.Ki}Gi(A){this.Ki=A}At(){return this.Xi}Ji(A){this.Xi=A}Qi(A){return[]}tn(){return[]}Tt(){return!0}}var $o;(function(r){r[r.Normal=0]="Normal",r[r.Magnet=1]="Magnet",r[r.Hidden=2]="Hidden"})($o||($o={}));class nf extends Ei{constructor(A,e){super(),this.nn=null,this.sn=NaN,this.en=0,this.rn=!0,this.hn=new Map,this.ln=!1,this.an=NaN,this.on=NaN,this._n=NaN,this.un=NaN,this.Ui=A,this.cn=e,this.dn=new $u(A,this),this.fn=((s,i)=>n=>{const o=i(),a=s();if(n===H(this.nn).vn())return{ct:a,yi:o};{const l=H(n.Pt());return{ct:n.pn(o,l),yi:o}}})((()=>this.sn),(()=>this.on));const t=((s,i)=>()=>{const n=this.Ui.yt().mn(s()),o=i();return n&&Number.isFinite(o)?{ut:n,yi:o}:null})((()=>this.en),(()=>this.Kt()));this.bn=new sf(this,A,t),this.wn=new Af(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.ln||(this.ln=!0),this.rn=!0,this.yn(A,e,t)}kt(){return this.en}Kt(){return this.an}Zt(){return this.on}Tt(){return this.rn}Cn(){this.rn=!1,this.Tn(),this.sn=NaN,this.an=NaN,this.on=NaN,this.nn=null,this.Mn()}Pn(A){return this.nn!==null?[this.wn,this.dn]:[]}Yt(A){return A===this.nn&&this.cn.horzLine.visible}Xt(){return this.cn.vertLine.visible}Rn(A,e){this.rn&&this.nn===A||this.hn.clear();const t=[];return this.nn===A&&t.push(this.Dn(this.hn,e,this.fn)),t}tn(){return this.rn?[this.bn]:[]}Ut(){return this.nn}On(){this.wn.gt(),this.hn.forEach((A=>A.gt())),this.bn.gt(),this.dn.gt()}An(A){return A&&!A.vn().Fi()?A.vn():null}yn(A,e,t){this.Vn(A,e,t)&&this.On()}Vn(A,e,t){const s=this.an,i=this.on,n=this.sn,o=this.en,a=this.nn,l=this.An(t);this.en=A,this.an=isNaN(A)?NaN:this.Ui.yt().Et(A),this.nn=t;const c=l!==null?l.Pt():null;return l!==null&&c!==null?(this.sn=e,this.on=l.Ot(e,c)):(this.sn=NaN,this.on=NaN),s!==this.an||i!==this.on||o!==this.en||n!==this.sn||a!==this.nn}Tn(){const A=this.Ui.Mt().map((t=>t.In().Bn())).filter(Xu),e=A.length===0?null:Math.max(...A);this.en=e!==null?e:NaN}Dn(A,e,t){let s=A.get(e);return s===void 0&&(s=new tf(this,e,t),A.set(e,s)),s}}function Wr(r){return r==="left"||r==="right"}class YA{constructor(A){this.zn=new Map,this.En=[],this.Ln=A}Nn(A,e){const t=(function(s,i){return s===void 0?i:{Fn:Math.max(s.Fn,i.Fn),Wn:s.Wn||i.Wn}})(this.zn.get(A),e);this.zn.set(A,t)}jn(){return this.Ln}Hn(A){const e=this.zn.get(A);return e===void 0?{Fn:this.Ln}:{Fn:Math.max(this.Ln,e.Fn),Wn:e.Wn}}$n(){this.Un(),this.En=[{qn:0}]}Yn(A){this.Un(),this.En=[{qn:1,Vt:A}]}Xn(A){this.Kn(),this.En.push({qn:5,Vt:A})}Un(){this.Kn(),this.En.push({qn:6})}Zn(){this.Un(),this.En=[{qn:4}]}Gn(A){this.Un(),this.En.push({qn:2,Vt:A})}Jn(A){this.Un(),this.En.push({qn:3,Vt:A})}Qn(){return this.En}ts(A){for(const e of A.En)this.ns(e);this.Ln=Math.max(this.Ln,A.Ln),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.Zn();break;case 5:this.Xn(A.Vt);break;case 6:this.Kn()}}Kn(){const A=this.En.findIndex((e=>e.qn===5));A!==-1&&this.En.splice(A,1)}}const jo=".";function Je(r,A){if(!Le(r))return"n/a";if(!Yt(A))throw new TypeError("invalid length");if(A<0||A>16)throw new TypeError("invalid length");return A===0?r.toString():("0000000000000000"+r.toString()).slice(-A)}class zr{constructor(A,e){if(e||(e=1),Le(A)&&Yt(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.os=0,this.Li>0&&this.rs>0){let A=this.Li;for(;A>1;)A/=10,this.os++}}ls(A){const e=this.Li/this.rs;let t=Math.floor(A),s="";const i=this.os!==void 0?this.os:NaN;if(e>1){let n=+(Math.round(A*e)-t*e).toFixed(this.os);n>=e&&(n-=e,t+=1),s=jo+Je(+n.toFixed(this.os)*this.rs,i)}else t=Math.round(t*e)/e,i>0&&(s=jo+Je(0,i));return t.toFixed(0)+s}}class Aa extends zr{constructor(A=100){super(A)}format(A){return`${super.format(A)}%`}}class of{constructor(A){this._s=A}format(A){let e="";return A<0&&(e="-",A=-A),A<995?e+this.us(A):A<999995?e+this.us(A/1e3)+"K":A<999999995?(A=1e3*Math.round(A/1e3),e+this.us(A/1e6)+"M"):(A=1e6*Math.round(A/1e6),e+this.us(A/1e9)+"B")}us(A){let e;const t=Math.pow(10,this._s);return e=(A=Math.round(A*t)/t)>=1e-15&&A<1?A.toFixed(this._s).replace(/\.?0+$/,""):String(A),e.replace(/(\.[1-9]*)0+$/,((s,i)=>i))}}function ea(r,A,e,t,s,i,n){if(A.length===0||t.from>=A.length||t.to<=0)return;const{context:o,horizontalPixelRatio:a,verticalPixelRatio:l}=r,c=A[t.from];let u=i(r,c),d=c;if(t.to-t.from<2){const g=s/2;o.beginPath();const B={et:c.et-g,rt:c.rt},f={et:c.et+g,rt:c.rt};o.moveTo(B.et*a,B.rt*l),o.lineTo(f.et*a,f.rt*l),n(r,u,B,f)}else{const g=(f,w)=>{n(r,u,d,w),o.beginPath(),u=f,d=w};let B=d;o.beginPath(),o.moveTo(c.et*a,c.rt*l);for(let f=t.from+1;f<t.to;++f){B=A[f];const w=i(r,B);switch(e){case 0:o.lineTo(B.et*a,B.rt*l);break;case 1:o.lineTo(B.et*a,A[f-1].rt*l),w!==u&&(g(w,B),o.lineTo(B.et*a,A[f-1].rt*l)),o.lineTo(B.et*a,B.rt*l);break;case 2:{const[m,p]=af(A,f-1,f);o.bezierCurveTo(m.et*a,m.rt*l,p.et*a,p.rt*l,B.et*a,B.rt*l);break}}e!==1&&w!==u&&(g(w,B),o.moveTo(B.et*a,B.rt*l))}(d!==B||d===B&&e===1)&&n(r,u,d,B)}}const ta=6;function xi(r,A){return{et:r.et-A.et,rt:r.rt-A.rt}}function ra(r,A){return{et:r.et/A,rt:r.rt/A}}function af(r,A,e){const t=Math.max(0,A-1),s=Math.min(r.length-1,e+1);var i,n;return[(i=r[A],n=ra(xi(r[e],r[t]),ta),{et:i.et+n.et,rt:i.rt+n.rt}),xi(r[e],ra(xi(r[s],r[A]),ta))]}function lf(r,A,e,t,s){const{context:i,horizontalPixelRatio:n,verticalPixelRatio:o}=A;i.lineTo(s.et*n,r*o),i.lineTo(t.et*n,r*o),i.closePath(),i.fillStyle=e,i.fill()}class sa extends Xe{constructor(){super(...arguments),this.tt=null}it(A){this.tt=A}Z(A){var e;if(this.tt===null)return;const{st:t,nt:s,cs:i,ht:n,Wt:o,ds:a}=this.tt,l=(e=this.tt.fs)!==null&&e!==void 0?e:this.tt.vs?0:A.mediaSize.height;if(s===null)return;const c=A.context;c.lineCap="butt",c.lineJoin="round",c.lineWidth=n,Bt(c,o),c.lineWidth=1,ea(A,t,a,s,i,this.ps.bind(this),lf.bind(null,l))}}function Si(r,A,e){return Math.min(Math.max(r,A),e)}function Xr(r,A,e){return A-r<=e}function ia(r){const A=Math.ceil(r);return A%2==0?A-1:A}class Hi{bs(A,e){const t=this.ws,{gs:s,Ms:i,xs:n,Ss:o,ks:a,fs:l}=e;if(this.ys===void 0||t===void 0||t.gs!==s||t.Ms!==i||t.xs!==n||t.Ss!==o||t.fs!==l||t.ks!==a){const c=A.context.createLinearGradient(0,0,0,a);if(c.addColorStop(0,s),l!=null){const u=Si(l*A.verticalPixelRatio/a,0,1);c.addColorStop(u,i),c.addColorStop(u,n)}c.addColorStop(1,o),this.ys=c,this.ws=e}return this.ys}}class cf extends sa{constructor(){super(...arguments),this.Cs=new Hi}ps(A,e){return this.Cs.bs(A,{gs:e.Ts,Ms:"",xs:"",Ss:e.Ps,ks:A.bitmapSize.height})}}function hf(r,A){const e=r.context;e.strokeStyle=A,e.stroke()}class na extends Xe{constructor(){super(...arguments),this.tt=null}it(A){this.tt=A}Z(A){if(this.tt===null)return;const{st:e,nt:t,cs:s,ds:i,ht:n,Wt:o,Rs:a}=this.tt;if(t===null)return;const l=A.context;l.lineCap="butt",l.lineWidth=n*A.verticalPixelRatio,Bt(l,o),l.lineJoin="round";const c=this.Ds.bind(this);i!==void 0&&ea(A,e,i,t,s,c,hf),a&&(function(u,d,g,B,f){const{horizontalPixelRatio:w,verticalPixelRatio:m,context:p}=u;let v=null;const y=Math.max(1,Math.floor(w))%2/2,E=g*m+y;for(let U=B.to-1;U>=B.from;--U){const I=d[U];if(I){const O=f(u,I);O!==v&&(p.beginPath(),v!==null&&p.fill(),p.fillStyle=O,v=O);const T=Math.round(I.et*w)+y,lA=I.rt*m;p.moveTo(T,lA),p.arc(T,lA,E,0,2*Math.PI)}}p.fill()})(A,e,a,t,c)}}class oa extends na{Ds(A,e){return e._t}}function aa(r,A,e,t,s=0,i=A.length){let n=i-s;for(;0<n;){const o=n>>1,a=s+o;t(A[a],e)===r?(s=a+1,n-=o+1):n=o}return s}const jt=aa.bind(null,!0),la=aa.bind(null,!1);function uf(r,A){return r.ut<A}function ff(r,A){return A<r.ut}function ca(r,A,e){const t=A.Os(),s=A.di(),i=jt(r,t,uf),n=la(r,s,ff);if(!e)return{from:i,to:n};let o=i,a=n;return i>0&&i<r.length&&r[i].ut>=t&&(o=i-1),n>0&&n<r.length&&r[n-1].ut<=s&&(a=n+1),{from:o,to:a}}class Li{constructor(A,e,t){this.As=!0,this.Vs=!0,this.Bs=!0,this.Is=[],this.zs=null,this.Es=A,this.Ls=e,this.Ns=t}gt(A){this.As=!0,A==="data"&&(this.Vs=!0),A==="options"&&(this.Bs=!0)}xt(){return this.Es.Tt()?(this.Fs(),this.zs===null?null:this.Ws):null}js(){this.Is=this.Is.map((A=>Object.assign(Object.assign({},A),this.Es.$s().Hs(A.ut))))}Us(){this.zs=null}Fs(){this.Vs&&(this.qs(),this.Vs=!1),this.Bs&&(this.js(),this.Bs=!1),this.As&&(this.Ys(),this.As=!1)}Ys(){const A=this.Es.At(),e=this.Ls.yt();if(this.Us(),e.Fi()||A.Fi())return;const t=e.Xs();if(t===null||this.Es.In().Ks()===0)return;const s=this.Es.Pt();s!==null&&(this.zs=ca(this.Is,t,this.Ns),this.Zs(A,e,s.Vt),this.Gs())}}class Jr extends Li{constructor(A,e){super(A,e,!0)}Zs(A,e,t){e.Js(this.Is,$t(this.zs)),A.Qs(this.Is,t,$t(this.zs))}te(A,e){return{ut:A,ct:e,et:NaN,rt:NaN}}qs(){const A=this.Es.$s();this.Is=this.Es.In().ie().map((e=>{const t=e.Vt[3];return this.ne(e.se,t,A)}))}}class df extends Jr{constructor(A,e){super(A,e),this.Ws=new Fi,this.ee=new cf,this.re=new oa,this.Ws.X([this.ee,this.re])}ne(A,e,t){return Object.assign(Object.assign({},this.te(A,e)),t.Hs(A))}Gs(){const A=this.Es.W();this.ee.it({ds:A.lineType,st:this.Is,Wt:A.lineStyle,ht:A.lineWidth,fs:null,vs:A.invertFilledArea,nt:this.zs,cs:this.Ls.yt().he()}),this.re.it({ds:A.lineVisible?A.lineType:void 0,st:this.Is,Wt:A.lineStyle,ht:A.lineWidth,nt:this.zs,cs:this.Ls.yt().he(),Rs:A.pointMarkersVisible?A.pointMarkersRadius||A.lineWidth/2+2:void 0})}}class Bf extends Xe{constructor(){super(...arguments),this.Lt=null,this.le=0,this.ae=0}it(A){this.Lt=A}Z({context:A,horizontalPixelRatio:e,verticalPixelRatio:t}){if(this.Lt===null||this.Lt.In.length===0||this.Lt.nt===null)return;this.le=this.oe(e),this.le>=2&&Math.max(1,Math.floor(e))%2!=this.le%2&&this.le--,this.ae=this.Lt._e?Math.min(this.le,Math.floor(e)):this.le;let s=null;const i=this.ae<=this.le&&this.Lt.he>=Math.floor(1.5*e);for(let n=this.Lt.nt.from;n<this.Lt.nt.to;++n){const o=this.Lt.In[n];s!==o.ue&&(A.fillStyle=o.ue,s=o.ue);const a=Math.floor(.5*this.ae),l=Math.round(o.et*e),c=l-a,u=this.ae,d=c+u-1,g=Math.min(o.ce,o.de),B=Math.max(o.ce,o.de),f=Math.round(g*t)-a,w=Math.round(B*t)+a,m=Math.max(w-f,this.ae);A.fillRect(c,f,u,m);const p=Math.ceil(1.5*this.le);if(i){if(this.Lt.fe){const U=l-p;let I=Math.max(f,Math.round(o.ve*t)-a),O=I+u-1;O>f+m-1&&(O=f+m-1,I=O-u+1),A.fillRect(U,I,c-U,O-I+1)}const v=l+p;let y=Math.max(f,Math.round(o.pe*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)}}}oe(A){const e=Math.floor(A);return Math.max(e,Math.floor((function(t,s){return Math.floor(.3*t*s)})(H(this.Lt).he,A)))}}class ha extends Li{constructor(A,e){super(A,e,!1)}Zs(A,e,t){e.Js(this.Is,$t(this.zs)),A.me(this.Is,t,$t(this.zs))}be(A,e,t){return{ut:A,we:e.Vt[0],ge:e.Vt[1],Me:e.Vt[2],xe:e.Vt[3],et:NaN,ve:NaN,ce:NaN,de:NaN,pe:NaN}}qs(){const A=this.Es.$s();this.Is=this.Es.In().ie().map((e=>this.ne(e.se,e,A)))}}class gf extends ha{constructor(){super(...arguments),this.Ws=new Bf}ne(A,e,t){return Object.assign(Object.assign({},this.be(A,e,t)),t.Hs(A))}Gs(){const A=this.Es.W();this.Ws.it({In:this.Is,he:this.Ls.yt().he(),fe:A.openVisible,_e:A.thinBars,nt:this.zs})}}class pf extends sa{constructor(){super(...arguments),this.Cs=new Hi}ps(A,e){const t=this.tt;return this.Cs.bs(A,{gs:e.Se,Ms:e.ke,xs:e.ye,Ss:e.Ce,ks:A.bitmapSize.height,fs:t.fs})}}class wf extends na{constructor(){super(...arguments),this.Te=new Hi}Ds(A,e){const t=this.tt;return this.Te.bs(A,{gs:e.Pe,Ms:e.Pe,xs:e.Re,Ss:e.Re,ks:A.bitmapSize.height,fs:t.fs})}}class mf extends Jr{constructor(A,e){super(A,e),this.Ws=new Fi,this.De=new pf,this.Oe=new wf,this.Ws.X([this.De,this.Oe])}ne(A,e,t){return Object.assign(Object.assign({},this.te(A,e)),t.Hs(A))}Gs(){const A=this.Es.Pt();if(A===null)return;const e=this.Es.W(),t=this.Es.At().Ot(e.baseValue.price,A.Vt),s=this.Ls.yt().he();this.De.it({st:this.Is,ht:e.lineWidth,Wt:e.lineStyle,ds:e.lineType,fs:t,vs:!1,nt:this.zs,cs:s}),this.Oe.it({st:this.Is,ht:e.lineWidth,Wt:e.lineStyle,ds:e.lineVisible?e.lineType:void 0,Rs:e.pointMarkersVisible?e.pointMarkersRadius||e.lineWidth/2+2:void 0,fs:t,nt:this.zs,cs:s})}}class Cf extends Xe{constructor(){super(...arguments),this.Lt=null,this.le=0}it(A){this.Lt=A}Z(A){if(this.Lt===null||this.Lt.In.length===0||this.Lt.nt===null)return;const{horizontalPixelRatio:e}=A;this.le=(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.Lt.he,e),this.le>=2&&Math.floor(e)%2!=this.le%2&&this.le--;const t=this.Lt.In;this.Lt.Ae&&this.Ve(A,t,this.Lt.nt),this.Lt.ci&&this.Be(A,t,this.Lt.nt);const s=this.Ie(e);(!this.Lt.ci||this.le>2*s)&&this.ze(A,t,this.Lt.nt)}Ve(A,e,t){if(this.Lt===null)return;const{context:s,horizontalPixelRatio:i,verticalPixelRatio:n}=A;let o="",a=Math.min(Math.floor(i),Math.floor(this.Lt.he*i));a=Math.max(Math.floor(i),Math.min(a,this.le));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&&(s.fillStyle=d.Ee,o=d.Ee);const g=Math.round(Math.min(d.ve,d.pe)*n),B=Math.round(Math.max(d.ve,d.pe)*n),f=Math.round(d.ce*n),w=Math.round(d.de*n);let m=Math.round(i*d.et)-l;const p=m+a-1;c!==null&&(m=Math.max(c+1,m),m=Math.min(m,p));const v=p-m+1;s.fillRect(m,f,v,g-f),s.fillRect(m,B+1,v,w-B),c=p}}Ie(A){let e=Math.floor(1*A);this.le<=2*e&&(e=Math.floor(.5*(this.le-1)));const t=Math.max(Math.floor(A),e);return this.le<=2*t?Math.max(Math.floor(A),Math.floor(1*A)):t}Be(A,e,t){if(this.Lt===null)return;const{context:s,horizontalPixelRatio:i,verticalPixelRatio:n}=A;let o="";const a=this.Ie(i);let l=null;for(let c=t.from;c<t.to;c++){const u=e[c];u.Le!==o&&(s.fillStyle=u.Le,o=u.Le);let d=Math.round(u.et*i)-Math.floor(.5*this.le);const g=d+this.le-1,B=Math.round(Math.min(u.ve,u.pe)*n),f=Math.round(Math.max(u.ve,u.pe)*n);if(l!==null&&(d=Math.max(l+1,d),d=Math.min(d,g)),this.Lt.he*i>2*a)ef(s,d,B,g-d+1,f-B+1,a);else{const w=g-d+1;s.fillRect(d,B,w,f-B+1)}l=g}}ze(A,e,t){if(this.Lt===null)return;const{context:s,horizontalPixelRatio:i,verticalPixelRatio:n}=A;let o="";const a=this.Ie(i);for(let l=t.from;l<t.to;l++){const c=e[l];let u=Math.round(Math.min(c.ve,c.pe)*n),d=Math.round(Math.max(c.ve,c.pe)*n),g=Math.round(c.et*i)-Math.floor(.5*this.le),B=g+this.le-1;if(c.ue!==o){const f=c.ue;s.fillStyle=f,o=f}this.Lt.ci&&(g+=a,u+=a,B-=a,d-=a),u>d||s.fillRect(g,u,B-g+1,d-u+1)}}}class vf extends ha{constructor(){super(...arguments),this.Ws=new Cf}ne(A,e,t){return Object.assign(Object.assign({},this.be(A,e,t)),t.Hs(A))}Gs(){const A=this.Es.W();this.Ws.it({In:this.Is,he:this.Ls.yt().he(),Ae:A.wickVisible,ci:A.borderVisible,nt:this.zs})}}class bf{constructor(A,e){this.Ne=A,this.Li=e}K(A,e,t){this.Ne.draw(A,this.Li,e,t)}}class Ii extends Li{constructor(A,e,t){super(A,e,!1),this.wn=t,this.Ws=new bf(this.wn.renderer(),(s=>{const i=A.Pt();return i===null?null:A.At().Ot(s,i.Vt)}))}Fe(A){return this.wn.priceValueBuilder(A)}We(A){return this.wn.isWhitespace(A)}qs(){const A=this.Es.$s();this.Is=this.Es.In().ie().map((e=>Object.assign(Object.assign({ut:e.se,et:NaN},A.Hs(e.se)),{je:e.He})))}Zs(A,e){e.Js(this.Is,$t(this.zs))}Gs(){this.wn.update({bars:this.Is.map(Qf),barSpacing:this.Ls.yt().he(),visibleRange:this.zs},this.Es.W())}}function Qf(r){return{x:r.et,time:r.ut,originalData:r.je,barColor:r.ue}}class Ff extends Xe{constructor(){super(...arguments),this.Lt=null,this.$e=[]}it(A){this.Lt=A,this.$e=[]}Z({context:A,horizontalPixelRatio:e,verticalPixelRatio:t}){if(this.Lt===null||this.Lt.st.length===0||this.Lt.nt===null)return;this.$e.length||this.Ue(e);const s=Math.max(1,Math.floor(t)),i=Math.round(this.Lt.qe*t)-Math.floor(s/2),n=i+s;for(let o=this.Lt.nt.from;o<this.Lt.nt.to;o++){const a=this.Lt.st[o],l=this.$e[o-this.Lt.nt.from],c=Math.round(a.rt*t);let u,d;A.fillStyle=a.ue,c<=i?(u=c,d=n):(u=i,d=c-Math.floor(s/2)+s),A.fillRect(l.Os,u,l.di-l.Os+1,d-u)}}Ue(A){if(this.Lt===null||this.Lt.st.length===0||this.Lt.nt===null)return void(this.$e=[]);const e=Math.ceil(this.Lt.he*A)<=1?0:Math.max(1,Math.floor(A)),t=Math.round(this.Lt.he*A)-e;this.$e=new Array(this.Lt.nt.to-this.Lt.nt.from);for(let i=this.Lt.nt.from;i<this.Lt.nt.to;i++){const n=this.Lt.st[i],o=Math.round(n.et*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.$e[i-this.Lt.nt.from]={Os:a,di:l,Ye:o,Xe:n.et*A,ut:n.ut}}for(let i=this.Lt.nt.from+1;i<this.Lt.nt.to;i++){const n=this.$e[i-this.Lt.nt.from],o=this.$e[i-this.Lt.nt.from-1];n.ut===o.ut+1&&n.Os-o.di!==e+1&&(o.Ye>o.Xe?o.di=n.Os-e-1:n.Os=o.di+e+1)}let s=Math.ceil(this.Lt.he*A);for(let i=this.Lt.nt.from;i<this.Lt.nt.to;i++){const n=this.$e[i-this.Lt.nt.from];n.di<n.Os&&(n.di=n.Os);const o=n.di-n.Os+1;s=Math.min(o,s)}if(e>0&&s<4)for(let i=this.Lt.nt.from;i<this.Lt.nt.to;i++){const n=this.$e[i-this.Lt.nt.from];n.di-n.Os+1>s&&(n.Ye>n.Xe?n.di-=1:n.Os+=1)}}}class yf extends Jr{constructor(){super(...arguments),this.Ws=new Ff}ne(A,e,t){return Object.assign(Object.assign({},this.te(A,e)),t.Hs(A))}Gs(){const A={st:this.Is,he:this.Ls.yt().he(),nt:this.zs,qe:this.Es.At().Ot(this.Es.W().base,H(this.Es.Pt()).Vt)};this.Ws.it(A)}}class Uf extends Jr{constructor(){super(...arguments),this.Ws=new oa}ne(A,e,t){return Object.assign(Object.assign({},this.te(A,e)),t.Hs(A))}Gs(){const A=this.Es.W(),e={st:this.Is,Wt:A.lineStyle,ds:A.lineVisible?A.lineType:void 0,ht:A.lineWidth,Rs:A.pointMarkersVisible?A.pointMarkersRadius||A.lineWidth/2+2:void 0,nt:this.zs,cs:this.Ls.yt().he()};this.Ws.it(e)}}const Ef=/[2-9]/g;class Ar{constructor(A=50){this.Ke=0,this.Ze=1,this.Ge=1,this.Je={},this.Qe=new Map,this.tr=A}ir(){this.Ke=0,this.Qe.clear(),this.Ze=1,this.Ge=1,this.Je={}}Si(A,e,t){return this.nr(A,e,t).width}xi(A,e,t){const s=this.nr(A,e,t);return((s.actualBoundingBoxAscent||0)-(s.actualBoundingBoxDescent||0))/2}nr(A,e,t){const s=t||Ef,i=String(e).replace(s,"0");if(this.Qe.has(i))return ie(this.Qe.get(i)).sr;if(this.Ke===this.tr){const o=this.Je[this.Ge];delete this.Je[this.Ge],this.Qe.delete(o),this.Ge++,this.Ke--}A.save(),A.textBaseline="middle";const n=A.measureText(i);return A.restore(),n.width===0&&e.length||(this.Qe.set(i,{sr:n,er:this.Ze}),this.Je[this.Ze]=i,this.Ke++,this.Ze++),n}}class xf{constructor(A){this.rr=null,this.k=null,this.hr="right",this.lr=A}ar(A,e,t){this.rr=A,this.k=e,this.hr=t}K(A){this.k!==null&&this.rr!==null&&this.rr.K(A,this.k,this.lr,this.hr)}}class ua{constructor(A,e,t){this._r=A,this.lr=new Ar(50),this.ur=e,this.F=t,this.j=-1,this.Ht=new xf(this.lr)}xt(){const A=this.F.cr(this.ur);if(A===null)return null;const e=A.dr(this.ur)?A.vr():this.ur.At();if(e===null)return null;const t=A.pr(e);if(t==="overlay")return null;const s=this.F.mr();return s.P!==this.j&&(this.j=s.P,this.lr.ir()),this.Ht.ar(this._r.zi(),s,t),this.Ht}}class Sf extends Xe{constructor(){super(...arguments),this.Lt=null}it(A){this.Lt=A}br(A,e){var t;if(!(!((t=this.Lt)===null||t===void 0)&&t.Tt))return null;const{rt:s,ht:i,wr:n}=this.Lt;return e>=s-i-7&&e<=s+i+7?{gr:this.Lt,wr:n}:null}Z({context:A,bitmapSize:e,horizontalPixelRatio:t,verticalPixelRatio:s}){if(this.Lt===null||this.Lt.Tt===!1)return;const i=Math.round(this.Lt.rt*s);i<0||i>e.height||(A.lineCap="butt",A.strokeStyle=this.Lt.O,A.lineWidth=Math.floor(this.Lt.ht*t),Bt(A,this.Lt.Wt),Ro(A,i,0,e.width))}}class Ti{constructor(A){this.Mr={rt:0,O:"rgba(0, 0, 0, 0)",ht:1,Wt:0,Tt:!1},this.Sr=new Sf,this.bt=!0,this.Es=A,this.Ls=A.qt(),this.Sr.it(this.Mr)}gt(){this.bt=!0}xt(){return this.Es.Tt()?(this.bt&&(this.kr(),this.bt=!1),this.Sr):null}}class Hf extends Ti{constructor(A){super(A)}kr(){this.Mr.Tt=!1;const A=this.Es.At(),e=A.yr().yr;if(e!==2&&e!==3)return;const t=this.Es.W();if(!t.baseLineVisible||!this.Es.Tt())return;const s=this.Es.Pt();s!==null&&(this.Mr.Tt=!0,this.Mr.rt=A.Ot(s.Vt,s.Vt),this.Mr.O=t.baseLineColor,this.Mr.ht=t.baseLineWidth,this.Mr.Wt=t.baseLineStyle)}}class Lf extends Xe{constructor(){super(...arguments),this.Lt=null}it(A){this.Lt=A}He(){return this.Lt}Z({context:A,horizontalPixelRatio:e,verticalPixelRatio:t}){const s=this.Lt;if(s===null)return;const i=Math.max(1,Math.floor(e)),n=i%2/2,o=Math.round(s.Xe.x*e)+n,a=s.Xe.y*t;A.fillStyle=s.Cr,A.beginPath();const l=Math.max(2,1.5*s.Tr)*e;A.arc(o,a,l,0,2*Math.PI,!1),A.fill(),A.fillStyle=s.Pr,A.beginPath(),A.arc(o,a,s.ot*e,0,2*Math.PI,!1),A.fill(),A.lineWidth=i,A.strokeStyle=s.Rr,A.beginPath(),A.arc(o,a,s.ot*e+i/2,0,2*Math.PI,!1),A.stroke()}}const If=[{Dr:0,Or:.25,Ar:4,Vr:10,Br:.25,Ir:0,zr:.4,Er:.8},{Dr:.25,Or:.525,Ar:10,Vr:14,Br:0,Ir:0,zr:.8,Er:0},{Dr:.525,Or:1,Ar:14,Vr:14,Br:0,Ir:0,zr:0,Er:0}];function fa(r,A,e,t){return(function(s,i){if(s==="transparent")return s;const n=Kr(s),o=n[3];return`rgba(${n[0]}, ${n[1]}, ${n[2]}, ${i*o})`})(r,e+(t-e)*A)}function da(r,A){const e=r%2600/2600;let t;for(const a of If)if(e>=a.Dr&&e<=a.Or){t=a;break}At(t!==void 0,"Last price animation internal logic error");const s=(e-t.Dr)/(t.Or-t.Dr);return{Pr:fa(A,s,t.Br,t.Ir),Rr:fa(A,s,t.zr,t.Er),ot:(i=s,n=t.Ar,o=t.Vr,n+(o-n)*i)};var i,n,o}class Tf{constructor(A){this.Ht=new Lf,this.bt=!0,this.Lr=!0,this.Nr=performance.now(),this.Fr=this.Nr-1,this.Wr=A}jr(){this.Fr=this.Nr-1,this.gt()}Hr(){if(this.gt(),this.Wr.W().lastPriceAnimation===2){const A=performance.now(),e=this.Fr-A;if(e>0)return void(e<650&&(this.Fr+=2600));this.Nr=A,this.Fr=A+2600}}gt(){this.bt=!0}$r(){this.Lr=!0}Tt(){return this.Wr.W().lastPriceAnimation!==0}Ur(){switch(this.Wr.W().lastPriceAnimation){case 0:return!1;case 1:return!0;case 2:return performance.now()<=this.Fr}}xt(){return this.bt?(this.St(),this.bt=!1,this.Lr=!1):this.Lr&&(this.qr(),this.Lr=!1),this.Ht}St(){this.Ht.it(null);const A=this.Wr.qt().yt(),e=A.Xs(),t=this.Wr.Pt();if(e===null||t===null)return;const s=this.Wr.Yr(!0);if(s.Xr||!e.Kr(s.se))return;const i={x:A.Et(s.se),y:this.Wr.At().Ot(s.ct,t.Vt)},n=s.O,o=this.Wr.W().lineWidth,a=da(this.Zr(),n);this.Ht.it({Cr:n,Tr:o,Pr:a.Pr,Rr:a.Rr,ot:a.ot,Xe:i})}qr(){const A=this.Ht.He();if(A!==null){const e=da(this.Zr(),A.Cr);A.Pr=e.Pr,A.Rr=e.Rr,A.ot=e.ot}}Zr(){return this.Ur()?performance.now()-this.Nr:2599}}function er(r,A){return ia(Math.min(Math.max(r,12),30)*A)}function tr(r,A){switch(r){case"arrowDown":case"arrowUp":return er(A,1);case"circle":return er(A,.8);case"square":return er(A,.7)}}function Ba(r){return(function(A){const e=Math.ceil(A);return e%2!=0?e-1:e})(er(r,1))}function ga(r){return Math.max(er(r,.1),3)}function pa(r,A,e,t,s){const i=tr("square",e),n=(i-1)/2,o=r-n,a=A-n;return t>=o&&t<=o+i&&s>=a&&s<=a+i}function wa(r,A,e,t,s){const i=(tr("arrowUp",s)-1)/2,n=(ia(s/2)-1)/2;A.beginPath(),r?(A.moveTo(e-i,t),A.lineTo(e,t-i),A.lineTo(e+i,t),A.lineTo(e+n,t),A.lineTo(e+n,t+i),A.lineTo(e-n,t+i),A.lineTo(e-n,t)):(A.moveTo(e-i,t),A.lineTo(e,t+i),A.lineTo(e+i,t),A.lineTo(e+n,t),A.lineTo(e+n,t-i),A.lineTo(e-n,t-i),A.lineTo(e-n,t)),A.fill()}function Mf(r,A,e,t,s,i){return pa(A,e,t,s,i)}class Df extends yi{constructor(){super(...arguments),this.Lt=null,this.lr=new Ar,this.j=-1,this.H="",this.Gr=""}it(A){this.Lt=A}ar(A,e){this.j===A&&this.H===e||(this.j=A,this.H=e,this.Gr=St(A,e),this.lr.ir())}br(A,e){if(this.Lt===null||this.Lt.nt===null)return null;for(let t=this.Lt.nt.from;t<this.Lt.nt.to;t++){const s=this.Lt.st[t];if(kf(s,A,e))return{gr:s.Jr,wr:s.wr}}return null}Z({context:A},e,t){if(this.Lt!==null&&this.Lt.nt!==null){A.textBaseline="middle",A.font=this.Gr;for(let s=this.Lt.nt.from;s<this.Lt.nt.to;s++){const i=this.Lt.st[s];i.Jt!==void 0&&(i.Jt.$i=this.lr.Si(A,i.Jt.Qr),i.Jt.zt=this.j,i.Jt.et=i.et-i.Jt.$i/2),Of(i,A)}}}}function Of(r,A){A.fillStyle=r.O,r.Jt!==void 0&&(function(e,t,s,i){e.fillText(t,s,i)})(A,r.Jt.Qr,r.Jt.et,r.Jt.rt),(function(e,t){if(e.Ks!==0){switch(e.th){case"arrowDown":return void wa(!1,t,e.et,e.rt,e.Ks);case"arrowUp":return void wa(!0,t,e.et,e.rt,e.Ks);case"circle":return void(function(s,i,n,o){const a=(tr("circle",o)-1)/2;s.beginPath(),s.arc(i,n,a,0,2*Math.PI,!1),s.fill()})(t,e.et,e.rt,e.Ks);case"square":return void(function(s,i,n,o){const a=tr("square",o),l=(a-1)/2,c=i-l,u=n-l;s.fillRect(c,u,a,a)})(t,e.et,e.rt,e.Ks)}e.th}})(r,A)}function kf(r,A,e){return!(r.Jt===void 0||!(function(t,s,i,n,o,a){const l=n/2;return o>=t&&o<=t+i&&a>=s-l&&a<=s+l})(r.Jt.et,r.Jt.rt,r.Jt.$i,r.Jt.zt,A,e))||(function(t,s,i){if(t.Ks===0)return!1;switch(t.th){case"arrowDown":case"arrowUp":return Mf(0,t.et,t.rt,t.Ks,s,i);case"circle":return(function(n,o,a,l,c){const u=2+tr("circle",a)/2,d=n-l,g=o-c;return Math.sqrt(d*d+g*g)<=u})(t.et,t.rt,t.Ks,s,i);case"square":return pa(t.et,t.rt,t.Ks,s,i)}})(r,A,e)}function _f(r,A,e,t,s,i,n,o,a){const l=Le(e)?e:e.xe,c=Le(e)?e:e.ge,u=Le(e)?e:e.Me,d=Le(A.size)?Math.max(A.size,0):1,g=Ba(o.he())*d,B=g/2;switch(r.Ks=g,A.position){case"inBar":return r.rt=n.Ot(l,a),void(r.Jt!==void 0&&(r.Jt.rt=r.rt+B+i+.6*s));case"aboveBar":return r.rt=n.Ot(c,a)-B-t.ih,r.Jt!==void 0&&(r.Jt.rt=r.rt-B-.6*s,t.ih+=1.2*s),void(t.ih+=g+i);case"belowBar":return r.rt=n.Ot(u,a)+B+t.nh,r.Jt!==void 0&&(r.Jt.rt=r.rt+B+i+.6*s,t.nh+=1.2*s),void(t.nh+=g+i)}A.position}class Nf{constructor(A,e){this.bt=!0,this.sh=!0,this.eh=!0,this.rh=null,this.Ht=new Df,this.Wr=A,this.Ui=e,this.Lt={st:[],nt:null}}gt(A){this.bt=!0,this.eh=!0,A==="data"&&(this.sh=!0)}xt(A){if(!this.Wr.Tt())return null;this.bt&&this.hh();const e=this.Ui.W().layout;return this.Ht.ar(e.fontSize,e.fontFamily),this.Ht.it(this.Lt),this.Ht}lh(){if(this.eh){if(this.Wr.ah().length>0){const A=this.Ui.yt().he(),e=ga(A),t=1.5*Ba(A)+2*e;this.rh={above:t,below:t}}else this.rh=null;this.eh=!1}return this.rh}hh(){const A=this.Wr.At(),e=this.Ui.yt(),t=this.Wr.ah();this.sh&&(this.Lt.st=t.map((c=>({ut:c.time,et:0,rt:0,Ks:0,th:c.shape,O:c.color,Jr:c.Jr,wr:c.id,Jt:void 0}))),this.sh=!1);const s=this.Ui.W().layout;this.Lt.nt=null;const i=e.Xs();if(i===null)return;const n=this.Wr.Pt();if(n===null||this.Lt.st.length===0)return;let o=NaN;const a=ga(e.he()),l={ih:a,nh:a};this.Lt.nt=ca(this.Lt.st,i,!0);for(let c=this.Lt.nt.from;c<this.Lt.nt.to;c++){const u=t[c];u.time!==o&&(l.ih=a,l.nh=a,o=u.time);const d=this.Lt.st[c];d.et=e.Et(u.time),u.text!==void 0&&u.text.length>0&&(d.Jt={Qr:u.text,et:0,rt:0,$i:0,zt:0});const g=this.Wr.oh(u.time);g!==null&&_f(d,u,g,l,s.fontSize,a,A,e,n.Vt)}this.bt=!1}}class Kf extends Ti{constructor(A){super(A)}kr(){const A=this.Mr;A.Tt=!1;const e=this.Es.W();if(!e.priceLineVisible||!this.Es.Tt())return;const t=this.Es.Yr(e.priceLineSource===0);t.Xr||(A.Tt=!0,A.rt=t.yi,A.O=this.Es._h(t.O),A.ht=e.priceLineWidth,A.Wt=e.priceLineStyle)}}class Vf extends Rr{constructor(A){super(),this.$t=A}Ei(A,e,t){A.Tt=!1,e.Tt=!1;const s=this.$t;if(!s.Tt())return;const i=s.W(),n=i.lastValueVisible,o=s.uh()!=="",a=i.seriesLastValueMode===0,l=s.Yr(!1);if(l.Xr)return;n&&(A.Jt=this.dh(l,n,a),A.Tt=A.Jt.length!==0),(o||a)&&(e.Jt=this.fh(l,n,o,a),e.Tt=e.Jt.length>0);const c=s._h(l.O),u=Vr(c);t.t=u.t,t.yi=l.yi,e.Bt=s.qt().It(l.yi/s.At().zt()),A.Bt=c,A.O=u.i,e.O=u.i}fh(A,e,t,s){let i="";const n=this.$t.uh();return t&&n.length!==0&&(i+=`${n} `),e&&s&&(i+=this.$t.At().ph()?A.mh:A.bh),i.trim()}dh(A,e,t){return e?t?this.$t.At().ph()?A.bh:A.mh:A.Jt:""}}function ma(r,A,e,t){const s=Number.isFinite(A),i=Number.isFinite(e);return s&&i?r(A,e):s||i?s?A:e:t}class ce{constructor(A,e){this.wh=A,this.gh=e}Mh(A){return A!==null&&this.wh===A.wh&&this.gh===A.gh}xh(){return new ce(this.wh,this.gh)}Sh(){return this.wh}kh(){return this.gh}yh(){return this.gh-this.wh}Fi(){return this.gh===this.wh||Number.isNaN(this.gh)||Number.isNaN(this.wh)}ts(A){return A===null?this:new ce(ma(Math.min,this.Sh(),A.Sh(),-1/0),ma(Math.max,this.kh(),A.kh(),1/0))}Ch(A){if(!Le(A)||this.gh-this.wh===0)return;const e=.5*(this.gh+this.wh);let t=this.gh-e,s=this.wh-e;t*=A,s*=A,this.gh=e+t,this.wh=e+s}Th(A){Le(A)&&(this.gh+=A,this.wh+=A)}Ph(){return{minValue:this.wh,maxValue:this.gh}}static Rh(A){return A===null?null:new ce(A.minValue,A.maxValue)}}class Zr{constructor(A,e){this.Dh=A,this.Oh=e||null}Ah(){return this.Dh}Vh(){return this.Oh}Ph(){return this.Dh===null?null:{priceRange:this.Dh.Ph(),margins:this.Oh||void 0}}static Rh(A){return A===null?null:new Zr(ce.Rh(A.priceRange),A.margins)}}class Pf extends Ti{constructor(A,e){super(A),this.Bh=e}kr(){const A=this.Mr;A.Tt=!1;const e=this.Bh.W();if(!this.Es.Tt()||!e.lineVisible)return;const t=this.Bh.Ih();t!==null&&(A.Tt=!0,A.rt=t,A.O=e.color,A.ht=e.lineWidth,A.Wt=e.lineStyle,A.wr=this.Bh.W().id)}}class Gf extends Rr{constructor(A,e){super(),this.Wr=A,this.Bh=e}Ei(A,e,t){A.Tt=!1,e.Tt=!1;const s=this.Bh.W(),i=s.axisLabelVisible,n=s.title!=="",o=this.Wr;if(!i||!o.Tt())return;const a=this.Bh.Ih();if(a===null)return;n&&(e.Jt=s.title,e.Tt=!0),e.Bt=o.qt().It(a/o.At().zt()),A.Jt=this.zh(s.price),A.Tt=!0;const l=Vr(s.axisLabelColor||s.color);t.t=l.t;const c=s.axisLabelTextColor||l.i;A.O=c,e.O=c,t.yi=a}zh(A){const e=this.Wr.Pt();return e===null?"":this.Wr.At().Wi(A,e.Vt)}}class Rf{constructor(A,e){this.Wr=A,this.cn=e,this.Eh=new Pf(A,this),this._r=new Gf(A,this),this.Lh=new ua(this._r,A,A.qt())}Nh(A){Ue(this.cn,A),this.gt(),this.Wr.qt().Fh()}W(){return this.cn}Wh(){return this.Eh}jh(){return this.Lh}Hh(){return this._r}gt(){this.Eh.gt(),this._r.gt()}Ih(){const A=this.Wr,e=A.At();if(A.qt().yt().Fi()||e.Fi())return null;const t=A.Pt();return t===null?null:e.Ot(this.cn.price,t.Vt)}}class Wf extends Ei{constructor(A){super(),this.Ui=A}qt(){return this.Ui}}const zf={Bar:(r,A,e,t)=>{var s;const i=A.upColor,n=A.downColor,o=H(r(e,t)),a=xt(o.Vt[0])<=xt(o.Vt[3]);return{ue:(s=o.O)!==null&&s!==void 0?s:a?i:n}},Candlestick:(r,A,e,t)=>{var s,i,n;const o=A.upColor,a=A.downColor,l=A.borderUpColor,c=A.borderDownColor,u=A.wickUpColor,d=A.wickDownColor,g=H(r(e,t)),B=xt(g.Vt[0])<=xt(g.Vt[3]);return{ue:(s=g.O)!==null&&s!==void 0?s:B?o:a,Le:(i=g.Bt)!==null&&i!==void 0?i:B?l:c,Ee:(n=g.$h)!==null&&n!==void 0?n:B?u:d}},Custom:(r,A,e,t)=>{var s;return{ue:(s=H(r(e,t)).O)!==null&&s!==void 0?s:A.color}},Area:(r,A,e,t)=>{var s,i,n,o;const a=H(r(e,t));return{ue:(s=a._t)!==null&&s!==void 0?s:A.lineColor,_t:(i=a._t)!==null&&i!==void 0?i:A.lineColor,Ts:(n=a.Ts)!==null&&n!==void 0?n:A.topColor,Ps:(o=a.Ps)!==null&&o!==void 0?o:A.bottomColor}},Baseline:(r,A,e,t)=>{var s,i,n,o,a,l;const c=H(r(e,t));return{ue:c.Vt[3]>=A.baseValue.price?A.topLineColor:A.bottomLineColor,Pe:(s=c.Pe)!==null&&s!==void 0?s:A.topLineColor,Re:(i=c.Re)!==null&&i!==void 0?i:A.bottomLineColor,Se:(n=c.Se)!==null&&n!==void 0?n:A.topFillColor1,ke:(o=c.ke)!==null&&o!==void 0?o:A.topFillColor2,ye:(a=c.ye)!==null&&a!==void 0?a:A.bottomFillColor1,Ce:(l=c.Ce)!==null&&l!==void 0?l:A.bottomFillColor2}},Line:(r,A,e,t)=>{var s,i;const n=H(r(e,t));return{ue:(s=n.O)!==null&&s!==void 0?s:A.color,_t:(i=n.O)!==null&&i!==void 0?i:A.color}},Histogram:(r,A,e,t)=>{var s;return{ue:(s=H(r(e,t)).O)!==null&&s!==void 0?s:A.color}}};class Xf{constructor(A){this.Uh=(e,t)=>t!==void 0?t.Vt:this.Wr.In().qh(e),this.Wr=A,this.Yh=zf[A.Xh()]}Hs(A,e){return this.Yh(this.Uh,this.Wr.W(),A,e)}}var Ca;(function(r){r[r.NearestLeft=-1]="NearestLeft",r[r.None=0]="None",r[r.NearestRight=1]="NearestRight"})(Ca||(Ca={}));const et=30;class Jf{constructor(){this.Kh=[],this.Zh=new Map,this.Gh=new Map}Jh(){return this.Ks()>0?this.Kh[this.Kh.length-1]:null}Qh(){return this.Ks()>0?this.tl(0):null}Bn(){return this.Ks()>0?this.tl(this.Kh.length-1):null}Ks(){return this.Kh.length}Fi(){return this.Ks()===0}Kr(A){return this.il(A,0)!==null}qh(A){return this.nl(A)}nl(A,e=0){const t=this.il(A,e);return t===null?null:Object.assign(Object.assign({},this.sl(t)),{se:this.tl(t)})}ie(){return this.Kh}el(A,e,t){if(this.Fi())return null;let s=null;for(const i of t)s=Yr(s,this.rl(A,e,i));return s}it(A){this.Gh.clear(),this.Zh.clear(),this.Kh=A}tl(A){return this.Kh[A].se}sl(A){return this.Kh[A]}il(A,e){const t=this.hl(A);if(t===null&&e!==0)switch(e){case-1:return this.ll(A);case 1:return this.al(A);default:throw new TypeError("Unknown search mode")}return t}ll(A){let e=this.ol(A);return e>0&&(e-=1),e!==this.Kh.length&&this.tl(e)<A?e:null}al(A){const e=this._l(A);return e!==this.Kh.length&&A<this.tl(e)?e:null}hl(A){const e=this.ol(A);return e===this.Kh.length||A<this.Kh[e].se?null:e}ol(A){return jt(this.Kh,A,((e,t)=>e.se<t))}_l(A){return la(this.Kh,A,((e,t)=>e.se>t))}ul(A,e,t){let s=null;for(let i=A;i<e;i++){const n=this.Kh[i].Vt[t];Number.isNaN(n)||(s===null?s={cl:n,dl:n}:(n<s.cl&&(s.cl=n),n>s.dl&&(s.dl=n)))}return s}rl(A,e,t){if(this.Fi())return null;let s=null;const i=H(this.Qh()),n=H(this.Bn()),o=Math.max(A,i),a=Math.min(e,n),l=Math.ceil(o/et)*et,c=Math.max(l,Math.floor(a/et)*et);{const d=this.ol(o),g=this._l(Math.min(a,l,e));s=Yr(s,this.ul(d,g,t))}let u=this.Zh.get(t);u===void 0&&(u=new Map,this.Zh.set(t,u));for(let d=Math.max(l+1,o);d<c;d+=et){const g=Math.floor(d/et);let B=u.get(g);if(B===void 0){const f=this.ol(g*et),w=this._l((g+1)*et-1);B=this.ul(f,w,t),u.set(g,B)}s=Yr(s,B)}{const d=this.ol(c),g=this._l(a);s=Yr(s,this.ul(d,g,t))}return s}}function Yr(r,A){return r===null?A:A===null?r:{cl:Math.min(r.cl,A.cl),dl:Math.max(r.dl,A.dl)}}class Zf{constructor(A){this.fl=A}K(A,e,t){this.fl.draw(A)}G(A,e,t){var s,i;(i=(s=this.fl).drawBackground)===null||i===void 0||i.call(s,A)}}class Mi{constructor(A){this.Qe=null,this.wn=A}xt(){var A;const e=this.wn.renderer();if(e===null)return null;if(((A=this.Qe)===null||A===void 0?void 0:A.vl)===e)return this.Qe.pl;const t=new Zf(e);return this.Qe={vl:e,pl:t},t}ml(){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 va(r){var A,e,t,s,i;return{Jt:r.text(),yi:r.coordinate(),ki:(A=r.fixedCoordinate)===null||A===void 0?void 0:A.call(r),O:r.textColor(),t:r.backColor(),Tt:(t=(e=r.visible)===null||e===void 0?void 0:e.call(r))===null||t===void 0||t,ai:(i=(s=r.tickVisible)===null||s===void 0?void 0:s.call(r))===null||i===void 0||i}}class Yf{constructor(A,e){this.Ht=new qo,this.bl=A,this.wl=e}xt(){return this.Ht.it(Object.assign({$i:this.wl.$i()},va(this.bl))),this.Ht}}class qf extends Rr{constructor(A,e){super(),this.bl=A,this.Li=e}Ei(A,e,t){const s=va(this.bl);t.t=s.t,A.O=s.O;const i=2/12*this.Li.P();t.gi=i,t.Mi=i,t.yi=s.yi,t.ki=s.ki,A.Jt=s.Jt,A.Tt=s.Tt,A.ai=s.ai}}class $f{constructor(A,e){this.gl=null,this.Ml=null,this.xl=null,this.Sl=null,this.kl=null,this.yl=A,this.Wr=e}Cl(){return this.yl}On(){var A,e;(e=(A=this.yl).updateAllViews)===null||e===void 0||e.call(A)}Pn(){var A,e,t,s;const i=(t=(e=(A=this.yl).paneViews)===null||e===void 0?void 0:e.call(A))!==null&&t!==void 0?t:[];if(((s=this.gl)===null||s===void 0?void 0:s.vl)===i)return this.gl.pl;const n=i.map((o=>new Mi(o)));return this.gl={vl:i,pl:n},n}tn(){var A,e,t,s;const i=(t=(e=(A=this.yl).timeAxisViews)===null||e===void 0?void 0:e.call(A))!==null&&t!==void 0?t:[];if(((s=this.Ml)===null||s===void 0?void 0:s.vl)===i)return this.Ml.pl;const n=this.Wr.qt().yt(),o=i.map((a=>new Yf(a,n)));return this.Ml={vl:i,pl:o},o}Rn(){var A,e,t,s;const i=(t=(e=(A=this.yl).priceAxisViews)===null||e===void 0?void 0:e.call(A))!==null&&t!==void 0?t:[];if(((s=this.xl)===null||s===void 0?void 0:s.vl)===i)return this.xl.pl;const n=this.Wr.At(),o=i.map((a=>new qf(a,n)));return this.xl={vl:i,pl:o},o}Tl(){var A,e,t,s;const i=(t=(e=(A=this.yl).priceAxisPaneViews)===null||e===void 0?void 0:e.call(A))!==null&&t!==void 0?t:[];if(((s=this.Sl)===null||s===void 0?void 0:s.vl)===i)return this.Sl.pl;const n=i.map((o=>new Mi(o)));return this.Sl={vl:i,pl:n},n}Pl(){var A,e,t,s;const i=(t=(e=(A=this.yl).timeAxisPaneViews)===null||e===void 0?void 0:e.call(A))!==null&&t!==void 0?t:[];if(((s=this.kl)===null||s===void 0?void 0:s.vl)===i)return this.kl.pl;const n=i.map((o=>new Mi(o)));return this.kl={vl:i,pl:n},n}Rl(A,e){var t,s,i;return(i=(s=(t=this.yl).autoscaleInfo)===null||s===void 0?void 0:s.call(t,A,e))!==null&&i!==void 0?i:null}br(A,e){var t,s,i;return(i=(s=(t=this.yl).hitTest)===null||s===void 0?void 0:s.call(t,A,e))!==null&&i!==void 0?i:null}}function Di(r,A,e,t){r.forEach((s=>{A(s).forEach((i=>{i.ml()===e&&t.push(i)}))}))}function Oi(r){return r.Pn()}function jf(r){return r.Tl()}function Ad(r){return r.Pl()}class ki extends Wf{constructor(A,e,t,s,i){super(A),this.Lt=new Jf,this.Eh=new Kf(this),this.Dl=[],this.Ol=new Hf(this),this.Al=null,this.Vl=null,this.Bl=[],this.Il=[],this.zl=null,this.El=[],this.cn=e,this.Ll=t;const n=new Vf(this);this.hn=[n],this.Lh=new ua(n,this,A),t!=="Area"&&t!=="Line"&&t!=="Baseline"||(this.Al=new Tf(this)),this.Nl(),this.Fl(i)}S(){this.zl!==null&&clearTimeout(this.zl)}_h(A){return this.cn.priceLineColor||A}Yr(A){const e={Xr:!0},t=this.At();if(this.qt().yt().Fi()||t.Fi()||this.Lt.Fi())return e;const s=this.qt().yt().Xs(),i=this.Pt();if(s===null||i===null)return e;let n,o;if(A){const u=this.Lt.Jh();if(u===null)return e;n=u,o=u.se}else{const u=this.Lt.nl(s.di(),-1);if(u===null||(n=this.Lt.qh(u.se),n===null))return e;o=u.se}const a=n.Vt[3],l=this.$s().Hs(o,{Vt:n}),c=t.Ot(a,i.Vt);return{Xr:!1,ct:a,Jt:t.Wi(a,i.Vt),mh:t.Wl(a),bh:t.jl(a,i.Vt),O:l.ue,yi:c,se:o}}$s(){return this.Vl!==null||(this.Vl=new Xf(this)),this.Vl}W(){return this.cn}Nh(A){const e=A.priceScaleId;e!==void 0&&e!==this.cn.priceScaleId&&this.qt().Hl(this,e),Ue(this.cn,A),A.priceFormat!==void 0&&(this.Nl(),this.qt().$l()),this.qt().Ul(this),this.qt().ql(),this.wn.gt("options")}it(A,e){this.Lt.it(A),this.Yl(),this.wn.gt("data"),this.dn.gt("data"),this.Al!==null&&(e&&e.Xl?this.Al.Hr():A.length===0&&this.Al.jr());const t=this.qt().cr(this);this.qt().Kl(t),this.qt().Ul(this),this.qt().ql(),this.qt().Fh()}Zl(A){this.Bl=A,this.Yl();const e=this.qt().cr(this);this.dn.gt("data"),this.qt().Kl(e),this.qt().Ul(this),this.qt().ql(),this.qt().Fh()}Gl(){return this.Bl}ah(){return this.Il}Jl(A){const e=new Rf(this,A);return this.Dl.push(e),this.qt().Ul(this),e}Ql(A){const e=this.Dl.indexOf(A);e!==-1&&this.Dl.splice(e,1),this.qt().Ul(this)}Xh(){return this.Ll}Pt(){const A=this.ta();return A===null?null:{Vt:A.Vt[3],ia:A.ut}}ta(){const A=this.qt().yt().Xs();if(A===null)return null;const e=A.Os();return this.Lt.nl(e,1)}In(){return this.Lt}oh(A){const e=this.Lt.qh(A);return e===null?null:this.Ll==="Bar"||this.Ll==="Candlestick"||this.Ll==="Custom"?{we:e.Vt[0],ge:e.Vt[1],Me:e.Vt[2],xe:e.Vt[3]}:e.Vt[3]}na(A){const e=[];Di(this.El,Oi,"top",e);const t=this.Al;return t!==null&&t.Tt()&&(this.zl===null&&t.Ur()&&(this.zl=setTimeout((()=>{this.zl=null,this.qt().sa()}),0)),t.$r(),e.push(t)),e}Pn(){const A=[];this.ea()||A.push(this.Ol),A.push(this.wn,this.Eh,this.dn);const e=this.Dl.map((t=>t.Wh()));return A.push(...e),Di(this.El,Oi,"normal",A),A}ra(){return this.ha(Oi,"bottom")}la(A){return this.ha(jf,A)}aa(A){return this.ha(Ad,A)}oa(A,e){return this.El.map((t=>t.br(A,e))).filter((t=>t!==null))}Qi(A){return[this.Lh,...this.Dl.map((e=>e.jh()))]}Rn(A,e){if(e!==this.Xi&&!this.ea())return[];const t=[...this.hn];for(const s of this.Dl)t.push(s.Hh());return this.El.forEach((s=>{t.push(...s.Rn())})),t}tn(){const A=[];return this.El.forEach((e=>{A.push(...e.tn())})),A}Rl(A,e){if(this.cn.autoscaleInfoProvider!==void 0){const t=this.cn.autoscaleInfoProvider((()=>{const s=this._a(A,e);return s===null?null:s.Ph()}));return Zr.Rh(t)}return this._a(A,e)}ua(){return this.cn.priceFormat.minMove}ca(){return this.da}On(){var A;this.wn.gt(),this.dn.gt();for(const e of this.hn)e.gt();for(const e of this.Dl)e.gt();this.Eh.gt(),this.Ol.gt(),(A=this.Al)===null||A===void 0||A.gt(),this.El.forEach((e=>e.On()))}At(){return H(super.At())}Ct(A){if(!((this.Ll==="Line"||this.Ll==="Area"||this.Ll==="Baseline")&&this.cn.crosshairMarkerVisible))return null;const e=this.Lt.qh(A);return e===null?null:{ct:e.Vt[3],ot:this.fa(),Bt:this.va(),Dt:this.pa(),Rt:this.ma(A)}}uh(){return this.cn.title}Tt(){return this.cn.visible}ba(A){this.El.push(new $f(A,this))}wa(A){this.El=this.El.filter((e=>e.Cl()!==A))}ga(){if(this.wn instanceof Ii)return A=>this.wn.Fe(A)}Ma(){if(this.wn instanceof Ii)return A=>this.wn.We(A)}ea(){return!Wr(this.At().xa())}_a(A,e){if(!Yt(A)||!Yt(e)||this.Lt.Fi())return null;const t=this.Ll==="Line"||this.Ll==="Area"||this.Ll==="Baseline"||this.Ll==="Histogram"?[3]:[2,1],s=this.Lt.el(A,e,t);let i=s!==null?new ce(s.cl,s.dl):null;if(this.Xh()==="Histogram"){const o=this.cn.base,a=new ce(o,o);i=i!==null?i.ts(a):a}let n=this.dn.lh();return this.El.forEach((o=>{const a=o.Rl(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 Zr(i,n)}fa(){switch(this.Ll){case"Line":case"Area":case"Baseline":return this.cn.crosshairMarkerRadius}return 0}va(){switch(this.Ll){case"Line":case"Area":case"Baseline":{const A=this.cn.crosshairMarkerBorderColor;if(A.length!==0)return A}}return null}pa(){switch(this.Ll){case"Line":case"Area":case"Baseline":return this.cn.crosshairMarkerBorderWidth}return 0}ma(A){switch(this.Ll){case"Line":case"Area":case"Baseline":{const e=this.cn.crosshairMarkerBackgroundColor;if(e.length!==0)return e}}return this.$s().Hs(A).ue}Nl(){switch(this.cn.priceFormat.type){case"custom":this.da={format:this.cn.priceFormat.formatter};break;case"volume":this.da=new of(this.cn.priceFormat.precision);break;case"percent":this.da=new Aa(this.cn.priceFormat.precision);break;default:{const A=Math.pow(10,this.cn.priceFormat.precision);this.da=new zr(A,this.cn.priceFormat.minMove*A)}}this.Xi!==null&&this.Xi.Sa()}Yl(){const A=this.qt().yt();if(!A.ka()||this.Lt.Fi())return void(this.Il=[]);const e=H(this.Lt.Qh());this.Il=this.Bl.map(((t,s)=>{const i=H(A.ya(t.time,!0)),n=i<e?1:-1;return{time:H(this.Lt.nl(i,n)).se,position:t.position,shape:t.shape,color:t.color,id:t.id,Jr:s,text:t.text,size:t.size,originalTime:t.originalTime}}))}Fl(A){switch(this.dn=new Nf(this,this.qt()),this.Ll){case"Bar":this.wn=new gf(this,this.qt());break;case"Candlestick":this.wn=new vf(this,this.qt());break;case"Line":this.wn=new Uf(this,this.qt());break;case"Custom":this.wn=new Ii(this,this.qt(),ie(A));break;case"Area":this.wn=new df(this,this.qt());break;case"Baseline":this.wn=new mf(this,this.qt());break;case"Histogram":this.wn=new yf(this,this.qt());break;default:throw Error("Unknown chart style assigned: "+this.Ll)}}ha(A,e){const t=[];return Di(this.El,A,e,t),t}}class ed{constructor(A){this.cn=A}Ca(A,e,t){let s=A;if(this.cn.mode===0)return s;const i=t.vn(),n=i.Pt();if(n===null)return s;const o=i.Ot(A,n),a=t.Ta().filter((c=>c instanceof ki)).reduce(((c,u)=>{if(t.dr(u)||!u.Tt())return c;const d=u.At(),g=u.In();if(d.Fi()||!g.Kr(e))return c;const B=g.qh(e);if(B===null)return c;const f=xt(u.Pt());return c.concat([d.Ot(B.Vt[3],f.Vt)])}),[]);if(a.length===0)return s;a.sort(((c,u)=>Math.abs(c-o)-Math.abs(u-o)));const l=a[0];return s=i.pn(l,n),s}}class td extends Xe{constructor(){super(...arguments),this.Lt=null}it(A){this.Lt=A}Z({context:A,bitmapSize:e,horizontalPixelRatio:t,verticalPixelRatio:s}){if(this.Lt===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=H(this.Lt);if(n.Pa){A.strokeStyle=n.Ra,Bt(A,n.Da),A.beginPath();for(const o of n.Oa){const a=Math.round(o.Aa*t);A.moveTo(a,-i),A.lineTo(a,e.height+i)}A.stroke()}if(n.Va){A.strokeStyle=n.Ba,Bt(A,n.Ia),A.beginPath();for(const o of n.za){const a=Math.round(o.Aa*s);A.moveTo(-i,a),A.lineTo(e.width+i,a)}A.stroke()}}))}}class rd{constructor(A){this.Ht=new td,this.bt=!0,this.nn=A}gt(){this.bt=!0}xt(){if(this.bt){const A=this.nn.qt().W().grid,e={Va:A.horzLines.visible,Pa:A.vertLines.visible,Ba:A.horzLines.color,Ra:A.vertLines.color,Ia:A.horzLines.style,Da:A.vertLines.style,za:this.nn.vn().Ea(),Oa:(this.nn.qt().yt().Ea()||[]).map((t=>({Aa:t.coord})))};this.Ht.it(e),this.bt=!1}return this.Ht}}class sd{constructor(A){this.wn=new rd(A)}Wh(){return this.wn}}const _i={La:4,Na:1e-4};function Ht(r,A){const e=100*(r-A)/A;return A<0?-e:e}function id(r,A){const e=Ht(r.Sh(),A),t=Ht(r.kh(),A);return new ce(e,t)}function rr(r,A){const e=100*(r-A)/A+100;return A<0?-e:e}function nd(r,A){const e=rr(r.Sh(),A),t=rr(r.kh(),A);return new ce(e,t)}function qr(r,A){const e=Math.abs(r);if(e<1e-15)return 0;const t=Math.log10(e+A.Na)+A.La;return r<0?-t:t}function sr(r,A){const e=Math.abs(r);if(e<1e-15)return 0;const t=Math.pow(10,e-A.La)-A.Na;return r<0?-t:t}function ir(r,A){if(r===null)return null;const e=qr(r.Sh(),A),t=qr(r.kh(),A);return new ce(e,t)}function $r(r,A){if(r===null)return null;const e=sr(r.Sh(),A),t=sr(r.kh(),A);return new ce(e,t)}function Ni(r){if(r===null)return _i;const A=Math.abs(r.kh()-r.Sh());if(A>=1||A<1e-15)return _i;const e=Math.ceil(Math.abs(Math.log10(A))),t=_i.La+e;return{La:t,Na:1/Math.pow(10,t)}}class Ki{constructor(A,e){if(this.Fa=A,this.Wa=e,(function(t){if(t<0)return!1;for(let s=t;s>1;s/=10)if(s%10!=0)return!1;return!0})(this.Fa))this.ja=[2,2.5,2];else{this.ja=[];for(let t=this.Fa;t!==1;){if(t%2==0)this.ja.push(2),t/=2;else{if(t%5!=0)throw new Error("unexpected base");this.ja.push(2,2.5),t/=5}if(this.ja.length>100)throw new Error("something wrong with base")}}}Ha(A,e,t){const s=this.Fa===0?0:1/this.Fa;let i=Math.pow(10,Math.max(0,Math.ceil(Math.log10(A-e)))),n=0,o=this.Wa[0];for(;;){const u=Xr(i,s,1e-14)&&i>s+1e-14,d=Xr(i,t*o,1e-14),g=Xr(i,1,1e-14);if(!(u&&d&&g))break;i/=o,o=this.Wa[++n%this.Wa.length]}if(i<=s+1e-14&&(i=s),i=Math.max(1,i),this.ja.length>0&&(a=i,l=1,c=1e-14,Math.abs(a-l)<c))for(n=0,o=this.ja[0];Xr(i,t*o,1e-14)&&i>s+1e-14;)i/=o,o=this.ja[++n%this.ja.length];var a,l,c;return i}}class ba{constructor(A,e,t,s){this.$a=[],this.Li=A,this.Fa=e,this.Ua=t,this.qa=s}Ha(A,e){if(A<e)throw new Error("high < low");const t=this.Li.zt(),s=(A-e)*this.Ya()/t,i=new Ki(this.Fa,[2,2.5,2]),n=new Ki(this.Fa,[2,2,2.5]),o=new Ki(this.Fa,[2.5,2,2]),a=[];return a.push(i.Ha(A,e,s),n.Ha(A,e,s),o.Ha(A,e,s)),(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)}Xa(){const A=this.Li,e=A.Pt();if(e===null)return void(this.$a=[]);const t=A.zt(),s=this.Ua(t-1,e),i=this.Ua(0,e),n=this.Li.W().entireTextOnly?this.Ka()/2:0,o=n,a=t-1-n,l=Math.max(s,i),c=Math.min(s,i);if(l===c)return void(this.$a=[]);let u=this.Ha(l,c),d=l%u;d+=d<0?u:0;const g=l>=c?1:-1;let B=null,f=0;for(let w=l-d;w>c;w-=u){const m=this.qa(w,e,!0);B!==null&&Math.abs(m-B)<this.Ya()||m<o||m>a||(f<this.$a.length?(this.$a[f].Aa=m,this.$a[f].Za=A.Ga(w)):this.$a.push({Aa:m,Za:A.Ga(w)}),f++,B=m,A.Ja()&&(u=this.Ha(w*g,c)))}this.$a.length=f}Ea(){return this.$a}Ka(){return this.Li.P()}Ya(){return Math.ceil(2.5*this.Ka())}}function Qa(r){return r.slice().sort(((A,e)=>H(A.Zi())-H(e.Zi())))}var Fa;(function(r){r[r.Normal=0]="Normal",r[r.Logarithmic=1]="Logarithmic",r[r.Percentage=2]="Percentage",r[r.IndexedTo100=3]="IndexedTo100"})(Fa||(Fa={}));const ya=new Aa,Ua=new zr(100,1);class od{constructor(A,e,t,s){this.Qa=0,this.io=null,this.Dh=null,this.no=null,this.so={eo:!1,ro:null},this.ho=0,this.lo=0,this.ao=new KA,this.oo=new KA,this._o=[],this.uo=null,this.co=null,this.do=null,this.fo=null,this.da=Ua,this.vo=Ni(null),this.po=A,this.cn=e,this.mo=t,this.bo=s,this.wo=new ba(this,100,this.Mo.bind(this),this.xo.bind(this))}xa(){return this.po}W(){return this.cn}Nh(A){if(Ue(this.cn,A),this.Sa(),A.mode!==void 0&&this.So({yr:A.mode}),A.scaleMargins!==void 0){const e=ie(A.scaleMargins.top),t=ie(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||e+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.ko(),this.co=null}}yo(){return this.cn.autoScale}Ja(){return this.cn.mode===1}ph(){return this.cn.mode===2}Co(){return this.cn.mode===3}yr(){return{Wn:this.cn.autoScale,To:this.cn.invertScale,yr:this.cn.mode}}So(A){const e=this.yr();let t=null;A.Wn!==void 0&&(this.cn.autoScale=A.Wn),A.yr!==void 0&&(this.cn.mode=A.yr,A.yr!==2&&A.yr!==3||(this.cn.autoScale=!0),this.so.eo=!1),e.yr===1&&A.yr!==e.yr&&((function(i,n){if(i===null)return!1;const o=sr(i.Sh(),n),a=sr(i.kh(),n);return isFinite(o)&&isFinite(a)})(this.Dh,this.vo)?(t=$r(this.Dh,this.vo),t!==null&&this.Po(t)):this.cn.autoScale=!0),A.yr===1&&A.yr!==e.yr&&(t=ir(this.Dh,this.vo),t!==null&&this.Po(t));const s=e.yr!==this.cn.mode;s&&(e.yr===2||this.ph())&&this.Sa(),s&&(e.yr===3||this.Co())&&this.Sa(),A.To!==void 0&&e.To!==A.To&&(this.cn.invertScale=A.To,this.Ro()),this.oo.m(e,this.yr())}Do(){return this.oo}P(){return this.mo.fontSize}zt(){return this.Qa}Oo(A){this.Qa!==A&&(this.Qa=A,this.ko(),this.co=null)}Ao(){if(this.io)return this.io;const A=this.zt()-this.Vo()-this.Bo();return this.io=A,A}Ah(){return this.Io(),this.Dh}Po(A,e){const t=this.Dh;(e||t===null&&A!==null||t!==null&&!t.Mh(A))&&(this.co=null,this.Dh=A)}Fi(){return this.Io(),this.Qa===0||!this.Dh||this.Dh.Fi()}zo(A){return this.To()?A:this.zt()-1-A}Ot(A,e){return this.ph()?A=Ht(A,e):this.Co()&&(A=rr(A,e)),this.xo(A,e)}Qs(A,e,t){this.Io();const s=this.Bo(),i=H(this.Ah()),n=i.Sh(),o=i.kh(),a=this.Ao()-1,l=this.To(),c=a/(o-n),u=t===void 0?0:t.from,d=t===void 0?A.length:t.to,g=this.Eo();for(let B=u;B<d;B++){const f=A[B],w=f.ct;if(isNaN(w))continue;let m=w;g!==null&&(m=g(f.ct,e));const p=s+c*(m-n),v=l?p:this.Qa-1-p;f.rt=v}}me(A,e,t){this.Io();const s=this.Bo(),i=H(this.Ah()),n=i.Sh(),o=i.kh(),a=this.Ao()-1,l=this.To(),c=a/(o-n),u=t===void 0?0:t.from,d=t===void 0?A.length:t.to,g=this.Eo();for(let B=u;B<d;B++){const f=A[B];let w=f.we,m=f.ge,p=f.Me,v=f.xe;g!==null&&(w=g(f.we,e),m=g(f.ge,e),p=g(f.Me,e),v=g(f.xe,e));let y=s+c*(w-n),E=l?y:this.Qa-1-y;f.ve=E,y=s+c*(m-n),E=l?y:this.Qa-1-y,f.ce=E,y=s+c*(p-n),E=l?y:this.Qa-1-y,f.de=E,y=s+c*(v-n),E=l?y:this.Qa-1-y,f.pe=E}}pn(A,e){const t=this.Mo(A,e);return this.Lo(t,e)}Lo(A,e){let t=A;return this.ph()?t=(function(s,i){return i<0&&(s=-s),s/100*i+i})(t,e):this.Co()&&(t=(function(s,i){return s-=100,i<0&&(s=-s),s/100*i+i})(t,e)),t}Ta(){return this._o}No(){if(this.uo)return this.uo;let A=[];for(let e=0;e<this._o.length;e++){const t=this._o[e];t.Zi()===null&&t.Gi(e+1),A.push(t)}return A=Qa(A),this.uo=A,this.uo}Fo(A){this._o.indexOf(A)===-1&&(this._o.push(A),this.Sa(),this.Wo())}jo(A){const e=this._o.indexOf(A);if(e===-1)throw new Error("source is not attached to scale");this._o.splice(e,1),this._o.length===0&&(this.So({Wn:!0}),this.Po(null)),this.Sa(),this.Wo()}Pt(){let A=null;for(const e of this._o){const t=e.Pt();t!==null&&(A===null||t.ia<A.ia)&&(A=t)}return A===null?null:A.Vt}To(){return this.cn.invertScale}Ea(){const A=this.Pt()===null;if(this.co!==null&&(A||this.co.Ho===A))return this.co.Ea;this.wo.Xa();const e=this.wo.Ea();return this.co={Ea:e,Ho:A},this.ao.m(),e}$o(){return this.ao}Uo(A){this.ph()||this.Co()||this.do===null&&this.no===null&&(this.Fi()||(this.do=this.Qa-A,this.no=H(this.Ah()).xh()))}qo(A){if(this.ph()||this.Co()||this.do===null)return;this.So({Wn:!1}),(A=this.Qa-A)<0&&(A=0);let e=(this.do+.2*(this.Qa-1))/(A+.2*(this.Qa-1));const t=H(this.no).xh();e=Math.max(e,.1),t.Ch(e),this.Po(t)}Yo(){this.ph()||this.Co()||(this.do=null,this.no=null)}Xo(A){this.yo()||this.fo===null&&this.no===null&&(this.Fi()||(this.fo=A,this.no=H(this.Ah()).xh()))}Ko(A){if(this.yo()||this.fo===null)return;const e=H(this.Ah()).yh()/(this.Ao()-1);let t=A-this.fo;this.To()&&(t*=-1);const s=t*e,i=H(this.no).xh();i.Th(s),this.Po(i,!0),this.co=null}Zo(){this.yo()||this.fo!==null&&(this.fo=null,this.no=null)}ca(){return this.da||this.Sa(),this.da}Wi(A,e){switch(this.cn.mode){case 2:return this.Go(Ht(A,e));case 3:return this.ca().format(rr(A,e));default:return this.zh(A)}}Ga(A){switch(this.cn.mode){case 2:return this.Go(A);case 3:return this.ca().format(A);default:return this.zh(A)}}Wl(A){return this.zh(A,H(this.Jo()).ca())}jl(A,e){return A=Ht(A,e),this.Go(A,ya)}Qo(){return this._o}t_(A){this.so={ro:A,eo:!1}}On(){this._o.forEach((A=>A.On()))}Sa(){this.co=null;const A=this.Jo();let e=100;A!==null&&(e=Math.round(1/A.ua())),this.da=Ua,this.ph()?(this.da=ya,e=100):this.Co()?(this.da=new zr(100,1),e=100):A!==null&&(this.da=A.ca()),this.wo=new ba(this,e,this.Mo.bind(this),this.xo.bind(this)),this.wo.Xa()}Wo(){this.uo=null}Jo(){return this._o[0]||null}Vo(){return this.To()?this.cn.scaleMargins.bottom*this.zt()+this.lo:this.cn.scaleMargins.top*this.zt()+this.ho}Bo(){return this.To()?this.cn.scaleMargins.top*this.zt()+this.ho:this.cn.scaleMargins.bottom*this.zt()+this.lo}Io(){this.so.eo||(this.so.eo=!0,this.i_())}ko(){this.io=null}xo(A,e){if(this.Io(),this.Fi())return 0;A=this.Ja()&&A?qr(A,this.vo):A;const t=H(this.Ah()),s=this.Bo()+(this.Ao()-1)*(A-t.Sh())/t.yh();return this.zo(s)}Mo(A,e){if(this.Io(),this.Fi())return 0;const t=this.zo(A),s=H(this.Ah()),i=s.Sh()+s.yh()*((t-this.Bo())/(this.Ao()-1));return this.Ja()?sr(i,this.vo):i}Ro(){this.co=null,this.wo.Xa()}i_(){const A=this.so.ro;if(A===null)return;let e=null;const t=this.Qo();let s=0,i=0;for(const a of t){if(!a.Tt())continue;const l=a.Pt();if(l===null)continue;const c=a.Rl(A.Os(),A.di());let u=c&&c.Ah();if(u!==null){switch(this.cn.mode){case 1:u=ir(u,this.vo);break;case 2:u=id(u,l.Vt);break;case 3:u=nd(u,l.Vt)}if(e=e===null?u:e.ts(H(u)),c!==null){const d=c.Vh();d!==null&&(s=Math.max(s,d.above),i=Math.max(s,d.below))}}}if(s===this.ho&&i===this.lo||(this.ho=s,this.lo=i,this.co=null,this.ko()),e!==null){if(e.Sh()===e.kh()){const a=this.Jo(),l=5*(a===null||this.ph()||this.Co()?1:a.ua());this.Ja()&&(e=$r(e,this.vo)),e=new ce(e.Sh()-l,e.kh()+l),this.Ja()&&(e=ir(e,this.vo))}if(this.Ja()){const a=$r(e,this.vo),l=Ni(a);if(n=l,o=this.vo,n.La!==o.La||n.Na!==o.Na){const c=this.no!==null?$r(this.no,this.vo):null;this.vo=l,e=ir(a,l),c!==null&&(this.no=ir(c,l))}}this.Po(e)}else this.Dh===null&&(this.Po(new ce(-.5,.5)),this.vo=Ni(null));var n,o;this.so.eo=!0}Eo(){return this.ph()?Ht:this.Co()?rr:this.Ja()?A=>qr(A,this.vo):null}n_(A,e,t){return e===void 0?(t===void 0&&(t=this.ca()),t.format(A)):e(A)}zh(A,e){return this.n_(A,this.bo.priceFormatter,e)}Go(A,e){return this.n_(A,this.bo.percentageFormatter,e)}}class ad{constructor(A,e){this._o=[],this.s_=new Map,this.Qa=0,this.e_=0,this.r_=1e3,this.uo=null,this.h_=new KA,this.wl=A,this.Ui=e,this.l_=new sd(this);const t=e.W();this.a_=this.o_("left",t.leftPriceScale),this.__=this.o_("right",t.rightPriceScale),this.a_.Do().l(this.u_.bind(this,this.a_),this),this.__.Do().l(this.u_.bind(this,this.__),this),this.c_(t)}c_(A){if(A.leftPriceScale&&this.a_.Nh(A.leftPriceScale),A.rightPriceScale&&this.__.Nh(A.rightPriceScale),A.localization&&(this.a_.Sa(),this.__.Sa()),A.overlayPriceScales){const e=Array.from(this.s_.values());for(const t of e){const s=H(t[0].At());s.Nh(A.overlayPriceScales),A.localization&&s.Sa()}}}d_(A){switch(A){case"left":return this.a_;case"right":return this.__}return this.s_.has(A)?ie(this.s_.get(A))[0].At():null}S(){this.qt().f_().p(this),this.a_.Do().p(this),this.__.Do().p(this),this._o.forEach((A=>{A.S&&A.S()})),this.h_.m()}v_(){return this.r_}p_(A){this.r_=A}qt(){return this.Ui}$i(){return this.e_}zt(){return this.Qa}m_(A){this.e_=A,this.b_()}Oo(A){this.Qa=A,this.a_.Oo(A),this.__.Oo(A),this._o.forEach((e=>{if(this.dr(e)){const t=e.At();t!==null&&t.Oo(A)}})),this.b_()}Ta(){return this._o}dr(A){const e=A.At();return e===null||this.a_!==e&&this.__!==e}Fo(A,e,t){const s=t!==void 0?t:this.g_().w_+1;this.M_(A,e,s)}jo(A){const e=this._o.indexOf(A);At(e!==-1,"removeDataSource: invalid data source"),this._o.splice(e,1);const t=H(A.At()).xa();if(this.s_.has(t)){const i=ie(this.s_.get(t)),n=i.indexOf(A);n!==-1&&(i.splice(n,1),i.length===0&&this.s_.delete(t))}const s=A.At();s&&s.Ta().indexOf(A)>=0&&s.jo(A),s!==null&&(s.Wo(),this.x_(s)),this.uo=null}pr(A){return A===this.a_?"left":A===this.__?"right":"overlay"}S_(){return this.a_}k_(){return this.__}y_(A,e){A.Uo(e)}C_(A,e){A.qo(e),this.b_()}T_(A){A.Yo()}P_(A,e){A.Xo(e)}R_(A,e){A.Ko(e),this.b_()}D_(A){A.Zo()}b_(){this._o.forEach((A=>{A.On()}))}vn(){let A=null;return this.Ui.W().rightPriceScale.visible&&this.__.Ta().length!==0?A=this.__:this.Ui.W().leftPriceScale.visible&&this.a_.Ta().length!==0?A=this.a_:this._o.length!==0&&(A=this._o[0].At()),A===null&&(A=this.__),A}vr(){let A=null;return this.Ui.W().rightPriceScale.visible?A=this.__:this.Ui.W().leftPriceScale.visible&&(A=this.a_),A}x_(A){A!==null&&A.yo()&&this.O_(A)}A_(A){const e=this.wl.Xs();A.So({Wn:!0}),e!==null&&A.t_(e),this.b_()}V_(){this.O_(this.a_),this.O_(this.__)}B_(){this.x_(this.a_),this.x_(this.__),this._o.forEach((A=>{this.dr(A)&&this.x_(A.At())})),this.b_(),this.Ui.Fh()}No(){return this.uo===null&&(this.uo=Qa(this._o)),this.uo}I_(){return this.h_}z_(){return this.l_}O_(A){const e=A.Qo();if(e&&e.length>0&&!this.wl.Fi()){const t=this.wl.Xs();t!==null&&A.t_(t)}A.On()}g_(){const A=this.No();if(A.length===0)return{E_:0,w_:0};let e=0,t=0;for(let s=0;s<A.length;s++){const i=A[s].Zi();i!==null&&(i<e&&(e=i),i>t&&(t=i))}return{E_:e,w_:t}}M_(A,e,t){let s=this.d_(e);if(s===null&&(s=this.o_(e,this.Ui.W().overlayPriceScales)),this._o.push(A),!Wr(e)){const i=this.s_.get(e)||[];i.push(A),this.s_.set(e,i)}s.Fo(A),A.Ji(s),A.Gi(t),this.x_(s),this.uo=null}u_(A,e,t){e.yr!==t.yr&&this.O_(A)}o_(A,e){const t=Object.assign({visible:!0,autoScale:!0},ze(e)),s=new od(A,t,this.Ui.W().layout,this.Ui.W().localization);return s.Oo(this.zt()),s}}class ld{constructor(A,e,t=50){this.Ke=0,this.Ze=1,this.Ge=1,this.Qe=new Map,this.Je=new Map,this.L_=A,this.N_=e,this.tr=t}F_(A){const e=A.time,t=this.N_.cacheKey(e),s=this.Qe.get(t);if(s!==void 0)return s.W_;if(this.Ke===this.tr){const n=this.Je.get(this.Ge);this.Je.delete(this.Ge),this.Qe.delete(ie(n)),this.Ge++,this.Ke--}const i=this.L_(A);return this.Qe.set(t,{W_:i,er:this.Ze}),this.Je.set(this.Ze,t),this.Ke++,this.Ze++,i}}class nr{constructor(A,e){At(A<=e,"right should be >= left"),this.j_=A,this.H_=e}Os(){return this.j_}di(){return this.H_}U_(){return this.H_-this.j_+1}Kr(A){return this.j_<=A&&A<=this.H_}Mh(A){return this.j_===A.Os()&&this.H_===A.di()}}function Ea(r,A){return r===null||A===null?r===A:r.Mh(A)}class cd{constructor(){this.q_=new Map,this.Qe=null,this.Y_=!1}X_(A){this.Y_=A,this.Qe=null}K_(A,e){this.Z_(e),this.Qe=null;for(let t=e;t<A.length;++t){const s=A[t];let i=this.q_.get(s.timeWeight);i===void 0&&(i=[],this.q_.set(s.timeWeight,i)),i.push({index:t,time:s.time,weight:s.timeWeight,originalTime:s.originalTime})}}G_(A,e){const t=Math.ceil(e/A);return this.Qe!==null&&this.Qe.J_===t||(this.Qe={Ea:this.Q_(t),J_:t}),this.Qe.Ea}Z_(A){if(A===0)return void this.q_.clear();const e=[];this.q_.forEach(((t,s)=>{A<=t[0].index?e.push(s):t.splice(jt(t,A,(i=>i.index<A)),1/0)}));for(const t of e)this.q_.delete(t)}Q_(A){let e=[];for(const t of Array.from(this.q_.keys()).sort(((s,i)=>i-s))){if(!this.q_.get(t))continue;const s=e;e=[];const i=s.length;let n=0;const o=ie(this.q_.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=s[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.Y_)return s}for(;n<i;n++)e.push(s[n])}return e}}class Lt{constructor(A){this.tu=A}iu(){return this.tu===null?null:new nr(Math.floor(this.tu.Os()),Math.ceil(this.tu.di()))}nu(){return this.tu}static su(){return new Lt(null)}}function hd(r,A){return r.weight>A.weight?r:A}class ud{constructor(A,e,t,s){this.e_=0,this.eu=null,this.ru=[],this.fo=null,this.do=null,this.hu=new cd,this.lu=new Map,this.au=Lt.su(),this.ou=!0,this._u=new KA,this.uu=new KA,this.cu=new KA,this.du=null,this.fu=null,this.vu=[],this.cn=e,this.bo=t,this.pu=e.rightOffset,this.mu=e.barSpacing,this.Ui=A,this.N_=s,this.bu(),this.hu.X_(e.uniformDistribution)}W(){return this.cn}wu(A){Ue(this.bo,A),this.gu(),this.bu()}Nh(A,e){var t;Ue(this.cn,A),this.cn.fixLeftEdge&&this.Mu(),this.cn.fixRightEdge&&this.xu(),A.barSpacing!==void 0&&this.Ui.Gn(A.barSpacing),A.rightOffset!==void 0&&this.Ui.Jn(A.rightOffset),A.minBarSpacing!==void 0&&this.Ui.Gn((t=A.barSpacing)!==null&&t!==void 0?t:this.mu),this.gu(),this.bu(),this.cu.m()}mn(A){var e,t;return(t=(e=this.ru[A])===null||e===void 0?void 0:e.time)!==null&&t!==void 0?t:null}qi(A){var e;return(e=this.ru[A])!==null&&e!==void 0?e:null}ya(A,e){if(this.ru.length<1)return null;if(this.N_.key(A)>this.N_.key(this.ru[this.ru.length-1].time))return e?this.ru.length-1:null;const t=jt(this.ru,this.N_.key(A),((s,i)=>this.N_.key(s.time)<i));return this.N_.key(A)<this.N_.key(this.ru[t].time)?e?t:null:t}Fi(){return this.e_===0||this.ru.length===0||this.eu===null}ka(){return this.ru.length>0}Xs(){return this.Su(),this.au.iu()}ku(){return this.Su(),this.au.nu()}yu(){const A=this.Xs();if(A===null)return null;const e={from:A.Os(),to:A.di()};return this.Cu(e)}Cu(A){const e=Math.round(A.from),t=Math.round(A.to),s=H(this.Tu()),i=H(this.Bn());return{from:H(this.qi(Math.max(s,e))),to:H(this.qi(Math.min(i,t)))}}Pu(A){return{from:H(this.ya(A.from,!0)),to:H(this.ya(A.to,!0))}}$i(){return this.e_}m_(A){if(!isFinite(A)||A<=0||this.e_===A)return;const e=this.ku(),t=this.e_;if(this.e_=A,this.ou=!0,this.cn.lockVisibleTimeRangeOnResize&&t!==0){const s=this.mu*A/t;this.mu=s}if(this.cn.fixLeftEdge&&e!==null&&e.Os()<=0){const s=t-A;this.pu-=Math.round(s/this.mu)+1,this.ou=!0}this.Ru(),this.Du()}Et(A){if(this.Fi()||!Yt(A))return 0;const e=this.Ou()+this.pu-A;return this.e_-(e+.5)*this.mu-1}Js(A,e){const t=this.Ou(),s=e===void 0?0:e.from,i=e===void 0?A.length:e.to;for(let n=s;n<i;n++){const o=A[n].ut,a=t+this.pu-o,l=this.e_-(a+.5)*this.mu-1;A[n].et=l}}Au(A){return Math.ceil(this.Vu(A))}Jn(A){this.ou=!0,this.pu=A,this.Du(),this.Ui.Bu(),this.Ui.Fh()}he(){return this.mu}Gn(A){this.Iu(A),this.Du(),this.Ui.Bu(),this.Ui.Fh()}zu(){return this.pu}Ea(){if(this.Fi())return null;if(this.fu!==null)return this.fu;const A=this.mu,e=5*(this.Ui.W().layout.fontSize+4)/8*(this.cn.tickMarkMaxCharacterLength||8),t=Math.round(e/A),s=H(this.Xs()),i=Math.max(s.Os(),s.Os()-t),n=Math.max(s.di(),s.di()-t),o=this.hu.G_(A,e),a=this.Tu()+t,l=this.Bn()-t,c=this.Eu(),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.vu.length?(f=this.vu[g],f.coord=this.Et(B.index),f.label=this.Lu(B),f.weight=B.weight):(f={needAlignCoordinate:!1,coord:this.Et(B.index),label:this.Lu(B),weight:B.weight},this.vu.push(f)),this.mu>e/2&&!c?f.needAlignCoordinate=!1:f.needAlignCoordinate=u&&B.index<=a||d&&B.index>=l,g++}return this.vu.length=g,this.fu=this.vu,this.vu}Nu(){this.ou=!0,this.Gn(this.cn.barSpacing),this.Jn(this.cn.rightOffset)}Fu(A){this.ou=!0,this.eu=A,this.Du(),this.Mu()}Wu(A,e){const t=this.Vu(A),s=this.he(),i=s+e*(s/10);this.Gn(i),this.cn.rightBarStaysOnScroll||this.Jn(this.zu()+(t-this.Vu(A)))}Uo(A){this.fo&&this.Zo(),this.do===null&&this.du===null&&(this.Fi()||(this.do=A,this.ju()))}qo(A){if(this.du===null)return;const e=Si(this.e_-A,0,this.e_),t=Si(this.e_-H(this.do),0,this.e_);e!==0&&t!==0&&this.Gn(this.du.he*e/t)}Yo(){this.do!==null&&(this.do=null,this.Hu())}Xo(A){this.fo===null&&this.du===null&&(this.Fi()||(this.fo=A,this.ju()))}Ko(A){if(this.fo===null)return;const e=(this.fo-A)/this.he();this.pu=H(this.du).zu+e,this.ou=!0,this.Du()}Zo(){this.fo!==null&&(this.fo=null,this.Hu())}$u(){this.Uu(this.cn.rightOffset)}Uu(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.pu,s=performance.now();this.Ui.Xn({qu:i=>(i-s)/e>=1,Yu:i=>{const n=(i-s)/e;return n>=1?A:t+(A-t)*n}})}gt(A,e){this.ou=!0,this.ru=A,this.hu.K_(A,e),this.Du()}Xu(){return this._u}Ku(){return this.uu}Zu(){return this.cu}Ou(){return this.eu||0}Gu(A){const e=A.U_();this.Iu(this.e_/e),this.pu=A.di()-this.Ou(),this.Du(),this.ou=!0,this.Ui.Bu(),this.Ui.Fh()}Ju(){const A=this.Tu(),e=this.Bn();A!==null&&e!==null&&this.Gu(new nr(A,e+this.cn.rightOffset))}Qu(A){const e=new nr(A.from,A.to);this.Gu(e)}Yi(A){return this.bo.timeFormatter!==void 0?this.bo.timeFormatter(A.originalTime):this.N_.formatHorzItem(A.time)}Bn(){return this.ru.length===0?null:this.ru.length-1}Eu(){const{handleScroll:A,handleScale:e}=this.Ui.W();return!(A.horzTouchDrag||A.mouseWheel||A.pressedMouseMove||A.vertTouchDrag||e.axisDoubleClickReset.time||e.axisPressedMouseMove.time||e.mouseWheel||e.pinch)}Tu(){return this.ru.length===0?null:0}tc(A){return(this.e_-1-A)/this.mu}Vu(A){const e=this.tc(A),t=this.Ou()+this.pu-e;return Math.round(1e6*t)/1e6}Iu(A){const e=this.mu;this.mu=A,this.Ru(),e!==this.mu&&(this.ou=!0,this.ic())}Su(){if(!this.ou)return;if(this.ou=!1,this.Fi())return void this.nc(Lt.su());const A=this.Ou(),e=this.e_/this.mu,t=this.pu+A,s=new nr(t-e+1,t);this.nc(new Lt(s))}Ru(){const A=this.sc();if(this.mu<A&&(this.mu=A,this.ou=!0),this.e_!==0){const e=.5*this.e_;this.mu>e&&(this.mu=e,this.ou=!0)}}sc(){return this.cn.fixLeftEdge&&this.cn.fixRightEdge&&this.ru.length!==0?this.e_/this.ru.length:this.cn.minBarSpacing}Du(){const A=this.ec();this.pu>A&&(this.pu=A,this.ou=!0);const e=this.rc();e!==null&&this.pu<e&&(this.pu=e,this.ou=!0)}rc(){const A=this.Tu(),e=this.eu;return A===null||e===null?null:A-e-1+(this.cn.fixLeftEdge?this.e_/this.mu:Math.min(2,this.ru.length))}ec(){return this.cn.fixRightEdge?0:this.e_/this.mu-Math.min(2,this.ru.length)}ju(){this.du={he:this.he(),zu:this.zu()}}Hu(){this.du=null}Lu(A){let e=this.lu.get(A.weight);return e===void 0&&(e=new ld((t=>this.hc(t)),this.N_),this.lu.set(A.weight,e)),e.F_(A)}hc(A){return this.N_.formatTickmark(A,this.bo)}nc(A){const e=this.au;this.au=A,Ea(e.iu(),this.au.iu())||this._u.m(),Ea(e.nu(),this.au.nu())||this.uu.m(),this.ic()}ic(){this.fu=null}gu(){this.ic(),this.lu.clear()}bu(){this.N_.updateFormatter(this.bo)}Mu(){if(!this.cn.fixLeftEdge)return;const A=this.Tu();if(A===null)return;const e=this.Xs();if(e===null)return;const t=e.Os()-A;if(t<0){const s=this.pu-t-1;this.Jn(s)}this.Ru()}xu(){this.Du(),this.Ru()}}class fd extends yi{constructor(A){super(),this.lc=new Map,this.Lt=A}Z(A){}J(A){if(!this.Lt.Tt)return;const{context:e,mediaSize:t}=A;let s=0;for(const n of this.Lt.ac){if(n.Jt.length===0)continue;e.font=n.R;const o=this.oc(e,n.Jt);o>t.width?n.Wu=t.width/o:n.Wu=1,s+=n._c*n.Wu}let i=0;switch(this.Lt.uc){case"top":i=0;break;case"center":i=Math.max((t.height-s)/2,0);break;case"bottom":i=Math.max(t.height-s,0)}e.fillStyle=this.Lt.O;for(const n of this.Lt.ac){e.save();let o=0;switch(this.Lt.cc){case"left":e.textAlign="left",o=n._c/2;break;case"center":e.textAlign="center",o=t.width/2;break;case"right":e.textAlign="right",o=t.width-1-n._c/2}e.translate(o,i),e.textBaseline="top",e.font=n.R,e.scale(n.Wu,n.Wu),e.fillText(n.Jt,0,n.dc),e.restore(),i+=n._c*n.Wu}}oc(A,e){const t=this.fc(A.font);let s=t.get(e);return s===void 0&&(s=A.measureText(e).width,t.set(e,s)),s}fc(A){let e=this.lc.get(A);return e===void 0&&(e=new Map,this.lc.set(A,e)),e}}class dd{constructor(A){this.bt=!0,this.jt={Tt:!1,O:"",ac:[],uc:"center",cc:"center"},this.Ht=new fd(this.jt),this.$t=A}gt(){this.bt=!0}xt(){return this.bt&&(this.St(),this.bt=!1),this.Ht}St(){const A=this.$t.W(),e=this.jt;e.Tt=A.visible,e.Tt&&(e.O=A.color,e.cc=A.horzAlign,e.uc=A.vertAlign,e.ac=[{Jt:A.text,R:St(A.fontSize,A.fontFamily,A.fontStyle),_c:1.2*A.fontSize,dc:0,Wu:0}])}}class Bd extends Ei{constructor(A,e){super(),this.cn=e,this.wn=new dd(this)}Rn(){return[]}Pn(){return[this.wn]}W(){return this.cn}On(){this.wn.gt()}}var xa,Sa,Ha,La,Ia;(function(r){r[r.OnTouchEnd=0]="OnTouchEnd",r[r.OnNextTap=1]="OnNextTap"})(xa||(xa={}));class gd{constructor(A,e,t){this.vc=[],this.mc=[],this.e_=0,this.bc=null,this.wc=new KA,this.gc=new KA,this.Mc=null,this.xc=A,this.cn=e,this.N_=t,this.Sc=new Ju(this),this.wl=new ud(this,e.timeScale,this.cn.localization,t),this.wt=new nf(this,e.crosshair),this.kc=new ed(e.crosshair),this.yc=new Bd(this,e.watermark),this.Cc(),this.vc[0].p_(2e3),this.Tc=this.Pc(0),this.Rc=this.Pc(1)}$l(){this.Dc(YA.es())}Fh(){this.Dc(YA.ss())}sa(){this.Dc(new YA(1))}Ul(A){const e=this.Oc(A);this.Dc(e)}Ac(){return this.bc}Vc(A){const e=this.bc;this.bc=A,e!==null&&this.Ul(e.Bc),A!==null&&this.Ul(A.Bc)}W(){return this.cn}Nh(A){Ue(this.cn,A),this.vc.forEach((e=>e.c_(A))),A.timeScale!==void 0&&this.wl.Nh(A.timeScale),A.localization!==void 0&&this.wl.wu(A.localization),(A.leftPriceScale||A.rightPriceScale)&&this.wc.m(),this.Tc=this.Pc(0),this.Rc=this.Pc(1),this.$l()}Ic(A,e){if(A==="left")return void this.Nh({leftPriceScale:e});if(A==="right")return void this.Nh({rightPriceScale:e});const t=this.zc(A);t!==null&&(t.At.Nh(e),this.wc.m())}zc(A){for(const e of this.vc){const t=e.d_(A);if(t!==null)return{Ut:e,At:t}}return null}yt(){return this.wl}Ec(){return this.vc}Lc(){return this.yc}Nc(){return this.wt}Fc(){return this.gc}Wc(A,e){A.Oo(e),this.Bu()}m_(A){this.e_=A,this.wl.m_(this.e_),this.vc.forEach((e=>e.m_(A))),this.Bu()}Cc(A){const e=new ad(this.wl,this);A!==void 0?this.vc.splice(A,0,e):this.vc.push(e);const t=A===void 0?this.vc.length-1:A,s=YA.es();return s.Nn(t,{Fn:0,Wn:!0}),this.Dc(s),e}y_(A,e,t){A.y_(e,t)}C_(A,e,t){A.C_(e,t),this.ql(),this.Dc(this.jc(A,2))}T_(A,e){A.T_(e),this.Dc(this.jc(A,2))}P_(A,e,t){e.yo()||A.P_(e,t)}R_(A,e,t){e.yo()||(A.R_(e,t),this.ql(),this.Dc(this.jc(A,2)))}D_(A,e){e.yo()||(A.D_(e),this.Dc(this.jc(A,2)))}A_(A,e){A.A_(e),this.Dc(this.jc(A,2))}Hc(A){this.wl.Uo(A)}$c(A,e){const t=this.yt();if(t.Fi()||e===0)return;const s=t.$i();A=Math.max(1,Math.min(A,s)),t.Wu(A,e),this.Bu()}Uc(A){this.qc(0),this.Yc(A),this.Xc()}Kc(A){this.wl.qo(A),this.Bu()}Zc(){this.wl.Yo(),this.Fh()}qc(A){this.wl.Xo(A)}Yc(A){this.wl.Ko(A),this.Bu()}Xc(){this.wl.Zo(),this.Fh()}Mt(){return this.mc}Gc(A,e,t,s,i){this.wt.gn(A,e);let n=NaN,o=this.wl.Au(A);const a=this.wl.Xs();a!==null&&(o=Math.min(Math.max(a.Os(),o),a.di()));const l=s.vn(),c=l.Pt();c!==null&&(n=l.pn(e,c)),n=this.kc.Ca(n,o,s),this.wt.kn(o,n,s),this.sa(),i||this.gc.m(this.wt.kt(),{x:A,y:e},t)}Jc(A,e,t){const s=t.vn(),i=s.Pt(),n=s.Ot(A,H(i)),o=this.wl.ya(e,!0),a=this.wl.Et(H(o));this.Gc(a,n,null,t,!0)}Qc(A){this.Nc().Cn(),this.sa(),A||this.gc.m(null,null,null)}ql(){const A=this.wt.Ut();if(A!==null){const e=this.wt.xn(),t=this.wt.Sn();this.Gc(e,t,null,A)}this.wt.On()}td(A,e,t){const s=this.wl.mn(0),i=this.wl.Bn();e!==void 0&&t!==void 0&&this.wl.gt(e,t);const n=this.wl.mn(0),o=this.wl.Ou(),a=this.wl.Xs();if(a!==null&&s!==null&&n!==null){const l=a.Kr(o),c=this.N_.key(s)>this.N_.key(n),u=A!==null&&A>o&&!c,d=this.wl.Bn(),g=l&&d!==i&&this.wl.W().shiftVisibleRangeOnNewBar;if(u&&!g){const B=A-o;this.wl.Jn(this.wl.zu()-B)}}this.wl.Fu(A)}Kl(A){A!==null&&A.B_()}cr(A){const e=this.vc.find((t=>t.No().includes(A)));return e===void 0?null:e}Bu(){this.yc.On(),this.vc.forEach((A=>A.B_())),this.ql()}S(){this.vc.forEach((A=>A.S())),this.vc.length=0,this.cn.localization.priceFormatter=void 0,this.cn.localization.percentageFormatter=void 0,this.cn.localization.timeFormatter=void 0}nd(){return this.Sc}mr(){return this.Sc.W()}f_(){return this.wc}sd(A,e,t){const s=this.vc[0],i=this.ed(e,A,s,t);return this.mc.push(i),this.mc.length===1?this.$l():this.Fh(),i}rd(A){const e=this.cr(A),t=this.mc.indexOf(A);At(t!==-1,"Series not found"),this.mc.splice(t,1),H(e).jo(A),A.S&&A.S()}Hl(A,e){const t=H(this.cr(A));t.jo(A);const s=this.zc(e);if(s===null){const i=A.Zi();t.Fo(A,e,i)}else{const i=s.Ut===t?A.Zi():void 0;s.Ut.Fo(A,e,i)}}Ju(){const A=YA.ss();A.$n(),this.Dc(A)}hd(A){const e=YA.ss();e.Yn(A),this.Dc(e)}Zn(){const A=YA.ss();A.Zn(),this.Dc(A)}Gn(A){const e=YA.ss();e.Gn(A),this.Dc(e)}Jn(A){const e=YA.ss();e.Jn(A),this.Dc(e)}Xn(A){const e=YA.ss();e.Xn(A),this.Dc(e)}Un(){const A=YA.ss();A.Un(),this.Dc(A)}ld(){return this.cn.rightPriceScale.visible?"right":"left"}ad(){return this.Rc}q(){return this.Tc}It(A){const e=this.Rc,t=this.Tc;if(e===t)return e;if(A=Math.max(0,Math.min(100,Math.round(100*A))),this.Mc===null||this.Mc.Ts!==t||this.Mc.Ps!==e)this.Mc={Ts:t,Ps:e,od:new Map};else{const i=this.Mc.od.get(A);if(i!==void 0)return i}const s=(function(i,n,o){const[a,l,c,u]=Kr(i),[d,g,B,f]=Kr(n),w=[me(a+o*(d-a)),me(l+o*(g-l)),me(c+o*(B-c)),zo(u+o*(f-u))];return`rgba(${w[0]}, ${w[1]}, ${w[2]}, ${w[3]})`})(t,e,A/100);return this.Mc.od.set(A,s),s}jc(A,e){const t=new YA(e);if(A!==null){const s=this.vc.indexOf(A);t.Nn(s,{Fn:e})}return t}Oc(A,e){return e===void 0&&(e=2),this.jc(this.cr(A),e)}Dc(A){this.xc&&this.xc(A),this.vc.forEach((e=>e.z_().Wh().gt()))}ed(A,e,t,s){const i=new ki(this,A,e,t,s),n=A.priceScaleId!==void 0?A.priceScaleId:this.ld();return t.Fo(i,n),Wr(n)||i.Nh(A),i}Pc(A){const e=this.cn.layout;return e.background.type==="gradient"?A===0?e.background.topColor:e.background.bottomColor:e.background.color}}function Vi(r){return!Le(r)&&!qt(r)}function Ta(r){return Le(r)}(function(r){r[r.Disabled=0]="Disabled",r[r.Continuous=1]="Continuous",r[r.OnDataUpdate=2]="OnDataUpdate"})(Sa||(Sa={})),(function(r){r[r.LastBar=0]="LastBar",r[r.LastVisible=1]="LastVisible"})(Ha||(Ha={})),(function(r){r.Solid="solid",r.VerticalGradient="gradient"})(La||(La={})),(function(r){r[r.Year=0]="Year",r[r.Month=1]="Month",r[r.DayOfMonth=2]="DayOfMonth",r[r.Time=3]="Time",r[r.TimeWithSeconds=4]="TimeWithSeconds"})(Ia||(Ia={}));const Ma=r=>r.getUTCFullYear();function pd(r,A,e){return A.replace(/yyyy/g,(t=>Je(Ma(t),4))(r)).replace(/yy/g,(t=>Je(Ma(t)%100,2))(r)).replace(/MMMM/g,((t,s)=>new Date(t.getUTCFullYear(),t.getUTCMonth(),1).toLocaleString(s,{month:"long"}))(r,e)).replace(/MMM/g,((t,s)=>new Date(t.getUTCFullYear(),t.getUTCMonth(),1).toLocaleString(s,{month:"short"}))(r,e)).replace(/MM/g,(t=>Je((s=>s.getUTCMonth()+1)(t),2))(r)).replace(/dd/g,(t=>Je((s=>s.getUTCDate())(t),2))(r))}class Da{constructor(A="yyyy-MM-dd",e="default"){this._d=A,this.ud=e}F_(A){return pd(A,this._d,this.ud)}}class wd{constructor(A){this.dd=A||"%h:%m:%s"}F_(A){return this.dd.replace("%h",Je(A.getUTCHours(),2)).replace("%m",Je(A.getUTCMinutes(),2)).replace("%s",Je(A.getUTCSeconds(),2))}}const md={fd:"yyyy-MM-dd",vd:"%h:%m:%s",pd:" ",md:"default"};class Cd{constructor(A={}){const e=Object.assign(Object.assign({},md),A);this.bd=new Da(e.fd,e.md),this.wd=new wd(e.vd),this.gd=e.pd}F_(A){return`${this.bd.F_(A)}${this.gd}${this.wd.F_(A)}`}}function jr(r){return 60*r*60*1e3}function Pi(r){return 60*r*1e3}const As=[{Md:(Oa=1,1e3*Oa),xd:10},{Md:Pi(1),xd:20},{Md:Pi(5),xd:21},{Md:Pi(30),xd:22},{Md:jr(1),xd:30},{Md:jr(3),xd:31},{Md:jr(6),xd:32},{Md:jr(12),xd:33}];var Oa;function ka(r,A){if(r.getUTCFullYear()!==A.getUTCFullYear())return 70;if(r.getUTCMonth()!==A.getUTCMonth())return 60;if(r.getUTCDate()!==A.getUTCDate())return 50;for(let e=As.length-1;e>=0;--e)if(Math.floor(A.getTime()/As[e].Md)!==Math.floor(r.getTime()/As[e].Md))return As[e].xd;return 0}function Gi(r){let A=r;if(qt(r)&&(A=Ri(r)),!Vi(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{Sd:Math.round(e.getTime()/1e3),kd:A}}function _a(r){if(!Ta(r))throw new Error("time must be of type isUTCTimestamp");return{Sd:r}}function Ri(r){const A=new Date(r);if(isNaN(A.getTime()))throw new Error(`Invalid date string=${r}, expected format=yyyy-mm-dd`);return{day:A.getUTCDate(),month:A.getUTCMonth()+1,year:A.getUTCFullYear()}}function Na(r){qt(r.time)&&(r.time=Ri(r.time))}class Ka{options(){return this.cn}setOptions(A){this.cn=A,this.updateFormatter(A.localization)}preprocessData(A){Array.isArray(A)?(function(e){e.forEach(Na)})(A):Na(A)}createConverterToInternalObj(A){return H((function(e){return e.length===0?null:Vi(e[0].time)||qt(e[0].time)?Gi:_a})(A))}key(A){return typeof A=="object"&&"Sd"in A?A.Sd:this.key(this.convertHorzItemToInternal(A))}cacheKey(A){const e=A;return e.kd===void 0?new Date(1e3*e.Sd).getTime():new Date(Date.UTC(e.kd.year,e.kd.month-1,e.kd.day)).getTime()}convertHorzItemToInternal(A){return Ta(e=A)?_a(e):Vi(e)?Gi(e):Gi(Ri(e));var e}updateFormatter(A){if(!this.cn)return;const e=A.dateFormat;this.cn.timeScale.timeVisible?this.yd=new Cd({fd:e,vd:this.cn.timeScale.secondsVisible?"%h:%m:%s":"%h:%m",pd:" ",md:A.locale}):this.yd=new Da(e,A.locale)}formatHorzItem(A){const e=A;return this.yd.F_(new Date(1e3*e.Sd))}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),s=this.cn.timeScale;if(s.tickMarkFormatter!==void 0){const i=s.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.kd===void 0?new Date(1e3*i.Sd):new Date(Date.UTC(i.kd.year,i.kd.month-1,i.kd.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(hd,A[0]).weight;return e>30&&e<50&&(e=30),e}fillWeightsForPoints(A,e){(function(t,s=0){if(t.length===0)return;let i=s===0?null:t[s-1].time.Sd,n=i!==null?new Date(1e3*i):null,o=0;for(let a=s;a<t.length;++a){const l=t[a],c=new Date(1e3*l.time.Sd);n!==null&&(l.timeWeight=ka(c,n)),o+=l.time.Sd-(i||l.time.Sd),i=l.time.Sd,n=c}if(s===0&&t.length>1){const a=Math.ceil(o/(t.length-1)),l=new Date(1e3*(t[0].time.Sd-a));t[0].timeWeight=ka(new Date(1e3*t[0].time.Sd),l)}})(A,e)}static Cd(A){return Ue({localization:{dateFormat:"dd MMM 'yy"}},A??{})}}const It=typeof window<"u";function Va(){return!!It&&window.navigator.userAgent.toLowerCase().indexOf("firefox")>-1}function Wi(){return!!It&&/iPhone|iPad|iPod/.test(window.navigator.platform)}function zi(r){return r+r%2}function Xi(r,A){return r.Td-A.Td}function Ji(r,A,e){const t=(r.Td-A.Td)/(r.ut-A.ut);return Math.sign(t)*Math.min(Math.abs(t),e)}class vd{constructor(A,e,t,s){this.Pd=null,this.Rd=null,this.Dd=null,this.Od=null,this.Ad=null,this.Vd=0,this.Bd=0,this.Id=A,this.zd=e,this.Ed=t,this.rs=s}Ld(A,e){if(this.Pd!==null){if(this.Pd.ut===e)return void(this.Pd.Td=A);if(Math.abs(this.Pd.Td-A)<this.rs)return}this.Od=this.Dd,this.Dd=this.Rd,this.Rd=this.Pd,this.Pd={ut:e,Td:A}}Dr(A,e){if(this.Pd===null||this.Rd===null||e-this.Pd.ut>50)return;let t=0;const s=Ji(this.Pd,this.Rd,this.zd),i=Xi(this.Pd,this.Rd),n=[s],o=[i];if(t+=i,this.Dd!==null){const l=Ji(this.Rd,this.Dd,this.zd);if(Math.sign(l)===Math.sign(s)){const c=Xi(this.Rd,this.Dd);if(n.push(l),o.push(c),t+=c,this.Od!==null){const u=Ji(this.Dd,this.Od,this.zd);if(Math.sign(u)===Math.sign(s)){const d=Xi(this.Dd,this.Od);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.Id||(this.Ad={Td:A,ut:e},this.Bd=a,this.Vd=(function(l,c){const u=Math.log(c);return Math.log(1*u/-l)/u})(Math.abs(a),this.Ed))}Yu(A){const e=H(this.Ad),t=A-e.ut;return e.Td+this.Bd*(Math.pow(this.Ed,t)-1)/Math.log(this.Ed)}qu(A){return this.Ad===null||this.Nd(A)===this.Vd}Nd(A){const e=A-H(this.Ad).ut;return Math.min(e,this.Vd)}}function gt(r,A){const e=H(r.ownerDocument).createElement("canvas");r.appendChild(e);const t=Tu(e,{options:{allowResizeObserver:!1},transform:(s,i)=>({width:Math.max(s.width,i.width),height:Math.max(s.height,i.height)})});return t.resizeCanvasElement(A),t}function Zi(r,A,e,t){r.G&&r.G(A,e,t)}function es(r,A,e,t){r.K(A,e,t)}function Yi(r,A,e,t){const s=r(e,t);for(const i of s){const n=i.xt();n!==null&&A(n)}}function bd(r){It&&window.chrome!==void 0&&r.addEventListener("mousedown",(A=>{if(A.button===1)return A.preventDefault(),!1}))}class qi{constructor(A,e,t){this.Fd=0,this.Wd=null,this.jd={et:Number.NEGATIVE_INFINITY,rt:Number.POSITIVE_INFINITY},this.Hd=0,this.$d=null,this.Ud={et:Number.NEGATIVE_INFINITY,rt:Number.POSITIVE_INFINITY},this.qd=null,this.Yd=!1,this.Xd=null,this.Kd=null,this.Zd=!1,this.Gd=!1,this.Jd=!1,this.Qd=null,this.tf=null,this.if=null,this.nf=null,this.sf=null,this.ef=null,this.rf=null,this.hf=0,this.lf=!1,this.af=!1,this._f=!1,this.uf=0,this.cf=null,this.df=!Wi(),this.ff=s=>{this.vf(s)},this.pf=s=>{if(this.mf(s)){const i=this.bf(s);if(++this.Hd,this.$d&&this.Hd>1){const{wf:n}=this.gf(Ie(s),this.Ud);n<30&&!this.Jd&&this.Mf(i,this.Sf.xf),this.kf()}}else{const i=this.bf(s);if(++this.Fd,this.Wd&&this.Fd>1){const{wf:n}=this.gf(Ie(s),this.jd);n<5&&!this.Gd&&this.yf(i,this.Sf.Cf),this.Tf()}}},this.Pf=A,this.Sf=e,this.cn=t,this.Rf()}S(){this.Qd!==null&&(this.Qd(),this.Qd=null),this.tf!==null&&(this.tf(),this.tf=null),this.nf!==null&&(this.nf(),this.nf=null),this.sf!==null&&(this.sf(),this.sf=null),this.ef!==null&&(this.ef(),this.ef=null),this.if!==null&&(this.if(),this.if=null),this.Df(),this.Tf()}Of(A){this.nf&&this.nf();const e=this.Af.bind(this);if(this.nf=()=>{this.Pf.removeEventListener("mousemove",e)},this.Pf.addEventListener("mousemove",e),this.mf(A))return;const t=this.bf(A);this.yf(t,this.Sf.Vf),this.df=!0}Tf(){this.Wd!==null&&clearTimeout(this.Wd),this.Fd=0,this.Wd=null,this.jd={et:Number.NEGATIVE_INFINITY,rt:Number.POSITIVE_INFINITY}}kf(){this.$d!==null&&clearTimeout(this.$d),this.Hd=0,this.$d=null,this.Ud={et:Number.NEGATIVE_INFINITY,rt:Number.POSITIVE_INFINITY}}Af(A){if(this._f||this.Kd!==null||this.mf(A))return;const e=this.bf(A);this.yf(e,this.Sf.Bf),this.df=!0}If(A){const e=$i(A.changedTouches,H(this.cf));if(e===null||(this.uf=ts(A),this.rf!==null)||this.af)return;this.lf=!0;const t=this.gf(Ie(e),H(this.Kd)),{zf:s,Ef:i,wf:n}=t;if(this.Zd||!(n<5)){if(!this.Zd){const o=.5*s,a=i>=o&&!this.cn.Lf(),l=o>i&&!this.cn.Nf();a||l||(this.af=!0),this.Zd=!0,this.Jd=!0,this.Df(),this.kf()}if(!this.af){const o=this.bf(A,e);this.Mf(o,this.Sf.Ff),Tt(A)}}}Wf(A){if(A.button!==0)return;const e=this.gf(Ie(A),H(this.Xd)),{wf:t}=e;if(t>=5&&(this.Gd=!0,this.Tf()),this.Gd){const s=this.bf(A);this.yf(s,this.Sf.jf)}}gf(A,e){const t=Math.abs(e.et-A.et),s=Math.abs(e.rt-A.rt);return{zf:t,Ef:s,wf:t+s}}Hf(A){let e=$i(A.changedTouches,H(this.cf));if(e===null&&A.touches.length===0&&(e=A.changedTouches[0]),e===null)return;this.cf=null,this.uf=ts(A),this.Df(),this.Kd=null,this.ef&&(this.ef(),this.ef=null);const t=this.bf(A,e);if(this.Mf(t,this.Sf.$f),++this.Hd,this.$d&&this.Hd>1){const{wf:s}=this.gf(Ie(e),this.Ud);s<30&&!this.Jd&&this.Mf(t,this.Sf.xf),this.kf()}else this.Jd||(this.Mf(t,this.Sf.Uf),this.Sf.Uf&&Tt(A));this.Hd===0&&Tt(A),A.touches.length===0&&this.Yd&&(this.Yd=!1,Tt(A))}vf(A){if(A.button!==0)return;const e=this.bf(A);if(this.Xd=null,this._f=!1,this.sf&&(this.sf(),this.sf=null),Va()&&this.Pf.ownerDocument.documentElement.removeEventListener("mouseleave",this.ff),!this.mf(A))if(this.yf(e,this.Sf.qf),++this.Fd,this.Wd&&this.Fd>1){const{wf:t}=this.gf(Ie(A),this.jd);t<5&&!this.Gd&&this.yf(e,this.Sf.Cf),this.Tf()}else this.Gd||this.yf(e,this.Sf.Yf)}Df(){this.qd!==null&&(clearTimeout(this.qd),this.qd=null)}Xf(A){if(this.cf!==null)return;const e=A.changedTouches[0];this.cf=e.identifier,this.uf=ts(A);const t=this.Pf.ownerDocument.documentElement;this.Jd=!1,this.Zd=!1,this.af=!1,this.Kd=Ie(e),this.ef&&(this.ef(),this.ef=null);{const i=this.If.bind(this),n=this.Hf.bind(this);this.ef=()=>{t.removeEventListener("touchmove",i),t.removeEventListener("touchend",n)},t.addEventListener("touchmove",i,{passive:!1}),t.addEventListener("touchend",n,{passive:!1}),this.Df(),this.qd=setTimeout(this.Kf.bind(this,A),240)}const s=this.bf(A,e);this.Mf(s,this.Sf.Zf),this.$d||(this.Hd=0,this.$d=setTimeout(this.kf.bind(this),500),this.Ud=Ie(e))}Gf(A){if(A.button!==0)return;const e=this.Pf.ownerDocument.documentElement;Va()&&e.addEventListener("mouseleave",this.ff),this.Gd=!1,this.Xd=Ie(A),this.sf&&(this.sf(),this.sf=null);{const s=this.Wf.bind(this),i=this.vf.bind(this);this.sf=()=>{e.removeEventListener("mousemove",s),e.removeEventListener("mouseup",i)},e.addEventListener("mousemove",s),e.addEventListener("mouseup",i)}if(this._f=!0,this.mf(A))return;const t=this.bf(A);this.yf(t,this.Sf.Jf),this.Wd||(this.Fd=0,this.Wd=setTimeout(this.Tf.bind(this),500),this.jd=Ie(A))}Rf(){this.Pf.addEventListener("mouseenter",this.Of.bind(this)),this.Pf.addEventListener("touchcancel",this.Df.bind(this));{const A=this.Pf.ownerDocument,e=t=>{this.Sf.Qf&&(t.composed&&this.Pf.contains(t.composedPath()[0])||t.target&&this.Pf.contains(t.target)||this.Sf.Qf())};this.tf=()=>{A.removeEventListener("touchstart",e)},this.Qd=()=>{A.removeEventListener("mousedown",e)},A.addEventListener("mousedown",e),A.addEventListener("touchstart",e,{passive:!0})}Wi()&&(this.if=()=>{this.Pf.removeEventListener("dblclick",this.pf)},this.Pf.addEventListener("dblclick",this.pf)),this.Pf.addEventListener("mouseleave",this.tv.bind(this)),this.Pf.addEventListener("touchstart",this.Xf.bind(this),{passive:!0}),bd(this.Pf),this.Pf.addEventListener("mousedown",this.Gf.bind(this)),this.iv(),this.Pf.addEventListener("touchmove",(()=>{}),{passive:!1})}iv(){this.Sf.nv===void 0&&this.Sf.sv===void 0&&this.Sf.ev===void 0||(this.Pf.addEventListener("touchstart",(A=>this.rv(A.touches)),{passive:!0}),this.Pf.addEventListener("touchmove",(A=>{if(A.touches.length===2&&this.rf!==null&&this.Sf.sv!==void 0){const e=Pa(A.touches[0],A.touches[1])/this.hf;this.Sf.sv(this.rf,e),Tt(A)}}),{passive:!1}),this.Pf.addEventListener("touchend",(A=>{this.rv(A.touches)})))}rv(A){A.length===1&&(this.lf=!1),A.length!==2||this.lf||this.Yd?this.hv():this.lv(A)}lv(A){const e=this.Pf.getBoundingClientRect()||{left:0,top:0};this.rf={et:(A[0].clientX-e.left+(A[1].clientX-e.left))/2,rt:(A[0].clientY-e.top+(A[1].clientY-e.top))/2},this.hf=Pa(A[0],A[1]),this.Sf.nv!==void 0&&this.Sf.nv(),this.Df()}hv(){this.rf!==null&&(this.rf=null,this.Sf.ev!==void 0&&this.Sf.ev())}tv(A){if(this.nf&&this.nf(),this.mf(A)||!this.df)return;const e=this.bf(A);this.yf(e,this.Sf.av),this.df=!Wi()}Kf(A){const e=$i(A.touches,H(this.cf));if(e===null)return;const t=this.bf(A,e);this.Mf(t,this.Sf.ov),this.Jd=!0,this.Yd=!0}mf(A){return A.sourceCapabilities&&A.sourceCapabilities.firesTouchEvents!==void 0?A.sourceCapabilities.firesTouchEvents:ts(A)<this.uf+500}Mf(A,e){e&&e.call(this.Sf,A)}yf(A,e){e&&e.call(this.Sf,A)}bf(A,e){const t=e||A,s=this.Pf.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-s.left,localY:t.clientY-s.top,ctrlKey:A.ctrlKey,altKey:A.altKey,shiftKey:A.shiftKey,metaKey:A.metaKey,_v:!A.type.startsWith("mouse")&&A.type!=="contextmenu"&&A.type!=="click",uv:A.type,cv:t.target,dv:A.view,fv:()=>{A.type!=="touchstart"&&Tt(A)}}}}function Pa(r,A){const e=r.clientX-A.clientX,t=r.clientY-A.clientY;return Math.sqrt(e*e+t*t)}function Tt(r){r.cancelable&&r.preventDefault()}function Ie(r){return{et:r.pageX,rt:r.pageY}}function ts(r){return r.timeStamp||performance.now()}function $i(r,A){for(let e=0;e<r.length;++e)if(r[e].identifier===A)return r[e];return null}function rs(r){return{Bc:r.Bc,vv:{wr:r.pv.externalId},mv:r.pv.cursorStyle}}function Qd(r,A,e){for(const t of r){const s=t.xt();if(s!==null&&s.br){const i=s.br(A,e);if(i!==null)return{dv:t,vv:i}}}return null}function ji(r,A){return e=>{var t,s,i,n;return((s=(t=e.At())===null||t===void 0?void 0:t.xa())!==null&&s!==void 0?s:"")!==A?[]:(n=(i=e.la)===null||i===void 0?void 0:i.call(e,r))!==null&&n!==void 0?n:[]}}class Ga{constructor(A,e,t,s){this.Li=null,this.bv=null,this.wv=!1,this.gv=new Ar(200),this.Gr=null,this.Mv=0,this.xv=!1,this.Sv=()=>{this.xv||this.nn.kv().qt().Fh()},this.yv=()=>{this.xv||this.nn.kv().qt().Fh()},this.nn=A,this.cn=e,this.mo=e.layout,this.Sc=t,this.Cv=s==="left",this.Tv=ji("normal",s),this.Pv=ji("top",s),this.Rv=ji("bottom",s),this.Dv=document.createElement("div"),this.Dv.style.height="100%",this.Dv.style.overflow="hidden",this.Dv.style.width="25px",this.Dv.style.left="0",this.Dv.style.position="relative",this.Ov=gt(this.Dv,IA({width:16,height:16})),this.Ov.subscribeSuggestedBitmapSizeChanged(this.Sv);const i=this.Ov.canvasElement;i.style.position="absolute",i.style.zIndex="1",i.style.left="0",i.style.top="0",this.Av=gt(this.Dv,IA({width:16,height:16})),this.Av.subscribeSuggestedBitmapSizeChanged(this.yv);const n=this.Av.canvasElement;n.style.position="absolute",n.style.zIndex="2",n.style.left="0",n.style.top="0";const o={Jf:this.Vv.bind(this),Zf:this.Vv.bind(this),jf:this.Bv.bind(this),Ff:this.Bv.bind(this),Qf:this.Iv.bind(this),qf:this.zv.bind(this),$f:this.zv.bind(this),Cf:this.Ev.bind(this),xf:this.Ev.bind(this),Vf:this.Lv.bind(this),av:this.Nv.bind(this)};this.Fv=new qi(this.Av.canvasElement,o,{Lf:()=>!1,Nf:()=>!0})}S(){this.Fv.S(),this.Av.unsubscribeSuggestedBitmapSizeChanged(this.yv),this.Av.dispose(),this.Ov.unsubscribeSuggestedBitmapSizeChanged(this.Sv),this.Ov.dispose(),this.Li!==null&&this.Li.$o().p(this),this.Li=null}Wv(){return this.Dv}P(){return this.mo.fontSize}jv(){const A=this.Sc.W();return this.Gr!==A.R&&(this.gv.ir(),this.Gr=A.R),A}Hv(){if(this.Li===null)return 0;let A=0;const e=this.jv(),t=H(this.Ov.canvasElement.getContext("2d"));t.save();const s=this.Li.Ea();t.font=this.$v(),s.length>0&&(A=Math.max(this.gv.Si(t,s[0].Za),this.gv.Si(t,s[s.length-1].Za)));const i=this.Uv();for(let a=i.length;a--;){const l=this.gv.Si(t,i[a].Jt());l>A&&(A=l)}const n=this.Li.Pt();if(n!==null&&this.bv!==null){const a=this.Li.pn(1,n),l=this.Li.pn(this.bv.height-2,n);A=Math.max(A,this.gv.Si(t,this.Li.Wi(Math.floor(Math.min(a,l))+.11111111111111,n)),this.gv.Si(t,this.Li.Wi(Math.ceil(Math.max(a,l))-.11111111111111,n)))}t.restore();const o=A||34;return zi(Math.ceil(e.C+e.T+e.B+e.I+5+o))}qv(A){this.bv!==null&&ft(this.bv,A)||(this.bv=A,this.xv=!0,this.Ov.resizeCanvasElement(A),this.Av.resizeCanvasElement(A),this.xv=!1,this.Dv.style.width=`${A.width}px`,this.Dv.style.height=`${A.height}px`)}Yv(){return H(this.bv).width}Ji(A){this.Li!==A&&(this.Li!==null&&this.Li.$o().p(this),this.Li=A,A.$o().l(this.ao.bind(this),this))}At(){return this.Li}ir(){const A=this.nn.Xv();this.nn.kv().qt().A_(A,H(this.At()))}Kv(A){if(this.bv===null)return;if(A!==1){this.Zv(),this.Ov.applySuggestedBitmapSize();const t=dt(this.Ov);t!==null&&(t.useBitmapCoordinateSpace((s=>{this.Gv(s),this.Be(s)})),this.nn.Jv(t,this.Rv),this.Qv(t),this.nn.Jv(t,this.Tv),this.tp(t))}this.Av.applySuggestedBitmapSize();const e=dt(this.Av);e!==null&&(e.useBitmapCoordinateSpace((({context:t,bitmapSize:s})=>{t.clearRect(0,0,s.width,s.height)})),this.ip(e),this.nn.Jv(e,this.Pv))}np(){return this.Ov.bitmapSize}sp(A,e,t){const s=this.np();s.width>0&&s.height>0&&A.drawImage(this.Ov.canvasElement,e,t)}gt(){var A;(A=this.Li)===null||A===void 0||A.Ea()}Vv(A){if(this.Li===null||this.Li.Fi()||!this.cn.handleScale.axisPressedMouseMove.price)return;const e=this.nn.kv().qt(),t=this.nn.Xv();this.wv=!0,e.y_(t,this.Li,A.localY)}Bv(A){if(this.Li===null||!this.cn.handleScale.axisPressedMouseMove.price)return;const e=this.nn.kv().qt(),t=this.nn.Xv(),s=this.Li;e.C_(t,s,A.localY)}Iv(){if(this.Li===null||!this.cn.handleScale.axisPressedMouseMove.price)return;const A=this.nn.kv().qt(),e=this.nn.Xv(),t=this.Li;this.wv&&(this.wv=!1,A.T_(e,t))}zv(A){if(this.Li===null||!this.cn.handleScale.axisPressedMouseMove.price)return;const e=this.nn.kv().qt(),t=this.nn.Xv();this.wv=!1,e.T_(t,this.Li)}Ev(A){this.cn.handleScale.axisDoubleClickReset.price&&this.ir()}Lv(A){this.Li!==null&&(!this.nn.kv().qt().W().handleScale.axisPressedMouseMove.price||this.Li.ph()||this.Li.Co()||this.ep(1))}Nv(A){this.ep(0)}Uv(){const A=[],e=this.Li===null?void 0:this.Li;return(t=>{for(let s=0;s<t.length;++s){const i=t[s].Rn(this.nn.Xv(),e);for(let n=0;n<i.length;n++)A.push(i[n])}})(this.nn.Xv().No()),A}Gv({context:A,bitmapSize:e}){const{width:t,height:s}=e,i=this.nn.Xv().qt(),n=i.q(),o=i.ad();n===o?Gr(A,0,0,t,s,n):Zo(A,0,0,t,s,n,o)}Be({context:A,bitmapSize:e,horizontalPixelRatio:t}){if(this.bv===null||this.Li===null||!this.Li.W().borderVisible)return;A.fillStyle=this.Li.W().borderColor;const s=Math.max(1,Math.floor(this.jv().C*t));let i;i=this.Cv?e.width-s:0,A.fillRect(i,0,s,e.height)}Qv(A){if(this.bv===null||this.Li===null)return;const e=this.Li.Ea(),t=this.Li.W(),s=this.jv(),i=this.Cv?this.bv.width-s.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(s.T*o);n.beginPath();for(const d of e)n.rect(Math.floor(i*o),Math.round(d.Aa*a)-c,u,l);n.fill()})),A.useMediaCoordinateSpace((({context:n})=>{var o;n.font=this.$v(),n.fillStyle=(o=t.textColor)!==null&&o!==void 0?o:this.mo.textColor,n.textAlign=this.Cv?"right":"left",n.textBaseline="middle";const a=this.Cv?Math.round(i-s.B):Math.round(i+s.T+s.B),l=e.map((c=>this.gv.xi(n,c.Za)));for(let c=e.length;c--;){const u=e[c];n.fillText(u.Za,a,u.Aa+l[c])}}))}Zv(){if(this.bv===null||this.Li===null)return;let A=this.bv.height/2;const e=[],t=this.Li.No().slice(),s=this.nn.Xv(),i=this.jv();this.Li===s.vr()&&this.nn.Xv().No().forEach((a=>{s.dr(a)&&t.push(a)}));const n=this.Li.Ta()[0],o=this.Li;t.forEach((a=>{const l=a.Rn(s,o);l.forEach((c=>{c.Vi(null),c.Bi()&&e.push(c)})),n===a&&l.length>0&&(A=l[0].yi())})),e.forEach((a=>a.Vi(a.yi()))),this.Li.W().alignLabels&&this.rp(e,i,A)}rp(A,e,t){if(this.bv===null)return;const s=A.filter((n=>n.yi()<=t)),i=A.filter((n=>n.yi()>t));s.sort(((n,o)=>o.yi()-n.yi())),s.length&&i.length&&i.push(s[0]),i.sort(((n,o)=>n.yi()-o.yi()));for(const n of A){const o=Math.floor(n.zt(e)/2),a=n.yi();a>-o&&a<o&&n.Vi(o),a>this.bv.height-o&&a<this.bv.height+o&&n.Vi(this.bv.height-o)}for(let n=1;n<s.length;n++){const o=s[n],a=s[n-1],l=a.zt(e,!1),c=o.yi(),u=a.Ai();c>u-l&&o.Vi(u-l)}for(let n=1;n<i.length;n++){const o=i[n],a=i[n-1],l=a.zt(e,!0),c=o.yi(),u=a.Ai();c<u+l&&o.Vi(u+l)}}tp(A){if(this.bv===null)return;const e=this.Uv(),t=this.jv(),s=this.Cv?"right":"left";e.forEach((i=>{i.Ii()&&i.xt(H(this.Li)).K(A,t,this.gv,s)}))}ip(A){if(this.bv===null||this.Li===null)return;const e=this.nn.kv().qt(),t=[],s=this.nn.Xv(),i=e.Nc().Rn(s,this.Li);i.length&&t.push(i);const n=this.jv(),o=this.Cv?"right":"left";t.forEach((a=>{a.forEach((l=>{l.xt(H(this.Li)).K(A,n,this.gv,o)}))}))}ep(A){this.Dv.style.cursor=A===1?"ns-resize":"default"}ao(){const A=this.Hv();this.Mv<A&&this.nn.kv().qt().$l(),this.Mv=A}$v(){return St(this.mo.fontSize,this.mo.fontFamily)}}function Fd(r,A){var e,t;return(t=(e=r.ra)===null||e===void 0?void 0:e.call(r,A))!==null&&t!==void 0?t:[]}function ss(r,A){var e,t;return(t=(e=r.Pn)===null||e===void 0?void 0:e.call(r,A))!==null&&t!==void 0?t:[]}function yd(r,A){var e,t;return(t=(e=r.Qi)===null||e===void 0?void 0:e.call(r,A))!==null&&t!==void 0?t:[]}function Ud(r,A){var e,t;return(t=(e=r.na)===null||e===void 0?void 0:e.call(r,A))!==null&&t!==void 0?t:[]}class An{constructor(A,e){this.bv=IA({width:0,height:0}),this.hp=null,this.lp=null,this.ap=null,this.op=!1,this._p=new KA,this.up=new KA,this.cp=0,this.dp=!1,this.fp=null,this.vp=!1,this.pp=null,this.mp=null,this.xv=!1,this.Sv=()=>{this.xv||this.bp===null||this.Ui().Fh()},this.yv=()=>{this.xv||this.bp===null||this.Ui().Fh()},this.wp=A,this.bp=e,this.bp.I_().l(this.gp.bind(this),this,!0),this.Mp=document.createElement("td"),this.Mp.style.padding="0",this.Mp.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.xp=document.createElement("td"),this.xp.style.padding="0",this.Sp=document.createElement("td"),this.Sp.style.padding="0",this.Mp.appendChild(t),this.Ov=gt(t,IA({width:16,height:16})),this.Ov.subscribeSuggestedBitmapSizeChanged(this.Sv);const s=this.Ov.canvasElement;s.style.position="absolute",s.style.zIndex="1",s.style.left="0",s.style.top="0",this.Av=gt(t,IA({width:16,height:16})),this.Av.subscribeSuggestedBitmapSizeChanged(this.yv);const i=this.Av.canvasElement;i.style.position="absolute",i.style.zIndex="2",i.style.left="0",i.style.top="0",this.kp=document.createElement("tr"),this.kp.appendChild(this.xp),this.kp.appendChild(this.Mp),this.kp.appendChild(this.Sp),this.yp(),this.Fv=new qi(this.Av.canvasElement,this,{Lf:()=>this.fp===null&&!this.wp.W().handleScroll.vertTouchDrag,Nf:()=>this.fp===null&&!this.wp.W().handleScroll.horzTouchDrag})}S(){this.hp!==null&&this.hp.S(),this.lp!==null&&this.lp.S(),this.Av.unsubscribeSuggestedBitmapSizeChanged(this.yv),this.Av.dispose(),this.Ov.unsubscribeSuggestedBitmapSizeChanged(this.Sv),this.Ov.dispose(),this.bp!==null&&this.bp.I_().p(this),this.Fv.S()}Xv(){return H(this.bp)}Cp(A){this.bp!==null&&this.bp.I_().p(this),this.bp=A,this.bp!==null&&this.bp.I_().l(An.prototype.gp.bind(this),this,!0),this.yp()}kv(){return this.wp}Wv(){return this.kp}yp(){if(this.bp!==null&&(this.Tp(),this.Ui().Mt().length!==0)){if(this.hp!==null){const A=this.bp.S_();this.hp.Ji(H(A))}if(this.lp!==null){const A=this.bp.k_();this.lp.Ji(H(A))}}}Pp(){this.hp!==null&&this.hp.gt(),this.lp!==null&&this.lp.gt()}v_(){return this.bp!==null?this.bp.v_():0}p_(A){this.bp&&this.bp.p_(A)}Vf(A){if(!this.bp)return;this.Rp();const e=A.localX,t=A.localY;this.Dp(e,t,A)}Jf(A){this.Rp(),this.Op(),this.Dp(A.localX,A.localY,A)}Bf(A){var e;if(!this.bp)return;this.Rp();const t=A.localX,s=A.localY;this.Dp(t,s,A);const i=this.br(t,s);this.wp.Ap((e=i?.mv)!==null&&e!==void 0?e:null),this.Ui().Vc(i&&{Bc:i.Bc,vv:i.vv})}Yf(A){this.bp!==null&&(this.Rp(),this.Vp(A))}Cf(A){this.bp!==null&&this.Bp(this.up,A)}xf(A){this.Cf(A)}jf(A){this.Rp(),this.Ip(A),this.Dp(A.localX,A.localY,A)}qf(A){this.bp!==null&&(this.Rp(),this.dp=!1,this.zp(A))}Uf(A){this.bp!==null&&this.Vp(A)}ov(A){if(this.dp=!0,this.fp===null){const e={x:A.localX,y:A.localY};this.Ep(e,e,A)}}av(A){this.bp!==null&&(this.Rp(),this.bp.qt().Vc(null),this.Lp())}Np(){return this._p}Fp(){return this.up}nv(){this.cp=1,this.Ui().Un()}sv(A,e){if(!this.wp.W().handleScale.pinch)return;const t=5*(e-this.cp);this.cp=e,this.Ui().$c(A.et,t)}Zf(A){this.dp=!1,this.vp=this.fp!==null,this.Op();const e=this.Ui().Nc();this.fp!==null&&e.Tt()&&(this.pp={x:e.Kt(),y:e.Zt()},this.fp={x:A.localX,y:A.localY})}Ff(A){if(this.bp===null)return;const e=A.localX,t=A.localY;if(this.fp===null)this.Ip(A);else{this.vp=!1;const s=H(this.pp),i=s.x+(e-this.fp.x),n=s.y+(t-this.fp.y);this.Dp(i,n,A)}}$f(A){this.kv().W().trackingMode.exitMode===0&&(this.vp=!0),this.Wp(),this.zp(A)}br(A,e){const t=this.bp;return t===null?null:(function(s,i,n){const o=s.No(),a=(function(l,c,u){var d,g;let B,f;for(const p of l){const v=(g=(d=p.oa)===null||d===void 0?void 0:d.call(p,c,u))!==null&&g!==void 0?g:[];for(const y of v)w=y.zOrder,(!(m=B?.zOrder)||w==="top"&&m!=="top"||w==="normal"&&m==="bottom")&&(B=y,f=p)}var w,m;return B&&f?{pv:B,Bc:f}:null})(o,i,n);if(a?.pv.zOrder==="top")return rs(a);for(const l of o){if(a&&a.Bc===l&&a.pv.zOrder!=="bottom"&&!a.pv.isBackground)return rs(a);const c=Qd(l.Pn(s),i,n);if(c!==null)return{Bc:l,dv:c.dv,vv:c.vv};if(a&&a.Bc===l&&a.pv.zOrder!=="bottom"&&a.pv.isBackground)return rs(a)}return a?.pv?rs(a):null})(t,A,e)}jp(A,e){H(e==="left"?this.hp:this.lp).qv(IA({width:A,height:this.bv.height}))}Hp(){return this.bv}qv(A){ft(this.bv,A)||(this.bv=A,this.xv=!0,this.Ov.resizeCanvasElement(A),this.Av.resizeCanvasElement(A),this.xv=!1,this.Mp.style.width=A.width+"px",this.Mp.style.height=A.height+"px")}$p(){const A=H(this.bp);A.x_(A.S_()),A.x_(A.k_());for(const e of A.Ta())if(A.dr(e)){const t=e.At();t!==null&&A.x_(t),e.On()}}np(){return this.Ov.bitmapSize}sp(A,e,t){const s=this.np();s.width>0&&s.height>0&&A.drawImage(this.Ov.canvasElement,e,t)}Kv(A){if(A===0||this.bp===null)return;if(A>1&&this.$p(),this.hp!==null&&this.hp.Kv(A),this.lp!==null&&this.lp.Kv(A),A!==1){this.Ov.applySuggestedBitmapSize();const t=dt(this.Ov);t!==null&&(t.useBitmapCoordinateSpace((s=>{this.Gv(s)})),this.bp&&(this.Up(t,Fd),this.qp(t),this.Yp(t),this.Up(t,ss),this.Up(t,yd)))}this.Av.applySuggestedBitmapSize();const e=dt(this.Av);e!==null&&(e.useBitmapCoordinateSpace((({context:t,bitmapSize:s})=>{t.clearRect(0,0,s.width,s.height)})),this.Xp(e),this.Up(e,Ud))}Kp(){return this.hp}Zp(){return this.lp}Jv(A,e){this.Up(A,e)}gp(){this.bp!==null&&this.bp.I_().p(this),this.bp=null}Vp(A){this.Bp(this._p,A)}Bp(A,e){const t=e.localX,s=e.localY;A.M()&&A.m(this.Ui().yt().Au(t),{x:t,y:s},e)}Gv({context:A,bitmapSize:e}){const{width:t,height:s}=e,i=this.Ui(),n=i.q(),o=i.ad();n===o?Gr(A,0,0,t,s,o):Zo(A,0,0,t,s,n,o)}qp(A){const e=H(this.bp).z_().Wh().xt();e!==null&&e.K(A,!1)}Yp(A){const e=this.Ui().Lc();this.Gp(A,ss,Zi,e),this.Gp(A,ss,es,e)}Xp(A){this.Gp(A,ss,es,this.Ui().Nc())}Up(A,e){const t=H(this.bp).No();for(const s of t)this.Gp(A,e,Zi,s);for(const s of t)this.Gp(A,e,es,s)}Gp(A,e,t,s){const i=H(this.bp),n=i.qt().Ac(),o=n!==null&&n.Bc===s,a=n!==null&&o&&n.vv!==void 0?n.vv.gr:void 0;Yi(e,(l=>t(l,A,o,a)),s,i)}Tp(){if(this.bp===null)return;const A=this.wp,e=this.bp.S_().W().visible,t=this.bp.k_().W().visible;e||this.hp===null||(this.xp.removeChild(this.hp.Wv()),this.hp.S(),this.hp=null),t||this.lp===null||(this.Sp.removeChild(this.lp.Wv()),this.lp.S(),this.lp=null);const s=A.qt().nd();e&&this.hp===null&&(this.hp=new Ga(this,A.W(),s,"left"),this.xp.appendChild(this.hp.Wv())),t&&this.lp===null&&(this.lp=new Ga(this,A.W(),s,"right"),this.Sp.appendChild(this.lp.Wv()))}Jp(A){return A._v&&this.dp||this.fp!==null}Qp(A){return Math.max(0,Math.min(A,this.bv.width-1))}tm(A){return Math.max(0,Math.min(A,this.bv.height-1))}Dp(A,e,t){this.Ui().Gc(this.Qp(A),this.tm(e),t,H(this.bp))}Lp(){this.Ui().Qc()}Wp(){this.vp&&(this.fp=null,this.Lp())}Ep(A,e,t){this.fp=A,this.vp=!1,this.Dp(e.x,e.y,t);const s=this.Ui().Nc();this.pp={x:s.Kt(),y:s.Zt()}}Ui(){return this.wp.qt()}zp(A){if(!this.op)return;const e=this.Ui(),t=this.Xv();if(e.D_(t,t.vn()),this.ap=null,this.op=!1,e.Xc(),this.mp!==null){const s=performance.now(),i=e.yt();this.mp.Dr(i.zu(),s),this.mp.qu(s)||e.Xn(this.mp)}}Rp(){this.fp=null}Op(){if(this.bp){if(this.Ui().Un(),document.activeElement!==document.body&&document.activeElement!==document.documentElement)H(document.activeElement).blur();else{const A=document.getSelection();A!==null&&A.removeAllRanges()}!this.bp.vn().Fi()&&this.Ui().yt().Fi()}}Ip(A){if(this.bp===null)return;const e=this.Ui(),t=e.yt();if(t.Fi())return;const s=this.wp.W(),i=s.handleScroll,n=s.kineticScroll;if((!i.pressedMouseMove||A._v)&&(!i.horzTouchDrag&&!i.vertTouchDrag||!A._v))return;const o=this.bp.vn(),a=performance.now();if(this.ap!==null||this.Jp(A)||(this.ap={x:A.clientX,y:A.clientY,Sd:a,im:A.localX,nm:A.localY}),this.ap!==null&&!this.op&&(this.ap.x!==A.clientX||this.ap.y!==A.clientY)){if(A._v&&n.touch||!A._v&&n.mouse){const l=t.he();this.mp=new vd(.2/l,7/l,.997,15/l),this.mp.Ld(t.zu(),this.ap.Sd)}else this.mp=null;o.Fi()||e.P_(this.bp,o,A.localY),e.qc(A.localX),this.op=!0}this.op&&(o.Fi()||e.R_(this.bp,o,A.localY),e.Yc(A.localX),this.mp!==null&&this.mp.Ld(t.zu(),a))}}class Ra{constructor(A,e,t,s,i){this.bt=!0,this.bv=IA({width:0,height:0}),this.Sv=()=>this.Kv(3),this.Cv=A==="left",this.Sc=t.nd,this.cn=e,this.sm=s,this.rm=i,this.Dv=document.createElement("div"),this.Dv.style.width="25px",this.Dv.style.height="100%",this.Dv.style.overflow="hidden",this.Ov=gt(this.Dv,IA({width:16,height:16})),this.Ov.subscribeSuggestedBitmapSizeChanged(this.Sv)}S(){this.Ov.unsubscribeSuggestedBitmapSizeChanged(this.Sv),this.Ov.dispose()}Wv(){return this.Dv}Hp(){return this.bv}qv(A){ft(this.bv,A)||(this.bv=A,this.Ov.resizeCanvasElement(A),this.Dv.style.width=`${A.width}px`,this.Dv.style.height=`${A.height}px`,this.bt=!0)}Kv(A){if(A<3&&!this.bt||this.bv.width===0||this.bv.height===0)return;this.bt=!1,this.Ov.applySuggestedBitmapSize();const e=dt(this.Ov);e!==null&&e.useBitmapCoordinateSpace((t=>{this.Gv(t),this.Be(t)}))}np(){return this.Ov.bitmapSize}sp(A,e,t){const s=this.np();s.width>0&&s.height>0&&A.drawImage(this.Ov.canvasElement,e,t)}Be({context:A,bitmapSize:e,horizontalPixelRatio:t,verticalPixelRatio:s}){if(!this.sm())return;A.fillStyle=this.cn.timeScale.borderColor;const i=Math.floor(this.Sc.W().C*t),n=Math.floor(this.Sc.W().C*s),o=this.Cv?e.width-i:0;A.fillRect(o,0,i,n)}Gv({context:A,bitmapSize:e}){Gr(A,0,0,e.width,e.height,this.rm())}}function en(r){return A=>{var e,t;return(t=(e=A.aa)===null||e===void 0?void 0:e.call(A,r))!==null&&t!==void 0?t:[]}}const Ed=en("normal"),xd=en("top"),Sd=en("bottom");class Hd{constructor(A,e){this.hm=null,this.lm=null,this.k=null,this.am=!1,this.bv=IA({width:0,height:0}),this.om=new KA,this.gv=new Ar(5),this.xv=!1,this.Sv=()=>{this.xv||this.wp.qt().Fh()},this.yv=()=>{this.xv||this.wp.qt().Fh()},this.wp=A,this.N_=e,this.cn=A.W().layout,this._m=document.createElement("tr"),this.um=document.createElement("td"),this.um.style.padding="0",this.dm=document.createElement("td"),this.dm.style.padding="0",this.Dv=document.createElement("td"),this.Dv.style.height="25px",this.Dv.style.padding="0",this.fm=document.createElement("div"),this.fm.style.width="100%",this.fm.style.height="100%",this.fm.style.position="relative",this.fm.style.overflow="hidden",this.Dv.appendChild(this.fm),this.Ov=gt(this.fm,IA({width:16,height:16})),this.Ov.subscribeSuggestedBitmapSizeChanged(this.Sv);const t=this.Ov.canvasElement;t.style.position="absolute",t.style.zIndex="1",t.style.left="0",t.style.top="0",this.Av=gt(this.fm,IA({width:16,height:16})),this.Av.subscribeSuggestedBitmapSizeChanged(this.yv);const s=this.Av.canvasElement;s.style.position="absolute",s.style.zIndex="2",s.style.left="0",s.style.top="0",this._m.appendChild(this.um),this._m.appendChild(this.Dv),this._m.appendChild(this.dm),this.vm(),this.wp.qt().f_().l(this.vm.bind(this),this),this.Fv=new qi(this.Av.canvasElement,this,{Lf:()=>!0,Nf:()=>!1})}S(){this.Fv.S(),this.hm!==null&&this.hm.S(),this.lm!==null&&this.lm.S(),this.Av.unsubscribeSuggestedBitmapSizeChanged(this.yv),this.Av.dispose(),this.Ov.unsubscribeSuggestedBitmapSizeChanged(this.Sv),this.Ov.dispose()}Wv(){return this._m}pm(){return this.hm}bm(){return this.lm}Jf(A){if(this.am)return;this.am=!0;const e=this.wp.qt();!e.yt().Fi()&&this.wp.W().handleScale.axisPressedMouseMove.time&&e.Hc(A.localX)}Zf(A){this.Jf(A)}Qf(){const A=this.wp.qt();!A.yt().Fi()&&this.am&&(this.am=!1,this.wp.W().handleScale.axisPressedMouseMove.time&&A.Zc())}jf(A){const e=this.wp.qt();!e.yt().Fi()&&this.wp.W().handleScale.axisPressedMouseMove.time&&e.Kc(A.localX)}Ff(A){this.jf(A)}qf(){this.am=!1;const A=this.wp.qt();A.yt().Fi()&&!this.wp.W().handleScale.axisPressedMouseMove.time||A.Zc()}$f(){this.qf()}Cf(){this.wp.W().handleScale.axisDoubleClickReset.time&&this.wp.qt().Zn()}xf(){this.Cf()}Vf(){this.wp.qt().W().handleScale.axisPressedMouseMove.time&&this.ep(1)}av(){this.ep(0)}Hp(){return this.bv}wm(){return this.om}gm(A,e,t){ft(this.bv,A)||(this.bv=A,this.xv=!0,this.Ov.resizeCanvasElement(A),this.Av.resizeCanvasElement(A),this.xv=!1,this.Dv.style.width=`${A.width}px`,this.Dv.style.height=`${A.height}px`,this.om.m(A)),this.hm!==null&&this.hm.qv(IA({width:e,height:A.height})),this.lm!==null&&this.lm.qv(IA({width:t,height:A.height}))}Mm(){const A=this.xm();return Math.ceil(A.C+A.T+A.P+A.L+A.V+A.Sm)}gt(){this.wp.qt().yt().Ea()}np(){return this.Ov.bitmapSize}sp(A,e,t){const s=this.np();s.width>0&&s.height>0&&A.drawImage(this.Ov.canvasElement,e,t)}Kv(A){if(A===0)return;if(A!==1){this.Ov.applySuggestedBitmapSize();const t=dt(this.Ov);t!==null&&(t.useBitmapCoordinateSpace((s=>{this.Gv(s),this.Be(s),this.km(t,Sd)})),this.Qv(t),this.km(t,Ed)),this.hm!==null&&this.hm.Kv(A),this.lm!==null&&this.lm.Kv(A)}this.Av.applySuggestedBitmapSize();const e=dt(this.Av);e!==null&&(e.useBitmapCoordinateSpace((({context:t,bitmapSize:s})=>{t.clearRect(0,0,s.width,s.height)})),this.ym([...this.wp.qt().Mt(),this.wp.qt().Nc()],e),this.km(e,xd))}km(A,e){const t=this.wp.qt().Mt();for(const s of t)Yi(e,(i=>Zi(i,A,!1,void 0)),s,void 0);for(const s of t)Yi(e,(i=>es(i,A,!1,void 0)),s,void 0)}Gv({context:A,bitmapSize:e}){Gr(A,0,0,e.width,e.height,this.wp.qt().ad())}Be({context:A,bitmapSize:e,verticalPixelRatio:t}){if(this.wp.W().timeScale.borderVisible){A.fillStyle=this.Cm();const s=Math.max(1,Math.floor(this.xm().C*t));A.fillRect(0,0,e.width,s)}}Qv(A){const e=this.wp.qt().yt(),t=e.Ea();if(!t||t.length===0)return;const s=this.N_.maxTickMarkWeight(t),i=this.xm(),n=e.W();n.borderVisible&&n.ticksVisible&&A.useBitmapCoordinateSpace((({context:o,horizontalPixelRatio:a,verticalPixelRatio:l})=>{o.strokeStyle=this.Cm(),o.fillStyle=this.Cm();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.$v();for(const l of t)if(l.weight<s){const c=l.needAlignCoordinate?this.Tm(o,l.coord,l.label):l.coord;o.fillText(l.label,c,a)}o.font=this.Pm();for(const l of t)if(l.weight>=s){const c=l.needAlignCoordinate?this.Tm(o,l.coord,l.label):l.coord;o.fillText(l.label,c,a)}}))}Tm(A,e,t){const s=this.gv.Si(A,t),i=s/2,n=Math.floor(e-i)+.5;return n<0?e+=Math.abs(0-n):n+s>this.bv.width&&(e-=Math.abs(this.bv.width-(n+s))),e}ym(A,e){const t=this.xm();for(const s of A)for(const i of s.tn())i.xt().K(e,t)}Cm(){return this.wp.W().timeScale.borderColor}$(){return this.cn.textColor}j(){return this.cn.fontSize}$v(){return St(this.j(),this.cn.fontFamily)}Pm(){return St(this.j(),this.cn.fontFamily,"bold")}xm(){this.k===null&&(this.k={C:1,N:NaN,L:NaN,V:NaN,Hi:NaN,T:5,P:NaN,R:"",ji:new Ar,Sm:0});const A=this.k,e=this.$v();if(A.R!==e){const t=this.j();A.P=t,A.R=e,A.L=3*t/12,A.V=3*t/12,A.Hi=9*t/12,A.N=0,A.Sm=4*t/12,A.ji.ir()}return this.k}ep(A){this.Dv.style.cursor=A===1?"ew-resize":"default"}vm(){const A=this.wp.qt(),e=A.W();e.leftPriceScale.visible||this.hm===null||(this.um.removeChild(this.hm.Wv()),this.hm.S(),this.hm=null),e.rightPriceScale.visible||this.lm===null||(this.dm.removeChild(this.lm.Wv()),this.lm.S(),this.lm=null);const t={nd:this.wp.qt().nd()},s=()=>e.leftPriceScale.borderVisible&&A.yt().W().borderVisible,i=()=>A.ad();e.leftPriceScale.visible&&this.hm===null&&(this.hm=new Ra("left",e,t,s,i),this.um.appendChild(this.hm.Wv())),e.rightPriceScale.visible&&this.lm===null&&(this.lm=new Ra("right",e,t,s,i),this.dm.appendChild(this.lm.Wv()))}}const Ld=!!It&&!!navigator.userAgentData&&navigator.userAgentData.brands.some((r=>r.brand.includes("Chromium")))&&!!It&&(!((tn=navigator?.userAgentData)===null||tn===void 0)&&tn.platform?navigator.userAgentData.platform==="Windows":navigator.userAgent.toLowerCase().indexOf("win")>=0);var tn;class Id{constructor(A,e,t){var s;this.Rm=[],this.Dm=0,this.Qa=0,this.e_=0,this.Om=0,this.Am=0,this.Vm=null,this.Bm=!1,this._p=new KA,this.up=new KA,this.gc=new KA,this.Im=null,this.zm=null,this.Em=A,this.cn=e,this.N_=t,this._m=document.createElement("div"),this._m.classList.add("tv-lightweight-charts"),this._m.style.overflow="hidden",this._m.style.direction="ltr",this._m.style.width="100%",this._m.style.height="100%",(s=this._m).style.userSelect="none",s.style.webkitUserSelect="none",s.style.msUserSelect="none",s.style.MozUserSelect="none",s.style.webkitTapHighlightColor="transparent",this.Lm=document.createElement("table"),this.Lm.setAttribute("cellspacing","0"),this._m.appendChild(this.Lm),this.Nm=this.Fm.bind(this),rn(this.cn)&&this.Wm(!0),this.Ui=new gd(this.xc.bind(this),this.cn,t),this.qt().Fc().l(this.jm.bind(this),this),this.Hm=new Hd(this,this.N_),this.Lm.appendChild(this.Hm.Wv());const i=e.autoSize&&this.$m();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.Um(n,o),this.qm(),A.appendChild(this._m),this.Ym(),this.Ui.yt().Zu().l(this.Ui.$l.bind(this.Ui),this),this.Ui.f_().l(this.Ui.$l.bind(this.Ui),this)}qt(){return this.Ui}W(){return this.cn}Xm(){return this.Rm}Km(){return this.Hm}S(){this.Wm(!1),this.Dm!==0&&window.cancelAnimationFrame(this.Dm),this.Ui.Fc().p(this),this.Ui.yt().Zu().p(this),this.Ui.f_().p(this),this.Ui.S();for(const A of this.Rm)this.Lm.removeChild(A.Wv()),A.Np().p(this),A.Fp().p(this),A.S();this.Rm=[],H(this.Hm).S(),this._m.parentElement!==null&&this._m.parentElement.removeChild(this._m),this.gc.S(),this._p.S(),this.up.S(),this.Zm()}Um(A,e,t=!1){if(this.Qa===e&&this.e_===A)return;const s=(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.Qa=s.height,this.e_=s.width;const i=this.Qa+"px",n=this.e_+"px";H(this._m).style.height=i,H(this._m).style.width=n,this.Lm.style.height=i,this.Lm.style.width=n,t?this.Gm(YA.es(),performance.now()):this.Ui.$l()}Kv(A){A===void 0&&(A=YA.es());for(let e=0;e<this.Rm.length;e++)this.Rm[e].Kv(A.Hn(e).Fn);this.cn.timeScale.visible&&this.Hm.Kv(A.jn())}Nh(A){const e=rn(this.cn);this.Ui.Nh(A);const t=rn(this.cn);t!==e&&this.Wm(t),this.Ym(),this.Jm(A)}Np(){return this._p}Fp(){return this.up}Fc(){return this.gc}Qm(){this.Vm!==null&&(this.Gm(this.Vm,performance.now()),this.Vm=null);const A=this.tb(null),e=document.createElement("canvas");e.width=A.width,e.height=A.height;const t=H(e.getContext("2d"));return this.tb(t),e}ib(A){return A==="left"&&!this.nb()||A==="right"&&!this.sb()||this.Rm.length===0?0:H(A==="left"?this.Rm[0].Kp():this.Rm[0].Zp()).Yv()}eb(){return this.cn.autoSize&&this.Im!==null}rb(){return this._m}Ap(A){this.zm=A,this.zm?this.rb().style.setProperty("cursor",A):this.rb().style.removeProperty("cursor")}hb(){return this.zm}lb(){return ie(this.Rm[0]).Hp()}Jm(A){(A.autoSize!==void 0||!this.Im||A.width===void 0&&A.height===void 0)&&(A.autoSize&&!this.Im&&this.$m(),A.autoSize===!1&&this.Im!==null&&this.Zm(),A.autoSize||A.width===void 0&&A.height===void 0||this.Um(A.width||this.e_,A.height||this.Qa))}tb(A){let e=0,t=0;const s=this.Rm[0],i=(o,a)=>{let l=0;for(let c=0;c<this.Rm.length;c++){const u=this.Rm[c],d=H(o==="left"?u.Kp():u.Zp()),g=d.np();A!==null&&d.sp(A,a,l),l+=g.height}};this.nb()&&(i("left",0),e+=H(s.Kp()).np().width);for(let o=0;o<this.Rm.length;o++){const a=this.Rm[o],l=a.np();A!==null&&a.sp(A,e,t),t+=l.height}e+=s.np().width,this.sb()&&(i("right",e),e+=H(s.Zp()).np().width);const n=(o,a,l)=>{H(o==="left"?this.Hm.pm():this.Hm.bm()).sp(H(A),a,l)};if(this.cn.timeScale.visible){const o=this.Hm.np();if(A!==null){let a=0;this.nb()&&(n("left",a,t),a=H(s.Kp()).np().width),this.Hm.sp(A,a,t),a+=o.width,this.sb()&&n("right",a,t)}t+=o.height}return IA({width:e,height:t})}ab(){let A=0,e=0,t=0;for(const B of this.Rm)this.nb()&&(e=Math.max(e,H(B.Kp()).Hv(),this.cn.leftPriceScale.minimumWidth)),this.sb()&&(t=Math.max(t,H(B.Zp()).Hv(),this.cn.rightPriceScale.minimumWidth)),A+=B.v_();e=zi(e),t=zi(t);const s=this.e_,i=this.Qa,n=Math.max(s-e-t,0),o=this.cn.timeScale.visible;let a=o?Math.max(this.Hm.Mm(),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.Rm.length;++B){const f=this.Rm[B];f.Cp(this.Ui.Ec()[B]);let w=0,m=0;m=B===this.Rm.length-1?u-g:Math.round(f.v_()*d),w=Math.max(m,2),g+=w,f.qv(IA({width:n,height:w})),this.nb()&&f.jp(e,"left"),this.sb()&&f.jp(t,"right"),f.Xv()&&this.Ui.Wc(f.Xv(),w)}this.Hm.gm(IA({width:o?n:0,height:a}),o?e:0,o?t:0),this.Ui.m_(n),this.Om!==e&&(this.Om=e),this.Am!==t&&(this.Am=t)}Wm(A){A?this._m.addEventListener("wheel",this.Nm,{passive:!1}):this._m.removeEventListener("wheel",this.Nm)}ob(A){switch(A.deltaMode){case A.DOM_DELTA_PAGE:return 120;case A.DOM_DELTA_LINE:return 32}return Ld?1/window.devicePixelRatio:1}Fm(A){if(!(A.deltaX!==0&&this.cn.handleScroll.mouseWheel||A.deltaY!==0&&this.cn.handleScale.mouseWheel))return;const e=this.ob(A),t=e*A.deltaX/100,s=-e*A.deltaY/100;if(A.cancelable&&A.preventDefault(),s!==0&&this.cn.handleScale.mouseWheel){const i=Math.sign(s)*Math.min(1,Math.abs(s)),n=A.clientX-this._m.getBoundingClientRect().left;this.qt().$c(n,i)}t!==0&&this.cn.handleScroll.mouseWheel&&this.qt().Uc(-80*t)}Gm(A,e){var t;const s=A.jn();s===3&&this._b(),s!==3&&s!==2||(this.ub(A),this.cb(A,e),this.Hm.gt(),this.Rm.forEach((i=>{i.Pp()})),((t=this.Vm)===null||t===void 0?void 0:t.jn())===3&&(this.Vm.ts(A),this._b(),this.ub(this.Vm),this.cb(this.Vm,e),A=this.Vm,this.Vm=null)),this.Kv(A)}cb(A,e){for(const t of A.Qn())this.ns(t,e)}ub(A){const e=this.Ui.Ec();for(let t=0;t<e.length;t++)A.Hn(t).Wn&&e[t].V_()}ns(A,e){const t=this.Ui.yt();switch(A.qn){case 0:t.Ju();break;case 1:t.Qu(A.Vt);break;case 2:t.Gn(A.Vt);break;case 3:t.Jn(A.Vt);break;case 4:t.Nu();break;case 5:A.Vt.qu(e)||t.Jn(A.Vt.Yu(e))}}xc(A){this.Vm!==null?this.Vm.ts(A):this.Vm=A,this.Bm||(this.Bm=!0,this.Dm=window.requestAnimationFrame((e=>{if(this.Bm=!1,this.Dm=0,this.Vm!==null){const t=this.Vm;this.Vm=null,this.Gm(t,e);for(const s of t.Qn())if(s.qn===5&&!s.Vt.qu(e)){this.qt().Xn(s.Vt);break}}})))}_b(){this.qm()}qm(){const A=this.Ui.Ec(),e=A.length,t=this.Rm.length;for(let s=e;s<t;s++){const i=ie(this.Rm.pop());this.Lm.removeChild(i.Wv()),i.Np().p(this),i.Fp().p(this),i.S()}for(let s=t;s<e;s++){const i=new An(this,A[s]);i.Np().l(this.fb.bind(this),this),i.Fp().l(this.vb.bind(this),this),this.Rm.push(i),this.Lm.insertBefore(i.Wv(),this.Hm.Wv())}for(let s=0;s<e;s++){const i=A[s],n=this.Rm[s];n.Xv()!==i?n.Cp(i):n.yp()}this.Ym(),this.ab()}pb(A,e,t){var s;const i=new Map;A!==null&&this.Ui.Mt().forEach((c=>{const u=c.In().nl(A);u!==null&&i.set(c,u)}));let n;if(A!==null){const c=(s=this.Ui.yt().qi(A))===null||s===void 0?void 0:s.originalTime;c!==void 0&&(n=c)}const o=this.qt().Ac(),a=o!==null&&o.Bc instanceof ki?o.Bc:void 0,l=o!==null&&o.vv!==void 0?o.vv.wr:void 0;return{mb:n,se:A??void 0,bb:e??void 0,wb:a,gb:i,Mb:l,xb:t??void 0}}fb(A,e,t){this._p.m((()=>this.pb(A,e,t)))}vb(A,e,t){this.up.m((()=>this.pb(A,e,t)))}jm(A,e,t){this.gc.m((()=>this.pb(A,e,t)))}Ym(){const A=this.cn.timeScale.visible?"":"none";this.Hm.Wv().style.display=A}nb(){return this.Rm[0].Xv().S_().W().visible}sb(){return this.Rm[0].Xv().k_().W().visible}$m(){return"ResizeObserver"in window&&(this.Im=new ResizeObserver((A=>{const e=A.find((t=>t.target===this.Em));e&&this.Um(e.contentRect.width,e.contentRect.height)})),this.Im.observe(this.Em,{box:"border-box"}),!0)}Zm(){this.Im!==null&&this.Im.disconnect(),this.Im=null}}function rn(r){return!!(r.handleScroll.mouseWheel||r.handleScale.mouseWheel)}function Wa(r,A){var e={};for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&A.indexOf(t)<0&&(e[t]=r[t]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function"){var s=0;for(t=Object.getOwnPropertySymbols(r);s<t.length;s++)A.indexOf(t[s])<0&&Object.prototype.propertyIsEnumerable.call(r,t[s])&&(e[t[s]]=r[t[s]])}return e}function za(r,A,e,t){const s=e.value,i={se:A,ut:r,Vt:[s,s,s,s],mb:t};return e.color!==void 0&&(i.O=e.color),i}function Td(r,A,e,t){const s=e.value,i={se:A,ut:r,Vt:[s,s,s,s],mb:t};return e.lineColor!==void 0&&(i._t=e.lineColor),e.topColor!==void 0&&(i.Ts=e.topColor),e.bottomColor!==void 0&&(i.Ps=e.bottomColor),i}function Md(r,A,e,t){const s=e.value,i={se:A,ut:r,Vt:[s,s,s,s],mb:t};return e.topLineColor!==void 0&&(i.Pe=e.topLineColor),e.bottomLineColor!==void 0&&(i.Re=e.bottomLineColor),e.topFillColor1!==void 0&&(i.Se=e.topFillColor1),e.topFillColor2!==void 0&&(i.ke=e.topFillColor2),e.bottomFillColor1!==void 0&&(i.ye=e.bottomFillColor1),e.bottomFillColor2!==void 0&&(i.Ce=e.bottomFillColor2),i}function Dd(r,A,e,t){const s={se:A,ut:r,Vt:[e.open,e.high,e.low,e.close],mb:t};return e.color!==void 0&&(s.O=e.color),s}function Od(r,A,e,t){const s={se:A,ut:r,Vt:[e.open,e.high,e.low,e.close],mb:t};return e.color!==void 0&&(s.O=e.color),e.borderColor!==void 0&&(s.Bt=e.borderColor),e.wickColor!==void 0&&(s.$h=e.wickColor),s}function kd(r,A,e,t,s){const i=ie(s)(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{se:A,ut:r,Vt:l,mb:t,He:Wa(c,["time","color"]),O:d}}function is(r){return r.Vt!==void 0}function Xa(r,A){return A.customValues!==void 0&&(r.Sb=A.customValues),r}function pt(r){return(A,e,t,s,i,n)=>(function(o,a){return a?a(o):(l=o).open===void 0&&l.value===void 0;var l})(t,n)?Xa({ut:A,se:e,mb:s},t):Xa(r(A,e,t,s,i),t)}function Ja(r){return{Candlestick:pt(Od),Bar:pt(Dd),Area:pt(Td),Baseline:pt(Md),Histogram:pt(za),Line:pt(za),Custom:pt(kd)}[r]}function Za(r){return{se:0,kb:new Map,ia:r}}function Ya(r,A){if(r!==void 0&&r.length!==0)return{yb:A.key(r[0].ut),Cb:A.key(r[r.length-1].ut)}}function qa(r){let A;return r.forEach((e=>{A===void 0&&(A=e.mb)})),ie(A)}class _d{constructor(A){this.Tb=new Map,this.Pb=new Map,this.Rb=new Map,this.Db=[],this.N_=A}S(){this.Tb.clear(),this.Pb.clear(),this.Rb.clear(),this.Db=[]}Ob(A,e){let t=this.Tb.size!==0,s=!1;const i=this.Pb.get(A);if(i!==void 0)if(this.Pb.size===1)t=!1,s=!0,this.Tb.clear();else for(const a of this.Db)a.pointData.kb.delete(A)&&(s=!0);let n=[];if(e.length!==0){const a=e.map((g=>g.time)),l=this.N_.createConverterToInternalObj(e),c=Ja(A.Xh()),u=A.ga(),d=A.Ma();n=e.map(((g,B)=>{const f=l(g.time),w=this.N_.key(f);let m=this.Tb.get(w);m===void 0&&(m=Za(f),this.Tb.set(w,m),s=!0);const p=c(f,m.se,g,a[B],u,d);return m.kb.set(A,p),p}))}t&&this.Ab(),this.Vb(A,n);let o=-1;if(s){const a=[];this.Tb.forEach((l=>{a.push({timeWeight:0,time:l.ia,pointData:l,originalTime:qa(l.kb)})})),a.sort(((l,c)=>this.N_.key(l.time)-this.N_.key(c.time))),o=this.Bb(a)}return this.Ib(A,o,(function(a,l,c){const u=Ya(a,c),d=Ya(l,c);if(u!==void 0&&d!==void 0)return{Xl:u.Cb>=d.Cb&&u.yb>=d.yb}})(this.Pb.get(A),i,this.N_))}rd(A){return this.Ob(A,[])}zb(A,e){const t=e;(function(f){f.mb===void 0&&(f.mb=f.time)})(t),this.N_.preprocessData(e);const s=this.N_.createConverterToInternalObj([e])(e.time),i=this.Rb.get(A);if(i!==void 0&&this.N_.key(s)<this.N_.key(i))throw new Error(`Cannot update oldest data, last time=${i}, new time=${s}`);let n=this.Tb.get(this.N_.key(s));const o=n===void 0;n===void 0&&(n=Za(s),this.Tb.set(this.N_.key(s),n));const a=Ja(A.Xh()),l=A.ga(),c=A.Ma(),u=a(s,n.se,e,t.mb,l,c);n.kb.set(A,u),this.Eb(A,u);const d={Xl:is(u)};if(!o)return this.Ib(A,-1,d);const g={timeWeight:0,time:n.ia,pointData:n,originalTime:qa(n.kb)},B=jt(this.Db,this.N_.key(g.time),((f,w)=>this.N_.key(f.time)<w));this.Db.splice(B,0,g);for(let f=B;f<this.Db.length;++f)sn(this.Db[f].pointData,f);return this.N_.fillWeightsForPoints(this.Db,B),this.Ib(A,B,d)}Eb(A,e){let t=this.Pb.get(A);t===void 0&&(t=[],this.Pb.set(A,t));const s=t.length!==0?t[t.length-1]:null;s===null||this.N_.key(e.ut)>this.N_.key(s.ut)?is(e)&&t.push(e):is(e)?t[t.length-1]=e:t.splice(-1,1),this.Rb.set(A,e.ut)}Vb(A,e){e.length!==0?(this.Pb.set(A,e.filter(is)),this.Rb.set(A,e[e.length-1].ut)):(this.Pb.delete(A),this.Rb.delete(A))}Ab(){for(const A of this.Db)A.pointData.kb.size===0&&this.Tb.delete(this.N_.key(A.time))}Bb(A){let e=-1;for(let t=0;t<this.Db.length&&t<A.length;++t){const s=this.Db[t],i=A[t];if(this.N_.key(s.time)!==this.N_.key(i.time)){e=t;break}i.timeWeight=s.timeWeight,sn(i.pointData,t)}if(e===-1&&this.Db.length!==A.length&&(e=Math.min(this.Db.length,A.length)),e===-1)return-1;for(let t=e;t<A.length;++t)sn(A[t].pointData,t);return this.N_.fillWeightsForPoints(A,e),this.Db=A,e}Lb(){if(this.Pb.size===0)return null;let A=0;return this.Pb.forEach((e=>{e.length!==0&&(A=Math.max(A,e[e.length-1].se))})),A}Ib(A,e,t){const s={Nb:new Map,yt:{Ou:this.Lb()}};if(e!==-1)this.Pb.forEach(((i,n)=>{s.Nb.set(n,{He:i,Fb:n===A?t:void 0})})),this.Pb.has(A)||s.Nb.set(A,{He:[],Fb:t}),s.yt.Wb=this.Db,s.yt.jb=e;else{const i=this.Pb.get(A);s.Nb.set(A,{He:i||[],Fb:t})}return s}}function sn(r,A){r.se=A,r.kb.forEach((e=>{e.se=A}))}function nn(r){const A={value:r.Vt[3],time:r.mb};return r.Sb!==void 0&&(A.customValues=r.Sb),A}function $a(r){const A=nn(r);return r.O!==void 0&&(A.color=r.O),A}function Nd(r){const A=nn(r);return r._t!==void 0&&(A.lineColor=r._t),r.Ts!==void 0&&(A.topColor=r.Ts),r.Ps!==void 0&&(A.bottomColor=r.Ps),A}function Kd(r){const A=nn(r);return r.Pe!==void 0&&(A.topLineColor=r.Pe),r.Re!==void 0&&(A.bottomLineColor=r.Re),r.Se!==void 0&&(A.topFillColor1=r.Se),r.ke!==void 0&&(A.topFillColor2=r.ke),r.ye!==void 0&&(A.bottomFillColor1=r.ye),r.Ce!==void 0&&(A.bottomFillColor2=r.Ce),A}function ja(r){const A={open:r.Vt[0],high:r.Vt[1],low:r.Vt[2],close:r.Vt[3],time:r.mb};return r.Sb!==void 0&&(A.customValues=r.Sb),A}function Vd(r){const A=ja(r);return r.O!==void 0&&(A.color=r.O),A}function Pd(r){const A=ja(r),{O:e,Bt:t,$h:s}=r;return e!==void 0&&(A.color=e),t!==void 0&&(A.borderColor=t),s!==void 0&&(A.wickColor=s),A}function on(r){return{Area:Nd,Line:$a,Baseline:Kd,Histogram:$a,Bar:Vd,Candlestick:Pd,Custom:Gd}[r]}function Gd(r){const A=r.mb;return Object.assign(Object.assign({},r.He),{time:A})}const Rd={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},Wd={vertLines:{color:"#D6DCDE",style:0,visible:!0},horzLines:{color:"#D6DCDE",style:0,visible:!0}},zd={background:{type:"solid",color:"#FFFFFF"},textColor:"#191919",fontSize:12,fontFamily:Qi},an={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},Xd={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,ticksVisible:!1,uniformDistribution:!1,minimumHeight:0},Jd={color:"rgba(0, 0, 0, 0)",visible:!1,fontSize:48,fontFamily:Qi,fontStyle:"",text:"",horzAlign:"center",vertAlign:"center"};function Al(){return{width:0,height:0,autoSize:!1,layout:zd,crosshair:Rd,grid:Wd,overlayPriceScales:Object.assign({},an),leftPriceScale:Object.assign(Object.assign({},an),{visible:!1}),rightPriceScale:Object.assign(Object.assign({},an),{visible:!0}),timeScale:Xd,watermark:Jd,localization:{locale:It?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 Zd{constructor(A,e){this.Hb=A,this.$b=e}applyOptions(A){this.Hb.qt().Ic(this.$b,A)}options(){return this.Li().W()}width(){return Wr(this.$b)?this.Hb.ib(this.$b):0}Li(){return H(this.Hb.qt().zc(this.$b)).At}}function el(r,A,e){const t=Wa(r,["time","originalTime"]),s=Object.assign({time:A},t);return e!==void 0&&(s.originalTime=e),s}const Yd={color:"#FF0000",price:0,lineStyle:2,lineWidth:1,lineVisible:!0,axisLabelVisible:!0,title:"",axisLabelColor:"",axisLabelTextColor:""};class qd{constructor(A){this.Bh=A}applyOptions(A){this.Bh.Nh(A)}options(){return this.Bh.W()}Ub(){return this.Bh}}class $d{constructor(A,e,t,s,i){this.qb=new KA,this.Es=A,this.Yb=e,this.Xb=t,this.N_=i,this.Kb=s}S(){this.qb.S()}priceFormatter(){return this.Es.ca()}priceToCoordinate(A){const e=this.Es.Pt();return e===null?null:this.Es.At().Ot(A,e.Vt)}coordinateToPrice(A){const e=this.Es.Pt();return e===null?null:this.Es.At().pn(A,e.Vt)}barsInLogicalRange(A){if(A===null)return null;const e=new Lt(new nr(A.from,A.to)).iu(),t=this.Es.In();if(t.Fi())return null;const s=t.nl(e.Os(),1),i=t.nl(e.di(),-1),n=H(t.Qh()),o=H(t.Bn());if(s!==null&&i!==null&&s.se>i.se)return{barsBefore:A.from-n,barsAfter:o-A.to};const a={barsBefore:s===null||s.se===n?A.from-n:s.se-n,barsAfter:i===null||i.se===o?o-A.to:o-i.se};return s!==null&&i!==null&&(a.from=s.mb,a.to=i.mb),a}setData(A){this.N_,this.Es.Xh(),this.Yb.Zb(this.Es,A),this.Gb("full")}update(A){this.Es.Xh(),this.Yb.Jb(this.Es,A),this.Gb("update")}dataByIndex(A,e){const t=this.Es.In().nl(A,e);return t===null?null:on(this.seriesType())(t)}data(){const A=on(this.seriesType());return this.Es.In().ie().map((e=>A(e)))}subscribeDataChanged(A){this.qb.l(A)}unsubscribeDataChanged(A){this.qb.v(A)}setMarkers(A){this.N_;const e=A.map((t=>el(t,this.N_.convertHorzItemToInternal(t.time),t.time)));this.Es.Zl(e)}markers(){return this.Es.Gl().map((A=>el(A,A.originalTime,void 0)))}applyOptions(A){this.Es.Nh(A)}options(){return ze(this.Es.W())}priceScale(){return this.Xb.priceScale(this.Es.At().xa())}createPriceLine(A){const e=Ue(ze(Yd),A),t=this.Es.Jl(e);return new qd(t)}removePriceLine(A){this.Es.Ql(A.Ub())}seriesType(){return this.Es.Xh()}attachPrimitive(A){this.Es.ba(A),A.attached&&A.attached({chart:this.Kb,series:this,requestUpdate:()=>this.Es.qt().$l()})}detachPrimitive(A){this.Es.wa(A),A.detached&&A.detached()}Gb(A){this.qb.M()&&this.qb.m(A)}}class jd{constructor(A,e,t){this.Qb=new KA,this.uu=new KA,this.om=new KA,this.Ui=A,this.wl=A.yt(),this.Hm=e,this.wl.Xu().l(this.tw.bind(this)),this.wl.Ku().l(this.iw.bind(this)),this.Hm.wm().l(this.nw.bind(this)),this.N_=t}S(){this.wl.Xu().p(this),this.wl.Ku().p(this),this.Hm.wm().p(this),this.Qb.S(),this.uu.S(),this.om.S()}scrollPosition(){return this.wl.zu()}scrollToPosition(A,e){e?this.wl.Uu(A,1e3):this.Ui.Jn(A)}scrollToRealTime(){this.wl.$u()}getVisibleRange(){const A=this.wl.yu();return A===null?null:{from:A.from.originalTime,to:A.to.originalTime}}setVisibleRange(A){const e={from:this.N_.convertHorzItemToInternal(A.from),to:this.N_.convertHorzItemToInternal(A.to)},t=this.wl.Pu(e);this.Ui.hd(t)}getVisibleLogicalRange(){const A=this.wl.ku();return A===null?null:{from:A.Os(),to:A.di()}}setVisibleLogicalRange(A){At(A.from<=A.to,"The from index cannot be after the to index."),this.Ui.hd(A)}resetTimeScale(){this.Ui.Zn()}fitContent(){this.Ui.Ju()}logicalToCoordinate(A){const e=this.Ui.yt();return e.Fi()?null:e.Et(A)}coordinateToLogical(A){return this.wl.Fi()?null:this.wl.Au(A)}timeToCoordinate(A){const e=this.N_.convertHorzItemToInternal(A),t=this.wl.ya(e,!1);return t===null?null:this.wl.Et(t)}coordinateToTime(A){const e=this.Ui.yt(),t=e.Au(A),s=e.qi(t);return s===null?null:s.originalTime}width(){return this.Hm.Hp().width}height(){return this.Hm.Hp().height}subscribeVisibleTimeRangeChange(A){this.Qb.l(A)}unsubscribeVisibleTimeRangeChange(A){this.Qb.v(A)}subscribeVisibleLogicalRangeChange(A){this.uu.l(A)}unsubscribeVisibleLogicalRangeChange(A){this.uu.v(A)}subscribeSizeChange(A){this.om.l(A)}unsubscribeSizeChange(A){this.om.v(A)}applyOptions(A){this.wl.Nh(A)}options(){return Object.assign(Object.assign({},ze(this.wl.W())),{barSpacing:this.wl.he()})}tw(){this.Qb.M()&&this.Qb.m(this.getVisibleRange())}iw(){this.uu.M()&&this.uu.m(this.getVisibleLogicalRange())}nw(A){this.om.m(A.width,A.height)}}function A0(r){if(r===void 0||r.type==="custom")return;const A=r;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 s=Math.round(e);if(Math.abs(s-e)<1e-8)return t;e*=10}return t})(A.minMove))}function tl(r){return(function(A){if(Pr(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:s}=A.handleScale;Pr(t)&&(A.handleScale.axisPressedMouseMove={time:t,price:t}),Pr(s)&&(A.handleScale.axisDoubleClickReset={time:s,price:s})}const e=A.handleScroll;Pr(e)&&(A.handleScroll={horzTouchDrag:e,vertTouchDrag:e,mouseWheel:e,pressedMouseMove:e})})(r),r}class e0{constructor(A,e,t){this.sw=new Map,this.ew=new Map,this.rw=new KA,this.hw=new KA,this.lw=new KA,this.aw=new _d(e);const s=t===void 0?ze(Al()):Ue(ze(Al()),tl(t));this.N_=e,this.Hb=new Id(A,s,e),this.Hb.Np().l((n=>{this.rw.M()&&this.rw.m(this.ow(n()))}),this),this.Hb.Fp().l((n=>{this.hw.M()&&this.hw.m(this.ow(n()))}),this),this.Hb.Fc().l((n=>{this.lw.M()&&this.lw.m(this.ow(n()))}),this);const i=this.Hb.qt();this._w=new jd(i,this.Hb.Km(),this.N_)}remove(){this.Hb.Np().p(this),this.Hb.Fp().p(this),this.Hb.Fc().p(this),this._w.S(),this.Hb.S(),this.sw.clear(),this.ew.clear(),this.rw.S(),this.hw.S(),this.lw.S(),this.aw.S()}resize(A,e,t){this.autoSizeActive()||this.Hb.Um(A,e,t)}addCustomSeries(A,e){const t=xt(A),s=Object.assign(Object.assign({},Ko),t.defaultOptions());return this.uw("Custom",s,e,t)}addAreaSeries(A){return this.uw("Area",Ku,A)}addBaselineSeries(A){return this.uw("Baseline",Vu,A)}addBarSeries(A){return this.uw("Bar",_u,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.uw("Candlestick",ku,A)}addHistogramSeries(A){return this.uw("Histogram",Pu,A)}addLineSeries(A){return this.uw("Line",Nu,A)}removeSeries(A){const e=ie(this.sw.get(A)),t=this.aw.rd(e);this.Hb.qt().rd(e),this.cw(t),this.sw.delete(A),this.ew.delete(e)}Zb(A,e){this.cw(this.aw.Ob(A,e))}Jb(A,e){this.cw(this.aw.zb(A,e))}subscribeClick(A){this.rw.l(A)}unsubscribeClick(A){this.rw.v(A)}subscribeCrosshairMove(A){this.lw.l(A)}unsubscribeCrosshairMove(A){this.lw.v(A)}subscribeDblClick(A){this.hw.l(A)}unsubscribeDblClick(A){this.hw.v(A)}priceScale(A){return new Zd(this.Hb,A)}timeScale(){return this._w}applyOptions(A){this.Hb.Nh(tl(A))}options(){return this.Hb.W()}takeScreenshot(){return this.Hb.Qm()}autoSizeActive(){return this.Hb.eb()}chartElement(){return this.Hb.rb()}paneSize(){const A=this.Hb.lb();return{height:A.height,width:A.width}}setCrosshairPosition(A,e,t){const s=this.sw.get(t);if(s===void 0)return;const i=this.Hb.qt().cr(s);i!==null&&this.Hb.qt().Jc(A,e,i)}clearCrosshairPosition(){this.Hb.qt().Qc(!0)}uw(A,e,t={},s){A0(t.priceFormat);const i=Ue(ze(Vo),ze(e),t),n=this.Hb.qt().sd(A,i,s),o=new $d(n,this,this,this,this.N_);return this.sw.set(o,n),this.ew.set(n,o),o}cw(A){const e=this.Hb.qt();e.td(A.yt.Ou,A.yt.Wb,A.yt.jb),A.Nb.forEach(((t,s)=>s.it(t.He,t.Fb))),e.Bu()}dw(A){return ie(this.ew.get(A))}ow(A){const e=new Map;A.gb.forEach(((s,i)=>{const n=i.Xh(),o=on(n)(s);if(n!=="Custom")At((function(a){return a.open!==void 0||a.value!==void 0})(o));else{const a=i.Ma();At(!a||a(o)===!1)}e.set(this.dw(i),o)}));const t=A.wb===void 0?void 0:this.dw(A.wb);return{time:A.mb,logical:A.se,point:A.bb,hoveredSeries:t,hoveredObjectId:A.Mb,seriesData:e,sourceEvent:A.xb}}}function t0(r,A,e){let t;if(qt(r)){const i=document.getElementById(r);At(i!==null,`Cannot find element in DOM with id=${r}`),t=i}else t=r;const s=new e0(t,A,e);return A.setOptions(s.options()),s}function r0(r,A){return t0(r,new Ka,Ka.Cd(A))}Object.assign(Object.assign({},Vo),Ko);function rl(r,A){return function(){return r.apply(A,arguments)}}const{toString:s0}=Object.prototype,{getPrototypeOf:ln}=Object,{iterator:ns,toStringTag:sl}=Symbol,os=(r=>A=>{const e=s0.call(A);return r[e]||(r[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),Ee=r=>(r=r.toLowerCase(),A=>os(A)===r),as=r=>A=>typeof A===r,{isArray:Mt}=Array,Dt=as("undefined");function or(r){return r!==null&&!Dt(r)&&r.constructor!==null&&!Dt(r.constructor)&&he(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}const il=Ee("ArrayBuffer");function i0(r){let A;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?A=ArrayBuffer.isView(r):A=r&&r.buffer&&il(r.buffer),A}const n0=as("string"),he=as("function"),nl=as("number"),ar=r=>r!==null&&typeof r=="object",o0=r=>r===!0||r===!1,ls=r=>{if(os(r)!=="object")return!1;const A=ln(r);return(A===null||A===Object.prototype||Object.getPrototypeOf(A)===null)&&!(sl in r)&&!(ns in r)},a0=r=>{if(!ar(r)||or(r))return!1;try{return Object.keys(r).length===0&&Object.getPrototypeOf(r)===Object.prototype}catch{return!1}},l0=Ee("Date"),c0=Ee("File"),h0=Ee("Blob"),u0=Ee("FileList"),f0=r=>ar(r)&&he(r.pipe),d0=r=>{let A;return r&&(typeof FormData=="function"&&r instanceof FormData||he(r.append)&&((A=os(r))==="formdata"||A==="object"&&he(r.toString)&&r.toString()==="[object FormData]"))},B0=Ee("URLSearchParams"),[g0,p0,w0,m0]=["ReadableStream","Request","Response","Headers"].map(Ee),C0=r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function lr(r,A,{allOwnKeys:e=!1}={}){if(r===null||typeof r>"u")return;let t,s;if(typeof r!="object"&&(r=[r]),Mt(r))for(t=0,s=r.length;t<s;t++)A.call(null,r[t],t,r);else{if(or(r))return;const i=e?Object.getOwnPropertyNames(r):Object.keys(r),n=i.length;let o;for(t=0;t<n;t++)o=i[t],A.call(null,r[o],o,r)}}function ol(r,A){if(or(r))return null;A=A.toLowerCase();const e=Object.keys(r);let t=e.length,s;for(;t-- >0;)if(s=e[t],A===s.toLowerCase())return s;return null}const wt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,al=r=>!Dt(r)&&r!==wt;function cn(){const{caseless:r,skipUndefined:A}=al(this)&&this||{},e={},t=(s,i)=>{const n=r&&ol(e,i)||i;ls(e[n])&&ls(s)?e[n]=cn(e[n],s):ls(s)?e[n]=cn({},s):Mt(s)?e[n]=s.slice():(!A||!Dt(s))&&(e[n]=s)};for(let s=0,i=arguments.length;s<i;s++)arguments[s]&&lr(arguments[s],t);return e}const v0=(r,A,e,{allOwnKeys:t}={})=>(lr(A,(s,i)=>{e&&he(s)?Object.defineProperty(r,i,{value:rl(s,e),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(r,i,{value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:t}),r),b0=r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),Q0=(r,A,e,t)=>{r.prototype=Object.create(A.prototype,t),Object.defineProperty(r.prototype,"constructor",{value:r,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(r,"super",{value:A.prototype}),e&&Object.assign(r.prototype,e)},F0=(r,A,e,t)=>{let s,i,n;const o={};if(A=A||{},r==null)return A;do{for(s=Object.getOwnPropertyNames(r),i=s.length;i-- >0;)n=s[i],(!t||t(n,r,A))&&!o[n]&&(A[n]=r[n],o[n]=!0);r=e!==!1&&ln(r)}while(r&&(!e||e(r,A))&&r!==Object.prototype);return A},y0=(r,A,e)=>{r=String(r),(e===void 0||e>r.length)&&(e=r.length),e-=A.length;const t=r.indexOf(A,e);return t!==-1&&t===e},U0=r=>{if(!r)return null;if(Mt(r))return r;let A=r.length;if(!nl(A))return null;const e=new Array(A);for(;A-- >0;)e[A]=r[A];return e},E0=(r=>A=>r&&A instanceof r)(typeof Uint8Array<"u"&&ln(Uint8Array)),x0=(r,A)=>{const t=(r&&r[ns]).call(r);let s;for(;(s=t.next())&&!s.done;){const i=s.value;A.call(r,i[0],i[1])}},S0=(r,A)=>{let e;const t=[];for(;(e=r.exec(A))!==null;)t.push(e);return t},H0=Ee("HTMLFormElement"),L0=r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,s){return t.toUpperCase()+s}),ll=(({hasOwnProperty:r})=>(A,e)=>r.call(A,e))(Object.prototype),I0=Ee("RegExp"),cl=(r,A)=>{const e=Object.getOwnPropertyDescriptors(r),t={};lr(e,(s,i)=>{let n;(n=A(s,i,r))!==!1&&(t[i]=n||s)}),Object.defineProperties(r,t)},T0=r=>{cl(r,(A,e)=>{if(he(r)&&["arguments","caller","callee"].indexOf(e)!==-1)return!1;const t=r[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+"'")})}})},M0=(r,A)=>{const e={},t=s=>{s.forEach(i=>{e[i]=!0})};return Mt(r)?t(r):t(String(r).split(A)),e},D0=()=>{},O0=(r,A)=>r!=null&&Number.isFinite(r=+r)?r:A;function k0(r){return!!(r&&he(r.append)&&r[sl]==="FormData"&&r[ns])}const _0=r=>{const A=new Array(10),e=(t,s)=>{if(ar(t)){if(A.indexOf(t)>=0)return;if(or(t))return t;if(!("toJSON"in t)){A[s]=t;const i=Mt(t)?[]:{};return lr(t,(n,o)=>{const a=e(n,s+1);!Dt(a)&&(i[o]=a)}),A[s]=void 0,i}}return t};return e(r,0)},N0=Ee("AsyncFunction"),K0=r=>r&&(ar(r)||he(r))&&he(r.then)&&he(r.catch),hl=((r,A)=>r?setImmediate:A?((e,t)=>(wt.addEventListener("message",({source:s,data:i})=>{s===wt&&i===e&&t.length&&t.shift()()},!1),s=>{t.push(s),wt.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate=="function",he(wt.postMessage)),V0=typeof queueMicrotask<"u"?queueMicrotask.bind(wt):typeof process<"u"&&process.nextTick||hl,Q={isArray:Mt,isArrayBuffer:il,isBuffer:or,isFormData:d0,isArrayBufferView:i0,isString:n0,isNumber:nl,isBoolean:o0,isObject:ar,isPlainObject:ls,isEmptyObject:a0,isReadableStream:g0,isRequest:p0,isResponse:w0,isHeaders:m0,isUndefined:Dt,isDate:l0,isFile:c0,isBlob:h0,isRegExp:I0,isFunction:he,isStream:f0,isURLSearchParams:B0,isTypedArray:E0,isFileList:u0,forEach:lr,merge:cn,extend:v0,trim:C0,stripBOM:b0,inherits:Q0,toFlatObject:F0,kindOf:os,kindOfTest:Ee,endsWith:y0,toArray:U0,forEachEntry:x0,matchAll:S0,isHTMLForm:H0,hasOwnProperty:ll,hasOwnProp:ll,reduceDescriptors:cl,freezeMethods:T0,toObjectSet:M0,toCamelCase:L0,noop:D0,toFiniteNumber:O0,findKey:ol,global:wt,isContextDefined:al,isSpecCompliantForm:k0,toJSONObject:_0,isAsyncFn:N0,isThenable:K0,setImmediate:hl,asap:V0,isIterable:r=>r!=null&&he(r[ns])};let oA=class xu extends Error{static from(A,e,t,s,i,n){const o=new xu(A.message,e||A.code,t,s,i);return o.cause=A,o.name=A.name,n&&Object.assign(o,n),o}constructor(A,e,t,s,i){super(A),this.name="AxiosError",this.isAxiosError=!0,e&&(this.code=e),t&&(this.config=t),s&&(this.request=s),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:Q.toJSONObject(this.config),code:this.code,status:this.status}}};oA.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",oA.ERR_BAD_OPTION="ERR_BAD_OPTION",oA.ECONNABORTED="ECONNABORTED",oA.ETIMEDOUT="ETIMEDOUT",oA.ERR_NETWORK="ERR_NETWORK",oA.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",oA.ERR_DEPRECATED="ERR_DEPRECATED",oA.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",oA.ERR_BAD_REQUEST="ERR_BAD_REQUEST",oA.ERR_CANCELED="ERR_CANCELED",oA.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",oA.ERR_INVALID_URL="ERR_INVALID_URL";const P0=null;function hn(r){return Q.isPlainObject(r)||Q.isArray(r)}function ul(r){return Q.endsWith(r,"[]")?r.slice(0,-2):r}function fl(r,A,e){return r?r.concat(A).map(function(s,i){return s=ul(s),!e&&i?"["+s+"]":s}).join(e?".":""):A}function G0(r){return Q.isArray(r)&&!r.some(hn)}const R0=Q.toFlatObject(Q,{},null,function(A){return/^is[A-Z]/.test(A)});function cs(r,A,e){if(!Q.isObject(r))throw new TypeError("target must be an object");A=A||new FormData,e=Q.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(f,w){return!Q.isUndefined(w[f])});const t=e.metaTokens,s=e.visitor||c,i=e.dots,n=e.indexes,a=(e.Blob||typeof Blob<"u"&&Blob)&&Q.isSpecCompliantForm(A);if(!Q.isFunction(s))throw new TypeError("visitor must be a function");function l(B){if(B===null)return"";if(Q.isDate(B))return B.toISOString();if(Q.isBoolean(B))return B.toString();if(!a&&Q.isBlob(B))throw new oA("Blob is not supported. Use a Buffer instead.");return Q.isArrayBuffer(B)||Q.isTypedArray(B)?a&&typeof Blob=="function"?new Blob([B]):Buffer.from(B):B}function c(B,f,w){let m=B;if(B&&!w&&typeof B=="object"){if(Q.endsWith(f,"{}"))f=t?f:f.slice(0,-2),B=JSON.stringify(B);else if(Q.isArray(B)&&G0(B)||(Q.isFileList(B)||Q.endsWith(f,"[]"))&&(m=Q.toArray(B)))return f=ul(f),m.forEach(function(v,y){!(Q.isUndefined(v)||v===null)&&A.append(n===!0?fl([f],y,i):n===null?f:f+"[]",l(v))}),!1}return hn(B)?!0:(A.append(fl(w,f,i),l(B)),!1)}const u=[],d=Object.assign(R0,{defaultVisitor:c,convertValue:l,isVisitable:hn});function g(B,f){if(!Q.isUndefined(B)){if(u.indexOf(B)!==-1)throw Error("Circular reference detected in "+f.join("."));u.push(B),Q.forEach(B,function(m,p){(!(Q.isUndefined(m)||m===null)&&s.call(A,m,Q.isString(p)?p.trim():p,f,d))===!0&&g(m,f?f.concat(p):[p])}),u.pop()}}if(!Q.isObject(r))throw new TypeError("data must be an object");return g(r),A}function dl(r){const A={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g,function(t){return A[t]})}function un(r,A){this._pairs=[],r&&cs(r,this,A)}const Bl=un.prototype;Bl.append=function(A,e){this._pairs.push([A,e])},Bl.toString=function(A){const e=A?function(t){return A.call(this,t,dl)}:dl;return this._pairs.map(function(s){return e(s[0])+"="+e(s[1])},"").join("&")};function W0(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function gl(r,A,e){if(!A)return r;const t=e&&e.encode||W0,s=Q.isFunction(e)?{serialize:e}:e,i=s&&s.serialize;let n;if(i?n=i(A,s):n=Q.isURLSearchParams(A)?A.toString():new un(A,s).toString(t),n){const o=r.indexOf("#");o!==-1&&(r=r.slice(0,o)),r+=(r.indexOf("?")===-1?"?":"&")+n}return r}class pl{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){Q.forEach(this.handlers,function(t){t!==null&&A(t)})}}const wl={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},z0={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:un,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,X0=fn&&(!dn||["ReactNative","NativeScript","NS"].indexOf(dn.product)<0),J0=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Z0=fn&&window.location.href||"http://localhost",jA={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:fn,hasStandardBrowserEnv:X0,hasStandardBrowserWebWorkerEnv:J0,navigator:dn,origin:Z0},Symbol.toStringTag,{value:"Module"})),...z0};function Y0(r,A){return cs(r,new jA.classes.URLSearchParams,{visitor:function(e,t,s,i){return jA.isNode&&Q.isBuffer(e)?(this.append(t,e.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...A})}function q0(r){return Q.matchAll(/\w+|\[(\w*)]/g,r).map(A=>A[0]==="[]"?"":A[1]||A[0])}function $0(r){const A={},e=Object.keys(r);let t;const s=e.length;let i;for(t=0;t<s;t++)i=e[t],A[i]=r[i];return A}function ml(r){function A(e,t,s,i){let n=e[i++];if(n==="__proto__")return!0;const o=Number.isFinite(+n),a=i>=e.length;return n=!n&&Q.isArray(s)?s.length:n,a?(Q.hasOwnProp(s,n)?s[n]=[s[n],t]:s[n]=t,!o):((!s[n]||!Q.isObject(s[n]))&&(s[n]=[]),A(e,t,s[n],i)&&Q.isArray(s[n])&&(s[n]=$0(s[n])),!o)}if(Q.isFormData(r)&&Q.isFunction(r.entries)){const e={};return Q.forEachEntry(r,(t,s)=>{A(q0(t),s,e,0)}),e}return null}function j0(r,A,e){if(Q.isString(r))try{return(A||JSON.parse)(r),Q.trim(r)}catch(t){if(t.name!=="SyntaxError")throw t}return(e||JSON.stringify)(r)}const cr={transitional:wl,adapter:["xhr","http","fetch"],transformRequest:[function(A,e){const t=e.getContentType()||"",s=t.indexOf("application/json")>-1,i=Q.isObject(A);if(i&&Q.isHTMLForm(A)&&(A=new FormData(A)),Q.isFormData(A))return s?JSON.stringify(ml(A)):A;if(Q.isArrayBuffer(A)||Q.isBuffer(A)||Q.isStream(A)||Q.isFile(A)||Q.isBlob(A)||Q.isReadableStream(A))return A;if(Q.isArrayBufferView(A))return A.buffer;if(Q.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 Y0(A,this.formSerializer).toString();if((o=Q.isFileList(A))||t.indexOf("multipart/form-data")>-1){const a=this.env&&this.env.FormData;return cs(o?{"files[]":A}:A,a&&new a,this.formSerializer)}}return i||s?(e.setContentType("application/json",!1),j0(A)):A}],transformResponse:[function(A){const e=this.transitional||cr.transitional,t=e&&e.forcedJSONParsing,s=this.responseType==="json";if(Q.isResponse(A)||Q.isReadableStream(A))return A;if(A&&Q.isString(A)&&(t&&!this.responseType||s)){const n=!(e&&e.silentJSONParsing)&&s;try{return JSON.parse(A,this.parseReviver)}catch(o){if(n)throw o.name==="SyntaxError"?oA.from(o,oA.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:jA.classes.FormData,Blob:jA.classes.Blob},validateStatus:function(A){return A>=200&&A<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Q.forEach(["delete","get","head","post","put","patch"],r=>{cr.headers[r]={}});const AB=Q.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"]),eB=r=>{const A={};let e,t,s;return r&&r.split(`
2
- `).forEach(function(n){s=n.indexOf(":"),e=n.substring(0,s).trim().toLowerCase(),t=n.substring(s+1).trim(),!(!e||A[e]&&AB[e])&&(e==="set-cookie"?A[e]?A[e].push(t):A[e]=[t]:A[e]=A[e]?A[e]+", "+t:t)}),A},Cl=Symbol("internals");function hr(r){return r&&String(r).trim().toLowerCase()}function hs(r){return r===!1||r==null?r:Q.isArray(r)?r.map(hs):String(r)}function tB(r){const A=Object.create(null),e=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let t;for(;t=e.exec(r);)A[t[1]]=t[2];return A}const rB=r=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(r.trim());function Bn(r,A,e,t,s){if(Q.isFunction(t))return t.call(this,A,e);if(s&&(A=e),!!Q.isString(A)){if(Q.isString(t))return A.indexOf(t)!==-1;if(Q.isRegExp(t))return t.test(A)}}function sB(r){return r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(A,e,t)=>e.toUpperCase()+t)}function iB(r,A){const e=Q.toCamelCase(" "+A);["get","set","has"].forEach(t=>{Object.defineProperty(r,t+e,{value:function(s,i,n){return this[t].call(this,A,s,i,n)},configurable:!0})})}let ue=class{constructor(A){A&&this.set(A)}set(A,e,t){const s=this;function i(o,a,l){const c=hr(a);if(!c)throw new Error("header name must be a non-empty string");const u=Q.findKey(s,c);(!u||s[u]===void 0||l===!0||l===void 0&&s[u]!==!1)&&(s[u||a]=hs(o))}const n=(o,a)=>Q.forEach(o,(l,c)=>i(l,c,a));if(Q.isPlainObject(A)||A instanceof this.constructor)n(A,e);else if(Q.isString(A)&&(A=A.trim())&&!rB(A))n(eB(A),e);else if(Q.isObject(A)&&Q.isIterable(A)){let o={},a,l;for(const c of A){if(!Q.isArray(c))throw TypeError("Object iterator must return a key-value pair");o[l=c[0]]=(a=o[l])?Q.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=hr(A),A){const t=Q.findKey(this,A);if(t){const s=this[t];if(!e)return s;if(e===!0)return tB(s);if(Q.isFunction(e))return e.call(this,s,t);if(Q.isRegExp(e))return e.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(A,e){if(A=hr(A),A){const t=Q.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 s=!1;function i(n){if(n=hr(n),n){const o=Q.findKey(t,n);o&&(!e||Bn(t,t[o],o,e))&&(delete t[o],s=!0)}}return Q.isArray(A)?A.forEach(i):i(A),s}clear(A){const e=Object.keys(this);let t=e.length,s=!1;for(;t--;){const i=e[t];(!A||Bn(this,this[i],i,A,!0))&&(delete this[i],s=!0)}return s}normalize(A){const e=this,t={};return Q.forEach(this,(s,i)=>{const n=Q.findKey(t,i);if(n){e[n]=hs(s),delete e[i];return}const o=A?sB(i):String(i).trim();o!==i&&delete e[i],e[o]=hs(s),t[o]=!0}),this}concat(...A){return this.constructor.concat(this,...A)}toJSON(A){const e=Object.create(null);return Q.forEach(this,(t,s)=>{t!=null&&t!==!1&&(e[s]=A&&Q.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(s=>t.set(s)),t}static accessor(A){const t=(this[Cl]=this[Cl]={accessors:{}}).accessors,s=this.prototype;function i(n){const o=hr(n);t[o]||(iB(s,n),t[o]=!0)}return Q.isArray(A)?A.forEach(i):i(A),this}};ue.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Q.reduceDescriptors(ue.prototype,({value:r},A)=>{let e=A[0].toUpperCase()+A.slice(1);return{get:()=>r,set(t){this[e]=t}}}),Q.freezeMethods(ue);function gn(r,A){const e=this||cr,t=A||e,s=ue.from(t.headers);let i=t.data;return Q.forEach(r,function(o){i=o.call(e,i,s.normalize(),A?A.status:void 0)}),s.normalize(),i}function vl(r){return!!(r&&r.__CANCEL__)}let ur=class extends oA{constructor(A,e,t){super(A??"canceled",oA.ERR_CANCELED,e,t),this.name="CanceledError",this.__CANCEL__=!0}};function bl(r,A,e){const t=e.config.validateStatus;!e.status||!t||t(e.status)?r(e):A(new oA("Request failed with status code "+e.status,[oA.ERR_BAD_REQUEST,oA.ERR_BAD_RESPONSE][Math.floor(e.status/100)-4],e.config,e.request,e))}function nB(r){const A=/^([-+\w]{1,25})(:?\/\/|:)/.exec(r);return A&&A[1]||""}function oB(r,A){r=r||10;const e=new Array(r),t=new Array(r);let s=0,i=0,n;return A=A!==void 0?A:1e3,function(a){const l=Date.now(),c=t[i];n||(n=l),e[s]=a,t[s]=l;let u=i,d=0;for(;u!==s;)d+=e[u++],u=u%r;if(s=(s+1)%r,s===i&&(i=(i+1)%r),l-n<A)return;const g=c&&l-c;return g?Math.round(d*1e3/g):void 0}}function aB(r,A){let e=0,t=1e3/A,s,i;const n=(l,c=Date.now())=>{e=c,s=null,i&&(clearTimeout(i),i=null),r(...l)};return[(...l)=>{const c=Date.now(),u=c-e;u>=t?n(l,c):(s=l,i||(i=setTimeout(()=>{i=null,n(s)},t-u)))},()=>s&&n(s)]}const us=(r,A,e=3)=>{let t=0;const s=oB(50,250);return aB(i=>{const n=i.loaded,o=i.lengthComputable?i.total:void 0,a=n-t,l=s(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};r(u)},e)},Ql=(r,A)=>{const e=r!=null;return[t=>A[0]({lengthComputable:e,total:r,loaded:t}),A[1]]},Fl=r=>(...A)=>Q.asap(()=>r(...A)),lB=jA.hasStandardBrowserEnv?((r,A)=>e=>(e=new URL(e,jA.origin),r.protocol===e.protocol&&r.host===e.host&&(A||r.port===e.port)))(new URL(jA.origin),jA.navigator&&/(msie|trident)/i.test(jA.navigator.userAgent)):()=>!0,cB=jA.hasStandardBrowserEnv?{write(r,A,e,t,s,i,n){if(typeof document>"u")return;const o=[`${r}=${encodeURIComponent(A)}`];Q.isNumber(e)&&o.push(`expires=${new Date(e).toUTCString()}`),Q.isString(t)&&o.push(`path=${t}`),Q.isString(s)&&o.push(`domain=${s}`),i===!0&&o.push("secure"),Q.isString(n)&&o.push(`SameSite=${n}`),document.cookie=o.join("; ")},read(r){if(typeof document>"u")return null;const A=document.cookie.match(new RegExp("(?:^|; )"+r+"=([^;]*)"));return A?decodeURIComponent(A[1]):null},remove(r){this.write(r,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function hB(r){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r)}function uB(r,A){return A?r.replace(/\/?\/$/,"")+"/"+A.replace(/^\/+/,""):r}function yl(r,A,e){let t=!hB(A);return r&&(t||e==!1)?uB(r,A):A}const Ul=r=>r instanceof ue?{...r}:r;function mt(r,A){A=A||{};const e={};function t(l,c,u,d){return Q.isPlainObject(l)&&Q.isPlainObject(c)?Q.merge.call({caseless:d},l,c):Q.isPlainObject(c)?Q.merge({},c):Q.isArray(c)?c.slice():c}function s(l,c,u,d){if(Q.isUndefined(c)){if(!Q.isUndefined(l))return t(void 0,l,u,d)}else return t(l,c,u,d)}function i(l,c){if(!Q.isUndefined(c))return t(void 0,c)}function n(l,c){if(Q.isUndefined(c)){if(!Q.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 r)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)=>s(Ul(l),Ul(c),u,!0)};return Q.forEach(Object.keys({...r,...A}),function(c){const u=a[c]||s,d=u(r[c],A[c],c);Q.isUndefined(d)&&u!==o||(e[c]=d)}),e}const El=r=>{const A=mt({},r);let{data:e,withXSRFToken:t,xsrfHeaderName:s,xsrfCookieName:i,headers:n,auth:o}=A;if(A.headers=n=ue.from(n),A.url=gl(yl(A.baseURL,A.url,A.allowAbsoluteUrls),r.params,r.paramsSerializer),o&&n.set("Authorization","Basic "+btoa((o.username||"")+":"+(o.password?unescape(encodeURIComponent(o.password)):""))),Q.isFormData(e)){if(jA.hasStandardBrowserEnv||jA.hasStandardBrowserWebWorkerEnv)n.setContentType(void 0);else if(Q.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(jA.hasStandardBrowserEnv&&(t&&Q.isFunction(t)&&(t=t(A)),t||t!==!1&&lB(A.url))){const a=s&&i&&cB.read(i);a&&n.set(s,a)}return A},fB=typeof XMLHttpRequest<"u"&&function(r){return new Promise(function(e,t){const s=El(r);let i=s.data;const n=ue.from(s.headers).normalize();let{responseType:o,onUploadProgress:a,onDownloadProgress:l}=s,c,u,d,g,B;function f(){g&&g(),B&&B(),s.cancelToken&&s.cancelToken.unsubscribe(c),s.signal&&s.signal.removeEventListener("abort",c)}let w=new XMLHttpRequest;w.open(s.method.toUpperCase(),s.url,!0),w.timeout=s.timeout;function m(){if(!w)return;const v=ue.from("getAllResponseHeaders"in w&&w.getAllResponseHeaders()),E={data:!o||o==="text"||o==="json"?w.responseText:w.response,status:w.status,statusText:w.statusText,headers:v,config:r,request:w};bl(function(I){e(I),f()},function(I){t(I),f()},E),w=null}"onloadend"in w?w.onloadend=m:w.onreadystatechange=function(){!w||w.readyState!==4||w.status===0&&!(w.responseURL&&w.responseURL.indexOf("file:")===0)||setTimeout(m)},w.onabort=function(){w&&(t(new oA("Request aborted",oA.ECONNABORTED,r,w)),w=null)},w.onerror=function(y){const E=y&&y.message?y.message:"Network Error",U=new oA(E,oA.ERR_NETWORK,r,w);U.event=y||null,t(U),w=null},w.ontimeout=function(){let y=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const E=s.transitional||wl;s.timeoutErrorMessage&&(y=s.timeoutErrorMessage),t(new oA(y,E.clarifyTimeoutError?oA.ETIMEDOUT:oA.ECONNABORTED,r,w)),w=null},i===void 0&&n.setContentType(null),"setRequestHeader"in w&&Q.forEach(n.toJSON(),function(y,E){w.setRequestHeader(E,y)}),Q.isUndefined(s.withCredentials)||(w.withCredentials=!!s.withCredentials),o&&o!=="json"&&(w.responseType=s.responseType),l&&([d,B]=us(l,!0),w.addEventListener("progress",d)),a&&w.upload&&([u,g]=us(a),w.upload.addEventListener("progress",u),w.upload.addEventListener("loadend",g)),(s.cancelToken||s.signal)&&(c=v=>{w&&(t(!v||v.type?new ur(null,r,w):v),w.abort(),w=null)},s.cancelToken&&s.cancelToken.subscribe(c),s.signal&&(s.signal.aborted?c():s.signal.addEventListener("abort",c)));const p=nB(s.url);if(p&&jA.protocols.indexOf(p)===-1){t(new oA("Unsupported protocol "+p+":",oA.ERR_BAD_REQUEST,r));return}w.send(i||null)})},dB=(r,A)=>{const{length:e}=r=r?r.filter(Boolean):[];if(A||e){let t=new AbortController,s;const i=function(l){if(!s){s=!0,o();const c=l instanceof Error?l:this.reason;t.abort(c instanceof oA?c:new ur(c instanceof Error?c.message:c))}};let n=A&&setTimeout(()=>{n=null,i(new oA(`timeout of ${A}ms exceeded`,oA.ETIMEDOUT))},A);const o=()=>{r&&(n&&clearTimeout(n),n=null,r.forEach(l=>{l.unsubscribe?l.unsubscribe(i):l.removeEventListener("abort",i)}),r=null)};r.forEach(l=>l.addEventListener("abort",i));const{signal:a}=t;return a.unsubscribe=()=>Q.asap(o),a}},BB=function*(r,A){let e=r.byteLength;if(e<A){yield r;return}let t=0,s;for(;t<e;)s=t+A,yield r.slice(t,s),t=s},gB=async function*(r,A){for await(const e of pB(r))yield*BB(e,A)},pB=async function*(r){if(r[Symbol.asyncIterator]){yield*r;return}const A=r.getReader();try{for(;;){const{done:e,value:t}=await A.read();if(e)break;yield t}}finally{await A.cancel()}},xl=(r,A,e,t)=>{const s=gB(r,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 s.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),s.return()}},{highWaterMark:2})},Sl=64*1024,{isFunction:fs}=Q,wB=(({Request:r,Response:A})=>({Request:r,Response:A}))(Q.global),{ReadableStream:Hl,TextEncoder:Ll}=Q.global,Il=(r,...A)=>{try{return!!r(...A)}catch{return!1}},mB=r=>{r=Q.merge.call({skipUndefined:!0},wB,r);const{fetch:A,Request:e,Response:t}=r,s=A?fs(A):typeof fetch=="function",i=fs(e),n=fs(t);if(!s)return!1;const o=s&&fs(Hl),a=s&&(typeof Ll=="function"?(B=>f=>B.encode(f))(new Ll):async B=>new Uint8Array(await new e(B).arrayBuffer())),l=i&&o&&Il(()=>{let B=!1;const f=new e(jA.origin,{body:new Hl,method:"POST",get duplex(){return B=!0,"half"}}).headers.has("Content-Type");return B&&!f}),c=n&&o&&Il(()=>Q.isReadableStream(new t("").body)),u={stream:c&&(B=>B.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(B=>{!u[B]&&(u[B]=(f,w)=>{let m=f&&f[B];if(m)return m.call(f);throw new oA(`Response type '${B}' is not supported`,oA.ERR_NOT_SUPPORT,w)})});const d=async B=>{if(B==null)return 0;if(Q.isBlob(B))return B.size;if(Q.isSpecCompliantForm(B))return(await new e(jA.origin,{method:"POST",body:B}).arrayBuffer()).byteLength;if(Q.isArrayBufferView(B)||Q.isArrayBuffer(B))return B.byteLength;if(Q.isURLSearchParams(B)&&(B=B+""),Q.isString(B))return(await a(B)).byteLength},g=async(B,f)=>{const w=Q.toFiniteNumber(B.getContentLength());return w??d(f)};return async B=>{let{url:f,method:w,data:m,signal:p,cancelToken:v,timeout:y,onDownloadProgress:E,onUploadProgress:U,responseType:I,headers:O,withCredentials:T="same-origin",fetchOptions:lA}=El(B),M=A||fetch;I=I?(I+"").toLowerCase():"text";let Z=dB([p,v&&v.toAbortSignal()],y),S=null;const V=Z&&Z.unsubscribe&&(()=>{Z.unsubscribe()});let X;try{if(U&&l&&w!=="get"&&w!=="head"&&(X=await g(O,m))!==0){let bA=new e(f,{method:"POST",body:m,duplex:"half"}),q;if(Q.isFormData(m)&&(q=bA.headers.get("content-type"))&&O.setContentType(q),bA.body){const[$,QA]=Ql(X,us(Fl(U)));m=xl(bA.body,Sl,$,QA)}}Q.isString(T)||(T=T?"include":"omit");const cA=i&&"credentials"in e.prototype,hA={...lA,signal:Z,method:w.toUpperCase(),headers:O.normalize().toJSON(),body:m,duplex:"half",credentials:cA?T:void 0};S=i&&new e(f,hA);let EA=await(i?M(S,lA):M(f,hA));const vA=c&&(I==="stream"||I==="response");if(c&&(E||vA&&V)){const bA={};["status","statusText","headers"].forEach(BA=>{bA[BA]=EA[BA]});const q=Q.toFiniteNumber(EA.headers.get("content-length")),[$,QA]=E&&Ql(q,us(Fl(E),!0))||[];EA=new t(xl(EA.body,Sl,$,()=>{QA&&QA(),V&&V()}),bA)}I=I||"text";let UA=await u[Q.findKey(u,I)||"text"](EA,B);return!vA&&V&&V(),await new Promise((bA,q)=>{bl(bA,q,{data:UA,headers:ue.from(EA.headers),status:EA.status,statusText:EA.statusText,config:B,request:S})})}catch(cA){throw V&&V(),cA&&cA.name==="TypeError"&&/Load failed|fetch/i.test(cA.message)?Object.assign(new oA("Network Error",oA.ERR_NETWORK,B,S),{cause:cA.cause||cA}):oA.from(cA,cA&&cA.code,B,S)}}},CB=new Map,Tl=r=>{let A=r&&r.env||{};const{fetch:e,Request:t,Response:s}=A,i=[t,s,e];let n=i.length,o=n,a,l,c=CB;for(;o--;)a=i[o],l=c.get(a),l===void 0&&c.set(a,l=o?new Map:mB(A)),c=l;return l};Tl();const pn={http:P0,xhr:fB,fetch:{get:Tl}};Q.forEach(pn,(r,A)=>{if(r){try{Object.defineProperty(r,"name",{value:A})}catch{}Object.defineProperty(r,"adapterName",{value:A})}});const Ml=r=>`- ${r}`,vB=r=>Q.isFunction(r)||r===null||r===!1;function bB(r,A){r=Q.isArray(r)?r:[r];const{length:e}=r;let t,s;const i={};for(let n=0;n<e;n++){t=r[n];let o;if(s=t,!vB(t)&&(s=pn[(o=String(t)).toLowerCase()],s===void 0))throw new oA(`Unknown adapter '${o}'`);if(s&&(Q.isFunction(s)||(s=s.get(A))))break;i[o||"#"+n]=s}if(!s){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(Ml).join(`
5
- `):" "+Ml(n[0]):"as no adapter specified";throw new oA("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return s}const Dl={getAdapter:bB,adapters:pn};function wn(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new ur(null,r)}function Ol(r){return wn(r),r.headers=ue.from(r.headers),r.data=gn.call(r,r.transformRequest),["post","put","patch"].indexOf(r.method)!==-1&&r.headers.setContentType("application/x-www-form-urlencoded",!1),Dl.getAdapter(r.adapter||cr.adapter,r)(r).then(function(t){return wn(r),t.data=gn.call(r,r.transformResponse,t),t.headers=ue.from(t.headers),t},function(t){return vl(t)||(wn(r),t&&t.response&&(t.response.data=gn.call(r,r.transformResponse,t.response),t.response.headers=ue.from(t.response.headers))),Promise.reject(t)})}const kl="1.13.4",ds={};["object","boolean","number","function","string","symbol"].forEach((r,A)=>{ds[r]=function(t){return typeof t===r||"a"+(A<1?"n ":" ")+r}});const _l={};ds.transitional=function(A,e,t){function s(i,n){return"[Axios v"+kl+"] Transitional option '"+i+"'"+n+(t?". "+t:"")}return(i,n,o)=>{if(A===!1)throw new oA(s(n," has been removed"+(e?" in "+e:"")),oA.ERR_DEPRECATED);return e&&!_l[n]&&(_l[n]=!0,console.warn(s(n," has been deprecated since v"+e+" and will be removed in the near future"))),A?A(i,n,o):!0}},ds.spelling=function(A){return(e,t)=>(console.warn(`${t} is likely a misspelling of ${A}`),!0)};function QB(r,A,e){if(typeof r!="object")throw new oA("options must be an object",oA.ERR_BAD_OPTION_VALUE);const t=Object.keys(r);let s=t.length;for(;s-- >0;){const i=t[s],n=A[i];if(n){const o=r[i],a=o===void 0||n(o,i,r);if(a!==!0)throw new oA("option "+i+" must be "+a,oA.ERR_BAD_OPTION_VALUE);continue}if(e!==!0)throw new oA("Unknown option "+i,oA.ERR_BAD_OPTION)}}const Bs={assertOptions:QB,validators:ds},Te=Bs.validators;let Ct=class{constructor(A){this.defaults=A||{},this.interceptors={request:new pl,response:new pl}}async request(A,e){try{return await this._request(A,e)}catch(t){if(t instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const i=s.stack?s.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:s,headers:i}=e;t!==void 0&&Bs.assertOptions(t,{silentJSONParsing:Te.transitional(Te.boolean),forcedJSONParsing:Te.transitional(Te.boolean),clarifyTimeoutError:Te.transitional(Te.boolean)},!1),s!=null&&(Q.isFunction(s)?e.paramsSerializer={serialize:s}:Bs.assertOptions(s,{encode:Te.function,serialize:Te.function},!0)),e.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),Bs.assertOptions(e,{baseUrl:Te.spelling("baseURL"),withXsrfToken:Te.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let n=i&&Q.merge(i.common,i[e.method]);i&&Q.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){typeof f.runWhen=="function"&&f.runWhen(e)===!1||(a=a&&f.synchronous,o.unshift(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(w){f.call(this,w);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=yl(A.baseURL,A.url,A.allowAbsoluteUrls);return gl(e,A.params,A.paramsSerializer)}};Q.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}))}}),Q.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 FB=class Su{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(s=>{if(!t._listeners)return;let i=t._listeners.length;for(;i-- >0;)t._listeners[i](s);t._listeners=null}),this.promise.then=s=>{let i;const n=new Promise(o=>{t.subscribe(o),i=o}).then(s);return n.cancel=function(){t.unsubscribe(i)},n},A(function(i,n,o){t.reason||(t.reason=new ur(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 Su(function(s){A=s}),cancel:A}}};function yB(r){return function(e){return r.apply(null,e)}}function UB(r){return Q.isObject(r)&&r.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(([r,A])=>{mn[A]=r});function Nl(r){const A=new Ct(r),e=rl(Ct.prototype.request,A);return Q.extend(e,Ct.prototype,A,{allOwnKeys:!0}),Q.extend(e,A,null,{allOwnKeys:!0}),e.create=function(s){return Nl(mt(r,s))},e}const HA=Nl(cr);HA.Axios=Ct,HA.CanceledError=ur,HA.CancelToken=FB,HA.isCancel=vl,HA.VERSION=kl,HA.toFormData=cs,HA.AxiosError=oA,HA.Cancel=HA.CanceledError,HA.all=function(A){return Promise.all(A)},HA.spread=yB,HA.isAxiosError=UB,HA.mergeConfig=mt,HA.AxiosHeaders=ue,HA.formToJSON=r=>ml(Q.isHTMLForm(r)?new FormData(r):r),HA.getAdapter=Dl.getAdapter,HA.HttpStatusCode=mn,HA.default=HA;const{Axios:Nv,AxiosError:Kv,CanceledError:Vv,isCancel:Pv,CancelToken:Gv,VERSION:Rv,all:Wv,Cancel:zv,isAxiosError:Xv,spread:Jv,toFormData:Zv,AxiosHeaders:Yv,HttpStatusCode:qv,formToJSON:$v,getAdapter:jv,mergeConfig:Ab}=HA,Me=Object.create(null);Me.open="0",Me.close="1",Me.ping="2",Me.pong="3",Me.message="4",Me.upgrade="5",Me.noop="6";const gs=Object.create(null);Object.keys(Me).forEach(r=>{gs[Me[r]]=r});const Cn={type:"error",data:"parser error"},Kl=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Vl=typeof ArrayBuffer=="function",Pl=r=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(r):r&&r.buffer instanceof ArrayBuffer,vn=({type:r,data:A},e,t)=>Kl&&A instanceof Blob?e?t(A):Gl(A,t):Vl&&(A instanceof ArrayBuffer||Pl(A))?e?t(A):Gl(new Blob([A]),t):t(Me[r]+(A||"")),Gl=(r,A)=>{const e=new FileReader;return e.onload=function(){const t=e.result.split(",")[1];A("b"+(t||""))},e.readAsDataURL(r)};function Rl(r){return r instanceof Uint8Array?r:r instanceof ArrayBuffer?new Uint8Array(r):new Uint8Array(r.buffer,r.byteOffset,r.byteLength)}let bn;function EB(r,A){if(Kl&&r.data instanceof Blob)return r.data.arrayBuffer().then(Rl).then(A);if(Vl&&(r.data instanceof ArrayBuffer||Pl(r.data)))return A(Rl(r.data));vn(r,!1,e=>{bn||(bn=new TextEncoder),A(bn.encode(e))})}const Wl="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",fr=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let r=0;r<Wl.length;r++)fr[Wl.charCodeAt(r)]=r;const xB=r=>{let A=r.length*.75,e=r.length,t,s=0,i,n,o,a;r[r.length-1]==="="&&(A--,r[r.length-2]==="="&&A--);const l=new ArrayBuffer(A),c=new Uint8Array(l);for(t=0;t<e;t+=4)i=fr[r.charCodeAt(t)],n=fr[r.charCodeAt(t+1)],o=fr[r.charCodeAt(t+2)],a=fr[r.charCodeAt(t+3)],c[s++]=i<<2|n>>4,c[s++]=(n&15)<<4|o>>2,c[s++]=(o&3)<<6|a&63;return l},SB=typeof ArrayBuffer=="function",Qn=(r,A)=>{if(typeof r!="string")return{type:"message",data:zl(r,A)};const e=r.charAt(0);return e==="b"?{type:"message",data:HB(r.substring(1),A)}:gs[e]?r.length>1?{type:gs[e],data:r.substring(1)}:{type:gs[e]}:Cn},HB=(r,A)=>{if(SB){const e=xB(r);return zl(e,A)}else return{base64:!0,data:r}},zl=(r,A)=>A==="blob"?r instanceof Blob?r:new Blob([r]):r instanceof ArrayBuffer?r:r.buffer,Xl="",LB=(r,A)=>{const e=r.length,t=new Array(e);let s=0;r.forEach((i,n)=>{vn(i,!1,o=>{t[n]=o,++s===e&&A(t.join(Xl))})})},IB=(r,A)=>{const e=r.split(Xl),t=[];for(let s=0;s<e.length;s++){const i=Qn(e[s],A);if(t.push(i),i.type==="error")break}return t};function TB(){return new TransformStream({transform(r,A){EB(r,e=>{const t=e.length;let s;if(t<126)s=new Uint8Array(1),new DataView(s.buffer).setUint8(0,t);else if(t<65536){s=new Uint8Array(3);const i=new DataView(s.buffer);i.setUint8(0,126),i.setUint16(1,t)}else{s=new Uint8Array(9);const i=new DataView(s.buffer);i.setUint8(0,127),i.setBigUint64(1,BigInt(t))}r.data&&typeof r.data!="string"&&(s[0]|=128),A.enqueue(s),A.enqueue(e)})}})}let Fn;function ps(r){return r.reduce((A,e)=>A+e.length,0)}function ws(r,A){if(r[0].length===A)return r.shift();const e=new Uint8Array(A);let t=0;for(let s=0;s<A;s++)e[s]=r[0][t++],t===r[0].length&&(r.shift(),t=0);return r.length&&t<r[0].length&&(r[0]=r[0].slice(t)),e}function MB(r,A){Fn||(Fn=new TextDecoder);const e=[];let t=0,s=-1,i=!1;return new TransformStream({transform(n,o){for(e.push(n);;){if(t===0){if(ps(e)<1)break;const a=ws(e,1);i=(a[0]&128)===128,s=a[0]&127,s<126?t=3:s===126?t=1:t=2}else if(t===1){if(ps(e)<2)break;const a=ws(e,2);s=new DataView(a.buffer,a.byteOffset,a.length).getUint16(0),t=3}else if(t===2){if(ps(e)<8)break;const a=ws(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}s=c*Math.pow(2,32)+l.getUint32(4),t=3}else{if(ps(e)<s)break;const a=ws(e,s);o.enqueue(Qn(i?a:Fn.decode(a),A)),t=0}if(s===0||s>r){o.enqueue(Cn);break}}}})}const Jl=4;function GA(r){if(r)return DB(r)}function DB(r){for(var A in GA.prototype)r[A]=GA.prototype[A];return r}GA.prototype.on=GA.prototype.addEventListener=function(r,A){return this._callbacks=this._callbacks||{},(this._callbacks["$"+r]=this._callbacks["$"+r]||[]).push(A),this},GA.prototype.once=function(r,A){function e(){this.off(r,e),A.apply(this,arguments)}return e.fn=A,this.on(r,e),this},GA.prototype.off=GA.prototype.removeListener=GA.prototype.removeAllListeners=GA.prototype.removeEventListener=function(r,A){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var e=this._callbacks["$"+r];if(!e)return this;if(arguments.length==1)return delete this._callbacks["$"+r],this;for(var t,s=0;s<e.length;s++)if(t=e[s],t===A||t.fn===A){e.splice(s,1);break}return e.length===0&&delete this._callbacks["$"+r],this},GA.prototype.emit=function(r){this._callbacks=this._callbacks||{};for(var A=new Array(arguments.length-1),e=this._callbacks["$"+r],t=1;t<arguments.length;t++)A[t-1]=arguments[t];if(e){e=e.slice(0);for(var t=0,s=e.length;t<s;++t)e[t].apply(this,A)}return this},GA.prototype.emitReserved=GA.prototype.emit,GA.prototype.listeners=function(r){return this._callbacks=this._callbacks||{},this._callbacks["$"+r]||[]},GA.prototype.hasListeners=function(r){return!!this.listeners(r).length};const ms=typeof Promise=="function"&&typeof Promise.resolve=="function"?A=>Promise.resolve().then(A):(A,e)=>e(A,0),Ce=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),OB="arraybuffer";function eb(){}function Zl(r,...A){return A.reduce((e,t)=>(r.hasOwnProperty(t)&&(e[t]=r[t]),e),{})}const kB=Ce.setTimeout,_B=Ce.clearTimeout;function Cs(r,A){A.useNativeTimers?(r.setTimeoutFn=kB.bind(Ce),r.clearTimeoutFn=_B.bind(Ce)):(r.setTimeoutFn=Ce.setTimeout.bind(Ce),r.clearTimeoutFn=Ce.clearTimeout.bind(Ce))}const NB=1.33;function KB(r){return typeof r=="string"?VB(r):Math.ceil((r.byteLength||r.size)*NB)}function VB(r){let A=0,e=0;for(let t=0,s=r.length;t<s;t++)A=r.charCodeAt(t),A<128?e+=1:A<2048?e+=2:A<55296||A>=57344?e+=3:(t++,e+=4);return e}function Yl(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function PB(r){let A="";for(let e in r)r.hasOwnProperty(e)&&(A.length&&(A+="&"),A+=encodeURIComponent(e)+"="+encodeURIComponent(r[e]));return A}function GB(r){let A={},e=r.split("&");for(let t=0,s=e.length;t<s;t++){let i=e[t].split("=");A[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return A}class RB extends Error{constructor(A,e,t){super(A),this.description=e,this.context=t,this.type="TransportError"}}class yn extends GA{constructor(A){super(),this.writable=!1,Cs(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 RB(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=PB(A);return e.length?"?"+e:""}}class WB extends yn{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)};IB(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,LB(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]=Yl()),!this.supportsBinary&&!e.sid&&(e.b64=1),this.createUri(A,e)}}let ql=!1;try{ql=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const zB=ql;function XB(){}class JB extends WB{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",(s,i)=>{this.onError("xhr post error",s,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 De extends GA{constructor(A,e,t){super(),this.createRequest=A,Cs(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=Zl(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 s in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(s)&&t.setRequestHeader(s,this._opts.extraHeaders[s])}}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 s;t.readyState===3&&((s=this._opts.cookieJar)===null||s===void 0||s.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(s){this.setTimeoutFn(()=>{this._onError(s)},0);return}typeof document<"u"&&(this._index=De.requestsCount++,De.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=XB,A)try{this._xhr.abort()}catch{}typeof document<"u"&&delete De.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(De.requestsCount=0,De.requests={},typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",$l);else if(typeof addEventListener=="function"){const r="onpagehide"in Ce?"pagehide":"unload";addEventListener(r,$l,!1)}}function $l(){for(let r in De.requests)De.requests.hasOwnProperty(r)&&De.requests[r].abort()}const ZB=(function(){const r=jl({xdomain:!1});return r&&r.responseType!==null})();class YB extends JB{constructor(A){super(A);const e=A&&A.forceBase64;this.supportsBinary=ZB&&!e}request(A={}){return Object.assign(A,{xd:this.xd},this.opts),new De(jl,this.uri(),A)}}function jl(r){const A=r.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!A||zB))return new XMLHttpRequest}catch{}if(!A)try{return new Ce[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const Ac=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class qB extends yn{get name(){return"websocket"}doOpen(){const A=this.uri(),e=this.opts.protocols,t=Ac?{}:Zl(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(s){return this.emitReserved("error",s)}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],s=e===A.length-1;vn(t,this.supportsBinary,i=>{try{this.doWrite(t,i)}catch{}s&&ms(()=>{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]=Yl()),this.supportsBinary||(e.b64=1),this.createUri(A,e)}}const Un=Ce.WebSocket||Ce.MozWebSocket;class $B extends qB{createSocket(A,e,t){return Ac?new Un(A,e,t):e?new Un(A,e):new Un(A)}doWrite(A,e){this.ws.send(e)}}class jB extends yn{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=MB(Number.MAX_SAFE_INTEGER,this.socket.binaryType),t=A.readable.pipeThrough(e).getReader(),s=TB();s.readable.pipeTo(A.writable),this._writer=s.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],s=e===A.length-1;this._writer.write(t).then(()=>{s&&ms(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var A;(A=this._transport)===null||A===void 0||A.close()}}const Ag={websocket:$B,webtransport:jB,polling:YB},eg=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,tg=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function En(r){if(r.length>8e3)throw"URI too long";const A=r,e=r.indexOf("["),t=r.indexOf("]");e!=-1&&t!=-1&&(r=r.substring(0,e)+r.substring(e,t).replace(/:/g,";")+r.substring(t,r.length));let s=eg.exec(r||""),i={},n=14;for(;n--;)i[tg[n]]=s[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=rg(i,i.path),i.queryKey=sg(i,i.query),i}function rg(r,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 sg(r,A){const e={};return A.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(t,s,i){s&&(e[s]=i)}),e}const xn=typeof addEventListener=="function"&&typeof removeEventListener=="function",vs=[];xn&&addEventListener("offline",()=>{vs.forEach(r=>r())},!1);class tt extends GA{constructor(A,e){if(super(),this.binaryType=OB,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);Cs(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 s=t.prototype.name;this.transports.push(s),this._transportsByName[s]=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=GB(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"})},vs.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(A){const e=Object.assign({},this.opts.query);e.EIO=Jl,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&&tt.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",tt.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 s=this.writeBuffer[t].data;if(s&&(e+=KB(s)),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,ms(()=>{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,s){if(typeof e=="function"&&(s=e,e=void 0),typeof t=="function"&&(s=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),s&&this.once("flush",s),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(tt.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=vs.indexOf(this._offlineEventListener);t!==-1&&vs.splice(t,1)}this.readyState="closed",this.id=null,this.emitReserved("close",A,e),this.writeBuffer=[],this._prevBufferLen=0}}}tt.protocol=Jl;class ig extends tt{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;tt.priorWebsocketSuccess=!1;const s=()=>{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;tt.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",s),e.removeListener("error",n),e.removeListener("close",o),this.off("close",a),this.off("upgrading",l)};e.once("open",s),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 ng=class extends ig{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(s=>Ag[s]).filter(s=>!!s)),super(A,t)}};function og(r,A="",e){let t=r;e=e||typeof location<"u"&&location,r==null&&(r=e.protocol+"//"+e.host),typeof r=="string"&&(r.charAt(0)==="/"&&(r.charAt(1)==="/"?r=e.protocol+r:r=e.host+r),/^(https?|wss?):\/\//.test(r)||(typeof e<"u"?r=e.protocol+"//"+r:r="https://"+r),t=En(r)),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 ag=typeof ArrayBuffer=="function",lg=r=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(r):r.buffer instanceof ArrayBuffer,ec=Object.prototype.toString,cg=typeof Blob=="function"||typeof Blob<"u"&&ec.call(Blob)==="[object BlobConstructor]",hg=typeof File=="function"||typeof File<"u"&&ec.call(File)==="[object FileConstructor]";function Sn(r){return ag&&(r instanceof ArrayBuffer||lg(r))||cg&&r instanceof Blob||hg&&r instanceof File}function bs(r,A){if(!r||typeof r!="object")return!1;if(Array.isArray(r)){for(let e=0,t=r.length;e<t;e++)if(bs(r[e]))return!0;return!1}if(Sn(r))return!0;if(r.toJSON&&typeof r.toJSON=="function"&&arguments.length===1)return bs(r.toJSON(),!0);for(const e in r)if(Object.prototype.hasOwnProperty.call(r,e)&&bs(r[e]))return!0;return!1}function ug(r){const A=[],e=r.data,t=r;return t.data=Hn(e,A),t.attachments=A.length,{packet:t,buffers:A}}function Hn(r,A){if(!r)return r;if(Sn(r)){const e={_placeholder:!0,num:A.length};return A.push(r),e}else if(Array.isArray(r)){const e=new Array(r.length);for(let t=0;t<r.length;t++)e[t]=Hn(r[t],A);return e}else if(typeof r=="object"&&!(r instanceof Date)){const e={};for(const t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=Hn(r[t],A));return e}return r}function fg(r,A){return r.data=Ln(r.data,A),delete r.attachments,r}function Ln(r,A){if(!r)return r;if(r&&r._placeholder===!0){if(typeof r.num=="number"&&r.num>=0&&r.num<A.length)return A[r.num];throw new Error("illegal attachments")}else if(Array.isArray(r))for(let e=0;e<r.length;e++)r[e]=Ln(r[e],A);else if(typeof r=="object")for(const e in r)Object.prototype.hasOwnProperty.call(r,e)&&(r[e]=Ln(r[e],A));return r}const dg=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var CA;(function(r){r[r.CONNECT=0]="CONNECT",r[r.DISCONNECT=1]="DISCONNECT",r[r.EVENT=2]="EVENT",r[r.ACK=3]="ACK",r[r.CONNECT_ERROR=4]="CONNECT_ERROR",r[r.BINARY_EVENT=5]="BINARY_EVENT",r[r.BINARY_ACK=6]="BINARY_ACK"})(CA||(CA={}));class Bg{constructor(A){this.replacer=A}encode(A){return(A.type===CA.EVENT||A.type===CA.ACK)&&bs(A)?this.encodeAsBinary({type:A.type===CA.EVENT?CA.BINARY_EVENT:CA.BINARY_ACK,nsp:A.nsp,data:A.data,id:A.id}):[this.encodeAsString(A)]}encodeAsString(A){let e=""+A.type;return(A.type===CA.BINARY_EVENT||A.type===CA.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=ug(A),t=this.encodeAsString(e.packet),s=e.buffers;return s.unshift(t),s}}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===CA.BINARY_EVENT;t||e.type===CA.BINARY_ACK?(e.type=t?CA.EVENT:CA.ACK,this.reconstructor=new gg(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(CA[t.type]===void 0)throw new Error("unknown packet type "+t.type);if(t.type===CA.BINARY_EVENT||t.type===CA.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 s=A.charAt(e+1);if(s!==""&&Number(s)==s){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 CA.CONNECT:return tc(e);case CA.DISCONNECT:return e===void 0;case CA.CONNECT_ERROR:return typeof e=="string"||tc(e);case CA.EVENT:case CA.BINARY_EVENT:return Array.isArray(e)&&(typeof e[0]=="number"||typeof e[0]=="string"&&dg.indexOf(e[0])===-1);case CA.ACK:case CA.BINARY_ACK:return Array.isArray(e)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class gg{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=fg(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function tc(r){return Object.prototype.toString.call(r)==="[object Object]"}const pg=Object.freeze(Object.defineProperty({__proto__:null,Decoder:In,Encoder:Bg,get PacketType(){return CA}},Symbol.toStringTag,{value:"Module"}));function xe(r,A,e){return r.on(A,e),function(){r.off(A,e)}}const wg=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class rc 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=[xe(A,"open",this.onopen.bind(this)),xe(A,"packet",this.onpacket.bind(this)),xe(A,"error",this.onerror.bind(this)),xe(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,s,i;if(wg.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:CA.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=(s=(t=this.io.engine)===null||t===void 0?void 0:t.transport)===null||s===void 0?void 0:s.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 s=(t=this.flags.timeout)!==null&&t!==void 0?t:this._opts.ackTimeout;if(s===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"))},s),n=(...o)=>{this.io.clearTimeoutFn(i),e.apply(this,o)};n.withError=!0,this.acks[A]=n}emitWithAck(A,...e){return new Promise((t,s)=>{const i=(n,o)=>n?s(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((s,...i)=>(this._queue[0],s!==null?t.tryCount>this._opts.retries&&(this._queue.shift(),e&&e(s)):(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:CA.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 CA.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 CA.EVENT:case CA.BINARY_EVENT:this.onevent(A);break;case CA.ACK:case CA.BINARY_ACK:this.onack(A);break;case CA.DISCONNECT:this.ondisconnect();break;case CA.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(...s){t||(t=!0,e.packet({type:CA.ACK,id:A,data:s}))}}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:CA.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(r){r=r||{},this.ms=r.min||100,this.max=r.max||1e4,this.factor=r.factor||2,this.jitter=r.jitter>0&&r.jitter<=1?r.jitter:0,this.attempts=0}Ot.prototype.duration=function(){var r=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var A=Math.random(),e=Math.floor(A*this.jitter*r);r=(Math.floor(A*10)&1)==0?r-e:r+e}return Math.min(r,this.max)|0},Ot.prototype.reset=function(){this.attempts=0},Ot.prototype.setMin=function(r){this.ms=r},Ot.prototype.setMax=function(r){this.max=r},Ot.prototype.setJitter=function(r){this.jitter=r};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,Cs(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 s=e.parser||pg;this.encoder=new s.Encoder,this.decoder=new s.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 ng(this.uri,this.opts);const e=this.engine,t=this;this._readyState="opening",this.skipReconnect=!1;const s=xe(e,"open",function(){t.onopen(),A&&A()}),i=o=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",o),A?A(o):this.maybeReconnectOnOpen()},n=xe(e,"error",i);if(this._timeout!==!1){const o=this._timeout,a=this.setTimeoutFn(()=>{s(),i(new Error("timeout")),e.close()},o);this.opts.autoUnref&&a.unref(),this.subs.push(()=>{this.clearTimeoutFn(a)})}return this.subs.push(s),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(xe(A,"ping",this.onping.bind(this)),xe(A,"data",this.ondata.bind(this)),xe(A,"error",this.onerror.bind(this)),xe(A,"close",this.onclose.bind(this)),xe(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){ms(()=>{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 rc(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(s=>{s?(A._reconnecting=!1,A.reconnect(),this.emitReserved("reconnect_error",s)):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 dr={};function Qs(r,A){typeof r=="object"&&(A=r,r=void 0),A=A||{};const e=og(r,A.path||"/socket.io"),t=e.source,s=e.id,i=e.path,n=dr[s]&&i in dr[s].nsps,o=A.forceNew||A["force new connection"]||A.multiplex===!1||n;let a;return o?a=new Tn(t,A):(dr[s]||(dr[s]=new Tn(t,A)),a=dr[s]),e.query&&!A.query&&(A.query=e.queryKey),a.socket(e.path,A)}Object.assign(Qs,{Manager:Tn,Socket:rc,io:Qs,connect:Qs});let fe="http://localhost:8000";function sc(r){if(!r){console.warn("⚠️ [SOCKET DEBUG] setBaseUrl called with empty URL");return}if(r!==fe){const A=fe;fe=r,console.log(`🔄 [SOCKET DEBUG] SocketService: Changing baseUrl from ${A} to ${r}`),_A&&(console.log("🔄 [SOCKET DEBUG] Disconnecting old socket..."),_A.disconnect(),_A.removeAllListeners(),_A=null)}else console.log(`✅ [SOCKET DEBUG] BaseUrl already set to ${r}, no change needed`)}let _A=null;function mg(){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=Qs(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 r=_A?.io?.uri||_A?.io?.opts?.host||null;return!_A||_A.io&&r&&r!==fe?(_A&&(console.log("🔄 [SOCKET DEBUG] Recreating socket:",{oldUri:r,newBaseUrl:fe,wasConnected:_A.connected,reason:"baseUrl changed"}),_A.disconnect(),_A.removeAllListeners(),_A=null),console.log("🔧 [SOCKET DEBUG] Creating new socket instance for MT5 backend:",fe),_A=mg()):_A.connected?console.log("✅ [SOCKET DEBUG] Reusing existing connected socket:",{socketId:_A.id,connected:_A.connected,baseUrl:fe,uri:r}):console.log("⏳ [SOCKET DEBUG] Socket exists but not connected, waiting...",{socketId:_A.id,baseUrl:fe}),_A}function Cg(r,A){const e=Mn();return e.on(r,A),()=>e.off(r,A)}function vg(r,A){_A&&_A.off(r,A)}function bg(r,A){Mn().emit(r,A)}function Qg(){return _A?_A.connected?"connected":"connecting":"disconnected"}const Fs={getSocket:Mn,on:Cg,off:vg,emit:bg,getStatus:Qg,setBaseUrl:sc},ic=b.createContext(),ne=()=>{const r=b.useContext(ic);if(!r)throw new Error("useTrading must be used within TradingProvider");return r},Fg=({children:r,baseUrl:A,endpoints:e})=>{const t=A??(typeof{url:typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:bi&&bi.tagName.toUpperCase()==="SCRIPT"&&bi.src||new URL("chart-sdk.umd.js",document.baseURI).href}<"u"&&"https://api-chart-sdk.e-volvo.io")??"http://localhost:8000",i={...{candles:"/api/chart/candles",symbols:"/api/symbols",trades:"/api/trades",account:"/api/user/account"},...e},n=e?.params||{},[o,a]=b.useState("CADJPY"),[l,c]=b.useState("M1"),[u,d]=b.useState([]),[g,B]=b.useState(!0),[f,w]=b.useState([]),[m,p]=b.useState(!1),[v,y]=b.useState(1e5),[E,U]=b.useState(null),[I,O]=b.useState([]),[T,lA]=b.useState(!0),[M,Z]=b.useState(!1),[S,V]=b.useState(!0),[X,cA]=b.useState("candles"),[hA,EA]=b.useState(!1),[vA,UA]=b.useState("dark"),bA=b.useRef(null);b.useEffect(()=>{Fs.setBaseUrl(t)},[t]);const q=b.useRef(new Map),$=b.useRef(null),QA=1e3,BA=b.useCallback(async()=>{try{const k=localStorage.getItem("token");if(!k){console.log("⚠️ No token, skipping orders fetch");return}p(!0);let _=await HA.get(`${t}${i.trades}`,{headers:{Authorization:`Bearer ${k}`}});const AA=_.data?.orphanTradeIds;if(Array.isArray(AA)&&AA.length>0&&(await HA.get(`${t}${i.trades}`,{headers:{Authorization:`Bearer ${k}`},params:{claimTradeId:AA[0]}}),_=await HA.get(`${t}/api/trades`,{headers:{Authorization:`Bearer ${k}`}})),_.data&&_.data.data){const eA=_.data.data.map(P=>({id:P.id,ticket:P.ticket,symbol:P.symbol,type:P.type,volume:P.volume,price:P.price,stopLoss:P.stopLoss,takeProfit:P.takeProfit,comment:P.comment||"",status:P.status,swap:P.swap||0,profit:P.profit||0,profitCurrency:"USD",time:new Date(P.openAt).toLocaleTimeString(),openAt:P.openAt,closeAt:P.closeAt}));w(eA)}else w([])}catch(k){console.error("❌ Error fetching orders:",k.response?.data||k.message),w([])}finally{p(!1)}},[t]),JA=b.useCallback((k,_)=>!_||!k.price||isNaN(_)||isNaN(k.price)?k.profit||0:(k.type==="BUY"?_-k.price:k.price-_)*k.volume,[]),xA=b.useCallback(async()=>{try{const k=localStorage.getItem("token");if(!k){console.log("⚠️ No token, skipping balance fetch");return}const _=await HA.get(`${t}${i.account}`,{headers:{Authorization:`Bearer ${k}`}});if(_.data&&_.data.data){const AA=parseFloat(_.data.data.balance);isNaN(AA)||y(AA)}}catch(k){console.error("❌ Error fetching user balance:",k.response?.data||k.message)}},[t]),Ge=b.useMemo(()=>{const k=v,_=f.reduce((TA,NA)=>TA+NA.volume*NA.price*.01,0),AA=f.reduce((TA,NA)=>{const ZA=u.find(le=>le.symbol===NA.symbol);if(ZA){const le=NA.type==="BUY"?parseFloat(ZA.bid||0):parseFloat(ZA.ask||0);if(le&&le>0&&!isNaN(le))return TA+JA(NA,le)}return TA+(NA.profit||0)},0),eA=k+AA,P=eA-_,j=_>0?eA/_*100:0;return{balance:k,equity:eA,margin:_,freeMargin:P,level:j.toFixed(2)}},[f,u,v,JA]);b.useEffect(()=>{localStorage.getItem("token")&&(BA(),xA())},[BA,xA]),b.useEffect(()=>{(async()=>{try{B(!0);const _=i.symbols.includes("?")?`${t}${i.symbols}`:`${t}${i.symbols}`,AA=await HA.get(_);let eA=[];Array.isArray(AA.data)?eA=AA.data:AA.data&&AA.data.data&&Array.isArray(AA.data.data)?eA=AA.data.data:AA.data&&AA.data.prices&&Array.isArray(AA.data.prices)?eA=AA.data.prices:AA.data&&Array.isArray(AA.data)&&(eA=AA.data);const P=eA.map(j=>j.symbol&&(j.bid!==void 0||j.price!==void 0)?{symbol:j.symbol,bid:j.bid??j.price??0,ask:j.ask??j.price??0,change:j.change??0}:j);P.length>0?(d(P),P.find(TA=>TA.symbol===o)||a(P[0].symbol)):d([])}catch(_){console.error("❌ Error fetching symbols:",_.response?.data||_.message),d([])}finally{B(!1)}})()},[t,i.symbols]);const Ut=b.useCallback(()=>{const k=q.current;if(k.size===0)return;const _=new Map(k);k.clear(),d(AA=>AA.map(eA=>{const P=_.get(eA.symbol);return P?{...eA,...P}:eA})),w(AA=>{let eA=!1;const P=AA.map(j=>{const TA=_.get(j.symbol);if(!TA)return j;const NA=j.type==="BUY"?parseFloat(TA.bid||0):parseFloat(TA.ask||0);if(!NA||isNaN(NA)||NA<=0)return j;const ZA=JA(j,NA);return ZA===j.profit?j:(eA=!0,{...j,profit:ZA})});return eA?P:AA})},[JA]);b.useEffect(()=>{bA.current||(bA.current=Fs.getSocket());const k=bA.current,_=()=>console.log("✅ TradingContext: Connected"),AA=()=>console.log("⚠️ TradingContext: Disconnected"),eA=j=>{j?.symbol&&(q.current.set(j.symbol,j),$.current||($.current=setTimeout(()=>{$.current=null,Ut()},QA)))},P=async j=>{if(console.log("🔔 Trade closed event received:",j),!!j){if(j.newBalance!==void 0){const TA=parseFloat(j.newBalance);isNaN(TA)||y(TA)}if(window.notify){const TA=j.profitLoss||j.profit||0,NA=TA>=0?`+${TA.toFixed(2)}`:TA.toFixed(2),ZA=j.symbol||"Trade",le=j.reason||"Closed";window.notify(`Trade Closed: ${le} | ${ZA} | P/L: ${NA} USD`,TA>=0?"success":"error")}j.tradeId&&w(TA=>TA.filter(NA=>NA.id!==j.tradeId)),await BA(),await xA()}};return k.on("connect",_),k.on("disconnect",AA),k.on("priceUpdate",eA),k.on("tradeClosed",P),()=>{k.off("connect",_),k.off("disconnect",AA),k.off("priceUpdate",eA),k.off("tradeClosed",P),$.current&&(clearTimeout($.current),$.current=null),q.current.clear()}},[Ut,BA,xA]),b.useEffect(()=>{try{const k=document.documentElement;if(!k)return;k.dataset.theme=vA}catch{}},[vA]);const kr=b.useMemo(()=>u.find(k=>k.symbol===o)||{bid:"0.00000",ask:"0.00000",change:0},[u,o]),je=b.useMemo(()=>({selectedSymbol:o,setSelectedSymbol:a,selectedTimeframe:l,setSelectedTimeframe:c,symbols:u,setSymbols:d,symbolsLoading:g,orders:f,setOrders:w,ordersLoading:m,fetchOrders:BA,fetchUserBalance:xA,userBalance:v,setUserBalance:y,accountSummary:Ge,currentSymbolData:kr,activeTool:E,setActiveTool:U,chartObjects:I,setChartObjects:O,showGrid:T,setShowGrid:lA,snapToGrid:M,setSnapToGrid:Z,drawingsVisible:S,setDrawingsVisible:V,chartType:X,setChartType:cA,chartLocked:hA,setChartLocked:EA,theme:vA,setTheme:UA,baseUrl:t,endpoints:i,endpointParams:n}),[o,l,u,g,f,m,BA,xA,v,Ge,kr,E,I,T,M,S,X,hA,vA,t,i,n]);return h.jsx(ic.Provider,{value:je,children:r})},yg=({bidPrice:r,askPrice:A,onBuyClick:e,onSellClick:t})=>{const s=()=>{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:r||"0.00000"})]})}),h.jsx("button",{onClick:s,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"})]})})]})},nc=({isOpen:r,onClose:A,orderType:e,bidPrice:t,askPrice:s})=>{const{selectedSymbol:i,selectedTimeframe:n,setOrders:o,symbols:a,fetchOrders:l,theme:c,baseUrl:u,endpoints:d}=ne(),g=c==="light",[B,f]=b.useState("0.01"),[w,m]=b.useState(""),[p,v]=b.useState(""),[y,E]=b.useState(""),[U,I]=b.useState(!1),[O,T]=b.useState(null),[lA,M]=b.useState(""),[Z,S]=b.useState(e||"BUY"),[V,X]=b.useState(parseFloat(t)||0),[cA,hA]=b.useState(parseFloat(s)||0),[EA,vA]=b.useState("text-white"),[UA,bA]=b.useState("text-white"),q=b.useRef(parseFloat(t)||0),$=b.useRef(parseFloat(s)||0);b.useEffect(()=>{if(!r)return;const k=Fs.getSocket(),_=eA=>{if(!(!eA||!eA.symbol)&&eA.symbol.toUpperCase()===i?.toUpperCase()){const P=parseFloat(eA.bid)||0,j=parseFloat(eA.ask)||0;P>0&&(P>q.current?(vA("text-green-400"),setTimeout(()=>vA("text-white"),500)):P<q.current&&q.current>0&&(vA("text-red-400"),setTimeout(()=>vA("text-white"),500)),X(P),q.current=P),j>0&&(j>$.current?(bA("text-green-400"),setTimeout(()=>bA("text-white"),500)):j<$.current&&$.current>0&&(bA("text-red-400"),setTimeout(()=>bA("text-white"),500)),hA(j),$.current=j)}};k.on("priceUpdate",_);const AA=a.find(eA=>eA.symbol===i);if(AA){const eA=parseFloat(AA.bid)||0,P=parseFloat(AA.ask)||0;eA>0&&(X(eA),q.current=eA),P>0&&(hA(P),$.current=P)}return()=>{k.off("priceUpdate",_)}},[r,i,a]),b.useEffect(()=>{if(r){f("0.01"),m(""),v(""),E(""),M(""),S(e||"BUY");const k=parseFloat(t)||0,_=parseFloat(s)||0;k>0&&(X(k),q.current=k),_>0&&(hA(_),$.current=_)}},[r,e,t,s]);const QA=V||0,BA=cA||0,JA=k=>{const _=parseFloat(B)||.01,AA=Math.max(.01,_+k);f(AA.toFixed(2))},xA=k=>{const _=parseFloat(w)||0,AA=parseFloat(Z==="BUY"?cA:V)||0;if(!AA){M("Current price not available. Please wait...");return}let eA=_+k;Z==="BUY"?eA=Math.max(1e-5,Math.min(eA,AA-1e-5)):eA=Math.max(AA+1e-5,eA),m(eA>0?eA.toFixed(5):""),M("")},Ge=k=>{const _=parseFloat(p)||0,AA=parseFloat(Z==="BUY"?cA:V)||0;if(!AA){M("Current price not available. Please wait...");return}let eA=_+k;Z==="BUY"?eA=Math.max(AA+1e-5,eA):eA=Math.max(1e-5,Math.min(eA,AA-1e-5)),v(eA>0?eA.toFixed(5):""),M("")},Ut=async k=>{M("");const _=k||Z,AA=parseFloat(_==="BUY"?cA:V),eA=parseFloat(B),P=w?parseFloat(w):null,j=p?parseFloat(p):null;if(!eA||eA<=0||isNaN(eA)){M("Please enter a valid volume (minimum 0.01)");return}if(eA<.01){M("Volume must be at least 0.01");return}if(!AA||AA<=0||isNaN(AA)){M("Invalid price. Please refresh and try again.");return}if(P!==null&&P!==""){if(isNaN(P)||P<=0){M("Stop Loss must be a valid positive number");return}if(_==="BUY"&&P>=AA){M("Stop Loss must be below the current price for BUY orders");return}if(_==="SELL"&&P<=AA){M("Stop Loss must be above the current price for SELL orders");return}}if(j!==null&&j!==""){if(isNaN(j)||j<=0){M("Take Profit must be a valid positive number");return}if(_==="BUY"){if(j<=AA){M(`Take Profit must be above the entry price (${AA.toFixed(5)}) for BUY orders`);return}}else if(_==="SELL"&&j>=AA){M(`Take Profit must be below the entry price (${AA.toFixed(5)}) for SELL orders`);return}}S(_),T(_),I(!0);const TA=new Date,NA=TA.toLocaleTimeString(),ZA=`temp_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,le=localStorage.getItem("token");if(!le){M("Please login to place trades"),I(!1),T(null);return}const vi={symbol:i,type:_,volume:eA,price:AA,takeProfit:j,stopLoss:P,comment:y.trim()||null},_r={ticket:ZA.substring(0,8),symbol:i,type:_,volume:parseFloat(eA),price:parseFloat(AA),time:NA,stopLoss:P?parseFloat(P):null,takeProfit:j?parseFloat(j):null,swap:0,profit:0,profitCurrency:"USD",comment:y.trim()||"",id:ZA,status:"OPEN",openAt:TA.toISOString()};o&&o(pe=>[...pe,_r]),I(!1),T(null),A();const ko=u||"https://api-chart-sdk.e-volvo.io",_o=d?.trades||"/api/trades";HA.post(`${ko}${_o}`,vi,{headers:{Authorization:`Bearer ${le}`,"Content-Type":"application/json"}}).then(pe=>{if(pe.data&&pe.data.data){const C=pe.data.data.trade;o&&o(F=>F.map(x=>x.id===ZA?{...x,id:C.id,ticket:C.id.substring(0,8),time:NA,openAt:C.openAt}:x)),console.log("✅ Trade saved successfully:",C),window.notify&&window.notify(`Trade placed successfully: ${C.symbol} ${C.type}`,"success")}else{o&&o(F=>F.filter(x=>x.id!==ZA));const C=pe.data?.message||"Failed to place trade";window.notify&&window.notify(C,"error")}}).catch(pe=>{console.error("Error placing trade:",pe),o&&o(F=>F.filter(x=>x.id!==ZA));let C="Failed to place trade";if(pe.response){const F=pe.response.status,x=pe.response.data;F===400?C=x?.message||"Invalid trade data. Please check your inputs.":F===401?C="Authentication failed. Please login again.":F===404?C=x?.message||"Symbol not found. Please select a valid symbol.":F===500?C="Server error. Please try again later.":C=x?.message||`Error: ${F}`}else pe.request&&(C="Network error. Please check your internet connection.");window.notify&&window.notify(C,"error")})},je=((parseFloat(B)||0)*1e5).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2});return r?h.jsxs("div",{className:`w-full max-w-sm rounded-lg shadow-2xl flex flex-col pointer-events-auto z-30 ${g?"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 ${g?"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 ${g?"text-slate-800":"text-white"}`,children:"Market Execution"}),h.jsx("button",{className:`p-0.5 transition-colors ${g?"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 ${g?"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:[lA&&h.jsx("div",{className:"p-2 rounded-lg bg-rose-500/10 border border-rose-500/50 text-rose-400 text-xs",children:lA}),h.jsxs("div",{children:[h.jsxs("div",{className:"flex items-center justify-between mb-2",children:[h.jsx("label",{className:`text-sm font-medium ${g?"text-slate-700":"text-white"}`,children:"Volume"}),h.jsxs("span",{className:`text-sm ${g?"text-slate-700":"text-white"}`,children:[je," CAD"]})]}),h.jsxs("div",{className:"relative flex items-center",children:[h.jsx("button",{type:"button",onClick:()=>JA(-.01),className:`absolute left-1 w-8 h-8 flex items-center justify-center rounded text-sm transition-colors z-10 ${g?"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:B,onChange:k=>{f(k.target.value),M("")},className:`w-full px-10 py-2 rounded text-sm focus:outline-none focus:border-secondary text-center ${g?"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:()=>JA(.01),className:`absolute right-1 w-8 h-8 flex items-center justify-center rounded text-sm transition-colors z-10 ${g?"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 ${g?"text-slate-700":"text-white"}`,children:"Stop Loss"})}),h.jsxs("div",{className:"relative flex items-center",children:[h.jsx("button",{type:"button",onClick:()=>xA(-1e-4),className:`absolute left-1 w-8 h-8 flex items-center justify-center rounded text-sm transition-colors z-10 ${g?"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:k=>{const _=k.target.value;(_===""||/^\d*\.?\d*$/.test(_))&&(m(_),M(""))},onBlur:k=>{const _=parseFloat(k.target.value);!isNaN(_)&&_>0?m(_.toFixed(5)):k.target.value===""&&m("")},placeholder:"0.00000",className:`w-full px-10 py-2 rounded text-sm focus:outline-none focus:border-secondary text-center ${g?"bg-white border border-slate-400 text-slate-800":"bg-[#12161d] border border-slate-700 text-slate-100"}`}),h.jsx("button",{type:"button",onClick:()=>xA(1e-4),className:`absolute right-1 w-8 h-8 flex items-center justify-center rounded text-sm transition-colors z-10 ${g?"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 ${g?"text-slate-700":"text-white"}`,children:"Take Profit"})}),h.jsxs("div",{className:"relative flex items-center",children:[h.jsx("button",{type:"button",onClick:()=>Ge(-1e-4),className:`absolute left-1 w-8 h-8 flex items-center justify-center rounded text-sm transition-colors z-10 ${g?"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:p,onChange:k=>{const _=k.target.value;(_===""||/^\d*\.?\d*$/.test(_))&&(v(_),M(""))},onBlur:k=>{const _=parseFloat(k.target.value);!isNaN(_)&&_>0?v(_.toFixed(5)):k.target.value===""&&v("")},placeholder:"0.00000",className:`w-full px-10 py-2 rounded text-sm focus:outline-none focus:border-secondary text-center ${g?"bg-white border border-slate-400 text-slate-800":"bg-[#12161d] border border-slate-700 text-slate-100"}`}),h.jsx("button",{type:"button",onClick:()=>Ge(1e-4),className:`absolute right-1 w-8 h-8 flex items-center justify-center rounded text-sm transition-colors z-10 ${g?"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 ${g?"text-slate-700":"text-white"}`,children:"Comment"}),h.jsx("textarea",{value:y,onChange:k=>E(k.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 ${g?"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 ${g?"border-slate-400":"border-slate-700"}`,children:[h.jsxs("div",{className:"text-sm",children:[h.jsx("span",{className:g?"text-slate-700":"text-white",children:"Bid: "}),h.jsx("span",{className:`${EA} font-medium transition-colors duration-400`,children:QA>0?QA.toFixed(5):"---"})]}),h.jsxs("div",{className:"text-sm",children:[h.jsx("span",{className:g?"text-slate-700":"text-white",children:"Ask: "}),h.jsx("span",{className:`${UA} font-medium transition-colors duration-400`,children:BA>0?BA.toFixed(5):"---"})]})]}),h.jsxs("div",{className:"grid grid-cols-2 gap-3 pt-2",children:[h.jsx("button",{onClick:()=>Ut("SELL"),disabled:U,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:U&&O==="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:()=>Ut("BUY"),disabled:U,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:U&&O==="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(r){if(r==null)return null;if(typeof r=="number"){if(Number.isNaN(r)||!Number.isFinite(r))return null;let A;r>1e10?A=r/1e3:(r<1e9,A=r);const e=Math.floor(A);return e<946684800||e>4102444800?null:e}if(typeof r=="string"){const A=Date.parse(r);return Number.isNaN(A)?null:Math.floor(A/1e3)}if(typeof r=="object"&&"year"in r&&"month"in r&&"day"in r){const e=new Date(Date.UTC(r.year,r.month-1,r.day)).getTime();return Number.isNaN(e)?null:Math.floor(e/1e3)}return null}function Ug(r,A){if(!r||r.length<2)return[];const e=[],t=2;for(let s=1;s<r.length;s++){const i=r[s-1].time,n=r[s].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 Eg(r,A="America/New_York"){const e=new Date(r*1e3),t=new Date(e.toLocaleString("en-US",{timeZone:A})),s=t.getDay();return!(s===0||s===6||s===5&&t.getHours()>=17)}function oc(r){return Array.isArray(r)?r.map(A=>({...A,time:RA(A.time)})).filter(A=>A.time!=null):[]}function xg(r){if(!r||r.length<2)return!0;for(let A=1;A<r.length;A++)if(r[A].time<=r[A-1].time)return!1;return!0}function kt(r,A){return!Number.isFinite(r)||!Number.isFinite(A)||A<=0?r:Math.floor(r/A)*A}const Ae="17:00-17:00",ee="America/New_York",Oe="24x7",ke="UTC",ac={EURUSD:{type:"forex",sessionTZ:ee,session:Ae,priceMode:"mid"},GBPUSD:{type:"forex",sessionTZ:ee,session:Ae,priceMode:"mid"},USDJPY:{type:"forex",sessionTZ:ee,session:Ae,priceMode:"mid"},USDCHF:{type:"forex",sessionTZ:ee,session:Ae,priceMode:"mid"},AUDUSD:{type:"forex",sessionTZ:ee,session:Ae,priceMode:"mid"},USDCAD:{type:"forex",sessionTZ:ee,session:Ae,priceMode:"mid"},NZDUSD:{type:"forex",sessionTZ:ee,session:Ae,priceMode:"mid"},EURGBP:{type:"forex",sessionTZ:ee,session:Ae,priceMode:"mid"},EURJPY:{type:"forex",sessionTZ:ee,session:Ae,priceMode:"mid"},GBPJPY:{type:"forex",sessionTZ:ee,session:Ae,priceMode:"mid"},CADJPY:{type:"forex",sessionTZ:ee,session:Ae,priceMode:"mid"},EURJPY:{type:"forex",sessionTZ:ee,session:Ae,priceMode:"mid"},XAUUSD:{type:"forex",sessionTZ:ee,session:Ae,priceMode:"mid"},XAGUSD:{type:"forex",sessionTZ:ee,session:Ae,priceMode:"mid"},OILUSD:{type:"forex",sessionTZ:ee,session:Ae,priceMode:"mid"},BTCUSDT:{type:"crypto",session:Oe,sessionTZ:ke,priceMode:"last"},ETHUSDT:{type:"crypto",session:Oe,sessionTZ:ke,priceMode:"last"},BNBUSDT:{type:"crypto",session:Oe,sessionTZ:ke,priceMode:"last"},SOLUSDT:{type:"crypto",session:Oe,sessionTZ:ke,priceMode:"last"},ADAUSDT:{type:"crypto",session:Oe,sessionTZ:ke,priceMode:"last"},XRPUSDT:{type:"crypto",session:Oe,sessionTZ:ke,priceMode:"last"},DOGEUSDT:{type:"crypto",session:Oe,sessionTZ:ke,priceMode:"last"},DOTUSDT:{type:"crypto",session:Oe,sessionTZ:ke,priceMode:"last"},MATICUSDT:{type:"crypto",session:Oe,sessionTZ:ke,priceMode:"last"},LINKUSDT:{type:"crypto",session:Oe,sessionTZ:ke,priceMode:"last"}},lc={type:"forex",sessionTZ:ee,session:Ae,priceMode:"mid"};function Br(r){return r&&ac[r.toUpperCase()]||lc}function Sg(r){return Br(r).type==="forex"}function Hg(r){return Br(r).type==="crypto"}function Lg(r){return Br(r).session==="24x7"}function cc(r){if(!r||typeof r!="object")return!1;const{time:A,open:e,high:t,low:s,close:i,volume:n}=r;return!(RA(A)==null||typeof e!="number"||!Number.isFinite(e)||typeof t!="number"||!Number.isFinite(t)||typeof s!="number"||!Number.isFinite(s)||typeof i!="number"||!Number.isFinite(i)||n!=null&&(typeof n!="number"||n<0||!Number.isFinite(n))||t<e||t<i||t<s||s>e||s>i||s>t||e<=0||t<=0||s<=0||i<=0)}function hc(r){const A=n=>Math.round(n*1e5)/1e5;let e=A(r.open),t=A(r.high),s=A(r.low),i=A(r.close);return t=Math.max(t,e,i,s),s=Math.min(s,e,i,t),{...r,open:e,high:t,low:s,close:i,volume:r.volume!=null?Math.round(r.volume):r.volume}}function uc(r){if(!Array.isArray(r)||r.length===0)return[];const A=new Map;return r.forEach(e=>{const t=RA(e.time);if(t!=null)if(A.has(t)){const s=A.get(t);A.set(t,{...e,time:t,open:e.open,high:Math.max(s.high,e.high),low:Math.min(s.low,e.low),close:e.close,volume:(s.volume||0)+(e.volume||0)})}else A.set(t,{...e,time:t})}),Array.from(A.values())}function Ig(r,A="percentile"){if(!Array.isArray(r)||r.length<3)return r;const e=r.map(n=>n.close).filter(n=>Number.isFinite(n));if(e.length<3)return r;const t=[...e].sort((n,o)=>n-o);let s,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;s=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 r;s=n-3*a,i=n+3*a}return r.map((n,o)=>{const a=n.close;if(a<s||a>i){if(o===0)return n;const l=r[o-1].close;return{...n,open:l,high:Math.max(l,n.high),low:Math.min(l,n.low),close:l}}return n})}function Tg(r,A){if(!Array.isArray(r)||r.length===0)return r;const e=[],t=Math.max(A*10080,604800),s=1e4;for(let o=0;o<r.length;o++)if(e.push(r[o]),o<r.length-1){const a=r[o].time,l=r[o+1].time,c=l-a;if(c>t&&((c/3600).toFixed(1),(t/3600).toFixed(1)),c>A&&c<=t){const u=r[o];let d=a+A,g=0;for(d=kt(d,A);d<l&&g<s;){const B=kt(d,A);e.some(w=>w.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>=s){const B=kt(l-A,A);e.some(w=>w.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 ys(r){if(!r||typeof r!="string")return 60;const A=r.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=r.match(/^(\d+)([mhdwy])$/i),e){const t=parseInt(e[1],10),s=e[2].toLowerCase();return t*({m:60,h:3600,d:86400,w:604800,y:31536e3}[s]||60)}return 60}function fc(r,A,e){if(!Array.isArray(r)||r.length===0)return{candles:[],stats:{original:0,processed:0,duplicates:0,outliers:0,gaps:[]}};const t=Br(A),s=ys(e),o=oc(r).map(w=>({...w,time:kt(w.time,s)})).filter(w=>cc(w)).map(w=>hc(w)),a=uc(o);a.sort((w,m)=>w.time-m.time);const l=a.filter((w,m)=>m===0?!0:w.time>a[m-1].time),c=l.length>10?Ig(l,"percentile"):l,u=uc(c);u.sort((w,m)=>w.time-m.time);const d=Tg(u,s),g=[];for(let w=1;w<d.length;w++){const m=d[w].time-d[w-1].time;m>s*2&&g.push({from:d[w-1].time,to:d[w].time,gapSeconds:m,gapMinutes:Math.round(m/60),fromDate:new Date(d[w-1].time*1e3).toISOString(),toDate:new Date(d[w].time*1e3).toISOString()})}const B=c.filter((w,m)=>m===0?!1:w.close===c[m-1].close&&w.open===c[m-1].close).length,f={original:r.length,processed:d.length,duplicates:r.length-a.length,outliers:B,gaps:g,filledGaps:d.length-u.length,symbolConfig:t};return{candles:d,stats:f}}function dc(r,A,e="1m"){if(!r||!A||!cc(r))return null;const t=RA(r.time);if(t==null)return null;const s=ys(e),i=kt(t,s);return hc({...r,time:i})}var Dn=function(r,A){return Dn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])},Dn(r,A)};function Se(r,A){if(typeof A!="function"&&A!==null)throw new TypeError("Class extends value "+String(A)+" is not a constructor or null");Dn(r,A);function e(){this.constructor=r}r.prototype=A===null?Object.create(A):(e.prototype=A.prototype,new e)}var On=function(){return On=Object.assign||function(A){for(var e,t=1,s=arguments.length;t<s;t++){e=arguments[t];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(A[i]=e[i])}return A},On.apply(this,arguments)};function oe(r,A,e,t){function s(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):s(c.value).then(o,a)}l((t=t.apply(r,[])).next())})}function te(r,A){var e={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},t,s,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,s&&(i=l[0]&2?s.return:l[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,l[1])).done)return i;switch(s=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++,s=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(r,e)}catch(c){l=[6,c],s=0}finally{t=i=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function Us(r,A,e){if(arguments.length===2)for(var t=0,s=A.length,i;t<s;t++)(i||!(t in A))&&(i||(i=Array.prototype.slice.call(A,0,t)),i[t]=A[t]);return r.concat(i||A)}for(var Ze=(function(){function r(A,e,t,s){this.left=A,this.top=e,this.width=t,this.height=s}return r.prototype.add=function(A,e,t,s){return new r(this.left+A,this.top+e,this.width+t,this.height+s)},r.fromClientRect=function(A,e){return new r(e.left+A.windowBounds.left,e.top+A.windowBounds.top,e.width,e.height)},r.fromDOMRectList=function(A,e){var t=Array.from(e).find(function(s){return s.width!==0});return t?new r(t.left+A.windowBounds.left,t.top+A.windowBounds.top,t.width,t.height):r.EMPTY},r.EMPTY=new r(0,0,0,0),r})(),Es=function(r,A){return Ze.fromClientRect(r,A.getBoundingClientRect())},Mg=function(r){var A=r.body,e=r.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)),s=Math.max(Math.max(A.scrollHeight,e.scrollHeight),Math.max(A.offsetHeight,e.offsetHeight),Math.max(A.clientHeight,e.clientHeight));return new Ze(0,0,t,s)},xs=function(r){for(var A=[],e=0,t=r.length;e<t;){var s=r.charCodeAt(e++);if(s>=55296&&s<=56319&&e<t){var i=r.charCodeAt(e++);(i&64512)===56320?A.push(((s&1023)<<10)+(i&1023)+65536):(A.push(s),e--)}else A.push(s)}return A},VA=function(){for(var r=[],A=0;A<arguments.length;A++)r[A]=arguments[A];if(String.fromCodePoint)return String.fromCodePoint.apply(String,r);var e=r.length;if(!e)return"";for(var t=[],s=-1,i="";++s<e;){var n=r[s];n<=65535?t.push(n):(n-=65536,t.push((n>>10)+55296,n%1024+56320)),(s+1===e||t.length>16384)&&(i+=String.fromCharCode.apply(String,t),t.length=0)}return i},Bc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Dg=typeof Uint8Array>"u"?[]:new Uint8Array(256),Ss=0;Ss<Bc.length;Ss++)Dg[Bc.charCodeAt(Ss)]=Ss;for(var gc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",gr=typeof Uint8Array>"u"?[]:new Uint8Array(256),Hs=0;Hs<gc.length;Hs++)gr[gc.charCodeAt(Hs)]=Hs;for(var Og=function(r){var A=r.length*.75,e=r.length,t,s=0,i,n,o,a;r[r.length-1]==="="&&(A--,r[r.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=gr[r.charCodeAt(t)],n=gr[r.charCodeAt(t+1)],o=gr[r.charCodeAt(t+2)],a=gr[r.charCodeAt(t+3)],c[s++]=i<<2|n>>4,c[s++]=(n&15)<<4|o>>2,c[s++]=(o&3)<<6|a&63;return l},kg=function(r){for(var A=r.length,e=[],t=0;t<A;t+=2)e.push(r[t+1]<<8|r[t]);return e},_g=function(r){for(var A=r.length,e=[],t=0;t<A;t+=4)e.push(r[t+3]<<24|r[t+2]<<16|r[t+1]<<8|r[t]);return e},vt=5,kn=11,_n=2,Ng=kn-vt,pc=65536>>vt,Kg=1<<vt,Nn=Kg-1,Vg=1024>>vt,Pg=pc+Vg,Gg=Pg,Rg=32,Wg=Gg+Rg,zg=65536>>kn,Xg=1<<Ng,Jg=Xg-1,wc=function(r,A,e){return r.slice?r.slice(A,e):new Uint16Array(Array.prototype.slice.call(r,A,e))},Zg=function(r,A,e){return r.slice?r.slice(A,e):new Uint32Array(Array.prototype.slice.call(r,A,e))},Yg=function(r,A){var e=Og(r),t=Array.isArray(e)?_g(e):new Uint32Array(e),s=Array.isArray(e)?kg(e):new Uint16Array(e),i=24,n=wc(s,i/2,t[4]/2),o=t[5]===2?wc(s,(i+t[4])/2):Zg(t,Math.ceil((i+t[4])/4));return new qg(t[0],t[1],t[2],t[3],n,o)},qg=(function(){function r(A,e,t,s,i,n){this.initialValue=A,this.errorValue=e,this.highStart=t,this.highValueIndex=s,this.index=i,this.data=n}return r.prototype.get=function(A){var e;if(A>=0){if(A<55296||A>56319&&A<=65535)return e=this.index[A>>vt],e=(e<<_n)+(A&Nn),this.data[e];if(A<=65535)return e=this.index[pc+(A-55296>>vt)],e=(e<<_n)+(A&Nn),this.data[e];if(A<this.highStart)return e=Wg-zg+(A>>kn),e=this.index[e],e+=A>>vt&Jg,e=this.index[e],e=(e<<_n)+(A&Nn),this.data[e];if(A<=1114111)return this.data[this.highValueIndex]}return this.errorValue},r})(),mc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",$g=typeof Uint8Array>"u"?[]:new Uint8Array(256),Ls=0;Ls<mc.length;Ls++)$g[mc.charCodeAt(Ls)]=Ls;var jg="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==",Cc=50,Ap=1,vc=2,bc=3,ep=4,tp=5,Qc=7,Fc=8,yc=9,rt=10,Kn=11,Uc=12,Vn=13,rp=14,pr=15,Pn=16,Is=17,wr=18,sp=19,Ec=20,Gn=21,mr=22,Rn=23,_t=24,we=25,Cr=26,vr=27,Nt=28,ip=29,bt=30,np=31,Ts=32,Ms=33,Wn=34,zn=35,Xn=36,br=37,Jn=38,Ds=39,Os=40,Zn=41,xc=42,op=43,ap=[9001,65288],Sc="!",mA="×",ks="÷",Yn=Yg(jg),Ye=[bt,Xn],qn=[Ap,vc,bc,tp],Hc=[rt,Fc],Lc=[vr,Cr],lp=qn.concat(Hc),Ic=[Jn,Ds,Os,Wn,zn],cp=[pr,Vn],hp=function(r,A){A===void 0&&(A="strict");var e=[],t=[],s=[];return r.forEach(function(i,n){var o=Yn.get(i);if(o>Cc?(s.push(!0),o-=Cc):s.push(!1),["normal","auto","loose"].indexOf(A)!==-1&&[8208,8211,12316,12448].indexOf(i)!==-1)return t.push(n),e.push(Pn);if(o===ep||o===Kn){if(n===0)return t.push(n),e.push(bt);var a=e[n-1];return lp.indexOf(a)===-1?(t.push(t[n-1]),e.push(a)):(t.push(n),e.push(bt))}if(t.push(n),o===np)return e.push(A==="strict"?Gn:br);if(o===xc||o===ip)return e.push(bt);if(o===op)return i>=131072&&i<=196605||i>=196608&&i<=262141?e.push(br):e.push(bt);e.push(o)}),[t,e,s]},$n=function(r,A,e,t){var s=t[e];if(Array.isArray(r)?r.indexOf(s)!==-1:r===s)for(var i=e;i<=t.length;){i++;var n=t[i];if(n===A)return!0;if(n!==rt)break}if(s===rt)for(var i=e;i>0;){i--;var o=t[i];if(Array.isArray(r)?r.indexOf(o)!==-1:r===o)for(var a=e;a<=t.length;){a++;var n=t[a];if(n===A)return!0;if(n!==rt)break}if(o!==rt)break}return!1},Tc=function(r,A){for(var e=r;e>=0;){var t=A[e];if(t===rt)e--;else return t}return 0},up=function(r,A,e,t,s){if(e[t]===0)return mA;var i=t-1;if(Array.isArray(s)&&s[i]===!0)return mA;var n=i-1,o=i+1,a=A[i],l=n>=0?A[n]:0,c=A[o];if(a===vc&&c===bc)return mA;if(qn.indexOf(a)!==-1)return Sc;if(qn.indexOf(c)!==-1||Hc.indexOf(c)!==-1)return mA;if(Tc(i,A)===Fc)return ks;if(Yn.get(r[i])===Kn||(a===Ts||a===Ms)&&Yn.get(r[o])===Kn||a===Qc||c===Qc||a===yc||[rt,Vn,pr].indexOf(a)===-1&&c===yc||[Is,wr,sp,_t,Nt].indexOf(c)!==-1||Tc(i,A)===mr||$n(Rn,mr,i,A)||$n([Is,wr],Gn,i,A)||$n(Uc,Uc,i,A))return mA;if(a===rt)return ks;if(a===Rn||c===Rn)return mA;if(c===Pn||a===Pn)return ks;if([Vn,pr,Gn].indexOf(c)!==-1||a===rp||l===Xn&&cp.indexOf(a)!==-1||a===Nt&&c===Xn||c===Ec||Ye.indexOf(c)!==-1&&a===we||Ye.indexOf(a)!==-1&&c===we||a===vr&&[br,Ts,Ms].indexOf(c)!==-1||[br,Ts,Ms].indexOf(a)!==-1&&c===Cr||Ye.indexOf(a)!==-1&&Lc.indexOf(c)!==-1||Lc.indexOf(a)!==-1&&Ye.indexOf(c)!==-1||[vr,Cr].indexOf(a)!==-1&&(c===we||[mr,pr].indexOf(c)!==-1&&A[o+1]===we)||[mr,pr].indexOf(a)!==-1&&c===we||a===we&&[we,Nt,_t].indexOf(c)!==-1)return mA;if([we,Nt,_t,Is,wr].indexOf(c)!==-1)for(var u=i;u>=0;){var d=A[u];if(d===we)return mA;if([Nt,_t].indexOf(d)!==-1)u--;else break}if([vr,Cr].indexOf(c)!==-1)for(var u=[Is,wr].indexOf(a)!==-1?n:i;u>=0;){var d=A[u];if(d===we)return mA;if([Nt,_t].indexOf(d)!==-1)u--;else break}if(Jn===a&&[Jn,Ds,Wn,zn].indexOf(c)!==-1||[Ds,Wn].indexOf(a)!==-1&&[Ds,Os].indexOf(c)!==-1||[Os,zn].indexOf(a)!==-1&&c===Os||Ic.indexOf(a)!==-1&&[Ec,Cr].indexOf(c)!==-1||Ic.indexOf(c)!==-1&&a===vr||Ye.indexOf(a)!==-1&&Ye.indexOf(c)!==-1||a===_t&&Ye.indexOf(c)!==-1||Ye.concat(we).indexOf(a)!==-1&&c===mr&&ap.indexOf(r[o])===-1||Ye.concat(we).indexOf(c)!==-1&&a===wr)return mA;if(a===Zn&&c===Zn){for(var g=e[i],B=1;g>0&&(g--,A[g]===Zn);)B++;if(B%2!==0)return mA}return a===Ts&&c===Ms?mA:ks},fp=function(r,A){A||(A={lineBreak:"normal",wordBreak:"normal"});var e=hp(r,A.lineBreak),t=e[0],s=e[1],i=e[2];(A.wordBreak==="break-all"||A.wordBreak==="break-word")&&(s=s.map(function(o){return[we,bt,xc].indexOf(o)!==-1?br:o}));var n=A.wordBreak==="keep-all"?i.map(function(o,a){return o&&r[a]>=19968&&r[a]<=40959}):void 0;return[t,s,n]},dp=(function(){function r(A,e,t,s){this.codePoints=A,this.required=e===Sc,this.start=t,this.end=s}return r.prototype.slice=function(){return VA.apply(void 0,this.codePoints.slice(this.start,this.end))},r})(),Bp=function(r,A){var e=xs(r),t=fp(e,A),s=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=mA;l<o&&(c=up(e,i,s,++l,n))===mA;);if(c!==mA||l===o){var u=new dp(e,c,a,l);return a=l,{value:u,done:!1}}return{done:!0,value:null}}}},gp=1,pp=2,Qr=4,Mc=8,_s=10,Dc=47,Fr=92,wp=9,mp=32,Ns=34,yr=61,Cp=35,vp=36,bp=37,Ks=39,Vs=40,Ur=41,Qp=95,de=45,Fp=33,yp=60,Up=62,Ep=64,xp=91,Sp=93,Hp=61,Lp=123,Ps=63,Ip=125,Oc=124,Tp=126,Mp=128,kc=65533,jn=42,Qt=43,Dp=44,Op=58,kp=59,Er=46,_p=0,Np=8,Kp=11,Vp=14,Pp=31,Gp=127,_e=-1,_c=48,Nc=97,Kc=101,Rp=102,Wp=117,zp=122,Vc=65,Pc=69,Gc=70,Xp=85,Jp=90,re=function(r){return r>=_c&&r<=57},Zp=function(r){return r>=55296&&r<=57343},Kt=function(r){return re(r)||r>=Vc&&r<=Gc||r>=Nc&&r<=Rp},Yp=function(r){return r>=Nc&&r<=zp},qp=function(r){return r>=Vc&&r<=Jp},$p=function(r){return Yp(r)||qp(r)},jp=function(r){return r>=Mp},Gs=function(r){return r===_s||r===wp||r===mp},Rs=function(r){return $p(r)||jp(r)||r===Qp},Rc=function(r){return Rs(r)||re(r)||r===de},Aw=function(r){return r>=_p&&r<=Np||r===Kp||r>=Vp&&r<=Pp||r===Gp},st=function(r,A){return r!==Fr?!1:A!==_s},Ws=function(r,A,e){return r===de?Rs(A)||st(A,e):Rs(r)?!0:!!(r===Fr&&st(r,A))},Ao=function(r,A,e){return r===Qt||r===de?re(A)?!0:A===Er&&re(e):re(r===Er?A:r)},ew=function(r){var A=0,e=1;(r[A]===Qt||r[A]===de)&&(r[A]===de&&(e=-1),A++);for(var t=[];re(r[A]);)t.push(r[A++]);var s=t.length?parseInt(VA.apply(void 0,t),10):0;r[A]===Er&&A++;for(var i=[];re(r[A]);)i.push(r[A++]);var n=i.length,o=n?parseInt(VA.apply(void 0,i),10):0;(r[A]===Pc||r[A]===Kc)&&A++;var a=1;(r[A]===Qt||r[A]===de)&&(r[A]===de&&(a=-1),A++);for(var l=[];re(r[A]);)l.push(r[A++]);var c=l.length?parseInt(VA.apply(void 0,l),10):0;return e*(s+o*Math.pow(10,-n))*Math.pow(10,a*c)},tw={type:2},rw={type:3},sw={type:4},iw={type:13},nw={type:8},ow={type:21},aw={type:9},lw={type:10},cw={type:11},hw={type:12},uw={type:14},zs={type:23},fw={type:1},dw={type:25},Bw={type:24},gw={type:26},pw={type:27},ww={type:28},mw={type:29},Cw={type:31},eo={type:32},Wc=(function(){function r(){this._value=[]}return r.prototype.write=function(A){this._value=this._value.concat(xs(A))},r.prototype.read=function(){for(var A=[],e=this.consumeToken();e!==eo;)A.push(e),e=this.consumeToken();return A},r.prototype.consumeToken=function(){var A=this.consumeCodePoint();switch(A){case Ns:return this.consumeStringToken(Ns);case Cp:var e=this.peekCodePoint(0),t=this.peekCodePoint(1),s=this.peekCodePoint(2);if(Rc(e)||st(t,s)){var i=Ws(e,t,s)?pp:gp,n=this.consumeName();return{type:5,value:n,flags:i}}break;case vp:if(this.peekCodePoint(0)===yr)return this.consumeCodePoint(),iw;break;case Ks:return this.consumeStringToken(Ks);case Vs:return tw;case Ur:return rw;case jn:if(this.peekCodePoint(0)===yr)return this.consumeCodePoint(),uw;break;case Qt:if(Ao(A,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(A),this.consumeNumericToken();break;case Dp:return sw;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(Ws(o,a,l))return this.reconsumeCodePoint(A),this.consumeIdentLikeToken();if(a===de&&l===Up)return this.consumeCodePoint(),this.consumeCodePoint(),Bw;break;case Er:if(Ao(A,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(A),this.consumeNumericToken();break;case Dc:if(this.peekCodePoint(0)===jn)for(this.consumeCodePoint();;){var c=this.consumeCodePoint();if(c===jn&&(c=this.consumeCodePoint(),c===Dc))return this.consumeToken();if(c===_e)return this.consumeToken()}break;case Op:return gw;case kp:return pw;case yp:if(this.peekCodePoint(0)===Fp&&this.peekCodePoint(1)===de&&this.peekCodePoint(2)===de)return this.consumeCodePoint(),this.consumeCodePoint(),dw;break;case Ep:var u=this.peekCodePoint(0),d=this.peekCodePoint(1),g=this.peekCodePoint(2);if(Ws(u,d,g)){var n=this.consumeName();return{type:7,value:n}}break;case xp:return ww;case Fr:if(st(A,this.peekCodePoint(0)))return this.reconsumeCodePoint(A),this.consumeIdentLikeToken();break;case Sp:return mw;case Hp:if(this.peekCodePoint(0)===yr)return this.consumeCodePoint(),nw;break;case Lp:return cw;case Ip:return hw;case Wp:case Xp:var B=this.peekCodePoint(0),f=this.peekCodePoint(1);return B===Qt&&(Kt(f)||f===Ps)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(A),this.consumeIdentLikeToken();case Oc:if(this.peekCodePoint(0)===yr)return this.consumeCodePoint(),aw;if(this.peekCodePoint(0)===Oc)return this.consumeCodePoint(),ow;break;case Tp:if(this.peekCodePoint(0)===yr)return this.consumeCodePoint(),lw;break;case _e:return eo}return Gs(A)?(this.consumeWhiteSpace(),Cw):re(A)?(this.reconsumeCodePoint(A),this.consumeNumericToken()):Rs(A)?(this.reconsumeCodePoint(A),this.consumeIdentLikeToken()):{type:6,value:VA(A)}},r.prototype.consumeCodePoint=function(){var A=this._value.shift();return typeof A>"u"?-1:A},r.prototype.reconsumeCodePoint=function(A){this._value.unshift(A)},r.prototype.peekCodePoint=function(A){return A>=this._value.length?-1:this._value[A]},r.prototype.consumeUnicodeRangeToken=function(){for(var A=[],e=this.consumeCodePoint();Kt(e)&&A.length<6;)A.push(e),e=this.consumeCodePoint();for(var t=!1;e===Ps&&A.length<6;)A.push(e),e=this.consumeCodePoint(),t=!0;if(t){var s=parseInt(VA.apply(void 0,A.map(function(a){return a===Ps?_c:a})),16),i=parseInt(VA.apply(void 0,A.map(function(a){return a===Ps?Gc:a})),16);return{type:30,start:s,end:i}}var n=parseInt(VA.apply(void 0,A),16);if(this.peekCodePoint(0)===de&&Kt(this.peekCodePoint(1))){this.consumeCodePoint(),e=this.consumeCodePoint();for(var o=[];Kt(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}},r.prototype.consumeIdentLikeToken=function(){var A=this.consumeName();return A.toLowerCase()==="url"&&this.peekCodePoint(0)===Vs?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===Vs?(this.consumeCodePoint(),{type:19,value:A}):{type:20,value:A}},r.prototype.consumeUrlToken=function(){var A=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===_e)return{type:22,value:""};var e=this.peekCodePoint(0);if(e===Ks||e===Ns){var t=this.consumeStringToken(this.consumeCodePoint());return t.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===_e||this.peekCodePoint(0)===Ur)?(this.consumeCodePoint(),{type:22,value:t.value}):(this.consumeBadUrlRemnants(),zs)}for(;;){var s=this.consumeCodePoint();if(s===_e||s===Ur)return{type:22,value:VA.apply(void 0,A)};if(Gs(s))return this.consumeWhiteSpace(),this.peekCodePoint(0)===_e||this.peekCodePoint(0)===Ur?(this.consumeCodePoint(),{type:22,value:VA.apply(void 0,A)}):(this.consumeBadUrlRemnants(),zs);if(s===Ns||s===Ks||s===Vs||Aw(s))return this.consumeBadUrlRemnants(),zs;if(s===Fr)if(st(s,this.peekCodePoint(0)))A.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),zs;else A.push(s)}},r.prototype.consumeWhiteSpace=function(){for(;Gs(this.peekCodePoint(0));)this.consumeCodePoint()},r.prototype.consumeBadUrlRemnants=function(){for(;;){var A=this.consumeCodePoint();if(A===Ur||A===_e)return;st(A,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},r.prototype.consumeStringSlice=function(A){for(var e=5e4,t="";A>0;){var s=Math.min(e,A);t+=VA.apply(void 0,this._value.splice(0,s)),A-=s}return this._value.shift(),t},r.prototype.consumeStringToken=function(A){var e="",t=0;do{var s=this._value[t];if(s===_e||s===void 0||s===A)return e+=this.consumeStringSlice(t),{type:0,value:e};if(s===_s)return this._value.splice(0,t),fw;if(s===Fr){var i=this._value[t+1];i!==_e&&i!==void 0&&(i===_s?(e+=this.consumeStringSlice(t),t=-1,this._value.shift()):st(s,i)&&(e+=this.consumeStringSlice(t),e+=VA(this.consumeEscapedCodePoint()),t=-1))}t++}while(!0)},r.prototype.consumeNumber=function(){var A=[],e=Qr,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 s=this.peekCodePoint(1);if(t===Er&&re(s))for(A.push(this.consumeCodePoint(),this.consumeCodePoint()),e=Mc;re(this.peekCodePoint(0));)A.push(this.consumeCodePoint());t=this.peekCodePoint(0),s=this.peekCodePoint(1);var i=this.peekCodePoint(2);if((t===Pc||t===Kc)&&((s===Qt||s===de)&&re(i)||re(s)))for(A.push(this.consumeCodePoint(),this.consumeCodePoint()),e=Mc;re(this.peekCodePoint(0));)A.push(this.consumeCodePoint());return[ew(A),e]},r.prototype.consumeNumericToken=function(){var A=this.consumeNumber(),e=A[0],t=A[1],s=this.peekCodePoint(0),i=this.peekCodePoint(1),n=this.peekCodePoint(2);if(Ws(s,i,n)){var o=this.consumeName();return{type:15,number:e,flags:t,unit:o}}return s===bp?(this.consumeCodePoint(),{type:16,number:e,flags:t}):{type:17,number:e,flags:t}},r.prototype.consumeEscapedCodePoint=function(){var A=this.consumeCodePoint();if(Kt(A)){for(var e=VA(A);Kt(this.peekCodePoint(0))&&e.length<6;)e+=VA(this.consumeCodePoint());Gs(this.peekCodePoint(0))&&this.consumeCodePoint();var t=parseInt(e,16);return t===0||Zp(t)||t>1114111?kc:t}return A===_e?kc:A},r.prototype.consumeName=function(){for(var A="";;){var e=this.consumeCodePoint();if(Rc(e))A+=VA(e);else if(st(e,this.peekCodePoint(0)))A+=VA(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(e),A}},r})(),zc=(function(){function r(A){this._tokens=A}return r.create=function(A){var e=new Wc;return e.write(A),new r(e.read())},r.parseValue=function(A){return r.create(A).parseComponentValue()},r.parseValues=function(A){return r.create(A).parseComponentValues()},r.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")},r.prototype.parseComponentValues=function(){for(var A=[];;){var e=this.consumeComponentValue();if(e.type===32)return A;A.push(e),A.push()}},r.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},r.prototype.consumeSimpleBlock=function(A){for(var e={type:A,values:[]},t=this.consumeToken();;){if(t.type===32||bw(t,A))return e;this.reconsumeToken(t),e.values.push(this.consumeComponentValue()),t=this.consumeToken()}},r.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())}},r.prototype.consumeToken=function(){var A=this._tokens.shift();return typeof A>"u"?eo:A},r.prototype.reconsumeToken=function(A){this._tokens.unshift(A)},r})(),xr=function(r){return r.type===15},Vt=function(r){return r.type===17},SA=function(r){return r.type===20},vw=function(r){return r.type===0},to=function(r,A){return SA(r)&&r.value===A},Xc=function(r){return r.type!==31},Pt=function(r){return r.type!==31&&r.type!==4},Ne=function(r){var A=[],e=[];return r.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},bw=function(r,A){return A===11&&r.type===12||A===28&&r.type===29?!0:A===2&&r.type===3},it=function(r){return r.type===17||r.type===15},WA=function(r){return r.type===16||it(r)},Jc=function(r){return r.length>1?[r[0],r[1]]:[r[0]]},qA={type:17,number:0,flags:Qr},ro={type:16,number:50,flags:Qr},nt={type:16,number:100,flags:Qr},Sr=function(r,A,e){var t=r[0],s=r[1];return[LA(t,A),LA(typeof s<"u"?s:t,e)]},LA=function(r,A){if(r.type===16)return r.number/100*A;if(xr(r))switch(r.unit){case"rem":case"em":return 16*r.number;default:return r.number}return r.number},Zc="deg",Yc="grad",qc="rad",$c="turn",Xs={name:"angle",parse:function(r,A){if(A.type===15)switch(A.unit){case Zc:return Math.PI*A.number/180;case Yc:return Math.PI/200*A.number;case qc:return A.number;case $c:return Math.PI*2*A.number}throw new Error("Unsupported angle type")}},jc=function(r){return r.type===15&&(r.unit===Zc||r.unit===Yc||r.unit===qc||r.unit===$c)},Ah=function(r){var A=r.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 ve(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[qA,nt];case"to right":case"left":return ve(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[nt,nt];case"to bottom":case"top":return ve(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[nt,qA];case"to left":case"right":return ve(270)}return 0},ve=function(r){return Math.PI*r/180},ot={name:"color",parse:function(r,A){if(A.type===18){var e=Qw[A.name];if(typeof e>"u")throw new Error('Attempting to parse an unsupported color function "'+A.name+'"');return e(r,A.values)}if(A.type===5){if(A.value.length===3){var t=A.value.substring(0,1),s=A.value.substring(1,2),i=A.value.substring(2,3);return lt(parseInt(t+t,16),parseInt(s+s,16),parseInt(i+i,16),1)}if(A.value.length===4){var t=A.value.substring(0,1),s=A.value.substring(1,2),i=A.value.substring(2,3),n=A.value.substring(3,4);return lt(parseInt(t+t,16),parseInt(s+s,16),parseInt(i+i,16),parseInt(n+n,16)/255)}if(A.value.length===6){var t=A.value.substring(0,2),s=A.value.substring(2,4),i=A.value.substring(4,6);return lt(parseInt(t,16),parseInt(s,16),parseInt(i,16),1)}if(A.value.length===8){var t=A.value.substring(0,2),s=A.value.substring(2,4),i=A.value.substring(4,6),n=A.value.substring(6,8);return lt(parseInt(t,16),parseInt(s,16),parseInt(i,16),parseInt(n,16)/255)}}if(A.type===20){var o=qe[A.value.toUpperCase()];if(typeof o<"u")return o}return qe.TRANSPARENT}},at=function(r){return(255&r)===0},XA=function(r){var A=255&r,e=255&r>>8,t=255&r>>16,s=255&r>>24;return A<255?"rgba("+s+","+t+","+e+","+A/255+")":"rgb("+s+","+t+","+e+")"},lt=function(r,A,e,t){return(r<<24|A<<16|e<<8|Math.round(t*255)<<0)>>>0},eh=function(r,A){if(r.type===17)return r.number;if(r.type===16){var e=A===3?1:255;return A===3?r.number/100*e:Math.round(r.number/100*e)}return 0},th=function(r,A){var e=A.filter(Pt);if(e.length===3){var t=e.map(eh),s=t[0],i=t[1],n=t[2];return lt(s,i,n,1)}if(e.length===4){var o=e.map(eh),s=o[0],i=o[1],n=o[2],a=o[3];return lt(s,i,n,a)}return 0};function so(r,A,e){return e<0&&(e+=1),e>=1&&(e-=1),e<1/6?(A-r)*e*6+r:e<1/2?A:e<2/3?(A-r)*6*(2/3-e)+r:r}var rh=function(r,A){var e=A.filter(Pt),t=e[0],s=e[1],i=e[2],n=e[3],o=(t.type===17?ve(t.number):Xs.parse(r,t))/(Math.PI*2),a=WA(s)?s.number/100:0,l=WA(i)?i.number/100:0,c=typeof n<"u"&&WA(n)?LA(n,1):1;if(a===0)return lt(l*255,l*255,l*255,1);var u=l<=.5?l*(a+1):l+a-l*a,d=l*2-u,g=so(d,u,o+1/3),B=so(d,u,o),f=so(d,u,o-1/3);return lt(g*255,B*255,f*255,c)},Qw={hsl:rh,hsla:rh,rgb:th,rgba:th},Hr=function(r,A){return ot.parse(r,zc.create(A).parseComponentValue())},qe={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},Fw={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(r,A){return A.map(function(e){if(SA(e))switch(e.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},yw={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Js=function(r,A){var e=ot.parse(r,A[0]),t=A[1];return t&&WA(t)?{color:e,stop:t}:{color:e,stop:null}},sh=function(r,A){var e=r[0],t=r[r.length-1];e.stop===null&&(e.stop=qA),t.stop===null&&(t.stop=nt);for(var s=[],i=0,n=0;n<r.length;n++){var o=r[n].stop;if(o!==null){var a=LA(o,A);a>i?s.push(a):s.push(i),i=a}else s.push(null)}for(var l=null,n=0;n<s.length;n++){var c=s[n];if(c===null)l===null&&(l=n);else if(l!==null){for(var u=n-l,d=s[l-1],g=(c-d)/(u+1),B=1;B<=u;B++)s[l+B-1]=g*B;l=null}}return r.map(function(f,w){var m=f.color;return{color:m,stop:Math.max(Math.min(1,s[w]/A),0)}})},Uw=function(r,A,e){var t=A/2,s=e/2,i=LA(r[0],A)-t,n=s-LA(r[1],e);return(Math.atan2(n,i)+Math.PI*2)%(Math.PI*2)},Ew=function(r,A,e){var t=typeof r=="number"?r:Uw(r,A,e),s=Math.abs(A*Math.sin(t))+Math.abs(e*Math.cos(t)),i=A/2,n=e/2,o=s/2,a=Math.sin(t-Math.PI/2)*o,l=Math.cos(t-Math.PI/2)*o;return[s,i-l,i+l,n-a,n+a]},He=function(r,A){return Math.sqrt(r*r+A*A)},ih=function(r,A,e,t,s){var i=[[0,0],[0,A],[r,0],[r,A]];return i.reduce(function(n,o){var a=o[0],l=o[1],c=He(e-a,t-l);return(s?c<n.optimumDistance:c>n.optimumDistance)?{optimumCorner:o,optimumDistance:c}:n},{optimumDistance:s?1/0:-1/0,optimumCorner:null}).optimumCorner},xw=function(r,A,e,t,s){var i=0,n=0;switch(r.size){case 0:r.shape===0?i=n=Math.min(Math.abs(A),Math.abs(A-t),Math.abs(e),Math.abs(e-s)):r.shape===1&&(i=Math.min(Math.abs(A),Math.abs(A-t)),n=Math.min(Math.abs(e),Math.abs(e-s)));break;case 2:if(r.shape===0)i=n=Math.min(He(A,e),He(A,e-s),He(A-t,e),He(A-t,e-s));else if(r.shape===1){var o=Math.min(Math.abs(e),Math.abs(e-s))/Math.min(Math.abs(A),Math.abs(A-t)),a=ih(t,s,A,e,!0),l=a[0],c=a[1];i=He(l-A,(c-e)/o),n=o*i}break;case 1:r.shape===0?i=n=Math.max(Math.abs(A),Math.abs(A-t),Math.abs(e),Math.abs(e-s)):r.shape===1&&(i=Math.max(Math.abs(A),Math.abs(A-t)),n=Math.max(Math.abs(e),Math.abs(e-s)));break;case 3:if(r.shape===0)i=n=Math.max(He(A,e),He(A,e-s),He(A-t,e),He(A-t,e-s));else if(r.shape===1){var o=Math.max(Math.abs(e),Math.abs(e-s))/Math.max(Math.abs(A),Math.abs(A-t)),u=ih(t,s,A,e,!1),l=u[0],c=u[1];i=He(l-A,(c-e)/o),n=o*i}break}return Array.isArray(r.size)&&(i=LA(r.size[0],t),n=r.size.length===2?LA(r.size[1],s):i),[i,n]},Sw=function(r,A){var e=ve(180),t=[];return Ne(A).forEach(function(s,i){if(i===0){var n=s[0];if(n.type===20&&n.value==="to"){e=Ah(s);return}else if(jc(n)){e=Xs.parse(r,n);return}}var o=Js(r,s);t.push(o)}),{angle:e,stops:t,type:1}},Zs=function(r,A){var e=ve(180),t=[];return Ne(A).forEach(function(s,i){if(i===0){var n=s[0];if(n.type===20&&["top","left","right","bottom"].indexOf(n.value)!==-1){e=Ah(s);return}else if(jc(n)){e=(Xs.parse(r,n)+ve(270))%ve(360);return}}var o=Js(r,s);t.push(o)}),{angle:e,stops:t,type:1}},Hw=function(r,A){var e=ve(180),t=[],s=1,i=0,n=3,o=[];return Ne(A).forEach(function(a,l){var c=a[0];if(l===0){if(SA(c)&&c.value==="linear"){s=1;return}else if(SA(c)&&c.value==="radial"){s=2;return}}if(c.type===18){if(c.name==="from"){var u=ot.parse(r,c.values[0]);t.push({stop:qA,color:u})}else if(c.name==="to"){var u=ot.parse(r,c.values[0]);t.push({stop:nt,color:u})}else if(c.name==="color-stop"){var d=c.values.filter(Pt);if(d.length===2){var u=ot.parse(r,d[1]),g=d[0];Vt(g)&&t.push({stop:{type:16,number:g.number*100,flags:g.flags},color:u})}}}}),s===1?{angle:(e+ve(180))%ve(360),stops:t,type:s}:{size:n,shape:i,stops:t,position:o,type:s}},nh="closest-side",oh="farthest-side",ah="closest-corner",lh="farthest-corner",ch="circle",hh="ellipse",uh="cover",fh="contain",Lw=function(r,A){var e=0,t=3,s=[],i=[];return Ne(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(ro),u;case"top":case"left":return i.push(qA),u;case"right":case"bottom":return i.push(nt),u}else(WA(d)||it(d))&&i.push(d);else if(SA(d))switch(d.value){case ch:return e=0,!1;case hh:return e=1,!1;case"at":return l=!0,!1;case nh:return t=0,!1;case uh:case oh:return t=1,!1;case fh:case ah:return t=2,!1;case lh:return t=3,!1}else if(it(d)||WA(d))return Array.isArray(t)||(t=[]),t.push(d),!1;return u},a)}if(a){var c=Js(r,n);s.push(c)}}),{size:t,shape:e,stops:s,position:i,type:2}},Ys=function(r,A){var e=0,t=3,s=[],i=[];return Ne(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(ro),!1;case"top":case"left":return i.push(qA),!1;case"right":case"bottom":return i.push(nt),!1}else if(WA(u)||it(u))return i.push(u),!1;return c},a):o===1&&(a=n.reduce(function(c,u){if(SA(u))switch(u.value){case ch:return e=0,!1;case hh:return e=1,!1;case fh:case nh:return t=0,!1;case oh:return t=1,!1;case ah:return t=2,!1;case uh:case lh:return t=3,!1}else if(it(u)||WA(u))return Array.isArray(t)||(t=[]),t.push(u),!1;return c},a)),a){var l=Js(r,n);s.push(l)}}),{size:t,shape:e,stops:s,position:i,type:2}},Iw=function(r){return r.type===1},Tw=function(r){return r.type===2},io={name:"image",parse:function(r,A){if(A.type===22){var e={url:A.value,type:0};return r.cache.addImage(A.value),e}if(A.type===18){var t=dh[A.name];if(typeof t>"u")throw new Error('Attempting to parse an unsupported image function "'+A.name+'"');return t(r,A.values)}throw new Error("Unsupported image type "+A.type)}};function Mw(r){return!(r.type===20&&r.value==="none")&&(r.type!==18||!!dh[r.name])}var dh={"linear-gradient":Sw,"-moz-linear-gradient":Zs,"-ms-linear-gradient":Zs,"-o-linear-gradient":Zs,"-webkit-linear-gradient":Zs,"radial-gradient":Lw,"-moz-radial-gradient":Ys,"-ms-radial-gradient":Ys,"-o-radial-gradient":Ys,"-webkit-radial-gradient":Ys,"-webkit-gradient":Hw},Dw={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(r,A){if(A.length===0)return[];var e=A[0];return e.type===20&&e.value==="none"?[]:A.filter(function(t){return Pt(t)&&Mw(t)}).map(function(t){return io.parse(r,t)})}},Ow={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(r,A){return A.map(function(e){if(SA(e))switch(e.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},kw={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(r,A){return Ne(A).map(function(e){return e.filter(WA)}).map(Jc)}},_w={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(r,A){return Ne(A).map(function(e){return e.filter(SA).map(function(t){return t.value}).join(" ")}).map(Nw)}},Nw=function(r){switch(r){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}},Gt;(function(r){r.AUTO="auto",r.CONTAIN="contain",r.COVER="cover"})(Gt||(Gt={}));var Kw={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(r,A){return Ne(A).map(function(e){return e.filter(Vw)})}},Vw=function(r){return SA(r)||WA(r)},qs=function(r){return{name:"border-"+r+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},Pw=qs("top"),Gw=qs("right"),Rw=qs("bottom"),Ww=qs("left"),$s=function(r){return{name:"border-radius-"+r,initialValue:"0 0",prefix:!1,type:1,parse:function(A,e){return Jc(e.filter(WA))}}},zw=$s("top-left"),Xw=$s("top-right"),Jw=$s("bottom-right"),Zw=$s("bottom-left"),js=function(r){return{name:"border-"+r+"-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}}},Yw=js("top"),qw=js("right"),$w=js("bottom"),jw=js("left"),Ai=function(r){return{name:"border-"+r+"-width",initialValue:"0",type:0,prefix:!1,parse:function(A,e){return xr(e)?e.number:0}}},A1=Ai("top"),e1=Ai("right"),t1=Ai("bottom"),r1=Ai("left"),s1={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},i1={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(r,A){return A==="rtl"?1:0}},n1={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(r,A){return A.filter(SA).reduce(function(e,t){return e|o1(t.value)},0)}},o1=function(r){switch(r){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},a1={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(r,A){switch(A){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},l1={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(r,A){return A.type===20&&A.value==="normal"?0:A.type===17||A.type===15?A.number:0}},ei;(function(r){r.NORMAL="normal",r.STRICT="strict"})(ei||(ei={}));var c1={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(r,A){return A==="strict"?ei.STRICT:ei.NORMAL}},h1={name:"line-height",initialValue:"normal",prefix:!1,type:4},Bh=function(r,A){return SA(r)&&r.value==="normal"?1.2*A:r.type===17?A*r.number:WA(r)?LA(r,A):A},u1={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(r,A){return A.type===20&&A.value==="none"?null:io.parse(r,A)}},f1={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(r,A){return A==="inside"?0:1}},no={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(r,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}}},ti=function(r){return{name:"margin-"+r,initialValue:"0",prefix:!1,type:4}},d1=ti("top"),B1=ti("right"),g1=ti("bottom"),p1=ti("left"),w1={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(r,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}})}},m1={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(r,A){return A==="break-word"?"break-word":"normal"}},ri=function(r){return{name:"padding-"+r,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},C1=ri("top"),v1=ri("right"),b1=ri("bottom"),Q1=ri("left"),F1={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(r,A){switch(A){case"right":return 2;case"center":case"justify":return 1;default:return 0}}},y1={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(r,A){switch(A){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},U1={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(r,A){return A.length===1&&to(A[0],"none")?[]:Ne(A).map(function(e){for(var t={color:qe.TRANSPARENT,offsetX:qA,offsetY:qA,blur:qA},s=0,i=0;i<e.length;i++){var n=e[i];it(n)?(s===0?t.offsetX=n:s===1?t.offsetY=n:t.blur=n,s++):t.color=ot.parse(r,n)}return t})}},E1={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(r,A){switch(A){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},x1={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(r,A){if(A.type===20&&A.value==="none")return null;if(A.type===18){var e=L1[A.name];if(typeof e>"u")throw new Error('Attempting to parse an unsupported transform function "'+A.name+'"');return e(A.values)}return null}},S1=function(r){var A=r.filter(function(e){return e.type===17}).map(function(e){return e.number});return A.length===6?A:null},H1=function(r){var A=r.filter(function(a){return a.type===17}).map(function(a){return a.number}),e=A[0],t=A[1];A[2],A[3];var s=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,s,i,n,o]:null},L1={matrix:S1,matrix3d:H1},gh={type:16,number:50,flags:Qr},I1=[gh,gh],T1={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(r,A){var e=A.filter(WA);return e.length!==2?I1:[e[0],e[1]]}},M1={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(r,A){switch(A){case"hidden":return 1;case"collapse":return 2;default:return 0}}},Lr;(function(r){r.NORMAL="normal",r.BREAK_ALL="break-all",r.KEEP_ALL="keep-all"})(Lr||(Lr={}));for(var D1={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(r,A){switch(A){case"break-all":return Lr.BREAK_ALL;case"keep-all":return Lr.KEEP_ALL;default:return Lr.NORMAL}}},O1={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(r,A){if(A.type===20)return{auto:!0,order:0};if(Vt(A))return{auto:!1,order:A.number};throw new Error("Invalid z-index number parsed")}},ph={name:"time",parse:function(r,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")}},k1={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(r,A){return Vt(A)?A.number:1}},_1={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},N1={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(r,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})}},K1={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(r,A){var e=[],t=[];return A.forEach(function(s){switch(s.type){case 20:case 0:e.push(s.value);break;case 17:e.push(s.number.toString());break;case 4:t.push(e.join(" ")),e.length=0;break}}),e.length&&t.push(e.join(" ")),t.map(function(s){return s.indexOf(" ")===-1?s:"'"+s+"'"})}},V1={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},P1={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(r,A){return Vt(A)?A.number:SA(A)&&A.value==="bold"?700:400}},G1={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(r,A){return A.filter(SA).map(function(e){return e.value})}},R1={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(r,A){switch(A){case"oblique":return"oblique";case"italic":return"italic";default:return"normal"}}},zA=function(r,A){return(r&A)!==0},W1={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(r,A){if(A.length===0)return[];var e=A[0];return e.type===20&&e.value==="none"?[]:A}},z1={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(r,A){if(A.length===0)return null;var e=A[0];if(e.type===20&&e.value==="none")return null;for(var t=[],s=A.filter(Xc),i=0;i<s.length;i++){var n=s[i],o=s[i+1];if(n.type===20){var a=o&&Vt(o)?o.number:1;t.push({counter:n.value,increment:a})}}return t}},X1={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(r,A){if(A.length===0)return[];for(var e=[],t=A.filter(Xc),s=0;s<t.length;s++){var i=t[s],n=t[s+1];if(SA(i)&&i.value!=="none"){var o=n&&Vt(n)?n.number:0;e.push({counter:i.value,reset:o})}}return e}},J1={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(r,A){return A.filter(xr).map(function(e){return ph.parse(r,e)})}},Z1={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(r,A){if(A.length===0)return null;var e=A[0];if(e.type===20&&e.value==="none")return null;var t=[],s=A.filter(vw);if(s.length%2!==0)return null;for(var i=0;i<s.length;i+=2){var n=s[i].value,o=s[i+1].value;t.push({open:n,close:o})}return t}},wh=function(r,A,e){if(!r)return"";var t=r[Math.min(A,r.length-1)];return t?e?t.open:t.close:""},Y1={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(r,A){return A.length===1&&to(A[0],"none")?[]:Ne(A).map(function(e){for(var t={color:255,offsetX:qA,offsetY:qA,blur:qA,spread:qA,inset:!1},s=0,i=0;i<e.length;i++){var n=e[i];to(n,"inset")?t.inset=!0:it(n)?(s===0?t.offsetX=n:s===1?t.offsetY=n:s===2?t.blur=n:t.spread=n,s++):t.color=ot.parse(r,n)}return t})}},q1={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(r,A){var e=[0,1,2],t=[];return A.filter(SA).forEach(function(s){switch(s.value){case"stroke":t.push(1);break;case"fill":t.push(0);break;case"markers":t.push(2);break}}),e.forEach(function(s){t.indexOf(s)===-1&&t.push(s)}),t}},$1={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},j1={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(r,A){return xr(A)?A.number:0}},Am=(function(){function r(A,e){var t,s;this.animationDuration=G(A,J1,e.animationDuration),this.backgroundClip=G(A,Fw,e.backgroundClip),this.backgroundColor=G(A,yw,e.backgroundColor),this.backgroundImage=G(A,Dw,e.backgroundImage),this.backgroundOrigin=G(A,Ow,e.backgroundOrigin),this.backgroundPosition=G(A,kw,e.backgroundPosition),this.backgroundRepeat=G(A,_w,e.backgroundRepeat),this.backgroundSize=G(A,Kw,e.backgroundSize),this.borderTopColor=G(A,Pw,e.borderTopColor),this.borderRightColor=G(A,Gw,e.borderRightColor),this.borderBottomColor=G(A,Rw,e.borderBottomColor),this.borderLeftColor=G(A,Ww,e.borderLeftColor),this.borderTopLeftRadius=G(A,zw,e.borderTopLeftRadius),this.borderTopRightRadius=G(A,Xw,e.borderTopRightRadius),this.borderBottomRightRadius=G(A,Jw,e.borderBottomRightRadius),this.borderBottomLeftRadius=G(A,Zw,e.borderBottomLeftRadius),this.borderTopStyle=G(A,Yw,e.borderTopStyle),this.borderRightStyle=G(A,qw,e.borderRightStyle),this.borderBottomStyle=G(A,$w,e.borderBottomStyle),this.borderLeftStyle=G(A,jw,e.borderLeftStyle),this.borderTopWidth=G(A,A1,e.borderTopWidth),this.borderRightWidth=G(A,e1,e.borderRightWidth),this.borderBottomWidth=G(A,t1,e.borderBottomWidth),this.borderLeftWidth=G(A,r1,e.borderLeftWidth),this.boxShadow=G(A,Y1,e.boxShadow),this.color=G(A,s1,e.color),this.direction=G(A,i1,e.direction),this.display=G(A,n1,e.display),this.float=G(A,a1,e.cssFloat),this.fontFamily=G(A,K1,e.fontFamily),this.fontSize=G(A,V1,e.fontSize),this.fontStyle=G(A,R1,e.fontStyle),this.fontVariant=G(A,G1,e.fontVariant),this.fontWeight=G(A,P1,e.fontWeight),this.letterSpacing=G(A,l1,e.letterSpacing),this.lineBreak=G(A,c1,e.lineBreak),this.lineHeight=G(A,h1,e.lineHeight),this.listStyleImage=G(A,u1,e.listStyleImage),this.listStylePosition=G(A,f1,e.listStylePosition),this.listStyleType=G(A,no,e.listStyleType),this.marginTop=G(A,d1,e.marginTop),this.marginRight=G(A,B1,e.marginRight),this.marginBottom=G(A,g1,e.marginBottom),this.marginLeft=G(A,p1,e.marginLeft),this.opacity=G(A,k1,e.opacity);var i=G(A,w1,e.overflow);this.overflowX=i[0],this.overflowY=i[i.length>1?1:0],this.overflowWrap=G(A,m1,e.overflowWrap),this.paddingTop=G(A,C1,e.paddingTop),this.paddingRight=G(A,v1,e.paddingRight),this.paddingBottom=G(A,b1,e.paddingBottom),this.paddingLeft=G(A,Q1,e.paddingLeft),this.paintOrder=G(A,q1,e.paintOrder),this.position=G(A,y1,e.position),this.textAlign=G(A,F1,e.textAlign),this.textDecorationColor=G(A,_1,(t=e.textDecorationColor)!==null&&t!==void 0?t:e.color),this.textDecorationLine=G(A,N1,(s=e.textDecorationLine)!==null&&s!==void 0?s:e.textDecoration),this.textShadow=G(A,U1,e.textShadow),this.textTransform=G(A,E1,e.textTransform),this.transform=G(A,x1,e.transform),this.transformOrigin=G(A,T1,e.transformOrigin),this.visibility=G(A,M1,e.visibility),this.webkitTextStrokeColor=G(A,$1,e.webkitTextStrokeColor),this.webkitTextStrokeWidth=G(A,j1,e.webkitTextStrokeWidth),this.wordBreak=G(A,D1,e.wordBreak),this.zIndex=G(A,O1,e.zIndex)}return r.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},r.prototype.isTransparent=function(){return at(this.backgroundColor)},r.prototype.isTransformed=function(){return this.transform!==null},r.prototype.isPositioned=function(){return this.position!==0},r.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},r.prototype.isFloating=function(){return this.float!==0},r.prototype.isInlineLevel=function(){return zA(this.display,4)||zA(this.display,33554432)||zA(this.display,268435456)||zA(this.display,536870912)||zA(this.display,67108864)||zA(this.display,134217728)},r})(),em=(function(){function r(A,e){this.content=G(A,W1,e.content),this.quotes=G(A,Z1,e.quotes)}return r})(),mh=(function(){function r(A,e){this.counterIncrement=G(A,z1,e.counterIncrement),this.counterReset=G(A,X1,e.counterReset)}return r})(),G=function(r,A,e){var t=new Wc,s=e!==null&&typeof e<"u"?e.toString():A.initialValue;t.write(s);var i=new zc(t.read());switch(A.type){case 2:var n=i.parseComponentValue();return A.parse(r,SA(n)?n.value:A.initialValue);case 0:return A.parse(r,i.parseComponentValue());case 1:return A.parse(r,i.parseComponentValues());case 4:return i.parseComponentValue();case 3:switch(A.format){case"angle":return Xs.parse(r,i.parseComponentValue());case"color":return ot.parse(r,i.parseComponentValue());case"image":return io.parse(r,i.parseComponentValue());case"length":var o=i.parseComponentValue();return it(o)?o:qA;case"length-percentage":var a=i.parseComponentValue();return WA(a)?a:qA;case"time":return ph.parse(r,i.parseComponentValue())}break}},tm="data-html2canvas-debug",rm=function(r){var A=r.getAttribute(tm);switch(A){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},oo=function(r,A){var e=rm(r);return e===1||A===e},Ke=(function(){function r(A,e){if(this.context=A,this.textNodes=[],this.elements=[],this.flags=0,oo(e,3))debugger;this.styles=new Am(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=Es(this.context,e),oo(e,4)&&(this.flags|=16)}return r})(),sm="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=",Ch="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ir=typeof Uint8Array>"u"?[]:new Uint8Array(256),si=0;si<Ch.length;si++)Ir[Ch.charCodeAt(si)]=si;for(var im=function(r){var A=r.length*.75,e=r.length,t,s=0,i,n,o,a;r[r.length-1]==="="&&(A--,r[r.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=Ir[r.charCodeAt(t)],n=Ir[r.charCodeAt(t+1)],o=Ir[r.charCodeAt(t+2)],a=Ir[r.charCodeAt(t+3)],c[s++]=i<<2|n>>4,c[s++]=(n&15)<<4|o>>2,c[s++]=(o&3)<<6|a&63;return l},nm=function(r){for(var A=r.length,e=[],t=0;t<A;t+=2)e.push(r[t+1]<<8|r[t]);return e},om=function(r){for(var A=r.length,e=[],t=0;t<A;t+=4)e.push(r[t+3]<<24|r[t+2]<<16|r[t+1]<<8|r[t]);return e},Ft=5,ao=11,lo=2,am=ao-Ft,vh=65536>>Ft,lm=1<<Ft,co=lm-1,cm=1024>>Ft,hm=vh+cm,um=hm,fm=32,dm=um+fm,Bm=65536>>ao,gm=1<<am,pm=gm-1,bh=function(r,A,e){return r.slice?r.slice(A,e):new Uint16Array(Array.prototype.slice.call(r,A,e))},wm=function(r,A,e){return r.slice?r.slice(A,e):new Uint32Array(Array.prototype.slice.call(r,A,e))},mm=function(r,A){var e=im(r),t=Array.isArray(e)?om(e):new Uint32Array(e),s=Array.isArray(e)?nm(e):new Uint16Array(e),i=24,n=bh(s,i/2,t[4]/2),o=t[5]===2?bh(s,(i+t[4])/2):wm(t,Math.ceil((i+t[4])/4));return new Cm(t[0],t[1],t[2],t[3],n,o)},Cm=(function(){function r(A,e,t,s,i,n){this.initialValue=A,this.errorValue=e,this.highStart=t,this.highValueIndex=s,this.index=i,this.data=n}return r.prototype.get=function(A){var e;if(A>=0){if(A<55296||A>56319&&A<=65535)return e=this.index[A>>Ft],e=(e<<lo)+(A&co),this.data[e];if(A<=65535)return e=this.index[vh+(A-55296>>Ft)],e=(e<<lo)+(A&co),this.data[e];if(A<this.highStart)return e=dm-Bm+(A>>ao),e=this.index[e],e+=A>>Ft&pm,e=this.index[e],e=(e<<lo)+(A&co),this.data[e];if(A<=1114111)return this.data[this.highValueIndex]}return this.errorValue},r})(),Qh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",vm=typeof Uint8Array>"u"?[]:new Uint8Array(256),ii=0;ii<Qh.length;ii++)vm[Qh.charCodeAt(ii)]=ii;var bm=1,ho=2,uo=3,Fh=4,yh=5,Qm=7,Uh=8,fo=9,Bo=10,Eh=11,xh=12,Sh=13,Hh=14,go=15,Fm=function(r){for(var A=[],e=0,t=r.length;e<t;){var s=r.charCodeAt(e++);if(s>=55296&&s<=56319&&e<t){var i=r.charCodeAt(e++);(i&64512)===56320?A.push(((s&1023)<<10)+(i&1023)+65536):(A.push(s),e--)}else A.push(s)}return A},ym=function(){for(var r=[],A=0;A<arguments.length;A++)r[A]=arguments[A];if(String.fromCodePoint)return String.fromCodePoint.apply(String,r);var e=r.length;if(!e)return"";for(var t=[],s=-1,i="";++s<e;){var n=r[s];n<=65535?t.push(n):(n-=65536,t.push((n>>10)+55296,n%1024+56320)),(s+1===e||t.length>16384)&&(i+=String.fromCharCode.apply(String,t),t.length=0)}return i},Um=mm(sm),be="×",po="÷",Em=function(r){return Um.get(r)},xm=function(r,A,e){var t=e-2,s=A[t],i=A[e-1],n=A[e];if(i===ho&&n===uo)return be;if(i===ho||i===uo||i===Fh||n===ho||n===uo||n===Fh)return po;if(i===Uh&&[Uh,fo,Eh,xh].indexOf(n)!==-1||(i===Eh||i===fo)&&(n===fo||n===Bo)||(i===xh||i===Bo)&&n===Bo||n===Sh||n===yh||n===Qm||i===bm)return be;if(i===Sh&&n===Hh){for(;s===yh;)s=A[--t];if(s===Hh)return be}if(i===go&&n===go){for(var o=0;s===go;)o++,s=A[--t];if(o%2===0)return be}return po},Sm=function(r){var A=Fm(r),e=A.length,t=0,s=0,i=A.map(Em);return{next:function(){if(t>=e)return{done:!0,value:null};for(var n=be;t<e&&(n=xm(A,i,++t))===be;);if(n!==be||t===e){var o=ym.apply(null,A.slice(s,t));return s=t,{value:o,done:!1}}return{done:!0,value:null}}}},Hm=function(r){for(var A=Sm(r),e=[],t;!(t=A.next()).done;)t.value&&e.push(t.value.slice());return e},Lm=function(r){var A=123;if(r.createRange){var e=r.createRange();if(e.getBoundingClientRect){var t=r.createElement("boundtest");t.style.height=A+"px",t.style.display="block",r.body.appendChild(t),e.selectNode(t);var s=e.getBoundingClientRect(),i=Math.round(s.height);if(r.body.removeChild(t),i===A)return!0}}return!1},Im=function(r){var A=r.createElement("boundtest");A.style.width="50px",A.style.display="block",A.style.fontSize="12px",A.style.letterSpacing="0px",A.style.wordSpacing="0px",r.body.appendChild(A);var e=r.createRange();A.innerHTML=typeof"".repeat=="function"?"&#128104;".repeat(10):"";var t=A.firstChild,s=xs(t.data).map(function(a){return VA(a)}),i=0,n={},o=s.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 r.body.removeChild(A),o},Tm=function(){return typeof new Image().crossOrigin<"u"},Mm=function(){return typeof new XMLHttpRequest().responseType=="string"},Dm=function(r){var A=new Image,e=r.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},Lh=function(r){return r[0]===0&&r[1]===255&&r[2]===0&&r[3]===255},Om=function(r){var A=r.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 s=new Image,i=A.toDataURL();s.src=i;var n=wo(e,e,0,0,s);return t.fillStyle="red",t.fillRect(0,0,e,e),Ih(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=r.createElement("div");return l.style.backgroundImage="url("+i+")",l.style.height=e+"px",Lh(a)?Ih(wo(e,e,0,0,l)):Promise.reject(!1)}).then(function(o){return t.drawImage(o,0,0),Lh(t.getImageData(0,0,e,e).data)}).catch(function(){return!1})},wo=function(r,A,e,t,s){var i="http://www.w3.org/2000/svg",n=document.createElementNS(i,"svg"),o=document.createElementNS(i,"foreignObject");return n.setAttributeNS(null,"width",r.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(s),n},Ih=function(r){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(r))})},$A={get SUPPORT_RANGE_BOUNDS(){var r=Lm(document);return Object.defineProperty($A,"SUPPORT_RANGE_BOUNDS",{value:r}),r},get SUPPORT_WORD_BREAKING(){var r=$A.SUPPORT_RANGE_BOUNDS&&Im(document);return Object.defineProperty($A,"SUPPORT_WORD_BREAKING",{value:r}),r},get SUPPORT_SVG_DRAWING(){var r=Dm(document);return Object.defineProperty($A,"SUPPORT_SVG_DRAWING",{value:r}),r},get SUPPORT_FOREIGNOBJECT_DRAWING(){var r=typeof Array.from=="function"&&typeof window.fetch=="function"?Om(document):Promise.resolve(!1);return Object.defineProperty($A,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:r}),r},get SUPPORT_CORS_IMAGES(){var r=Tm();return Object.defineProperty($A,"SUPPORT_CORS_IMAGES",{value:r}),r},get SUPPORT_RESPONSE_TYPE(){var r=Mm();return Object.defineProperty($A,"SUPPORT_RESPONSE_TYPE",{value:r}),r},get SUPPORT_CORS_XHR(){var r="withCredentials"in new XMLHttpRequest;return Object.defineProperty($A,"SUPPORT_CORS_XHR",{value:r}),r},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var r=!!(typeof Intl<"u"&&Intl.Segmenter);return Object.defineProperty($A,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:r}),r}},Tr=(function(){function r(A,e){this.text=A,this.bounds=e}return r})(),km=function(r,A,e,t){var s=Km(A,e),i=[],n=0;return s.forEach(function(o){if(e.textDecorationLine.length||o.trim().length>0)if($A.SUPPORT_RANGE_BOUNDS){var a=Th(t,n,o.length).getClientRects();if(a.length>1){var l=mo(o),c=0;l.forEach(function(d){i.push(new Tr(d,Ze.fromDOMRectList(r,Th(t,c+n,d.length).getClientRects()))),c+=d.length})}else i.push(new Tr(o,Ze.fromDOMRectList(r,a)))}else{var u=t.splitText(o.length);i.push(new Tr(o,_m(r,t))),t=u}else $A.SUPPORT_RANGE_BOUNDS||(t=t.splitText(o.length));n+=o.length}),i},_m=function(r,A){var e=A.ownerDocument;if(e){var t=e.createElement("html2canvaswrapper");t.appendChild(A.cloneNode(!0));var s=A.parentNode;if(s){s.replaceChild(t,A);var i=Es(r,t);return t.firstChild&&s.replaceChild(t.firstChild,t),i}}return Ze.EMPTY},Th=function(r,A,e){var t=r.ownerDocument;if(!t)throw new Error("Node has no owner document");var s=t.createRange();return s.setStart(r,A),s.setEnd(r,A+e),s},mo=function(r){if($A.SUPPORT_NATIVE_TEXT_SEGMENTATION){var A=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(A.segment(r)).map(function(e){return e.segment})}return Hm(r)},Nm=function(r,A){if($A.SUPPORT_NATIVE_TEXT_SEGMENTATION){var e=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(e.segment(r)).map(function(t){return t.segment})}return Pm(r,A)},Km=function(r,A){return A.letterSpacing!==0?mo(r):Nm(r,A)},Vm=[32,160,4961,65792,65793,4153,4241],Pm=function(r,A){for(var e=Bp(r,{lineBreak:A.lineBreak,wordBreak:A.overflowWrap==="break-word"?"break-word":A.wordBreak}),t=[],s,i=function(){if(s.value){var n=s.value.slice(),o=xs(n),a="";o.forEach(function(l){Vm.indexOf(l)===-1?a+=VA(l):(a.length&&t.push(a),t.push(VA(l)),a="")}),a.length&&t.push(a)}};!(s=e.next()).done;)i();return t},Gm=(function(){function r(A,e,t){this.text=Rm(e.data,t.textTransform),this.textBounds=km(A,this.text,t,e)}return r})(),Rm=function(r,A){switch(A){case 1:return r.toLowerCase();case 3:return r.replace(Wm,zm);case 2:return r.toUpperCase();default:return r}},Wm=/(^|\s|:|-|\(|\))([a-z])/g,zm=function(r,A,e){return r.length>0?A+e.toUpperCase():r},Mh=(function(r){Se(A,r);function A(e,t){var s=r.call(this,e,t)||this;return s.src=t.currentSrc||t.src,s.intrinsicWidth=t.naturalWidth,s.intrinsicHeight=t.naturalHeight,s.context.cache.addImage(s.src),s}return A})(Ke),Dh=(function(r){Se(A,r);function A(e,t){var s=r.call(this,e,t)||this;return s.canvas=t,s.intrinsicWidth=t.width,s.intrinsicHeight=t.height,s}return A})(Ke),Oh=(function(r){Se(A,r);function A(e,t){var s=r.call(this,e,t)||this,i=new XMLSerializer,n=Es(e,t);return t.setAttribute("width",n.width+"px"),t.setAttribute("height",n.height+"px"),s.svg="data:image/svg+xml,"+encodeURIComponent(i.serializeToString(t)),s.intrinsicWidth=t.width.baseVal.value,s.intrinsicHeight=t.height.baseVal.value,s.context.cache.addImage(s.svg),s}return A})(Ke),kh=(function(r){Se(A,r);function A(e,t){var s=r.call(this,e,t)||this;return s.value=t.value,s}return A})(Ke),Co=(function(r){Se(A,r);function A(e,t){var s=r.call(this,e,t)||this;return s.start=t.start,s.reversed=typeof t.reversed=="boolean"&&t.reversed===!0,s}return A})(Ke),Xm=[{type:15,flags:0,unit:"px",number:3}],Jm=[{type:16,flags:0,number:50}],Zm=function(r){return r.width>r.height?new Ze(r.left+(r.width-r.height)/2,r.top,r.height,r.height):r.width<r.height?new Ze(r.left,r.top+(r.height-r.width)/2,r.width,r.width):r},Ym=function(r){var A=r.type===qm?new Array(r.value.length+1).join("•"):r.value;return A.length===0?r.placeholder||"":A},ni="checkbox",oi="radio",qm="password",_h=707406591,vo=(function(r){Se(A,r);function A(e,t){var s=r.call(this,e,t)||this;switch(s.type=t.type.toLowerCase(),s.checked=t.checked,s.value=Ym(t),(s.type===ni||s.type===oi)&&(s.styles.backgroundColor=3739148031,s.styles.borderTopColor=s.styles.borderRightColor=s.styles.borderBottomColor=s.styles.borderLeftColor=2779096575,s.styles.borderTopWidth=s.styles.borderRightWidth=s.styles.borderBottomWidth=s.styles.borderLeftWidth=1,s.styles.borderTopStyle=s.styles.borderRightStyle=s.styles.borderBottomStyle=s.styles.borderLeftStyle=1,s.styles.backgroundClip=[0],s.styles.backgroundOrigin=[0],s.bounds=Zm(s.bounds)),s.type){case ni:s.styles.borderTopRightRadius=s.styles.borderTopLeftRadius=s.styles.borderBottomRightRadius=s.styles.borderBottomLeftRadius=Xm;break;case oi:s.styles.borderTopRightRadius=s.styles.borderTopLeftRadius=s.styles.borderBottomRightRadius=s.styles.borderBottomLeftRadius=Jm;break}return s}return A})(Ke),Nh=(function(r){Se(A,r);function A(e,t){var s=r.call(this,e,t)||this,i=t.options[t.selectedIndex||0];return s.value=i&&i.text||"",s}return A})(Ke),Kh=(function(r){Se(A,r);function A(e,t){var s=r.call(this,e,t)||this;return s.value=t.value,s}return A})(Ke),Vh=(function(r){Se(A,r);function A(e,t){var s=r.call(this,e,t)||this;s.src=t.src,s.width=parseInt(t.width,10)||0,s.height=parseInt(t.height,10)||0,s.backgroundColor=s.styles.backgroundColor;try{if(t.contentWindow&&t.contentWindow.document&&t.contentWindow.document.documentElement){s.tree=Gh(e,t.contentWindow.document.documentElement);var i=t.contentWindow.document.documentElement?Hr(e,getComputedStyle(t.contentWindow.document.documentElement).backgroundColor):qe.TRANSPARENT,n=t.contentWindow.document.body?Hr(e,getComputedStyle(t.contentWindow.document.body).backgroundColor):qe.TRANSPARENT;s.backgroundColor=at(i)?at(n)?s.styles.backgroundColor:n:i}}catch{}return s}return A})(Ke),$m=["OL","UL","MENU"],ai=function(r,A,e,t){for(var s=A.firstChild,i=void 0;s;s=i)if(i=s.nextSibling,Rh(s)&&s.data.trim().length>0)e.textNodes.push(new Gm(r,s,e.styles));else if(Rt(s))if(Yh(s)&&s.assignedNodes)s.assignedNodes().forEach(function(o){return ai(r,o,e,t)});else{var n=Ph(r,s);n.styles.isVisible()&&(jm(s,n,t)?n.flags|=4:AC(n.styles)&&(n.flags|=2),$m.indexOf(s.tagName)!==-1&&(n.flags|=8),e.elements.push(n),s.slot,s.shadowRoot?ai(r,s.shadowRoot,n,t):!ci(s)&&!Wh(s)&&!hi(s)&&ai(r,s,n,t))}},Ph=function(r,A){return Fo(A)?new Mh(r,A):zh(A)?new Dh(r,A):Wh(A)?new Oh(r,A):eC(A)?new kh(r,A):tC(A)?new Co(r,A):rC(A)?new vo(r,A):hi(A)?new Nh(r,A):ci(A)?new Kh(r,A):Jh(A)?new Vh(r,A):new Ke(r,A)},Gh=function(r,A){var e=Ph(r,A);return e.flags|=4,ai(r,A,e,e),e},jm=function(r,A,e){return A.styles.isPositionedWithZIndex()||A.styles.opacity<1||A.styles.isTransformed()||Qo(r)&&e.styles.isTransparent()},AC=function(r){return r.isPositioned()||r.isFloating()},Rh=function(r){return r.nodeType===Node.TEXT_NODE},Rt=function(r){return r.nodeType===Node.ELEMENT_NODE},bo=function(r){return Rt(r)&&typeof r.style<"u"&&!li(r)},li=function(r){return typeof r.className=="object"},eC=function(r){return r.tagName==="LI"},tC=function(r){return r.tagName==="OL"},rC=function(r){return r.tagName==="INPUT"},sC=function(r){return r.tagName==="HTML"},Wh=function(r){return r.tagName==="svg"},Qo=function(r){return r.tagName==="BODY"},zh=function(r){return r.tagName==="CANVAS"},Xh=function(r){return r.tagName==="VIDEO"},Fo=function(r){return r.tagName==="IMG"},Jh=function(r){return r.tagName==="IFRAME"},Zh=function(r){return r.tagName==="STYLE"},iC=function(r){return r.tagName==="SCRIPT"},ci=function(r){return r.tagName==="TEXTAREA"},hi=function(r){return r.tagName==="SELECT"},Yh=function(r){return r.tagName==="SLOT"},qh=function(r){return r.tagName.indexOf("-")>0},nC=(function(){function r(){this.counters={}}return r.prototype.getCounterValue=function(A){var e=this.counters[A];return e&&e.length?e[e.length-1]:1},r.prototype.getCounterValues=function(A){var e=this.counters[A];return e||[]},r.prototype.pop=function(A){var e=this;A.forEach(function(t){return e.counters[t].pop()})},r.prototype.parse=function(A){var e=this,t=A.counterIncrement,s=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&&s.forEach(function(o){var a=e.counters[o.counter];n.push(o.counter),a||(a=e.counters[o.counter]=[]),a.push(o.reset)}),n},r})(),$h={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"]},jh={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:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},oC={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:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},aC={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:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","ყ","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},Wt=function(r,A,e,t,s,i){return r<A||r>e?Dr(r,s,i.length>0):t.integers.reduce(function(n,o,a){for(;r>=o;)r-=o,n+=t.values[a];return n},"")+i},Au=function(r,A,e,t){var s="";do e||r--,s=t(r)+s,r/=A;while(r*A>=A);return s},PA=function(r,A,e,t,s){var i=e-A+1;return(r<0?"-":"")+(Au(Math.abs(r),i,t,function(n){return VA(Math.floor(n%i)+A)})+s)},yt=function(r,A,e){e===void 0&&(e=". ");var t=A.length;return Au(Math.abs(r),t,!1,function(s){return A[Math.floor(s%t)]})+e},zt=1,ct=2,ht=4,Mr=8,$e=function(r,A,e,t,s,i){if(r<-9999||r>9999)return Dr(r,4,s.length>0);var n=Math.abs(r),o=s;if(n===0)return A[0]+o;for(var a=0;n>0&&a<=4;a++){var l=n%10;l===0&&zA(i,zt)&&o!==""?o=A[l]+o:l>1||l===1&&a===0||l===1&&a===1&&zA(i,ct)||l===1&&a===1&&zA(i,ht)&&r>100||l===1&&a>1&&zA(i,Mr)?o=A[l]+(a>0?e[a-1]:"")+o:l===1&&a>0&&(o=e[a-1]+o),n=Math.floor(n/10)}return(r<0?t:"")+o},eu="十百千萬",tu="拾佰仟萬",ru="マイナス",yo="마이너스",Dr=function(r,A,e){var t=e?". ":"",s=e?"、":"",i=e?", ":"",n=e?" ":"";switch(A){case 0:return"•"+n;case 1:return"◦"+n;case 2:return"◾"+n;case 5:var o=PA(r,48,57,!0,t);return o.length<4?"0"+o:o;case 4:return yt(r,"〇一二三四五六七八九",s);case 6:return Wt(r,1,3999,$h,3,t).toLowerCase();case 7:return Wt(r,1,3999,$h,3,t);case 8:return PA(r,945,969,!1,t);case 9:return PA(r,97,122,!1,t);case 10:return PA(r,65,90,!1,t);case 11:return PA(r,1632,1641,!0,t);case 12:case 49:return Wt(r,1,9999,jh,3,t);case 35:return Wt(r,1,9999,jh,3,t).toLowerCase();case 13:return PA(r,2534,2543,!0,t);case 14:case 30:return PA(r,6112,6121,!0,t);case 15:return yt(r,"子丑寅卯辰巳午未申酉戌亥",s);case 16:return yt(r,"甲乙丙丁戊己庚辛壬癸",s);case 17:case 48:return $e(r,"零一二三四五六七八九",eu,"負",s,ct|ht|Mr);case 47:return $e(r,"零壹貳參肆伍陸柒捌玖",tu,"負",s,zt|ct|ht|Mr);case 42:return $e(r,"零一二三四五六七八九",eu,"负",s,ct|ht|Mr);case 41:return $e(r,"零壹贰叁肆伍陆柒捌玖",tu,"负",s,zt|ct|ht|Mr);case 26:return $e(r,"〇一二三四五六七八九","十百千万",ru,s,0);case 25:return $e(r,"零壱弐参四伍六七八九","拾百千万",ru,s,zt|ct|ht);case 31:return $e(r,"영일이삼사오육칠팔구","십백천만",yo,i,zt|ct|ht);case 33:return $e(r,"零一二三四五六七八九","十百千萬",yo,i,0);case 32:return $e(r,"零壹貳參四五六七八九","拾百千",yo,i,zt|ct|ht);case 18:return PA(r,2406,2415,!0,t);case 20:return Wt(r,1,19999,aC,3,t);case 21:return PA(r,2790,2799,!0,t);case 22:return PA(r,2662,2671,!0,t);case 22:return Wt(r,1,10999,oC,3,t);case 23:return yt(r,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case 24:return yt(r,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case 27:return PA(r,3302,3311,!0,t);case 28:return yt(r,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",s);case 29:return yt(r,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",s);case 34:return PA(r,3792,3801,!0,t);case 37:return PA(r,6160,6169,!0,t);case 38:return PA(r,4160,4169,!0,t);case 39:return PA(r,2918,2927,!0,t);case 40:return PA(r,1776,1785,!0,t);case 43:return PA(r,3046,3055,!0,t);case 44:return PA(r,3174,3183,!0,t);case 45:return PA(r,3664,3673,!0,t);case 46:return PA(r,3872,3881,!0,t);default:return PA(r,48,57,!0,t)}},su="data-html2canvas-ignore",iu=(function(){function r(A,e,t){if(this.context=A,this.options=t,this.scrolledElements=[],this.referenceElement=e,this.counters=new nC,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 r.prototype.toIFrame=function(A,e){var t=this,s=lC(A,e);if(!s.contentWindow)return Promise.reject("Unable to find iframe window");var i=A.defaultView.pageXOffset,n=A.defaultView.pageYOffset,o=s.contentWindow,a=o.document,l=uC(s).then(function(){return oe(t,void 0,void 0,function(){var c,u;return te(this,function(d){switch(d.label){case 0:return this.scrolledElements.forEach(gC),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,hC(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 s})]:[2,s]}})})});return a.open(),a.write(dC(document.doctype)+"<html></html>"),BC(this.referenceElement.ownerDocument,i,n),a.replaceChild(a.adoptNode(this.documentElement),a.documentElement),a.close(),l},r.prototype.createElementClone=function(A){if(oo(A,2))debugger;if(zh(A))return this.createCanvasClone(A);if(Xh(A))return this.createVideoClone(A);if(Zh(A))return this.createStyleClone(A);var e=A.cloneNode(!1);return Fo(e)&&(Fo(A)&&A.currentSrc&&A.currentSrc!==A.src&&(e.src=A.currentSrc,e.srcset=""),e.loading==="lazy"&&(e.loading="eager")),qh(e)?this.createCustomElementClone(e):e},r.prototype.createCustomElementClone=function(A){var e=document.createElement("html2canvascustomelement");return Uo(A.style,e),e},r.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},""),s=A.cloneNode(!1);return s.textContent=t,s}}catch(i){if(this.context.logger.error("Unable to access cssRules property",i),i.name!=="SecurityError")throw i}return A.cloneNode(!1)},r.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 s=A.cloneNode(!1);try{s.width=A.width,s.height=A.height;var i=A.getContext("2d"),n=s.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 s}catch{this.context.logger.info("Unable to clone canvas as it is tainted",A)}return s},r.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 s=A.ownerDocument.createElement("canvas");return s.width=A.offsetWidth,s.height=A.offsetHeight,s},r.prototype.appendChildNode=function(A,e,t){(!Rt(e)||!iC(e)&&!e.hasAttribute(su)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(e)))&&(!this.options.copyStyles||!Rt(e)||!Zh(e))&&A.appendChild(this.cloneNode(e,t))},r.prototype.cloneChildNodes=function(A,e,t){for(var s=this,i=A.shadowRoot?A.shadowRoot.firstChild:A.firstChild;i;i=i.nextSibling)if(Rt(i)&&Yh(i)&&typeof i.assignedNodes=="function"){var n=i.assignedNodes();n.length&&n.forEach(function(o){return s.appendChildNode(e,o,t)})}else this.appendChildNode(e,i,t)},r.prototype.cloneNode=function(A,e){if(Rh(A))return document.createTextNode(A.data);if(!A.ownerDocument)return A.cloneNode(!1);var t=A.ownerDocument.defaultView;if(t&&Rt(A)&&(bo(A)||li(A))){var s=this.createElementClone(A);s.style.transitionProperty="none";var i=t.getComputedStyle(A),n=t.getComputedStyle(A,":before"),o=t.getComputedStyle(A,":after");this.referenceElement===A&&bo(s)&&(this.clonedReferenceElement=s),Qo(s)&&mC(s);var a=this.counters.parse(new mh(this.context,i)),l=this.resolvePseudoContent(A,s,n,Or.BEFORE);qh(A)&&(e=!0),Xh(A)||this.cloneChildNodes(A,s,e),l&&s.insertBefore(l,s.firstChild);var c=this.resolvePseudoContent(A,s,o,Or.AFTER);return c&&s.appendChild(c),this.counters.pop(a),(i&&(this.options.copyStyles||li(A))&&!Jh(A)||e)&&Uo(i,s),(A.scrollTop!==0||A.scrollLeft!==0)&&this.scrolledElements.push([s,A.scrollLeft,A.scrollTop]),(ci(A)||hi(A))&&(ci(s)||hi(s))&&(s.value=A.value),s}return A.cloneNode(!1)},r.prototype.resolvePseudoContent=function(A,e,t,s){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 mh(this.context,t));var a=new em(this.context,t),l=o.createElement("html2canvaspseudoelement");Uo(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(Pt),f=B[0],w=B[1];if(f&&SA(f)){var m=i.counters.getCounterValue(f.value),p=w&&SA(w)?no.parse(i.context,w.value):3;l.appendChild(o.createTextNode(Dr(m,p,!1)))}}else if(u.name==="counters"){var v=u.values.filter(Pt),f=v[0],y=v[1],w=v[2];if(f&&SA(f)){var E=i.counters.getCounterValues(f.value),U=w&&SA(w)?no.parse(i.context,w.value):3,I=y&&y.type===0?y.value:"",O=E.map(function(M){return Dr(M,U,!1)}).join(I);l.appendChild(o.createTextNode(O))}}}else if(u.type===20)switch(u.value){case"open-quote":l.appendChild(o.createTextNode(wh(a.quotes,i.quoteDepth++,!0)));break;case"close-quote":l.appendChild(o.createTextNode(wh(a.quotes,--i.quoteDepth,!1)));break;default:l.appendChild(o.createTextNode(u.value))}}),l.className=Eo+" "+xo;var c=s===Or.BEFORE?" "+Eo:" "+xo;return li(e)?e.className.baseValue+=c:e.className+=c,l}}},r.destroy=function(A){return A.parentNode?(A.parentNode.removeChild(A),!0):!1},r})(),Or;(function(r){r[r.BEFORE=0]="BEFORE",r[r.AFTER=1]="AFTER"})(Or||(Or={}));var lC=function(r,A){var e=r.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(su,"true"),r.body.appendChild(e),e},cC=function(r){return new Promise(function(A){if(r.complete){A();return}if(!r.src){A();return}r.onload=A,r.onerror=A})},hC=function(r){return Promise.all([].slice.call(r.images,0).map(cC))},uC=function(r){return new Promise(function(A,e){var t=r.contentWindow;if(!t)return e("No window assigned for iframe");var s=t.document;t.onload=r.onload=function(){t.onload=r.onload=null;var i=setInterval(function(){s.body.childNodes.length>0&&s.readyState==="complete"&&(clearInterval(i),A(r))},50)}})},fC=["all","d","content"],Uo=function(r,A){for(var e=r.length-1;e>=0;e--){var t=r.item(e);fC.indexOf(t)===-1&&A.style.setProperty(t,r.getPropertyValue(t))}return A},dC=function(r){var A="";return r&&(A+="<!DOCTYPE ",r.name&&(A+=r.name),r.internalSubset&&(A+=r.internalSubset),r.publicId&&(A+='"'+r.publicId+'"'),r.systemId&&(A+='"'+r.systemId+'"'),A+=">"),A},BC=function(r,A,e){r&&r.defaultView&&(A!==r.defaultView.pageXOffset||e!==r.defaultView.pageYOffset)&&r.defaultView.scrollTo(A,e)},gC=function(r){var A=r[0],e=r[1],t=r[2];A.scrollLeft=e,A.scrollTop=t},pC=":before",wC=":after",Eo="___html2canvas___pseudoelement_before",xo="___html2canvas___pseudoelement_after",nu=`{
7
- content: "" !important;
8
- display: none !important;
9
- }`,mC=function(r){CC(r,"."+Eo+pC+nu+`
10
- .`+xo+wC+nu)},CC=function(r,A){var e=r.ownerDocument;if(e){var t=e.createElement("style");t.textContent=A,r.appendChild(t)}},ou=(function(){function r(){}return r.getOrigin=function(A){var e=r._link;return e?(e.href=A,e.href=e.href,e.protocol+e.hostname+e.port):"about:blank"},r.isSameOrigin=function(A){return r.getOrigin(A)===r._origin},r.setContext=function(A){r._link=A.document.createElement("a"),r._origin=r.getOrigin(A.location.href)},r._origin="about:blank",r})(),vC=(function(){function r(A,e){this.context=A,this._options=e,this._cache={}}return r.prototype.addImage=function(A){var e=Promise.resolve();return this.has(A)||(Ho(A)||yC(A))&&(this._cache[A]=this.loadImage(A)).catch(function(){}),e},r.prototype.match=function(A){return this._cache[A]},r.prototype.loadImage=function(A){return oe(this,void 0,void 0,function(){var e,t,s,i,n=this;return te(this,function(o){switch(o.label){case 0:return e=ou.isSameOrigin(A),t=!So(A)&&this._options.useCORS===!0&&$A.SUPPORT_CORS_IMAGES&&!e,s=!So(A)&&!e&&!Ho(A)&&typeof this._options.proxy=="string"&&$A.SUPPORT_CORS_XHR&&!t,!e&&this._options.allowTaint===!1&&!So(A)&&!Ho(A)&&!s&&!t?[2]:(i=A,s?[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,(UC(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()]}})})},r.prototype.has=function(A){return typeof this._cache[A]<"u"},r.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},r.prototype.proxy=function(A){var e=this,t=this._options.proxy;if(!t)throw new Error("No proxy defined");var s=A.substring(0,256);return new Promise(function(i,n){var o=$A.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 "+s+" 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 "+s)}}a.send()})},r})(),bC=/^data:image\/svg\+xml/i,QC=/^data:image\/.*;base64,/i,FC=/^data:image\/.*/i,yC=function(r){return $A.SUPPORT_SVG_DRAWING||!EC(r)},So=function(r){return FC.test(r)},UC=function(r){return QC.test(r)},Ho=function(r){return r.substr(0,4)==="blob"},EC=function(r){return r.substr(-3).toLowerCase()==="svg"||bC.test(r)},K=(function(){function r(A,e){this.type=0,this.x=A,this.y=e}return r.prototype.add=function(A,e){return new r(this.x+A,this.y+e)},r})(),Xt=function(r,A,e){return new K(r.x+(A.x-r.x)*e,r.y+(A.y-r.y)*e)},ui=(function(){function r(A,e,t,s){this.type=1,this.start=A,this.startControl=e,this.endControl=t,this.end=s}return r.prototype.subdivide=function(A,e){var t=Xt(this.start,this.startControl,A),s=Xt(this.startControl,this.endControl,A),i=Xt(this.endControl,this.end,A),n=Xt(t,s,A),o=Xt(s,i,A),a=Xt(n,o,A);return e?new r(this.start,t,n,a):new r(a,o,i,this.end)},r.prototype.add=function(A,e){return new r(this.start.add(A,e),this.startControl.add(A,e),this.endControl.add(A,e),this.end.add(A,e))},r.prototype.reverse=function(){return new r(this.end,this.endControl,this.startControl,this.start)},r})(),Qe=function(r){return r.type===1},xC=(function(){function r(A){var e=A.styles,t=A.bounds,s=Sr(e.borderTopLeftRadius,t.width,t.height),i=s[0],n=s[1],o=Sr(e.borderTopRightRadius,t.width,t.height),a=o[0],l=o[1],c=Sr(e.borderBottomRightRadius,t.width,t.height),u=c[0],d=c[1],g=Sr(e.borderBottomLeftRadius,t.width,t.height),B=g[0],f=g[1],w=[];w.push((i+a)/t.width),w.push((B+u)/t.width),w.push((n+f)/t.height),w.push((l+d)/t.height);var m=Math.max.apply(Math,w);m>1&&(i/=m,n/=m,a/=m,l/=m,u/=m,d/=m,B/=m,f/=m);var p=t.width-a,v=t.height-d,y=t.width-u,E=t.height-f,U=e.borderTopWidth,I=e.borderRightWidth,O=e.borderBottomWidth,T=e.borderLeftWidth,lA=LA(e.paddingTop,A.bounds.width),M=LA(e.paddingRight,A.bounds.width),Z=LA(e.paddingBottom,A.bounds.width),S=LA(e.paddingLeft,A.bounds.width);this.topLeftBorderDoubleOuterBox=i>0||n>0?DA(t.left+T/3,t.top+U/3,i-T/3,n-U/3,yA.TOP_LEFT):new K(t.left+T/3,t.top+U/3),this.topRightBorderDoubleOuterBox=i>0||n>0?DA(t.left+p,t.top+U/3,a-I/3,l-U/3,yA.TOP_RIGHT):new K(t.left+t.width-I/3,t.top+U/3),this.bottomRightBorderDoubleOuterBox=u>0||d>0?DA(t.left+y,t.top+v,u-I/3,d-O/3,yA.BOTTOM_RIGHT):new K(t.left+t.width-I/3,t.top+t.height-O/3),this.bottomLeftBorderDoubleOuterBox=B>0||f>0?DA(t.left+T/3,t.top+E,B-T/3,f-O/3,yA.BOTTOM_LEFT):new K(t.left+T/3,t.top+t.height-O/3),this.topLeftBorderDoubleInnerBox=i>0||n>0?DA(t.left+T*2/3,t.top+U*2/3,i-T*2/3,n-U*2/3,yA.TOP_LEFT):new K(t.left+T*2/3,t.top+U*2/3),this.topRightBorderDoubleInnerBox=i>0||n>0?DA(t.left+p,t.top+U*2/3,a-I*2/3,l-U*2/3,yA.TOP_RIGHT):new K(t.left+t.width-I*2/3,t.top+U*2/3),this.bottomRightBorderDoubleInnerBox=u>0||d>0?DA(t.left+y,t.top+v,u-I*2/3,d-O*2/3,yA.BOTTOM_RIGHT):new K(t.left+t.width-I*2/3,t.top+t.height-O*2/3),this.bottomLeftBorderDoubleInnerBox=B>0||f>0?DA(t.left+T*2/3,t.top+E,B-T*2/3,f-O*2/3,yA.BOTTOM_LEFT):new K(t.left+T*2/3,t.top+t.height-O*2/3),this.topLeftBorderStroke=i>0||n>0?DA(t.left+T/2,t.top+U/2,i-T/2,n-U/2,yA.TOP_LEFT):new K(t.left+T/2,t.top+U/2),this.topRightBorderStroke=i>0||n>0?DA(t.left+p,t.top+U/2,a-I/2,l-U/2,yA.TOP_RIGHT):new K(t.left+t.width-I/2,t.top+U/2),this.bottomRightBorderStroke=u>0||d>0?DA(t.left+y,t.top+v,u-I/2,d-O/2,yA.BOTTOM_RIGHT):new K(t.left+t.width-I/2,t.top+t.height-O/2),this.bottomLeftBorderStroke=B>0||f>0?DA(t.left+T/2,t.top+E,B-T/2,f-O/2,yA.BOTTOM_LEFT):new K(t.left+T/2,t.top+t.height-O/2),this.topLeftBorderBox=i>0||n>0?DA(t.left,t.top,i,n,yA.TOP_LEFT):new K(t.left,t.top),this.topRightBorderBox=a>0||l>0?DA(t.left+p,t.top,a,l,yA.TOP_RIGHT):new K(t.left+t.width,t.top),this.bottomRightBorderBox=u>0||d>0?DA(t.left+y,t.top+v,u,d,yA.BOTTOM_RIGHT):new K(t.left+t.width,t.top+t.height),this.bottomLeftBorderBox=B>0||f>0?DA(t.left,t.top+E,B,f,yA.BOTTOM_LEFT):new K(t.left,t.top+t.height),this.topLeftPaddingBox=i>0||n>0?DA(t.left+T,t.top+U,Math.max(0,i-T),Math.max(0,n-U),yA.TOP_LEFT):new K(t.left+T,t.top+U),this.topRightPaddingBox=a>0||l>0?DA(t.left+Math.min(p,t.width-I),t.top+U,p>t.width+I?0:Math.max(0,a-I),Math.max(0,l-U),yA.TOP_RIGHT):new K(t.left+t.width-I,t.top+U),this.bottomRightPaddingBox=u>0||d>0?DA(t.left+Math.min(y,t.width-T),t.top+Math.min(v,t.height-O),Math.max(0,u-I),Math.max(0,d-O),yA.BOTTOM_RIGHT):new K(t.left+t.width-I,t.top+t.height-O),this.bottomLeftPaddingBox=B>0||f>0?DA(t.left+T,t.top+Math.min(E,t.height-O),Math.max(0,B-T),Math.max(0,f-O),yA.BOTTOM_LEFT):new K(t.left+T,t.top+t.height-O),this.topLeftContentBox=i>0||n>0?DA(t.left+T+S,t.top+U+lA,Math.max(0,i-(T+S)),Math.max(0,n-(U+lA)),yA.TOP_LEFT):new K(t.left+T+S,t.top+U+lA),this.topRightContentBox=a>0||l>0?DA(t.left+Math.min(p,t.width+T+S),t.top+U+lA,p>t.width+T+S?0:a-T+S,l-(U+lA),yA.TOP_RIGHT):new K(t.left+t.width-(I+M),t.top+U+lA),this.bottomRightContentBox=u>0||d>0?DA(t.left+Math.min(y,t.width-(T+S)),t.top+Math.min(v,t.height+U+lA),Math.max(0,u-(I+M)),d-(O+Z),yA.BOTTOM_RIGHT):new K(t.left+t.width-(I+M),t.top+t.height-(O+Z)),this.bottomLeftContentBox=B>0||f>0?DA(t.left+T+S,t.top+E,Math.max(0,B-(T+S)),f-(O+Z),yA.BOTTOM_LEFT):new K(t.left+T+S,t.top+t.height-(O+Z))}return r})(),yA;(function(r){r[r.TOP_LEFT=0]="TOP_LEFT",r[r.TOP_RIGHT=1]="TOP_RIGHT",r[r.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",r[r.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(yA||(yA={}));var DA=function(r,A,e,t,s){var i=4*((Math.sqrt(2)-1)/3),n=e*i,o=t*i,a=r+e,l=A+t;switch(s){case yA.TOP_LEFT:return new ui(new K(r,l),new K(r,l-o),new K(a-n,A),new K(a,A));case yA.TOP_RIGHT:return new ui(new K(r,A),new K(r+n,A),new K(a,l-o),new K(a,l));case yA.BOTTOM_RIGHT:return new ui(new K(a,A),new K(a,A+o),new K(r+n,l),new K(r,l));case yA.BOTTOM_LEFT:default:return new ui(new K(a,l),new K(a-n,l),new K(r,A+o),new K(r,A))}},fi=function(r){return[r.topLeftBorderBox,r.topRightBorderBox,r.bottomRightBorderBox,r.bottomLeftBorderBox]},SC=function(r){return[r.topLeftContentBox,r.topRightContentBox,r.bottomRightContentBox,r.bottomLeftContentBox]},di=function(r){return[r.topLeftPaddingBox,r.topRightPaddingBox,r.bottomRightPaddingBox,r.bottomLeftPaddingBox]},HC=(function(){function r(A,e,t){this.offsetX=A,this.offsetY=e,this.matrix=t,this.type=0,this.target=6}return r})(),Bi=(function(){function r(A,e){this.path=A,this.target=e,this.type=1}return r})(),LC=(function(){function r(A){this.opacity=A,this.type=2,this.target=6}return r})(),IC=function(r){return r.type===0},au=function(r){return r.type===1},TC=function(r){return r.type===2},lu=function(r,A){return r.length===A.length?r.some(function(e,t){return e===A[t]}):!1},MC=function(r,A,e,t,s){return r.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+s);case 3:return i.add(A,e+s)}return i})},cu=(function(){function r(A){this.element=A,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return r})(),hu=(function(){function r(A,e){if(this.container=A,this.parent=e,this.effects=[],this.curves=new xC(this.container),this.container.styles.opacity<1&&this.effects.push(new LC(this.container.styles.opacity)),this.container.styles.transform!==null){var t=this.container.bounds.left+this.container.styles.transformOrigin[0].number,s=this.container.bounds.top+this.container.styles.transformOrigin[1].number,i=this.container.styles.transform;this.effects.push(new HC(t,s,i))}if(this.container.styles.overflowX!==0){var n=fi(this.curves),o=di(this.curves);lu(n,o)?this.effects.push(new Bi(n,6)):(this.effects.push(new Bi(n,2)),this.effects.push(new Bi(o,4)))}}return r.prototype.getEffects=function(A){for(var e=[2,3].indexOf(this.container.styles.position)===-1,t=this.parent,s=this.effects.slice(0);t;){var i=t.effects.filter(function(a){return!au(a)});if(e||t.container.styles.position!==0||!t.parent){if(s.unshift.apply(s,i),e=[2,3].indexOf(t.container.styles.position)===-1,t.container.styles.overflowX!==0){var n=fi(t.curves),o=di(t.curves);lu(n,o)||s.unshift(new Bi(o,6))}}else s.unshift.apply(s,i);t=t.parent}return s.filter(function(a){return zA(a.target,A)})},r})(),Lo=function(r,A,e,t){r.container.elements.forEach(function(s){var i=zA(s.flags,4),n=zA(s.flags,2),o=new hu(s,r);zA(s.styles.display,2048)&&t.push(o);var a=zA(s.flags,8)?[]:t;if(i||n){var l=i||s.styles.isPositioned()?e:A,c=new cu(o);if(s.styles.isPositioned()||s.styles.opacity<1||s.styles.isTransformed()){var u=s.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 s.styles.isFloating()?l.nonPositionedFloats.push(c):l.nonPositionedInlineLevel.push(c);Lo(o,c,i?c:e,a)}else s.styles.isInlineLevel()?A.inlineLevel.push(o):A.nonInlineLevel.push(o),Lo(o,A,e,a);zA(s.flags,8)&&uu(s,a)})},uu=function(r,A){for(var e=r instanceof Co?r.start:1,t=r instanceof Co?r.reversed:!1,s=0;s<A.length;s++){var i=A[s];i.container instanceof kh&&typeof i.container.value=="number"&&i.container.value!==0&&(e=i.container.value),i.listValue=Dr(e,i.container.styles.listStyleType,!0),e+=t?-1:1}},DC=function(r){var A=new hu(r,null),e=new cu(A),t=[];return Lo(A,e,e,t),uu(A.container,t),e},fu=function(r,A){switch(A){case 0:return Fe(r.topLeftBorderBox,r.topLeftPaddingBox,r.topRightBorderBox,r.topRightPaddingBox);case 1:return Fe(r.topRightBorderBox,r.topRightPaddingBox,r.bottomRightBorderBox,r.bottomRightPaddingBox);case 2:return Fe(r.bottomRightBorderBox,r.bottomRightPaddingBox,r.bottomLeftBorderBox,r.bottomLeftPaddingBox);default:return Fe(r.bottomLeftBorderBox,r.bottomLeftPaddingBox,r.topLeftBorderBox,r.topLeftPaddingBox)}},OC=function(r,A){switch(A){case 0:return Fe(r.topLeftBorderBox,r.topLeftBorderDoubleOuterBox,r.topRightBorderBox,r.topRightBorderDoubleOuterBox);case 1:return Fe(r.topRightBorderBox,r.topRightBorderDoubleOuterBox,r.bottomRightBorderBox,r.bottomRightBorderDoubleOuterBox);case 2:return Fe(r.bottomRightBorderBox,r.bottomRightBorderDoubleOuterBox,r.bottomLeftBorderBox,r.bottomLeftBorderDoubleOuterBox);default:return Fe(r.bottomLeftBorderBox,r.bottomLeftBorderDoubleOuterBox,r.topLeftBorderBox,r.topLeftBorderDoubleOuterBox)}},kC=function(r,A){switch(A){case 0:return Fe(r.topLeftBorderDoubleInnerBox,r.topLeftPaddingBox,r.topRightBorderDoubleInnerBox,r.topRightPaddingBox);case 1:return Fe(r.topRightBorderDoubleInnerBox,r.topRightPaddingBox,r.bottomRightBorderDoubleInnerBox,r.bottomRightPaddingBox);case 2:return Fe(r.bottomRightBorderDoubleInnerBox,r.bottomRightPaddingBox,r.bottomLeftBorderDoubleInnerBox,r.bottomLeftPaddingBox);default:return Fe(r.bottomLeftBorderDoubleInnerBox,r.bottomLeftPaddingBox,r.topLeftBorderDoubleInnerBox,r.topLeftPaddingBox)}},_C=function(r,A){switch(A){case 0:return gi(r.topLeftBorderStroke,r.topRightBorderStroke);case 1:return gi(r.topRightBorderStroke,r.bottomRightBorderStroke);case 2:return gi(r.bottomRightBorderStroke,r.bottomLeftBorderStroke);default:return gi(r.bottomLeftBorderStroke,r.topLeftBorderStroke)}},gi=function(r,A){var e=[];return Qe(r)?e.push(r.subdivide(.5,!1)):e.push(r),Qe(A)?e.push(A.subdivide(.5,!0)):e.push(A),e},Fe=function(r,A,e,t){var s=[];return Qe(r)?s.push(r.subdivide(.5,!1)):s.push(r),Qe(e)?s.push(e.subdivide(.5,!0)):s.push(e),Qe(t)?s.push(t.subdivide(.5,!0).reverse()):s.push(t),Qe(A)?s.push(A.subdivide(.5,!1).reverse()):s.push(A),s},du=function(r){var A=r.bounds,e=r.styles;return A.add(e.borderLeftWidth,e.borderTopWidth,-(e.borderRightWidth+e.borderLeftWidth),-(e.borderTopWidth+e.borderBottomWidth))},pi=function(r){var A=r.styles,e=r.bounds,t=LA(A.paddingLeft,e.width),s=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+s),-(A.borderTopWidth+A.borderBottomWidth+i+n))},NC=function(r,A){return r===0?A.bounds:r===2?pi(A):du(A)},KC=function(r,A){return r===0?A.bounds:r===2?pi(A):du(A)},Io=function(r,A,e){var t=NC(Zt(r.styles.backgroundOrigin,A),r),s=KC(Zt(r.styles.backgroundClip,A),r),i=VC(Zt(r.styles.backgroundSize,A),e,t),n=i[0],o=i[1],a=Sr(Zt(r.styles.backgroundPosition,A),t.width-n,t.height-o),l=PC(Zt(r.styles.backgroundRepeat,A),a,i,t,s),c=Math.round(t.left+a[0]),u=Math.round(t.top+a[1]);return[l,c,u,n,o]},Jt=function(r){return SA(r)&&r.value===Gt.AUTO},wi=function(r){return typeof r=="number"},VC=function(r,A,e){var t=A[0],s=A[1],i=A[2],n=r[0],o=r[1];if(!n)return[0,0];if(WA(n)&&o&&WA(o))return[LA(n,e.width),LA(o,e.height)];var a=wi(i);if(SA(n)&&(n.value===Gt.CONTAIN||n.value===Gt.COVER)){if(wi(i)){var l=e.width/e.height;return l<i!=(n.value===Gt.COVER)?[e.width,e.width/i]:[e.height*i,e.height]}return[e.width,e.height]}var c=wi(t),u=wi(s),d=c||u;if(Jt(n)&&(!o||Jt(o))){if(c&&u)return[t,s];if(!a&&!d)return[e.width,e.height];if(d&&a){var g=c?t:s*i,B=u?s:t/i;return[g,B]}var f=c?t:e.width,w=u?s:e.height;return[f,w]}if(a){var m=0,p=0;return WA(n)?m=LA(n,e.width):WA(o)&&(p=LA(o,e.height)),Jt(n)?m=p*i:(!o||Jt(o))&&(p=m/i),[m,p]}var v=null,y=null;if(WA(n)?v=LA(n,e.width):o&&WA(o)&&(y=LA(o,e.height)),v!==null&&(!o||Jt(o))&&(y=c&&u?v/t*s:e.height),y!==null&&Jt(n)&&(v=c&&u?y/s*t:e.width),v!==null&&y!==null)return[v,y];throw new Error("Unable to calculate background-size for element")},Zt=function(r,A){var e=r[A];return typeof e>"u"?r[0]:e},PC=function(r,A,e,t,s){var i=A[0],n=A[1],o=e[0],a=e[1];switch(r){case 2:return[new K(Math.round(t.left),Math.round(t.top+n)),new K(Math.round(t.left+t.width),Math.round(t.top+n)),new K(Math.round(t.left+t.width),Math.round(a+t.top+n)),new K(Math.round(t.left),Math.round(a+t.top+n))];case 3:return[new K(Math.round(t.left+i),Math.round(t.top)),new K(Math.round(t.left+i+o),Math.round(t.top)),new K(Math.round(t.left+i+o),Math.round(t.height+t.top)),new K(Math.round(t.left+i),Math.round(t.height+t.top))];case 1:return[new K(Math.round(t.left+i),Math.round(t.top+n)),new K(Math.round(t.left+i+o),Math.round(t.top+n)),new K(Math.round(t.left+i+o),Math.round(t.top+n+a)),new K(Math.round(t.left+i),Math.round(t.top+n+a))];default:return[new K(Math.round(s.left),Math.round(s.top)),new K(Math.round(s.left+s.width),Math.round(s.top)),new K(Math.round(s.left+s.width),Math.round(s.height+s.top)),new K(Math.round(s.left),Math.round(s.height+s.top))]}},GC="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",Bu="Hidden Text",RC=(function(){function r(A){this._data={},this._document=A}return r.prototype.parseMetrics=function(A,e){var t=this._document.createElement("div"),s=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),s.src=GC,s.width=1,s.height=1,s.style.margin="0",s.style.padding="0",s.style.verticalAlign="baseline",i.style.fontFamily=A,i.style.fontSize=e,i.style.margin="0",i.style.padding="0",i.appendChild(this._document.createTextNode(Bu)),t.appendChild(i),t.appendChild(s);var o=s.offsetTop-i.offsetTop+2;t.removeChild(i),t.appendChild(this._document.createTextNode(Bu)),t.style.lineHeight="normal",s.style.verticalAlign="super";var a=s.offsetTop-t.offsetTop+2;return n.removeChild(t),{baseline:o,middle:a}},r.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]},r})(),gu=(function(){function r(A,e){this.context=A,this.options=e}return r})(),WC=1e4,zC=(function(r){Se(A,r);function A(e,t){var s=r.call(this,e,t)||this;return s._activeEffects=[],s.canvas=t.canvas?t.canvas:document.createElement("canvas"),s.ctx=s.canvas.getContext("2d"),t.canvas||(s.canvas.width=Math.floor(t.width*t.scale),s.canvas.height=Math.floor(t.height*t.scale),s.canvas.style.width=t.width+"px",s.canvas.style.height=t.height+"px"),s.fontMetrics=new RC(document),s.ctx.scale(s.options.scale,s.options.scale),s.ctx.translate(-t.x,-t.y),s.ctx.textBaseline="bottom",s._activeEffects=[],s.context.logger.debug("Canvas renderer initialized ("+t.width+"x"+t.height+") with scale "+t.scale),s}return A.prototype.applyEffects=function(e){for(var t=this;this._activeEffects.length;)this.popEffect();e.forEach(function(s){return t.applyEffect(s)})},A.prototype.applyEffect=function(e){this.ctx.save(),TC(e)&&(this.ctx.globalAlpha=e.opacity),IC(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)),au(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 oe(this,void 0,void 0,function(){var t;return te(this,function(s){switch(s.label){case 0:return t=e.element.container.styles,t.isVisible()?[4,this.renderStackContent(e)]:[3,2];case 1:s.sent(),s.label=2;case 2:return[2]}})})},A.prototype.renderNode=function(e){return oe(this,void 0,void 0,function(){return te(this,function(t){switch(t.label){case 0:if(zA(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,s){var i=this;if(t===0)this.ctx.fillText(e.text,e.bounds.left,e.bounds.top+s);else{var n=mo(e.text);n.reduce(function(o,a){return i.ctx.fillText(a,o,e.bounds.top+s),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(""),s=qC(e.fontFamily).join(", "),i=xr(e.fontSize)?""+e.fontSize.number+e.fontSize.unit:e.fontSize.number+"px";return[[e.fontStyle,t,e.fontWeight,i,s].join(" "),s,i]},A.prototype.renderTextNode=function(e,t){return oe(this,void 0,void 0,function(){var s,i,n,o,a,l,c,u,d=this;return te(this,function(g){return s=this.createFontStyle(t),i=s[0],n=s[1],o=s[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=XA(t.color),d.renderTextWithLetterSpacing(B,t.letterSpacing,l);var w=t.textShadow;w.length&&B.text.trim().length&&(w.slice(0).reverse().forEach(function(m){d.ctx.shadowColor=XA(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=XA(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=XA(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,s){if(s&&e.intrinsicWidth>0&&e.intrinsicHeight>0){var i=pi(e),n=di(t);this.path(n),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(s,0,0,e.intrinsicWidth,e.intrinsicHeight,i.left,i.top,i.width,i.height),this.ctx.restore()}},A.prototype.renderNodeContent=function(e){return oe(this,void 0,void 0,function(){var t,s,i,n,o,a,p,p,l,c,u,d,y,g,B,E,f,w,m,p,v,y,E;return te(this,function(U){switch(U.label){case 0:this.applyEffects(e.getEffects(4)),t=e.container,s=e.curves,i=t.styles,n=0,o=t.textNodes,U.label=1;case 1:return n<o.length?(a=o[n],[4,this.renderTextNode(a,i)]):[3,4];case 2:U.sent(),U.label=3;case 3:return n++,[3,1];case 4:if(!(t instanceof Mh))return[3,8];U.label=5;case 5:return U.trys.push([5,7,,8]),[4,this.context.cache.match(t.src)];case 6:return p=U.sent(),this.renderReplacedElement(t,s,p),[3,8];case 7:return U.sent(),this.context.logger.error("Error loading image "+t.src),[3,8];case 8:if(t instanceof Dh&&this.renderReplacedElement(t,s,t.canvas),!(t instanceof Oh))return[3,12];U.label=9;case 9:return U.trys.push([9,11,,12]),[4,this.context.cache.match(t.svg)];case 10:return p=U.sent(),this.renderReplacedElement(t,s,p),[3,12];case 11:return U.sent(),this.context.logger.error("Error loading svg "+t.svg.substring(0,255)),[3,12];case 12:return t instanceof Vh&&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=U.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),U.label=14;case 14:if(t instanceof vo&&(u=Math.min(t.bounds.width,t.bounds.height),t.type===ni?t.checked&&(this.ctx.save(),this.path([new K(t.bounds.left+u*.39363,t.bounds.top+u*.79),new K(t.bounds.left+u*.16,t.bounds.top+u*.5549),new K(t.bounds.left+u*.27347,t.bounds.top+u*.44071),new K(t.bounds.left+u*.39694,t.bounds.top+u*.5649),new K(t.bounds.left+u*.72983,t.bounds.top+u*.23),new K(t.bounds.left+u*.84,t.bounds.top+u*.34085),new K(t.bounds.left+u*.39363,t.bounds.top+u*.79)]),this.ctx.fillStyle=XA(_h),this.ctx.fill(),this.ctx.restore()):t.type===oi&&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=XA(_h),this.ctx.fill(),this.ctx.restore())),XC(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=XA(i.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=ZC(t.styles.textAlign),E=pi(t),f=0,t.styles.textAlign){case 1:f+=E.width/2;break;case 2:f+=E.width;break}w=E.add(f,0,0,-E.height/2+1),this.ctx.save(),this.path([new K(E.left,E.top),new K(E.left+E.width,E.top),new K(E.left+E.width,E.top+E.height),new K(E.left,E.top+E.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new Tr(t.value,w),i.letterSpacing,B),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!zA(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];p=void 0,v=m.url,U.label=15;case 15:return U.trys.push([15,17,,18]),[4,this.context.cache.match(v)];case 16:return p=U.sent(),this.ctx.drawImage(p,t.bounds.left-(p.width+10),t.bounds.top),[3,18];case 17:return U.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=XA(i.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",E=new Ze(t.bounds.left,t.bounds.top+LA(t.styles.paddingTop,t.bounds.width),t.bounds.width,Bh(i.lineHeight,i.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new Tr(e.listValue,E),i.letterSpacing,Bh(i.lineHeight,i.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),U.label=20;case 20:return[2]}})})},A.prototype.renderStackContent=function(e){return oe(this,void 0,void 0,function(){var t,s,m,i,n,m,o,a,m,l,c,m,u,d,m,g,B,m,f,w,m;return te(this,function(p){switch(p.label){case 0:if(zA(e.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(e.element)];case 1:p.sent(),t=0,s=e.negativeZIndex,p.label=2;case 2:return t<s.length?(m=s[t],[4,this.renderStack(m)]):[3,5];case 3:p.sent(),p.label=4;case 4:return t++,[3,2];case 5:return[4,this.renderNodeContent(e.element)];case 6:p.sent(),i=0,n=e.nonInlineLevel,p.label=7;case 7:return i<n.length?(m=n[i],[4,this.renderNode(m)]):[3,10];case 8:p.sent(),p.label=9;case 9:return i++,[3,7];case 10:o=0,a=e.nonPositionedFloats,p.label=11;case 11:return o<a.length?(m=a[o],[4,this.renderStack(m)]):[3,14];case 12:p.sent(),p.label=13;case 13:return o++,[3,11];case 14:l=0,c=e.nonPositionedInlineLevel,p.label=15;case 15:return l<c.length?(m=c[l],[4,this.renderStack(m)]):[3,18];case 16:p.sent(),p.label=17;case 17:return l++,[3,15];case 18:u=0,d=e.inlineLevel,p.label=19;case 19:return u<d.length?(m=d[u],[4,this.renderNode(m)]):[3,22];case 20:p.sent(),p.label=21;case 21:return u++,[3,19];case 22:g=0,B=e.zeroOrAutoZIndexOrTransformedOrOpacity,p.label=23;case 23:return g<B.length?(m=B[g],[4,this.renderStack(m)]):[3,26];case 24:p.sent(),p.label=25;case 25:return g++,[3,23];case 26:f=0,w=e.positiveZIndex,p.label=27;case 27:return f<w.length?(m=w[f],[4,this.renderStack(m)]):[3,30];case 28:p.sent(),p.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(s,i){var n=Qe(s)?s.start:s;i===0?t.ctx.moveTo(n.x,n.y):t.ctx.lineTo(n.x,n.y),Qe(s)&&t.ctx.bezierCurveTo(s.startControl.x,s.startControl.y,s.endControl.x,s.endControl.y,s.end.x,s.end.y)})},A.prototype.renderRepeat=function(e,t,s,i){this.path(e),this.ctx.fillStyle=t,this.ctx.translate(s,i),this.ctx.fill(),this.ctx.translate(-s,-i)},A.prototype.resizeImage=function(e,t,s){var i;if(e.width===t&&e.height===s)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,s);var a=o.getContext("2d");return a.drawImage(e,0,0,e.width,e.height,0,0,t,s),o},A.prototype.renderBackgroundImage=function(e){return oe(this,void 0,void 0,function(){var t,s,i,n,o,a;return te(this,function(l){switch(l.label){case 0:t=e.styles.backgroundImage.length-1,s=function(c){var u,d,g,lA,cA,hA,S,V,O,B,lA,cA,hA,S,V,f,w,m,p,v,y,E,U,I,O,T,lA,M,Z,S,V,X,cA,hA,EA,vA,UA,bA,q,$,QA,BA;return te(this,function(JA){switch(JA.label){case 0:if(c.type!==0)return[3,5];u=void 0,d=c.url,JA.label=1;case 1:return JA.trys.push([1,3,,4]),[4,i.context.cache.match(d)];case 2:return u=JA.sent(),[3,4];case 3:return JA.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]),lA=g[0],cA=g[1],hA=g[2],S=g[3],V=g[4],O=i.ctx.createPattern(i.resizeImage(u,S,V),"repeat"),i.renderRepeat(lA,O,cA,hA)),[3,6];case 5:Iw(c)?(B=Io(e,t,[null,null,null]),lA=B[0],cA=B[1],hA=B[2],S=B[3],V=B[4],f=Ew(c.angle,S,V),w=f[0],m=f[1],p=f[2],v=f[3],y=f[4],E=document.createElement("canvas"),E.width=S,E.height=V,U=E.getContext("2d"),I=U.createLinearGradient(m,v,p,y),sh(c.stops,w).forEach(function(xA){return I.addColorStop(xA.stop,XA(xA.color))}),U.fillStyle=I,U.fillRect(0,0,S,V),S>0&&V>0&&(O=i.ctx.createPattern(E,"repeat"),i.renderRepeat(lA,O,cA,hA))):Tw(c)&&(T=Io(e,t,[null,null,null]),lA=T[0],M=T[1],Z=T[2],S=T[3],V=T[4],X=c.position.length===0?[ro]:c.position,cA=LA(X[0],S),hA=LA(X[X.length-1],V),EA=xw(c,cA,hA,S,V),vA=EA[0],UA=EA[1],vA>0&&UA>0&&(bA=i.ctx.createRadialGradient(M+cA,Z+hA,0,M+cA,Z+hA,vA),sh(c.stops,vA*2).forEach(function(xA){return bA.addColorStop(xA.stop,XA(xA.color))}),i.path(lA),i.ctx.fillStyle=bA,vA!==UA?(q=e.bounds.left+.5*e.bounds.width,$=e.bounds.top+.5*e.bounds.height,QA=UA/vA,BA=1/QA,i.ctx.save(),i.ctx.translate(q,$),i.ctx.transform(1,0,0,QA,0,0),i.ctx.translate(-q,-$),i.ctx.fillRect(M,BA*(Z-$)+$,S,V*BA),i.ctx.restore()):i.ctx.fill())),JA.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,s(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,s){return oe(this,void 0,void 0,function(){return te(this,function(i){return this.path(fu(s,t)),this.ctx.fillStyle=XA(e),this.ctx.fill(),[2]})})},A.prototype.renderDoubleBorder=function(e,t,s,i){return oe(this,void 0,void 0,function(){var n,o;return te(this,function(a){switch(a.label){case 0:return t<3?[4,this.renderSolidBorder(e,s,i)]:[3,2];case 1:return a.sent(),[2];case 2:return n=OC(i,s),this.path(n),this.ctx.fillStyle=XA(e),this.ctx.fill(),o=kC(i,s),this.path(o),this.ctx.fill(),[2]}})})},A.prototype.renderNodeBackgroundAndBorders=function(e){return oe(this,void 0,void 0,function(){var t,s,i,n,o,a,l,c,u=this;return te(this,function(d){switch(d.label){case 0:return this.applyEffects(e.getEffects(2)),t=e.container.styles,s=!at(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=JC(Zt(t.backgroundClip,0),e.curves),s||t.boxShadow.length?(this.ctx.save(),this.path(n),this.ctx.clip(),at(t.backgroundColor)||(this.ctx.fillStyle=XA(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=fi(e.curves),f=g.inset?0:WC,w=MC(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(w)):(u.mask(B),u.ctx.clip(),u.path(w)),u.ctx.shadowOffsetX=g.offsetX.number+f,u.ctx.shadowOffsetY=g.offsetY.number,u.ctx.shadowColor=XA(g.color),u.ctx.shadowBlur=g.blur.number,u.ctx.fillStyle=g.inset?XA(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&&!at(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,s,i,n){return oe(this,void 0,void 0,function(){var o,a,l,c,u,d,g,B,f,w,m,p,v,y,E,U,E,U;return te(this,function(I){return this.ctx.save(),o=_C(i,s),a=fu(i,s),n===2&&(this.path(a),this.ctx.clip()),Qe(a[0])?(l=a[0].start.x,c=a[0].start.y):(l=a[0].x,c=a[0].y),Qe(a[1])?(u=a[1].end.x,d=a[1].end.y):(u=a[1].x,d=a[1].y),s===0||s===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),w=!0,g<=B*2?w=!1:g<=B*2+f?(m=g/(2*B+f),B*=m,f*=m):(p=Math.floor((g+f)/(B+f)),v=(g-p*B)/(p-1),y=(g-(p+1)*B)/p,f=y<=0||Math.abs(f-v)<Math.abs(f-y)?v:y),w&&(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=XA(e),this.ctx.stroke(),this.ctx.setLineDash([]),n===2&&(Qe(a[0])&&(E=a[3],U=a[0],this.ctx.beginPath(),this.formatPath([new K(E.end.x,E.end.y),new K(U.start.x,U.start.y)]),this.ctx.stroke()),Qe(a[1])&&(E=a[1],U=a[2],this.ctx.beginPath(),this.formatPath([new K(E.end.x,E.end.y),new K(U.start.x,U.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},A.prototype.render=function(e){return oe(this,void 0,void 0,function(){var t;return te(this,function(s){switch(s.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=XA(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),t=DC(e),[4,this.renderStack(t)];case 1:return s.sent(),this.applyEffects([]),[2,this.canvas]}})})},A})(gu),XC=function(r){return r instanceof Kh||r instanceof Nh?!0:r instanceof vo&&r.type!==oi&&r.type!==ni},JC=function(r,A){switch(r){case 0:return fi(A);case 2:return SC(A);default:return di(A)}},ZC=function(r){switch(r){case 1:return"center";case 2:return"right";default:return"left"}},YC=["-apple-system","system-ui"],qC=function(r){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?r.filter(function(A){return YC.indexOf(A)===-1}):r},$C=(function(r){Se(A,r);function A(e,t){var s=r.call(this,e,t)||this;return s.canvas=t.canvas?t.canvas:document.createElement("canvas"),s.ctx=s.canvas.getContext("2d"),s.options=t,s.canvas.width=Math.floor(t.width*t.scale),s.canvas.height=Math.floor(t.height*t.scale),s.canvas.style.width=t.width+"px",s.canvas.style.height=t.height+"px",s.ctx.scale(s.options.scale,s.options.scale),s.ctx.translate(-t.x,-t.y),s.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+t.width+"x"+t.height+" at "+t.x+","+t.y+") with scale "+t.scale),s}return A.prototype.render=function(e){return oe(this,void 0,void 0,function(){var t,s;return te(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,jC(t)];case 1:return s=i.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=XA(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(s,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},A})(gu),jC=function(r){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(r))})},Av=(function(){function r(A){var e=A.id,t=A.enabled;this.id=e,this.enabled=t,this.start=Date.now()}return r.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,Us([this.id,this.getTime()+"ms"],A)):this.info.apply(this,A))},r.prototype.getTime=function(){return Date.now()-this.start},r.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,Us([this.id,this.getTime()+"ms"],A))},r.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,Us([this.id,this.getTime()+"ms"],A)):this.info.apply(this,A))},r.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,Us([this.id,this.getTime()+"ms"],A)):this.info.apply(this,A))},r.instances={},r})(),ev=(function(){function r(A,e){var t;this.windowBounds=e,this.instanceName="#"+r.instanceCount++,this.logger=new Av({id:this.instanceName,enabled:A.logging}),this.cache=(t=A.cache)!==null&&t!==void 0?t:new vC(this,A)}return r.instanceCount=1,r})(),tv=function(r,A){return A===void 0&&(A={}),rv(r,A)};typeof window<"u"&&ou.setContext(window);var rv=function(r,A){return oe(void 0,void 0,void 0,function(){var e,t,s,i,n,o,a,l,c,u,d,g,B,f,w,m,p,v,y,E,I,U,I,O,T,lA,M,Z,S,V,X,cA,hA,EA,vA,UA,bA,q,$,QA;return te(this,function(BA){switch(BA.label){case 0:if(!r||typeof r!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(e=r.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 s={allowTaint:(O=A.allowTaint)!==null&&O!==void 0?O:!1,imageTimeout:(T=A.imageTimeout)!==null&&T!==void 0?T:15e3,proxy:A.proxy,useCORS:(lA=A.useCORS)!==null&&lA!==void 0?lA:!1},i=On({logging:(M=A.logging)!==null&&M!==void 0?M:!0,cache:A.cache},s),n={windowWidth:(Z=A.windowWidth)!==null&&Z!==void 0?Z:t.innerWidth,windowHeight:(S=A.windowHeight)!==null&&S!==void 0?S:t.innerHeight,scrollX:(V=A.scrollX)!==null&&V!==void 0?V:t.pageXOffset,scrollY:(X=A.scrollY)!==null&&X!==void 0?X:t.pageYOffset},o=new Ze(n.scrollX,n.scrollY,n.windowWidth,n.windowHeight),a=new ev(i,o),l=(cA=A.foreignObjectRendering)!==null&&cA!==void 0?cA:!1,c={allowTaint:(hA=A.allowTaint)!==null&&hA!==void 0?hA:!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 iu(a,r,c),d=u.clonedReferenceElement,d?[4,u.toIFrame(e,o)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return g=BA.sent(),B=Qo(d)||sC(d)?Mg(d.ownerDocument):Es(a,d),f=B.width,w=B.height,m=B.left,p=B.top,v=sv(a,d,A.backgroundColor),y={canvas:A.canvas,backgroundColor:v,scale:(vA=(EA=A.scale)!==null&&EA!==void 0?EA:t.devicePixelRatio)!==null&&vA!==void 0?vA:1,x:((UA=A.x)!==null&&UA!==void 0?UA:0)+m,y:((bA=A.y)!==null&&bA!==void 0?bA:0)+p,width:(q=A.width)!==null&&q!==void 0?q:Math.ceil(f),height:($=A.height)!==null&&$!==void 0?$:Math.ceil(w)},l?(a.logger.debug("Document cloned, using foreign object rendering"),I=new $C(a,y),[4,I.render(d)]):[3,3];case 2:return E=BA.sent(),[3,5];case 3:return a.logger.debug("Document cloned, element located at "+m+","+p+" with size "+f+"x"+w+" using computed rendering"),a.logger.debug("Starting DOM parsing"),U=Gh(a,d),v===U.styles.backgroundColor&&(U.styles.backgroundColor=qe.TRANSPARENT),a.logger.debug("Starting renderer for element at "+y.x+","+y.y+" with size "+y.width+"x"+y.height),I=new zC(a,y),[4,I.render(U)];case 4:E=BA.sent(),BA.label=5;case 5:return(!((QA=A.removeContainer)!==null&&QA!==void 0)||QA)&&(iu.destroy(g)||a.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),a.logger.debug("Finished rendering"),[2,E]}})})},sv=function(r,A,e){var t=A.ownerDocument,s=t.documentElement?Hr(r,getComputedStyle(t.documentElement).backgroundColor):qe.TRANSPARENT,i=t.body?Hr(r,getComputedStyle(t.body).backgroundColor):qe.TRANSPARENT,n=typeof e=="string"?Hr(r,e):e===null?qe.TRANSPARENT:4294967295;return A===t.documentElement?at(s)?at(i)?n:i:s:n};const iv={M1:3,M5:7,M15:14,M30:30,H1:90,H4:180,D1:1095,W1:1825,MN:3650};function pu(r){if(!r)return 7;const A=String(r).toUpperCase();return iv[A]??7}function nv(r,A){const e=String(r||"").toUpperCase(),t=A||pu(r),s={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 s=="number"?s:96));return Math.min(Math.max(i,500),5e3)}const se=r=>{if(!Array.isArray(r)||r.length===0)return[];const A=r.map(t=>({...t,time:RA(t.time)})).filter(t=>t.time!=null);A.sort((t,s)=>t.time-s.time);const e=new Map;for(const t of A)e.set(t.time,t);return Array.from(e.values()).sort((t,s)=>t.time-s.time)};function ov(r,A,e,t,s,i){const n=s-e,o=i-t,a=Math.sqrt(n*n+o*o);if(a===0)return Math.hypot(r-e,A-t);let l=((r-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(r-c,A-u)}function To(r,A,e,t,s){if(!e||!t||!s)return null;const i=e.time,n=t.time,o=n-i,a=e.price,l=t.price,c=s.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-s.time),g=c+u*(n-s.time);return[{time:i,price:d},{time:n,price:g}]}const av=b.forwardRef(function({bidPrice:A="113.638",askPrice:e="113.649",showBuySellPanel:t=!0,onBuyClick:s,onSellClick:i},n){const o=b.useRef(null),a=b.useRef(null),l=b.useRef(null),c=b.useRef(null),u=b.useRef([]),d=b.useRef(!1),g=b.useRef(null),B=b.useRef(null),f=b.useRef(null),w=b.useRef(null),m=b.useRef([]),[p,v]=b.useState(null),[y,E]=b.useState([]),U=b.useRef(null),I=b.useRef(null),O=b.useRef(null),T=b.useRef(!1);b.useEffect(()=>{O.current=p},[p]);const lA=b.useRef(new Map),M=b.useRef(null),Z=(C,F)=>`${C}_${F}`,S=()=>{const C=Z(q,$);return lA.current.get(C)||null},V=C=>{if(!C)return;const F=Z(q,$);lA.current.set(F,C)},{activeTool:X,setActiveTool:cA,showGrid:hA,snapToGrid:EA,chartObjects:vA,setChartObjects:UA,orders:bA,selectedSymbol:q,selectedTimeframe:$,drawingsVisible:QA,chartType:BA,chartLocked:JA,theme:xA,baseUrl:Ge,endpoints:Ut,endpointParams:kr}=ne(),je=b.useRef([]),[k,_]=b.useState(!1),[AA,eA]=b.useState(null),[P,j]=b.useState([]),[TA,NA]=b.useState(!0),ZA=b.useRef(null),le=b.useRef(new Map);b.useRef(null);const vi=b.useRef(0);b.useImperativeHandle(n,()=>({zoomIn:()=>{const C=a.current?.timeScale();if(!C)return;const F=C.getVisibleRange();if(!F||!F.from||!F.to)return;const x=F.to-F.from,J=(F.from+F.to)/2,L=x*.8;try{C.setVisibleRange({from:J-L/2,to:J+L/2}),V(C.getVisibleRange())}catch{}},zoomOut:()=>{const C=a.current?.timeScale();if(!C)return;const F=C.getVisibleRange();if(!F||!F.from||!F.to)return;const x=F.to-F.from,J=(F.from+F.to)/2,L=x*1.25;try{C.setVisibleRange({from:J-L/2,to:J+L/2}),V(C.getVisibleRange())}catch{}},downloadChartAsPNG:()=>{const C=o.current;if(!C){typeof window.notify=="function"&&window.notify("Chart not ready","error");return}const F=C.querySelectorAll("canvas"),x=xA==="light"?"#ffffff":"#12161d";let J=null,L=0;if(F.forEach(W=>{if(W.width>0&&W.height>0){const rA=W.width*W.height;rA>L&&(L=rA,J=W)}}),J)try{const W=document.createElement("canvas");W.width=J.width,W.height=J.height;const rA=W.getContext("2d");rA.fillStyle=x,rA.fillRect(0,0,W.width,W.height),rA.drawImage(J,0,0);const Y=document.createElement("a");Y.download=`chart-${q}-${$}-${Date.now()}.png`,Y.href=W.toDataURL("image/png"),Y.click(),typeof window.notify=="function"&&window.notify("Chart saved as PNG","success");return}catch(W){console.warn("Canvas export failed, trying html2canvas",W)}tv(C,{useCORS:!0,allowTaint:!0,backgroundColor:x,scale:2,logging:!1}).then(W=>{const rA=document.createElement("a");rA.download=`chart-${q}-${$}-${Date.now()}.png`,rA.href=W.toDataURL("image/png"),rA.click(),typeof window.notify=="function"&&window.notify("Chart saved as PNG","success")}).catch(W=>{console.error("Chart screenshot failed",W),typeof window.notify=="function"&&window.notify("Screenshot failed. Try again.","error")})}}),[q,$,xA]);const _r=b.useMemo(()=>P.length===0?[]:BA==="line"||BA==="area"?P.map(C=>({time:C.time,value:C.close})):P,[P,BA]),ko=C=>{console.log("Buy Order:",C),s?s("BUY"):(eA("BUY"),_(!0))},_o=C=>{console.log("Sell Order:",C),i?i("SELL"):(eA("SELL"),_(!0))},pe=()=>{_(!1),eA(null)};return b.useEffect(()=>{const C=o.current;if(!C)return;const F=C.getBoundingClientRect(),x=R=>{const gA=Math.abs(Number(R));return Number.isFinite(gA)?gA>=1e3?gA.toFixed(2):gA>=1?gA.toFixed(4):gA.toFixed(5):"0"},J=xA==="light",L=r0(C,{width:F.width||C.clientWidth,height:F.height||C.clientHeight,autoSize:!0,localization:{priceFormatter:x},layout:{background:{color:J?"#FFFFFF":"#0d1117",type:"solid"},textColor:J?"#020617":"#e6edf3",fontSize:12,fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif'},grid:{vertLines:{visible:hA,color:hA?J?"rgba(100, 116, 139, 0.15)":"rgba(110, 118, 129, 0.15)":"transparent",style:hA?2:0},horzLines:{visible:hA,color:hA?J?"rgba(100, 116, 139, 0.15)":"rgba(110, 118, 129, 0.15)":"transparent",style:hA?2:0}},rightPriceScale:{borderColor:J?"#e5e7eb":"#21262d",autoScale:!0,scaleMargins:{top:.1,bottom:.1},ticksVisible:!0,ensureEdgeTickMarksVisible:!0,entireTextOnly:!1,textColor:J?"#64748b":"#8b949e"},leftPriceScale:{visible:!1},timeScale:{borderColor:J?"#e5e7eb":"#21262d",timeVisible:!0,secondsVisible:!1,rightOffset:12,barSpacing:6,minBarSpacing:4,shiftVisibleRangeOnNewBar:!1,fixLeftEdge:!1,fixRightEdge:!1,rightBarStaysOnScroll:!0,allowShiftVisibleRangeOnWhitespaceClick:!0},crosshair:{mode:X===1?1:0,vertLine:{width:1,color:J?"#3b82f6":"#58a6ff",style:0,labelBackgroundColor:J?"#eff6ff":"#161b22",labelVisible:!0},horzLine:{width:1,color:J?"#3b82f6":"#58a6ff",style:0,labelBackgroundColor:J?"#eff6ff":"#161b22",labelVisible:!0},vertLineVisible:X===1,horzLineVisible:X===1},handleScroll:{mouseWheel:!0,pressedMouseMove:X===null||X===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}}),W=L.addCandlestickSeries({upColor:J?"#089981":"#26a69a",downColor:J?"#f23645":"#ef5350",wickUpColor:J?"#089981":"#26a69a",wickDownColor:J?"#f23645":"#ef5350",borderUpColor:J?"#089981":"#26a69a",borderDownColor:J?"#f23645":"#ef5350",borderVisible:!0});a.current=L,l.current=W;const rA=L.timeScale(),Y=()=>{if(T.current&&P.length>0){const R=rA.getVisibleRange();R&&V(R)}};rA.subscribeVisibleTimeRangeChange(Y);const N=new ResizeObserver(R=>{for(const gA of R){const{width:uA,height:D}=gA.contentRect;if(uA>0&&D>0&&L){const nA=rA.getVisibleRange();L.resize(uA,D),nA&&setTimeout(()=>{try{rA.setVisibleRange(nA)}catch{}},0)}}});return N.observe(C),()=>{rA.unsubscribeVisibleTimeRangeChange(Y),N.disconnect(),L.remove(),a.current=null,l.current=null,c.current=null,u.current=[]}},[]),b.useEffect(()=>{a.current&&a.current.applyOptions({grid:{vertLines:{visible:hA,color:hA?"rgba(110, 118, 129, 0.15)":"transparent",style:hA?2:0},horzLines:{visible:hA,color:hA?"rgba(110, 118, 129, 0.15)":"transparent",style:hA?2:0}}})},[hA]),b.useEffect(()=>{const C=a.current;if(!C)return;const F=xA==="light";C.applyOptions({layout:{background:{color:F?"#FFFFFF":"#12161d"},textColor:F?"#020617":"#fff"},grid:{vertLines:{color:hA?F?"rgba(100, 116, 139, 0.25)":"rgba(148, 163, 184, 0.2)":"transparent"},horzLines:{color:hA?F?"rgba(100, 116, 139, 0.25)":"rgba(148, 163, 184, 0.2)":"transparent"}},rightPriceScale:{borderColor:F?"#e5e7eb":"#1e293b"},timeScale:{borderColor:F?"#e5e7eb":"#1e293b"},crosshair:{vertLine:{color:F?"#3b82f6":"#58a6ff",labelBackgroundColor:F?"#eff6ff":"#161b22",width:1},horzLine:{color:F?"#3b82f6":"#58a6ff",labelBackgroundColor:F?"#eff6ff":"#161b22",width:1}}})},[xA,hA]),b.useEffect(()=>{if(!a.current)return;const F=!JA&&!(X!==null&&X!==1&&X!==0),x=!JA;a.current.applyOptions({crosshair:{mode:X===1?1:0,vertLine:{visible:X===1,width:1,color:xA==="light"?"#94a3b8":"#64748b",style:0,labelBackgroundColor:xA==="light"?"#e5e7eb":"#1e293b"},horzLine:{visible:X===1,width:1,color:xA==="light"?"#94a3b8":"#64748b",style:0,labelBackgroundColor:xA==="light"?"#e5e7eb":"#1e293b"}},handleScroll:{mouseWheel:x,pressedMouseMove:F,horzTouchDrag:F,vertTouchDrag:F},handleScale:{axisPressedMouseMove:{time:F,price:F},axisDoubleClickReset:{time:x,price:x},axisTouch:{time:F,price:F},mouseWheel:x,pinch:x}})},[X,JA]),b.useEffect(()=>{(async()=>{if(!q||!$){j([]),T.current=!1;return}try{if(NA(!0),j([]),T.current=!1,l.current)try{l.current.setData([])}catch{}console.log(`📊 Fetching candles for ${q} @ ${$}`);const F=pu($),x=nv($,F),J=Ge||"https://api-chart-sdk.e-volvo.io",L=Ut?.candles||"/api/chart/candles",W=kr?.candles||{},rA={symbol:W.symbol||"symbol",timeframe:W.timeframe||"timeframe",limit:W.limit||"limit",daysBack:W.daysBack||"daysBack"},Y={};Y[rA.symbol]=q,Y[rA.timeframe]=$,Y[rA.limit]=x,W.daysBack!==!1&&(Y[rA.daysBack]=F);const N=await HA.get(`${J}${L}`,{params:Y,timeout:1e4});let R=[];if(Array.isArray(N.data)?R=N.data:N.data&&N.data.data&&Array.isArray(N.data.data)?R=N.data.data:N.data&&Array.isArray(N.data)&&(R=N.data),R&&R.length>0){console.log(`✅ Loaded ${R.length} raw candles from server`);const{candles:gA,stats:uA}=fc(R,q,$);gA.length>0?(j(gA),le.current=new Map,gA.forEach(D=>{le.current.set(D.time,D)})):(console.warn(`⚠️ No valid candles after processing for ${q}`),j([]))}else console.warn(`⚠️ No candle data returned for ${q}`),j([])}catch(F){console.error(`❌ Error fetching ${q}:`,F.message),j([])}finally{NA(!1)}})()},[q,$]),b.useEffect(()=>{console.log("🔧 [CANDLES DEBUG] Setting up WebSocket for candles:",{baseUrl:Ge,symbol:q,timeframe:$}),ZA.current=Fs.getSocket();const C=ZA.current;console.log("🔌 [CANDLES DEBUG] Socket status for CandlesGateway (ROOT namespace):",{socketId:C.id,connected:C.connected,baseUrl:Ge,socketUrl:C.io?.uri||"unknown",namespace:C.nsp?.name||"/",hasAuth:!!C.auth,note:"This socket MUST connect to root namespace for CandlesGateway"});const F=()=>{if(console.log("📡 [CANDLES DEBUG] subscribeToCandles called:",{selectedSymbol:q,selectedTimeframe:$,connected:C.connected,socketId:C.id}),q&&$&&C.connected){const Y={symbol:q,timeframe:$};console.log("📡 [CANDLES DEBUG] Emitting subscribeCandles:",Y),C.emit("subscribeCandles",Y),console.log("✅ [CANDLES DEBUG] subscribeCandles event emitted successfully")}else console.warn("⚠️ [CANDLES DEBUG] Cannot subscribe to candles:",{selectedSymbol:q,selectedTimeframe:$,connected:C.connected,socketId:C.id,reason:q?$?"Not connected":"No timeframe":"No symbol"})},x=()=>{console.log("✅ [CANDLES DEBUG] Chart WebSocket connected to backend, socket ID:",C.id),setTimeout(()=>{q&&$&&(console.log("📡 [CANDLES DEBUG] Backend connected, subscribing to candles..."),F())},200)},J=Y=>{console.log("⚠️ [CANDLES DEBUG] Chart WebSocket disconnected:",Y)},L=Y=>{console.error("❌ [CANDLES DEBUG] Chart WebSocket connection error:",Y),console.error("❌ [CANDLES DEBUG] Error details:",{message:Y.message,description:Y.description,context:Y.context,type:Y.type})};C.on("connect",x),C.on("disconnect",J),C.on("connect_error",L),C.on("subscription:confirmed",Y=>{console.log("✅ [CANDLES DEBUG] Subscription confirmed:",Y),Y.type==="candles"&&console.log("✅ [CANDLES DEBUG] Candle subscription confirmed for:",{symbol:Y.symbol,timeframe:Y.timeframe})});const W=Y=>{if(console.log("📊 [CANDLES DEBUG] candleUpdate event received:",Y),!Y||!Y.candle||!Y.symbol){console.warn("⚠️ [CANDLES DEBUG] Invalid candleUpdate data:",Y);return}if(console.log("✅ [CANDLES DEBUG] Valid candleUpdate received:",{symbol:Y.symbol,timeframe:Y.timeframe,candle:Y.candle,selectedSymbol:q,selectedTimeframe:$}),Y.symbol.toUpperCase()!==q?.toUpperCase()){console.log(`⚠️ [CANDLES DEBUG] Symbol mismatch: received ${Y.symbol}, selected ${q}`);return}const{candle:N}=Y;console.log("✅ [CANDLES DEBUG] Processing candle update:",{symbol:Y.symbol,timeframe:Y.timeframe,candle:N,candleTime:N.time,candleClose:N.close});const R=dc(N,q,$);if(!R){console.warn("⚠️ [CANDLES DEBUG] Rejected realtime candle (invalid):",{symbol:Y.symbol,candle:N});return}console.log("✅ [CANDLES DEBUG] Processed candle:",{time:R.time,open:R.open,high:R.high,low:R.low,close:R.close});const gA=Date.now();if(gA-vi.current<200)return;vi.current=gA;const uA=a.current?.timeScale(),D=uA?.getVisibleRange(),nA=l.current,z=a.current;if(!(!nA||!z||!T.current))try{console.log("🔄 [CANDLES DEBUG] Updating chart with candle:",{time:R.time,close:R.close,chartType:BA,hasSeries:!!nA,hasChart:!!z,hasInitialized:T.current}),BA==="line"||BA==="area"?(nA.update({time:R.time,value:R.close}),console.log("✅ [CANDLES DEBUG] Chart updated (line/area)")):(nA.update({time:R.time,open:R.open,high:R.high,low:R.low,close:R.close}),console.log("✅ [CANDLES DEBUG] Chart updated (candlestick)")),le.current.set(R.time,R),uA&&D&&V(D),console.log("✅ [CANDLES DEBUG] Candle update completed successfully")}catch(sA){console.error("❌ [CANDLES DEBUG] Error updating candle:",sA),console.error("❌ [CANDLES DEBUG] Error stack:",sA.stack)}};C.on("candleUpdate",W);const rA=()=>{C.connected&&q&&$?(console.log("✅ [CANDLES DEBUG] Socket connected, subscribing to backend..."),F()):console.log("⏳ [CANDLES DEBUG] Waiting for socket connection...",{connected:C.connected,hasSymbol:!!q,hasTimeframe:!!$})};if(C.connected)rA();else{const Y=()=>{console.log("✅ [CANDLES DEBUG] Socket connected to backend, subscribing..."),setTimeout(rA,200)};C.once("connect",Y),setTimeout(()=>{C.connected&&rA()},500)}return()=>{C.off("candleUpdate",W),C.off("connect",x),C.off("disconnect",J),C.off("connect_error",L),C.off("subscription:confirmed"),q&&$&&C.connected&&(console.log(`🔌 Unsubscribing from: ${q}@${$}`),C.emit("unsubscribeCandles",{symbol:q,timeframe:$}))}},[q,$,Ge]),b.useEffect(()=>{const C=l.current,F=a.current;if(!(!C||!F)&&!(P.length===0&&T.current)){if(P.length===0&&!T.current){if(TA)return;const x=F.timeScale();C.setData([]),x.fitContent();return}if(!T.current){const x=F.timeScale(),J=Z(q,$);M.current,M.current=J;const L=[...P].sort((W,rA)=>W.time-rA.time);if(BA==="line"||BA==="area"){const W=L.map(rA=>({time:rA.time,value:rA.close})).filter(rA=>rA.time!=null);W.length>0&&C.setData(W)}else L.length>0&&C.setData(L);if(L.length>0){const W=L[L.length-1].time,rA=ys($)||60,N=W-($==="M1"?150:$==="M5"?120:100)*rA;try{x.setVisibleRange({from:N,to:W+rA*2})}catch{x.fitContent()}}else x.fitContent();try{F.priceScale("right").applyOptions({borderColor:"#1e293b",autoScale:!0,scaleMargins:{top:.1,bottom:.1},ticksVisible:!0,ensureEdgeTickMarksVisible:!0})}catch{}T.current=!0,V(x.getVisibleRange())}}},[P.length,BA,q,$]),b.useEffect(()=>{const C=a.current;if(!C||!T.current||P.length===0)return;const F=C.timeScale(),x=F.getVisibleRange()||S();if(l.current)try{C.removeSeries(l.current)}catch{}if(c.current)try{C.removeSeries(c.current),c.current=null}catch{}let J;if(BA==="bars"){const L=xA==="light";J=C.addBarSeries({upColor:L?"#089981":"#26A69A",downColor:L?"#f23645":"#EF5350",borderUpColor:L?"#089981":"#26A69A",borderDownColor:L?"#f23645":"#EF5350",scaleMargins:{top:.1,bottom:.1}});const W=[...P].sort((rA,Y)=>rA.time-Y.time);W.length>0&&J.setData(W)}else if(BA==="line"){J=C.addLineSeries({color:"#38bdf8",lineWidth:2,priceLineVisible:!1,lastValueVisible:!0,scaleMargins:{top:.1,bottom:.1}});const L=se(_r);L.length>0&&J.setData(L)}else if(BA==="area"){J=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 L=se(_r);L.length>0&&J.setData(L)}else if(BA==="volume ticks"||BA==="volume"){const L=xA==="light";J=C.addCandlestickSeries({upColor:L?"#089981":"#26A69A",downColor:L?"#f23645":"#EF5350",wickUpColor:L?"#089981":"#26A69A",wickDownColor:L?"#f23645":"#EF5350",borderUpColor:L?"#089981":"#26A69A",borderDownColor:L?"#f23645":"#EF5350",borderVisible:!0,priceScaleId:"right"});const W=[...P].sort((N,R)=>N.time-R.time);W.length>0&&J.setData(W);const rA=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});const Y=W.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)"}));Y.length>0&&rA.setData(Y),c.current=rA}else{const L=xA==="light";J=C.addCandlestickSeries({upColor:L?"#089981":"#26A69A",downColor:L?"#f23645":"#EF5350",wickUpColor:L?"#089981":"#26A69A",wickDownColor:L?"#f23645":"#EF5350",borderUpColor:L?"#089981":"#26A69A",borderDownColor:L?"#f23645":"#EF5350",borderVisible:!0,scaleMargins:{top:.1,bottom:.1}});const W=[...P].sort((rA,Y)=>rA.time-Y.time);W.length>0&&J.setData(W)}if(l.current=J,x&&T.current)setTimeout(()=>{try{F.setVisibleRange(x),V(x)}catch{if(P.length>0)try{const W=P[P.length-1].time,rA=W-6e3;F.setVisibleRange({from:rA,to:W}),V(F.getVisibleRange())}catch{F.fitContent(),V(F.getVisibleRange())}}try{C.priceScale("right").applyOptions({borderColor:"#1e293b",autoScale:!0,scaleMargins:{top:.1,bottom:.1},ticksVisible:!0,ensureEdgeTickMarksVisible:!0})}catch{}},0);else if(!T.current){F.fitContent();try{C.priceScale("right").applyOptions({borderColor:"#1e293b",autoScale:!0,scaleMargins:{top:.1,bottom:.1},ticksVisible:!0,ensureEdgeTickMarksVisible:!0})}catch{}T.current=!0,V(F.getVisibleRange())}},[BA,P.length,_r.length]),b.useEffect(()=>{const C=a.current,F=c.current;if(!C||!F||!T.current||P.length===0||BA!=="volume"&&BA!=="volume ticks")return;const J=[...P].sort((L,W)=>L.time-W.time).map(L=>({time:L.time,value:L.volume||0,color:L.close>=L.open?"rgba(38,166,154,0.25)":"rgba(239,83,80,0.25)"}));J.length>0&&F.setData(J)},[P,BA]),b.useEffect(()=>{const C=a.current,F=l.current,x=o.current;if(!C||!F||!x)return;const L=X!==null?[null,null,"trendline","parallellines","fibonacci","rectangle","pricelevel","text",null,null,null,null,null,null,null,null,null][X]:null;if(!L){if(d.current=!1,g.current=null,B.current=null,w.current=null,f.current?.series)try{C.removeSeries(f.current.series)}catch{}f.current=null;return}if(L==="pricelevel"){const N=R=>{const gA=x.getBoundingClientRect(),uA=R.clientX-gA.left,D=R.clientY-gA.top,nA=C.timeScale().coordinateToTime(uA),z=F.coordinateToPrice(D);if(nA==null||z==null)return;const iA={type:"pricelevel",priceLine:F.createPriceLine({price:z,color:"#3b82f6",lineWidth:2,lineStyle:2,axisLabelVisible:!0,title:z.toFixed(5)}),price:z};UA(fA=>[...fA,iA]),u.current.push(iA)};return x.addEventListener("click",N),()=>{x.removeEventListener("click",N)}}if(L==="trendline"){const N=D=>{D.preventDefault(),D.stopPropagation(),D.stopImmediatePropagation();const nA=x.getBoundingClientRect(),z=D.clientX-nA.left,sA=D.clientY-nA.top;let iA=C.timeScale().coordinateToTime(z);const fA=F.coordinateToPrice(sA);if(!(iA==null||fA==null)&&(iA=RA(iA),iA!=null))if(w.current===null){w.current={time:iA,price:fA};const tA=C.addLineSeries({color:"#22c55e",lineWidth:2,priceLineVisible:!1,lastValueVisible:!1});f.current={type:"trendline",series:tA},tA.setData([{time:iA,value:fA}])}else{const tA=w.current,aA={time:iA,price:fA},pA=1,MA=1e-5,FA=Math.abs(aA.time-tA.time),kA=Math.abs(aA.price-tA.price);if(FA<pA&&kA<MA){try{C.removeSeries(f.current.series)}catch{}w.current=null,f.current=null;return}const Re={time:tA.time,price:tA.price},We={time:aA.time,price:aA.price},ye=se([{time:Re.time,value:Re.price},{time:We.time,value:We.price}]);if(ye.length>0){f.current.series.setData(ye);const ut={type:"trendline",series:f.current.series,point1:Re,point2:We};UA(Et=>[...Et,ut]),u.current.push(ut)}cA(null),w.current=null,f.current=null}},R=D=>{if(w.current===null||f.current?.type!=="trendline")return;D.preventDefault(),D.stopPropagation();const nA=x.getBoundingClientRect(),z=D.clientX-nA.left,sA=D.clientY-nA.top;let iA=C.timeScale().coordinateToTime(z);const fA=F.coordinateToPrice(sA);if(iA==null||fA==null||(iA=RA(iA),iA==null))return;const tA=w.current,aA=se([{time:tA.time,value:tA.price},{time:iA,value:fA}]);aA.length>0&&f.current.series.setData(aA)},gA=D=>{D.stopPropagation()},uA={capture:!0,passive:!1};return x.addEventListener("click",N,uA),x.addEventListener("mousemove",R,uA),x.addEventListener("mousemove",gA,uA),()=>{if(w.current=null,f.current?.type==="trendline"&&f.current?.series){try{C.removeSeries(f.current.series)}catch{}f.current=null}x.removeEventListener("click",N,uA),x.removeEventListener("mousemove",R,uA),x.removeEventListener("mousemove",gA,uA)}}if(L==="parallellines"){const N={capture:!0,passive:!1},R=z=>{z.preventDefault(),z.stopPropagation(),z.stopImmediatePropagation();const sA=x.getBoundingClientRect(),iA=z.clientX-sA.left,fA=z.clientY-sA.top;let tA=C.timeScale().coordinateToTime(iA);const aA=F.coordinateToPrice(fA);if(tA==null||aA==null||(tA=RA(tA),tA==null))return;const pA={time:tA,price:aA},MA=m.current;if(MA.length===0){m.current=[pA];const FA=C.addLineSeries({color:"#8b5cf6",lineWidth:2,priceLineVisible:!1,lastValueVisible:!1});FA.setData([{time:tA,value:aA}]),f.current={type:"parallellines",series:FA,previewLine:null}}else if(MA.length===1){m.current=[MA[0],pA];const FA=se([{time:MA[0].time,value:MA[0].price},{time:tA,value:aA}]);FA.length>0&&f.current.series.setData(FA),f.current.previewLine=C.addLineSeries({color:"#8b5cf6",lineWidth:2,lineStyle:2,priceLineVisible:!1,lastValueVisible:!1});const kA=To(C,F,MA[0],pA,pA);kA&&f.current.previewLine.setData(se([{time:kA[0].time,value:kA[0].price},{time:kA[1].time,value:kA[1].price}]))}else{const[FA,kA]=MA,Re=pA;if(f.current?.previewLine){try{C.removeSeries(f.current.previewLine)}catch{}f.current.previewLine=null}const We=f.current?.series;if(!We)return;const ye=To(C,F,FA,kA,Re);if(!ye)return;const ut=C.addLineSeries({color:"#8b5cf6",lineWidth:2,priceLineVisible:!1,lastValueVisible:!1});We.setData(se([{time:FA.time,value:FA.price},{time:kA.time,value:kA.price}])),ut.setData(se([{time:ye[0].time,value:ye[0].price},{time:ye[1].time,value:ye[1].price}]));const Et={type:"parallellines",point1:FA,point2:kA,point3:Re,baseLine:We,parallelLine:ut};UA(Nr=>[...Nr,Et]),u.current.push(Et),cA(null),m.current=[],f.current=null}},gA=z=>{const sA=m.current;if(sA.length!==1||!f.current?.series)return;const iA=x.getBoundingClientRect(),fA=z.clientX-iA.left,tA=z.clientY-iA.top;let aA=C.timeScale().coordinateToTime(fA);const pA=F.coordinateToPrice(tA);if(aA==null||pA==null||(aA=RA(aA),aA==null))return;const MA=se([{time:sA[0].time,value:sA[0].price},{time:aA,value:pA}]);MA.length>0&&f.current.series.setData(MA)},uA=z=>{const sA=m.current;if(sA.length!==2||!f.current?.previewLine)return;const iA=x.getBoundingClientRect(),fA=z.clientX-iA.left,tA=z.clientY-iA.top;let aA=C.timeScale().coordinateToTime(fA);const pA=F.coordinateToPrice(tA);if(aA==null||pA==null||(aA=RA(aA),aA==null))return;const MA={time:aA,price:pA},FA=To(C,F,sA[0],sA[1],MA);FA&&f.current.previewLine.setData(se([{time:FA[0].time,value:FA[0].price},{time:FA[1].time,value:FA[1].price}]))},D=z=>{gA(z),uA(z)},nA=z=>{z.stopPropagation()};return x.addEventListener("click",R,N),x.addEventListener("mousemove",D,N),x.addEventListener("mousemove",nA,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",R,N),x.removeEventListener("mousemove",D,N),x.removeEventListener("mousemove",nA,N)}}if(w.current=null,f.current?.type==="trendline"&&f.current?.series){try{C.removeSeries(f.current.series)}catch{}f.current=null}const W=N=>{if(N.preventDefault(),N.stopPropagation(),N.stopImmediatePropagation(),L==="trendline"||L==="parallellines"||L!=="rectangle"&&L!=="fibonacci")return;const R=x.getBoundingClientRect(),gA=N.clientX-R.left,uA=N.clientY-R.top;let D=C.timeScale().coordinateToTime(gA);const nA=F.coordinateToPrice(uA);if(!(D==null||nA==null)&&(D=RA(D),D!=null)){if(d.current=!0,g.current={time:D,price:nA},B.current=null,L==="rectangle"){const z=C.addBaselineSeries({baseValue:{type:"price",price:nA},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:z}}if(L==="fibonacci"){const z=C.addLineSeries({color:"#f59e0b",lineWidth:2,priceLineVisible:!1,lastValueVisible:!1});f.current={type:"fibonacci",series:z,priceLines:[]}}if(L==="parallellines"){const z=C.addLineSeries({color:"#8b5cf6",lineWidth:2,priceLineVisible:!1,lastValueVisible:!1});f.current={type:"parallellines",series:z,firstLine:null,secondLine:null}}}},rA=N=>{if(!d.current||!g.current||!f.current)return;N.preventDefault(),N.stopPropagation(),N.stopImmediatePropagation();const R=x.getBoundingClientRect(),gA=N.clientX-R.left,uA=N.clientY-R.top;let D=C.timeScale().coordinateToTime(gA);const nA=F.coordinateToPrice(uA);if(D==null||nA==null||(D=RA(D),D==null))return;B.current={time:D,price:nA};const z=g.current;if(f.current.type==="rectangle"){const sA=Math.max(z.price,nA),iA=Math.min(z.price,nA),fA=RA(Math.min(z.time,D)),tA=RA(Math.max(z.time,D));if(fA==null||tA==null||Math.abs(tA-fA)<1||Math.abs(sA-iA)<1e-5)return;const aA=f.current.series;aA.setData(se([{time:fA,value:sA},{time:tA,value:sA}])),aA.applyOptions({baseValue:{type:"price",price:iA}})}if(f.current.type==="fibonacci"){const sA=[{time:z.time,value:z.price},{time:D,value:nA}],iA=se(sA);iA.length>0&&f.current.series.setData(iA),B.current={time:D,price:nA},f.current.priceLines&&(f.current.priceLines.forEach(fA=>{try{F.removePriceLine(fA)}catch{}}),f.current.priceLines=[])}if(f.current.type==="parallellines")if(f.current.firstLine){const sA=f.current.firstLine;sA.endTime-sA.startTime;const iA=sA.endPrice-sA.startPrice,fA=nA,tA=fA+iA;if(f.current.secondLine)f.current.secondLine.setData([{time:z.time,value:fA},{time:D,value:tA}]);else{const aA=C.addLineSeries({color:"#8b5cf6",lineWidth:2,priceLineVisible:!1,lastValueVisible:!1});aA.setData([{time:z.time,value:fA},{time:D,value:tA}]),f.current.secondLine=aA}}else f.current.series.setData([{time:z.time,value:z.price},{time:D,value:nA}])},Y=N=>{if(N&&(N.preventDefault(),N.stopPropagation()),!d.current||!f.current||!g.current)return;const R=g.current,gA=B.current||R;if(f.current.type==="parallellines")if(f.current.firstLine){const uA={type:"parallellines",firstLine:f.current.series,secondLine:f.current.secondLine,firstLineData:f.current.firstLine};UA(D=>[...D,uA]),u.current.push(uA),cA(null),f.current=null,d.current=!1,g.current=null,B.current=null;return}else{f.current.firstLine={startTime:R.time,startPrice:R.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||R).price;if(Math.abs(R.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 nA=Math.max(R.price,D),z=Math.min(R.price,D),sA=nA-z,iA=[{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%"}],fA=[],tA=f.current.series;try{C.removeSeries(tA)}catch{}iA.forEach(({level:pA,label:MA})=>{const FA=nA-sA*pA,kA=F.createPriceLine({price:FA,color:pA===0||pA===1?"#f59e0b":"#fbbf24",lineWidth:pA===0||pA===1?2:1,lineStyle:pA===0||pA===1?0:2,axisLabelVisible:!0,title:`${MA} (${FA.toFixed(5)})`,textColor:pA===0||pA===1?"#f59e0b":"#fbbf24"});fA.push(kA)});const aA={type:"fibonacci",priceLines:fA,startPrice:R.price,endPrice:D,high:nA,low:z};UA(pA=>[...pA,aA]),u.current.push(aA),cA(null)}if(f.current.type==="rectangle"){const uA=g.current,D=B.current||uA,nA=Math.max(uA.price,D.price),z=Math.min(uA.price,D.price),sA=RA(Math.min(uA.time,D.time)),iA=RA(Math.max(uA.time,D.time));if(sA!=null&&iA!=null&&Math.abs(iA-sA)>=1&&Math.abs(nA-z)>=1e-5){const fA=f.current.series;fA.setData(se([{time:sA,value:nA},{time:iA,value:nA}])),fA.applyOptions({baseValue:{type:"price",price:z}});const tA={type:"rectangle",timeStart:sA,timeEnd:iA,priceTop:nA,priceBottom:z,series:fA};UA(aA=>[...aA,tA]),u.current.push(tA),cA(null)}else try{C.removeSeries(f.current.series)}catch{}}d.current=!1,g.current=null,B.current=null,f.current=null};if(L==="rectangle"||L==="fibonacci"||L==="parallellines"){const N={capture:!0,passive:!1},R=gA=>{d.current||gA.stopPropagation()};return x.addEventListener("mousedown",W,N),x.addEventListener("mousemove",rA,N),x.addEventListener("mousemove",R,N),x.addEventListener("mouseup",Y,N),()=>{x.removeEventListener("mousedown",W,N),x.removeEventListener("mousemove",rA,N),x.removeEventListener("mousemove",R,N),x.removeEventListener("mouseup",Y,N)}}},[X,UA,cA]),b.useEffect(()=>{const C=a.current,F=l.current,x=o.current,J=X===null||X===1;if(!J||!C||!F||!x){J||(v(null),E([]));return}const L=10,W=8;function rA(uA,D){const nA=vA.filter(z=>z.type==="trendline"&&z.point1&&z.point2);for(let z=nA.length-1;z>=0;z--){const sA=nA[z],iA=C.timeScale().timeToCoordinate(sA.point1.time),fA=F.priceToCoordinate(sA.point1.price),tA=C.timeScale().timeToCoordinate(sA.point2.time),aA=F.priceToCoordinate(sA.point2.price);if(iA==null||fA==null||tA==null||aA==null)continue;const pA=Math.hypot(uA-iA,D-fA),MA=Math.hypot(uA-tA,D-aA);if(pA<L)return{object:sA,mode:"handle1"};if(MA<L)return{object:sA,mode:"handle2"};if(ov(uA,D,iA,fA,tA,aA)<W)return{object:sA,mode:"line"}}return null}const Y=uA=>{uA.preventDefault(),uA.stopPropagation();const D=x.getBoundingClientRect(),nA=uA.clientX-D.left,z=uA.clientY-D.top,sA=rA(nA,z);sA?(v(sA.object),U.current=sA.mode,sA.mode==="line"&&(I.current={x:nA,y:z,point1:{...sA.object.point1},point2:{...sA.object.point2}})):(v(null),U.current=null)},N=uA=>{if(!U.current)return;const D=O.current;if(!D||!D.point1||!D.point2)return;const nA=x.getBoundingClientRect(),z=uA.clientX-nA.left,sA=uA.clientY-nA.top;let iA=C.timeScale().coordinateToTime(z);const fA=F.coordinateToPrice(sA);if(!(iA==null||fA==null)&&(iA=RA(iA),iA!=null)){if(U.current==="handle1"){const tA={time:iA,price:fA},aA=se([{time:tA.time,value:tA.price},{time:D.point2.time,value:D.point2.price}]);aA.length>0&&D.series.setData(aA);const pA={...D,point1:tA};UA(MA=>{const FA=MA.map(kA=>kA===D?pA:kA);return u.current=FA,FA}),v(pA),O.current=pA}else if(U.current==="handle2"){const tA={time:iA,price:fA},aA=se([{time:D.point1.time,value:D.point1.price},{time:tA.time,value:tA.price}]);aA.length>0&&D.series.setData(aA);const pA={...D,point2:tA};UA(MA=>{const FA=MA.map(kA=>kA===D?pA:kA);return u.current=FA,FA}),v(pA),O.current=pA}else if(U.current==="line"){const tA=I.current;if(!tA)return;const aA=C.timeScale().coordinateToTime(tA.x),pA=F.coordinateToPrice(tA.y);if(aA==null||pA==null)return;const MA=iA-aA,FA=fA-pA,kA={time:RA(tA.point1.time+MA),price:tA.point1.price+FA},Re={time:RA(tA.point2.time+MA),price:tA.point2.price+FA},We=se([{time:kA.time,value:kA.price},{time:Re.time,value:Re.price}]);We.length>0&&D.series.setData(We);const ye={...D,point1:kA,point2:Re};UA(ut=>{const Et=ut.map(Nr=>Nr===D?ye:Nr);return u.current=Et,Et}),v(ye),O.current=ye}}},R=()=>{U.current=null,I.current=null},gA={capture:!0,passive:!1};return x.addEventListener("mousedown",Y,gA),x.addEventListener("mousemove",N,gA),x.addEventListener("mouseup",R,gA),()=>{x.removeEventListener("mousedown",Y,gA),x.removeEventListener("mousemove",N,gA),x.removeEventListener("mouseup",R,gA)}},[X,vA,UA]),b.useEffect(()=>{const C=a.current,F=l.current;if(!C||!F)return;const x=()=>{const L=p;if(!L||L.type!=="trendline"||!L.point1||!L.point2){E([]);return}const W=C.timeScale(),rA=W.timeToCoordinate(L.point1.time),Y=F.priceToCoordinate(L.point1.price),N=W.timeToCoordinate(L.point2.time),R=F.priceToCoordinate(L.point2.price);rA!=null&&Y!=null&&N!=null&&R!=null?E([{x:rA,y:Y},{x:N,y:R}]):E([])};x();const J=C.timeScale();return J.subscribeVisibleTimeRangeChange(x),()=>{J.unsubscribeVisibleTimeRangeChange(x)}},[p]),b.useEffect(()=>{!a.current||!l.current||u.current.forEach(C=>{C.series&&C.series.applyOptions({visible:QA}),C.priceLine&&C.priceLine.applyOptions(QA?{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(F=>{try{F.applyOptions({lineVisible:QA,axisLabelVisible:QA})}catch{}}),C.type==="rectangle"&&C.series&&C.series.applyOptions({visible:QA}),C.type==="parallellines"&&(C.baseLine&&C.baseLine.applyOptions({visible:QA}),C.parallelLine&&C.parallelLine.applyOptions({visible:QA}),C.firstLine&&C.firstLine.applyOptions({visible:QA}),C.secondLine&&C.secondLine.applyOptions({visible:QA}))})},[QA,vA]),b.useEffect(()=>{!QA&&p&&(v(null),E([]))},[QA,p]),b.useEffect(()=>{if(u.current.length>vA.length){const C=u.current.filter((F,x)=>!vA.includes(F));p&&C.some(F=>F===p)&&(v(null),E([])),C.forEach(F=>{if(F.series&&a.current?.removeSeries(F.series),F.priceLine&&l.current?.removePriceLine(F.priceLine),F.type==="fibonacci"&&F.priceLines&&F.priceLines.forEach(x=>{try{l.current?.removePriceLine(x)}catch{}}),F.type==="rectangle"&&F.series)try{a.current?.removeSeries(F.series)}catch{}if(F.type==="parallellines")try{F.baseLine&&a.current?.removeSeries(F.baseLine),F.parallelLine&&a.current?.removeSeries(F.parallelLine),F.firstLine&&a.current?.removeSeries(F.firstLine),F.secondLine&&a.current?.removeSeries(F.secondLine)}catch{}}),u.current=vA}},[vA,p]),b.useEffect(()=>{const C=l.current;return C?(je.current.forEach(x=>{try{C.removePriceLine(x)}catch{}}),je.current=[],bA.filter(x=>x.symbol===q).forEach(x=>{const J=parseFloat(x.price);if(isNaN(J))return;const W=x.type==="BUY"?"#26A69A":"#EF5350",rA=C.createPriceLine({price:J,color:W,lineWidth:2,lineStyle:0,axisLabelVisible:!0,title:`${x.type} ${x.volume} @ ${x.price}`,textColor:W});je.current.push(rA)}),()=>{je.current.forEach(x=>{try{C.removePriceLine(x)}catch{}}),je.current=[]}):void 0},[bA,q]),h.jsx("div",{className:`flex-1 flex flex-col min-w-0 overflow-hidden ${xA==="light"?"bg-white":"bg-[#12161d]"}`,children:h.jsxs("div",{ref:o,className:"flex-1 w-full h-full relative",style:{cursor:X===1||X!==null?"crosshair":"default",minHeight:0,minWidth:0},onDoubleClick:C=>{a.current&&!d.current&&(C.preventDefault(),C.stopPropagation(),a.current.timeScale().fitContent(),V(a.current.timeScale().getVisibleRange()))},children:[t&&h.jsx("div",{className:"absolute top-3 left-3 z-30",children:h.jsx(yg,{bidPrice:A,askPrice:e,onBuyClick:ko,onSellClick:_o})}),h.jsx(nc,{isOpen:k,onClose:pe,orderType:AA,bidPrice:A,askPrice:e}),QA&&p?.type==="trendline"&&p?.point1&&p?.point2&&y.length===2&&h.jsx("div",{className:"absolute inset-0 z-20 pointer-events-none","aria-hidden":!0,children:y.map((C,F)=>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}},F))})]})})}),OA={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 wu({style:r,className:A}){const{selectedSymbol:e,setSelectedSymbol:t,symbols:s,symbolsLoading:i}=ne(),[n,o]=b.useState(!1),[a,l]=b.useState(""),[c,u]=b.useState(-1),d=b.useRef(null),g=b.useRef(null);b.useEffect(()=>{const p=v=>{d.current&&!d.current.contains(v.target)&&(o(!1),l(""))};return document.addEventListener("mousedown",p),()=>document.removeEventListener("mousedown",p)},[]),b.useEffect(()=>{n&&g.current&&g.current.focus()},[n]);const B=s.filter(p=>p.symbol.toLowerCase().includes(a.toLowerCase())),f=B.filter(p=>!p.symbol.endsWith("USDT")),w=B.filter(p=>p.symbol.endsWith("USDT")),m=p=>{t(p),o(!1),l("")};return s.find(p=>p.symbol===e),h.jsxs("div",{ref:d,style:{...OA.container,...r},className:A,children:[h.jsxs("button",{style:OA.button,onClick:()=>o(!n),onMouseEnter:p=>Object.assign(p.currentTarget.style,OA.buttonHover),onMouseLeave:p=>{p.currentTarget.style.borderColor="#334155",p.currentTarget.style.backgroundColor="#1e293b"},children:[h.jsx("span",{children:i?"Loading...":e||"Select Coin"}),h.jsx("span",{style:{...OA.arrow,...n?OA.arrowOpen:{}},children:"▼"})]}),n&&h.jsxs("div",{style:OA.dropdown,children:[h.jsx("div",{style:OA.searchContainer,children:h.jsx("input",{ref:g,style:OA.searchInput,type:"text",placeholder:"Search symbol...",value:a,onChange:p=>l(p.target.value)})}),h.jsx("div",{style:OA.list,children:B.length===0?h.jsx("div",{style:OA.empty,children:"No symbols found"}):h.jsxs(h.Fragment,{children:[f.length>0&&h.jsxs(h.Fragment,{children:[h.jsx("div",{style:OA.categoryLabel,children:"Forex & Metals"}),f.map(p=>h.jsxs("div",{style:{...OA.item,...p.symbol===e?OA.itemSelected:{}},onClick:()=>m(p.symbol),onMouseEnter:v=>{p.symbol!==e&&(v.currentTarget.style.backgroundColor="#334155")},onMouseLeave:v=>{p.symbol!==e&&(v.currentTarget.style.backgroundColor="transparent")},children:[h.jsx("span",{style:OA.symbolName,children:p.symbol}),p.bid&&h.jsx("span",{style:{...OA.symbolPrice,...parseFloat(p.change)>=0?OA.priceUp:OA.priceDown},children:parseFloat(p.bid).toFixed(5)})]},p.symbol))]}),w.length>0&&h.jsxs(h.Fragment,{children:[h.jsx("div",{style:OA.categoryLabel,children:"Crypto"}),w.map(p=>h.jsxs("div",{style:{...OA.item,...p.symbol===e?OA.itemSelected:{}},onClick:()=>m(p.symbol),onMouseEnter:v=>{p.symbol!==e&&(v.currentTarget.style.backgroundColor="#334155")},onMouseLeave:v=>{p.symbol!==e&&(v.currentTarget.style.backgroundColor="transparent")},children:[h.jsx("span",{style:OA.symbolName,children:p.symbol}),p.bid&&h.jsx("span",{style:{...OA.symbolPrice,...parseFloat(p.change)>=0?OA.priceUp:OA.priceDown},children:parseFloat(p.bid).toFixed(2)})]},p.symbol))]})]})})]})]})}const Ve={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"}},lv=[.01,.05,.1,.5,1];function mu({value:r,onChange:A,min:e=.01,max:t=100,step:s=.01,presets:i=lv,showPresets:n=!0,showLabel:o=!0,label:a="Vol",style:l,className:c}){const[u,d]=b.useState(.1),g=r!==void 0?r:u,B=b.useCallback(p=>{const v=Math.max(e,Math.min(t,parseFloat(p)||e)),y=Math.round(v/s)*s,E=parseFloat(y.toFixed(8));r!==void 0||d(E),A?.(E)},[e,t,s,r,A]),f=()=>B(g+s),w=()=>B(g-s),m=(g>=1,g.toFixed(2));return h.jsxs("div",{style:{...Ve.container,...l},className:c,children:[o&&h.jsx("span",{style:Ve.label,children:a}),h.jsx("button",{style:Ve.btn,onClick:w,onMouseEnter:p=>Object.assign(p.currentTarget.style,Ve.btnHover),onMouseLeave:p=>{p.currentTarget.style.borderColor="#334155",p.currentTarget.style.backgroundColor="#1e293b"},children:"−"}),h.jsx("input",{style:Ve.input,type:"text",value:m,onChange:p=>{const v=p.target.value;if(v===""||v==="."||v==="0.")return;const y=parseFloat(v);isNaN(y)||B(y)},onBlur:()=>B(g)}),h.jsx("button",{style:Ve.btn,onClick:f,onMouseEnter:p=>Object.assign(p.currentTarget.style,Ve.btnHover),onMouseLeave:p=>{p.currentTarget.style.borderColor="#334155",p.currentTarget.style.backgroundColor="#1e293b"},children:"+"}),n&&i&&i.length>0&&h.jsx("div",{style:Ve.presets,children:i.map(p=>h.jsx("button",{style:{...Ve.preset,...Math.abs(g-p)<1e-4?Ve.presetActive:{}},onClick:()=>B(p),onMouseEnter:v=>{Math.abs(g-p)>=1e-4&&Object.assign(v.currentTarget.style,{borderColor:"#3b82f6"})},onMouseLeave:v=>{Math.abs(g-p)>=1e-4&&(v.currentTarget.style.borderColor="#334155")},children:p},p))})]})}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 Cu({value:r,onChange:A,enabled:e,onEnabledChange:t,mode:s,onModeChange:i,showToggle:n=!0,showModeSwitch:o=!0,showLabel:a=!0,label:l="SL",style:c,className:u}){const{currentSymbolData:d}=ne(),[g,B]=b.useState(""),[f,w]=b.useState(!1),[m,p]=b.useState("price"),v=r!==void 0?r:g,y=e!==void 0?e:f,E=s!==void 0?s:m,U=b.useCallback(M=>{e!==void 0||w(M),t?.(M)},[e,t]),I=b.useCallback(M=>{s!==void 0||p(M),i?.(M)},[s,i]),O=b.useCallback(M=>{r!==void 0||B(M),A?.(M)},[r,A]),T=M=>{const Z=M.target.value;if(Z===""||Z==="."||Z==="0."){O(Z);return}const S=parseFloat(Z);isNaN(S)||O(Z)},lA=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:()=>U(!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:T,placeholder:lA,onFocus:M=>M.currentTarget.style.borderColor="#EF5350",onBlur:M=>M.currentTarget.style.borderColor="#334155"}),o&&h.jsxs(h.Fragment,{children:[h.jsx("button",{style:{...Be.modeBtn,...E==="price"?Be.modeBtnActive:{}},onClick:()=>I("price"),children:"Price"}),h.jsx("button",{style:{...Be.modeBtn,...E==="pips"?Be.modeBtnActive:{}},onClick:()=>I("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 vu({value:r,onChange:A,enabled:e,onEnabledChange:t,mode:s,onModeChange:i,showToggle:n=!0,showModeSwitch:o=!0,showLabel:a=!0,label:l="TP",style:c,className:u}){const{currentSymbolData:d}=ne(),[g,B]=b.useState(""),[f,w]=b.useState(!1),[m,p]=b.useState("price"),v=r!==void 0?r:g,y=e!==void 0?e:f,E=s!==void 0?s:m,U=b.useCallback(M=>{e!==void 0||w(M),t?.(M)},[e,t]),I=b.useCallback(M=>{s!==void 0||p(M),i?.(M)},[s,i]),O=b.useCallback(M=>{r!==void 0||B(M),A?.(M)},[r,A]),T=M=>{const Z=M.target.value;if(Z===""||Z==="."||Z==="0."){O(Z);return}const S=parseFloat(Z);isNaN(S)||O(Z)},lA=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:()=>U(!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:T,placeholder:lA,onFocus:M=>M.currentTarget.style.borderColor="#26A69A",onBlur:M=>M.currentTarget.style.borderColor="#334155"}),o&&h.jsxs(h.Fragment,{children:[h.jsx("button",{style:{...ge.modeBtn,...E==="price"?ge.modeBtnActive:{}},onClick:()=>I("price"),children:"Price"}),h.jsx("button",{style:{...ge.modeBtn,...E==="pips"?ge.modeBtnActive:{}},onClick:()=>I("pips"),children:"Pips"})]})]})]})}const cv=[{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:"─"}],Pe={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 bu({showLabel:r=!0,showDelete:A=!0,showVisibility:e=!0,tools:t,label:s="Draw",style:i,className:n}){const{activeTool:o,setActiveTool:a,drawingsVisible:l,setDrawingsVisible:c,chartObjects:u,setChartObjects:d}=ne(),[g,B]=b.useState(null),f=t||cv,w=v=>{a(o===v?null:v)},m=()=>{d([]),a(null)},p=()=>{c(!l)};return h.jsxs("div",{style:{...Pe.container,...i},className:n,children:[r&&h.jsx("span",{style:Pe.label,children:s}),f.map(v=>h.jsxs("button",{style:{...Pe.btn,...o===v.id?Pe.btnActive:{}},onClick:()=>w(v.id),onMouseEnter:y=>{B(v.id),o!==v.id&&Object.assign(y.currentTarget.style,Pe.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:Pe.tooltip,children:v.name})]},v.id)),(A||e)&&h.jsx("div",{style:Pe.divider}),e&&h.jsx("button",{style:{...Pe.visibilityBtn,...l?{}:{color:"#64748b",backgroundColor:"#0f172a"}},onClick:p,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:Pe.deleteBtn,onClick:m,onMouseEnter:v=>Object.assign(v.currentTarget.style,Pe.deleteBtnHover),onMouseLeave:v=>{v.currentTarget.style.borderColor="#334155",v.currentTarget.style.backgroundColor="#1e293b",v.currentTarget.style.color="#94a3b8"},title:"Delete All Drawings",children:"🗑"})]})}const Qu={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 hv({showCoinSelector:r=!0,showVolumeControl:A=!0,showStopLoss:e=!0,showTakeProfit:t=!0,showDrawingTools:s=!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:w={},volumeControlProps:m={},stopLossProps:p={},takeProfitProps:v={},drawingToolsProps:y={},style:E,className:U}){const I=[];r&&I.push(h.jsx(wu,{...w},"coin")),A&&I.push(h.jsx(mu,{value:n,onChange:o,...m},"volume")),e&&I.push(h.jsx(Cu,{value:a,onChange:l,enabled:c,onEnabledChange:u,...p},"sl")),t&&I.push(h.jsx(vu,{value:d,onChange:g,enabled:B,onEnabledChange:f,...v},"tp")),s&&I.push(h.jsx(bu,{...y},"draw"));const O=[];return I.forEach((T,lA)=>{O.push(T),i&&lA<I.length-1&&O.push(h.jsx("div",{style:Qu.divider},`div-${lA}`))}),h.jsx("div",{style:{...Qu.toolbar,...E},className:U,children:O})}const uv=[{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 fv({style:r,className:A}){const{selectedTimeframe:e,setSelectedTimeframe:t}=ne();return h.jsx("div",{style:{...Mo.container,...r},className:A,children:uv.map(s=>h.jsx("button",{style:{...Mo.btn,...e===s.value?Mo.btnActive:{}},onClick:()=>t(s.value),onMouseEnter:i=>{e!==s.value&&(i.currentTarget.style.borderColor="#3b82f6")},onMouseLeave:i=>{e!==s.value&&(i.currentTarget.style.borderColor="#334155")},children:s.label},s.value))})}const dv=[{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 Bv({style:r,className:A}){const{chartType:e,setChartType:t}=ne();return h.jsx("div",{style:{...Do.container,...r},className:A,children:dv.map(s=>h.jsxs("button",{style:{...Do.btn,...e===s.value?Do.btnActive:{}},onClick:()=>t(s.value),onMouseEnter:i=>{e!==s.value&&(i.currentTarget.style.borderColor="#3b82f6")},onMouseLeave:i=>{e!==s.value&&(i.currentTarget.style.borderColor="#334155")},title:s.label,children:[h.jsx("span",{children:s.icon}),h.jsx("span",{children:s.label})]},s.value))})}const ae={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 gv({volume:r=.1,stopLoss:A,takeProfit:e,onTradeExecuted:t,style:s,className:i}){const{selectedSymbol:n,currentSymbolData:o,setOrders:a,setUserBalance:l}=ne(),[c,u]=b.useState(null),d=parseFloat(o?.bid||0),g=parseFloat(o?.ask||0),B=g>0&&d>0?Math.abs(g-d):0,f=p=>!p||p===0?"-.-----":p>=1e3?p.toFixed(2):p>=1?p.toFixed(4):p.toFixed(5),w=p=>p===0?"-":p>=1?p.toFixed(1):p>=.01?p.toFixed(3):(p*1e4).toFixed(1)+"p",m=b.useCallback(p=>{if(!n)return;const v=p==="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:p,volume:r,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(U=>[...U,y]);const E=r*v*.01;l(U=>U-E),u({type:"success",message:`${p} executed`}),t?.(y),setTimeout(()=>u(null),3e3)},[n,g,d,r,A,e,a,l,t]);return h.jsxs("div",{style:{...ae.container,...s},className:i,children:[h.jsx("button",{style:ae.sellBtn,onClick:()=>m("SELL"),onMouseEnter:p=>{Object.assign(p.currentTarget.style,ae.sellBtnHover)},onMouseLeave:p=>{p.currentTarget.style.backgroundColor="#7f1d1d",p.currentTarget.style.borderColor="#991b1b"},children:"Sell"}),h.jsxs("div",{style:ae.priceBox,children:[h.jsx("span",{style:ae.priceLabel,children:"Bid"}),h.jsx("span",{style:{...ae.priceValue,color:"#EF5350"},children:f(d)})]}),h.jsxs("div",{style:ae.spread,children:[h.jsx("span",{style:ae.spreadLabel,children:"Spread"}),h.jsx("span",{style:ae.spreadValue,children:w(B)})]}),h.jsxs("div",{style:ae.priceBox,children:[h.jsx("span",{style:ae.priceLabel,children:"Ask"}),h.jsx("span",{style:{...ae.priceValue,color:"#26A69A"},children:f(g)})]}),h.jsx("button",{style:ae.buyBtn,onClick:()=>m("BUY"),onMouseEnter:p=>{Object.assign(p.currentTarget.style,ae.buyBtnHover)},onMouseLeave:p=>{p.currentTarget.style.backgroundColor="#14532d",p.currentTarget.style.borderColor="#166534"},children:"Buy"}),c&&h.jsx("span",{style:{...ae.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 wA={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 pv({style:r,className:A,maxHeight:e=200}){const{orders:t,setOrders:s,symbols:i,accountSummary:n,setUserBalance:o}=ne(),[a,l]=b.useState(null),c=t.filter(f=>f.status==="OPEN"||!f.closeAt),u=b.useCallback((f,w)=>{const m=i.find(p=>p.symbol===f);return m?parseFloat(w==="BUY"?m.bid||0:m.ask||0):0},[i]),d=b.useCallback(f=>{if(a)return;l(f.id);const w=u(f.symbol,f.type),p=(f.type==="BUY"?w-f.price:f.price-w)*f.volume,v=f.volume*f.price*.01;s(y=>y.filter(E=>E.id!==f.id)),o(y=>y+v+p),l(null)},[a,u,s,o]),g=f=>{const w=parseFloat(f);return!w||isNaN(w)?"-":w>=1e3?w.toFixed(2):w>=1?w.toFixed(4):w.toFixed(5)},B=f=>{const w=parseFloat(f);return isNaN(w)?"-":(w>=0?"+":"")+w.toFixed(2)};return h.jsxs("div",{style:{...wA.container,...r},className:A,children:[h.jsxs("div",{style:wA.header,children:[h.jsxs("span",{style:wA.headerTitle,children:["Positions (",c.length,")"]}),h.jsxs("div",{style:wA.summary,children:[h.jsxs("div",{style:wA.summaryItem,children:[h.jsx("span",{style:wA.summaryLabel,children:"Balance:"}),h.jsxs("span",{style:{...wA.summaryValue,color:"#e2e8f0"},children:["$",n?.balance?.toFixed(2)||"0.00"]})]}),h.jsxs("div",{style:wA.summaryItem,children:[h.jsx("span",{style:wA.summaryLabel,children:"Equity:"}),h.jsxs("span",{style:{...wA.summaryValue,color:(n?.equity||0)>=(n?.balance||0)?"#26A69A":"#EF5350"},children:["$",n?.equity?.toFixed(2)||"0.00"]})]}),h.jsxs("div",{style:wA.summaryItem,children:[h.jsx("span",{style:wA.summaryLabel,children:"Free:"}),h.jsxs("span",{style:{...wA.summaryValue,color:"#94a3b8"},children:["$",n?.freeMargin?.toFixed(2)||"0.00"]})]})]})]}),h.jsx("div",{style:{...wA.scrollArea,maxHeight:e},children:h.jsxs("table",{style:wA.table,children:[h.jsx("thead",{children:h.jsxs("tr",{children:[h.jsx("th",{style:wA.th,children:"Symbol"}),h.jsx("th",{style:wA.th,children:"Type"}),h.jsx("th",{style:wA.th,children:"Volume"}),h.jsx("th",{style:wA.th,children:"Open Price"}),h.jsx("th",{style:wA.th,children:"Current"}),h.jsx("th",{style:wA.th,children:"SL"}),h.jsx("th",{style:wA.th,children:"TP"}),h.jsx("th",{style:wA.th,children:"Profit"}),h.jsx("th",{style:wA.th,children:"Action"})]})}),h.jsx("tbody",{children:c.length===0?h.jsx("tr",{children:h.jsx("td",{colSpan:9,style:wA.emptyRow,children:"No open positions"})}):c.map(f=>{const w=u(f.symbol,f.type),m=f.profit||0;return h.jsxs("tr",{children:[h.jsx("td",{style:{...wA.td,fontWeight:700,color:"#e2e8f0"},children:f.symbol}),h.jsx("td",{style:{...wA.td,...f.type==="BUY"?wA.typeBuy:wA.typeSell},children:f.type}),h.jsx("td",{style:wA.td,children:f.volume}),h.jsx("td",{style:wA.td,children:g(f.price)}),h.jsx("td",{style:wA.td,children:g(w)}),h.jsx("td",{style:wA.td,children:f.stopLoss?g(f.stopLoss):"-"}),h.jsx("td",{style:wA.td,children:f.takeProfit?g(f.takeProfit):"-"}),h.jsx("td",{style:{...wA.td,color:m>=0?"#26A69A":"#EF5350",fontWeight:700},children:B(m)}),h.jsx("td",{style:wA.td,children:h.jsx("button",{style:{...wA.closeBtn,...a===f.id?{opacity:.5,cursor:"not-allowed"}:{}},onClick:()=>d(f),disabled:a===f.id,onMouseEnter:p=>{a!==f.id&&(p.currentTarget.style.backgroundColor="#991b1b")},onMouseLeave:p=>{p.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},yu=b.createContext&&b.createContext(Fu),wv=["attr","size","title"];function mv(r,A){if(r==null)return{};var e=Cv(r,A),t,s;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);for(s=0;s<i.length;s++)t=i[s],!(A.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(r,t)&&(e[t]=r[t])}return e}function Cv(r,A){if(r==null)return{};var e={};for(var t in r)if(Object.prototype.hasOwnProperty.call(r,t)){if(A.indexOf(t)>=0)continue;e[t]=r[t]}return e}function mi(){return mi=Object.assign?Object.assign.bind():function(r){for(var A=1;A<arguments.length;A++){var e=arguments[A];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t])}return r},mi.apply(this,arguments)}function Uu(r,A){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(r);A&&(t=t.filter(function(s){return Object.getOwnPropertyDescriptor(r,s).enumerable})),e.push.apply(e,t)}return e}function Ci(r){for(var A=1;A<arguments.length;A++){var e=arguments[A]!=null?arguments[A]:{};A%2?Uu(Object(e),!0).forEach(function(t){vv(r,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):Uu(Object(e)).forEach(function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(e,t))})}return r}function vv(r,A,e){return A=bv(A),A in r?Object.defineProperty(r,A,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[A]=e,r}function bv(r){var A=Qv(r,"string");return typeof A=="symbol"?A:A+""}function Qv(r,A){if(typeof r!="object"||!r)return r;var e=r[Symbol.toPrimitive];if(e!==void 0){var t=e.call(r,A);if(typeof t!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(A==="string"?String:Number)(r)}function Eu(r){return r&&r.map((A,e)=>b.createElement(A.tag,Ci({key:e},A.attr),Eu(A.child)))}function Oo(r){return A=>b.createElement(Fv,mi({attr:Ci({},r.attr)},A),Eu(r.child))}function Fv(r){var A=e=>{var{attr:t,size:s,title:i}=r,n=mv(r,wv),o=s||e.size||"1em",a;return e.className&&(a=e.className),r.className&&(a=(a?a+" ":"")+r.className),b.createElement("svg",mi({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},e.attr,t,n,{className:a,style:Ci(Ci({color:r.color||e.color},e.style),r.style),height:o,width:o,xmlns:"http://www.w3.org/2000/svg"}),i&&b.createElement("title",null,i),r.children)};return yu!==void 0?b.createElement(yu.Consumer,null,e=>A(e)):A(Fu)}function yv(r){return Oo({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:[]}]})(r)}function Uv(r){return Oo({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 13H5v-2h14v2z"},child:[]}]})(r)}const Ev=({selectedSymbol:r,selectedTimeframe:A,onTimeframeChange:e,chartType:t="candles",onChartTypeChange:s,onNewOrder:i,onZoomIn:n,onZoomOut:o,onToggleBuySell:a,onDownloadChartPNG:l,onToggleFullscreen:c,marketWatchOpen:u=!0,onToggleMarketWatch:d,buySellPanelOpen:g})=>{const{theme:B}=ne(),f=B==="light",w=["M1","M5","M15","M30","H1","H4","D1","W1","MN"],m={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 ${f?"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 ${f?"border-slate-200":"border-slate-700"}`,children:["bars","candles","line","area"].map(p=>h.jsx("button",{onClick:()=>s(p),className:`px-1 py-1.5 text-[11px] font-medium rounded transition-colors capitalize flex items-center gap-1.5
11
- ${t===p?"text-secondary":f?"text-slate-700 hover:text-slate-900 hover:bg-[#E5F4FF]":"text-white hover:text-slate-200 hover:bg-slate-800"}
12
- `,title:p,children:m[p]},p))}),h.jsx("div",{className:`flex items-center gap-1 border-r ${f?"border-slate-200":"border-slate-700"} pr-1`,children:["volume ticks","volume"].map(p=>h.jsx("button",{onClick:()=>s(p),className:`px-1 py-1.5 text-[11px] font-medium rounded transition-colors capitalize flex items-center gap-1.5
13
- ${t===p?"text-secondary":f?"text-slate-700 hover:text-slate-900 hover:bg-[#E5F4FF]":"text-white hover:text-slate-200 hover:bg-slate-800"}
14
- `,title:p,children:m[p]},p))}),h.jsxs("div",{className:"flex items-center gap-2",children:[w.map(p=>h.jsx("button",{onClick:()=>e(p),className:`px-1.5 py-2 text-sm font-medium rounded transition-colors ${A===p?"text-secondary":f?"text-slate-700 hover:text-slate-900 hover:bg-[#E5F4FF]":"text-white hover:text-slate-200 hover:bg-slate-800"}`,children:p},p)),h.jsx("div",{className:`border-r h-6 mx-1 ${f?"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?f?"text-sky-600 bg-sky-50 hover:bg-[#E5F4FF]":"text-sky-400 bg-slate-700 hover:bg-[#25303C]":f?"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 ${f?"text-secondary 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 ${f?"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 ${f?"text-slate-700 hover:bg-[#E5F4FF]":"text-white hover:bg-slate-800"} rounded transition-colors`,title:"Zoom In",children:h.jsx(yv,{className:"w-5 h-5"})}),h.jsx("button",{onClick:o,className:`p-2 ${f?"text-slate-700 hover:bg-[#E5F4FF]":"text-white hover:bg-slate-800"} rounded transition-colors`,title:"Zoom Out",children:h.jsx(Uv,{className:"w-5 h-5"})}),h.jsx("div",{className:`border-r ${f?"border-slate-200":"border-slate-700"} h-6 mx-1`}),h.jsx("button",{onClick:i,className:`px-2 py-2 flex justify-center items-center gap-1 cursor-pointer text-xs font-medium rounded transition-colors ${f?"text-slate-600 hover:text-sky-600 hover:bg-[#E5F4FF]":"text-slate-200 hover:bg-[#25303C]"}`,children:h.jsxs("svg",{width:24,height:24,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",children:[h.jsx("path",{fillRule:"evenodd",d:"M14.057 18.177c.786 0 1.369-.451 1.763-.934.391-.48.699-1.108.954-1.763.474-1.22.861-2.791 1.22-4.312l-2.258.828c-.26 1.04-.527 1.991-.826 2.759-.226.58-.443.982-.64 1.223-.121.15-.194.19-.219.199-.312-.003-.62-.16-.964-.895-.354-.757-.586-1.809-.842-3.019l-.026-.122c-.235-1.108-.497-2.35-.932-3.316-.454-1.009-1.261-2.06-2.715-2.06-1.21 0-2.038.943-2.57 1.82-.562.93-1.022 2.16-1.4 3.449l2.378-.83c.233-.624.478-1.16.734-1.583.472-.78.782-.856.858-.856.26 0 .55.124.891.88.343.763.568 1.818.825 3.033l.004.019c.241 1.138.515 2.43.984 3.433.48 1.025 1.317 2.047 2.781 2.047Zm-.016-1.998s.004-.002.01-.002l-.01.002Z",clipRule:"evenodd"}),h.jsx("path",{d:"m5.752 15.75-2.187.763a94.295 94.295 0 0 0-.554 3.34 1 1 0 1 0 1.978.295c.183-1.226.434-2.799.763-4.397Z"}),h.jsx("path",{fillRule:"evenodd",d:"m16.845 7.46 2.353-.864.068-.191c.216-.585.422-.99.607-1.232A.784.784 0 0 1 20.038 5 1 1 0 0 0 20 3c-.791 0-1.354.485-1.717.96-.365.478-.653 1.102-.893 1.753-.194.526-.375 1.12-.546 1.746Zm3.211-2.47-.009.004c.006-.004.009-.004.009-.004Z",clipRule:"evenodd"}),h.jsx("path",{d:"M21.942 7.664a1 1 0 0 1-.605 1.278l-7 2.5a1 1 0 0 1-.673-1.884l7-2.5a1 1 0 0 1 1.278.606ZM8.86 13.433a1 1 0 1 0-.719-1.866l-6.5 2.5a1 1 0 0 0 .718 1.866l6.5-2.5Z"})]})}),h.jsx("div",{className:`border-r ${f?"border-slate-200":"border-slate-700"} h-6 mx-1`}),h.jsx("button",{onClick:i,className:`px-2 py-2 flex justify-center items-center gap-1 cursor-pointer text-xs font-medium rounded transition-colors ${f?"text-secondary 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 ${f?"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?f?"text-sky-600 bg-sky-50 hover:bg-[#E5F4FF]":"text-sky-400 bg-slate-700 hover:bg-[#25303C]":f?"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 ${f?"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 ${f?"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"})})})]})]})},xv=()=>{const{activeTool:r,setActiveTool:A,showGrid:e,setShowGrid:t,snapToGrid:s,setSnapToGrid:i,chartObjects:n,setChartObjects:o,drawingsVisible:a,setDrawingsVisible:l,chartLocked:c,setChartLocked:u,theme:d,setTheme:g}=ne(),[B,f]=b.useState(!1),[w,m]=b.useState(null),[p,v]=b.useState({chart:"Grid",colors:"Green & Red",lang:"English"}),y=b.useRef(null),E=b.useRef(null);b.useEffect(()=>{const S=V=>{if(!B)return;const X=y.current;X&&!X.contains(V.target)&&(f(!1),m(null))};return window.addEventListener("mousedown",S),()=>window.removeEventListener("mousedown",S)},[B]),b.useEffect(()=>{const S=V=>{V.key==="Escape"&&(f(!1),m(null))};return window.addEventListener("keydown",S),()=>window.removeEventListener("keydown",S)},[]);const U=b.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"}],[]),I=S=>{const V=U[S].label;if(V==="Menu"){f(X=>!X),m(null);return}if(V==="Grid"){t(!e);return}if(V==="Magnet"){i(!s),A(s?null:S);return}if(V==="Delete"){if(n.length>0){const X=[...n];X.pop(),o(X)}return}if(V==="Eye"){l(!a);return}if(V==="Lock"){u(!c);return}if(V==="Light Theme"||V==="Dark Theme"){g(d==="light"?"dark":"light"),f(!1),m(null);return}A(r===S?null:S)},O=U.slice(0,12),T=U.slice(12),lA=[{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:d==="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"})]})}],M=({item:S})=>{const V=!!S.submenu?.length;return h.jsxs("div",{className:"relative",onMouseEnter:()=>{E.current&&(clearTimeout(E.current),E.current=null),V&&m(S.key)},onMouseLeave:()=>{V&&(E.current=setTimeout(()=>m(null),120))},children:[h.jsxs("button",{type:"button",onClick:()=>{V?m(X=>X===S.key?null:S.key):(S.key==="theme"&&g(X=>X==="light"?"dark":"light"),f(!1),m(null))},className:`w-full flex items-center gap-3 px-4 py-2.5 text-left text-[13px] ${Z?"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 ${Z?"text-slate-500":"text-slate-400"}`,children:S.icon}),h.jsx("span",{className:"flex-1 text-[15px]",children:S.label}),S.rightText&&h.jsx("span",{className:`text-xs ${Z?"text-slate-500":"text-slate-400"}`,children:S.rightText}),V&&h.jsx("svg",{className:`w-4 h-4 ${Z?"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"})})]}),V&&w===S.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 ${Z?"bg-white border-slate-200":"bg-[#262F3F] border-white/10"}`,children:h.jsx("div",{className:"py-1",children:S.submenu.map((X,cA)=>{const hA=p[S.key]===X.label||X.selected&&p[S.key]==null;return h.jsxs("button",{type:"button",onClick:()=>{v(EA=>({...EA,[S.key]:X.label})),console.log("Sub selected:",S.key,X.label)},className:`w-full flex items-center gap-3 pl-3 pr-3 py-2 text-[13px] text-left ${Z?"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 ${Z?"text-slate-500":"text-slate-400"}`,children:X.icon||null}),h.jsx("span",{className:"flex-1 min-w-0",children:X.label}),hA&&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"})})})]},cA)})})})]})},Z=d==="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 ${Z?"bg-white border-slate-200":"bg-[#12161d] border-slate-700"}`,children:[h.jsx("div",{className:"flex flex-col items-center gap-2",children:O.map((S,V)=>h.jsxs(b.Fragment,{children:[h.jsx("button",{onClick:()=>I(V),className:`w-10 h-10 flex items-center justify-center rounded-md transition-colors duration-150
15
- ${S.label==="Grid"&&e||S.label==="Eye"&&!a||S.label==="Lock"&&c||r===V?Z?"text-sky-600 bg-sky-100":"text-sky-300 bg-slate-700":Z?"text-slate-600 hover:text-slate-900 hover:bg-slate-100":"text-slate-400 hover:text-slate-100 hover:bg-slate-700"}`,title:`${S.label}: ${S.description}`,children:S.icon}),S.label==="Text"&&h.jsx("div",{className:`w-8 border-t my-1 ${Z?"border-slate-200":"border-slate-700"}`})]},S.label))}),h.jsx("div",{className:"flex-1"}),h.jsx("div",{className:"flex flex-col items-center gap-2 pb-1",children:T.map((S,V)=>{const X=12+V;return h.jsx("button",{onClick:()=>I(X),className:`w-10 h-10 flex items-center justify-center rounded-md transition-colors duration-150
16
- ${S.label==="Grid"&&e||S.label==="Eye"&&!a||S.label==="Lock"&&c||r===X?Z?"text-sky-600 bg-sky-100":"text-sky-300 bg-slate-700":Z?"text-slate-600 hover:text-slate-900 hover:bg-slate-100":"text-slate-400 hover:text-slate-100 hover:bg-slate-700"}`,title:`${S.label}: ${S.description}`,children:S.icon},S.label)})})]}),B&&h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"fixed inset-0 z-40 bg-black/20",onClick:()=>{f(!1),m(null)},"aria-hidden":"true"}),h.jsxs("div",{ref:y,className:`absolute left-12 top-2 z-50 w-68 border shadow-2xl overflow-visible ${Z?"bg-white border-slate-200":"bg-[#262F3F] border-white/10"}`,children:[h.jsxs("div",{className:`relative px-4 py-3 border-b overflow-hidden ${Z?"bg-white border-slate-200":"border-white/10 bg-[#262F3F]"}`,children:[h.jsx("span",{className:"absolute top-0 right-0 inline-flex items-center justify-center text-[11px] font-semibold uppercase tracking-wide text-white shadow-md",title:"Demo",style:{backgroundColor:"var(--color-fill-greenHover, #16a34a)",transform:"rotate(45deg) translate(32%, -32%)",transformOrigin:"center",minWidth:"5rem"},children:"Demo"}),h.jsx("div",{className:`text-[16px] font-medium pr-12 ${Z?"text-slate-800":"text-slate-100"}`,children:"Anjolie Macias"}),h.jsx("div",{className:`text-[12px] mt-0.5 ${Z?"text-slate-500":"text-slate-400"}`,children:"5044488330 - MetaQuotes-Demo - Hedge"})]}),h.jsx("div",{className:"py-2",children:lA.map(S=>h.jsx(M,{item:S},S.key))})]})]})]})};function Sv(r){return Oo({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:[]}]})(r)}const Hv=({width:r=256,symbols:A=[],selectedSymbol:e,onSymbolSelect:t,symbolsLoading:s=!1,isOpen:i})=>{const{theme:n}=ne(),o=n==="light",[a,l]=b.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:`${r}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(Sv,{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:s?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))]})]})})]})]})},Lv=({accountSummary:r,orders:A,height:e})=>{const{accountSummary:t,orders:s,theme:i}=ne(),n=r||t,o=A||s,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))})]})})})]})},Iv="1.2.1";dA.AccountPanel=Lv,dA.Chart=av,dA.ChartTypeSelector=Bv,dA.CoinSelector=wu,dA.DrawingTools=bu,dA.LeftSidebar=xv,dA.MarketExecutionModal=nc,dA.MarketWatch=Hv,dA.PositionsPanel=pv,dA.SYMBOL_CONFIG=ac,dA.StopLoss=Cu,dA.TakeProfit=vu,dA.TimeframeSelector=fv,dA.TopBar=Ev,dA.TradePanel=gv,dA.TradingProvider=Fg,dA.TradingToolbar=hv,dA.VolumeControl=mu,dA.alignToTimeframe=kt,dA.detectGaps=Ug,dA.getSymbolConfig=Br,dA.is24x7Symbol=Lg,dA.isCryptoSymbol=Hg,dA.isForexSymbol=Sg,dA.isWithinTradingSession=Eg,dA.normalizeCandleTimes=oc,dA.normalizeTime=RA,dA.processCandles=fc,dA.processSingleCandle=dc,dA.setSocketBaseUrl=sc,dA.timeframeToSeconds=ys,dA.useTrading=ne,dA.validateTimeOrdering=xg,dA.version=Iv,Object.defineProperty(dA,Symbol.toStringTag,{value:"Module"})}));