@oliasoft-open-source/charts-library 5.1.3-beta-2 → 5.1.3-beta-3

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.
@@ -1358,7 +1358,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1358
1358
  `)+`
1359
1359
  `}function f(h,m,o,d,l,w,E){return u(c(h,m,o,d,l,w,E))}function g(h,m,o,d,l,w){return f(h,h,m,o,d,l,w)}return cu}var Xd={},o$;function Hqe(){if(o$)return Xd;o$=1,Object.defineProperty(Xd,"__esModule",{value:!0}),Xd.arrayEqual=e,Xd.arrayStartsWith=t;function e(n,r){return n.length!==r.length?!1:t(n,r)}function t(n,r){if(r.length>n.length)return!1;for(var i=0;i<r.length;i++)if(r[i]!==n[i])return!1;return!0}return Xd}var s$;function Bqe(){if(s$)return Kd;s$=1,Object.defineProperty(Kd,"__esModule",{value:!0}),Kd.calcLineCount=f,Kd.merge=g;var e=Ite(),t=d6(),n=Hqe();function r(k){return c(k)||a(k)||s(k)||i()}function i(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
1360
1360
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function s(k,D){if(k){if(typeof k=="string")return u(k,D);var I=Object.prototype.toString.call(k).slice(8,-1);if(I==="Object"&&k.constructor&&(I=k.constructor.name),I==="Map"||I==="Set")return Array.from(k);if(I==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(I))return u(k,D)}}function a(k){if(typeof Symbol<"u"&&Symbol.iterator in Object(k))return Array.from(k)}function c(k){if(Array.isArray(k))return u(k)}function u(k,D){(D==null||D>k.length)&&(D=k.length);for(var I=0,N=new Array(D);I<D;I++)N[I]=k[I];return N}function f(k){var D=M(k.lines),I=D.oldLines,N=D.newLines;I!==void 0?k.oldLines=I:delete k.oldLines,N!==void 0?k.newLines=N:delete k.newLines}function g(k,D,I){k=h(k,I),D=h(D,I);var N={};(k.index||D.index)&&(N.index=k.index||D.index),(k.newFileName||D.newFileName)&&(m(k)?m(D)?(N.oldFileName=o(N,k.oldFileName,D.oldFileName),N.newFileName=o(N,k.newFileName,D.newFileName),N.oldHeader=o(N,k.oldHeader,D.oldHeader),N.newHeader=o(N,k.newHeader,D.newHeader)):(N.oldFileName=k.oldFileName,N.newFileName=k.newFileName,N.oldHeader=k.oldHeader,N.newHeader=k.newHeader):(N.oldFileName=D.oldFileName||k.oldFileName,N.newFileName=D.newFileName||k.newFileName,N.oldHeader=D.oldHeader||k.oldHeader,N.newHeader=D.newHeader||k.newHeader)),N.hunks=[];for(var B=0,z=0,R=0,W=0;B<k.hunks.length||z<D.hunks.length;){var V=k.hunks[B]||{oldStart:1/0},Q=D.hunks[z]||{oldStart:1/0};if(d(V,Q))N.hunks.push(l(V,R)),B++,W+=V.newLines-V.oldLines;else if(d(Q,V))N.hunks.push(l(Q,W)),z++,R+=Q.newLines-Q.oldLines;else{var Y={oldStart:Math.min(V.oldStart,Q.oldStart),oldLines:0,newStart:Math.min(V.newStart+R,Q.oldStart+W),newLines:0,lines:[]};w(Y,V.oldStart,V.lines,Q.oldStart,Q.lines),z++,B++,N.hunks.push(Y)}}return N}function h(k,D){if(typeof k=="string"){if(/^@@/m.test(k)||/^Index:/m.test(k))return(0,t.parsePatch)(k)[0];if(!D)throw new Error("Must provide a base reference or pass in a patch");return(0,e.structuredPatch)(void 0,void 0,D,k)}return k}function m(k){return k.newFileName&&k.newFileName!==k.oldFileName}function o(k,D,I){return D===I?D:(k.conflict=!0,{mine:D,theirs:I})}function d(k,D){return k.oldStart<D.oldStart&&k.oldStart+k.oldLines<D.oldStart}function l(k,D){return{oldStart:k.oldStart,oldLines:k.oldLines,newStart:k.newStart+D,newLines:k.newLines,lines:k.lines}}function w(k,D,I,N,B){var z={offset:D,lines:I,index:0},R={offset:N,lines:B,index:0};for(y(k,z,R),y(k,R,z);z.index<z.lines.length&&R.index<R.lines.length;){var W=z.lines[z.index],V=R.lines[R.index];if((W[0]==="-"||W[0]==="+")&&(V[0]==="-"||V[0]==="+"))E(k,z,R);else if(W[0]==="+"&&V[0]===" "){var Q;(Q=k.lines).push.apply(Q,r(_(z)))}else if(V[0]==="+"&&W[0]===" "){var Y;(Y=k.lines).push.apply(Y,r(_(R)))}else W[0]==="-"&&V[0]===" "?v(k,z,R):V[0]==="-"&&W[0]===" "?v(k,R,z,!0):W===V?(k.lines.push(W),z.index++,R.index++):p(k,_(z),_(R))}T(k,z),T(k,R),f(k)}function E(k,D,I){var N=_(D),B=_(I);if(S(N)&&S(B)){if((0,n.arrayStartsWith)(N,B)&&C(I,N,N.length-B.length)){var z;(z=k.lines).push.apply(z,r(N));return}else if((0,n.arrayStartsWith)(B,N)&&C(D,B,B.length-N.length)){var R;(R=k.lines).push.apply(R,r(B));return}}else if((0,n.arrayEqual)(N,B)){var W;(W=k.lines).push.apply(W,r(N));return}p(k,N,B)}function v(k,D,I,N){var B=_(D),z=A(I,B);if(z.merged){var R;(R=k.lines).push.apply(R,r(z.merged))}else p(k,N?z:B,N?B:z)}function p(k,D,I){k.conflict=!0,k.lines.push({conflict:!0,mine:D,theirs:I})}function y(k,D,I){for(;D.offset<I.offset&&D.index<D.lines.length;){var N=D.lines[D.index++];k.lines.push(N),D.offset++}}function T(k,D){for(;D.index<D.lines.length;){var I=D.lines[D.index++];k.lines.push(I)}}function _(k){for(var D=[],I=k.lines[k.index][0];k.index<k.lines.length;){var N=k.lines[k.index];if(I==="-"&&N[0]==="+"&&(I="+"),I===N[0])D.push(N),k.index++;else break}return D}function A(k,D){for(var I=[],N=[],B=0,z=!1,R=!1;B<D.length&&k.index<k.lines.length;){var W=k.lines[k.index],V=D[B];if(V[0]==="+")break;if(z=z||W[0]!==" ",N.push(V),B++,W[0]==="+")for(R=!0;W[0]==="+";)I.push(W),W=k.lines[++k.index];V.substr(1)===W.substr(1)?(I.push(W),k.index++):R=!0}if((D[B]||"")[0]==="+"&&z&&(R=!0),R)return I;for(;B<D.length;)N.push(D[B++]);return{merged:N,changes:I}}function S(k){return k.reduce(function(D,I){return D&&I[0]==="-"},!0)}function C(k,D,I){for(var N=0;N<I;N++){var B=D[D.length-I+N].substr(1);if(k.lines[k.index+N]!==" "+B)return!1}return k.index+=I,!0}function M(k){var D=0,I=0;return k.forEach(function(N){if(typeof N!="string"){var B=M(N.mine),z=M(N.theirs);D!==void 0&&(B.oldLines===z.oldLines?D+=B.oldLines:D=void 0),I!==void 0&&(B.newLines===z.newLines?I+=B.newLines:I=void 0)}else I!==void 0&&(N[0]==="+"||N[0]===" ")&&I++,D!==void 0&&(N[0]==="-"||N[0]===" ")&&D++}),{oldLines:D,newLines:I}}return Kd}var fm={},a$;function Oqe(){if(a$)return fm;a$=1,Object.defineProperty(fm,"__esModule",{value:!0}),fm.reversePatch=r;function e(i,s){var a=Object.keys(i);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(i);s&&(c=c.filter(function(u){return Object.getOwnPropertyDescriptor(i,u).enumerable})),a.push.apply(a,c)}return a}function t(i){for(var s=1;s<arguments.length;s++){var a=arguments[s]!=null?arguments[s]:{};s%2?e(Object(a),!0).forEach(function(c){n(i,c,a[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(a)):e(Object(a)).forEach(function(c){Object.defineProperty(i,c,Object.getOwnPropertyDescriptor(a,c))})}return i}function n(i,s,a){return s in i?Object.defineProperty(i,s,{value:a,enumerable:!0,configurable:!0,writable:!0}):i[s]=a,i}function r(i){return Array.isArray(i)?i.map(r).reverse():t(t({},i),{},{oldFileName:i.newFileName,oldHeader:i.newHeader,newFileName:i.oldFileName,newHeader:i.oldHeader,hunks:i.hunks.map(function(s){return{oldLines:s.newLines,oldStart:s.newStart,newLines:s.oldLines,newStart:s.oldStart,linedelimiters:s.linedelimiters,lines:s.lines.map(function(a){return a.startsWith("-")?"+".concat(a.slice(1)):a.startsWith("+")?"-".concat(a.slice(1)):a})}})})}return fm}var pm={},u$;function zqe(){if(u$)return pm;u$=1,Object.defineProperty(pm,"__esModule",{value:!0}),pm.convertChangesToDMP=e;function e(t){for(var n=[],r,i,s=0;s<t.length;s++)r=t[s],r.added?i=1:r.removed?i=-1:i=0,n.push([i,r.value]);return n}return pm}var mm={},l$;function Uqe(){if(l$)return mm;l$=1,Object.defineProperty(mm,"__esModule",{value:!0}),mm.convertChangesToXML=e;function e(n){for(var r=[],i=0;i<n.length;i++){var s=n[i];s.added?r.push("<ins>"):s.removed&&r.push("<del>"),r.push(t(s.value)),s.added?r.push("</ins>"):s.removed&&r.push("</del>")}return r.join("")}function t(n){var r=n;return r=r.replace(/&/g,"&amp;"),r=r.replace(/</g,"&lt;"),r=r.replace(/>/g,"&gt;"),r=r.replace(/"/g,"&quot;"),r}return mm}var c$;function qqe(){return c$||(c$=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"Diff",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"diffChars",{enumerable:!0,get:function(){return n.diffChars}}),Object.defineProperty(e,"diffWords",{enumerable:!0,get:function(){return r.diffWords}}),Object.defineProperty(e,"diffWordsWithSpace",{enumerable:!0,get:function(){return r.diffWordsWithSpace}}),Object.defineProperty(e,"diffLines",{enumerable:!0,get:function(){return i.diffLines}}),Object.defineProperty(e,"diffTrimmedLines",{enumerable:!0,get:function(){return i.diffTrimmedLines}}),Object.defineProperty(e,"diffSentences",{enumerable:!0,get:function(){return s.diffSentences}}),Object.defineProperty(e,"diffCss",{enumerable:!0,get:function(){return a.diffCss}}),Object.defineProperty(e,"diffJson",{enumerable:!0,get:function(){return c.diffJson}}),Object.defineProperty(e,"canonicalize",{enumerable:!0,get:function(){return c.canonicalize}}),Object.defineProperty(e,"diffArrays",{enumerable:!0,get:function(){return u.diffArrays}}),Object.defineProperty(e,"applyPatch",{enumerable:!0,get:function(){return f.applyPatch}}),Object.defineProperty(e,"applyPatches",{enumerable:!0,get:function(){return f.applyPatches}}),Object.defineProperty(e,"parsePatch",{enumerable:!0,get:function(){return g.parsePatch}}),Object.defineProperty(e,"merge",{enumerable:!0,get:function(){return h.merge}}),Object.defineProperty(e,"reversePatch",{enumerable:!0,get:function(){return m.reversePatch}}),Object.defineProperty(e,"structuredPatch",{enumerable:!0,get:function(){return o.structuredPatch}}),Object.defineProperty(e,"createTwoFilesPatch",{enumerable:!0,get:function(){return o.createTwoFilesPatch}}),Object.defineProperty(e,"createPatch",{enumerable:!0,get:function(){return o.createPatch}}),Object.defineProperty(e,"formatPatch",{enumerable:!0,get:function(){return o.formatPatch}}),Object.defineProperty(e,"convertChangesToDMP",{enumerable:!0,get:function(){return d.convertChangesToDMP}}),Object.defineProperty(e,"convertChangesToXML",{enumerable:!0,get:function(){return l.convertChangesToXML}});var t=w(ja()),n=Mqe(),r=bqe(),i=c6(),s=Rqe(),a=Nqe(),c=Lqe(),u=Fqe(),f=xqe(),g=d6(),h=Bqe(),m=Oqe(),o=Ite(),d=zqe(),l=Uqe();function w(E){return E&&E.__esModule?E:{default:E}}}(dI)),dI}var d$;function Wqe(){if(d$)return Yr;d$=1;var e=Yr&&Yr.__createBinding||(Object.create?function(g,h,m,o){o===void 0&&(o=m);var d=Object.getOwnPropertyDescriptor(h,m);(!d||("get"in d?!h.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:function(){return h[m]}}),Object.defineProperty(g,o,d)}:function(g,h,m,o){o===void 0&&(o=m),g[o]=h[m]}),t=Yr&&Yr.__setModuleDefault||(Object.create?function(g,h){Object.defineProperty(g,"default",{enumerable:!0,value:h})}:function(g,h){g.default=h}),n=Yr&&Yr.__importStar||function(g){if(g&&g.__esModule)return g;var h={};if(g!=null)for(var m in g)m!=="default"&&Object.prototype.hasOwnProperty.call(g,m)&&e(h,g,m);return t(h,g),h};Object.defineProperty(Yr,"__esModule",{value:!0}),Yr.computeLineInformation=Yr.DiffMethod=Yr.DiffType=void 0;const r=n(qqe()),i=r;var s;(function(g){g[g.DEFAULT=0]="DEFAULT",g[g.ADDED=1]="ADDED",g[g.REMOVED=2]="REMOVED",g[g.CHANGED=3]="CHANGED"})(s||(Yr.DiffType=s={}));var a;(function(g){g.CHARS="diffChars",g.WORDS="diffWords",g.WORDS_WITH_SPACE="diffWordsWithSpace",g.LINES="diffLines",g.TRIMMED_LINES="diffTrimmedLines",g.SENTENCES="diffSentences",g.CSS="diffCss",g.JSON="diffJson"})(a||(Yr.DiffMethod=a={}));const c=g=>g===""?[]:g.replace(/\n$/,"").split(`
1361
- `),u=(g,h,m=a.CHARS)=>{const o=i[m](g,h),d={left:[],right:[]};return o.forEach(({added:l,removed:w,value:E})=>{const v={};return l&&(v.type=s.ADDED,v.value=E,d.right.push(v)),w&&(v.type=s.REMOVED,v.value=E,d.left.push(v)),!w&&!l&&(v.type=s.DEFAULT,v.value=E,d.right.push(v),d.left.push(v)),v}),d},f=(g,h,m=!1,o=a.CHARS,d=0,l=[])=>{let w=[];typeof g=="string"&&typeof h=="string"?w=r.diffLines(g.trimRight(),h.trimRight(),{newlineIsToken:!1,ignoreWhitespace:!1,ignoreCase:!1}):w=r.diffJson(g,h);let E=d,v=d,p=[],y=0;const T=[],_=[],A=(S,C,M,k,D)=>c(S).map((N,B)=>{const z={},R={};if(!(_.includes(`${C}-${B}`)||D&&B!==0)){if(M||k){let W=!0;if(k){v+=1,z.lineNumber=v,z.type=s.REMOVED,z.value=N||" ";const V=w[C+1];if(V&&V.added){const Q=c(V.value)[B];if(Q){const Y=A(Q,C,!0,!1,!0),{value:se,lineNumber:oe,type:te}=Y[0].right;if(_.push(`${C+1}-${B}`),R.lineNumber=oe,z.value===se)W=!1,R.type=0,z.type=0,R.value=se;else if(R.type=te,m)R.value=se;else{const ve=u(N,se,o);R.value=ve.right,z.value=ve.left}}}}else E+=1,R.lineNumber=E,R.type=s.ADDED,R.value=N;W&&!D&&(T.includes(y)||T.push(y))}else v+=1,E+=1,z.lineNumber=v,z.type=s.DEFAULT,z.value=N,R.lineNumber=E,R.type=s.DEFAULT,R.value=N;return(l!=null&&l.includes(`L-${z.lineNumber}`)||l!=null&&l.includes(`R-${R.lineNumber}`)&&!T.includes(y))&&T.push(y),D||(y+=1),{right:R,left:z}}}).filter(Boolean);return w.forEach(({added:S,removed:C,value:M},k)=>{p=[...p,...A(M,k,S,C)]}),{lineInformation:p,diffLines:T}};return Yr.computeLineInformation=f,Yr}var $s={},h$;function Vqe(){if(h$)return $s;h$=1;var e=$s&&$s.__rest||function(r,i){var s={};for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&i.indexOf(a)<0&&(s[a]=r[a]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var c=0,a=Object.getOwnPropertySymbols(r);c<a.length;c++)i.indexOf(a[c])<0&&Object.prototype.propertyIsEnumerable.call(r,a[c])&&(s[a[c]]=r[a[c]]);return s},t=$s&&$s.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty($s,"__esModule",{value:!0});const n=t(qFe());return $s.default=(r,i=!1,s="")=>{const{variables:a={}}=r,c=e(r,["variables"]),u={light:Object.assign({diffViewerBackground:"#fff",diffViewerColor:"#212529",addedBackground:"#e6ffed",addedColor:"#24292e",removedBackground:"#ffeef0",removedColor:"#24292e",changedBackground:"#fffbdd",wordAddedBackground:"#acf2bd",wordRemovedBackground:"#fdb8c0",addedGutterBackground:"#cdffd8",removedGutterBackground:"#ffdce0",gutterBackground:"#f7f7f7",gutterBackgroundDark:"#f3f1f1",highlightBackground:"#fffbdd",highlightGutterBackground:"#fff5b1",codeFoldGutterBackground:"#dbedff",codeFoldBackground:"#f1f8ff",emptyLineBackground:"#fafbfc",gutterColor:"#212529",addedGutterColor:"#212529",removedGutterColor:"#212529",codeFoldContentColor:"#212529",diffViewerTitleBackground:"#fafbfc",diffViewerTitleColor:"#212529",diffViewerTitleBorderColor:"#eee"},a.light||{}),dark:Object.assign({diffViewerBackground:"#2e303c",diffViewerColor:"#FFF",addedBackground:"#044B53",addedColor:"white",removedBackground:"#632F34",removedColor:"white",changedBackground:"#3e302c",wordAddedBackground:"#055d67",wordRemovedBackground:"#7d383f",addedGutterBackground:"#034148",removedGutterBackground:"#632b30",gutterBackground:"#2c2f3a",gutterBackgroundDark:"#262933",highlightBackground:"#2a3967",highlightGutterBackground:"#2d4077",codeFoldGutterBackground:"#21232b",codeFoldBackground:"#262831",emptyLineBackground:"#363946",gutterColor:"#666c87",addedGutterColor:"#8c8c8c",removedGutterColor:"#8c8c8c",codeFoldContentColor:"#656a8b",diffViewerTitleBackground:"#2f323e",diffViewerTitleColor:"#555a7b",diffViewerTitleBorderColor:"#353846"},a.dark||{})},f=i?u.dark:u.light,{css:g,cx:h}=(0,n.default)({key:"react-diff",nonce:s}),m=g({width:"100%",label:"content"}),o=g({[`.${m}`]:{width:"50%"},label:"split-view"}),d=g({width:"100%",background:f.diffViewerBackground,pre:{margin:0,whiteSpace:"pre-wrap",lineHeight:"25px"},label:"diff-container",borderCollapse:"collapse"}),l=g({color:f.codeFoldContentColor,label:"code-fold-content"}),w=g({color:f.diffViewerColor,label:"content-text"}),E=g({background:f.diffViewerTitleBackground,padding:10,borderBottom:`1px solid ${f.diffViewerTitleBorderColor}`,label:"title-block",":last-child":{borderLeft:`1px solid ${f.diffViewerTitleBorderColor}`},[`.${w}`]:{color:f.diffViewerTitleColor}}),v=g({color:f.gutterColor,label:"line-number"}),p=g({background:f.removedBackground,color:f.removedColor,pre:{color:f.removedColor},[`.${v}`]:{color:f.removedGutterColor},label:"diff-removed"}),y=g({background:f.addedBackground,color:f.addedColor,pre:{color:f.addedColor},[`.${v}`]:{color:f.addedGutterColor},label:"diff-added"}),T=g({background:f.changedBackground,[`.${v}`]:{color:f.gutterColor},label:"diff-changed"}),_=g({padding:2,display:"inline-flex",borderRadius:4,wordBreak:"break-all",label:"word-diff"}),A=g({background:f.wordAddedBackground,label:"word-added"}),S=g({background:f.wordRemovedBackground,label:"word-removed"}),C=g({backgroundColor:f.codeFoldGutterBackground,label:"code-fold-gutter"}),M=g({backgroundColor:f.codeFoldBackground,height:40,fontSize:14,fontWeight:700,label:"code-fold",a:{textDecoration:"underline !important",cursor:"pointer",pre:{display:"inline"}}}),k=g({backgroundColor:f.emptyLineBackground,label:"empty-line"}),D=g({width:25,paddingLeft:10,paddingRight:10,userSelect:"none",label:"marker",[`&.${y}`]:{pre:{color:f.addedColor}},[`&.${p}`]:{pre:{color:f.removedColor}}}),I=g({background:f.highlightBackground,label:"highlighted-line",[`.${A}, .${S}`]:{backgroundColor:"initial"}}),N=g({label:"highlighted-gutter"}),B=g({userSelect:"none",minWidth:50,padding:"0 10px",whiteSpace:"nowrap",label:"gutter",textAlign:"right",background:f.gutterBackground,"&:hover":{cursor:"pointer",background:f.gutterBackgroundDark,pre:{opacity:1}},pre:{opacity:.5},[`&.${y}`]:{background:f.addedGutterBackground},[`&.${p}`]:{background:f.removedGutterBackground},[`&.${N}`]:{background:f.highlightGutterBackground,"&:hover":{background:f.highlightGutterBackground}}}),z=g({"&:hover":{background:f.gutterBackground,cursor:"initial"},label:"empty-gutter"}),R=g({verticalAlign:"baseline",label:"line"}),W={diffContainer:d,diffRemoved:p,diffAdded:y,diffChanged:T,splitView:o,marker:D,highlightedGutter:N,highlightedLine:I,gutter:B,line:R,wordDiff:_,wordAdded:A,wordRemoved:S,codeFoldGutter:C,codeFold:M,emptyGutter:z,emptyLine:k,lineNumber:v,contentText:w,content:m,codeFoldContent:l,titleBlock:E},V=Object.keys(c).reduce((Q,Y)=>Object.assign(Object.assign({},Q),{[Y]:g(c[Y])}),{});return Object.keys(W).reduce((Q,Y)=>Object.assign(Object.assign({},Q),{[Y]:V[Y]?h(W[Y],V[Y]):W[Y]}),{})},$s}var jd={},f$;function $qe(){if(f$)return jd;f$=1,Object.defineProperty(jd,"__esModule",{value:!0}),jd.computeHiddenBlocks=void 0;function e(t,n,r){let i=0,s,a={},c=[];return t.forEach((u,f)=>{const g=n.some(h=>h>=f-r&&h<=f+r);!g&&s==null?(s={index:i,startLine:f,endLine:f,lines:1},c.push(s),a[f]=s.index,i++):g?s=void 0:(s.endLine=f,s.lines++,a[f]=s.index)}),{lineBlocks:a,blocks:c}}return jd.computeHiddenBlocks=e,jd}var p$=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function Gqe(e,t){return!!(e===t||p$(e)&&p$(t))}function Yqe(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!Gqe(e[n],t[n]))return!1;return!0}function Kqe(e,t){t===void 0&&(t=Yqe);var n=null;function r(){for(var i=[],s=0;s<arguments.length;s++)i[s]=arguments[s];if(n&&n.lastThis===this&&t(i,n.lastArgs))return n.lastResult;var a=e.apply(this,i);return n={lastResult:a,lastArgs:i,lastThis:this},a}return r.clear=function(){n=null},r}const Xqe=Object.freeze(Object.defineProperty({__proto__:null,default:Kqe},Symbol.toStringTag,{value:"Module"})),jqe=Qu(Xqe);var m$;function Qqe(){return m$||(m$=1,function(e){var t=Zi&&Zi.__createBinding||(Object.create?function(l,w,E,v){v===void 0&&(v=E);var p=Object.getOwnPropertyDescriptor(w,E);(!p||("get"in p?!w.__esModule:p.writable||p.configurable))&&(p={enumerable:!0,get:function(){return w[E]}}),Object.defineProperty(l,v,p)}:function(l,w,E,v){v===void 0&&(v=E),l[v]=w[E]}),n=Zi&&Zi.__setModuleDefault||(Object.create?function(l,w){Object.defineProperty(l,"default",{enumerable:!0,value:w})}:function(l,w){l.default=w}),r=Zi&&Zi.__importStar||function(l){if(l&&l.__esModule)return l;var w={};if(l!=null)for(var E in l)E!=="default"&&Object.prototype.hasOwnProperty.call(l,E)&&t(w,l,E);return n(w,l),w},i=Zi&&Zi.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(e,"__esModule",{value:!0}),e.DiffMethod=e.LineNumberPrefix=void 0;const s=one,a=r(We),c=i(_M()),u=Wqe();Object.defineProperty(e,"DiffMethod",{enumerable:!0,get:function(){return u.DiffMethod}});const f=i(Vqe()),g=$qe(),h=jqe,m=h.default||h;var o;(function(l){l.LEFT="L",l.RIGHT="R"})(o||(e.LineNumberPrefix=o={}));class d extends a.Component{constructor(w){super(w),this.resetCodeBlocks=()=>this.state.expandedBlocks.length>0?(this.setState({expandedBlocks:[]}),!0):!1,this.onBlockExpand=E=>{const v=this.state.expandedBlocks.slice();v.push(E),this.setState({expandedBlocks:v})},this.computeStyles=m(f.default),this.onLineNumberClickProxy=E=>this.props.onLineNumberClick?v=>this.props.onLineNumberClick(E,v):()=>{},this.renderWordDiff=(E,v)=>E.map((p,y)=>(0,s.jsx)("span",{className:(0,c.default)(this.styles.wordDiff,{[this.styles.wordAdded]:p.type===u.DiffType.ADDED,[this.styles.wordRemoved]:p.type===u.DiffType.REMOVED}),children:v?v(p.value):p.value},y)),this.renderLine=(E,v,p,y,T,_)=>{const A=`${p}-${E}`,S=`${_}-${T}`,C=this.props.highlightLines.includes(A)||this.props.highlightLines.includes(S),M=v===u.DiffType.ADDED,k=v===u.DiffType.REMOVED,D=v===u.DiffType.CHANGED;let I;return Array.isArray(y)?I=this.renderWordDiff(y,this.props.renderContent):this.props.renderContent?I=this.props.renderContent(y):I=y,(0,s.jsxs)(a.Fragment,{children:[!this.props.hideLineNumbers&&(0,s.jsx)("td",{onClick:E&&this.onLineNumberClickProxy(A),className:(0,c.default)(this.styles.gutter,{[this.styles.emptyGutter]:!E,[this.styles.diffAdded]:M,[this.styles.diffRemoved]:k,[this.styles.diffChanged]:D,[this.styles.highlightedGutter]:C}),children:(0,s.jsx)("pre",{className:this.styles.lineNumber,children:E})}),!this.props.splitView&&!this.props.hideLineNumbers&&(0,s.jsx)("td",{onClick:T&&this.onLineNumberClickProxy(S),className:(0,c.default)(this.styles.gutter,{[this.styles.emptyGutter]:!T,[this.styles.diffAdded]:M,[this.styles.diffRemoved]:k,[this.styles.diffChanged]:D,[this.styles.highlightedGutter]:C}),children:(0,s.jsx)("pre",{className:this.styles.lineNumber,children:T})}),this.props.renderGutter?this.props.renderGutter({lineNumber:E,type:v,prefix:p,value:y,additionalLineNumber:T,additionalPrefix:_,styles:this.styles}):null,!this.props.hideMarkers&&(0,s.jsx)("td",{className:(0,c.default)(this.styles.marker,{[this.styles.emptyLine]:!I,[this.styles.diffAdded]:M,[this.styles.diffRemoved]:k,[this.styles.diffChanged]:D,[this.styles.highlightedLine]:C}),children:(0,s.jsxs)("pre",{children:[M&&"+",k&&"-"]})}),(0,s.jsx)("td",{className:(0,c.default)(this.styles.content,{[this.styles.emptyLine]:!I,[this.styles.diffAdded]:M,[this.styles.diffRemoved]:k,[this.styles.diffChanged]:D,[this.styles.highlightedLine]:C}),children:(0,s.jsx)("pre",{className:this.styles.contentText,children:I})})]})},this.renderSplitView=({left:E,right:v},p)=>(0,s.jsxs)("tr",{className:this.styles.line,children:[this.renderLine(E.lineNumber,E.type,o.LEFT,E.value),this.renderLine(v.lineNumber,v.type,o.RIGHT,v.value)]},p),this.renderInlineView=({left:E,right:v},p)=>{let y;return E.type===u.DiffType.REMOVED&&v.type===u.DiffType.ADDED?(0,s.jsxs)(a.Fragment,{children:[(0,s.jsx)("tr",{className:this.styles.line,children:this.renderLine(E.lineNumber,E.type,o.LEFT,E.value,null)}),(0,s.jsx)("tr",{className:this.styles.line,children:this.renderLine(null,v.type,o.RIGHT,v.value,v.lineNumber)})]},p):(E.type===u.DiffType.REMOVED&&(y=this.renderLine(E.lineNumber,E.type,o.LEFT,E.value,null)),E.type===u.DiffType.DEFAULT&&(y=this.renderLine(E.lineNumber,E.type,o.LEFT,E.value,v.lineNumber,o.RIGHT)),v.type===u.DiffType.ADDED&&(y=this.renderLine(null,v.type,o.RIGHT,v.value,v.lineNumber)),(0,s.jsx)("tr",{className:this.styles.line,children:y},p))},this.onBlockClickProxy=E=>()=>this.onBlockExpand(E),this.renderSkippedLineIndicator=(E,v,p,y)=>{const{hideLineNumbers:T,splitView:_}=this.props,A=this.props.codeFoldMessageRenderer?this.props.codeFoldMessageRenderer(E,p,y):(0,s.jsxs)("pre",{className:this.styles.codeFoldContent,children:["Expand ",E," lines ..."]}),S=(0,s.jsx)("td",{children:(0,s.jsx)("a",{onClick:this.onBlockClickProxy(v),tabIndex:0,children:A})}),C=!_&&!T;return(0,s.jsxs)("tr",{className:this.styles.codeFold,children:[!T&&(0,s.jsx)("td",{className:this.styles.codeFoldGutter}),this.props.renderGutter?(0,s.jsx)("td",{className:this.styles.codeFoldGutter}):null,(0,s.jsx)("td",{className:(0,c.default)({[this.styles.codeFoldGutter]:C})}),C?(0,s.jsxs)(a.Fragment,{children:[(0,s.jsx)("td",{}),S]}):(0,s.jsxs)(a.Fragment,{children:[S,this.props.renderGutter?(0,s.jsx)("td",{}):null,(0,s.jsx)("td",{})]}),(0,s.jsx)("td",{}),(0,s.jsx)("td",{})]},`${p}-${y}`)},this.renderDiff=()=>{const{oldValue:E,newValue:v,splitView:p,disableWordDiff:y,compareMethod:T,linesOffset:_}=this.props,{lineInformation:A,diffLines:S}=(0,u.computeLineInformation)(E,v,y,T,_,this.props.alwaysShowLines),C=this.props.extraLinesSurroundingDiff<0?0:Math.round(this.props.extraLinesSurroundingDiff),{lineBlocks:M,blocks:k}=(0,g.computeHiddenBlocks)(A,S,C);return A.map((D,I)=>{if(this.props.showDiffOnly){const B=M[I];if(B!==void 0){const z=k[B].endLine===I;if(!this.state.expandedBlocks.includes(B)&&z)return(0,s.jsx)(a.Fragment,{children:this.renderSkippedLineIndicator(k[B].lines,B,D.left.lineNumber,D.right.lineNumber)},I);if(!this.state.expandedBlocks.includes(B))return null}}return p?this.renderSplitView(D,I):this.renderInlineView(D,I)})},this.render=()=>{const{oldValue:E,newValue:v,useDarkTheme:p,leftTitle:y,rightTitle:T,splitView:_,hideLineNumbers:A,hideMarkers:S,nonce:C}=this.props;if(this.props.compareMethod!==u.DiffMethod.JSON&&(typeof E!="string"||typeof v!="string"))throw Error('"oldValue" and "newValue" should be strings');this.styles=this.computeStyles(this.props.styles,p,C);const M=this.renderDiff();let k=A?2:3,D=A?2:4;S&&(k-=1,D-=1);const I=this.props.renderGutter?1:0,N=(y||T)&&(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{colSpan:(_?k:D)+I,className:this.styles.titleBlock,children:(0,s.jsx)("pre",{className:this.styles.contentText,children:y})}),_&&(0,s.jsx)("td",{colSpan:k+I,className:this.styles.titleBlock,children:(0,s.jsx)("pre",{className:this.styles.contentText,children:T})})]});return(0,s.jsx)("table",{className:(0,c.default)(this.styles.diffContainer,{[this.styles.splitView]:_}),children:(0,s.jsxs)("tbody",{children:[N,M]})})},this.state={expandedBlocks:[]}}}d.defaultProps={oldValue:"",newValue:"",splitView:!0,highlightLines:[],disableWordDiff:!1,compareMethod:u.DiffMethod.CHARS,styles:{},hideLineNumbers:!1,hideMarkers:!1,extraLinesSurroundingDiff:3,showDiffOnly:!0,useDarkTheme:!1,linesOffset:0,nonce:""},e.default=d}(Zi)),Zi}Qqe();const V$e=2,$$e=5,G$e=1,Y$e="round",K$e="transparent",X$e="rgba(0, 0, 0, 0.1)",j$e="dblclick",Q$e={TRANSLATIONS:"translations",LANGUAGE_KEY:"languageKey"},J$e=1e-4,Z$e=1e7,Mte=()=>{const e=q.useContext(tne);if(e===void 0)throw new Error("useLegend must be used within a LegendProvider");return e},Jqe=({chartRef:e,options:t})=>{const{state:n,dispatch:r}=Mte()??{},{annotations:i,interactions:{onLegendClick:s},legend:{customLegend:a}}=t??{};q.useEffect(()=>{var g;(g=n==null?void 0:n.datasets)==null||g.forEach((h,m)=>{var d,l;const o=(h==null?void 0:h.hidden)??!1;(d=e==null?void 0:e.current)==null||d.setDatasetVisibility(Number(m),!o),(l=e==null?void 0:e.current)==null||l.update()})},[n]);const c=q.useCallback((g,h)=>{var E;const{datasetIndex:m=-1}=h??{};let o=null;const d=e==null?void 0:e.current,l=((E=d==null?void 0:d.data)==null?void 0:E.datasets)??[],w=(l==null?void 0:l[m])??{};if(i!=null&&i.controlAnnotation&&(w!=null&&w.isAnnotation)&&(o=(w==null?void 0:w.annotationIndex)??null),s){const v=(h==null?void 0:h.hidden)??!1;s(h==null?void 0:h.text,v)}r({type:nne,payload:{chartInstance:d,dsConfig:{datasetIndex:m,datasets:l,dataset:w},annotationConfig:{annotationIndex:o}}}),d==null||d.update()},[e,i,r]),u=q.useMemo(()=>rne(t,c),[t,c]),f=q.useMemo(()=>({[ine]:(a==null?void 0:a.customLegendPlugin)&&{containerID:a==null?void 0:a.customLegendContainerID}}),[a]);return{legendClick:c,annotation:n==null?void 0:n.annotation,legend:u,customLegendPlugin:f}},eGe=(e=[])=>{let t={};return e.length&&(t=e.reduce((n,r,i)=>(n[`annotation${i+1}`]=r,n),{})),{annotations:t}};var Zqe=function(){},bte=typeof window<"u",eWe=bte?q.useLayoutEffect:q.useEffect,Rte={x:0,y:0,width:0,height:0,top:0,left:0,bottom:0,right:0};function tWe(){var e=q.useState(null),t=e[0],n=e[1],r=q.useState(Rte),i=r[0],s=r[1],a=q.useMemo(function(){return new window.ResizeObserver(function(c){if(c[0]){var u=c[0].contentRect,f=u.x,g=u.y,h=u.width,m=u.height,o=u.top,d=u.left,l=u.bottom,w=u.right;s({x:f,y:g,width:h,height:m,top:o,left:d,bottom:l,right:w})}})},[]);return eWe(function(){if(t)return a.observe(t),function(){a.disconnect()}},[t]),[n,i]}const nWe=bte&&typeof window.ResizeObserver<"u"?tWe:function(){return[Zqe,Rte]};var Nte={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},g$=We.createContext&&We.createContext(Nte),wa=function(){return wa=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},wa.apply(this,arguments)},rWe=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function Lte(e){return e&&e.map(function(t,n){return We.createElement(t.tag,wa({key:n},t.attr),Lte(t.child))})}function Is(e){return function(t){return We.createElement(iWe,wa({attr:wa({},e.attr)},t),Lte(e.child))}}function iWe(e){var t=function(n){var r=e.attr,i=e.size,s=e.title,a=rWe(e,["attr","size","title"]),c=i||n.size||"1em",u;return n.className&&(u=n.className),e.className&&(u=(u?u+" ":"")+e.className),We.createElement("svg",wa({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,a,{className:u,style:wa(wa({color:e.color||n.color},n.style),e.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),s&&We.createElement("title",null,s),e.children)};return g$!==void 0?We.createElement(g$.Consumer,null,function(n){return t(n)}):t(Nte)}function tGe(e){return Is({attr:{viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}},{tag:"path",attr:{d:"M18 9l3 3l-3 3"}},{tag:"path",attr:{d:"M15 12h6"}},{tag:"path",attr:{d:"M6 9l-3 3l3 3"}},{tag:"path",attr:{d:"M3 12h6"}},{tag:"path",attr:{d:"M9 18l3 3l3 -3"}},{tag:"path",attr:{d:"M12 15v6"}},{tag:"path",attr:{d:"M15 6l-3 -3l-3 3"}},{tag:"path",attr:{d:"M12 3v6"}}]})(e)}function nGe(e){return Is({attr:{viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}},{tag:"path",attr:{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"}},{tag:"path",attr:{d:"M5.7 5.7l12.6 12.6"}}]})(e)}function oWe(e){return Is({attr:{viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}},{tag:"path",attr:{d:"M7 3.34a10 10 0 1 1 -4.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 4.995 -8.336z",strokeWidth:"0",fill:"currentColor"}}]})(e)}function rGe(e){return Is({attr:{viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}},{tag:"path",attr:{d:"M8 13v-7.5a1.5 1.5 0 0 1 3 0v6.5"}},{tag:"path",attr:{d:"M11 5.5v-2a1.5 1.5 0 1 1 3 0v8.5"}},{tag:"path",attr:{d:"M14 5.5a1.5 1.5 0 0 1 3 0v6.5"}},{tag:"path",attr:{d:"M17 7.5a1.5 1.5 0 0 1 3 0v8.5a6 6 0 0 1 -6 6h-2h.208a6 6 0 0 1 -5.012 -2.7a69.74 69.74 0 0 1 -.196 -.3c-.312 -.479 -1.407 -2.388 -3.286 -5.728a1.5 1.5 0 0 1 .536 -2.022a1.867 1.867 0 0 1 2.28 .28l1.47 1.47"}}]})(e)}function sWe(e){return Is({attr:{viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}},{tag:"path",attr:{d:"M9 6l11 0"}},{tag:"path",attr:{d:"M9 12l11 0"}},{tag:"path",attr:{d:"M9 18l11 0"}},{tag:"path",attr:{d:"M5 6l0 .01"}},{tag:"path",attr:{d:"M5 12l0 .01"}},{tag:"path",attr:{d:"M5 18l0 .01"}}]})(e)}function iGe(e){return Is({attr:{viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}},{tag:"path",attr:{d:"M5 4h14a1 1 0 0 1 1 1v5a1 1 0 0 1 -1 1h-7a1 1 0 0 0 -1 1v7a1 1 0 0 1 -1 1h-5a1 1 0 0 1 -1 -1v-14a1 1 0 0 1 1 -1"}},{tag:"path",attr:{d:"M4 8l2 0"}},{tag:"path",attr:{d:"M4 12l3 0"}},{tag:"path",attr:{d:"M4 16l2 0"}},{tag:"path",attr:{d:"M8 4l0 2"}},{tag:"path",attr:{d:"M12 4l0 3"}},{tag:"path",attr:{d:"M16 4l0 2"}}]})(e)}function aWe(e){return Is({attr:{viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}},{tag:"path",attr:{d:"M19 2h-14a3 3 0 0 0 -3 3v14a3 3 0 0 0 3 3h14a3 3 0 0 0 3 -3v-14a3 3 0 0 0 -3 -3z",strokeWidth:"0",fill:"currentColor"}}]})(e)}function uWe(e){return Is({attr:{viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}},{tag:"path",attr:{d:"M18 6l-12 12"}},{tag:"path",attr:{d:"M6 6l12 12"}}]})(e)}function oGe(e){return Is({attr:{viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}},{tag:"path",attr:{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"}},{tag:"path",attr:{d:"M7 10l6 0"}},{tag:"path",attr:{d:"M10 7l0 6"}},{tag:"path",attr:{d:"M21 21l-6 -6"}}]})(e)}const lWe="_legend_wpro0_1",cWe="_isDragging_wpro0_8",dWe="_legendItems_wpro0_11",hWe="_isHidden_wpro0_47",fWe="_legendToggle_wpro0_50",pWe="_legendItem_wpro0_11",mWe="_legendItemSymbol_wpro0_80",gWe="_legendItemBox_wpro0_90",yWe="_legendItemLine_wpro0_95",vWe="_legendItemPoint_wpro0_103",EWe="_legendItemText_wpro0_110",wWe="_dropzoneContainer_wpro0_140",TWe="_dropzone_wpro0_140",SWe="_left_wpro0_149",_We="_right_wpro0_153",AWe="_top_wpro0_157",CWe="_bottom_wpro0_161",kWe="_dropzonePlaceholder_wpro0_165",DWe="_isActive_wpro0_173",IWe="_resizeContainer_wpro0_176",_n={legend:lWe,isDragging:cWe,legendItems:dWe,isHidden:hWe,legendToggle:fWe,legendItem:pWe,legendItemSymbol:mWe,legendItemBox:gWe,legendItemLine:yWe,legendItemPoint:vWe,legendItemText:EWe,dropzoneContainer:wWe,dropzone:TWe,left:SWe,right:_We,top:AWe,bottom:CWe,dropzonePlaceholder:kWe,isActive:DWe,resizeContainer:IWe},sM=e=>q.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"1em",height:"1em",...e},q.createElement("circle",{cx:12,cy:12,r:12,fill:"currentColor"}));var Ih=(e=>(e.LINE="line",e.BAR="bar",e.PIE="pie",e.SCATTER="scatter",e))(Ih||{}),MWe=(e=>(e.VERTICAL="vertical",e.HORIZONTAL="horizontal",e))(MWe||{});const bWe=e=>q.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"1em",height:"1em",...e},q.createElement("rect",{x:2,y:2,width:20,height:20,fill:"currentColor"})),RWe=e=>q.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"1em",height:"1em",...e},q.createElement("rect",{x:3,y:3,width:18,height:18,fill:"currentColor",transform:"rotate(45 12 12)"})),NWe=e=>q.createElement("svg",{height:"1em",viewBox:"0 0 24 24",width:"1em",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...e},q.createElement("path",{d:"m22.7998 22.0623h-21.5996c-.21066.0001-.417617-.0554-.600067-.1607-.182451-.1053-.333965-.2567-.439311-.4392-.1053464-.1824-.16081228-.3893-.160822-.6s.0554372-.4176.160767-.6l10.799833-18.70518c.1139-.17137.2684-.31191.4497-.40913.1814-.09722.3839-.14809.5897-.14809s.4083.05087.5897.14809c.1813.09722.3358.23776.4497.40913l10.7998 18.70518c.1054.1824.1608.3893.1608.6s-.0555.4176-.1608.6c-.1054.1825-.2569.3339-.4393.4392-.1825.1053-.3894.1608-.6001.1607z",fill:"currentColor"})),pI=16,y$=({dataset:e})=>{var u;const{borderColor:t,borderDash:n,borderWidth:r}=e??{},[i,s]=n??[],a=i&&s?(pI-i)/2%(i+s)*-1:0,c=((u=e==null?void 0:e.borderDash)==null?void 0:u.join(" "))||"";return x.jsx("span",{className:_n.legendItemLine,children:x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${pI} ${pI}`,width:"100%",height:"100%",children:x.jsx("line",{x1:"0",y1:"50%",x2:"100%",y2:"50%",stroke:t,strokeWidth:r,strokeDasharray:c,strokeDashoffset:a})})})},LWe=({dataset:e})=>{const{pointBackgroundColor:t,pointRadius:n,pointStyle:r=""}=e??{};if(!n)return null;const i=n*2,s={circle:x.jsx(sM,{}),triangle:x.jsx(NWe,{}),rectRot:x.jsx(RWe,{}),rect:x.jsx(bWe,{})};return x.jsx("span",{className:_n.legendItemPoint,children:x.jsx(pn,{icon:(s==null?void 0:s[r])??x.jsx(sM,{}),size:i,color:t})})},FWe=({dataset:e})=>{const{backgroundColor:t}=e??{},n={backgroundColor:t};return x.jsx("span",{className:_n.legendItemBox,style:n})},Fte=({dataset:e})=>{const{annotationType:t,showLine:n}=e??{};switch(t){case G0.Box:case G0.Ellipse:return x.jsx(FWe,{dataset:e});case G0.Line:return x.jsx(y$,{dataset:e});default:return x.jsxs(x.Fragment,{children:[n&&x.jsx(y$,{dataset:e}),x.jsx(LWe,{dataset:e})]})}};Fte.__docgenInfo={description:"",methods:[],displayName:"LegendItemLine"};const PWe=16,xWe=(e,t,n)=>{switch(t){case Ih.LINE:return x.jsx(Fte,{dataset:e});case Ih.BAR:{const{backgroundColor:r}=e??{},i=r instanceof Array?r==null?void 0:r[n]:r;return x.jsx("span",{className:_n.legendItemBox,children:x.jsx(aWe,{color:i})})}case Ih.PIE:return x.jsx("span",{className:_n.legendItemPoint,children:x.jsx(pn,{icon:x.jsx(sM,{})})});case Ih.SCATTER:{const{backgroundColor:r,borderColor:i}=e??{},s=r instanceof Array?r==null?void 0:r[n]:r;return x.jsx("span",{className:_n.legendItemPoint,children:x.jsx(oWe,{color:s??i})})}default:return null}},Pte=({hidden:e,dataset:t,handleClick:n,chartType:r,index:i})=>x.jsxs("div",{className:lM(_n==null?void 0:_n.legendItem,e&&(_n==null?void 0:_n.isHidden)),onClick:n,children:[x.jsx("span",{className:_n.legendItemSymbol,style:{width:PWe},children:xWe(t,r,i)}),x.jsx("span",{className:_n.legendItemText,children:t==null?void 0:t.label})]});Pte.__docgenInfo={description:"",methods:[],displayName:"LegendItem",props:{hidden:{required:!0,tsType:{name:"boolean"},description:""},dataset:{required:!0,tsType:{name:"union",raw:`| IGeneratedLineChartDataset
1361
+ `),u=(g,h,m=a.CHARS)=>{const o=i[m](g,h),d={left:[],right:[]};return o.forEach(({added:l,removed:w,value:E})=>{const v={};return l&&(v.type=s.ADDED,v.value=E,d.right.push(v)),w&&(v.type=s.REMOVED,v.value=E,d.left.push(v)),!w&&!l&&(v.type=s.DEFAULT,v.value=E,d.right.push(v),d.left.push(v)),v}),d},f=(g,h,m=!1,o=a.CHARS,d=0,l=[])=>{let w=[];typeof g=="string"&&typeof h=="string"?w=r.diffLines(g.trimRight(),h.trimRight(),{newlineIsToken:!1,ignoreWhitespace:!1,ignoreCase:!1}):w=r.diffJson(g,h);let E=d,v=d,p=[],y=0;const T=[],_=[],A=(S,C,M,k,D)=>c(S).map((N,B)=>{const z={},R={};if(!(_.includes(`${C}-${B}`)||D&&B!==0)){if(M||k){let W=!0;if(k){v+=1,z.lineNumber=v,z.type=s.REMOVED,z.value=N||" ";const V=w[C+1];if(V&&V.added){const Q=c(V.value)[B];if(Q){const Y=A(Q,C,!0,!1,!0),{value:se,lineNumber:oe,type:te}=Y[0].right;if(_.push(`${C+1}-${B}`),R.lineNumber=oe,z.value===se)W=!1,R.type=0,z.type=0,R.value=se;else if(R.type=te,m)R.value=se;else{const ve=u(N,se,o);R.value=ve.right,z.value=ve.left}}}}else E+=1,R.lineNumber=E,R.type=s.ADDED,R.value=N;W&&!D&&(T.includes(y)||T.push(y))}else v+=1,E+=1,z.lineNumber=v,z.type=s.DEFAULT,z.value=N,R.lineNumber=E,R.type=s.DEFAULT,R.value=N;return(l!=null&&l.includes(`L-${z.lineNumber}`)||l!=null&&l.includes(`R-${R.lineNumber}`)&&!T.includes(y))&&T.push(y),D||(y+=1),{right:R,left:z}}}).filter(Boolean);return w.forEach(({added:S,removed:C,value:M},k)=>{p=[...p,...A(M,k,S,C)]}),{lineInformation:p,diffLines:T}};return Yr.computeLineInformation=f,Yr}var $s={},h$;function Vqe(){if(h$)return $s;h$=1;var e=$s&&$s.__rest||function(r,i){var s={};for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&i.indexOf(a)<0&&(s[a]=r[a]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var c=0,a=Object.getOwnPropertySymbols(r);c<a.length;c++)i.indexOf(a[c])<0&&Object.prototype.propertyIsEnumerable.call(r,a[c])&&(s[a[c]]=r[a[c]]);return s},t=$s&&$s.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty($s,"__esModule",{value:!0});const n=t(qFe());return $s.default=(r,i=!1,s="")=>{const{variables:a={}}=r,c=e(r,["variables"]),u={light:Object.assign({diffViewerBackground:"#fff",diffViewerColor:"#212529",addedBackground:"#e6ffed",addedColor:"#24292e",removedBackground:"#ffeef0",removedColor:"#24292e",changedBackground:"#fffbdd",wordAddedBackground:"#acf2bd",wordRemovedBackground:"#fdb8c0",addedGutterBackground:"#cdffd8",removedGutterBackground:"#ffdce0",gutterBackground:"#f7f7f7",gutterBackgroundDark:"#f3f1f1",highlightBackground:"#fffbdd",highlightGutterBackground:"#fff5b1",codeFoldGutterBackground:"#dbedff",codeFoldBackground:"#f1f8ff",emptyLineBackground:"#fafbfc",gutterColor:"#212529",addedGutterColor:"#212529",removedGutterColor:"#212529",codeFoldContentColor:"#212529",diffViewerTitleBackground:"#fafbfc",diffViewerTitleColor:"#212529",diffViewerTitleBorderColor:"#eee"},a.light||{}),dark:Object.assign({diffViewerBackground:"#2e303c",diffViewerColor:"#FFF",addedBackground:"#044B53",addedColor:"white",removedBackground:"#632F34",removedColor:"white",changedBackground:"#3e302c",wordAddedBackground:"#055d67",wordRemovedBackground:"#7d383f",addedGutterBackground:"#034148",removedGutterBackground:"#632b30",gutterBackground:"#2c2f3a",gutterBackgroundDark:"#262933",highlightBackground:"#2a3967",highlightGutterBackground:"#2d4077",codeFoldGutterBackground:"#21232b",codeFoldBackground:"#262831",emptyLineBackground:"#363946",gutterColor:"#666c87",addedGutterColor:"#8c8c8c",removedGutterColor:"#8c8c8c",codeFoldContentColor:"#656a8b",diffViewerTitleBackground:"#2f323e",diffViewerTitleColor:"#555a7b",diffViewerTitleBorderColor:"#353846"},a.dark||{})},f=i?u.dark:u.light,{css:g,cx:h}=(0,n.default)({key:"react-diff",nonce:s}),m=g({width:"100%",label:"content"}),o=g({[`.${m}`]:{width:"50%"},label:"split-view"}),d=g({width:"100%",background:f.diffViewerBackground,pre:{margin:0,whiteSpace:"pre-wrap",lineHeight:"25px"},label:"diff-container",borderCollapse:"collapse"}),l=g({color:f.codeFoldContentColor,label:"code-fold-content"}),w=g({color:f.diffViewerColor,label:"content-text"}),E=g({background:f.diffViewerTitleBackground,padding:10,borderBottom:`1px solid ${f.diffViewerTitleBorderColor}`,label:"title-block",":last-child":{borderLeft:`1px solid ${f.diffViewerTitleBorderColor}`},[`.${w}`]:{color:f.diffViewerTitleColor}}),v=g({color:f.gutterColor,label:"line-number"}),p=g({background:f.removedBackground,color:f.removedColor,pre:{color:f.removedColor},[`.${v}`]:{color:f.removedGutterColor},label:"diff-removed"}),y=g({background:f.addedBackground,color:f.addedColor,pre:{color:f.addedColor},[`.${v}`]:{color:f.addedGutterColor},label:"diff-added"}),T=g({background:f.changedBackground,[`.${v}`]:{color:f.gutterColor},label:"diff-changed"}),_=g({padding:2,display:"inline-flex",borderRadius:4,wordBreak:"break-all",label:"word-diff"}),A=g({background:f.wordAddedBackground,label:"word-added"}),S=g({background:f.wordRemovedBackground,label:"word-removed"}),C=g({backgroundColor:f.codeFoldGutterBackground,label:"code-fold-gutter"}),M=g({backgroundColor:f.codeFoldBackground,height:40,fontSize:14,fontWeight:700,label:"code-fold",a:{textDecoration:"underline !important",cursor:"pointer",pre:{display:"inline"}}}),k=g({backgroundColor:f.emptyLineBackground,label:"empty-line"}),D=g({width:25,paddingLeft:10,paddingRight:10,userSelect:"none",label:"marker",[`&.${y}`]:{pre:{color:f.addedColor}},[`&.${p}`]:{pre:{color:f.removedColor}}}),I=g({background:f.highlightBackground,label:"highlighted-line",[`.${A}, .${S}`]:{backgroundColor:"initial"}}),N=g({label:"highlighted-gutter"}),B=g({userSelect:"none",minWidth:50,padding:"0 10px",whiteSpace:"nowrap",label:"gutter",textAlign:"right",background:f.gutterBackground,"&:hover":{cursor:"pointer",background:f.gutterBackgroundDark,pre:{opacity:1}},pre:{opacity:.5},[`&.${y}`]:{background:f.addedGutterBackground},[`&.${p}`]:{background:f.removedGutterBackground},[`&.${N}`]:{background:f.highlightGutterBackground,"&:hover":{background:f.highlightGutterBackground}}}),z=g({"&:hover":{background:f.gutterBackground,cursor:"initial"},label:"empty-gutter"}),R=g({verticalAlign:"baseline",label:"line"}),W={diffContainer:d,diffRemoved:p,diffAdded:y,diffChanged:T,splitView:o,marker:D,highlightedGutter:N,highlightedLine:I,gutter:B,line:R,wordDiff:_,wordAdded:A,wordRemoved:S,codeFoldGutter:C,codeFold:M,emptyGutter:z,emptyLine:k,lineNumber:v,contentText:w,content:m,codeFoldContent:l,titleBlock:E},V=Object.keys(c).reduce((Q,Y)=>Object.assign(Object.assign({},Q),{[Y]:g(c[Y])}),{});return Object.keys(W).reduce((Q,Y)=>Object.assign(Object.assign({},Q),{[Y]:V[Y]?h(W[Y],V[Y]):W[Y]}),{})},$s}var jd={},f$;function $qe(){if(f$)return jd;f$=1,Object.defineProperty(jd,"__esModule",{value:!0}),jd.computeHiddenBlocks=void 0;function e(t,n,r){let i=0,s,a={},c=[];return t.forEach((u,f)=>{const g=n.some(h=>h>=f-r&&h<=f+r);!g&&s==null?(s={index:i,startLine:f,endLine:f,lines:1},c.push(s),a[f]=s.index,i++):g?s=void 0:(s.endLine=f,s.lines++,a[f]=s.index)}),{lineBlocks:a,blocks:c}}return jd.computeHiddenBlocks=e,jd}var p$=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function Gqe(e,t){return!!(e===t||p$(e)&&p$(t))}function Yqe(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!Gqe(e[n],t[n]))return!1;return!0}function Kqe(e,t){t===void 0&&(t=Yqe);var n=null;function r(){for(var i=[],s=0;s<arguments.length;s++)i[s]=arguments[s];if(n&&n.lastThis===this&&t(i,n.lastArgs))return n.lastResult;var a=e.apply(this,i);return n={lastResult:a,lastArgs:i,lastThis:this},a}return r.clear=function(){n=null},r}const Xqe=Object.freeze(Object.defineProperty({__proto__:null,default:Kqe},Symbol.toStringTag,{value:"Module"})),jqe=Qu(Xqe);var m$;function Qqe(){return m$||(m$=1,function(e){var t=Zi&&Zi.__createBinding||(Object.create?function(l,w,E,v){v===void 0&&(v=E);var p=Object.getOwnPropertyDescriptor(w,E);(!p||("get"in p?!w.__esModule:p.writable||p.configurable))&&(p={enumerable:!0,get:function(){return w[E]}}),Object.defineProperty(l,v,p)}:function(l,w,E,v){v===void 0&&(v=E),l[v]=w[E]}),n=Zi&&Zi.__setModuleDefault||(Object.create?function(l,w){Object.defineProperty(l,"default",{enumerable:!0,value:w})}:function(l,w){l.default=w}),r=Zi&&Zi.__importStar||function(l){if(l&&l.__esModule)return l;var w={};if(l!=null)for(var E in l)E!=="default"&&Object.prototype.hasOwnProperty.call(l,E)&&t(w,l,E);return n(w,l),w},i=Zi&&Zi.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(e,"__esModule",{value:!0}),e.DiffMethod=e.LineNumberPrefix=void 0;const s=one,a=r(We),c=i(_M()),u=Wqe();Object.defineProperty(e,"DiffMethod",{enumerable:!0,get:function(){return u.DiffMethod}});const f=i(Vqe()),g=$qe(),h=jqe,m=h.default||h;var o;(function(l){l.LEFT="L",l.RIGHT="R"})(o||(e.LineNumberPrefix=o={}));class d extends a.Component{constructor(w){super(w),this.resetCodeBlocks=()=>this.state.expandedBlocks.length>0?(this.setState({expandedBlocks:[]}),!0):!1,this.onBlockExpand=E=>{const v=this.state.expandedBlocks.slice();v.push(E),this.setState({expandedBlocks:v})},this.computeStyles=m(f.default),this.onLineNumberClickProxy=E=>this.props.onLineNumberClick?v=>this.props.onLineNumberClick(E,v):()=>{},this.renderWordDiff=(E,v)=>E.map((p,y)=>(0,s.jsx)("span",{className:(0,c.default)(this.styles.wordDiff,{[this.styles.wordAdded]:p.type===u.DiffType.ADDED,[this.styles.wordRemoved]:p.type===u.DiffType.REMOVED}),children:v?v(p.value):p.value},y)),this.renderLine=(E,v,p,y,T,_)=>{const A=`${p}-${E}`,S=`${_}-${T}`,C=this.props.highlightLines.includes(A)||this.props.highlightLines.includes(S),M=v===u.DiffType.ADDED,k=v===u.DiffType.REMOVED,D=v===u.DiffType.CHANGED;let I;return Array.isArray(y)?I=this.renderWordDiff(y,this.props.renderContent):this.props.renderContent?I=this.props.renderContent(y):I=y,(0,s.jsxs)(a.Fragment,{children:[!this.props.hideLineNumbers&&(0,s.jsx)("td",{onClick:E&&this.onLineNumberClickProxy(A),className:(0,c.default)(this.styles.gutter,{[this.styles.emptyGutter]:!E,[this.styles.diffAdded]:M,[this.styles.diffRemoved]:k,[this.styles.diffChanged]:D,[this.styles.highlightedGutter]:C}),children:(0,s.jsx)("pre",{className:this.styles.lineNumber,children:E})}),!this.props.splitView&&!this.props.hideLineNumbers&&(0,s.jsx)("td",{onClick:T&&this.onLineNumberClickProxy(S),className:(0,c.default)(this.styles.gutter,{[this.styles.emptyGutter]:!T,[this.styles.diffAdded]:M,[this.styles.diffRemoved]:k,[this.styles.diffChanged]:D,[this.styles.highlightedGutter]:C}),children:(0,s.jsx)("pre",{className:this.styles.lineNumber,children:T})}),this.props.renderGutter?this.props.renderGutter({lineNumber:E,type:v,prefix:p,value:y,additionalLineNumber:T,additionalPrefix:_,styles:this.styles}):null,!this.props.hideMarkers&&(0,s.jsx)("td",{className:(0,c.default)(this.styles.marker,{[this.styles.emptyLine]:!I,[this.styles.diffAdded]:M,[this.styles.diffRemoved]:k,[this.styles.diffChanged]:D,[this.styles.highlightedLine]:C}),children:(0,s.jsxs)("pre",{children:[M&&"+",k&&"-"]})}),(0,s.jsx)("td",{className:(0,c.default)(this.styles.content,{[this.styles.emptyLine]:!I,[this.styles.diffAdded]:M,[this.styles.diffRemoved]:k,[this.styles.diffChanged]:D,[this.styles.highlightedLine]:C}),children:(0,s.jsx)("pre",{className:this.styles.contentText,children:I})})]})},this.renderSplitView=({left:E,right:v},p)=>(0,s.jsxs)("tr",{className:this.styles.line,children:[this.renderLine(E.lineNumber,E.type,o.LEFT,E.value),this.renderLine(v.lineNumber,v.type,o.RIGHT,v.value)]},p),this.renderInlineView=({left:E,right:v},p)=>{let y;return E.type===u.DiffType.REMOVED&&v.type===u.DiffType.ADDED?(0,s.jsxs)(a.Fragment,{children:[(0,s.jsx)("tr",{className:this.styles.line,children:this.renderLine(E.lineNumber,E.type,o.LEFT,E.value,null)}),(0,s.jsx)("tr",{className:this.styles.line,children:this.renderLine(null,v.type,o.RIGHT,v.value,v.lineNumber)})]},p):(E.type===u.DiffType.REMOVED&&(y=this.renderLine(E.lineNumber,E.type,o.LEFT,E.value,null)),E.type===u.DiffType.DEFAULT&&(y=this.renderLine(E.lineNumber,E.type,o.LEFT,E.value,v.lineNumber,o.RIGHT)),v.type===u.DiffType.ADDED&&(y=this.renderLine(null,v.type,o.RIGHT,v.value,v.lineNumber)),(0,s.jsx)("tr",{className:this.styles.line,children:y},p))},this.onBlockClickProxy=E=>()=>this.onBlockExpand(E),this.renderSkippedLineIndicator=(E,v,p,y)=>{const{hideLineNumbers:T,splitView:_}=this.props,A=this.props.codeFoldMessageRenderer?this.props.codeFoldMessageRenderer(E,p,y):(0,s.jsxs)("pre",{className:this.styles.codeFoldContent,children:["Expand ",E," lines ..."]}),S=(0,s.jsx)("td",{children:(0,s.jsx)("a",{onClick:this.onBlockClickProxy(v),tabIndex:0,children:A})}),C=!_&&!T;return(0,s.jsxs)("tr",{className:this.styles.codeFold,children:[!T&&(0,s.jsx)("td",{className:this.styles.codeFoldGutter}),this.props.renderGutter?(0,s.jsx)("td",{className:this.styles.codeFoldGutter}):null,(0,s.jsx)("td",{className:(0,c.default)({[this.styles.codeFoldGutter]:C})}),C?(0,s.jsxs)(a.Fragment,{children:[(0,s.jsx)("td",{}),S]}):(0,s.jsxs)(a.Fragment,{children:[S,this.props.renderGutter?(0,s.jsx)("td",{}):null,(0,s.jsx)("td",{})]}),(0,s.jsx)("td",{}),(0,s.jsx)("td",{})]},`${p}-${y}`)},this.renderDiff=()=>{const{oldValue:E,newValue:v,splitView:p,disableWordDiff:y,compareMethod:T,linesOffset:_}=this.props,{lineInformation:A,diffLines:S}=(0,u.computeLineInformation)(E,v,y,T,_,this.props.alwaysShowLines),C=this.props.extraLinesSurroundingDiff<0?0:Math.round(this.props.extraLinesSurroundingDiff),{lineBlocks:M,blocks:k}=(0,g.computeHiddenBlocks)(A,S,C);return A.map((D,I)=>{if(this.props.showDiffOnly){const B=M[I];if(B!==void 0){const z=k[B].endLine===I;if(!this.state.expandedBlocks.includes(B)&&z)return(0,s.jsx)(a.Fragment,{children:this.renderSkippedLineIndicator(k[B].lines,B,D.left.lineNumber,D.right.lineNumber)},I);if(!this.state.expandedBlocks.includes(B))return null}}return p?this.renderSplitView(D,I):this.renderInlineView(D,I)})},this.render=()=>{const{oldValue:E,newValue:v,useDarkTheme:p,leftTitle:y,rightTitle:T,splitView:_,hideLineNumbers:A,hideMarkers:S,nonce:C}=this.props;if(this.props.compareMethod!==u.DiffMethod.JSON&&(typeof E!="string"||typeof v!="string"))throw Error('"oldValue" and "newValue" should be strings');this.styles=this.computeStyles(this.props.styles,p,C);const M=this.renderDiff();let k=A?2:3,D=A?2:4;S&&(k-=1,D-=1);const I=this.props.renderGutter?1:0,N=(y||T)&&(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{colSpan:(_?k:D)+I,className:this.styles.titleBlock,children:(0,s.jsx)("pre",{className:this.styles.contentText,children:y})}),_&&(0,s.jsx)("td",{colSpan:k+I,className:this.styles.titleBlock,children:(0,s.jsx)("pre",{className:this.styles.contentText,children:T})})]});return(0,s.jsx)("table",{className:(0,c.default)(this.styles.diffContainer,{[this.styles.splitView]:_}),children:(0,s.jsxs)("tbody",{children:[N,M]})})},this.state={expandedBlocks:[]}}}d.defaultProps={oldValue:"",newValue:"",splitView:!0,highlightLines:[],disableWordDiff:!1,compareMethod:u.DiffMethod.CHARS,styles:{},hideLineNumbers:!1,hideMarkers:!1,extraLinesSurroundingDiff:3,showDiffOnly:!0,useDarkTheme:!1,linesOffset:0,nonce:""},e.default=d}(Zi)),Zi}Qqe();const V$e=2,$$e=5,G$e=1,Y$e="round",K$e="transparent",X$e="rgba(0, 0, 0, 0.1)",j$e="dblclick",Q$e={TRANSLATIONS:"translations",LANGUAGE_KEY:"languageKey"},J$e=1e-4,Z$e=1e7,Mte=()=>{const e=q.useContext(tne);if(e===void 0)throw new Error("useLegend must be used within a LegendProvider");return e},Jqe=({chartRef:e,options:t})=>{const{state:n,dispatch:r}=Mte()??{},{annotations:i,interactions:{onLegendClick:s},legend:{customLegend:a}}=t??{};q.useEffect(()=>{var g;console.log("Legend state effect triggered",n),(g=n==null?void 0:n.datasets)==null||g.forEach((h,m)=>{var d,l;const o=(h==null?void 0:h.hidden)??!1;(d=e==null?void 0:e.current)==null||d.setDatasetVisibility(Number(m),!o),(l=e==null?void 0:e.current)==null||l.update("none")})},[e,n]);const c=q.useCallback((g,h)=>{var E;const{datasetIndex:m=-1}=h??{};let o=null;const d=e==null?void 0:e.current,l=((E=d==null?void 0:d.data)==null?void 0:E.datasets)??[],w=(l==null?void 0:l[m])??{};if(i!=null&&i.controlAnnotation&&(w!=null&&w.isAnnotation)&&(o=(w==null?void 0:w.annotationIndex)??null),s){const v=(h==null?void 0:h.hidden)??!1;s(h==null?void 0:h.text,v)}r({type:nne,payload:{chartInstance:d,dsConfig:{datasetIndex:m,datasets:l,dataset:w},annotationConfig:{annotationIndex:o}}}),d==null||d.update()},[e,i,r]),u=q.useMemo(()=>rne(t,c),[t,c]),f=q.useMemo(()=>({[ine]:(a==null?void 0:a.customLegendPlugin)&&{containerID:a==null?void 0:a.customLegendContainerID}}),[a]);return{legendClick:c,annotation:n==null?void 0:n.annotation,legend:u,customLegendPlugin:f}},eGe=(e=[])=>{let t={};return e.length&&(t=e.reduce((n,r,i)=>(n[`annotation${i+1}`]=r,n),{})),{annotations:t}};var Zqe=function(){},bte=typeof window<"u",eWe=bte?q.useLayoutEffect:q.useEffect,Rte={x:0,y:0,width:0,height:0,top:0,left:0,bottom:0,right:0};function tWe(){var e=q.useState(null),t=e[0],n=e[1],r=q.useState(Rte),i=r[0],s=r[1],a=q.useMemo(function(){return new window.ResizeObserver(function(c){if(c[0]){var u=c[0].contentRect,f=u.x,g=u.y,h=u.width,m=u.height,o=u.top,d=u.left,l=u.bottom,w=u.right;s({x:f,y:g,width:h,height:m,top:o,left:d,bottom:l,right:w})}})},[]);return eWe(function(){if(t)return a.observe(t),function(){a.disconnect()}},[t]),[n,i]}const nWe=bte&&typeof window.ResizeObserver<"u"?tWe:function(){return[Zqe,Rte]};var Nte={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},g$=We.createContext&&We.createContext(Nte),wa=function(){return wa=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},wa.apply(this,arguments)},rWe=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function Lte(e){return e&&e.map(function(t,n){return We.createElement(t.tag,wa({key:n},t.attr),Lte(t.child))})}function Is(e){return function(t){return We.createElement(iWe,wa({attr:wa({},e.attr)},t),Lte(e.child))}}function iWe(e){var t=function(n){var r=e.attr,i=e.size,s=e.title,a=rWe(e,["attr","size","title"]),c=i||n.size||"1em",u;return n.className&&(u=n.className),e.className&&(u=(u?u+" ":"")+e.className),We.createElement("svg",wa({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,a,{className:u,style:wa(wa({color:e.color||n.color},n.style),e.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),s&&We.createElement("title",null,s),e.children)};return g$!==void 0?We.createElement(g$.Consumer,null,function(n){return t(n)}):t(Nte)}function tGe(e){return Is({attr:{viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}},{tag:"path",attr:{d:"M18 9l3 3l-3 3"}},{tag:"path",attr:{d:"M15 12h6"}},{tag:"path",attr:{d:"M6 9l-3 3l3 3"}},{tag:"path",attr:{d:"M3 12h6"}},{tag:"path",attr:{d:"M9 18l3 3l3 -3"}},{tag:"path",attr:{d:"M12 15v6"}},{tag:"path",attr:{d:"M15 6l-3 -3l-3 3"}},{tag:"path",attr:{d:"M12 3v6"}}]})(e)}function nGe(e){return Is({attr:{viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}},{tag:"path",attr:{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"}},{tag:"path",attr:{d:"M5.7 5.7l12.6 12.6"}}]})(e)}function oWe(e){return Is({attr:{viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}},{tag:"path",attr:{d:"M7 3.34a10 10 0 1 1 -4.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 4.995 -8.336z",strokeWidth:"0",fill:"currentColor"}}]})(e)}function rGe(e){return Is({attr:{viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}},{tag:"path",attr:{d:"M8 13v-7.5a1.5 1.5 0 0 1 3 0v6.5"}},{tag:"path",attr:{d:"M11 5.5v-2a1.5 1.5 0 1 1 3 0v8.5"}},{tag:"path",attr:{d:"M14 5.5a1.5 1.5 0 0 1 3 0v6.5"}},{tag:"path",attr:{d:"M17 7.5a1.5 1.5 0 0 1 3 0v8.5a6 6 0 0 1 -6 6h-2h.208a6 6 0 0 1 -5.012 -2.7a69.74 69.74 0 0 1 -.196 -.3c-.312 -.479 -1.407 -2.388 -3.286 -5.728a1.5 1.5 0 0 1 .536 -2.022a1.867 1.867 0 0 1 2.28 .28l1.47 1.47"}}]})(e)}function sWe(e){return Is({attr:{viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}},{tag:"path",attr:{d:"M9 6l11 0"}},{tag:"path",attr:{d:"M9 12l11 0"}},{tag:"path",attr:{d:"M9 18l11 0"}},{tag:"path",attr:{d:"M5 6l0 .01"}},{tag:"path",attr:{d:"M5 12l0 .01"}},{tag:"path",attr:{d:"M5 18l0 .01"}}]})(e)}function iGe(e){return Is({attr:{viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}},{tag:"path",attr:{d:"M5 4h14a1 1 0 0 1 1 1v5a1 1 0 0 1 -1 1h-7a1 1 0 0 0 -1 1v7a1 1 0 0 1 -1 1h-5a1 1 0 0 1 -1 -1v-14a1 1 0 0 1 1 -1"}},{tag:"path",attr:{d:"M4 8l2 0"}},{tag:"path",attr:{d:"M4 12l3 0"}},{tag:"path",attr:{d:"M4 16l2 0"}},{tag:"path",attr:{d:"M8 4l0 2"}},{tag:"path",attr:{d:"M12 4l0 3"}},{tag:"path",attr:{d:"M16 4l0 2"}}]})(e)}function aWe(e){return Is({attr:{viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}},{tag:"path",attr:{d:"M19 2h-14a3 3 0 0 0 -3 3v14a3 3 0 0 0 3 3h14a3 3 0 0 0 3 -3v-14a3 3 0 0 0 -3 -3z",strokeWidth:"0",fill:"currentColor"}}]})(e)}function uWe(e){return Is({attr:{viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}},{tag:"path",attr:{d:"M18 6l-12 12"}},{tag:"path",attr:{d:"M6 6l12 12"}}]})(e)}function oGe(e){return Is({attr:{viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}},{tag:"path",attr:{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"}},{tag:"path",attr:{d:"M7 10l6 0"}},{tag:"path",attr:{d:"M10 7l0 6"}},{tag:"path",attr:{d:"M21 21l-6 -6"}}]})(e)}const lWe="_legend_wpro0_1",cWe="_isDragging_wpro0_8",dWe="_legendItems_wpro0_11",hWe="_isHidden_wpro0_47",fWe="_legendToggle_wpro0_50",pWe="_legendItem_wpro0_11",mWe="_legendItemSymbol_wpro0_80",gWe="_legendItemBox_wpro0_90",yWe="_legendItemLine_wpro0_95",vWe="_legendItemPoint_wpro0_103",EWe="_legendItemText_wpro0_110",wWe="_dropzoneContainer_wpro0_140",TWe="_dropzone_wpro0_140",SWe="_left_wpro0_149",_We="_right_wpro0_153",AWe="_top_wpro0_157",CWe="_bottom_wpro0_161",kWe="_dropzonePlaceholder_wpro0_165",DWe="_isActive_wpro0_173",IWe="_resizeContainer_wpro0_176",_n={legend:lWe,isDragging:cWe,legendItems:dWe,isHidden:hWe,legendToggle:fWe,legendItem:pWe,legendItemSymbol:mWe,legendItemBox:gWe,legendItemLine:yWe,legendItemPoint:vWe,legendItemText:EWe,dropzoneContainer:wWe,dropzone:TWe,left:SWe,right:_We,top:AWe,bottom:CWe,dropzonePlaceholder:kWe,isActive:DWe,resizeContainer:IWe},sM=e=>q.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"1em",height:"1em",...e},q.createElement("circle",{cx:12,cy:12,r:12,fill:"currentColor"}));var Ih=(e=>(e.LINE="line",e.BAR="bar",e.PIE="pie",e.SCATTER="scatter",e))(Ih||{}),MWe=(e=>(e.VERTICAL="vertical",e.HORIZONTAL="horizontal",e))(MWe||{});const bWe=e=>q.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"1em",height:"1em",...e},q.createElement("rect",{x:2,y:2,width:20,height:20,fill:"currentColor"})),RWe=e=>q.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"1em",height:"1em",...e},q.createElement("rect",{x:3,y:3,width:18,height:18,fill:"currentColor",transform:"rotate(45 12 12)"})),NWe=e=>q.createElement("svg",{height:"1em",viewBox:"0 0 24 24",width:"1em",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...e},q.createElement("path",{d:"m22.7998 22.0623h-21.5996c-.21066.0001-.417617-.0554-.600067-.1607-.182451-.1053-.333965-.2567-.439311-.4392-.1053464-.1824-.16081228-.3893-.160822-.6s.0554372-.4176.160767-.6l10.799833-18.70518c.1139-.17137.2684-.31191.4497-.40913.1814-.09722.3839-.14809.5897-.14809s.4083.05087.5897.14809c.1813.09722.3358.23776.4497.40913l10.7998 18.70518c.1054.1824.1608.3893.1608.6s-.0555.4176-.1608.6c-.1054.1825-.2569.3339-.4393.4392-.1825.1053-.3894.1608-.6001.1607z",fill:"currentColor"})),pI=16,y$=({dataset:e})=>{var u;const{borderColor:t,borderDash:n,borderWidth:r}=e??{},[i,s]=n??[],a=i&&s?(pI-i)/2%(i+s)*-1:0,c=((u=e==null?void 0:e.borderDash)==null?void 0:u.join(" "))||"";return x.jsx("span",{className:_n.legendItemLine,children:x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${pI} ${pI}`,width:"100%",height:"100%",children:x.jsx("line",{x1:"0",y1:"50%",x2:"100%",y2:"50%",stroke:t,strokeWidth:r,strokeDasharray:c,strokeDashoffset:a})})})},LWe=({dataset:e})=>{const{pointBackgroundColor:t,pointRadius:n,pointStyle:r=""}=e??{};if(!n)return null;const i=n*2,s={circle:x.jsx(sM,{}),triangle:x.jsx(NWe,{}),rectRot:x.jsx(RWe,{}),rect:x.jsx(bWe,{})};return x.jsx("span",{className:_n.legendItemPoint,children:x.jsx(pn,{icon:(s==null?void 0:s[r])??x.jsx(sM,{}),size:i,color:t})})},FWe=({dataset:e})=>{const{backgroundColor:t}=e??{},n={backgroundColor:t};return x.jsx("span",{className:_n.legendItemBox,style:n})},Fte=({dataset:e})=>{const{annotationType:t,showLine:n}=e??{};switch(t){case G0.Box:case G0.Ellipse:return x.jsx(FWe,{dataset:e});case G0.Line:return x.jsx(y$,{dataset:e});default:return x.jsxs(x.Fragment,{children:[n&&x.jsx(y$,{dataset:e}),x.jsx(LWe,{dataset:e})]})}};Fte.__docgenInfo={description:"",methods:[],displayName:"LegendItemLine"};const PWe=16,xWe=(e,t,n)=>{switch(t){case Ih.LINE:return x.jsx(Fte,{dataset:e});case Ih.BAR:{const{backgroundColor:r}=e??{},i=r instanceof Array?r==null?void 0:r[n]:r;return x.jsx("span",{className:_n.legendItemBox,children:x.jsx(aWe,{color:i})})}case Ih.PIE:return x.jsx("span",{className:_n.legendItemPoint,children:x.jsx(pn,{icon:x.jsx(sM,{})})});case Ih.SCATTER:{const{backgroundColor:r,borderColor:i}=e??{},s=r instanceof Array?r==null?void 0:r[n]:r;return x.jsx("span",{className:_n.legendItemPoint,children:x.jsx(oWe,{color:s??i})})}default:return null}},Pte=({hidden:e,dataset:t,handleClick:n,chartType:r,index:i})=>x.jsxs("div",{className:lM(_n==null?void 0:_n.legendItem,e&&(_n==null?void 0:_n.isHidden)),onClick:n,children:[x.jsx("span",{className:_n.legendItemSymbol,style:{width:PWe},children:xWe(t,r,i)}),x.jsx("span",{className:_n.legendItemText,children:t==null?void 0:t.label})]});Pte.__docgenInfo={description:"",methods:[],displayName:"LegendItem",props:{hidden:{required:!0,tsType:{name:"boolean"},description:""},dataset:{required:!0,tsType:{name:"union",raw:`| IGeneratedLineChartDataset
1362
1362
  | IGenerateBarChartDataset
1363
1363
  | IGeneratedPieChartDataset
1364
1364
  | IGeneratedScatterChartDataset`,elements:[{name:"IGeneratedLineChartDataset"},{name:"IGenerateBarChartDataset"},{name:"IGeneratedPieChartDataset"},{name:"IGeneratedScatterChartDataset"}]},description:""},handleClick:{required:!0,tsType:{name:"MouseEventHandler",elements:[{name:"HTMLDivElement"}],raw:"MouseEventHandler<HTMLDivElement>"},description:""},chartType:{required:!0,tsType:{name:"ChartType"},description:""},index:{required:!0,tsType:{name:"number"},description:""}}};const HWe=e=>{const t=vn.get(e,"options.plugins.annotation.annotations",null);return!t||!Object.keys(t).length?[]:Object.values(t)},BWe=e=>{var t,n,r,i,s;return vn.cloneDeep((s=(i=(r=(n=(t=e==null?void 0:e.options)==null?void 0:t.plugins)==null?void 0:n.legend)==null?void 0:r.labels)==null?void 0:i.generateLabels)==null?void 0:s.call(i,e))??[]},OWe=e=>{const t=BWe(e),n=HWe(e);return vn.map(t,r=>{const i=vn.find(n,s=>{var a;return r.text===((a=s==null?void 0:s.label)==null?void 0:a.content)});return i?{...r,hidden:!(i!=null&&i.display)}:r})},zWe=(e,t)=>{const[n,r]=q.useState([]);return q.useEffect(()=>{const i=e==null?void 0:e.current;if(!i)return;const s=OWe(i);r(s)},[t,e]),n},i1=4,UWe=(e,t)=>{const{height:n=0,width:r=0,chartArea:i}=t??{},{top:s=0,left:a=0,bottom:c=0,right:u=0}=i??{};return{left:e!=null&&e.includes("left")?a:void 0,right:e!=null&&e.includes("right")?r-u:void 0,top:e!=null&&e.includes("top")?s:void 0,bottom:e!=null&&e.includes("bottom")?n-c:void 0,maxHeight:.5*(c-s-i1*2),maxWidth:.9*(u-a-i1*2),margin:i1}},qWe=({items:e,legendState:t,datasets:n,legendClick:r,chartType:i})=>x.jsx("div",{className:_n.legendItems,children:e==null?void 0:e.map((s,a)=>{var u,f,g;if((u=n==null?void 0:n[s==null?void 0:s.datasetIndex])!=null&&u.hideLegend)return null;const c=(g=(f=t==null?void 0:t.datasets)==null?void 0:f[s==null?void 0:s.datasetIndex])==null?void 0:g.hidden;return x.jsx(Pte,{index:a,hidden:c??(s==null?void 0:s.hidden),dataset:n==null?void 0:n[s==null?void 0:s.datasetIndex],handleClick:h=>r(h,s),chartType:i},`${s==null?void 0:s.datasetIndex}-hidden-${s==null?void 0:s.hidden}`)})}),xte=q.forwardRef(({legendPosition:e,chartRef:t,isDragging:n,legendConfig:r},i)=>{var E;const s=t==null?void 0:t.current,{options:a,generatedDatasets:c,chartType:u}=r??{},f=(E=s==null?void 0:s.data)==null?void 0:E.datasets,{legend:g,legendClick:h}=Jqe({chartRef:t,options:a}),{state:m}=Mte()??{},[o,d]=q.useState((g==null?void 0:g.display)??!0),l=zWe(t,c),w=UWe(e,s);return x.jsxs("div",{ref:i,className:lM(_n.legend,!o&&_n.isHidden,n&&_n.isDragging),style:w,children:[x.jsx("div",{className:_n.legendToggle,children:x.jsx(jr,{onClick:()=>d(!o),small:!0,round:!0,icon:o?x.jsx(uWe,{}):x.jsx(sWe,{})})}),x.jsx(qWe,{items:l,legendState:m,datasets:f,legendClick:h,chartType:u})]})});xte.__docgenInfo={description:"",methods:[],displayName:"LegendPanel",props:{chartRef:{required:!0,tsType:{name:"RefObject",elements:[{name:"Chart"}],raw:"RefObject<Chart>"},description:""},legendConfig:{required:!0,tsType:{name:"ILegendConfig"},description:""},legendPosition:{required:!0,tsType:{name:"Position"},description:""},isDragging:{required:!0,tsType:{name:"boolean"},description:""}}};const WWe=e=>{const{position:t="",onDrop:n=vn.noop,placeholderSize:r={}}=e??{},[{isOver:i,canDrop:s},a]=Boe(()=>({accept:"legend",drop:n,collect:u=>({isOver:u==null?void 0:u.isOver(),canDrop:u==null?void 0:u.canDrop()})})),c=i&&s;return x.jsx("div",{ref:a,className:lM(_n.dropzone,c&&_n.isActive,(t==null?void 0:t.includes("left"))&&_n.left,(t==null?void 0:t.includes("right"))&&_n.right,(t==null?void 0:t.includes("top"))&&_n.top,(t==null?void 0:t.includes("bottom"))&&_n.bottom),children:x.jsx("div",{className:_n.dropzonePlaceholder,style:{...r,margin:i1}})})},Hte=e=>{const{chartArea:t,setLegendPosition:n,isDragging:r,placeholderSize:i}=e??{},s=[Qd.TopLeft,Qd.TopRight,Qd.BottomLeft,Qd.BottomRight],{top:a,left:c,width:u,height:f}=t??{};return x.jsx("div",{className:_n.dropzoneContainer,style:{top:a,left:c,width:u,height:f,zIndex:r?0:-1},children:s==null?void 0:s.map(g=>x.jsx(WWe,{position:g,onDrop:()=>n(g),placeholderSize:i},g))})};Hte.__docgenInfo={description:"",methods:[],displayName:"LegendDropZones",props:{chartArea:{required:!1,tsType:{name:"ChartArea"},description:""},setLegendPosition:{required:!0,tsType:{name:"signature",type:"function",raw:"(position: Position) => void",signature:{arguments:[{type:{name:"Position"},name:"position"}],return:{name:"void"}}},description:""},isDragging:{required:!0,tsType:{name:"boolean"},description:""},placeholderSize:{required:!1,tsType:{name:"signature",type:"object",raw:`{
@@ -1,4 +1,4 @@
1
- import{j as F}from"./jsx-runtime-W3oueGCa.js";import{r as G,g as ct}from"./index-YTOF1_EJ.js";import{$ as dt,a0 as bn,a1 as we,B as fe,a2 as gt,v as Y,A as ie,P as Ce,C as _e,a3 as an,a4 as ht,g as Ke,y as pt,S as mt,E as bt,F as yt,a5 as Se,a6 as Pe,H as Ee,a7 as Ne,G as Je,I as wt,T as _t,L as yn,a as Et,J as Be,K as Tt,M as be,d as Lt,r as vt,N as wn,a8 as At,f as xt,a9 as Ct,U as St,aa as le,ab as fn,ac as xe,D as Pt,ad as ye,b as It,s as Ot,Q as Nt,ae as Mt,h as Dt,i as Bt,V as jt,W as Ft,j as kt,k as Ut,p as Rt,m as Gt,n as Yt,o as zt,q as Vt,t as Xt}from"./legend-context-BxOj5cqZ.js";import{r as He,M as cn,k as je,B as ce,s as Ht,v as qt,w as _n,x as Wt,y as $t,z as Zt,A as Kt,E as Jt,N as En,G as Qt,S as er,g as nr,e as tr,F as rr,T as Un,J as or,K as sr,D as ir,O as lr,Q as ur,o as ar,q as fr,U as cr,j as dr,u as gr,Z as hr,t as pr,R as mr,l as br,H as yr,L as wr,m as _r,n as Er}from"./legend-CqbLApjH.js";import{c as Tr,C as Lr,f as Tn,a as vr,b as Ar}from"./get-draggableData-YBXdJsiL.js";import{e as xr}from"./index-CgYGpm1H.js";const Cr=(e,n,t)=>{const[o,r]=e.major,[d,c]=e.minor,p=(o.x+r.x+d.x+c.x)/4,w=(o.y+r.y+d.y+c.y)/4,C=r.x-o.x,E=r.y-o.y,P=Math.atan2(t.getPixelForValue(w+E/2)-t.getPixelForValue(w-E/2),n.getPixelForValue(p+C/2)-n.getPixelForValue(p-C/2)),M=Math.hypot(n.getPixelForValue(o.x)-n.getPixelForValue(r.x),t.getPixelForValue(o.y)-t.getPixelForValue(r.y))/2,N=Math.hypot(n.getPixelForValue(d.x)-n.getPixelForValue(c.x),t.getPixelForValue(d.y)-t.getPixelForValue(c.y))/2,v=n.getPixelForValue(p),x=t.getPixelForValue(w);return{cx:v,cy:x,radiusX:M,radiusY:N,angle:P}},Sr=e=>e.data.datasets.some(n=>n.data.some(t=>!!t.ellipsePoints)),Pr={id:"ellipsisAnnotationPlugin",afterDatasetsDraw(e){var d,c,p,w,C,E,P,M,N;if(!Sr(e))return;const n=e==null?void 0:e.ctx,t=(d=e==null?void 0:e.scales)==null?void 0:d.x,o=(c=e==null?void 0:e.scales)==null?void 0:c.y,r=e==null?void 0:e.chartArea;!t||!o||!r||((p=n==null?void 0:n.save)==null||p.call(n),(w=n==null?void 0:n.beginPath)==null||w.call(n),(C=n==null?void 0:n.rect)==null||C.call(n,r.left,r.top,r.right-r.left,r.bottom-r.top),(E=n==null?void 0:n.clip)==null||E.call(n),(M=(P=e==null?void 0:e.data)==null?void 0:P.datasets)==null||M.forEach(v=>{var h;const x=v;(h=x==null?void 0:x.data)==null||h.forEach(A=>{var l,u,i,_,T;const{ellipsePoints:b}=A??{};if(!b)return;const{cx:L,cy:y,radiusX:S,radiusY:f,angle:g}=Cr(b,t,o);(l=n==null?void 0:n.save)==null||l.call(n),(u=n==null?void 0:n.beginPath)==null||u.call(n),(i=n==null?void 0:n.ellipse)==null||i.call(n,L,y,S,f,g,0,2*Math.PI),n.strokeStyle=x.borderColor||dt,n.lineWidth=x.borderWidth||1,(_=n==null?void 0:n.stroke)==null||_.call(n),(T=n==null?void 0:n.restore)==null||T.call(n)})}),(N=n==null?void 0:n.restore)==null||N.call(n))}},Ir="_chart_e3qdd_1",Or="_canvas_e3qdd_11",Nr="_fixedHeight_e3qdd_20",Mr="_stretchHeight_e3qdd_26",Dr="_squareAspectRatio_e3qdd_32",Br="_table_e3qdd_62",qe={chart:Ir,canvas:Or,fixedHeight:Nr,stretchHeight:Mr,squareAspectRatio:Dr,table:Br};var Rn=Symbol.for("immer-nothing"),Ln=Symbol.for("immer-draftable"),ne=Symbol.for("immer-state");function oe(e,...n){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Te=Object.getPrototypeOf;function Le(e){return!!e&&!!e[ne]}function he(e){var n;return e?Gn(e)||Array.isArray(e)||!!e[Ln]||!!((n=e.constructor)!=null&&n[Ln])||ze(e)||Ve(e):!1}var jr=Object.prototype.constructor.toString();function Gn(e){if(!e||typeof e!="object")return!1;const n=Te(e);if(n===null)return!0;const t=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return t===Object?!0:typeof t=="function"&&Function.toString.call(t)===jr}function Fe(e,n){Ye(e)===0?Reflect.ownKeys(e).forEach(t=>{n(t,e[t],e)}):e.forEach((t,o)=>n(o,t,e))}function Ye(e){const n=e[ne];return n?n.type_:Array.isArray(e)?1:ze(e)?2:Ve(e)?3:0}function Qe(e,n){return Ye(e)===2?e.has(n):Object.prototype.hasOwnProperty.call(e,n)}function Yn(e,n,t){const o=Ye(e);o===2?e.set(n,t):o===3?e.add(t):e[n]=t}function Fr(e,n){return e===n?e!==0||1/e===1/n:e!==e&&n!==n}function ze(e){return e instanceof Map}function Ve(e){return e instanceof Set}function ge(e){return e.copy_||e.base_}function en(e,n){if(ze(e))return new Map(e);if(Ve(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const t=Gn(e);if(n===!0||n==="class_only"&&!t){const o=Object.getOwnPropertyDescriptors(e);delete o[ne];let r=Reflect.ownKeys(o);for(let d=0;d<r.length;d++){const c=r[d],p=o[c];p.writable===!1&&(p.writable=!0,p.configurable=!0),(p.get||p.set)&&(o[c]={configurable:!0,writable:!0,enumerable:p.enumerable,value:e[c]})}return Object.create(Te(e),o)}else{const o=Te(e);if(o!==null&&t)return{...e};const r=Object.create(o);return Object.assign(r,e)}}function dn(e,n=!1){return Xe(e)||Le(e)||!he(e)||(Ye(e)>1&&(e.set=e.add=e.clear=e.delete=kr),Object.freeze(e),n&&Object.entries(e).forEach(([t,o])=>dn(o,!0))),e}function kr(){oe(2)}function Xe(e){return Object.isFrozen(e)}var Ur={};function pe(e){const n=Ur[e];return n||oe(0,e),n}var Ie;function zn(){return Ie}function Rr(e,n){return{drafts_:[],parent_:e,immer_:n,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function vn(e,n){n&&(pe("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=n)}function nn(e){tn(e),e.drafts_.forEach(Gr),e.drafts_=null}function tn(e){e===Ie&&(Ie=e.parent_)}function An(e){return Ie=Rr(Ie,e)}function Gr(e){const n=e[ne];n.type_===0||n.type_===1?n.revoke_():n.revoked_=!0}function xn(e,n){n.unfinalizedDrafts_=n.drafts_.length;const t=n.drafts_[0];return e!==void 0&&e!==t?(t[ne].modified_&&(nn(n),oe(4)),he(e)&&(e=ke(n,e),n.parent_||Ue(n,e)),n.patches_&&pe("Patches").generateReplacementPatches_(t[ne].base_,e,n.patches_,n.inversePatches_)):e=ke(n,t,[]),nn(n),n.patches_&&n.patchListener_(n.patches_,n.inversePatches_),e!==Rn?e:void 0}function ke(e,n,t){if(Xe(n))return n;const o=n[ne];if(!o)return Fe(n,(r,d)=>Cn(e,o,n,r,d,t)),n;if(o.scope_!==e)return n;if(!o.modified_)return Ue(e,o.base_,!0),o.base_;if(!o.finalized_){o.finalized_=!0,o.scope_.unfinalizedDrafts_--;const r=o.copy_;let d=r,c=!1;o.type_===3&&(d=new Set(r),r.clear(),c=!0),Fe(d,(p,w)=>Cn(e,o,r,p,w,t,c)),Ue(e,r,!1),t&&e.patches_&&pe("Patches").generatePatches_(o,t,e.patches_,e.inversePatches_)}return o.copy_}function Cn(e,n,t,o,r,d,c){if(Le(r)){const p=d&&n&&n.type_!==3&&!Qe(n.assigned_,o)?d.concat(o):void 0,w=ke(e,r,p);if(Yn(t,o,w),Le(w))e.canAutoFreeze_=!1;else return}else c&&t.add(r);if(he(r)&&!Xe(r)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;ke(e,r),(!n||!n.scope_.parent_)&&typeof o!="symbol"&&Object.prototype.propertyIsEnumerable.call(t,o)&&Ue(e,r)}}function Ue(e,n,t=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&dn(n,t)}function Yr(e,n){const t=Array.isArray(e),o={type_:t?1:0,scope_:n?n.scope_:zn(),modified_:!1,finalized_:!1,assigned_:{},parent_:n,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let r=o,d=gn;t&&(r=[o],d=Oe);const{revoke:c,proxy:p}=Proxy.revocable(r,d);return o.draft_=p,o.revoke_=c,p}var gn={get(e,n){if(n===ne)return e;const t=ge(e);if(!Qe(t,n))return zr(e,t,n);const o=t[n];return e.finalized_||!he(o)?o:o===We(e.base_,n)?($e(e),e.copy_[n]=on(o,e)):o},has(e,n){return n in ge(e)},ownKeys(e){return Reflect.ownKeys(ge(e))},set(e,n,t){const o=Vn(ge(e),n);if(o!=null&&o.set)return o.set.call(e.draft_,t),!0;if(!e.modified_){const r=We(ge(e),n),d=r==null?void 0:r[ne];if(d&&d.base_===t)return e.copy_[n]=t,e.assigned_[n]=!1,!0;if(Fr(t,r)&&(t!==void 0||Qe(e.base_,n)))return!0;$e(e),rn(e)}return e.copy_[n]===t&&(t!==void 0||n in e.copy_)||Number.isNaN(t)&&Number.isNaN(e.copy_[n])||(e.copy_[n]=t,e.assigned_[n]=!0),!0},deleteProperty(e,n){return We(e.base_,n)!==void 0||n in e.base_?(e.assigned_[n]=!1,$e(e),rn(e)):delete e.assigned_[n],e.copy_&&delete e.copy_[n],!0},getOwnPropertyDescriptor(e,n){const t=ge(e),o=Reflect.getOwnPropertyDescriptor(t,n);return o&&{writable:!0,configurable:e.type_!==1||n!=="length",enumerable:o.enumerable,value:t[n]}},defineProperty(){oe(11)},getPrototypeOf(e){return Te(e.base_)},setPrototypeOf(){oe(12)}},Oe={};Fe(gn,(e,n)=>{Oe[e]=function(){return arguments[0]=arguments[0][0],n.apply(this,arguments)}});Oe.deleteProperty=function(e,n){return Oe.set.call(this,e,n,void 0)};Oe.set=function(e,n,t){return gn.set.call(this,e[0],n,t,e[0])};function We(e,n){const t=e[ne];return(t?ge(t):e)[n]}function zr(e,n,t){var r;const o=Vn(n,t);return o?"value"in o?o.value:(r=o.get)==null?void 0:r.call(e.draft_):void 0}function Vn(e,n){if(!(n in e))return;let t=Te(e);for(;t;){const o=Object.getOwnPropertyDescriptor(t,n);if(o)return o;t=Te(t)}}function rn(e){e.modified_||(e.modified_=!0,e.parent_&&rn(e.parent_))}function $e(e){e.copy_||(e.copy_=en(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Vr=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(n,t,o)=>{if(typeof n=="function"&&typeof t!="function"){const d=t;t=n;const c=this;return function(w=d,...C){return c.produce(w,E=>t.call(this,E,...C))}}typeof t!="function"&&oe(6),o!==void 0&&typeof o!="function"&&oe(7);let r;if(he(n)){const d=An(this),c=on(n,void 0);let p=!0;try{r=t(c),p=!1}finally{p?nn(d):tn(d)}return vn(d,o),xn(r,d)}else if(!n||typeof n!="object"){if(r=t(n),r===void 0&&(r=n),r===Rn&&(r=void 0),this.autoFreeze_&&dn(r,!0),o){const d=[],c=[];pe("Patches").generateReplacementPatches_(n,r,d,c),o(d,c)}return r}else oe(1,n)},this.produceWithPatches=(n,t)=>{if(typeof n=="function")return(c,...p)=>this.produceWithPatches(c,w=>n(w,...p));let o,r;return[this.produce(n,t,(c,p)=>{o=c,r=p}),o,r]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){he(e)||oe(8),Le(e)&&(e=Xr(e));const n=An(this),t=on(e,void 0);return t[ne].isManual_=!0,tn(n),t}finishDraft(e,n){const t=e&&e[ne];(!t||!t.isManual_)&&oe(9);const{scope_:o}=t;return vn(o,n),xn(void 0,o)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,n){let t;for(t=n.length-1;t>=0;t--){const r=n[t];if(r.path.length===0&&r.op==="replace"){e=r.value;break}}t>-1&&(n=n.slice(t+1));const o=pe("Patches").applyPatches_;return Le(e)?o(e,n):this.produce(e,r=>o(r,n))}};function on(e,n){const t=ze(e)?pe("MapSet").proxyMap_(e,n):Ve(e)?pe("MapSet").proxySet_(e,n):Yr(e,n);return(n?n.scope_:zn()).drafts_.push(t),t}function Xr(e){return Le(e)||oe(10,e),Xn(e)}function Xn(e){if(!he(e)||Xe(e))return e;const n=e[ne];let t;if(n){if(!n.modified_)return n.base_;n.finalized_=!0,t=en(e,n.scope_.immer_.useStrictShallowCopy_)}else t=en(e,!0);return Fe(t,(o,r)=>{Yn(t,o,Xn(r))}),n&&(n.finalized_=!1),t}var te=new Vr,Hr=te.produce;te.produceWithPatches.bind(te);te.setAutoFreeze.bind(te);te.setUseStrictShallowCopy.bind(te);te.applyPatches.bind(te);te.createDraft.bind(te);te.finishDraft.bind(te);const Hn="TOGGLE_ZOOM",qn="TOGGLE_PAN",Wn="TOGGLE_POINTS",$n="TOGGLE_LINE",Zn="TOGGLE_LEGEND",Kn="TOGGLE_TABLE",sn="RESET_AXES_RANGES",ln="UPDATE_AXES_RANGES",Jn="TOGGLE_DRAG_POINTS",Qn="TOGGLE_DRAG_ANNOTATION",et="DISABLE_DRAG_OPTIONS",De="UPDATE_EDITED",qr=(e,n)=>Hr(e,t=>{switch(n.type){case Hn:{t.zoomEnabled=!t.zoomEnabled,t.panEnabled&&(t.panEnabled=!1),t.enableDragPoints&&(t.enableDragPoints=!1),t.enableDragAnnotation&&(t.enableDragAnnotation=!1);break}case qn:{t.panEnabled=!t.panEnabled,t.zoomEnabled&&(t.zoomEnabled=!1),t.enableDragPoints&&(t.enableDragPoints=!1),t.enableDragAnnotation&&(t.enableDragAnnotation=!1);break}case Wn:{t.pointsEnabled=!t.pointsEnabled;break}case $n:{t.lineEnabled=!t.lineEnabled;break}case Zn:{t.legendEnabled=!t.legendEnabled;break}case Kn:{t.showTable=!t.showTable;break}case ln:{const{axes:o}=n.payload;t.axes=o;break}case sn:{const{axes:o}=n.payload;t.axes=o;break}case Jn:{t.enableDragPoints=!t.enableDragPoints,t.panEnabled&&(t.panEnabled=!1),t.zoomEnabled&&(t.zoomEnabled=!1),t.enableDragAnnotation&&(t.enableDragAnnotation=!1);break}case Qn:{t.enableDragAnnotation=!t.enableDragAnnotation,t.panEnabled&&(t.panEnabled=!1),t.zoomEnabled&&(t.zoomEnabled=!1);break}case et:{(t.enableDragAnnotation||t.enableDragPoints||t.panEnabled||t.zoomEnabled)&&(t.enableDragAnnotation=!1,t.enableDragPoints=!1,t.panEnabled=!1,t.zoomEnabled=!1);break}case De:{t.edited=n.payload;break}}}),Wr=e=>{if(!e)return null;const n=`line-chart-state-${e}`,t=localStorage.getItem(n);return t?JSON.parse(t).state:null},$r=(e=72)=>{const n=new Date().getTime(),t=e*60*60*1e3;for(let o=0;o<localStorage.length;o++){const r=localStorage.key(o);if(r!=null&&r.includes("line-chart-state-")){const d=localStorage.getItem(r);if(d){const p=JSON.parse(d).timestamp;p&&n-p>t&&localStorage.removeItem(r)}}}},Zr=(e,n)=>{if(!n)return;const t=new Date().getTime(),o=`line-chart-state-${n}`,r={state:e,timestamp:t};localStorage.setItem(o,JSON.stringify(r)),$r()},Kr=({options:e,persistenceId:n})=>{const{chartOptions:{enableZoom:t,enablePan:o,showPoints:r,showLine:d,enableDragAnnotation:c},legend:{display:p},dragData:w}=e,{zoomEnabled:C,panEnabled:E,pointsEnabled:P,lineEnabled:M,legendEnabled:N,enableDragPoints:v,enableDragAnnotation:x}=Wr(n)||{};return{zoomEnabled:c??x?!1:C??t,panEnabled:E??o,pointsEnabled:P??r,lineEnabled:M??d,legendEnabled:N??p,axes:[],showTable:!1,enableDragPoints:(w==null?void 0:w.enableDragData)&&v,enableDragAnnotation:c??x,edited:!1}},Jr=e=>G.createElement("svg",{fill:"currentColor",height:"1em",viewBox:"0 0 12 12",width:"1em",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...e},G.createElement("clipPath",{id:"a"},G.createElement("path",{d:"m0 0h12v12h-12z"})),G.createElement("g",{clipPath:"url(#a)"},G.createElement("path",{d:"m.5 6.5v-1h11v1c-4.16104 0-6.63549 0-11 0z"}))),Qr=e=>G.createElement("svg",{fill:"currentColor",height:"1em",viewBox:"0 0 12 12",width:"1em",xmlns:"http://www.w3.org/2000/svg",...e},G.createElement("circle",{cx:6,cy:6,r:2})),eo=e=>G.createElement("svg",{fill:"currentColor",height:"1em",viewBox:"0 0 12 12",width:"1em",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...e},G.createElement("clipPath",{id:"a"},G.createElement("path",{d:"m0 0h12v12h-12z"})),G.createElement("g",{clipPath:"url(#a)"},G.createElement("path",{d:"m7.937 6.5c-.11122.42912-.36179.80916-.71237 1.08047-.35058.2713-.78133.4185-1.22463.4185s-.87405-.1472-1.22463-.4185c-.35058-.27131-.60115-.65135-.71237-1.08047h-3.563v-1h3.563c.11122-.42912.36179-.80916.71237-1.08046s.78133-.41851 1.22463-.41851.87405.14721 1.22463.41851.60115.65134.71237 1.08046h3.563v1z"})));function no({lineEnabled:e,onToggleLine:n,onTogglePoints:t,pointsEnabled:o,translations:r}){return[{type:"Option",label:r.pointsLines,icon:F.jsx(He,{icon:F.jsx(eo,{})}),selected:o&&e,onClick:()=>{o||t(),e||n()}},{type:"Option",label:r.linesOnly,icon:F.jsx(He,{icon:F.jsx(Jr,{})}),selected:!o&&e,onClick:()=>{o&&t(),e||n()}},{type:"Option",label:r.pointsOnly,icon:F.jsx(He,{icon:F.jsx(Qr,{})}),selected:o&&!e,onClick:()=>{o||t(),e&&n()}}]}const nt=({options:e})=>{const[n,t]=G.useState(!1),o=e.find(r=>r.selected);return F.jsx(cn,{open:n,setOpen:t,menu:{sections:e,trigger:"Component",component:F.jsx(je,{display:"inline-flex",text:o==null?void 0:o.label,placement:"bottom-start",enabled:!n,children:F.jsx(ce,{colored:"muted",basic:!0,small:!0,round:!0,icon:o==null?void 0:o.icon})})}})};nt.__docgenInfo={description:"",methods:[],displayName:"LineOptions",props:{options:{required:!0,tsType:{name:"Array",elements:[{name:"IMenuSection"}],raw:"IMenuSection[]"},description:""}}};function to({onTogglePan:e,onToggleZoom:n,panEnabled:t,zoomEnabled:o,enableDragPoints:r,enableDragAnnotation:d,isDragDataAllowed:c,isDragAnnotationAllowed:p,onToggleDragAnnotation:w,onToggleDragPoints:C,onDisableDragOptions:E,translations:{dragToZoom:P,doubleClickToReset:M,dragToPan:N,dragToMovePoints:v,dragDisabled:x,dragToMoveAnnotation:h}}){return[{label:P,description:M,icon:F.jsx(Ht,{}),selected:o,type:"Option",onClick:()=>{o||n()}},{label:N,description:M,icon:F.jsx(qt,{}),selected:t,type:"Option",onClick:()=>{t||e()}},...c?[{label:v,icon:F.jsx(_n,{}),selected:r,type:"Option",onClick:()=>{r||C()}}]:[],...p?[{label:h,icon:F.jsx(_n,{}),selected:d,type:"Option",onClick:()=>{d||w()}}]:[],{label:x,icon:F.jsx(Wt,{}),selected:!o&&!t&&!r&&!d,type:"Option",onClick:E}]}const tt=({options:e})=>{const n=e.find(t=>t.selected);return F.jsx(cn,{menu:{sections:e,trigger:"Component",component:F.jsx(ce,{colored:"muted",basic:!0,small:!0,label:n==null?void 0:n.label,icon:n==null?void 0:n.icon})}})};tt.__docgenInfo={description:"@param {import('./drag-options-interfaces').IDragOptions} obj",methods:[],displayName:"DragOptions",props:{options:{required:!0,tsType:{name:"Array",elements:[{name:"IMenuSection"}],raw:"IMenuSection[]"},description:""}}};const ro="_controls_1edjs_1",oo="_buttons_1edjs_6",Sn={controls:ro,buttons:oo},so=e=>{const n=G.useCallback(t=>()=>{e({type:t})},[e]);return{onToggleLegend:n(Zn),onToggleLine:n($n),onTogglePan:n(qn),onTogglePoints:n(Wn),onToggleTable:n(Kn),onToggleZoom:n(Hn),onToggleDragPoints:n(Jn),onToggleDragAnnotation:n(Qn),onDisableDragOptions:n(et)}};function Me(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Ze={exports:{}},Pn;function io(){return Pn||(Pn=1,function(e,n){(function(t){e.exports=t()})(function(){return function t(o,r,d){function c(C,E){if(!r[C]){if(!o[C]){var P=typeof Me=="function"&&Me;if(!E&&P)return P(C,!0);if(p)return p(C,!0);throw new Error("Cannot find module '"+C+"'")}E=r[C]={exports:{}},o[C][0].call(E.exports,function(M){var N=o[C][1][M];return c(N||M)},E,E.exports,t,o,r,d)}return r[C].exports}for(var p=typeof Me=="function"&&Me,w=0;w<d.length;w++)c(d[w]);return c}({1:[function(t,o,r){(function(d,c,p,w,C,E,P,M,N){var v=t("crypto");function x(f,g){g=b(f,g);var l;return(l=g.algorithm!=="passthrough"?v.createHash(g.algorithm):new S).write===void 0&&(l.write=l.update,l.end=l.update),y(g,l).dispatch(f),l.update||l.end(""),l.digest?l.digest(g.encoding==="buffer"?void 0:g.encoding):(f=l.read(),g.encoding!=="buffer"?f.toString(g.encoding):f)}(r=o.exports=x).sha1=function(f){return x(f)},r.keys=function(f){return x(f,{excludeValues:!0,algorithm:"sha1",encoding:"hex"})},r.MD5=function(f){return x(f,{algorithm:"md5",encoding:"hex"})},r.keysMD5=function(f){return x(f,{algorithm:"md5",encoding:"hex",excludeValues:!0})};var h=v.getHashes?v.getHashes().slice():["sha1","md5"],A=(h.push("passthrough"),["buffer","hex","binary","base64"]);function b(f,g){var l={};if(l.algorithm=(g=g||{}).algorithm||"sha1",l.encoding=g.encoding||"hex",l.excludeValues=!!g.excludeValues,l.algorithm=l.algorithm.toLowerCase(),l.encoding=l.encoding.toLowerCase(),l.ignoreUnknown=g.ignoreUnknown===!0,l.respectType=g.respectType!==!1,l.respectFunctionNames=g.respectFunctionNames!==!1,l.respectFunctionProperties=g.respectFunctionProperties!==!1,l.unorderedArrays=g.unorderedArrays===!0,l.unorderedSets=g.unorderedSets!==!1,l.unorderedObjects=g.unorderedObjects!==!1,l.replacer=g.replacer||void 0,l.excludeKeys=g.excludeKeys||void 0,f===void 0)throw new Error("Object argument required.");for(var u=0;u<h.length;++u)h[u].toLowerCase()===l.algorithm.toLowerCase()&&(l.algorithm=h[u]);if(h.indexOf(l.algorithm)===-1)throw new Error('Algorithm "'+l.algorithm+'" not supported. supported values: '+h.join(", "));if(A.indexOf(l.encoding)===-1&&l.algorithm!=="passthrough")throw new Error('Encoding "'+l.encoding+'" not supported. supported values: '+A.join(", "));return l}function L(f){if(typeof f=="function")return/^function\s+\w*\s*\(\s*\)\s*{\s+\[native code\]\s+}$/i.exec(Function.prototype.toString.call(f))!=null}function y(f,g,l){l=l||[];function u(i){return g.update?g.update(i,"utf8"):g.write(i,"utf8")}return{dispatch:function(i){return this["_"+((i=f.replacer?f.replacer(i):i)===null?"null":typeof i)](i)},_object:function(i){var _,T=Object.prototype.toString.call(i),U=/\[object (.*)\]/i.exec(T);if(U=(U=U?U[1]:"unknown:["+T+"]").toLowerCase(),0<=(T=l.indexOf(i)))return this.dispatch("[CIRCULAR:"+T+"]");if(l.push(i),p!==void 0&&p.isBuffer&&p.isBuffer(i))return u("buffer:"),u(i);if(U==="object"||U==="function"||U==="asyncfunction")return T=Object.keys(i),f.unorderedObjects&&(T=T.sort()),f.respectType===!1||L(i)||T.splice(0,0,"prototype","__proto__","constructor"),f.excludeKeys&&(T=T.filter(function(k){return!f.excludeKeys(k)})),u("object:"+T.length+":"),_=this,T.forEach(function(k){_.dispatch(k),u(":"),f.excludeValues||_.dispatch(i[k]),u(",")});if(!this["_"+U]){if(f.ignoreUnknown)return u("["+U+"]");throw new Error('Unknown object type "'+U+'"')}this["_"+U](i)},_array:function(i,k){k=k!==void 0?k:f.unorderedArrays!==!1;var T=this;if(u("array:"+i.length+":"),!k||i.length<=1)return i.forEach(function(R){return T.dispatch(R)});var U=[],k=i.map(function(R){var D=new S,z=l.slice();return y(f,D,z).dispatch(R),U=U.concat(z.slice(l.length)),D.read().toString()});return l=l.concat(U),k.sort(),this._array(k,!1)},_date:function(i){return u("date:"+i.toJSON())},_symbol:function(i){return u("symbol:"+i.toString())},_error:function(i){return u("error:"+i.toString())},_boolean:function(i){return u("bool:"+i.toString())},_string:function(i){u("string:"+i.length+":"),u(i.toString())},_function:function(i){u("fn:"),L(i)?this.dispatch("[native]"):this.dispatch(i.toString()),f.respectFunctionNames!==!1&&this.dispatch("function-name:"+String(i.name)),f.respectFunctionProperties&&this._object(i)},_number:function(i){return u("number:"+i.toString())},_xml:function(i){return u("xml:"+i.toString())},_null:function(){return u("Null")},_undefined:function(){return u("Undefined")},_regexp:function(i){return u("regex:"+i.toString())},_uint8array:function(i){return u("uint8array:"),this.dispatch(Array.prototype.slice.call(i))},_uint8clampedarray:function(i){return u("uint8clampedarray:"),this.dispatch(Array.prototype.slice.call(i))},_int8array:function(i){return u("int8array:"),this.dispatch(Array.prototype.slice.call(i))},_uint16array:function(i){return u("uint16array:"),this.dispatch(Array.prototype.slice.call(i))},_int16array:function(i){return u("int16array:"),this.dispatch(Array.prototype.slice.call(i))},_uint32array:function(i){return u("uint32array:"),this.dispatch(Array.prototype.slice.call(i))},_int32array:function(i){return u("int32array:"),this.dispatch(Array.prototype.slice.call(i))},_float32array:function(i){return u("float32array:"),this.dispatch(Array.prototype.slice.call(i))},_float64array:function(i){return u("float64array:"),this.dispatch(Array.prototype.slice.call(i))},_arraybuffer:function(i){return u("arraybuffer:"),this.dispatch(new Uint8Array(i))},_url:function(i){return u("url:"+i.toString())},_map:function(i){return u("map:"),i=Array.from(i),this._array(i,f.unorderedSets!==!1)},_set:function(i){return u("set:"),i=Array.from(i),this._array(i,f.unorderedSets!==!1)},_file:function(i){return u("file:"),this.dispatch([i.name,i.size,i.type,i.lastModfied])},_blob:function(){if(f.ignoreUnknown)return u("[blob]");throw Error(`Hashing Blob objects is currently not supported
1
+ import{j as F}from"./jsx-runtime-W3oueGCa.js";import{r as G,g as ct}from"./index-YTOF1_EJ.js";import{$ as dt,a0 as bn,a1 as we,B as fe,a2 as gt,v as Y,A as ie,P as Ce,C as _e,a3 as an,a4 as ht,g as Ke,y as pt,S as mt,E as bt,F as yt,a5 as Se,a6 as Pe,H as Ee,a7 as Ne,G as Je,I as wt,T as _t,L as yn,a as Et,J as Be,K as Tt,M as be,d as Lt,r as vt,N as wn,a8 as At,f as xt,a9 as Ct,U as St,aa as le,ab as fn,ac as xe,D as Pt,ad as ye,b as It,s as Ot,Q as Nt,ae as Mt,h as Dt,i as Bt,V as jt,W as Ft,j as kt,k as Ut,p as Rt,m as Gt,n as Yt,o as zt,q as Vt,t as Xt}from"./legend-context-BxOj5cqZ.js";import{r as He,M as cn,k as je,B as ce,s as Ht,v as qt,w as _n,x as Wt,y as $t,z as Zt,A as Kt,E as Jt,N as En,G as Qt,S as er,g as nr,e as tr,F as rr,T as Un,J as or,K as sr,D as ir,O as lr,Q as ur,o as ar,q as fr,U as cr,j as dr,u as gr,Z as hr,t as pr,R as mr,l as br,H as yr,L as wr,m as _r,n as Er}from"./legend-K8zU8UeK.js";import{c as Tr,C as Lr,f as Tn,a as vr,b as Ar}from"./get-draggableData-DCiYthb6.js";import{e as xr}from"./index-CgYGpm1H.js";const Cr=(e,n,t)=>{const[o,r]=e.major,[d,c]=e.minor,p=(o.x+r.x+d.x+c.x)/4,w=(o.y+r.y+d.y+c.y)/4,C=r.x-o.x,E=r.y-o.y,P=Math.atan2(t.getPixelForValue(w+E/2)-t.getPixelForValue(w-E/2),n.getPixelForValue(p+C/2)-n.getPixelForValue(p-C/2)),M=Math.hypot(n.getPixelForValue(o.x)-n.getPixelForValue(r.x),t.getPixelForValue(o.y)-t.getPixelForValue(r.y))/2,N=Math.hypot(n.getPixelForValue(d.x)-n.getPixelForValue(c.x),t.getPixelForValue(d.y)-t.getPixelForValue(c.y))/2,v=n.getPixelForValue(p),x=t.getPixelForValue(w);return{cx:v,cy:x,radiusX:M,radiusY:N,angle:P}},Sr=e=>e.data.datasets.some(n=>n.data.some(t=>!!t.ellipsePoints)),Pr={id:"ellipsisAnnotationPlugin",afterDatasetsDraw(e){var d,c,p,w,C,E,P,M,N;if(!Sr(e))return;const n=e==null?void 0:e.ctx,t=(d=e==null?void 0:e.scales)==null?void 0:d.x,o=(c=e==null?void 0:e.scales)==null?void 0:c.y,r=e==null?void 0:e.chartArea;!t||!o||!r||((p=n==null?void 0:n.save)==null||p.call(n),(w=n==null?void 0:n.beginPath)==null||w.call(n),(C=n==null?void 0:n.rect)==null||C.call(n,r.left,r.top,r.right-r.left,r.bottom-r.top),(E=n==null?void 0:n.clip)==null||E.call(n),(M=(P=e==null?void 0:e.data)==null?void 0:P.datasets)==null||M.forEach(v=>{var h;const x=v;(h=x==null?void 0:x.data)==null||h.forEach(A=>{var l,u,i,_,T;const{ellipsePoints:b}=A??{};if(!b)return;const{cx:L,cy:y,radiusX:S,radiusY:f,angle:g}=Cr(b,t,o);(l=n==null?void 0:n.save)==null||l.call(n),(u=n==null?void 0:n.beginPath)==null||u.call(n),(i=n==null?void 0:n.ellipse)==null||i.call(n,L,y,S,f,g,0,2*Math.PI),n.strokeStyle=x.borderColor||dt,n.lineWidth=x.borderWidth||1,(_=n==null?void 0:n.stroke)==null||_.call(n),(T=n==null?void 0:n.restore)==null||T.call(n)})}),(N=n==null?void 0:n.restore)==null||N.call(n))}},Ir="_chart_e3qdd_1",Or="_canvas_e3qdd_11",Nr="_fixedHeight_e3qdd_20",Mr="_stretchHeight_e3qdd_26",Dr="_squareAspectRatio_e3qdd_32",Br="_table_e3qdd_62",qe={chart:Ir,canvas:Or,fixedHeight:Nr,stretchHeight:Mr,squareAspectRatio:Dr,table:Br};var Rn=Symbol.for("immer-nothing"),Ln=Symbol.for("immer-draftable"),ne=Symbol.for("immer-state");function oe(e,...n){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Te=Object.getPrototypeOf;function Le(e){return!!e&&!!e[ne]}function he(e){var n;return e?Gn(e)||Array.isArray(e)||!!e[Ln]||!!((n=e.constructor)!=null&&n[Ln])||ze(e)||Ve(e):!1}var jr=Object.prototype.constructor.toString();function Gn(e){if(!e||typeof e!="object")return!1;const n=Te(e);if(n===null)return!0;const t=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return t===Object?!0:typeof t=="function"&&Function.toString.call(t)===jr}function Fe(e,n){Ye(e)===0?Reflect.ownKeys(e).forEach(t=>{n(t,e[t],e)}):e.forEach((t,o)=>n(o,t,e))}function Ye(e){const n=e[ne];return n?n.type_:Array.isArray(e)?1:ze(e)?2:Ve(e)?3:0}function Qe(e,n){return Ye(e)===2?e.has(n):Object.prototype.hasOwnProperty.call(e,n)}function Yn(e,n,t){const o=Ye(e);o===2?e.set(n,t):o===3?e.add(t):e[n]=t}function Fr(e,n){return e===n?e!==0||1/e===1/n:e!==e&&n!==n}function ze(e){return e instanceof Map}function Ve(e){return e instanceof Set}function ge(e){return e.copy_||e.base_}function en(e,n){if(ze(e))return new Map(e);if(Ve(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const t=Gn(e);if(n===!0||n==="class_only"&&!t){const o=Object.getOwnPropertyDescriptors(e);delete o[ne];let r=Reflect.ownKeys(o);for(let d=0;d<r.length;d++){const c=r[d],p=o[c];p.writable===!1&&(p.writable=!0,p.configurable=!0),(p.get||p.set)&&(o[c]={configurable:!0,writable:!0,enumerable:p.enumerable,value:e[c]})}return Object.create(Te(e),o)}else{const o=Te(e);if(o!==null&&t)return{...e};const r=Object.create(o);return Object.assign(r,e)}}function dn(e,n=!1){return Xe(e)||Le(e)||!he(e)||(Ye(e)>1&&(e.set=e.add=e.clear=e.delete=kr),Object.freeze(e),n&&Object.entries(e).forEach(([t,o])=>dn(o,!0))),e}function kr(){oe(2)}function Xe(e){return Object.isFrozen(e)}var Ur={};function pe(e){const n=Ur[e];return n||oe(0,e),n}var Ie;function zn(){return Ie}function Rr(e,n){return{drafts_:[],parent_:e,immer_:n,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function vn(e,n){n&&(pe("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=n)}function nn(e){tn(e),e.drafts_.forEach(Gr),e.drafts_=null}function tn(e){e===Ie&&(Ie=e.parent_)}function An(e){return Ie=Rr(Ie,e)}function Gr(e){const n=e[ne];n.type_===0||n.type_===1?n.revoke_():n.revoked_=!0}function xn(e,n){n.unfinalizedDrafts_=n.drafts_.length;const t=n.drafts_[0];return e!==void 0&&e!==t?(t[ne].modified_&&(nn(n),oe(4)),he(e)&&(e=ke(n,e),n.parent_||Ue(n,e)),n.patches_&&pe("Patches").generateReplacementPatches_(t[ne].base_,e,n.patches_,n.inversePatches_)):e=ke(n,t,[]),nn(n),n.patches_&&n.patchListener_(n.patches_,n.inversePatches_),e!==Rn?e:void 0}function ke(e,n,t){if(Xe(n))return n;const o=n[ne];if(!o)return Fe(n,(r,d)=>Cn(e,o,n,r,d,t)),n;if(o.scope_!==e)return n;if(!o.modified_)return Ue(e,o.base_,!0),o.base_;if(!o.finalized_){o.finalized_=!0,o.scope_.unfinalizedDrafts_--;const r=o.copy_;let d=r,c=!1;o.type_===3&&(d=new Set(r),r.clear(),c=!0),Fe(d,(p,w)=>Cn(e,o,r,p,w,t,c)),Ue(e,r,!1),t&&e.patches_&&pe("Patches").generatePatches_(o,t,e.patches_,e.inversePatches_)}return o.copy_}function Cn(e,n,t,o,r,d,c){if(Le(r)){const p=d&&n&&n.type_!==3&&!Qe(n.assigned_,o)?d.concat(o):void 0,w=ke(e,r,p);if(Yn(t,o,w),Le(w))e.canAutoFreeze_=!1;else return}else c&&t.add(r);if(he(r)&&!Xe(r)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;ke(e,r),(!n||!n.scope_.parent_)&&typeof o!="symbol"&&Object.prototype.propertyIsEnumerable.call(t,o)&&Ue(e,r)}}function Ue(e,n,t=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&dn(n,t)}function Yr(e,n){const t=Array.isArray(e),o={type_:t?1:0,scope_:n?n.scope_:zn(),modified_:!1,finalized_:!1,assigned_:{},parent_:n,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let r=o,d=gn;t&&(r=[o],d=Oe);const{revoke:c,proxy:p}=Proxy.revocable(r,d);return o.draft_=p,o.revoke_=c,p}var gn={get(e,n){if(n===ne)return e;const t=ge(e);if(!Qe(t,n))return zr(e,t,n);const o=t[n];return e.finalized_||!he(o)?o:o===We(e.base_,n)?($e(e),e.copy_[n]=on(o,e)):o},has(e,n){return n in ge(e)},ownKeys(e){return Reflect.ownKeys(ge(e))},set(e,n,t){const o=Vn(ge(e),n);if(o!=null&&o.set)return o.set.call(e.draft_,t),!0;if(!e.modified_){const r=We(ge(e),n),d=r==null?void 0:r[ne];if(d&&d.base_===t)return e.copy_[n]=t,e.assigned_[n]=!1,!0;if(Fr(t,r)&&(t!==void 0||Qe(e.base_,n)))return!0;$e(e),rn(e)}return e.copy_[n]===t&&(t!==void 0||n in e.copy_)||Number.isNaN(t)&&Number.isNaN(e.copy_[n])||(e.copy_[n]=t,e.assigned_[n]=!0),!0},deleteProperty(e,n){return We(e.base_,n)!==void 0||n in e.base_?(e.assigned_[n]=!1,$e(e),rn(e)):delete e.assigned_[n],e.copy_&&delete e.copy_[n],!0},getOwnPropertyDescriptor(e,n){const t=ge(e),o=Reflect.getOwnPropertyDescriptor(t,n);return o&&{writable:!0,configurable:e.type_!==1||n!=="length",enumerable:o.enumerable,value:t[n]}},defineProperty(){oe(11)},getPrototypeOf(e){return Te(e.base_)},setPrototypeOf(){oe(12)}},Oe={};Fe(gn,(e,n)=>{Oe[e]=function(){return arguments[0]=arguments[0][0],n.apply(this,arguments)}});Oe.deleteProperty=function(e,n){return Oe.set.call(this,e,n,void 0)};Oe.set=function(e,n,t){return gn.set.call(this,e[0],n,t,e[0])};function We(e,n){const t=e[ne];return(t?ge(t):e)[n]}function zr(e,n,t){var r;const o=Vn(n,t);return o?"value"in o?o.value:(r=o.get)==null?void 0:r.call(e.draft_):void 0}function Vn(e,n){if(!(n in e))return;let t=Te(e);for(;t;){const o=Object.getOwnPropertyDescriptor(t,n);if(o)return o;t=Te(t)}}function rn(e){e.modified_||(e.modified_=!0,e.parent_&&rn(e.parent_))}function $e(e){e.copy_||(e.copy_=en(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Vr=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(n,t,o)=>{if(typeof n=="function"&&typeof t!="function"){const d=t;t=n;const c=this;return function(w=d,...C){return c.produce(w,E=>t.call(this,E,...C))}}typeof t!="function"&&oe(6),o!==void 0&&typeof o!="function"&&oe(7);let r;if(he(n)){const d=An(this),c=on(n,void 0);let p=!0;try{r=t(c),p=!1}finally{p?nn(d):tn(d)}return vn(d,o),xn(r,d)}else if(!n||typeof n!="object"){if(r=t(n),r===void 0&&(r=n),r===Rn&&(r=void 0),this.autoFreeze_&&dn(r,!0),o){const d=[],c=[];pe("Patches").generateReplacementPatches_(n,r,d,c),o(d,c)}return r}else oe(1,n)},this.produceWithPatches=(n,t)=>{if(typeof n=="function")return(c,...p)=>this.produceWithPatches(c,w=>n(w,...p));let o,r;return[this.produce(n,t,(c,p)=>{o=c,r=p}),o,r]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){he(e)||oe(8),Le(e)&&(e=Xr(e));const n=An(this),t=on(e,void 0);return t[ne].isManual_=!0,tn(n),t}finishDraft(e,n){const t=e&&e[ne];(!t||!t.isManual_)&&oe(9);const{scope_:o}=t;return vn(o,n),xn(void 0,o)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,n){let t;for(t=n.length-1;t>=0;t--){const r=n[t];if(r.path.length===0&&r.op==="replace"){e=r.value;break}}t>-1&&(n=n.slice(t+1));const o=pe("Patches").applyPatches_;return Le(e)?o(e,n):this.produce(e,r=>o(r,n))}};function on(e,n){const t=ze(e)?pe("MapSet").proxyMap_(e,n):Ve(e)?pe("MapSet").proxySet_(e,n):Yr(e,n);return(n?n.scope_:zn()).drafts_.push(t),t}function Xr(e){return Le(e)||oe(10,e),Xn(e)}function Xn(e){if(!he(e)||Xe(e))return e;const n=e[ne];let t;if(n){if(!n.modified_)return n.base_;n.finalized_=!0,t=en(e,n.scope_.immer_.useStrictShallowCopy_)}else t=en(e,!0);return Fe(t,(o,r)=>{Yn(t,o,Xn(r))}),n&&(n.finalized_=!1),t}var te=new Vr,Hr=te.produce;te.produceWithPatches.bind(te);te.setAutoFreeze.bind(te);te.setUseStrictShallowCopy.bind(te);te.applyPatches.bind(te);te.createDraft.bind(te);te.finishDraft.bind(te);const Hn="TOGGLE_ZOOM",qn="TOGGLE_PAN",Wn="TOGGLE_POINTS",$n="TOGGLE_LINE",Zn="TOGGLE_LEGEND",Kn="TOGGLE_TABLE",sn="RESET_AXES_RANGES",ln="UPDATE_AXES_RANGES",Jn="TOGGLE_DRAG_POINTS",Qn="TOGGLE_DRAG_ANNOTATION",et="DISABLE_DRAG_OPTIONS",De="UPDATE_EDITED",qr=(e,n)=>Hr(e,t=>{switch(n.type){case Hn:{t.zoomEnabled=!t.zoomEnabled,t.panEnabled&&(t.panEnabled=!1),t.enableDragPoints&&(t.enableDragPoints=!1),t.enableDragAnnotation&&(t.enableDragAnnotation=!1);break}case qn:{t.panEnabled=!t.panEnabled,t.zoomEnabled&&(t.zoomEnabled=!1),t.enableDragPoints&&(t.enableDragPoints=!1),t.enableDragAnnotation&&(t.enableDragAnnotation=!1);break}case Wn:{t.pointsEnabled=!t.pointsEnabled;break}case $n:{t.lineEnabled=!t.lineEnabled;break}case Zn:{t.legendEnabled=!t.legendEnabled;break}case Kn:{t.showTable=!t.showTable;break}case ln:{const{axes:o}=n.payload;t.axes=o;break}case sn:{const{axes:o}=n.payload;t.axes=o;break}case Jn:{t.enableDragPoints=!t.enableDragPoints,t.panEnabled&&(t.panEnabled=!1),t.zoomEnabled&&(t.zoomEnabled=!1),t.enableDragAnnotation&&(t.enableDragAnnotation=!1);break}case Qn:{t.enableDragAnnotation=!t.enableDragAnnotation,t.panEnabled&&(t.panEnabled=!1),t.zoomEnabled&&(t.zoomEnabled=!1);break}case et:{(t.enableDragAnnotation||t.enableDragPoints||t.panEnabled||t.zoomEnabled)&&(t.enableDragAnnotation=!1,t.enableDragPoints=!1,t.panEnabled=!1,t.zoomEnabled=!1);break}case De:{t.edited=n.payload;break}}}),Wr=e=>{if(!e)return null;const n=`line-chart-state-${e}`,t=localStorage.getItem(n);return t?JSON.parse(t).state:null},$r=(e=72)=>{const n=new Date().getTime(),t=e*60*60*1e3;for(let o=0;o<localStorage.length;o++){const r=localStorage.key(o);if(r!=null&&r.includes("line-chart-state-")){const d=localStorage.getItem(r);if(d){const p=JSON.parse(d).timestamp;p&&n-p>t&&localStorage.removeItem(r)}}}},Zr=(e,n)=>{if(!n)return;const t=new Date().getTime(),o=`line-chart-state-${n}`,r={state:e,timestamp:t};localStorage.setItem(o,JSON.stringify(r)),$r()},Kr=({options:e,persistenceId:n})=>{const{chartOptions:{enableZoom:t,enablePan:o,showPoints:r,showLine:d,enableDragAnnotation:c},legend:{display:p},dragData:w}=e,{zoomEnabled:C,panEnabled:E,pointsEnabled:P,lineEnabled:M,legendEnabled:N,enableDragPoints:v,enableDragAnnotation:x}=Wr(n)||{};return{zoomEnabled:c??x?!1:C??t,panEnabled:E??o,pointsEnabled:P??r,lineEnabled:M??d,legendEnabled:N??p,axes:[],showTable:!1,enableDragPoints:(w==null?void 0:w.enableDragData)&&v,enableDragAnnotation:c??x,edited:!1}},Jr=e=>G.createElement("svg",{fill:"currentColor",height:"1em",viewBox:"0 0 12 12",width:"1em",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...e},G.createElement("clipPath",{id:"a"},G.createElement("path",{d:"m0 0h12v12h-12z"})),G.createElement("g",{clipPath:"url(#a)"},G.createElement("path",{d:"m.5 6.5v-1h11v1c-4.16104 0-6.63549 0-11 0z"}))),Qr=e=>G.createElement("svg",{fill:"currentColor",height:"1em",viewBox:"0 0 12 12",width:"1em",xmlns:"http://www.w3.org/2000/svg",...e},G.createElement("circle",{cx:6,cy:6,r:2})),eo=e=>G.createElement("svg",{fill:"currentColor",height:"1em",viewBox:"0 0 12 12",width:"1em",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",...e},G.createElement("clipPath",{id:"a"},G.createElement("path",{d:"m0 0h12v12h-12z"})),G.createElement("g",{clipPath:"url(#a)"},G.createElement("path",{d:"m7.937 6.5c-.11122.42912-.36179.80916-.71237 1.08047-.35058.2713-.78133.4185-1.22463.4185s-.87405-.1472-1.22463-.4185c-.35058-.27131-.60115-.65135-.71237-1.08047h-3.563v-1h3.563c.11122-.42912.36179-.80916.71237-1.08046s.78133-.41851 1.22463-.41851.87405.14721 1.22463.41851.60115.65134.71237 1.08046h3.563v1z"})));function no({lineEnabled:e,onToggleLine:n,onTogglePoints:t,pointsEnabled:o,translations:r}){return[{type:"Option",label:r.pointsLines,icon:F.jsx(He,{icon:F.jsx(eo,{})}),selected:o&&e,onClick:()=>{o||t(),e||n()}},{type:"Option",label:r.linesOnly,icon:F.jsx(He,{icon:F.jsx(Jr,{})}),selected:!o&&e,onClick:()=>{o&&t(),e||n()}},{type:"Option",label:r.pointsOnly,icon:F.jsx(He,{icon:F.jsx(Qr,{})}),selected:o&&!e,onClick:()=>{o||t(),e&&n()}}]}const nt=({options:e})=>{const[n,t]=G.useState(!1),o=e.find(r=>r.selected);return F.jsx(cn,{open:n,setOpen:t,menu:{sections:e,trigger:"Component",component:F.jsx(je,{display:"inline-flex",text:o==null?void 0:o.label,placement:"bottom-start",enabled:!n,children:F.jsx(ce,{colored:"muted",basic:!0,small:!0,round:!0,icon:o==null?void 0:o.icon})})}})};nt.__docgenInfo={description:"",methods:[],displayName:"LineOptions",props:{options:{required:!0,tsType:{name:"Array",elements:[{name:"IMenuSection"}],raw:"IMenuSection[]"},description:""}}};function to({onTogglePan:e,onToggleZoom:n,panEnabled:t,zoomEnabled:o,enableDragPoints:r,enableDragAnnotation:d,isDragDataAllowed:c,isDragAnnotationAllowed:p,onToggleDragAnnotation:w,onToggleDragPoints:C,onDisableDragOptions:E,translations:{dragToZoom:P,doubleClickToReset:M,dragToPan:N,dragToMovePoints:v,dragDisabled:x,dragToMoveAnnotation:h}}){return[{label:P,description:M,icon:F.jsx(Ht,{}),selected:o,type:"Option",onClick:()=>{o||n()}},{label:N,description:M,icon:F.jsx(qt,{}),selected:t,type:"Option",onClick:()=>{t||e()}},...c?[{label:v,icon:F.jsx(_n,{}),selected:r,type:"Option",onClick:()=>{r||C()}}]:[],...p?[{label:h,icon:F.jsx(_n,{}),selected:d,type:"Option",onClick:()=>{d||w()}}]:[],{label:x,icon:F.jsx(Wt,{}),selected:!o&&!t&&!r&&!d,type:"Option",onClick:E}]}const tt=({options:e})=>{const n=e.find(t=>t.selected);return F.jsx(cn,{menu:{sections:e,trigger:"Component",component:F.jsx(ce,{colored:"muted",basic:!0,small:!0,label:n==null?void 0:n.label,icon:n==null?void 0:n.icon})}})};tt.__docgenInfo={description:"@param {import('./drag-options-interfaces').IDragOptions} obj",methods:[],displayName:"DragOptions",props:{options:{required:!0,tsType:{name:"Array",elements:[{name:"IMenuSection"}],raw:"IMenuSection[]"},description:""}}};const ro="_controls_1edjs_1",oo="_buttons_1edjs_6",Sn={controls:ro,buttons:oo},so=e=>{const n=G.useCallback(t=>()=>{e({type:t})},[e]);return{onToggleLegend:n(Zn),onToggleLine:n($n),onTogglePan:n(qn),onTogglePoints:n(Wn),onToggleTable:n(Kn),onToggleZoom:n(Hn),onToggleDragPoints:n(Jn),onToggleDragAnnotation:n(Qn),onDisableDragOptions:n(et)}};function Me(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Ze={exports:{}},Pn;function io(){return Pn||(Pn=1,function(e,n){(function(t){e.exports=t()})(function(){return function t(o,r,d){function c(C,E){if(!r[C]){if(!o[C]){var P=typeof Me=="function"&&Me;if(!E&&P)return P(C,!0);if(p)return p(C,!0);throw new Error("Cannot find module '"+C+"'")}E=r[C]={exports:{}},o[C][0].call(E.exports,function(M){var N=o[C][1][M];return c(N||M)},E,E.exports,t,o,r,d)}return r[C].exports}for(var p=typeof Me=="function"&&Me,w=0;w<d.length;w++)c(d[w]);return c}({1:[function(t,o,r){(function(d,c,p,w,C,E,P,M,N){var v=t("crypto");function x(f,g){g=b(f,g);var l;return(l=g.algorithm!=="passthrough"?v.createHash(g.algorithm):new S).write===void 0&&(l.write=l.update,l.end=l.update),y(g,l).dispatch(f),l.update||l.end(""),l.digest?l.digest(g.encoding==="buffer"?void 0:g.encoding):(f=l.read(),g.encoding!=="buffer"?f.toString(g.encoding):f)}(r=o.exports=x).sha1=function(f){return x(f)},r.keys=function(f){return x(f,{excludeValues:!0,algorithm:"sha1",encoding:"hex"})},r.MD5=function(f){return x(f,{algorithm:"md5",encoding:"hex"})},r.keysMD5=function(f){return x(f,{algorithm:"md5",encoding:"hex",excludeValues:!0})};var h=v.getHashes?v.getHashes().slice():["sha1","md5"],A=(h.push("passthrough"),["buffer","hex","binary","base64"]);function b(f,g){var l={};if(l.algorithm=(g=g||{}).algorithm||"sha1",l.encoding=g.encoding||"hex",l.excludeValues=!!g.excludeValues,l.algorithm=l.algorithm.toLowerCase(),l.encoding=l.encoding.toLowerCase(),l.ignoreUnknown=g.ignoreUnknown===!0,l.respectType=g.respectType!==!1,l.respectFunctionNames=g.respectFunctionNames!==!1,l.respectFunctionProperties=g.respectFunctionProperties!==!1,l.unorderedArrays=g.unorderedArrays===!0,l.unorderedSets=g.unorderedSets!==!1,l.unorderedObjects=g.unorderedObjects!==!1,l.replacer=g.replacer||void 0,l.excludeKeys=g.excludeKeys||void 0,f===void 0)throw new Error("Object argument required.");for(var u=0;u<h.length;++u)h[u].toLowerCase()===l.algorithm.toLowerCase()&&(l.algorithm=h[u]);if(h.indexOf(l.algorithm)===-1)throw new Error('Algorithm "'+l.algorithm+'" not supported. supported values: '+h.join(", "));if(A.indexOf(l.encoding)===-1&&l.algorithm!=="passthrough")throw new Error('Encoding "'+l.encoding+'" not supported. supported values: '+A.join(", "));return l}function L(f){if(typeof f=="function")return/^function\s+\w*\s*\(\s*\)\s*{\s+\[native code\]\s+}$/i.exec(Function.prototype.toString.call(f))!=null}function y(f,g,l){l=l||[];function u(i){return g.update?g.update(i,"utf8"):g.write(i,"utf8")}return{dispatch:function(i){return this["_"+((i=f.replacer?f.replacer(i):i)===null?"null":typeof i)](i)},_object:function(i){var _,T=Object.prototype.toString.call(i),U=/\[object (.*)\]/i.exec(T);if(U=(U=U?U[1]:"unknown:["+T+"]").toLowerCase(),0<=(T=l.indexOf(i)))return this.dispatch("[CIRCULAR:"+T+"]");if(l.push(i),p!==void 0&&p.isBuffer&&p.isBuffer(i))return u("buffer:"),u(i);if(U==="object"||U==="function"||U==="asyncfunction")return T=Object.keys(i),f.unorderedObjects&&(T=T.sort()),f.respectType===!1||L(i)||T.splice(0,0,"prototype","__proto__","constructor"),f.excludeKeys&&(T=T.filter(function(k){return!f.excludeKeys(k)})),u("object:"+T.length+":"),_=this,T.forEach(function(k){_.dispatch(k),u(":"),f.excludeValues||_.dispatch(i[k]),u(",")});if(!this["_"+U]){if(f.ignoreUnknown)return u("["+U+"]");throw new Error('Unknown object type "'+U+'"')}this["_"+U](i)},_array:function(i,k){k=k!==void 0?k:f.unorderedArrays!==!1;var T=this;if(u("array:"+i.length+":"),!k||i.length<=1)return i.forEach(function(R){return T.dispatch(R)});var U=[],k=i.map(function(R){var D=new S,z=l.slice();return y(f,D,z).dispatch(R),U=U.concat(z.slice(l.length)),D.read().toString()});return l=l.concat(U),k.sort(),this._array(k,!1)},_date:function(i){return u("date:"+i.toJSON())},_symbol:function(i){return u("symbol:"+i.toString())},_error:function(i){return u("error:"+i.toString())},_boolean:function(i){return u("bool:"+i.toString())},_string:function(i){u("string:"+i.length+":"),u(i.toString())},_function:function(i){u("fn:"),L(i)?this.dispatch("[native]"):this.dispatch(i.toString()),f.respectFunctionNames!==!1&&this.dispatch("function-name:"+String(i.name)),f.respectFunctionProperties&&this._object(i)},_number:function(i){return u("number:"+i.toString())},_xml:function(i){return u("xml:"+i.toString())},_null:function(){return u("Null")},_undefined:function(){return u("Undefined")},_regexp:function(i){return u("regex:"+i.toString())},_uint8array:function(i){return u("uint8array:"),this.dispatch(Array.prototype.slice.call(i))},_uint8clampedarray:function(i){return u("uint8clampedarray:"),this.dispatch(Array.prototype.slice.call(i))},_int8array:function(i){return u("int8array:"),this.dispatch(Array.prototype.slice.call(i))},_uint16array:function(i){return u("uint16array:"),this.dispatch(Array.prototype.slice.call(i))},_int16array:function(i){return u("int16array:"),this.dispatch(Array.prototype.slice.call(i))},_uint32array:function(i){return u("uint32array:"),this.dispatch(Array.prototype.slice.call(i))},_int32array:function(i){return u("int32array:"),this.dispatch(Array.prototype.slice.call(i))},_float32array:function(i){return u("float32array:"),this.dispatch(Array.prototype.slice.call(i))},_float64array:function(i){return u("float64array:"),this.dispatch(Array.prototype.slice.call(i))},_arraybuffer:function(i){return u("arraybuffer:"),this.dispatch(new Uint8Array(i))},_url:function(i){return u("url:"+i.toString())},_map:function(i){return u("map:"),i=Array.from(i),this._array(i,f.unorderedSets!==!1)},_set:function(i){return u("set:"),i=Array.from(i),this._array(i,f.unorderedSets!==!1)},_file:function(i){return u("file:"),this.dispatch([i.name,i.size,i.type,i.lastModfied])},_blob:function(){if(f.ignoreUnknown)return u("[blob]");throw Error(`Hashing Blob objects is currently not supported
2
2
  (see https://github.com/puleos/object-hash/issues/26)
3
3
  Use "options.replacer" or "options.ignoreUnknown"
4
4
  `)},_domwindow:function(){return u("domwindow")},_bigint:function(i){return u("bigint:"+i.toString())},_process:function(){return u("process")},_timer:function(){return u("timer")},_pipe:function(){return u("pipe")},_tcp:function(){return u("tcp")},_udp:function(){return u("udp")},_tty:function(){return u("tty")},_statwatcher:function(){return u("statwatcher")},_securecontext:function(){return u("securecontext")},_connection:function(){return u("connection")},_zlib:function(){return u("zlib")},_context:function(){return u("context")},_nodescript:function(){return u("nodescript")},_httpparser:function(){return u("httpparser")},_dataview:function(){return u("dataview")},_signal:function(){return u("signal")},_fsevent:function(){return u("fsevent")},_tlswrap:function(){return u("tlswrap")}}}function S(){return{buf:"",write:function(f){this.buf+=f},end:function(f){this.buf+=f},read:function(){return this.buf}}}r.writeToStream=function(f,g,l){return l===void 0&&(l=g,g={}),y(g=b(f,g),l).dispatch(f)}}).call(this,t("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/fake_9a5aa49d.js","/")},{buffer:3,crypto:5,lYpoI2:11}],2:[function(t,o,r){(function(d,c,p,w,C,E,P,M,N){(function(v){var x=typeof Uint8Array<"u"?Uint8Array:Array,h=43,A=47,b=48,L=97,y=65,S=45,f=95;function g(l){return l=l.charCodeAt(0),l===h||l===S?62:l===A||l===f?63:l<b?-1:l<b+10?l-b+26+26:l<y+26?l-y:l<L+26?l-L+26:void 0}v.toByteArray=function(l){var u,i;if(0<l.length%4)throw new Error("Invalid string. Length must be a multiple of 4");var _=l.length,_=l.charAt(_-2)==="="?2:l.charAt(_-1)==="="?1:0,T=new x(3*l.length/4-_),U=0<_?l.length-4:l.length,k=0;function R(D){T[k++]=D}for(u=0;u<U;u+=4,0)R((16711680&(i=g(l.charAt(u))<<18|g(l.charAt(u+1))<<12|g(l.charAt(u+2))<<6|g(l.charAt(u+3))))>>16),R((65280&i)>>8),R(255&i);return _==2?R(255&(i=g(l.charAt(u))<<2|g(l.charAt(u+1))>>4)):_==1&&(R((i=g(l.charAt(u))<<10|g(l.charAt(u+1))<<4|g(l.charAt(u+2))>>2)>>8&255),R(255&i)),T},v.fromByteArray=function(l){var u,i,_,T,U=l.length%3,k="";function R(D){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(D)}for(u=0,_=l.length-U;u<_;u+=3)i=(l[u]<<16)+(l[u+1]<<8)+l[u+2],k+=R((T=i)>>18&63)+R(T>>12&63)+R(T>>6&63)+R(63&T);switch(U){case 1:k=(k+=R((i=l[l.length-1])>>2))+R(i<<4&63)+"==";break;case 2:k=(k=(k+=R((i=(l[l.length-2]<<8)+l[l.length-1])>>10))+R(i>>4&63))+R(i<<2&63)+"="}return k}})(r===void 0?this.base64js={}:r)}).call(this,t("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/base64-js/lib/b64.js","/node_modules/gulp-browserify/node_modules/base64-js/lib")},{buffer:3,lYpoI2:11}],3:[function(t,o,r){(function(d,c,h,w,C,E,P,M,N){var v=t("base64-js"),x=t("ieee754");function h(s,a,m){if(!(this instanceof h))return new h(s,a,m);var O,I,j,V,W=typeof s;if(a==="base64"&&W=="string")for(s=(V=s).trim?V.trim():V.replace(/^\s+|\s+$/g,"");s.length%4!=0;)s+="=";if(W=="number")O=q(s);else if(W=="string")O=h.byteLength(s,a);else{if(W!="object")throw new Error("First argument needs to be a number, array or string.");O=q(s.length)}if(h._useTypedArrays?I=h._augment(new Uint8Array(O)):((I=this).length=O,I._isBuffer=!0),h._useTypedArrays&&typeof s.byteLength=="number")I._set(s);else if(H(V=s)||h.isBuffer(V)||V&&typeof V=="object"&&typeof V.length=="number")for(j=0;j<O;j++)h.isBuffer(s)?I[j]=s.readUInt8(j):I[j]=s[j];else if(W=="string")I.write(s,0,a);else if(W=="number"&&!h._useTypedArrays&&!m)for(j=0;j<O;j++)I[j]=0;return I}function A(s,a,m,O){return h._charsWritten=de(function(I){for(var j=[],V=0;V<I.length;V++)j.push(255&I.charCodeAt(V));return j}(a),s,m,O)}function b(s,a,m,O){return h._charsWritten=de(function(I){for(var j,V,W=[],K=0;K<I.length;K++)V=I.charCodeAt(K),j=V>>8,V=V%256,W.push(V),W.push(j);return W}(a),s,m,O)}function L(s,a,m){var O="";m=Math.min(s.length,m);for(var I=a;I<m;I++)O+=String.fromCharCode(s[I]);return O}function y(s,a,m,j){j||(B(typeof m=="boolean","missing or invalid endian"),B(a!=null,"missing offset"),B(a+1<s.length,"Trying to read beyond buffer length"));var I,j=s.length;if(!(j<=a))return m?(I=s[a],a+1<j&&(I|=s[a+1]<<8)):(I=s[a]<<8,a+1<j&&(I|=s[a+1])),I}function S(s,a,m,j){j||(B(typeof m=="boolean","missing or invalid endian"),B(a!=null,"missing offset"),B(a+3<s.length,"Trying to read beyond buffer length"));var I,j=s.length;if(!(j<=a))return m?(a+2<j&&(I=s[a+2]<<16),a+1<j&&(I|=s[a+1]<<8),I|=s[a],a+3<j&&(I+=s[a+3]<<24>>>0)):(a+1<j&&(I=s[a+1]<<16),a+2<j&&(I|=s[a+2]<<8),a+3<j&&(I|=s[a+3]),I+=s[a]<<24>>>0),I}function f(s,a,m,O){if(O||(B(typeof m=="boolean","missing or invalid endian"),B(a!=null,"missing offset"),B(a+1<s.length,"Trying to read beyond buffer length")),!(s.length<=a))return O=y(s,a,m,!0),32768&O?-1*(65535-O+1):O}function g(s,a,m,O){if(O||(B(typeof m=="boolean","missing or invalid endian"),B(a!=null,"missing offset"),B(a+3<s.length,"Trying to read beyond buffer length")),!(s.length<=a))return O=S(s,a,m,!0),2147483648&O?-1*(4294967295-O+1):O}function l(s,a,m,O){return O||(B(typeof m=="boolean","missing or invalid endian"),B(a+3<s.length,"Trying to read beyond buffer length")),x.read(s,a,m,23,4)}function u(s,a,m,O){return O||(B(typeof m=="boolean","missing or invalid endian"),B(a+7<s.length,"Trying to read beyond buffer length")),x.read(s,a,m,52,8)}function i(s,a,m,O,I){if(I||(B(a!=null,"missing value"),B(typeof O=="boolean","missing or invalid endian"),B(m!=null,"missing offset"),B(m+1<s.length,"trying to write beyond buffer length"),ue(a,65535)),I=s.length,!(I<=m))for(var j=0,V=Math.min(I-m,2);j<V;j++)s[m+j]=(a&255<<8*(O?j:1-j))>>>8*(O?j:1-j)}function _(s,a,m,O,I){if(I||(B(a!=null,"missing value"),B(typeof O=="boolean","missing or invalid endian"),B(m!=null,"missing offset"),B(m+3<s.length,"trying to write beyond buffer length"),ue(a,4294967295)),I=s.length,!(I<=m))for(var j=0,V=Math.min(I-m,4);j<V;j++)s[m+j]=a>>>8*(O?j:3-j)&255}function T(s,a,m,O,I){I||(B(a!=null,"missing value"),B(typeof O=="boolean","missing or invalid endian"),B(m!=null,"missing offset"),B(m+1<s.length,"Trying to write beyond buffer length"),ae(a,32767,-32768)),s.length<=m||i(s,0<=a?a:65535+a+1,m,O,I)}function U(s,a,m,O,I){I||(B(a!=null,"missing value"),B(typeof O=="boolean","missing or invalid endian"),B(m!=null,"missing offset"),B(m+3<s.length,"Trying to write beyond buffer length"),ae(a,2147483647,-2147483648)),s.length<=m||_(s,0<=a?a:4294967295+a+1,m,O,I)}function k(s,a,m,O,I){I||(B(a!=null,"missing value"),B(typeof O=="boolean","missing or invalid endian"),B(m!=null,"missing offset"),B(m+3<s.length,"Trying to write beyond buffer length"),pn(a,34028234663852886e22,-34028234663852886e22)),s.length<=m||x.write(s,a,m,O,23,4)}function R(s,a,m,O,I){I||(B(a!=null,"missing value"),B(typeof O=="boolean","missing or invalid endian"),B(m!=null,"missing offset"),B(m+7<s.length,"Trying to write beyond buffer length"),pn(a,17976931348623157e292,-17976931348623157e292)),s.length<=m||x.write(s,a,m,O,52,8)}r.Buffer=h,r.SlowBuffer=h,r.INSPECT_MAX_BYTES=50,h.poolSize=8192,h._useTypedArrays=function(){try{var s=new ArrayBuffer(0),a=new Uint8Array(s);return a.foo=function(){return 42},a.foo()===42&&typeof a.subarray=="function"}catch{return!1}}(),h.isEncoding=function(s){switch(String(s).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},h.isBuffer=function(s){return!(s==null||!s._isBuffer)},h.byteLength=function(s,a){var m;switch(s+="",a||"utf8"){case"hex":m=s.length/2;break;case"utf8":case"utf-8":m=Z(s).length;break;case"ascii":case"binary":case"raw":m=s.length;break;case"base64":m=ve(s).length;break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":m=2*s.length;break;default:throw new Error("Unknown encoding")}return m},h.concat=function(s,a){if(B(H(s),`Usage: Buffer.concat(list, [totalLength])